thezbyg added inline comments.
================ Comment at: clang/unittests/Format/FormatTest.cpp:8544-8556 + EXPECT_EQ("struct foo {\n" + " int i;\n" + "\n" + "private:\n" + " int j;\n" + "}\n", + format("struct foo {\n" ---------------- MyDeveloperDay wrote: > if you use verifyFormat it will check what happens when it messes the code up > to ensure its stable After switching to verifyFormat all tests pass when checking C++ formatting, but some of the same tests fail in Objective-C++ check: C style comment is attached to previous line: ``` Expected: Expected.str() Which is: "struct foo {\n /* comment */\nprivate:\n int i;\n int j;\n}\n" To be equal to: format(test::messUp(Code), ObjCStyle) Which is: "struct foo { /* comment */\nprivate:\n int i;\n int j;\n}\n" With diff: @@ -1,4 +1,3 @@ -struct foo { - /* comment */ +struct foo { /* comment */ private: int i; ``` Empty line before access modifier is removed: ``` Expected: Expected.str() Which is: "struct foo {\n int i;\n\nprivate:\n int j;\n}\n" To be equal to: format(test::messUp(Code), ObjCStyle) Which is: "struct foo {\n int i;\nprivate:\n int j;\n}\n" With diff: @@ -1,5 @@ struct foo { int i; - private: int j; ``` Looks like empty lines before modifiers are removed for Objective-C++ language. What should I do? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93846/new/ https://reviews.llvm.org/D93846 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits