forked from OSchip/llvm-project
clang-format: [Java] No altnerative operator names in Java.
Before: someObject.and (); After: someObject.and(); llvm-svn: 221978
This commit is contained in:
parent
2ee635a6a6
commit
30a2406e65
|
@ -2133,8 +2133,9 @@ 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;
|
||||
LangOpts.CXXOperatorNames =
|
||||
Style.Language != FormatStyle::LK_JavaScript ? 1 : 0;
|
||||
bool AlternativeOperators = Style.Language != FormatStyle::LK_JavaScript &&
|
||||
Style.Language != FormatStyle::LK_Java;
|
||||
LangOpts.CXXOperatorNames = AlternativeOperators ? 1 : 0;
|
||||
LangOpts.Bool = 1;
|
||||
LangOpts.ObjC1 = 1;
|
||||
LangOpts.ObjC2 = 1;
|
||||
|
|
|
@ -50,6 +50,10 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
TEST_F(FormatTestJava, NoAlternativeOperatorNames) {
|
||||
verifyFormat("someObject.and();");
|
||||
}
|
||||
|
||||
TEST_F(FormatTestJava, ClassDeclarations) {
|
||||
verifyFormat("public class SomeClass {\n"
|
||||
" private int a;\n"
|
||||
|
|
Loading…
Reference in New Issue