Re: [PATCH tip/locking/core v3] compiler-context-analysis: Bump required Clang version to 23
From: Bart Van Assche
Date: Fri May 15 2026 - 11:33:51 EST
On 5/15/26 5:43 AM, Marco Elver wrote:
Clang 23 introduces several major improvements:
1. Support for multiple arguments in the `guarded_by` and
`pt_guarded_by` attributes [1]. This allows defining variables
protected by multiple context locks, where read access requires
holding at least one lock (shared or exclusive), and write access
requires holding all of them exclusively.
2. Function pointer support [2]. We can now add attributes to function
pointers just like we do on normal functions.
3. A fix to use arrays of locks [3]. Each index is now correctly treated
as a separate lock instance.
4. A fix for implicit member access in attributes [4]. This allows to
use __guarded_by(&foo->lock) correctly.
Overall that makes it worthwhile bumping the compiler version instead of
trying to make both Clang 22 and later work while supporting these new
features.
Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>