[mlir/unittests] Use std::nullopt instead of None (NFC)
authorKazu Hirata <kazu@google.com>
Sun, 4 Dec 2022 03:07:59 +0000 (19:07 -0800)
committerKazu Hirata <kazu@google.com>
Sun, 4 Dec 2022 03:07:59 +0000 (19:07 -0800)
commit3a77eb669894f77ef30f61d3a4f9767596fd0fcd
tree4172320cef00f1140bb158b4164d2631c2f9d624
parent043aa1dbba158dd99edbc4fa878e338c4ab5c34a
[mlir/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
mlir/unittests/IR/OperationSupportTest.cpp
mlir/unittests/Pass/AnalysisManagerTest.cpp
mlir/unittests/Pass/PassManagerTest.cpp
mlir/unittests/TableGen/EnumsGenTest.cpp
mlir/unittests/Transforms/DialectConversion.cpp