This is an archive of the discontinued LLVM Phabricator instance.

[ADT, Support] Use std::nullopt instead of None (NFC)
ClosedPublic

Authored by kazu on Dec 2 2022, 5:59 PM.

Details

Summary

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

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

Diff Detail

Event Timeline

kazu created this revision.Dec 2 2022, 5:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2022, 5:59 PM
kazu requested review of this revision.Dec 2 2022, 5:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2022, 5:59 PM
dblaikie accepted this revision.Dec 2 2022, 6:44 PM

Looks good to me!

This revision is now accepted and ready to land.Dec 2 2022, 6:44 PM
This revision was landed with ongoing or failed builds.Dec 2 2022, 7:05 PM
This revision was automatically updated to reflect the committed changes.