add support for -Wundef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46274 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Lex/PPExpressions.cpp b/Lex/PPExpressions.cpp
index 22c03af..bd7dda4 100644
--- a/Lex/PPExpressions.cpp
+++ b/Lex/PPExpressions.cpp
@@ -74,6 +74,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());
Result = II->getTokenID() == tok::kw_true;
Result.setIsUnsigned(false); // "0" is signed intmax_t 0.
PP.LexNonComment(PeekTok);