summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/c99-variable-length-array.cpp
Commit message (Collapse)AuthorAgeFilesLines
* when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be ↵Chris Lattner2011-06-141-0/+9
| | | | | | | | | | folded to a constant as constant size arrays. This has slightly different semantics in some insane cases, but allows us to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other modes. This addressed rdar://8733881 - error "variable-sized object may not be initialized"; g++ accepts same code llvm-svn: 132983
* Reject the allocation of variably-modified types in C++ 'new'Douglas Gregor2010-10-061-0/+7
| | | | | | | | expressions. Fixes PR8209 in the narrowest way possible. I'm still considering whether I want to implement the extension that permits the use of VLA types in a 'new' expression. llvm-svn: 115790
* Don't complain about VLAs of non-POD types when the array type isDouglas Gregor2010-05-241-0/+14
| | | | | | dependent. Fixes <rdar://problem/8021385>. llvm-svn: 104550
* Make sure that we instantiate variably modified types, even if theyDouglas Gregor2010-05-241-0/+10
| | | | | | aren't dependent. Fixes <rdar://problem/8020206>. llvm-svn: 104511
* It turns out that people love using VLAs in templates, too. Weaken ourDouglas Gregor2010-05-231-4/+5
| | | | | | | | VLA restrictions so that one can use VLAs in templates (even accidentally), but not as part of a non-type template parameter (which would be very bad). llvm-svn: 104471
* Put the VLA-is-an-extension warning into its own warning group (-Wvla)Douglas Gregor2010-05-231-7/+8
| | | | | | so that it can be selectively enabled/disabled. llvm-svn: 104462
* Even though we don't unique VLA types, we still need to build aDouglas Gregor2010-05-231-0/+10
| | | | | | canonical type where the element type is canonical. Fixes PR7206. llvm-svn: 104461
* Implement support for variable length arrays in C++. VLAs are limitedDouglas Gregor2010-05-221-0/+80
in several important ways: - VLAs of non-POD types are not permitted. - VLAs cannot be used in conjunction with C++ templates. These restrictions are intended to keep VLAs out of the parts of the C++ type system where they cause the most trouble. Fixes PR5678 and <rdar://problem/8013618>. llvm-svn: 104443
OpenPOWER on IntegriCloud