[clang] 234da20 - [Analysis] Use StringRef::ends_with_insensitive (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 22 00:13:39 PST 2024
Author: Kazu Hirata
Date: 2024-01-22T00:13:27-08:00
New Revision: 234da203779be31c83541d99ee28e01ee422c506
URL: https://github.com/llvm/llvm-project/commit/234da203779be31c83541d99ee28e01ee422c506
DIFF: https://github.com/llvm/llvm-project/commit/234da203779be31c83541d99ee28e01ee422c506.diff
LOG: [Analysis] Use StringRef::ends_with_insensitive (NFC)
Added:
Modified:
clang/lib/Analysis/RetainSummaryManager.cpp
Removed:
################################################################################
diff --git a/clang/lib/Analysis/RetainSummaryManager.cpp b/clang/lib/Analysis/RetainSummaryManager.cpp
index 6f50d95b179f41..8d279d969b613e 100644
--- a/clang/lib/Analysis/RetainSummaryManager.cpp
+++ b/clang/lib/Analysis/RetainSummaryManager.cpp
@@ -1098,7 +1098,7 @@ RetainSummaryManager::getStandardMethodSummary(const ObjCMethodDecl *MD,
if (S.isKeywordSelector()) {
for (unsigned i = 0, e = S.getNumArgs(); i != e; ++i) {
StringRef Slot = S.getNameForSlot(i);
- if (Slot.substr(Slot.size() - 8).equals_insensitive("delegate")) {
+ if (Slot.ends_with_insensitive("delegate")) {
if (ResultEff == ObjCInitRetE)
ResultEff = RetEffect::MakeNoRetHard();
else
More information about the cfe-commits
mailing list