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

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 25 00:33:53 PDT 2024


================
@@ -471,6 +471,9 @@ AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End,
            Previous >= 0 &&
            Changes[Previous].Tok->getType() == TT_PointerOrReference;
            --Previous) {
+        // Don't align function default argument using return type maximum size
+        if (Changes[Previous + 1].Tok->is(tok::equal))
+          continue;
----------------
rayroudc wrote:

I pushed a new patch, to move the check out of the loop

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


More information about the cfe-commits mailing list