[clang-tidy] Check functions called from catch blocks
authorDeniz Evrenci <denizevrenci@gmail.com>
Wed, 7 Jun 2023 00:31:13 +0000 (01:31 +0100)
committerDeniz Evrenci <denizevrenci@gmail.com>
Sun, 11 Jun 2023 15:40:29 +0000 (16:40 +0100)
commitdaac014fec427eda305f93da7891c0122a161bb3
treed083cb320115a48b7eec752143f0b294790c18b7
parentef09abfcf4a0253ea2d7cbd4ecd6535a89c747ab
[clang-tidy] Check functions called from catch blocks

These functions can rethrow a current exception that is caught by the
catch block. We can pass the currently caught excections to the function
declaration analyzer just like the statement analyzer to handle this
case.

Differential Revision: https://reviews.llvm.org/D152330
clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h
clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-coro.cpp
clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-rethrow.cpp [new file with mode: 0644]