<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/100384>100384</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            No -Wdangling-gsl warning if a gsl-pointer object is construct from a gsl-owner object in a container.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend,
            clang:diagnostics
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hokein
      </td>
    </tr>
</table>

<pre>
    See the example below:

```
#include <vector>
#include <string>
#include <string_view>
using namespace std;

void test() {
  const std::string& a = std::vector<std::string>({""}).at(0); // good: give a warning
  string_view b = std::string(); // good: gives a warning
  string_view c = std::vector<std::string>({""}).at(0); // bad: no diagnostic emitted.
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysUs2OmzAQfprhMgoyNoRw4JBsNsdeeuixMnhw3Bo7sg1p374iS5p01e6pkpUIfTPfz8zIGI12RC1UB6iOmZzS2Yf27L-TcVnn1c_2MxGmMyH9kOPFEnZk_RXEHtgR2P13y9b39smFcb2dFCGIl5n65AOI17-BMQXj9Ifg19nQ9XfFFI3T6ORI8SJ7wpgUiMOzmdkbhYliAr4D3iDUK4zYexfTW8sexH4V51uUCOL4AO6WX96XiteFtD4A58urj8CbXC5KDHgD4oDAT8BPqL1fOlGbmVDiVQa39K8-noJh96f03dPu33zxY8L-f2fp5E3aeVRGaudjMj3SaFIila-Tr4_vLiFTrVCNaGRGbVHzYidYUVXZuS22rFSq4Ir1u7JjsqwKxYeub8qhZjvBMtNyxktW87IoWVOIvKglVdttyQbialAKSkajNDa3dh5zH3RmYpyoLRgTuzKzsiMbbxfNeW_lEnU_BO8SOXUL-_IEPCLFBauOWWgX3k036Qglsyam-FBKJllqP3ncfFHSaWuc3uho7_tAM6BEHe3m4o1LFNB336hPaOLb8YWpTzgEP65l_uqeihzKpSxJ4yjk2RRse07pEpe93XahTTpPXd77EfhpMbX-bS7BLxTAT7dZROCndRxzy38FAAD__26tLPk">