https://github.com/PiotrZSL approved this pull request.
Overall looks +- fine for me.
Wait like 1-2 weeks before merging if someone got some more comments.
https://github.com/llvm/llvm-project/pull/72954
___
cfe-commits mailing list
@@ -52,27 +52,41 @@ AST_MATCHER_P(Stmt, forEachPrevStmt,
ast_matchers::internal::Matcher,
}
return IsHostile;
}
+
+// Matches the expression awaited by the `co_await`.
+AST_MATCHER_P(CoawaitExpr, awaiatable, ast_matchers::internal::Matcher,
+ InnerMatcher) {
@@ -94,5 +108,7 @@ void CoroutineHostileRAIICheck::storeOptions(
ClangTidyOptions::OptionMap ) {
Options.store(Opts, "RAIITypesList",
utils::options::serializeStringList(RAIITypesList));
+ Options.store(Opts, "SafeAwaitableList",
@@ -52,27 +52,41 @@ AST_MATCHER_P(Stmt, forEachPrevStmt,
ast_matchers::internal::Matcher,
}
return IsHostile;
}
+
+// Matches the expression awaited by the `co_await`.
+AST_MATCHER_P(CoawaitExpr, awaiatable, ast_matchers::internal::Matcher,
+ InnerMatcher) {
@@ -52,27 +52,41 @@ AST_MATCHER_P(Stmt, forEachPrevStmt,
ast_matchers::internal::Matcher,
}
return IsHostile;
}
+
+// Matches the expression awaited by the `co_await`.
+AST_MATCHER_P(CoawaitExpr, awaiatable, ast_matchers::internal::Matcher,
+ InnerMatcher) {