]> granicus.if.org Git - clang/commitdiff
simplification and speedup
authorChris Lattner <sabre@nondot.org>
Fri, 24 Apr 2009 07:15:22 +0000 (07:15 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 24 Apr 2009 07:15:22 +0000 (07:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69963 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPExpressions.cpp

index 3cba06f46034dcba20ad9ab17d295dc0348cdd9a..0c3aa0236104a1ebe5378890091a719082906357 100644 (file)
@@ -90,7 +90,7 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT,
     // 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;