Skip to content

[ADT] Remove StringRef::{startswith,endswith} #89548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kazutakahirata
Copy link
Contributor

These functions have been deprecated since:

commit 5ac1295
Author: Kazu Hirata [email protected]
Date: Sun Dec 17 15:52:50 2023 -0800

These functions have been deprecated since:

  commit 5ac1295
  Author: Kazu Hirata <[email protected]>
  Date:   Sun Dec 17 15:52:50 2023 -0800
@llvmbot
Copy link
Member

llvmbot commented Apr 21, 2024

@llvm/pr-subscribers-llvm-adt

Author: Kazu Hirata (kazutakahirata)

Changes

These functions have been deprecated since:

commit 5ac1295
Author: Kazu Hirata <[email protected]>
Date: Sun Dec 17 15:52:50 2023 -0800


Full diff: https://github.com/llvm/llvm-project/pull/89548.diff

1 Files Affected:

  • (modified) llvm/include/llvm/ADT/StringRef.h (-10)
diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h
index 1c6c96678b5d27..0360174c5231e5 100644
--- a/llvm/include/llvm/ADT/StringRef.h
+++ b/llvm/include/llvm/ADT/StringRef.h
@@ -258,11 +258,6 @@ namespace llvm {
       return Length >= Prefix.Length &&
              compareMemory(Data, Prefix.Data, Prefix.Length) == 0;
     }
-    [[nodiscard]] LLVM_DEPRECATED(
-        "Use starts_with instead",
-        "starts_with") bool startswith(StringRef Prefix) const {
-      return starts_with(Prefix);
-    }
 
     /// Check if this string starts with the given \p Prefix, ignoring case.
     [[nodiscard]] bool starts_with_insensitive(StringRef Prefix) const;
@@ -273,11 +268,6 @@ namespace llvm {
              compareMemory(end() - Suffix.Length, Suffix.Data, Suffix.Length) ==
                  0;
     }
-    [[nodiscard]] LLVM_DEPRECATED(
-        "Use ends_with instead",
-        "ends_with") bool endswith(StringRef Suffix) const {
-      return ends_with(Suffix);
-    }
 
     /// Check if this string ends with the given \p Suffix, ignoring case.
     [[nodiscard]] bool ends_with_insensitive(StringRef Suffix) const;

Copy link
Collaborator

@dwblaikie dwblaikie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guess that means they shipped in 18 deprecated, and they'll be removed in 19? Sounds good to me

@kazutakahirata kazutakahirata merged commit 4ec9a66 into llvm:main Apr 23, 2024
@kazutakahirata kazutakahirata deleted the pr_cleanup_StringRef_remove_startswith branch April 23, 2024 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants