Skip to content

Commit c9637af

Browse files
authored
[Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue (#124478)
When implmenting P2280R4 here: #95474 When creating the APValue to store and constexprUnknown value I used an offset of CharUnits::One() but it should have been CharUnits::Zero(). This change just adjusts that value.
1 parent e278e1b commit c9637af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ExprConstant.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,7 @@ APValue &
19611961
CallStackFrame::createConstexprUnknownAPValues(const VarDecl *Key,
19621962
APValue::LValueBase Base) {
19631963
APValue &Result = ConstexprUnknownAPValues[MapKeyTy(Key, Base.getVersion())];
1964-
Result = APValue(Base, CharUnits::One(), APValue::ConstexprUnknown{});
1964+
Result = APValue(Base, CharUnits::Zero(), APValue::ConstexprUnknown{});
19651965

19661966
return Result;
19671967
}

0 commit comments

Comments
 (0)