This commit is contained in:
parent
4f9073159a
commit
90983303f0
|
@ -2223,7 +2223,7 @@ void Tokenizer::simplifyLabelsCaseDefault()
|
|||
syntaxError(tok);
|
||||
}
|
||||
} else if (Token::Match(tok, "[;{}] %name% : !!;")) {
|
||||
if (!cpp || !Token::Match(tok->next(), "class|struct")) {
|
||||
if (!cpp || !Token::Match(tok->next(), "class|struct|enum")) {
|
||||
tok = tok->tokAt(2);
|
||||
tok->insertToken(";");
|
||||
}
|
||||
|
|
|
@ -4761,6 +4761,9 @@ private:
|
|||
//ticket #8345
|
||||
ASSERT_EQUALS("void foo ( ) { switch ( 0 ) { case 0 : ; default : ; } }",
|
||||
tokenizeAndStringify("void foo () { switch(0) case 0 : default : ; }"));
|
||||
//ticket #8477
|
||||
ASSERT_EQUALS("void foo ( ) { enum Anonymous0 : int { Six = 6 } ; return Six ; }",
|
||||
tokenizeAndStringify("void foo () { enum : int { Six = 6 } ; return Six ; }"));
|
||||
}
|
||||
|
||||
void simplifyPointerToStandardType() {
|
||||
|
|
Loading…
Reference in New Issue