Skip to content

Commit

Permalink
[Index] Fix recursive-cxx-member-calls.cpp
Browse files Browse the repository at this point in the history
b8f89b8 inadvertently replaced
startswith/endswith with starts_with/ends_with even though the test
uses a custom StringRef.  This patch reverts the change.
  • Loading branch information
kazutakahirata committed Dec 17, 2023
1 parent 0ca95b2 commit 2aaeef1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/test/Index/recursive-cxx-member-calls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2aaeef1

Please sign in to comment.