These cases are not caught by clang:
https://godbolt.org/z/E3dWds9o6
#include <optional>
#include <set>
#include <string>
#include <string_view>
#include <vector>
std::string GetString() { return "foo"; }
void Test() {
// Bad.
std::set<std::string_view> s = {GetString(), GetString()};
std::vector<std::string_view> v = {GetString(), GetString()};
// Good.
std::optional<std::string_view> t2 = GetString(); // warning here.
}
cc: @hokein
related bug which was closed: #100526