Skip to content

Commit c923d96

Browse files
[Basic] Remove deprecated methods in CustomizableOptional (llvm#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.
1 parent 5bb59e4 commit c923d96

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

clang/include/clang/Basic/CustomizableOptional.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ template <typename T> class CustomizableOptional {
7070

7171
void reset() { Storage.reset(); }
7272

73-
LLVM_DEPRECATED("Use &*X instead.", "&*X")
74-
constexpr const T *getPointer() const { return &Storage.value(); }
75-
LLVM_DEPRECATED("Use &*X instead.", "&*X")
76-
T *getPointer() { return &Storage.value(); }
77-
LLVM_DEPRECATED("std::optional::value is throwing. Use *X instead", "*X")
78-
constexpr const T &value() const & { return Storage.value(); }
79-
LLVM_DEPRECATED("std::optional::value is throwing. Use *X instead", "*X")
80-
T &value() & { return Storage.value(); }
81-
8273
constexpr explicit operator bool() const { return has_value(); }
8374
constexpr bool has_value() const { return Storage.has_value(); }
8475
constexpr const T *operator->() const { return &Storage.value(); }
@@ -90,8 +81,6 @@ template <typename T> class CustomizableOptional {
9081
return has_value() ? operator*() : std::forward<U>(alt);
9182
}
9283

93-
LLVM_DEPRECATED("std::optional::value is throwing. Use *X instead", "*X")
94-
T &&value() && { return std::move(Storage.value()); }
9584
T &&operator*() && { return std::move(Storage.value()); }
9685

9786
template <typename U> T value_or(U &&alt) && {

0 commit comments

Comments
 (0)