From: Anders Carlsson Date: Tue, 10 Nov 2009 03:32:44 +0000 (+0000) Subject: Use PP.getLocForEndOfToken as suggested by John. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4881b99bc830d4432c171b0a00348711bb863eea;p=clang Use PP.getLocForEndOfToken as suggested by John. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86661 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 01fc0e9616..36f2734a1a 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/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)