aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-08 08:55:46 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-08 08:55:46 +0000
commitff676cb48fe8bf7be2feaa251dc7c5fb15af4730 (patch)
tree980c79f4bb390f3c84823e06a04ef25f6a3ff27f /lib/Sema/TreeTransform.h
parent36784e78bcce1dbaf35f94a655394e348b4d9ac7 (diff)
Fixed source range for all DeclaratorDecl's.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127225 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r--lib/Sema/TreeTransform.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 7f055c08cc..835b2f875e 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -1130,9 +1130,10 @@ public:
/// Subclasses may override this routine to provide different behavior.
VarDecl *RebuildObjCExceptionDecl(VarDecl *ExceptionDecl,
TypeSourceInfo *TInfo, QualType T) {
- return getSema().BuildObjCExceptionDecl(TInfo, T,
- ExceptionDecl->getIdentifier(),
- ExceptionDecl->getLocation());
+ return getSema().BuildObjCExceptionDecl(TInfo, T,
+ ExceptionDecl->getInnerLocStart(),
+ ExceptionDecl->getLocation(),
+ ExceptionDecl->getIdentifier());
}
/// \brief Build a new Objective-C @catch statement.
@@ -1197,11 +1198,13 @@ public:
///
/// By default, performs semantic analysis to build the new decaration.
/// Subclasses may override this routine to provide different behavior.
- VarDecl *RebuildExceptionDecl(VarDecl *ExceptionDecl,
+ VarDecl *RebuildExceptionDecl(VarDecl *ExceptionDecl,
TypeSourceInfo *Declarator,
- IdentifierInfo *Name,
- SourceLocation Loc) {
- return getSema().BuildExceptionDeclaration(0, Declarator, Name, Loc);
+ SourceLocation StartLoc,
+ SourceLocation IdLoc,
+ IdentifierInfo *Id) {
+ return getSema().BuildExceptionDeclaration(0, Declarator,
+ StartLoc, IdLoc, Id);
}
/// \brief Build a new C++ catch statement.
@@ -3628,6 +3631,7 @@ TreeTransform<Derived>::TransformFunctionTypeParam(ParmVarDecl *OldParm,
else
return ParmVarDecl::Create(SemaRef.Context,
OldParm->getDeclContext(),
+ OldParm->getInnerLocStart(),
OldParm->getLocation(),
OldParm->getIdentifier(),
NewDI->getType(),
@@ -5288,8 +5292,9 @@ TreeTransform<Derived>::TransformCXXCatchStmt(CXXCatchStmt *S) {
return StmtError();
Var = getDerived().RebuildExceptionDecl(ExceptionDecl, T,
- ExceptionDecl->getIdentifier(),
- ExceptionDecl->getLocation());
+ ExceptionDecl->getInnerLocStart(),
+ ExceptionDecl->getLocation(),
+ ExceptionDecl->getIdentifier());
if (!Var || Var->isInvalidDecl())
return StmtError();
}