13#ifndef LLVM_CLANG_STATICANALYZER_CORE_BUGREPORTER_BUGTYPE_H
14#define LLVM_CLANG_STATICANALYZER_CORE_BUGREPORTER_BUGTYPE_H
30 const std::string Description;
31 const std::string Category;
35 virtual void anchor();
39 bool SuppressOnSink =
false)
40 : CheckerName(CheckerName), Description(Name),
Category(Cat),
41 Checker(nullptr), SuppressOnSink(SuppressOnSink) {}
43 bool SuppressOnSink =
false)
57 assert(!Ret.empty() &&
"Checker name is not set properly.");
68 const std::string desc;
69 void anchor()
override;
72 const char *description)
73 :
BugType(checker, name, categories::LogicError), desc(description) {}
76 const char *description)
77 :
BugType(checker, name, categories::LogicError), desc(description) {}
80 :
BugType(checker, name, categories::LogicError), desc(name) {}
83 :
BugType(checker, name, categories::LogicError), desc(name) {}
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 ...
StringRef getCategory() const
BugType(const CheckerBase *Checker, StringRef Name, StringRef Cat, bool SuppressOnSink=false)
BugType(CheckerNameRef CheckerName, StringRef Name, StringRef Cat, bool SuppressOnSink=false)
StringRef getDescription() const
virtual ~BugType()=default
StringRef getCheckerName() const
BuiltinBug(const CheckerBase *checker, const char *name, const char *description)
BuiltinBug(class CheckerNameRef checker, const char *name, const char *description)
StringRef getDescription() const
BuiltinBug(const CheckerBase *checker, const char *name)
BuiltinBug(class CheckerNameRef checker, const char *name)
CheckerNameRef getCheckerName() const
This wrapper is used to ensure that only StringRefs originating from the CheckerRegistry are used as ...