From a0e9be2bb26c6a4976cff771a78257b5d9b1cb7f Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Tue, 28 Jan 2014 18:51:11 +0000 Subject: clang-format: Fix option formatting in protocol buffer files. Before: optional int32 foo[ default = true, deprecated = true ]; After: optional int32 foo[default = true, deprecated = true]; llvm-svn: 200327 --- clang/lib/Format/TokenAnnotator.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Format/TokenAnnotator.cpp') diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 17ae49e595d..e0f3e57cd76 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -248,6 +248,7 @@ private: if (CurrentToken->is(tok::colon)) ColonFound = true; if (CurrentToken->is(tok::comma) && + Style.Language != FormatStyle::LK_Proto && (Left->Type == TT_ArraySubscriptLSquare || (Left->Type == TT_ObjCMethodExpr && !ColonFound))) Left->Type = TT_ArrayInitializerLSquare; -- cgit v1.2.3