[clang] Thread Safety Analysis: Basic capability alias-analysis (PR #142955)

Marco Elver via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 9 06:32:57 PDT 2025


melver wrote:

Alright, I think this is as far as I can push it. This PR now contains 3 commits just to keep the story clear (happy to squash them if that's better).

Besides the Linux kernel prototype integration, I took this version and tested it on our internal codebase that has used `-Wthread-safety` for years, so there is broad application and coverage of the feature in general -- with this latest version, I have found 1 real bug, and 1 very dubious pattern (see FIXME test), but otherwise no further issues.

But because there's a real chance this alias analysis might confuse existing users with new warnings, we should hide it behind `-Wthread-safety-beta`.

PTAL.

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


More information about the cfe-commits mailing list