aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-21 19:29:31 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-21 19:29:31 +0000
commit3f29fbb9d86dc58730bbfcdd26dc6ee6a401cbd4 (patch)
tree74a0686429c15272c9d34177a996daa78703e9a9
parent308232c0aef773d24693f9e456dc3bc983934f7f (diff)
Formatter: Rename LSquare to Left to make parseSquare() more consistent with the other paren parsing methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173077 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Format/Format.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 7c25cbb059..b94925a2ab 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -937,19 +937,17 @@ public:
// A '[' could be an index subscript (after an indentifier or after
// ')' or ']'), or it could be the start of an Objective-C method
// expression.
- AnnotatedToken *LSquare = CurrentToken->Parent;
+ AnnotatedToken *Left = CurrentToken->Parent;
bool StartsObjCMethodExpr =
- !LSquare->Parent || LSquare->Parent->is(tok::colon) ||
- LSquare->Parent->is(tok::l_square) ||
- LSquare->Parent->is(tok::l_paren) ||
- LSquare->Parent->is(tok::kw_return) ||
- LSquare->Parent->is(tok::kw_throw) ||
- getBinOpPrecedence(LSquare->Parent->FormatTok.Tok.getKind(),
+ !Left->Parent || Left->Parent->is(tok::colon) ||
+ Left->Parent->is(tok::l_square) || Left->Parent->is(tok::l_paren) ||
+ Left->Parent->is(tok::kw_return) || Left->Parent->is(tok::kw_throw) ||
+ getBinOpPrecedence(Left->Parent->FormatTok.Tok.getKind(),
true, true) > prec::Unknown;
ObjCSelectorRAII objCSelector(*this);
if (StartsObjCMethodExpr)
- objCSelector.markStart(*LSquare);
+ objCSelector.markStart(*Left);
while (CurrentToken != NULL) {
if (CurrentToken->is(tok::r_square)) {