summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-06 15:59:29 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-06 15:59:29 +0000
commit04318256b7929347401cca696eb9e6251f3b5181 (patch)
tree9837bc14b6fae2eb94e3525d4a80f41121c5453c /clang/lib/Sema/SemaInit.cpp
parent19623dc07582973d706898d3bd44bfea85a18d72 (diff)
downloadbcm5719-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.cpp5
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;
}
OpenPOWER on IntegriCloud