[clang] [LifetimeSafety] Add report on misuse of clang::noescape (PR #177260)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 22 03:16:24 PST 2026


================
@@ -194,6 +201,13 @@ class LifetimeChecker {
     }
   }
 
+  void reportNoescapeViolations() {
+    if (!Reporter)
+      return;
+    for (const auto &[PVD, EscapeExpr] : NoescapeWarningsMap)
----------------
Xazax-hun wrote:

Nit: I think we should iterate through these by values as these are pairs of small pointers.

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


More information about the cfe-commits mailing list