[clang] [analyzer] Don't invalidate pointee of pointer-to-const on callback arguments (PR #225489)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 21 04:29:10 PDT 2026
================
@@ -309,3 +309,28 @@ int aliasing_ptrs_via_mutable_and_const_ptrs() {
return 100 / (x - 1);
// expected-warning at -1 {{Division by zero}} FIXME: We shouldn't report this.
}
+
+void gh222438_opaque(int *p, const int *q);
+void gh222438_opaque_cb(int *p, const int *q, void (*cb)());
----------------
steakhal wrote:
I'd appreciate if the opaque functions would hint what parameter is a mutable pointee.
That way I wouldn't need to bounce back and forth from callsites to callee declarations to understand the test.
https://github.com/llvm/llvm-project/pull/225489
More information about the cfe-commits
mailing list