Skip to content
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

[Transforms] Use StringRef::operator== instead of StringRef::equals (NFC) #91072

Commits on May 4, 2024

  1. [Transforms] Use StringRef::operator== instead of StringRef::equals (…

    …NFC)
    
    I'm planning to remove StringRef::equals in favor of
    StringRef::operator==.
    
    - StringRef::operator==/!= outnumber StringRef::equals by a factor of
      31 under llvm/ in terms of their usage.
    
    - The elimination of StringRef::equals brings StringRef closer to
      std::string_view, which has operator== but not equals.
    
    - S == "foo" is more readable than S.equals("foo"), especially for
      !Long.Expression.equals("str") vs Long.Expression != "str".
    kazutakahirata committed May 4, 2024
    Configuration menu
    Copy the full SHA
    ebfa8c7 View commit details
    Browse the repository at this point in the history