parent
e293b66ac6
commit
51b4cf592b
|
@ -10196,10 +10196,12 @@ void Tokenizer::reportUnknownMacros() const
|
|||
unknownMacroError(tok);
|
||||
}
|
||||
} else if (Token::Match(tok, "%name% (") && tok->isUpperCaseName() && Token::Match(tok->linkAt(1), ") %name% (") && Token::Match(tok->linkAt(1)->linkAt(2), ") [;{]")) {
|
||||
if (possible.count(tok->str()) == 0)
|
||||
possible.insert(tok->str());
|
||||
else
|
||||
unknownMacroError(tok);
|
||||
if (!(tok->linkAt(1)->next() && tok->linkAt(1)->next()->isKeyword())) { // e.g. noexcept(true)
|
||||
if (possible.count(tok->str()) == 0)
|
||||
possible.insert(tok->str());
|
||||
else
|
||||
unknownMacroError(tok);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6551,6 +6551,9 @@ private:
|
|||
|
||||
const char code10[] = "void f(std::exception c) { b(M() M() + N(c.what())); }";
|
||||
ASSERT_THROW(tokenizeAndStringify(code10), InternalError);
|
||||
|
||||
const char code11[] = "struct B { B(B&&) noexcept {} ~B() noexcept {} };";
|
||||
ASSERT_NO_THROW(tokenizeAndStringify(code11));
|
||||
}
|
||||
|
||||
void findGarbageCode() { // Test Tokenizer::findGarbageCode()
|
||||
|
|
Loading…
Reference in New Issue