================ @@ -41,19 +41,19 @@ class BugType { Checker(nullptr), SuppressOnSink(SuppressOnSink) {} BugType(const CheckerBase *Checker, StringRef Desc, StringRef Cat = categories::LogicError, bool SuppressOnSink = false) - : CheckerName(Checker->getCheckerName()), Description(Desc), - Category(Cat), Checker(Checker), SuppressOnSink(SuppressOnSink) {} + : CheckerName(), Description(Desc), Category(Cat), Checker(Checker), ---------------- NagyDonat wrote:
It calls the default constructor of `CheckerNameRef CheckerName` which initializes this data member to an empty string. In fact the two data members `CheckerName` and `Checker` should have been alternatives within a single `variant` (and not separate data members), because one of them is always an unused empty value. (The first constructor fills `CheckerName`, the second one fills `Checker`.) This `variant`ization of these two data members does happen in follow-up PR https://github.com/llvm/llvm-project/pull/130985 (which introduces my multipart checker framework). https://github.com/llvm/llvm-project/pull/130953 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits