llvm/llvm-project
GitHub で見る-Wdangling-field detects view members initalized from a by-value owner parameter
Open
#187,675 opened on 2026年3月20日
clang:temporal-safetygood first issue
Repository metrics
- Stars
- (26,378 stars)
- PR merge metrics
- (平均マージ 1d 2h) (30d で 1,000 merged PRs)
説明
struct Foo {};
struct Bar {
const Foo& foo;
Bar(Foo f ) : foo(f) {} // good, clang warn on this case
};
struct C {
string_view s;
C(std::string c) : s(c) {} // bad, clang doesn't warn on this case. support it
};