| 502 | |
| 503 | #define tokenValues(...) tokenValues_(__FILE__, __LINE__, __VA_ARGS__) |
| 504 | std::list<ValueFlow::Value> tokenValues_(const char* file, int line, const char code[], const char tokstr[], const Settings *s = nullptr, bool cpp = true) { |
| 505 | SimpleTokenizer tokenizer(s ? *s : settings, *this, cpp); |
| 506 | ASSERT_LOC(tokenizer.tokenize(code), file, line); |
| 507 | const Token *tok = Token::findmatch(tokenizer.tokens(), tokstr); |
| 508 | return tok ? tok->values() : std::list<ValueFlow::Value>(); |
| 509 | } |
| 510 | |
| 511 | std::list<ValueFlow::Value> tokenValues_(const char* file, int line, const char code[], const char tokstr[], ValueFlow::Value::ValueType vt) { |
| 512 | std::list<ValueFlow::Value> values = tokenValues_(file, line, code, tokstr); |