aboutsummaryrefslogtreecommitdiff
path: root/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
commit7e7eb3da052a6d80ddf2377cab0384c798f73f75 (patch)
treed73b5a19683a56585be300d5c19bb12eb0ca37a7 /lib/Sema/SemaInit.cpp
parent6f4a69a3107e7ff1569c747f7c6bdf7cff8cbf55 (diff)
Keep track of the Expr used to describe the size of an array type,
from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index ecfdfd7ba0..5be07e3986 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/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;
}