From 4881b99bc830d4432c171b0a00348711bb863eea Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Tue, 10 Nov 2009 03:32:44 +0000 Subject: [PATCH] Use PP.getLocForEndOfToken as suggested by John. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86661 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDeclCXX.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.50.1