llvm/llvm-project
GitHub で見るguarded_by attributes not supported using c++11 style
Open
#158,116 opened on 2025年9月11日
clang:frontendgood first issue
Repository metrics
- Stars
- (26,378 stars)
- PR merge metrics
- (平均マージ 1d 2h) (30d で 1,000 merged PRs)
説明
#include <mutex>
class Foo {
std::mutex m;
int y __attribute__((guarded_by(m)));
int z [[clang::guarded_by(m)]];
};
<source>:6:13: warning: unknown attribute 'clang::guarded_by' ignored [-Wunknown-attributes]
6 | int z [[clang::guarded_by(m)]];
| ^~~~~~~~~~~~~~~~~