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

2023-11-21 Thread Piotr Zegar via cfe-commits
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

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

2023-11-21 Thread Piotr Zegar via cfe-commits
@@ -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) {

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

2023-11-21 Thread Piotr Zegar via cfe-commits
@@ -94,5 +108,7 @@ void CoroutineHostileRAIICheck::storeOptions( ClangTidyOptions::OptionMap ) { Options.store(Opts, "RAIITypesList", utils::options::serializeStringList(RAIITypesList)); + Options.store(Opts, "SafeAwaitableList",

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

2023-11-21 Thread Piotr Zegar via cfe-commits
@@ -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) {

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

2023-11-21 Thread Piotr Zegar via cfe-commits
@@ -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) {