diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-02-13 03:48:27 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-02-13 03:48:27 +0000 |
commit | a789239c64b78c9286e21078949f4d117344a999 (patch) | |
tree | db110281a5ac4a970077d4d0f8f86abf163423c5 /clang/lib/Format/TokenAnnotator.cpp | |
parent | 9ffb3499a516b48dd3a6b46d50df7e5c527cb04e (diff) | |
download | bcm5719-llvm-a789239c64b78c9286e21078949f4d117344a999.tar.gz bcm5719-llvm-a789239c64b78c9286e21078949f4d117344a999.zip |
Formatter: Detect ObjC method expressions after casts.
Not all casts are correctly detected yet, but it helps in some cases.
llvm-svn: 175028
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 2370597dbb3..ececc7c98a0 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/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); |