| 181 | } |
| 182 | |
| 183 | static std::string getRelativeFilename(const simplecpp::TokenList &tokens, const simplecpp::Token* tok, const Settings &settings) { |
| 184 | if (!tok) |
| 185 | return ""; |
| 186 | std::string relativeFilename(tokens.file(tok->location)); |
| 187 | if (settings.relativePaths) { |
| 188 | for (const std::string & basePath : settings.basePaths) { |
| 189 | const std::string bp = basePath + "/"; |
| 190 | if (relativeFilename.compare(0,bp.size(),bp)==0) { |
| 191 | relativeFilename = relativeFilename.substr(bp.size()); |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | return Path::simplifyPath(std::move(relativeFilename)); |
| 196 | } |
| 197 | |
| 198 | static void addInlineSuppressions(const simplecpp::TokenList &tokens, const Settings &settings, SuppressionList &suppressions, std::list<BadInlineSuppression> &bad) |
| 199 | { |
no test coverage detected