Remove some redundant semicolons - part 6

This commit is contained in:
Edoardo Prezioso 2011-12-04 17:30:25 +01:00
parent b45d63a10a
commit 52a174fa9d
2 changed files with 4 additions and 3 deletions

View File

@ -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)

View File

@ -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());
}