[clang] [analyzer][NFC] Use range algorithms for annotation checks in ObjC checkers (PR #246864)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 30 04:54:49 PST 2026
================
@@ -223,15 +221,13 @@ class IvarInvalidationCheckerImpl {
};
static bool isInvalidationMethod(const ObjCMethodDecl *M, bool LookForPartial) {
- for (const auto *Ann : M->specific_attrs<AnnotateAttr>()) {
- if (!LookForPartial &&
- Ann->getAnnotation() == "objc_instance_variable_invalidator")
- return true;
- if (LookForPartial &&
- Ann->getAnnotation() == "objc_instance_variable_invalidator_partial")
- return true;
- }
- return false;
+ StringRef Wanted = LookForPartial
----------------
Xazax-hun wrote:
Can we use `llvm::StringLiteral`?
https://github.com/llvm/llvm-project/pull/246864
More information about the cfe-commits
mailing list