[clang] [clang-format] add option to bin-pack keyworded parameters (PR #131605)

Eugene Shalygin via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 17 14:27:23 PDT 2025


================
@@ -148,6 +160,24 @@ class AnnotatingParser {
     }
   }
 
+  const FormatStyle::FunctionDeclarationWithKeywords *
+  isInsideFunctionWithKeywordedParameters(const FormatToken &Token) const {
+    const FormatToken *Previous = &Token;
+    while (auto Prev = Previous->getPreviousNonComment())
+      Previous = Prev;
----------------
zeule wrote:

I hardly understand what am I doing here, sorry. In particular, I don't understand which pass (is that settings-dependent?) splits consecutive macros in the same line into multiple lines? May I rely on that behaviour?

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


More information about the cfe-commits mailing list