[NFC] updating StringRef API

`StringRef::endswith_insensitive` and
`StringRef::startswith_insensitive` is deprecated and being replaced
with `StringRef::ends_with_insensitive` and
`StringRef::starts_with_insensitive` respectively.
This commit is contained in:
Evan Wilde
2023-07-24 14:12:24 -07:00
parent 544bcd300e
commit f3cd71d2d1
4 changed files with 6 additions and 6 deletions

View File

@@ -398,7 +398,7 @@ static bool matchNameWordToTypeWord(StringRef nameWord, StringRef typeWord) {
// We can match the suffix of the type so long as everything preceding the
// match is neither a lowercase letter nor a '_'. This ignores type
// prefixes for acronyms, e.g., the 'NS' in 'NSURL'.
if (typeWord.endswith_insensitive(nameWord) &&
if (typeWord.ends_with_insensitive(nameWord) &&
!clang::isLowercase(typeWord[typeWord.size() - nameWord.size()])) {
// Check that everything preceding the match is neither a lowercase letter
// nor a '_'.
@@ -411,7 +411,7 @@ static bool matchNameWordToTypeWord(StringRef nameWord, StringRef typeWord) {
// We can match a prefix so long as everything following the match is
// a number.
if (typeWord.startswith_insensitive(nameWord)) {
if (typeWord.starts_with_insensitive(nameWord)) {
for (unsigned i = nameWord.size(), n = typeWord.size(); i != n; ++i) {
if (!clang::isDigit(typeWord[i])) return false;
}