summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp4
-rw-r--r--clang/lib/Lex/PPExpressions.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 07c5f8ea68e..ced7673ca23 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -788,7 +788,7 @@ bool Preprocessor::ReadMacroDefinitionArgList(MacroInfo *MI) {
// #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 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok) {
// 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/clang/lib/Lex/PPExpressions.cpp b/clang/lib/Lex/PPExpressions.cpp
index e1695e984a2..3eedf8cd98b 100644
--- a/clang/lib/Lex/PPExpressions.cpp
+++ b/clang/lib/Lex/PPExpressions.cpp
@@ -91,7 +91,7 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT,
// 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());
OpenPOWER on IntegriCloud