================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits