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