[PATCH] D130140: [ADT] Deprecate Optional::getValueOr (NFC)

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 22:13:41 PDT 2022


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Looks good to me, if it's sufficiently portable to supported compilers, etc.



================
Comment at: llvm/include/llvm/ADT/Optional.h:322
+  template <typename U>
+  [[deprecated("Use value_or instead.")]] constexpr T
+  getValueOr(U &&alt) const & {
----------------
Do we have prior art (other instances of use of the raw `[[deprecated]]` attribute without any macro conditionals/feature checking/etc) that this is compatible with all LLVM supported compilers, etc?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130140/new/

https://reviews.llvm.org/D130140



More information about the llvm-commits mailing list