Commit f63138d4 authored by Timm Bäder's avatar Timm Bäder
Browse files

[clang][Interp] Fix Pointer::toAPValue() for expressions

Differential Revision: https://reviews.llvm.org/D141858
parent e28d5820
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -103,6 +103,10 @@ APValue Pointer::toAPValue() const {
    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();