]> granicus.if.org Git - clang/commitdiff
Use PP.getLocForEndOfToken as suggested by John.
authorAnders Carlsson <andersca@mac.com>
Tue, 10 Nov 2009 03:32:44 +0000 (03:32 +0000)
committerAnders Carlsson <andersca@mac.com>
Tue, 10 Nov 2009 03:32:44 +0000 (03:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86661 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclCXX.cpp

index 01fc0e9616e48474215d893382a414c372288cf9..36f2734a1ad7e7e8b3e70f14fbda9f6c86c90731 100644 (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)