[clang] [clang-format] Fix anonymous reference parameter with default value (PR #86254)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 23 01:48:08 PDT 2024


================
@@ -19056,6 +19056,9 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) {
   verifyFormat("int    a(int x);\n"
                "double b();",
                Alignment);
+  verifyFormat("int    a(const Test & = Test());\n"
----------------
HazardyKnusperkeks wrote:

I'd like to see something like
``` c++
int foo(someType & whatever, differentType & foo,
        Test & = Test());
```
Maybe in some other variants, I want to see the alignment of the arguments.


https://github.com/llvm/llvm-project/pull/86254


More information about the cfe-commits mailing list