summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-01-11 12:55:33 +0000
committerDaniel Jasper <djasper@google.com>2016-01-11 12:55:33 +0000
commitdf51f2e634c2faf2a99ce4617e1b470d69dfdc72 (patch)
tree62b88d87cc996649e9a2d212fca75cf0c02fdc47 /clang/lib
parent1623e30a35c02b4df4f94ff586bad8bad70f6f10 (diff)
downloadbcm5719-llvm-df51f2e634c2faf2a99ce4617e1b470d69dfdc72.tar.gz
bcm5719-llvm-df51f2e634c2faf2a99ce4617e1b470d69dfdc72.zip
clang-format: Fix overloading "operator," definitions more thoroughly.
Before: aaaaaaaaaaaaaaaaaaaaaa operator,(aaaaaaaaaaaaaaaaaaaaa & aaaaaaaaaaaaaaaaaaaaaaaaaa) const; After: aaaaaaaaaaaaaaaaaaaaaa operator,( aaaaaaaaaaaaaaaaaaaaa &aaaaaaaaaaaaaaaaaaaaaaaaaa) const; llvm-svn: 257330
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index eabfc4a4405..8fbb43b7996 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -119,7 +119,9 @@ private:
}
}
- if (Left->Previous &&
+ if (Left->is(TT_OverloadedOperatorLParen)) {
+ Contexts.back().IsExpression = false;
+ } else if (Left->Previous &&
(Left->Previous->isOneOf(tok::kw_static_assert, tok::kw_decltype,
tok::kw_if, tok::kw_while, tok::l_paren,
tok::comma) ||
@@ -132,9 +134,7 @@ private:
// This is a parameter list of a lambda expression.
Contexts.back().IsExpression = false;
} else if (Line.InPPDirective &&
- (!Left->Previous ||
- !Left->Previous->isOneOf(tok::identifier,
- TT_OverloadedOperator))) {
+ (!Left->Previous || !Left->Previous->is(tok::identifier))) {
Contexts.back().IsExpression = true;
} else if (Contexts[Contexts.size() - 2].CaretFound) {
// This is the parameter list of an ObjC block.
OpenPOWER on IntegriCloud