From 1566eb5a2683d5bd436a7f0d18fd96dd9e1a607b 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. llvm-svn: 86661 --- clang/lib/Sema/SemaDeclCXX.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 01fc0e9616e4..36f2734a1ad7 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)