llvm/llvm-project

-Wdangling-field detects view members initalized from a by-value owner parameter

Open

#187.675 geöffnet am 20. März 2026

Auf GitHub ansehen
 (8 Kommentare) (1 Reaktion) (0 zugewiesene Personen)C++ (10.782 Forks)batch import
clang:temporal-safetygood first issue

Repository-Metriken

Stars
 (26.378 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 2h) (1.000 gemergte PRs in 30 T)

Beschreibung

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
};

Contributor Guide