aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-03 11:54:48 -0800
committerKazu Hirata <kazu@google.com>2022-12-03 11:54:48 -0800
commitcd8702efe7e6cacfd82cc4909e42718224bcd5d0 (patch)
tree9ffb6fae5c9aff022bdc76b195941a74a95dff40 /clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp
parent5891420e6848e86a069dc6b7b73f175e22388f4a (diff)
downloadllvm-cd8702efe7e6cacfd82cc4909e42718224bcd5d0.zip
llvm-cd8702efe7e6cacfd82cc4909e42718224bcd5d0.tar.gz
llvm-cd8702efe7e6cacfd82cc4909e42718224bcd5d0.tar.bz2
[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
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}