[Index] Fix recursive-cxx-member-calls.cpp

b8f89b84bc inadvertently replaced
startswith/endswith with starts_with/ends_with even though the test
uses a custom StringRef.  This patch reverts the change.
This commit is contained in:
Kazu Hirata 2023-12-16 16:24:32 -08:00
parent 0ca95b269f
commit 2aaeef1fad

View File

@ -99,7 +99,7 @@ using namespace clang;
AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
llvm::StringRef AttrName = Name->getName();
if (AttrName.starts_with("__") && AttrName.ends_with("__"))
if (AttrName.startswith("__") && AttrName.endswith("__"))
AttrName = AttrName.substr(2, AttrName.size() - 4);
return llvm::StringSwitch < AttributeList::Kind > (AttrName)