[clang] [analyzer] Conversion to CheckerFamily: DereferenceChecker (PR #150442)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 25 02:02:42 PDT 2025
================
@@ -25,18 +25,22 @@ using namespace clang;
using namespace ento;
namespace {
+
+class DerefBugType : public BugType {
+ StringRef ArrayMsg, FieldMsg;
+
+public:
+ DerefBugType(CheckerFrontend *FE, StringRef Desc, const char *RMsg,
+ const char *FMsg = nullptr)
+ : BugType(FE, Desc), ArrayMsg(RMsg), FieldMsg(FMsg ? FMsg : RMsg) {}
----------------
NagyDonat wrote:
```suggestion
DerefBugType(CheckerFrontend *FE, StringRef Desc, const char *AMsg,
const char *FMsg = nullptr)
: BugType(FE, Desc), ArrayMsg(AMsg), FieldMsg(FMsg ? FMsg : AMsg) {}
```
The field `ArrayMsg` was previously called `RegularMsg` and the name `RMsg` was a remnant of this. For the sake of consistency I'm updating it here.
https://github.com/llvm/llvm-project/pull/150442
More information about the cfe-commits
mailing list