Fixed one more syntax error FP related to #8390
This commit is contained in:
parent
3d4b773fd1
commit
5a444f764b
|
@ -8398,10 +8398,11 @@ void Tokenizer::findGarbageCode() const
|
|||
if (!templateEndToken) {
|
||||
if (tok->str() == "<" && isCPP())
|
||||
templateEndToken = tok->findClosingBracket();
|
||||
} else if (templateEndToken == tok) {
|
||||
templateEndToken = nullptr;
|
||||
} else if (Token::Match(tok, "> %cop%")) {
|
||||
continue;
|
||||
} else {
|
||||
if (templateEndToken == tok)
|
||||
templateEndToken = nullptr;
|
||||
if (Token::Match(tok, "> %cop%"))
|
||||
continue;
|
||||
}
|
||||
if (Token::Match(tok, "%cop%|=|,|[ %or%|%oror%|/|%"))
|
||||
syntaxError(tok);
|
||||
|
|
|
@ -1457,6 +1457,7 @@ private:
|
|||
ASSERT_THROW(checkCode(inp), InternalError);
|
||||
|
||||
checkCode("template<class T> struct S : A< B<T> || C<T> > {};"); // No syntax error: #8390
|
||||
checkCode("static_assert(A<x> || B<x>, ab);");
|
||||
}
|
||||
|
||||
void garbageCode188() { // #8255
|
||||
|
|
Loading…
Reference in New Issue