| 21 | #include "utils.h" |
| 22 | |
| 23 | static std::string typeToString(InternalError::Type type) |
| 24 | { |
| 25 | switch (type) { |
| 26 | case InternalError::Type::AST: |
| 27 | return "internalAstError"; |
| 28 | case InternalError::Type::SYNTAX: |
| 29 | return "syntaxError"; |
| 30 | case InternalError::Type::UNKNOWN_MACRO: |
| 31 | return "unknownMacro"; |
| 32 | case InternalError::Type::INTERNAL: |
| 33 | return "internalError"; |
| 34 | case InternalError::Type::LIMIT: |
| 35 | return "cppcheckLimit"; |
| 36 | case InternalError::Type::INSTANTIATION: |
| 37 | return "instantiationError"; |
| 38 | } |
| 39 | cppcheck::unreachable(); |
| 40 | } |
| 41 | |
| 42 | InternalError::InternalError(const Token *tok, std::string errorMsg, Type type) : |
| 43 | InternalError(tok, std::move(errorMsg), "", type) |
no test coverage detected