================
@@ -15233,6 +15233,65 @@ TEST_F(FormatTest, 
PullTrivialFunctionDefinitionsIntoSingleLine) {
                      "}");
 }
 
+// Even when both short functions and short if statements are enabled, a
+// function body consisting of `if (x) return y;` is parsed as two unwrapped
+// lines (`if (x)` and `return y;`), so `tryMergeSimpleBlock` does not merge
+// the function onto a single line.
+//
+// FIXME: The desired output is `void f() { if (x) return y; }`.
----------------
HazardyKnusperkeks wrote:

Don't add tests that show how it should not look like. Create issues, if not 
already existent.

https://github.com/llvm/llvm-project/pull/234615
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to