aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/const-init.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-04-14Lit C++11 Compatibility Patch #8Charles Li1-0/+7
24 tests have been updated for C++11 compatibility. llvm-svn: 266387
2015-03-14CodeGen: Correctly initialize bitfields with non-constant initializersDavid Majnemer1-1/+8
It is possible to construct an initializer for a bitfield which is not constant. Instead of emitting code to initialize the field before the execution of main, clang would crash. llvm-svn: 232285
2015-03-13Test case updates for explicit type parameter to the gep operatorDavid Blaikie1-1/+1
llvm-svn: 232187
2013-07-04Add 'not' to commands that are expected to fail.Rafael Espindola1-1/+1
This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
2012-01-12Allow constant-folding of references which were formed in a manner not permittedRichard Smith1-0/+7
in a constant expression, for compatibility with g++. llvm-svn: 148020
2012-01-04Fix test on Release builds.Eli Friedman1-1/+1
llvm-svn: 147565
2012-01-04Add an APValue representation for the difference between two ↵Eli Friedman1-0/+13
address-of-label expressions. Add support to Evaluate and CGExprConstant for generating/handling them. Remove the special-case for such differences in Expr::isConstantInitializer. With that done, remove a bunch of buggy code from CGExprConstant for handling scalar expressions which is no longer necessary. Fixes PR11705. llvm-svn: 147561
2011-12-02Fix wrong-code bug when a const automatic variable of struct type has both aRichard Smith1-0/+11
mutable member and a constant initializer. We'd previously promoted such variables to global constants, resulting in nasal demons if the mutable member was modified. This is only a temporary fix. The subtle interplay between isConstantInitializer and CGExprConstant is very bug-prone; there are some other issues in this area which I will be addressing in subsequent, more major reworking of this code. llvm-svn: 145654
2011-11-12Represent an APValue based on a Decl as that Decl, rather than a DeclRefExprRichard Smith1-1/+6
or MemberExpr which refers to it. As a side-effect, MemberExprs which refer to static member functions and static data members are now emitted as constant expressions. llvm-svn: 144468
2011-10-24Don't try to emit CK_LValueBitCast casts as constants. PR9558.Eli Friedman1-0/+4
llvm-svn: 142863
2011-06-20Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner1-2/+2
ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
2010-10-09Secure this test against slightly different number formatters.John McCall1-2/+2
llvm-svn: 116141
2010-10-09Permit constant evaluation of const floating-point variables withJohn McCall1-0/+12
constant initializers. llvm-svn: 116138
2010-02-08Emit global references with constant initializers as constants. Fixes PR5585.John McCall1-2/+2
The standard actually says that such references should have internal linkage, but gcc doesn't do that, so we probably can't get away with it. llvm-svn: 95577
2009-12-15Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar1-1/+1
- This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
2009-11-21Support emitting aggregate class initializers. Fixes PR5581.Anders Carlsson1-1/+16
llvm-svn: 89569
2009-04-11Add support for generating reference initialization code.Anders Carlsson1-0/+11
llvm-svn: 68852