aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaType.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index ea2b2e6812..35efa6113b 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -711,7 +711,8 @@ QualType Sema::BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM,
if (!getLangOptions().C99) {
if (T->isVariableArrayType()) {
// Prohibit the use of non-POD types in VLAs.
- if (!Context.getBaseElementType(T)->isPODType()) {
+ if (!T->isDependentType() &&
+ !Context.getBaseElementType(T)->isPODType()) {
Diag(Loc, diag::err_vla_non_pod)
<< Context.getBaseElementType(T);
return QualType();