summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/const-init.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Lit C++11 Compatibility Patch #8Charles Li2016-04-141-0/+7
| | | | | | | 24 tests have been updated for C++11 compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266387 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: Correctly initialize bitfields with non-constant initializersDavid Majnemer2015-03-141-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232285 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case updates for explicit type parameter to the gep operatorDavid Blaikie2015-03-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232187 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'not' to commands that are expected to fail.Rafael Espindola2013-07-041-1/+1
| | | | | | | This is at least good documentation, but also opens the possibility of using pipefail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185652 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow constant-folding of references which were formed in a manner not permittedRichard Smith2012-01-121-0/+7
| | | | | | | in a constant expression, for compatibility with g++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148020 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test on Release builds.Eli Friedman2012-01-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147565 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an APValue representation for the difference between two ↵Eli Friedman2012-01-041-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147561 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix wrong-code bug when a const automatic variable of struct type has both aRichard Smith2011-12-021-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145654 91177308-0d34-0410-b5e6-96231b3b80d8
* Represent an APValue based on a Decl as that Decl, rather than a DeclRefExprRichard Smith2011-11-121-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144468 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to emit CK_LValueBitCast casts as constants. PR9558.Eli Friedman2011-10-241-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142863 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner2011-06-201-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133413 91177308-0d34-0410-b5e6-96231b3b80d8
* Secure this test against slightly different number formatters.John McCall2010-10-091-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116141 91177308-0d34-0410-b5e6-96231b3b80d8
* Permit constant evaluation of const floating-point variables withJohn McCall2010-10-091-0/+12
| | | | | | | | constant initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116138 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit global references with constant initializers as constants. Fixes PR5585.John McCall2010-02-081-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95577 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
* Support emitting aggregate class initializers. Fixes PR5581.Anders Carlsson2009-11-211-1/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89569 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for generating reference initialization code.Anders Carlsson2009-04-111-0/+11
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68852 91177308-0d34-0410-b5e6-96231b3b80d8