tbaeder updated this revision to Diff 489581.

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
@@ -105,6 +105,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();


Index: clang/lib/AST/Interp/Pointer.cpp
===================================================================
--- clang/lib/AST/Interp/Pointer.cpp
+++ clang/lib/AST/Interp/Pointer.cpp
@@ -105,6 +105,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();
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to