aboutsummaryrefslogtreecommitdiff
path: root/lib/Format
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-02-13 03:48:27 +0000
committerNico Weber <nicolasweber@gmx.de>2013-02-13 03:48:27 +0000
commit4c2cc603f5239f3b2963ce3e5d25adcf4d0a028d (patch)
tree4f0b02d73f22c0d886a114d833e30a3b55723b72 /lib/Format
parenta46961b8dfe0a112097299e053c3d0cc5af13ab8 (diff)
Formatter: Detect ObjC method expressions after casts.
Not all casts are correctly detected yet, but it helps in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format')
-rw-r--r--lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp
index 2370597dbb..ececc7c98a 100644
--- a/lib/Format/TokenAnnotator.cpp
+++ b/lib/Format/TokenAnnotator.cpp
@@ -197,7 +197,7 @@ private:
!Parent || Parent->is(tok::colon) || Parent->is(tok::l_square) ||
Parent->is(tok::l_paren) || Parent->is(tok::kw_return) ||
Parent->is(tok::kw_throw) || isUnaryOperator(*Parent) ||
- Parent->Type == TT_ObjCForIn ||
+ Parent->Type == TT_ObjCForIn || Parent->Type == TT_CastRParen ||
getBinOpPrecedence(Parent->FormatTok.Tok.getKind(), true, true) >
prec::Unknown;
bool StartsObjCArrayLiteral = Parent && Parent->is(tok::at);