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 | 7e7eb3da052a6d80ddf2377cab0384c798f73f75 (patch) | |
tree | d73b5a19683a56585be300d5c19bb12eb0ca37a7 /lib/Sema/SemaTemplateInstantiate.cpp | |
parent | 6f4a69a3107e7ff1569c747f7c6bdf7cff8cbf55 (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/SemaTemplateInstantiate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiate.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 6c2dc77b4c..6ee50ab98c 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -421,7 +421,20 @@ InstantiateConstantArrayType(const ConstantArrayType *T) const { IntegerLiteral ArraySize(Size, SizeType, Loc); return SemaRef.BuildArrayType(ElementType, T->getSizeModifier(), &ArraySize, T->getIndexTypeQualifier(), - Loc, Entity); + SourceRange(), // FIXME: provide proper range? + Entity); +} + +QualType +TemplateTypeInstantiator::InstantiateConstantArrayWithExprType +(const ConstantArrayWithExprType *T) const { + return InstantiateConstantArrayType(T); +} + +QualType +TemplateTypeInstantiator::InstantiateConstantArrayWithoutExprType +(const ConstantArrayWithoutExprType *T) const { + return InstantiateConstantArrayType(T); } QualType @@ -432,8 +445,9 @@ InstantiateIncompleteArrayType(const IncompleteArrayType *T) const { return ElementType; return SemaRef.BuildArrayType(ElementType, T->getSizeModifier(), - 0, T->getIndexTypeQualifier(), - Loc, Entity); + 0, T->getIndexTypeQualifier(), + SourceRange(), // FIXME: provide proper range? + Entity); } QualType @@ -468,7 +482,9 @@ InstantiateDependentSizedArrayType(const DependentSizedArrayType *T) const { return SemaRef.BuildArrayType(ElementType, T->getSizeModifier(), InstantiatedArraySize.takeAs<Expr>(), - T->getIndexTypeQualifier(), Loc, Entity); + T->getIndexTypeQualifier(), + SourceRange(), // FIXME: provide proper range? + Entity); } QualType |