diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h index e1fc2e8661f..6c91a13a5b5 100644 --- a/include/llvm/ADT/Optional.h +++ b/include/llvm/ADT/Optional.h @@ -70,7 +70,7 @@ public: void reset() { if (hasVal) { - (**this).~T(); + (*this)->~T(); hasVal = false; } }