From cd8702efe7e6cacfd82cc4909e42718224bcd5d0 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 3 Dec 2022 11:54:48 -0800 Subject: [clang-tidy] 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 --- clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp') diff --git a/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp b/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp index a6e71e6..d1537eb 100644 --- a/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp @@ -50,7 +50,7 @@ getConstructExprArgRange(const CXXConstructExpr &Construct) { E = Arg->getEndLoc(); } if (B.isInvalid() || E.isInvalid()) - return llvm::None; + return std::nullopt; return SourceRange(B, E); } -- cgit v1.1