[cfe-commits] r69963 - /cfe/trunk/lib/Lex/PPExpressions.cpp
Chris Lattner
sabre at nondot.org
Fri Apr 24 00:15:23 PDT 2009
Author: lattner
Date: Fri Apr 24 02:15:22 2009
New Revision: 69963
URL: http://llvm.org/viewvc/llvm-project?rev=69963&view=rev
Log:
simplification and speedup
Modified:
cfe/trunk/lib/Lex/PPExpressions.cpp
Modified: cfe/trunk/lib/Lex/PPExpressions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPExpressions.cpp?rev=69963&r1=69962&r2=69963&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPExpressions.cpp (original)
+++ cfe/trunk/lib/Lex/PPExpressions.cpp Fri Apr 24 02:15:22 2009
@@ -90,7 +90,7 @@
// If this identifier isn't 'defined' and it wasn't macro expanded, it turns
// into a simple 0, unless it is the C++ keyword "true", in which case it
// turns into "1".
- if (II->getPPKeywordID() != tok::pp_defined) {
+ if (!II->isStr("defined")) {
if (ValueLive)
PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II;
Result.Val = II->getTokenID() == tok::kw_true;
More information about the cfe-commits
mailing list