From 160e8698ed01da54405c69bec7a32a346cd1f32d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 30 Jul 2025 12:30:27 -0700 Subject: [PATCH] [Basic] Remove deprecated methods in CustomizableOptional This patch removes deprecated methods in CustomizableOptional. These methods come from llvm::Optional, which later got renamed to CustomizableOptional. Since CustomizableOptional is used only in OptionalDirectoryEntryRef and OptionalFileEntryRef, we do not need to have full std::optional-like support in CustomizableOptional. --- clang/include/clang/Basic/CustomizableOptional.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/clang/include/clang/Basic/CustomizableOptional.h b/clang/include/clang/Basic/CustomizableOptional.h index 2d6ae6a781a55..8559eaaa09861 100644 --- a/clang/include/clang/Basic/CustomizableOptional.h +++ b/clang/include/clang/Basic/CustomizableOptional.h @@ -70,15 +70,6 @@ template class CustomizableOptional { void reset() { Storage.reset(); } - LLVM_DEPRECATED("Use &*X instead.", "&*X") - constexpr const T *getPointer() const { return &Storage.value(); } - LLVM_DEPRECATED("Use &*X instead.", "&*X") - T *getPointer() { return &Storage.value(); } - LLVM_DEPRECATED("std::optional::value is throwing. Use *X instead", "*X") - constexpr const T &value() const & { return Storage.value(); } - LLVM_DEPRECATED("std::optional::value is throwing. Use *X instead", "*X") - T &value() & { return Storage.value(); } - constexpr explicit operator bool() const { return has_value(); } constexpr bool has_value() const { return Storage.has_value(); } constexpr const T *operator->() const { return &Storage.value(); } @@ -90,8 +81,6 @@ template class CustomizableOptional { return has_value() ? operator*() : std::forward(alt); } - LLVM_DEPRECATED("std::optional::value is throwing. Use *X instead", "*X") - T &&value() && { return std::move(Storage.value()); } T &&operator*() && { return std::move(Storage.value()); } template T value_or(U &&alt) && {