ExprEngine; Fix TODO assertion
This commit is contained in:
parent
ab663feea8
commit
f516bde744
|
@ -1926,6 +1926,7 @@ static void execute(const Token *start, const Token *end, Data &data)
|
|||
tok = tok->tokAt(2);
|
||||
continue;
|
||||
}
|
||||
data.assignValue(tok, tok->varId(), createVariableValue(*tok->variable(), data));
|
||||
} else if (tok->variable()->isArray()) {
|
||||
data.assignValue(tok, tok->varId(), std::make_shared<ExprEngine::ArrayValue>(&data, tok->variable()));
|
||||
if (Token::Match(tok, "%name% ["))
|
||||
|
|
|
@ -46,7 +46,7 @@ private:
|
|||
|
||||
void uninit() {
|
||||
check("void foo() { int x; x = x + 1; }");
|
||||
TODO_ASSERT_EQUALS("[test.cpp:1]: (error) Cannot determine that 'x' is initialized\n", "", errout.str());
|
||||
ASSERT_EQUALS("[test.cpp:1]: (error) Cannot determine that 'x' is initialized\n", errout.str());
|
||||
|
||||
check("void foo() { int x; int y = x + 1; }");
|
||||
ASSERT_EQUALS("[test.cpp:1]: (error) Cannot determine that 'x' is initialized\n", errout.str());
|
||||
|
|
Loading…
Reference in New Issue