Author: Kazu Hirata Date: 2022-08-08T21:33:09-07:00 New Revision: 8e207e4c096e89fa5410b519715aba8c20701061
URL: https://github.com/llvm/llvm-project/commit/8e207e4c096e89fa5410b519715aba8c20701061 DIFF: https://github.com/llvm/llvm-project/commit/8e207e4c096e89fa5410b519715aba8c20701061.diff LOG: [Basic] Deprecate MapEntryOptionalStorage::{hasValue,getValue} MapEntryOptionalStorage is an underlying storage class for OptionalStorage<clang::DirectoryEntryRef>. This patch deprecates: OptionalStorage<clang::DirectoryEntryRef>::hasValue OptionalStorage<clang::DirectoryEntryRef>::getValue as there is no known users of these two methods. Differential Revision: https://reviews.llvm.org/D131368 Added: Modified: clang/include/clang/Basic/DirectoryEntry.h Removed: ################################################################################ diff --git a/clang/include/clang/Basic/DirectoryEntry.h b/clang/include/clang/Basic/DirectoryEntry.h index fe5ec958b37c..f1ec63d975a3 100644 --- a/clang/include/clang/Basic/DirectoryEntry.h +++ b/clang/include/clang/Basic/DirectoryEntry.h @@ -131,13 +131,15 @@ template <class RefTy> class MapEntryOptionalStorage { void reset() { MaybeRef = optional_none_tag(); } bool has_value() const { return MaybeRef.hasOptionalValue(); } - bool hasValue() const { return MaybeRef.hasOptionalValue(); } + LLVM_DEPRECATED("Use has_value instead.", "has_value") bool hasValue() const { + return MaybeRef.hasOptionalValue(); + } RefTy &value() & { assert(has_value()); return MaybeRef; } - RefTy &getValue() & { + LLVM_DEPRECATED("Use value instead.", "value") RefTy &getValue() & { assert(has_value()); return MaybeRef; } @@ -145,6 +147,7 @@ template <class RefTy> class MapEntryOptionalStorage { assert(has_value()); return MaybeRef; } + LLVM_DEPRECATED("Use value instead.", "value") RefTy const &getValue() const & { assert(has_value()); return MaybeRef; @@ -153,7 +156,7 @@ template <class RefTy> class MapEntryOptionalStorage { assert(has_value()); return std::move(MaybeRef); } - RefTy &&getValue() && { + LLVM_DEPRECATED("Use value instead.", "value") RefTy &&getValue() && { assert(has_value()); return std::move(MaybeRef); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits