diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 1c83337a9..611a47334 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -1629,7 +1629,7 @@ void Tokenizer::simplifyTypedef() tok2 = tok2->next()->next(); } } - while (Token::Match(tok2, ", %var% ;|'|=")); + while (Token::Match(tok2, ", %var% ;|'|=|,")); } simplifyType = false; diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index f9365139e..a6c8ce96b 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -4523,8 +4523,7 @@ private: const char code[] = "typedef float x[3];\n" "x a,b,c;\n"; const std::string actual(sizeof_(code)); - TODO_ASSERT_EQUALS("; float a [ 3 ] ; float b [ 3 ] ; float c [ 3 ] ;", actual); - ASSERT_EQUALS("; float a [ 3 ] ; float b ; float c ;", actual); + ASSERT_EQUALS("; float a [ 3 ] ; float b [ 3 ] ; float c [ 3 ] ;", actual); ASSERT_EQUALS("", errout.str()); }