[llvm] [ADT] Initialize function_ref::callable (PR #216686)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 11:50:24 PDT 2026
dwblaikie wrote:
Ah, OK, so it /looks/ like the tool doesn't understand that there's an invariant in `OperationState` that `propertiesDeleter` is always present/non-null when `properties` is present.
Is there a way to communicate that to the checker? I guess not.
I assume more invasive designs that might improve readability and static analysis aren't feasible? (like the propertiesDeleter can't be actually a deleter on a PropertyRef? Or have some owning PropertyRef type that can handle destruction itself - perhaps that is OperationState already)
Are all these thousands of false positives related to OperationState specifically, or other uses of function_ref across the codebase?
Generally my preference (though I don't think it's a documented LLVM policy) is that false positives in third party static analysis (including GCC warnings) should be addressed by disabling (as narrowly as possible) the static analysis (turning off specific warnings with high false positive rate, etc). Clang warnings we can deal with by fixing the warning and maybe disabling the warning when building with certain older clang versions, etc.
https://github.com/llvm/llvm-project/pull/216686
More information about the llvm-commits
mailing list