@@ -21,6 +21,7 @@ InterpState::InterpState(State &Parent, Program &P, InterpStack &Stk,
2121 Context &Ctx, SourceMapper *M)
2222 : Parent(Parent), M(M), P(P), Stk(Stk), Ctx(Ctx), BottomFrame(*this ),
2323 Current(&BottomFrame) {
24+ InConstantContext = Parent.InConstantContext ;
2425 CheckingPotentialConstantExpression =
2526 Parent.CheckingPotentialConstantExpression ;
2627 CheckingForUndefinedBehavior = Parent.CheckingForUndefinedBehavior ;
@@ -31,6 +32,7 @@ InterpState::InterpState(State &Parent, Program &P, InterpStack &Stk,
3132 : Parent(Parent), M(nullptr ), P(P), Stk(Stk), Ctx(Ctx),
3233 BottomFrame(*this , Func, nullptr , CodePtr(), Func->getArgSize()),
3334 Current(&BottomFrame) {
35+ InConstantContext = Parent.InConstantContext ;
3436 CheckingPotentialConstantExpression =
3537 Parent.CheckingPotentialConstantExpression ;
3638 CheckingForUndefinedBehavior = Parent.CheckingForUndefinedBehavior ;
@@ -40,7 +42,7 @@ bool InterpState::inConstantContext() const {
4042 if (ConstantContextOverride)
4143 return *ConstantContextOverride;
4244
43- return Parent. InConstantContext ;
45+ return InConstantContext;
4446}
4547
4648InterpState::~InterpState () {
0 commit comments