summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Provide fixed target triples to make test results consistent across ARM hosts.David Blaikie2012-09-101-1/+1
| | | | | | Patch by David Tweed, review by myself and John McCall. llvm-svn: 163564
* If the element type of an initializer list has a destructor, make sure we ↵Sebastian Redl2012-03-051-0/+18
| | | | | | check it. Fixes PR12178. llvm-svn: 152048
* CodeGen support for global variables of type std::initializer_list<X>.Sebastian Redl2012-02-251-15/+32
| | | | | | | | | | | | | This emits a backing array with internal linkage and fills it with data, then has the initializer_list point at the array. Dynamic initialization and global destructors are correctly supported. What doesn't work is nested initializer_lists. I have no idea how to get them to work, either. However, these should be very rare, and so I'll just call it a known bug and declare generalized initializers DONE! llvm-svn: 151457
* Harden test against for operator new(unsigned int).Benjamin Kramer2012-02-191-1/+1
| | | | llvm-svn: 150932
* Make heap-allocation of std::initializer_list 'work'.Sebastian Redl2012-02-191-0/+20
| | | | llvm-svn: 150931
* Make std::initializer_list member initializers 'work'.Sebastian Redl2012-02-191-0/+31
| | | | llvm-svn: 150930
* Get recursive initializer lists to work and add a test. Codegen of ↵Sebastian Redl2012-02-191-0/+28
| | | | | | std::initializer_list is now complete. Onward to array new. llvm-svn: 150926
* Add a testcase for using objects with list-constructors, and fix a Sema ↵Sebastian Redl2012-02-191-1/+29
| | | | | | crash by repeating an old hack. llvm-svn: 150925
* Add a testcase to show that temporaries from the initializer list are ↵Sebastian Redl2012-02-191-0/+30
| | | | | | destroyed correctly. llvm-svn: 150924
* Basic code generation support for std::initializer_list.Sebastian Redl2012-02-171-0/+80
We now generate temporary arrays to back std::initializer_list objects initialized with braces. The initializer_list is then made to point at the array. We support both ptr+size and start+end forms, although the latter is untested. Array lifetime is correct for temporary std::initializer_lists (e.g. call arguments) and local variables. It is untested for new expressions and member initializers. Things left to do: Massively increase the amount of testing. I need to write tests for start+end init lists, temporary objects created as a side effect of initializing init list objects, new expressions, member initialization, creation of temporary objects (e.g. std::vector) for initializer lists, and probably more. Get lifetime "right" for member initializers and new expressions. Not that either are very useful. Implement list-initialization of array new expressions. llvm-svn: 150803
OpenPOWER on IntegriCloud