diff options
author | Chris Lattner <sabre@nondot.org> | 2008-05-05 20:09:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-05-05 20:09:27 +0000 |
commit | 44cbbb05f544c5ee171000b2abf905aa7dc5340d (patch) | |
tree | 687c97a743cd33caa287c8f4a76c57d875063ca2 /lib/Lex/PPExpressions.cpp | |
parent | 98ed49f3709f48d6abe1bc8deb418d0af89b8014 (diff) |
Fix typo, improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPExpressions.cpp')
-rw-r--r-- | lib/Lex/PPExpressions.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Lex/PPExpressions.cpp b/lib/Lex/PPExpressions.cpp index 5ced05c446..5f11df0893 100644 --- a/lib/Lex/PPExpressions.cpp +++ b/lib/Lex/PPExpressions.cpp @@ -434,10 +434,10 @@ static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, // Decide whether to include the next binop in this subexpression. For // example, when parsing x+y*z and looking at '*', we want to recursively - // handling y*z as a single subexpression. We do this because the - // precedence of * is higher than that of +. The only strange case we have - // to handle here is for the ?: operator, where the precedence is actually - // lower than the LHS of the '?'. The grammar rule is: + // handle y*z as a single subexpression. We do this because the precedence + // of * is higher than that of +. The only strange case we have to handle + // here is for the ?: operator, where the precedence is actually lower than + // the LHS of the '?'. The grammar rule is: // // conditional-expression ::= // logical-OR-expression ? expression : conditional-expression @@ -620,7 +620,8 @@ static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, if (EvaluateValue(AfterColonVal, PeekTok, DT, AfterColonLive, PP)) return true; - // Parse anything after the : with the same precedence as ?. + // Parse anything after the : with the same precedence as ?. We allow + // things of equal precedence because ?: is right associative. if (EvaluateDirectiveSubExpr(AfterColonVal, ThisPrec, PeekTok, AfterColonLive, PP)) return true; |