================ @@ -29,6 +30,22 @@ struct LOCKABLE Mutex {}; struct Foo { struct Mutex *mu_; + int a_value GUARDED_BY(mu_); + + struct Bar { + struct Mutex *other_mu ACQUIRED_AFTER(mu_); + struct Mutex *third_mu ACQUIRED_BEFORE(other_mu); + } bar; + + int* a_ptr PT_GUARDED_BY(bar.other_mu); +}; + +struct LOCKABLE Lock {}; +struct A { + struct Lock lock; + union { + int b __attribute__((guarded_by(lock))); ---------------- aaronpuchert wrote:
Tricky, see #78131. But as above, testing that it doesn't crash is fine. https://github.com/llvm/llvm-project/pull/95455 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits