[PATCH] D131368: [Basic] Deprecate MapEntryOptionalStorage::{hasValue,getValue}
Kazu Hirata via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 8 16:52:13 PDT 2022
kazu updated this revision to Diff 451002.
kazu added a comment.
Updated to use LLVM_DEPRECATED instead of [[deprecated]].
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131368/new/
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(); }
+ 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 @@
assert(has_value());
return MaybeRef;
}
+ LLVM_DEPRECATED("Use value instead.", "value")
RefTy const &getValue() const & {
assert(has_value());
return MaybeRef;
@@ -153,7 +156,7 @@
assert(has_value());
return std::move(MaybeRef);
}
- RefTy &&getValue() && {
+ LLVM_DEPRECATED("Use value instead.", "value") RefTy &&getValue() && {
assert(has_value());
return std::move(MaybeRef);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131368.451002.patch
Type: text/x-patch
Size: 1231 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220808/c24f5ddb/attachment.bin>
More information about the cfe-commits
mailing list