don't turn identifierinfo's into strings in diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59602 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp
index 07c5f8e..ced7673 100644
--- a/lib/Lex/PPDirectives.cpp
+++ b/lib/Lex/PPDirectives.cpp
@@ -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;
diff --git a/lib/Lex/PPExpressions.cpp b/lib/Lex/PPExpressions.cpp
index e1695e9..3eedf8c 100644
--- a/lib/Lex/PPExpressions.cpp
+++ b/lib/Lex/PPExpressions.cpp
@@ -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());