[PATCH] D141858: [clang][Interp] Fix Pointer::toAPValue() for expressions
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 3 05:30:36 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf63138d44429: [clang][Interp] Fix Pointer::toAPValue() for expressions (authored by tbaeder).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141858/new/
https://reviews.llvm.org/D141858
Files:
clang/lib/AST/Interp/Pointer.cpp
Index: clang/lib/AST/Interp/Pointer.cpp
===================================================================
--- clang/lib/AST/Interp/Pointer.cpp
+++ clang/lib/AST/Interp/Pointer.cpp
@@ -103,6 +103,10 @@
if (isUnknownSizeArray()) {
IsOnePastEnd = false;
Offset = CharUnits::Zero();
+ } else if (Desc->asExpr()) {
+ // Pointer pointing to a an expression.
+ IsOnePastEnd = false;
+ Offset = CharUnits::Zero();
} else {
// TODO: compute the offset into the object.
Offset = CharUnits::Zero();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141858.494592.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230203/10207c60/attachment-0001.bin>
More information about the cfe-commits
mailing list