typedef: don't simplify typedef after 'case'. it means that there is a typedef and constant with the same names. Ticket: #2386

This commit is contained in:
Daniel Marjamäki 2011-01-01 20:20:03 +01:00
parent 2a77dd3df1
commit 789d944912
1 changed files with 4 additions and 0 deletions

View File

@ -1184,6 +1184,10 @@ void Tokenizer::simplifyTypedef()
simplifyType = true; simplifyType = true;
} }
} }
else if (Token::Match(tok2->previous(), "case %type% :"))
{
tok2 = tok2->next();
}
else if (duplicateTypedef(&tok2, typeName)) else if (duplicateTypedef(&tok2, typeName))
{ {
exitScope = scope; exitScope = scope;