[clang] [NFC][analyzer] Multipart checker refactor 1: VirtualCallChecker (PR #132072)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 19 11:17:09 PDT 2025
================
@@ -42,8 +42,14 @@ namespace {
class VirtualCallChecker
: public Checker<check::BeginFunction, check::EndFunction, check::PreCall> {
public:
- // These are going to be null if the respective check is disabled.
- mutable std::unique_ptr<BugType> BT_Pure, BT_Impure;
+ enum : CheckerPartIdx { PureChecker, ImpureChecker, NumCheckerParts };
+
+ BugType BugTypes[NumCheckerParts] = {
+ {this, PureChecker, "Pure virtual method call",
----------------
NagyDonat wrote:
By the way WDYT about changing `"Pure virtual method call"` to e.g.`"Call of pure virtual method"` (in a separate non-NFC follow-up commit)? When I first read this message, I parsed it as "(pure ((virtual method) call))" instead of the correct "(((pure virtual) method) call)" which confused me for 5-10 minutes.
https://github.com/llvm/llvm-project/pull/132072
More information about the cfe-commits
mailing list