[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)
Yeoul Na via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 4 09:47:33 PDT 2024
https://github.com/rapidsna commented:
You may also want to consider making the attribute late parsed in C when `-fexperimental-late-parse-attributes` is enabled. See https://github.com/llvm/llvm-project/pull/93121/files#diff-ae2ec9524bdbeea1f06917607482634dd89af5bcbb929805032463e5dafe79e7R2260
That will allow the code like below:
```
struct Foo {
int a_value GUARDED_BY(mu_); // attribute comes before `mu_` which needs to be late parsed
struct Mutext *mu_;
}
```
https://github.com/llvm/llvm-project/pull/94216
More information about the cfe-commits
mailing list