summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-pr12086.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Emit initializers for static-storage-duration temporaries as constants whereRichard Smith2013-06-141-7/+8
| | | | | | possible. llvm-svn: 183967
* PR12086, PR15117Richard Smith2013-06-121-6/+100
| | | | | | | | | | | | | | | | | | | Introduce CXXStdInitializerListExpr node, representing the implicit construction of a std::initializer_list<T> object from its underlying array. The AST representation of such an expression goes from an InitListExpr with a flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr). This more detailed representation has several advantages, the most important of which is that the new MaterializeTemporaryExpr allows us to directly model lifetime extension of the underlying temporary array. Using that, this patch *drastically* simplifies the IR generation of this construct, provides IR generation support for nested global initializer_list objects, fixes several bugs where the destructors for the underlying array would accidentally not get invoked, and provides constant expression evaluation support for std::initializer_list objects. llvm-svn: 183872
* Hack in a loud error for PR12086. Better than a silent miscompile.Sebastian Redl2012-02-271-0/+37
llvm-svn: 151586
OpenPOWER on IntegriCloud