llvm/llvm-project
Ver no GitHub-Wdangling-field detects view members initalized from a by-value owner parameter
Open
#187.675 aberto em 20 de mar. de 2026
clang:temporal-safetygood first issue
Métricas do repositório
- Stars
- (26.378 stars)
- Métricas de merge de PR
- (Mesclagem média 1d 2h) (1.000 fundiu PRs em 30d)
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
};