Fixed #4278 (syntax error).
This commit is contained in:
parent
c7961b147d
commit
1e4b080737
|
@ -2390,9 +2390,10 @@ bool Tokenizer::simplifyLabelsCaseDefault()
|
||||||
if (Token::Match(tok->next(),"[:{};]"))
|
if (Token::Match(tok->next(),"[:{};]"))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tok->str() != "case" && tok->next()->str() == ":" && tok->strAt(2) != ";") {
|
if (tok->str() != "case" && tok->next()->str() == ":") {
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
tok->insertToken(";");
|
if (tok->next()->str() != ";")
|
||||||
|
tok->insertToken(";");
|
||||||
} else {
|
} else {
|
||||||
syntaxError(tok);
|
syntaxError(tok);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue