[PATCH] D131368: [Basic] Deprecate MapEntryOptionalStorage::{hasValue,getValue}
Kazu Hirata via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 7 13:26:19 PDT 2022
kazu created this revision.
Herald added a project: All.
kazu requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131368
Files:
clang/include/clang/Basic/DirectoryEntry.h
Index: clang/include/clang/Basic/DirectoryEntry.h
===================================================================
--- clang/include/clang/Basic/DirectoryEntry.h
+++ clang/include/clang/Basic/DirectoryEntry.h
@@ -131,13 +131,15 @@
void reset() { MaybeRef = optional_none_tag(); }
bool has_value() const { return MaybeRef.hasOptionalValue(); }
- bool hasValue() const { return MaybeRef.hasOptionalValue(); }
+ [[deprecated("Use has_value instead.")]] bool hasValue() const {
+ return MaybeRef.hasOptionalValue();
+ }
RefTy &value() & {
assert(has_value());
return MaybeRef;
}
- RefTy &getValue() & {
+ [[deprecated("Use value instead.")]] RefTy &getValue() & {
assert(has_value());
return MaybeRef;
}
@@ -145,7 +147,7 @@
assert(has_value());
return MaybeRef;
}
- RefTy const &getValue() const & {
+ [[deprecated("Use value instead.")]] RefTy const &getValue() const & {
assert(has_value());
return MaybeRef;
}
@@ -153,7 +155,7 @@
assert(has_value());
return std::move(MaybeRef);
}
- RefTy &&getValue() && {
+ [[deprecated("Use value instead.")]] RefTy &&getValue() && {
assert(has_value());
return std::move(MaybeRef);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131368.450667.patch
Type: text/x-patch
Size: 1226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220807/647e5c9d/attachment.bin>
More information about the cfe-commits
mailing list