improve #2828 fix by adding switch
This commit is contained in:
parent
6635ed4630
commit
a9e2e15e40
|
@ -7883,7 +7883,7 @@ bool Tokenizer::duplicateDefinition(Token ** tokPtr, const Token * name)
|
||||||
if (Token::simpleMatch(end, ") {")) // function parameter ?
|
if (Token::simpleMatch(end, ") {")) // function parameter ?
|
||||||
{
|
{
|
||||||
// make sure it's not a conditional
|
// 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;
|
return false;
|
||||||
|
|
||||||
// look backwards
|
// look backwards
|
||||||
|
|
Loading…
Reference in New Issue