[PATCH] D152108: [ADT] Deprecate StringRef::{starts,ends}with_insensitive
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 4 10:25:22 PDT 2023
kazu created this revision.
Herald added a project: All.
kazu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch deprecates StringRef::{starts,ends}with_insensitive as
their uses have migrated to {starts,ends}_with_insensitive,
respectively.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152108
Files:
llvm/include/llvm/ADT/StringRef.h
Index: llvm/include/llvm/ADT/StringRef.h
===================================================================
--- llvm/include/llvm/ADT/StringRef.h
+++ llvm/include/llvm/ADT/StringRef.h
@@ -264,7 +264,10 @@
/// Check if this string starts with the given \p Prefix, ignoring case.
[[nodiscard]] bool starts_with_insensitive(StringRef Prefix) const;
- [[nodiscard]] bool startswith_insensitive(StringRef Prefix) const {
+ [[nodiscard]] LLVM_DEPRECATED(
+ "Use starts_with_insensitive instead",
+ "starts_with_insensitive") bool startswith_insensitive(StringRef Prefix)
+ const {
return starts_with_insensitive(Prefix);
}
@@ -280,7 +283,10 @@
/// Check if this string ends with the given \p Suffix, ignoring case.
[[nodiscard]] bool ends_with_insensitive(StringRef Suffix) const;
- [[nodiscard]] bool endswith_insensitive(StringRef Suffix) const {
+ [[nodiscard]] LLVM_DEPRECATED(
+ "Use ends_with_insensitive instead",
+ "ends_with_insensitive") bool endswith_insensitive(StringRef Suffix)
+ const {
return ends_with_insensitive(Suffix);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152108.528238.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230604/6673bec1/attachment.bin>
More information about the llvm-commits
mailing list