summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/FormatToken.h
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2018-02-19 16:00:21 +0000
committerKrasimir Georgiev <krasimir@google.com>2018-02-19 16:00:21 +0000
commit9c5ac63785b5aac0c85b57637409869b27983bfe (patch)
treec05cdffbc7d6328f3a14b25ea88be685e776ef24 /clang/lib/Format/FormatToken.h
parent7f0f8bb4bd0581ed28f99254b6cebcfa61913121 (diff)
downloadbcm5719-llvm-9c5ac63785b5aac0c85b57637409869b27983bfe.tar.gz
bcm5719-llvm-9c5ac63785b5aac0c85b57637409869b27983bfe.zip
[clang-format] Fix text proto extension scope opening detection
Summary: This fixes the detection of scope openers in text proto extensions; previously they were not detected correctly leading to instances like: ``` msg { [aa.bb ] { key: value } } ``` Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D43469 llvm-svn: 325513
Diffstat (limited to 'clang/lib/Format/FormatToken.h')
-rw-r--r--clang/lib/Format/FormatToken.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h
index 6a558875619..550bdccfb69 100644
--- a/clang/lib/Format/FormatToken.h
+++ b/clang/lib/Format/FormatToken.h
@@ -478,6 +478,7 @@ struct FormatToken {
if (is(TT_TemplateString) && opensScope())
return true;
return is(TT_ArrayInitializerLSquare) ||
+ is(TT_ProtoExtensionLSquare) ||
(is(tok::l_brace) &&
(BlockKind == BK_Block || is(TT_DictLiteral) ||
(!Style.Cpp11BracedListStyle && NestingLevel == 0))) ||
OpenPOWER on IntegriCloud