summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-11-10 03:32:44 +0000
committerAnders Carlsson <andersca@mac.com>2009-11-10 03:32:44 +0000
commit1566eb5a2683d5bd436a7f0d18fd96dd9e1a607b (patch)
tree2c27d3b823945dae14ff29d2e71a853eb2f413b3
parent77c470e8c753876a250be134d817dc6a91410a51 (diff)
downloadbcm5719-llvm-1566eb5a2683d5bd436a7f0d18fd96dd9e1a607b.tar.gz
bcm5719-llvm-1566eb5a2683d5bd436a7f0d18fd96dd9e1a607b.zip
Use PP.getLocForEndOfToken as suggested by John.
llvm-svn: 86661
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 01fc0e9616e..36f2734a1ad 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -268,8 +268,8 @@ bool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old) {
// points to the '=' which means that the fixit hint won't remove any
// extra spaces between the type and the '='.
SourceLocation Begin = NewParam->getLocation();
- if (IdentifierInfo *II = NewParam->getIdentifier())
- Begin = Begin.getFileLocWithOffset(II->getLength());
+ if (NewParam->getIdentifier())
+ Begin = PP.getLocForEndOfToken(Begin);
Diag(NewParam->getLocation(),
diag::err_param_default_argument_redefinition)
OpenPOWER on IntegriCloud