Use PP.getLocForEndOfToken as suggested by John.

llvm-svn: 86661
This commit is contained in:
Anders Carlsson 2009-11-10 03:32:44 +00:00
parent 77c470e8c7
commit 1566eb5a26
1 changed files with 2 additions and 2 deletions

View File

@ -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)