Handle typedefs to VLAs (Emit the size expr when we encounter the typedef

llvm-svn: 61290
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 86af210..024ca81 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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];