-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[NFC][analyzer] Rename CheckerBase::getCheckerName
to getName
#130953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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), | ||
SuppressOnSink(SuppressOnSink) {} | ||
virtual ~BugType() = default; | ||
|
||
StringRef getDescription() const { return Description; } | ||
StringRef getCategory() const { return Category; } | ||
StringRef getCheckerName() const { | ||
// FIXME: This is a workaround to ensure that the correct checerk name is | ||
// FIXME: This is a workaround to ensure that the correct checker name is | ||
// used. The checker names are set after the constructors are run. | ||
// In case the BugType object is initialized in the checker's ctor | ||
// the CheckerName field will be empty. To circumvent this problem we use | ||
// CheckerBase whenever it is possible. | ||
StringRef Ret = Checker ? Checker->getCheckerName() : CheckerName; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Under the current system we still need Right now both constructors of
The main effect of my multipart checker change is (roughly speaking) that I will provide a |
||
StringRef Ret = Checker ? Checker->getName() : CheckerName; | ||
assert(!Ret.empty() && "Checker name is not set properly."); | ||
return Ret; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.