Commit Graph

6 Commits

Author SHA1 Message Date
Douglas Gregor 9a414458ff Don't complain about VLAs of non-POD types when the array type is
dependent. Fixes <rdar://problem/8021385>.

llvm-svn: 104550
2010-05-24 20:42:30 +00:00
Douglas Gregor 5a5073e4d6 Make sure that we instantiate variably modified types, even if they
aren't dependent. Fixes <rdar://problem/8020206>.

llvm-svn: 104511
2010-05-24 17:22:01 +00:00
Douglas Gregor a09387df9f It turns out that people love using VLAs in templates, too. Weaken our
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
2010-05-23 19:57:01 +00:00
Douglas Gregor 4b636a70d9 Put the VLA-is-an-extension warning into its own warning group (-Wvla)
so that it can be selectively enabled/disabled.

llvm-svn: 104462
2010-05-23 16:51:27 +00:00
Douglas Gregor 5e8c8c0e12 Even though we don't unique VLA types, we still need to build a
canonical type where the element type is canonical. Fixes PR7206.

llvm-svn: 104461
2010-05-23 16:10:32 +00:00
Douglas Gregor 959d5a0cbd Implement support for variable length arrays in C++. VLAs are limited
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
2010-05-22 16:17:30 +00:00