diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-07-06 15:59:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-07-06 15:59:29 +0000 |
commit | 04318256b7929347401cca696eb9e6251f3b5181 (patch) | |
tree | 9837bc14b6fae2eb94e3525d4a80f41121c5453c /clang/lib/Sema/SemaInit.cpp | |
parent | 19623dc07582973d706898d3bd44bfea85a18d72 (diff) | |
download | bcm5719-llvm-04318256b7929347401cca696eb9e6251f3b5181.tar.gz bcm5719-llvm-04318256b7929347401cca696eb9e6251f3b5181.zip |
Keep track of the Expr used to describe the size of an array type,
from Enea Zaffanella!
llvm-svn: 74831
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index ecfdfd7ba0b..5be07e39863 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -97,8 +97,9 @@ static void CheckStringInit(Expr *Str, QualType &DeclT, Sema &S) { llvm::APSInt ConstVal(32); ConstVal = StrLength; // Return a new array type (C99 6.7.8p22). - DeclT = S.Context.getConstantArrayType(IAT->getElementType(), ConstVal, - ArrayType::Normal, 0); + DeclT = S.Context.getConstantArrayWithoutExprType(IAT->getElementType(), + ConstVal, + ArrayType::Normal, 0); return; } |