================
@@ -63,7 +65,11 @@ void 
UnnecessaryValueParamCheck::registerMatchers(MatchFinder *Finder) {
   Finder->addMatcher(
       traverse(
           TK_AsIs,
-          functionDecl(hasBody(stmt()), isDefinition(), unless(isImplicit()),
+          functionDecl(hasBody(IsAllowedInCoroutines
+                                   ? stmt()
+                                   : static_cast<StmtMatcher>(
+                                         unless(coroutineBodyStmt()))),
----------------
vbvictor wrote:

Note that I wrapped `unless(coroutineBodyStmt())` in a `stmt()` so the 
resulting matcher would be `stmt(unless(coroutineBodyStmt()))`. Full line would 
be like this:
```cpp
hasBody(IsAllowedInCoroutines
                 ? stmt()
                 : stmt(unless(coroutineBodyStmt())))
```

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

Reply via email to