summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExceptionSpec.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-12 11:17:06 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-12 11:17:06 +0000
commitf2a79d94e47719b3a3a0e85ede7d65a52a8e9104 (patch)
tree82101a3d41e6d2767f4339cd5e0f2a0785f3e95a /clang/lib/Sema/SemaExceptionSpec.cpp
parent5e152ce3feac1e5861bc1028c8f266cb9c8af696 (diff)
downloadbcm5719-llvm-f2a79d94e47719b3a3a0e85ede7d65a52a8e9104.tar.gz
bcm5719-llvm-f2a79d94e47719b3a3a0e85ede7d65a52a8e9104.zip
Forgotten part of previous commit.
llvm-svn: 127536
Diffstat (limited to 'clang/lib/Sema/SemaExceptionSpec.cpp')
-rw-r--r--clang/lib/Sema/SemaExceptionSpec.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp
index 75ae8c215ab..dce4c6e2204 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())
OpenPOWER on IntegriCloud