[PATCH] D152330: [clang-tidy] Check functions called from catch blocks
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 6 19:33:25 PDT 2023
ChuanqiXu accepted this revision.
ChuanqiXu added a comment.
This revision is now accepted and ready to land.
LGTM. And please wait for several days for other reviewers.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-coro.cpp:132-136
if constexpr (ThrowInUnhandledException) {
throw 1;
+ } else if constexpr (RethrowInUnhandledException) {
+ throw;
}
----------------
denizevrenci wrote:
> ChuanqiXu wrote:
> > I don't know clang-tidy a lot. But is these two branches different in clang-tidy really?
> Yes, rethrows are handled differently than throw expressions with arguments. You can find the relevant implementation in ExceptionAnalyzer.cpp:[462:475].
OK, sounds good to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152330/new/
https://reviews.llvm.org/D152330
More information about the cfe-commits
mailing list