MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / bailoutInternal

Function bailoutInternal

lib/valueflow.cpp:131–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129#include <vector>
130
131static void bailoutInternal(const std::string& type,
132 const TokenList& tokenlist,
133 ErrorLogger& errorLogger,
134 const Token* tok,
135 const std::string& what,
136 const std::string& file,
137 int line,
138 std::string function)
139{
140 if (function.find("operator") != std::string::npos)
141 function = "(valueFlow)";
142 ErrorMessage::FileLocation loc(tok, &tokenlist);
143 const std::string location = Path::stripDirectoryPart(file) + ":" + std::to_string(line) + ":";
144 ErrorMessage errmsg({std::move(loc)},
145 tokenlist.getSourceFilePath(),
146 Severity::debug,
147 (file.empty() ? "" : location) + function + " bailout: " + what,
148 type,
149 Certainty::normal);
150 errorLogger.reportErr(errmsg);
151}
152
153#define bailout2(type, tokenlist, errorLogger, tok, what) \
154 bailoutInternal((type), (tokenlist), (errorLogger), (tok), (what), __FILE__, __LINE__, __func__)

Callers

nothing calls this directly

Calls 3

findMethod · 0.45
emptyMethod · 0.45
reportErrMethod · 0.45

Tested by

no test coverage detected