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

Eugene Shalygin via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 25 02:30:02 PDT 2025


================
@@ -148,6 +158,32 @@ class AnnotatingParser {
     }
   }
 
+  const FormatStyle::FunctionDeclarationWithKeywords *
+  findFunctionWithKeywordedParameters() const {
+    const FormatToken *TokBeforeFirstLParent{};
+    for (const FormatToken *T = Line.First; T != Line.Last; T = T->Next) {
+      if (T->TokenText == StringRef("(", 1)) {
----------------
zeule wrote:

I have to check `T->Tok`, which `Kind` is `tok::l_paren`, rather than `T` itself. Thank you!

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


More information about the cfe-commits mailing list