summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-11-23 14:45:49 +0000
committerDaniel Jasper <djasper@google.com>2013-11-23 14:45:49 +0000
commit446d1cd32ca5dcde8ca1d81c7c127ce659aa82c1 (patch)
tree6590c943448d9ccb883b5fb1de93224f28f3cf1e /clang/lib/Format/TokenAnnotator.cpp
parent9c6fb0f7848a7b18713daf3f711c2f040d3beaf2 (diff)
downloadbcm5719-llvm-446d1cd32ca5dcde8ca1d81c7c127ce659aa82c1.tar.gz
bcm5719-llvm-446d1cd32ca5dcde8ca1d81c7c127ce659aa82c1.zip
clang-format: The "<" of a template argument is not a binary operator.
With Style.BreakBeforeBinaryOperators, clang-format breaks incorrectly. This fixes llvm.org/PR17994. Before: return boost::fusion::at_c<0>(iiii).second == boost::fusion::at_c <1>(iiii).second; After: return boost::fusion::at_c<0>(iiii).second == boost::fusion::at_c<1>(iiii).second; llvm-svn: 195552
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 53734bcd511..e841b94474a 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1492,7 +1492,7 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line,
if (Right.Type == TT_CtorInitializerComma &&
Style.BreakConstructorInitializersBeforeComma)
return true;
- if (Right.isBinaryOperator() && Style.BreakBeforeBinaryOperators)
+ if (Right.Type == TT_BinaryOperator && Style.BreakBeforeBinaryOperators)
return true;
if (Left.is(tok::greater) && Right.is(tok::greater) &&
Left.Type != TT_TemplateCloser)
OpenPOWER on IntegriCloud