================
@@ -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;
+    // Unknown if line ends with ';', FunctionLikeOrFreestandingMacro otherwise
+    if (!Previous->isOneOf(TT_FunctionLikeOrFreestandingMacro, TT_Unknown))
+      return nullptr;
+    auto it = std::find_if(
+        Style.FunctionDeclarationsWithKeywords.begin(),
+        Style.FunctionDeclarationsWithKeywords.end(),
+        [Previous](
+            FormatStyle::FunctionDeclarationWithKeywords const &declaration) {
----------------
HazardyKnusperkeks wrote:

```suggestion
            const FormatStyle::FunctionDeclarationWithKeywords &Declaration) {
```

https://github.com/llvm/llvm-project/pull/131605
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to