[PATCH] D139763: [ADT] Deperecate llvm::None

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 19:55:42 PST 2022


kazu created this revision.
Herald added a project: All.
kazu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

I've converted all known uses of None to std::nullopt.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139763

Files:
  llvm/include/llvm/ADT/None.h


Index: llvm/include/llvm/ADT/None.h
===================================================================
--- llvm/include/llvm/ADT/None.h
+++ llvm/include/llvm/ADT/None.h
@@ -24,6 +24,7 @@
 /// and similar types without having to spell out the specialization's name.
 LLVM_DEPRECATED("Use std::nullopt_t instead", "std::nullopt_t")
 typedef std::nullopt_t NoneType;
+LLVM_DEPRECATED("Use std::nullopt instead.", "std::nullopt")
 inline constexpr std::nullopt_t None = std::nullopt;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139763.481817.patch
Type: text/x-patch
Size: 486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221210/01463f3f/attachment.bin>


More information about the llvm-commits mailing list