llvm/llvm-project
Voir sur GitHub-Wdangling-field detects view members initalized from a by-value owner parameter
Open
#187 675 ouverte le 20 mars 2026
clang:temporal-safetygood first issue
Métriques du dépôt
- Stars
- (26 378 stars)
- Métriques de merge PR
- (Merge moyen 1j 2h) (1 000 PRs mergées en 30 j)
Description
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
};