rsmith added inline comments. ================ Comment at: llvm/tools/clang/lib/Sema/SemaType.cpp:2163-2165 @@ -2161,3 +2162,5 @@ if (!T->isDependentType() && isCompleteType(Loc, BaseT) && - !BaseT.isPODType(Context) && !BaseT->isObjCLifetimeType()) { + RD && !RD->hasDefaultConstructor() && + !BaseT->isObjCLifetimeType()) { Diag(Loc, diag::err_vla_non_pod) << BaseT; + return QualType(); ---------------- Why reject types without default constructors? That's something SemaInit should be checking for, not the responsibility of this code. If we really need to reject them here for some reason, a "non-POD" error is not the right way to diagnose it.
http://reviews.llvm.org/D18823 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits