[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 14 04:24:47 PDT 2025
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/130985 at github.com>
================
@@ -35,9 +35,10 @@ class DivZeroChecker : public Checker<check::PreStmt<BinaryOperator>> {
public:
/// This checker class implements several user facing checkers
enum CheckKind { CK_DivideZero, CK_TaintedDivChecker, CK_NumCheckKinds };
- bool ChecksEnabled[CK_NumCheckKinds] = {false};
- CheckerNameRef CheckNames[CK_NumCheckKinds];
- mutable std::unique_ptr<BugType> BugTypes[CK_NumCheckKinds];
+ BugType BugTypes[CK_NumCheckKinds] = {
+ {this, CK_DivideZero, "Division by zero"},
+ {this, CK_TaintedDivChecker, "Division by zero",
+ categories::TaintedData}};
----------------
steakhal wrote:
If we are already here, can we drop the `CK_` prefixes? The llvm policy about these prefixes apply only if the names would be exposed, aka. in a header in a namespace.
https://github.com/llvm/llvm-project/pull/130985
More information about the cfe-commits
mailing list