summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/new-delete-cxx0x.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR11410: Extend diagnostic to cover all cases of aggregate initialization, notRichard Smith2014-06-031-3/+10
| | | | | | | | | | just the extremely specific case of a trailing array element that couldn't be initialized because the default constructor for the element type is deleted. Also reword the diagnostic to better match our other context diagnostics and to prepare for the implementation of core issue 1070. llvm-svn: 210083
* Proper checking of list-initializers for array new expressions.Sebastian Redl2012-02-161-0/+17
| | | | | | This finishes generalized initializer support in Sema. llvm-svn: 150688
* Fix a rejects-valid in C++11: array new of a negative size, or overflowing arrayRichard Smith2012-02-041-0/+9
new, is well-formed with defined semantics of throwing (a type which can be caught by a handler for) std::bad_array_new_length, unlike in C++98 where it is somewhere nebulous between undefined behavior and ill-formed. If the array size is an integral constant expression and satisfies one of these criteria, we would previous the array new expression, but now in C++11 mode, we merely issue a warning (the code is still rejected in C++98 mode, naturally). We don't yet implement new C++11 semantics correctly (see PR11644), but we do implement the overflow checking, and (for the default operator new) convert such expressions to an exception, so accepting such code now does not seem especially unsafe. llvm-svn: 149767
OpenPOWER on IntegriCloud