[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

Marco Elver via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 4 10:05:19 PST 2025


melver wrote:

> Can any of the members in the structs be reorganized to put the mutex member declaration BEFORE the members they guard? Probably not always, but perhaps that's possible for most structures?

It's an option I considered, but I can already hear "what is this crap ... NACK". In many cases it might be possible, but where data layout or cacheline organization is important for performance, definitely not an option.

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


More information about the cfe-commits mailing list