diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-29 09:39:50 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-29 09:39:50 +0000 |
commit | e7545b33ff79c55d08d78a35b052e494ea49a0bc (patch) | |
tree | cc287689fbc2a32c9bf08d9842350a8b2e0dbc59 /clang/lib/Sema | |
parent | d8c12badad7765655e86810eab60db23d1258326 (diff) | |
download | bcm5719-llvm-e7545b33ff79c55d08d78a35b052e494ea49a0bc.tar.gz bcm5719-llvm-e7545b33ff79c55d08d78a35b052e494ea49a0bc.zip |
Implementation of VlA of GNU C++ extension, by Vladimir Yakovlev.
This enables GNU C++ extension "Variable length array" by default.
Differential Revision: http://reviews.llvm.org/D18823
llvm-svn: 268018
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index aa0863e0e8c..1ab43f909a8 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -2234,15 +2234,8 @@ QualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, // If this is not C99, extwarn about VLA's and C99 array size modifiers. if (!getLangOpts().C99) { if (T->isVariableArrayType()) { - // Prohibit the use of non-POD types in VLAs. - QualType BaseT = Context.getBaseElementType(T); - if (!T->isDependentType() && isCompleteType(Loc, BaseT) && - !BaseT.isPODType(Context) && !BaseT->isObjCLifetimeType()) { - Diag(Loc, diag::err_vla_non_pod) << BaseT; - return QualType(); - } // Prohibit the use of VLAs during template argument deduction. - else if (isSFINAEContext()) { + if (isSFINAEContext()) { Diag(Loc, diag::err_vla_in_sfinae); return QualType(); } |