diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-14 04:26:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-14 04:26:45 +0000 |
commit | f880662e5ee532616a6602bdb7c1be45d276af9d (patch) | |
tree | a072411f1b87615be25cf157642dcd3390104ead /lib/Lex/PPExpressions.cpp | |
parent | 7fbb1ba55857d9029eb13d1d3e51dd97f2d96372 (diff) |
reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPExpressions.cpp')
-rw-r--r-- | lib/Lex/PPExpressions.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/lib/Lex/PPExpressions.cpp b/lib/Lex/PPExpressions.cpp index b54dfe093b..6422752ae9 100644 --- a/lib/Lex/PPExpressions.cpp +++ b/lib/Lex/PPExpressions.cpp @@ -142,22 +142,21 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, // '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()) { |