summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-10-07 03:43:10 +0000
committerDaniel Jasper <djasper@google.com>2015-10-07 03:43:10 +0000
commit5af04a4d015a481fa1b91faf0d2ee5b43d064296 (patch)
tree87a02ec14a33ec47987ea6cf34821c45a5dd6e63 /clang/lib/Format
parente597ace1fe03767c485c2ed36561eb34e8127b4c (diff)
downloadbcm5719-llvm-5af04a4d015a481fa1b91faf0d2ee5b43d064296.tar.gz
bcm5719-llvm-5af04a4d015a481fa1b91faf0d2ee5b43d064296.zip
clang-format: Fix false ObjC block detection.
Before: inline A operator^(const A &lhs, const A &rhs) {} int i; After: inline A operator^(const A &lhs, const A &rhs) {} int i; llvm-svn: 249517
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 159e60bfe15..634dbe97084 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -855,6 +855,11 @@ void UnwrappedLineParser::parseStructuralElement() {
case tok::l_paren:
parseParens();
break;
+ case tok::kw_operator:
+ nextToken();
+ if (FormatTok->isBinaryOperator())
+ nextToken();
+ break;
case tok::caret:
nextToken();
if (FormatTok->Tok.isAnyIdentifier() ||
OpenPOWER on IntegriCloud