diff options
author | Kazu Hirata <kazu@google.com> | 2022-08-13 11:48:26 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-08-13 11:48:26 -0700 |
commit | 2117fcb1c06207b5eea09b66fb8e0ff58314afa8 (patch) | |
tree | 1d35ddffcf6b4264ffa261497024fe1a65f12628 /clang-tools-extra | |
parent | 2a4748576e4f734a15c9b0553eec602dd6f03633 (diff) | |
download | llvm-2117fcb1c06207b5eea09b66fb8e0ff58314afa8.zip llvm-2117fcb1c06207b5eea09b66fb8e0ff58314afa8.tar.gz llvm-2117fcb1c06207b5eea09b66fb8e0ff58314afa8.tar.bz2 |
Use Optional::transform instead of Optional::map (NFC)
I'm planning to deprecate map in favor of transform for consistency
with std::optional::transform in C++23.
Diffstat (limited to 'clang-tools-extra')
-rw-r--r-- | clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp index cced230..75326e0 100644 --- a/clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp @@ -131,7 +131,8 @@ getFailureInfoImpl(StringRef Name, bool IsInGlobalNamespace, }; auto InProgressFixup = [&] { return Info - .map([](const FailureInfo &Info) { return StringRef(Info.Fixup); }) + .transform( + [](const FailureInfo &Info) { return StringRef(Info.Fixup); }) .value_or(Name); }; if (auto Fixup = getDoubleUnderscoreFixup(InProgressFixup(), LangOpts)) |