Merge pull request #2345 from tautschnig/c++-array-ini
C++ front-end: maintain #array_ini flag
This commit is contained in:
commit
278e506e18
|
@ -1,4 +1,4 @@
|
|||
KNOWNBUG
|
||||
CORE
|
||||
main.cpp
|
||||
-DNO_IO -DNO_STRING
|
||||
^EXIT=0$
|
||||
|
|
|
@ -177,7 +177,12 @@ void cpp_typecheckt::typecheck_member_initializer(codet &code)
|
|||
|
||||
// Let's first typecheck the operands.
|
||||
Forall_operands(it, code)
|
||||
{
|
||||
const bool has_array_ini = it->get_bool("#array_ini");
|
||||
typecheck_expr(*it);
|
||||
if(has_array_ini)
|
||||
it->set("#array_ini", true);
|
||||
}
|
||||
|
||||
// The initializer may be a data member (non-type)
|
||||
// or a parent class (type).
|
||||
|
@ -323,9 +328,6 @@ void cpp_typecheckt::typecheck_member_initializer(codet &code)
|
|||
// it's a data member
|
||||
already_typechecked(symbol_expr);
|
||||
|
||||
Forall_operands(it, code)
|
||||
already_typechecked(*it);
|
||||
|
||||
exprt call=
|
||||
cpp_constructor(code.source_location(), symbol_expr, code.operands());
|
||||
|
||||
|
|
Loading…
Reference in New Issue