[clang] [WebKit checkers] Trivial function analysis ignores some nodelete annotation (PR #183970)

Ryosuke Niwa via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 1 11:41:17 PST 2026


================
@@ -454,10 +454,29 @@ bool isPtrConversion(const FunctionDecl *F) {
   return false;
 }
 
-bool isNoDeleteFunction(const FunctionDecl *F) {
+static bool isNoDeleteFunctionDecl(const FunctionDecl *F) {
   return typeAnnotationForReturnType(F) == WebKitAnnotation::NoDelete;
 }
 
+bool isNoDeleteFunction(const FunctionDecl *F) {
+  if (llvm::any_of(F->redecls(), isNoDeleteFunctionDecl))
----------------
rniwa wrote:

I guess we could do that. Is there any behavior difference we can observe from that change?

https://github.com/llvm/llvm-project/pull/183970


More information about the cfe-commits mailing list