Handle typedefs to VLAs (Emit the size expr when we encounter the typedef
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61290 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 86af210..024ca81 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2184,8 +2184,7 @@
QualType T = IDecl->getType();
if (T->isVariableArrayType()) {
- const VariableArrayType *VAT =
- cast<VariableArrayType>(T.getUnqualifiedType());
+ const VariableArrayType *VAT = Context.getAsVariableArrayType(T);
// FIXME: This won't give the correct result for
// int a[10][n];