================
@@ -195,6 +195,51 @@ TEST_F(BracesInserterTest, InsertBraces) {
                "#endif",
                Style);
 
+  verifyFormat("if (a)\n"
+               "  if (b)\n"
+               "#ifdef A\n"
+               "    f();\n"
+               "#else\n"
+               "    g();\n"
+               "#endif",
----------------
owenca wrote:

The outer braces should still be inserted IMO:
```c++
if (a) {
  if (b)
#ifdef A
    f();
#else
    g();
#endif
}
```

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

Reply via email to