[flang/unittests] Use std::nullopt instead of None (NFC)
authorKazu Hirata <kazu@google.com>
Sun, 4 Dec 2022 03:08:01 +0000 (19:08 -0800)
committerKazu Hirata <kazu@google.com>
Sun, 4 Dec 2022 03:08:01 +0000 (19:08 -0800)
commit63b63c3dcd540c4182f1856b5570c7201cc4b3a9
treec6e0d9b22a419d2e46c5a56f673f7bd917a6d7d0
parent3a77eb669894f77ef30f61d3a4f9767596fd0fcd
[flang/unittests] Use std::nullopt instead of None (NFC)

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
flang/unittests/Optimizer/Builder/CharacterTest.cpp
flang/unittests/Optimizer/Builder/ComplexTest.cpp
flang/unittests/Optimizer/Builder/FIRBuilderTest.cpp
flang/unittests/Optimizer/Builder/HLFIRToolsTest.cpp
flang/unittests/Optimizer/Builder/Runtime/RuntimeCallTestBase.h
flang/unittests/Optimizer/FortranVariableTest.cpp