46 unique, file, block, blockBegin, blockEnd, macro
52 void setFileName(std::string s);
68 Suppression(std::string
id, std::string file,
int line=NO_LINE) : errorId(std::move(id)), fileName(std::move(file)), lineNumber(line) {}
81 if (hash != other.
hash)
82 return hash < other.
hash;
84 return thisAndNextLine;
99 if (hash != other.
hash)
101 if (type != other.
type)
116 bool parseComment(std::string comment, std::string *errorMessage);
122 std::string getText()
const;
125 return !fileName.empty() && fileName.find_first_of(
"?*") == std::string::npos;
129 return errorId == other.
errorId &&
133 hash == other.
hash &&
139 int lineNumber = NO_LINE;
140 int lineBegin = NO_LINE;
141 int lineEnd = NO_LINE;
146 bool thisAndNextLine{};
150 enum { NO_LINE = -1 };
158 std::string parseFile(std::istream &istr);
165 std::string parseXmlFile(
const char *filename);
173 static std::vector<Suppression> parseMultiSuppressComment(
const std::string &comment, std::string *errorMessage);
180 std::string addSuppressionLine(
const std::string &line);
188 std::string addSuppression(Suppression suppression);
195 std::string addSuppressions(std::list<Suppression> suppressions);
203 bool isSuppressed(
const ErrorMessage &errmsg,
bool global =
true);
211 bool isSuppressedExplicitly(
const ErrorMessage &errmsg,
bool global =
true);
218 bool isSuppressed(const ::ErrorMessage &errmsg,
const std::set<std::string>& macroNames);
224 void dump(std::ostream &out)
const;
230 std::list<Suppression> getUnmatchedLocalSuppressions(
const std::string &file,
const bool unusedFunctionChecking)
const;
236 std::list<Suppression> getUnmatchedGlobalSuppressions(
const bool unusedFunctionChecking)
const;
242 const std::list<Suppression> &getSuppressions()
const;
247 void markUnmatchedInlineSuppressionsAsChecked(
const Tokenizer &tokenizer);
254 static bool reportUnmatchedSuppressions(
const std::list<SuppressionList::Suppression> &unmatched,
ErrorLogger &errorLogger);
This is an interface, which the class responsible of error logging should implement.
Wrapper for error messages, provided by reportErr()
class for handling suppressions
std::list< Suppression > mSuppressions
List of error which the user doesn't want to see.
The main purpose is to tokenize the source code.
Information about a class type.
const std::string & getFileName() const
std::set< std::string > macroNames
bool isSameParameters(const Suppression &other) const
bool operator<(const Suppression &other) const
Suppression(std::string id, std::string file, int line=NO_LINE)
bool operator==(const Suppression &other) const
SuppressionList nofail
suppress exitcode
SuppressionList nomsg
suppress message (–suppressions)