summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPExpressions.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-14 04:26:45 +0000
committerChris Lattner <sabre@nondot.org>2009-12-14 04:26:45 +0000
commit676268e45a150e9aadb35ba38968df286bd3a27d (patch)
tree8603acd746361e0c1590665c94457cd875ef0494 /clang/lib/Lex/PPExpressions.cpp
parent8f3c70e9098098283677e15988e76f60086c3508 (diff)
downloadbcm5719-llvm-676268e45a150e9aadb35ba38968df286bd3a27d.tar.gz
bcm5719-llvm-676268e45a150e9aadb35ba38968df286bd3a27d.zip
reduce indentation.
llvm-svn: 91262
Diffstat (limited to 'clang/lib/Lex/PPExpressions.cpp')
-rw-r--r--clang/lib/Lex/PPExpressions.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/clang/lib/Lex/PPExpressions.cpp b/clang/lib/Lex/PPExpressions.cpp
index b54dfe093b2..6422752ae92 100644
--- a/clang/lib/Lex/PPExpressions.cpp
+++ b/clang/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()) {
OpenPOWER on IntegriCloud