forked from OSchip/llvm-project
clang-format: [Proto] No alternate operator names.
llvm-svn: 234055
This commit is contained in:
parent
2181c10b5b
commit
1662bfe077
|
@ -1506,8 +1506,7 @@ LangOptions getFormattingLangOpts(const FormatStyle &Style) {
|
|||
LangOpts.CPlusPlus11 = Style.Standard == FormatStyle::LS_Cpp03 ? 0 : 1;
|
||||
LangOpts.CPlusPlus14 = Style.Standard == FormatStyle::LS_Cpp03 ? 0 : 1;
|
||||
LangOpts.LineComment = 1;
|
||||
bool AlternativeOperators = Style.Language != FormatStyle::LK_JavaScript &&
|
||||
Style.Language != FormatStyle::LK_Java;
|
||||
bool AlternativeOperators = Style.Language == FormatStyle::LK_Cpp;
|
||||
LangOpts.CXXOperatorNames = AlternativeOperators ? 1 : 0;
|
||||
LangOpts.Bool = 1;
|
||||
LangOpts.ObjC1 = 1;
|
||||
|
|
|
@ -93,6 +93,11 @@ TEST_F(FormatTestProto, MessageFieldAttributes) {
|
|||
" aaaaaaaaaaaaaaaa: AAAAAAAAAA\n"
|
||||
" bbbbbbbbbbbbbbbb: BBBBBBBBBB\n"
|
||||
"}];");
|
||||
verifyFormat("repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {\n"
|
||||
" type: \"AAAAAAAAAA\"\n"
|
||||
" is: \"AAAAAAAAAA\"\n"
|
||||
" or: \"BBBBBBBBBB\"\n"
|
||||
"}];");
|
||||
verifyFormat("repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {\n"
|
||||
" aaaaaaaaaaaaaaaa: AAAAAAAAAA,\n"
|
||||
" bbbbbbb: BBBB,\n"
|
||||
|
|
Loading…
Reference in New Issue