[PATCH] D71939: clang-format: fix conflict between FormatStyle::BWACS_MultiLine and BeforeCatch/BeforeElse
Pablo Martin-Gomez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 27 12:28:59 PST 2019
Bouska added a comment.
Your code still breaks MultiLine
[ RUN ] FormatTest.MultiLineControlStatements
/home/pablomg/dev/llvm-project/clang/unittests/Format/FormatTest.cpp:1562: Failure
Expected: "try {\n" " foo();\n" "} catch (\n" " Exception &bar)\n" "{\n" " baz();\n" "}"
Which is: "try {\n foo();\n} catch (\n Exception &bar)\n{\n baz();\n}"
To be equal to: format("try{foo();}catch(Exception&bar){baz();}", Style)
Which is: "try {\n foo();\n} catch (Exception\n &bar) {\n baz();\n}"
With diff:
@@ -1,7 +1,6 @@
try {
foo();
-} catch (
- Exception &bar)
-{
+} catch (Exception
+ &bar) {
baz();
}
[ FAILED ] FormatTest.MultiLineControlStatements (28 ms)
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71939/new/
https://reviews.llvm.org/D71939
More information about the cfe-commits
mailing list