diff --git a/clang/lib/AST/Interp/Pointer.cpp b/clang/lib/AST/Interp/Pointer.cpp --- a/clang/lib/AST/Interp/Pointer.cpp +++ b/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();