[clang-tools-extra] 15ba27e - [clang-tools-extra] Use std::nullopt instead of llvm::None (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 5 22:37:29 PST 2022
Author: Kazu Hirata
Date: 2022-12-05T22:37:22-08:00
New Revision: 15ba27ebd0cbf96659b729399f89eb9f11ae1d5e
URL: https://github.com/llvm/llvm-project/commit/15ba27ebd0cbf96659b729399f89eb9f11ae1d5e
DIFF: https://github.com/llvm/llvm-project/commit/15ba27ebd0cbf96659b729399f89eb9f11ae1d5e.diff
LOG: [clang-tools-extra] Use std::nullopt instead of llvm::None (NFC)
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
Added:
Modified:
clang-tools-extra/unittests/clang-tidy/ReadabilityModuleTest.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/unittests/clang-tidy/ReadabilityModuleTest.cpp b/clang-tools-extra/unittests/clang-tidy/ReadabilityModuleTest.cpp
index f8e4268b0d97..ec53f52466af 100644
--- a/clang-tools-extra/unittests/clang-tidy/ReadabilityModuleTest.cpp
+++ b/clang-tools-extra/unittests/clang-tidy/ReadabilityModuleTest.cpp
@@ -484,7 +484,8 @@ TEST(BracesAroundStatementsCheckTest, Macros) {
}
#define EXPECT_NO_CHANGES_WITH_OPTS(Check, Opts, Code) \
- EXPECT_EQ(Code, runCheckOnCode<Check>(Code, nullptr, "input.cc", None, Opts))
+ EXPECT_EQ(Code, runCheckOnCode<Check>(Code, nullptr, "input.cc", \
+ std::nullopt, Opts))
TEST(BracesAroundStatementsCheckTest, ImplicitCastInReturn) {
ClangTidyOptions Opts;
Opts.CheckOptions["test-check-0.ShortStatementLines"] = "1";
More information about the cfe-commits
mailing list