aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2008-12-20 21:51:53 +0000
committerAnders Carlsson <andersca@mac.com>2008-12-20 21:51:53 +0000
commitfcdbb93749ed69aa9022437052c390522355ec3d (patch)
treed15a415fc2ca5e6e2e1f3baea6505215672e7d6e /lib/Sema/SemaDecl.cpp
parent7e63b8527fa0b065802fc6cb8cb6124d7c23c4a2 (diff)
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
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 86af21024b..024ca8138a 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2184,8 +2184,7 @@ Sema::DeclTy *Sema::FinalizeDeclaratorGroup(Scope *S, DeclTy *group) {
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];