-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue #124478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue #124478
Conversation
…eating APValue When implmenting P2280R4 here: llvm#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.
@llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) ChangesWhen 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. Full diff: https://github.com/llvm/llvm-project/pull/124478.diff 1 Files Affected:
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 3b5ab839c6cf79..be8f1fe02e7212 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -1961,7 +1961,7 @@ APValue &
CallStackFrame::createConstexprUnknownAPValues(const VarDecl *Key,
APValue::LValueBase Base) {
APValue &Result = ConstexprUnknownAPValues[MapKeyTy(Key, Base.getVersion())];
- Result = APValue(Base, CharUnits::One(), APValue::ConstexprUnknown{});
+ Result = APValue(Base, CharUnits::Zero(), APValue::ConstexprUnknown{});
return Result;
}
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9430 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/12455 Here is the relevant piece of the build log for the reference
|
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.