Fixed #2175 (Tokenizer::simplifyTypedef : wrong simplification of 'typedef float vec_t[3];')
This commit is contained in:
parent
c39fbb86db
commit
c49a8a99a3
|
@ -1629,7 +1629,7 @@ void Tokenizer::simplifyTypedef()
|
||||||
tok2 = tok2->next()->next();
|
tok2 = tok2->next()->next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (Token::Match(tok2, ", %var% ;|'|="));
|
while (Token::Match(tok2, ", %var% ;|'|=|,"));
|
||||||
}
|
}
|
||||||
|
|
||||||
simplifyType = false;
|
simplifyType = false;
|
||||||
|
|
|
@ -4523,8 +4523,7 @@ private:
|
||||||
const char code[] = "typedef float x[3];\n"
|
const char code[] = "typedef float x[3];\n"
|
||||||
"x a,b,c;\n";
|
"x a,b,c;\n";
|
||||||
const std::string actual(sizeof_(code));
|
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 [ 3 ] ; float c [ 3 ] ;", actual);
|
||||||
ASSERT_EQUALS("; float a [ 3 ] ; float b ; float c ;", actual);
|
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue