[cfe-commits] r86661 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Anders Carlsson
andersca at mac.com
Mon Nov 9 19:32:44 PST 2009
Author: andersca
Date: Mon Nov 9 21:32:44 2009
New Revision: 86661
URL: http://llvm.org/viewvc/llvm-project?rev=86661&view=rev
Log:
Use PP.getLocForEndOfToken as suggested by John.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=86661&r1=86660&r2=86661&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Mon Nov 9 21:32:44 2009
@@ -268,8 +268,8 @@
// 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)
More information about the cfe-commits
mailing list