summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR18013: Don't assert diagnosing a bad std::initializer_list construction.Richard Smith2013-11-211-0/+5
| | | | llvm-svn: 195384
* When creating an implicit conversion sequence for a reference of type T from anRichard Smith2013-09-061-0/+7
| | | | | | | | initializer list containing a single element of type T, be sure to mark the sequence as a list conversion sequence so that it is known to be worse than an implicit conversion sequence that initializes a std::initializer_list object. llvm-svn: 190115
* PR12086, PR15117Richard Smith2013-06-121-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Fix crash-on-invalid if list-initialization works, but we bail out whenRichard Smith2013-05-231-0/+10
| | | | | | building the resulting expression because it invokes a deleted constructor. llvm-svn: 182624
* Replace "failed template argument deduction" diagnostic with something usefulRichard Smith2013-01-311-0/+9
| | | | | | in the one case where we've already factored out a reason code. llvm-svn: 174036
* Fix overload resolution for the initialization of a multi-dimensionalRichard Smith2012-12-091-0/+8
| | | | | | | | | | array from a braced-init-list. There seems to be a core wording wart here (it suggests we should be testing whether the elements of the init list are implicitly convertible to the array element type, not whether there is an implicit conversion sequence) but our prior behavior appears to be a bug, not a deliberate effort to implement the standard as written. llvm-svn: 169690
* Fix assertion failure with auto and nested initializer list; PR14272.Eli Friedman2012-11-061-0/+4
| | | | llvm-svn: 167506
* When testing whether we can perform copy or move initialization, beDouglas Gregor2012-07-311-0/+12
| | | | | | sure to supply an initialization location. Fixes <rdar://problem/11951661>. llvm-svn: 161084
* Allow a conversion from the empty initializer list {} to anDouglas Gregor2012-04-041-0/+9
| | | | | | | std::initializer_list<T> so long as <T> is known. This conversion has identity rank. llvm-svn: 154065
* When performing template argument deduction for an initializer list,Douglas Gregor2012-04-041-0/+16
| | | | | | | | | | | | | | | | | be sure to perform the argument type adjustments in [temp.deduct.call]p2, e.g., array decay. And, when performing these deductions in the context of 'auto', make sure that we're deducing the P' in std::initializer_list<P'> rather than the whole initializer list. Together, this makes code like for( auto s : {"Deferred", "New", "Open", "Review"}) { } work properly. llvm-svn: 153998
* Support deducing template arguments from nested initializer lists. PR12119.Sebastian Redl2012-03-151-0/+13
| | | | llvm-svn: 152848
* Fix parsing and processing initializer lists in return statements and as ↵Sebastian Redl2012-02-221-0/+1
| | | | | | direct member initializers. llvm-svn: 151155
* Emit a warning when list-initializing a std::initializer_list member.Sebastian Redl2012-02-191-0/+9
| | | | llvm-svn: 150933
* Proper initializer list support for new expressions and type construct ↵Sebastian Redl2012-02-121-0/+5
| | | | | | expressions. Array new still missing. llvm-svn: 150346
* Minor fixups for auto deduction of initializer lists.Sebastian Redl2012-01-231-0/+5
| | | | | | | | Fix some review comments. Add a test for deduction when std::initializer_list isn't available yet. Fix redundant error messages. This fixes and outstanding FIXME too. llvm-svn: 148735
* Auto deduction support for std::initializer_list, including for-range ↵Sebastian Redl2012-01-171-0/+8
| | | | | | | | support. This means you can now write: for (int i : {1, 4, 512, 23, 251}) {} llvm-svn: 148353
* Template argument deduction for std::initializer_list arguments from ↵Sebastian Redl2012-01-171-0/+22
| | | | | | initializer lists. llvm-svn: 148352
* Basic overloading support for std::initializer_list.Sebastian Redl2012-01-171-0/+29
| | | | llvm-svn: 148350
* Sema support for initialization of std::initializer_list from initializer lists.Sebastian Redl2012-01-171-0/+60
This does not yet support CodeGen. llvm-svn: 148349
OpenPOWER on IntegriCloud