diff options
Diffstat (limited to 'clang/lib/Sema/SemaExceptionSpec.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExceptionSpec.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp index 75ae8c2..dce4c6e 100644 --- a/clang/lib/Sema/SemaExceptionSpec.cpp +++ b/clang/lib/Sema/SemaExceptionSpec.cpp @@ -194,14 +194,14 @@ bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {      OS << ")";      OS.flush(); -    SourceLocation AfterParenLoc; +    SourceLocation FixItLoc;      if (TypeSourceInfo *TSInfo = New->getTypeSourceInfo()) {        TypeLoc TL = TSInfo->getTypeLoc().IgnoreParens();        if (const FunctionTypeLoc *FTLoc = dyn_cast<FunctionTypeLoc>(&TL)) -        AfterParenLoc = PP.getLocForEndOfToken(FTLoc->getRParenLoc()); +        FixItLoc = PP.getLocForEndOfToken(FTLoc->getLocalRangeEnd());      } -    if (AfterParenLoc.isInvalid()) +    if (FixItLoc.isInvalid())        Diag(New->getLocation(), diag::warn_missing_exception_specification)          << New << OS.str();      else { @@ -209,7 +209,7 @@ bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {        // late-specified return types.        Diag(New->getLocation(), diag::warn_missing_exception_specification)          << New << OS.str() -        << FixItHint::CreateInsertion(AfterParenLoc, " " + OS.str().str()); +        << FixItHint::CreateInsertion(FixItLoc, " " + OS.str().str());      }      if (!Old->getLocation().isInvalid())  | 
