[flang-commits] [clang] [llvm] [clang-tools-extra] [flang] [lld] [mlir] [clangtidy] Allow safe suspensions in coroutine-hostile-raii check (PR #72954)
Piotr Zegar via flang-commits
flang-commits at lists.llvm.org
Tue Nov 21 05:53:35 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:
There is other matcher in utils directory used by other checks that enable regexp.
https://github.com/llvm/llvm-project/pull/72954
More information about the flang-commits
mailing list