From 3c7236e01dfb69b370857ccd71c7bcf5ce80b36f Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 8 Jan 2013 00:01:45 +0000 Subject: [PATCH] Back out my no-op change from r171783. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171817 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaType.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index ad704685e5..1bdd7c3b39 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1269,12 +1269,6 @@ static bool isArraySizeVLA(Sema &S, Expr *ArraySize, llvm::APSInt &SizeVal) { S.LangOpts.GNUMode).isInvalid(); } -/// \brief Determine whether the given type is a POD or standard-layout type, -/// as appropriate for the C++ language options. -static bool isPODType(QualType T, ASTContext &Context) { - return Context.getLangOpts().CPlusPlus11? T.isCXX11PODType(Context) - : T.isCXX98PODType(Context); -} /// \brief Build an array type. /// @@ -1448,8 +1442,8 @@ QualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, // Prohibit the use of non-POD types in VLAs. QualType BaseT = Context.getBaseElementType(T); if (!T->isDependentType() && - !BaseT->isObjCLifetimeType() && - !isPODType(BaseT, Context)) { + !BaseT.isPODType(Context) && + !BaseT->isObjCLifetimeType()) { Diag(Loc, diag::err_vla_non_pod) << BaseT; return QualType(); -- 2.40.0