]> granicus.if.org Git - clang/commitdiff
Back out my no-op change from r171783.
authorDouglas Gregor <dgregor@apple.com>
Tue, 8 Jan 2013 00:01:45 +0000 (00:01 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 8 Jan 2013 00:01:45 +0000 (00:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171817 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaType.cpp

index ad704685e58685d89bd07cb7b8c7490de09d2c2b..1bdd7c3b398aee6940173f1d64546fef10a8960c 100644 (file)
@@ -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();