13#ifndef LLVM_CLANG_STATICANALYZER_CORE_BUGREPORTER_BUGTYPE_H
14#define LLVM_CLANG_STATICANALYZER_CORE_BUGREPORTER_BUGTYPE_H
30 using CheckerNameInfo = std::variant<CheckerNameRef, const CheckerFrontend *>;
32 const CheckerNameInfo CheckerName;
33 const std::string Description;
34 const std::string Category;
37 virtual void anchor();
47 : CheckerName(CheckerName), Description(Desc),
Category(Cat),
48 SuppressOnSink(SuppressOnSink) {}
55 SuppressOnSink(SuppressOnSink) {}
61 if (
const auto *CNR = std::get_if<CheckerNameRef>(&CheckerName))
64 return std::get<const CheckerFrontend *>(CheckerName)->getName();
84 bool SuppressOnSink =
false)
85 :
BugType(this, Desc, Cat, SuppressOnSink) {}
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
bool isSuppressOnSink() const
isSuppressOnSink - Returns true if bug reports associated with this bug type should be suppressed if ...
BugType(CheckerNameRef CheckerName, StringRef Desc, StringRef Cat=categories::LogicError, bool SuppressOnSink=false)
StringRef getCategory() const
BugType(const CheckerFrontend *Checker, StringRef Desc, StringRef Cat=categories::LogicError, bool SuppressOnSink=false)
StringRef getDescription() const
virtual ~BugType()=default
StringRef getCheckerName() const
Trivial convenience class for the common case when a certain checker frontend always uses the same bu...
CheckerFrontendWithBugType(StringRef Desc, StringRef Cat=categories::LogicError, bool SuppressOnSink=false)
A CheckerFrontend instance is what the user recognizes as "one checker": it has a public canonical na...
This wrapper is used to ensure that only StringRefs originating from the CheckerRegistry are used as ...
Simple checker classes that implement one frontend (i.e.
const char *const LogicError
The JSON file list parser is used to communicate input to InstallAPI.