diff --git a/clang/include/clang/Basic/DirectoryEntry.h b/clang/include/clang/Basic/DirectoryEntry.h --- a/clang/include/clang/Basic/DirectoryEntry.h +++ b/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); }