summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-05-27 04:55:47 +0000
committerDaniel Jasper <djasper@google.com>2015-05-27 04:55:47 +0000
commit3273930d9acee986bc3d1bc24556354e26a797fd (patch)
treede2d103f6b10ebcdc8aa254a901cb1aa2dd4591e /clang/lib/Format/TokenAnnotator.cpp
parent9b7f6677d9f022677169abf475fe545e7b0de4b5 (diff)
downloadbcm5719-llvm-3273930d9acee986bc3d1bc24556354e26a797fd.tar.gz
bcm5719-llvm-3273930d9acee986bc3d1bc24556354e26a797fd.zip
clang-format: Fix false positive in function annotation detection.
llvm-svn: 238285
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 8229471071c..98f5709b906 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -925,7 +925,7 @@ private:
Current.Type = TT_CastRParen;
if (Current.MatchingParen && Current.Next &&
!Current.Next->isBinaryOperator() &&
- !Current.Next->isOneOf(tok::semi, tok::colon))
+ !Current.Next->isOneOf(tok::semi, tok::colon, tok::l_brace))
if (FormatToken *BeforeParen = Current.MatchingParen->Previous)
if (BeforeParen->is(tok::identifier) &&
BeforeParen->TokenText == BeforeParen->TokenText.upper() &&
OpenPOWER on IntegriCloud