[cfe-commits] r59602 - in /cfe/trunk/lib/Lex: PPDirectives.cpp PPExpressions.cpp
Chris Lattner
sabre at nondot.org
Tue Nov 18 23:33:58 PST 2008
Author: lattner
Date: Wed Nov 19 01:33:58 2008
New Revision: 59602
URL: http://llvm.org/viewvc/llvm-project?rev=59602&view=rev
Log:
don't turn identifierinfo's into strings in diagnostics.
Modified:
cfe/trunk/lib/Lex/PPDirectives.cpp
cfe/trunk/lib/Lex/PPExpressions.cpp
Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=59602&r1=59601&r2=59602&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Wed Nov 19 01:33:58 2008
@@ -788,7 +788,7 @@
// #define X(A,A.
if (std::find(Arguments.begin(), Arguments.end(), II) !=
Arguments.end()) { // C99 6.10.3p6
- Diag(Tok, diag::err_pp_duplicate_name_in_arg_list) << II->getName();
+ Diag(Tok, diag::err_pp_duplicate_name_in_arg_list) << II;
return true;
}
@@ -971,7 +971,7 @@
// must be the same. C99 6.10.3.2.
if (!MI->isIdenticalTo(*OtherMI, *this)) {
Diag(MI->getDefinitionLoc(), diag::ext_pp_macro_redef)
- << MacroNameTok.getIdentifierInfo()->getName();
+ << MacroNameTok.getIdentifierInfo();
Diag(OtherMI->getDefinitionLoc(), diag::ext_pp_macro_redef2);
}
delete OtherMI;
Modified: cfe/trunk/lib/Lex/PPExpressions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPExpressions.cpp?rev=59602&r1=59601&r2=59602&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPExpressions.cpp (original)
+++ cfe/trunk/lib/Lex/PPExpressions.cpp Wed Nov 19 01:33:58 2008
@@ -91,7 +91,7 @@
// into a simple 0, unless it is the C++ keyword "true", in which case it
// turns into "1".
if (II->getPPKeywordID() != tok::pp_defined) {
- PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II->getName();
+ PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II;
Result.Val = II->getTokenID() == tok::kw_true;
Result.Val.setIsUnsigned(false); // "0" is signed intmax_t 0.
Result.setRange(PeekTok.getLocation());
More information about the cfe-commits
mailing list