| 129 | #include <vector> |
| 130 | |
| 131 | static 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__) |