@@ -21,6 +21,7 @@ InterpState::InterpState(State &Parent, Program &P, InterpStack &Stk,
21
21
Context &Ctx, SourceMapper *M)
22
22
: Parent(Parent), M(M), P(P), Stk(Stk), Ctx(Ctx), BottomFrame(*this ),
23
23
Current(&BottomFrame) {
24
+ InConstantContext = Parent.InConstantContext ;
24
25
CheckingPotentialConstantExpression =
25
26
Parent.CheckingPotentialConstantExpression ;
26
27
CheckingForUndefinedBehavior = Parent.CheckingForUndefinedBehavior ;
@@ -31,6 +32,7 @@ InterpState::InterpState(State &Parent, Program &P, InterpStack &Stk,
31
32
: Parent(Parent), M(nullptr ), P(P), Stk(Stk), Ctx(Ctx),
32
33
BottomFrame(*this , Func, nullptr , CodePtr(), Func->getArgSize()),
33
34
Current(&BottomFrame) {
35
+ InConstantContext = Parent.InConstantContext ;
34
36
CheckingPotentialConstantExpression =
35
37
Parent.CheckingPotentialConstantExpression ;
36
38
CheckingForUndefinedBehavior = Parent.CheckingForUndefinedBehavior ;
@@ -40,7 +42,7 @@ bool InterpState::inConstantContext() const {
40
42
if (ConstantContextOverride)
41
43
return *ConstantContextOverride;
42
44
43
- return Parent. InConstantContext ;
45
+ return InConstantContext;
44
46
}
45
47
46
48
InterpState::~InterpState () {
0 commit comments