[Mlir-commits] [clang] [llvm] [clang-tools-extra] [flang] [lld] [mlir] [clangtidy] Allow safe suspensions in coroutine-hostile-raii check (PR #72954)

Piotr Zegar llvmlistbot at llvm.org
Tue Nov 21 05:54:32 PST 2023


================
@@ -52,27 +52,41 @@ AST_MATCHER_P(Stmt, forEachPrevStmt, ast_matchers::internal::Matcher<Stmt>,
   }
   return IsHostile;
 }
+
+// Matches the expression awaited by the `co_await`.
+AST_MATCHER_P(CoawaitExpr, awaiatable, ast_matchers::internal::Matcher<Expr>,
+              InnerMatcher) {
+  return Node.getCommonExpr() &&
+         InnerMatcher.matches(*Node.getCommonExpr(), Finder, Builder);
+}
+
+auto typeWithNameIn(const std::vector<StringRef> &Names) {
+  return hasType(
+      hasCanonicalType(hasDeclaration(namedDecl(hasAnyName(Names)))));
----------------
PiotrZSL wrote:

But thats also fine.

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


More information about the Mlir-commits mailing list