Remove some redundant semicolons - part 6
This commit is contained in:
parent
b45d63a10a
commit
52a174fa9d
|
@ -707,9 +707,10 @@ Token * Tokenizer::deleteInvalidTypedef(Token *typeDef)
|
|||
|
||||
// remove typedef but leave ;
|
||||
while (typeDef->next()) {
|
||||
if (level == 0 && typeDef->next()->str() == ";")
|
||||
if (level == 0 && typeDef->next()->str() == ";") {
|
||||
typeDef->deleteNext();
|
||||
break;
|
||||
else if (typeDef->next()->str() == "{")
|
||||
} else if (typeDef->next()->str() == "{")
|
||||
++level;
|
||||
else if (typeDef->next()->str() == "}") {
|
||||
if (!level)
|
||||
|
|
|
@ -5010,7 +5010,7 @@ private:
|
|||
const char code[] = "typedef FMAC1 void (* a) ();\n"
|
||||
"void *(*b) ();\n";
|
||||
const std::string actual(sizeof_(code));
|
||||
ASSERT_EQUALS("; void * * b ;", actual);
|
||||
ASSERT_EQUALS("void * * b ;", actual);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue