improve #2828 fix by adding switch

This commit is contained in:
Robert Reif 2011-06-09 07:32:43 -04:00
parent 6635ed4630
commit a9e2e15e40
1 changed files with 1 additions and 1 deletions

View File

@ -7883,7 +7883,7 @@ bool Tokenizer::duplicateDefinition(Token ** tokPtr, const Token * name)
if (Token::simpleMatch(end, ") {")) // function parameter ?
{
// make sure it's not a conditional
if (Token::Match(end->link()->previous(), "if|for|while"))
if (Token::Match(end->link()->previous(), "if|for|while|switch"))
return false;
// look backwards