summaryrefslogtreecommitdiffstats
path: root/clang/Lex/PPExpressions.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-23 17:19:46 +0000
committerChris Lattner <sabre@nondot.org>2008-01-23 17:19:46 +0000
commit7238225c285180cd3282fb52064c591083eb58f3 (patch)
tree1b0bb0ccd2af4664e057c8a72d1c9d92c2328788 /clang/Lex/PPExpressions.cpp
parent54e42318c027c7ab70af0734bf83d1b7b28ac211 (diff)
downloadbcm5719-llvm-7238225c285180cd3282fb52064c591083eb58f3.tar.gz
bcm5719-llvm-7238225c285180cd3282fb52064c591083eb58f3.zip
add support for -Wundef.
llvm-svn: 46274
Diffstat (limited to 'clang/Lex/PPExpressions.cpp')
-rw-r--r--clang/Lex/PPExpressions.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/Lex/PPExpressions.cpp b/clang/Lex/PPExpressions.cpp
index 22c03af9e09..bd7dda4d9a1 100644
--- a/clang/Lex/PPExpressions.cpp
+++ b/clang/Lex/PPExpressions.cpp
@@ -74,6 +74,7 @@ static bool EvaluateValue(llvm::APSInt &Result, Token &PeekTok,
// 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);
OpenPOWER on IntegriCloud