Author: Kazu Hirata
Date: 2025-07-31T07:31:30-07:00
New Revision: c923d968b3a2cc4b813b584a1210fe906177de8a

URL: 
https://github.com/llvm/llvm-project/commit/c923d968b3a2cc4b813b584a1210fe906177de8a
DIFF: 
https://github.com/llvm/llvm-project/commit/c923d968b3a2cc4b813b584a1210fe906177de8a.diff

LOG: [Basic] Remove deprecated methods in CustomizableOptional (#151444)

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.

Added: 
    

Modified: 
    clang/include/clang/Basic/CustomizableOptional.h

Removed: 
    


################################################################################
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 <typename T> 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 <typename T> class CustomizableOptional {
     return has_value() ? operator*() : std::forward<U>(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 <typename U> T value_or(U &&alt) && {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to