diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-08 08:55:46 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-08 08:55:46 +0000 |
commit | ff676cb48fe8bf7be2feaa251dc7c5fb15af4730 (patch) | |
tree | 980c79f4bb390f3c84823e06a04ef25f6a3ff27f /lib/Sema/SemaTemplateInstantiate.cpp | |
parent | 36784e78bcce1dbaf35f94a655394e348b4d9ac7 (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/SemaTemplateInstantiate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiate.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 6fb6ea270b..c951b2573a 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -724,8 +724,9 @@ namespace { /// as an instantiated local. VarDecl *RebuildExceptionDecl(VarDecl *ExceptionDecl, TypeSourceInfo *Declarator, - IdentifierInfo *Name, - SourceLocation Loc); + SourceLocation StartLoc, + SourceLocation NameLoc, + IdentifierInfo *Name); /// \brief Rebuild the Objective-C exception declaration and register the /// declaration as an instantiated local. @@ -880,10 +881,11 @@ TemplateInstantiator::TransformFirstQualifierInScope(NamedDecl *D, VarDecl * TemplateInstantiator::RebuildExceptionDecl(VarDecl *ExceptionDecl, TypeSourceInfo *Declarator, - IdentifierInfo *Name, - SourceLocation Loc) { + SourceLocation StartLoc, + SourceLocation NameLoc, + IdentifierInfo *Name) { VarDecl *Var = inherited::RebuildExceptionDecl(ExceptionDecl, Declarator, - Name, Loc); + StartLoc, NameLoc, Name); if (Var) getSema().CurrentInstantiationScope->InstantiatedLocal(ExceptionDecl, Var); return Var; @@ -1451,9 +1453,10 @@ ParmVarDecl *Sema::SubstParmVarDecl(ParmVarDecl *OldParm, } ParmVarDecl *NewParm = CheckParameter(Context.getTranslationUnitDecl(), - NewDI, NewDI->getType(), - OldParm->getIdentifier(), + OldParm->getInnerLocStart(), OldParm->getLocation(), + OldParm->getIdentifier(), + NewDI->getType(), NewDI, OldParm->getStorageClass(), OldParm->getStorageClassAsWritten()); if (!NewParm) |