================ @@ -601,17 +601,23 @@ void test() { std::optional<std::string_view> o4 = std::optional<std::string_view>(s); // FIXME: should work for assignment cases - v1 = {std::string()}; - o1 = std::string(); + v1 = {std::string()}; // expected-warning {{object backing the pointer}} + o1 = std::string(); // expected-warning {{object backing the pointer}} // no warning on copying pointers. std::vector<std::string_view> n1 = {std::string_view()}; + n1 = {std::string_view()}; ---------------- hokein wrote:
Done, added. Current we only support the first-level nested container. https://github.com/llvm/llvm-project/pull/108205 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits