[cfe-commits] r91262 - /cfe/trunk/lib/Lex/PPExpressions.cpp

Chris Lattner sabre at nondot.org
Sun Dec 13 20:26:45 PST 2009


Author: lattner
Date: Sun Dec 13 22:26:45 2009
New Revision: 91262

URL: http://llvm.org/viewvc/llvm-project?rev=91262&view=rev
Log:
reduce indentation.

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=91262&r1=91261&r2=91262&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/PPExpressions.cpp (original)
+++ cfe/trunk/lib/Lex/PPExpressions.cpp Sun Dec 13 22:26:45 2009
@@ -142,22 +142,21 @@
   // 'defined' or if it is a macro.  Note that we check here because many
   // keywords are pp-identifiers, so we can't check the kind.
   if (IdentifierInfo *II = PeekTok.getIdentifierInfo()) {
-    if (II->isStr("defined")) {
-      // Handle "defined X" and "defined(X)".
+    // Handle "defined X" and "defined(X)".
+    if (II->isStr("defined"))
       return(EvaluateDefined(Result, PeekTok, DT, ValueLive, PP));
-    } else {
-      // If this identifier isn't 'defined' or one of the special
-      // preprocessor keywords 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 (ValueLive)
-        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());
-      PP.LexNonComment(PeekTok);
-      return false;
-    }
+    
+    // If this identifier isn't 'defined' or one of the special
+    // preprocessor keywords 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 (ValueLive)
+      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());
+    PP.LexNonComment(PeekTok);
+    return false;
   }
 
   switch (PeekTok.getKind()) {





More information about the cfe-commits mailing list