[clang] [alpha.webkit.NoDeleteChecker] Don't emit a warning for a function without annotation. (PR #178824)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 30 03:21:48 PST 2026
================
@@ -70,6 +70,12 @@ class NoDeleteChecker : public Checker<check::ASTDecl<TranslationUnitDecl>> {
return;
bool HasNoDeleteAnnotation = isNoDeleteFunction(FD);
+ for (auto* D = FD->getPreviousDecl(); D; D = D->getPreviousDecl()) {
+ if (isNoDeleteFunction(D)) {
+ HasNoDeleteAnnotation = true;
+ break;
+ }
+ }
----------------
steakhal wrote:
```suggestion
bool HasNoDeleteAnnotation = any_of(FD->redecls(), isNoDeleteFunction);
```
https://github.com/llvm/llvm-project/pull/178824
More information about the cfe-commits
mailing list