aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-01-08 00:01:45 +0000
committerDouglas Gregor <dgregor@apple.com>2013-01-08 00:01:45 +0000
commit3c7236e01dfb69b370857ccd71c7bcf5ce80b36f (patch)
tree21a9bdab5bb4493caf669fb8988ed12e7662c3bc /lib/Sema/SemaType.cpp
parentc117f39a772a3f1e42915d79916013e9fa9f29a9 (diff)
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
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp10
1 files 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();