summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-18 13:52:06 +0000
committerDaniel Jasper <djasper@google.com>2013-02-18 13:52:06 +0000
commite53beb2647e2438b903add72cb8c521d9844ecf9 (patch)
tree5bcb411ad921e42d15b154921866aa306fdc815e /clang/lib/Format/TokenAnnotator.cpp
parent4c1602b5c983b3e9b53df50c97716e940c70e725 (diff)
downloadbcm5719-llvm-e53beb2647e2438b903add72cb8c521d9844ecf9.tar.gz
bcm5719-llvm-e53beb2647e2438b903add72cb8c521d9844ecf9.zip
Improve indentation of builder type calls.
In builder-type calls, it can be very confusing to just indent parameters from the start of the line. Instead, indent 4 from the correct function call. Before: aaaaaaaaaaaaaaaaaaa()->aaaaaa(bbbbb)->aaaaaaaaaaaaaaaaaaa( // break aaaaaaaaaaaaaa); aaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaa = aaaaaa->aaaaaaaaaaaa()->aaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) ->aaaaaaaaaaaaaaaaa(); After: aaaaaaaaaaaaaaaaaaa()->aaaaaa(bbbbb)->aaaaaaaaaaaaaaaaaaa( // break aaaaaaaaaaaaaa); aaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaa = aaaaaa->aaaaaaaaaaaa() ->aaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) ->aaaaaaaaaaaaaaaaa(); llvm-svn: 175444
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 92c3f1d41c8..bb2e04b66e8 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -471,8 +471,7 @@ public:
if (!consumeToken())
return LT_Invalid;
if (getPrecedence(*TheToken) > prec::Assignment &&
- TheToken->Type != TT_TemplateOpener &&
- TheToken->Type != TT_TemplateCloser)
+ TheToken->Type == TT_BinaryOperator)
CanBeBuilderTypeStmt = false;
}
if (KeywordVirtualFound)
OpenPOWER on IntegriCloud