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

    <tr>
        <th>Summary</th>
        <td>
            [[lifetimebound]] assignment seems to interfere with tracking
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    The following example is not caught

```
#include <string>
#include <string_view>
#include <iostream>

struct S {
  std::string s;

  std::string_view f() const [[clang::lifetimebound]] {
    return s;
 }
};

void test() {
  std::string_view thisIsAnIssue;
 thisIsAnIssue = S{}.f();
  std::cout << thisIsAnIssue << std::endl;
}
```
https://godbolt.org/z/onnPjPo95

While this one is

```
void test() {
  std::string_view thisIsAnIssue = S{}.f();
  std::cout << thisIsAnIssue << std::endl;
}
```
https://godbolt.org/z/q57nhWYaT

Could they both be caught?


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVEFvozwQ_TXmMmrkmDiEA4ekfEi9VWqlqqdPBk_ArbG79pBs99evIGyTttu97GUlZMTM87w3D3tUjKZ1iAWTOybLRA3U-VCU6Ex8VMHHDg_x2bwmtdevxX2HsPfW-qNxLeB31b9YBBPBeYJGDW1HjJeMb-d1zefn9ClS4xo7aASWXkcKxrUs_e_r5P8Hg8cvEMZHCqj6c3paI4WhIbgDlu1OEYBImqVblm5PVSGydHe55xNi4oU9Exsmcmi8iwSTP7vGqlHzCLVmj2R6rP3gNJMlk-UlKUBAGoK7YAOWlTNvVn7QcPBGA2GkmfRr-Sdx1Jl4E7fuJsYBzwzvwsDSEu7GSlm5mLs5Q891Gz_QaClLrz8VmIJvSHTanoW_dfP-N3dEL3HEi4qJqvW69pYWPrRMVD-YqLxzt0-3PpeX_T90xuLEDt6NR-oP5-ivvPpHTfkmM9c9PKr7y76v_WA1UIevUHvqoMZflyytLnGJLlKdp7lKsFhmQnC-zNNN0hVijUqupea5QCHERtfNuuEi3yw3PNdynZhCcLHimVgvUymW2UKt5F5LmTeZyhqUiq049srYhbWHftSbmNGEYsl5tlonVtVo4zQ8hHB4hCnLhBhnSSjGTVf10Ea24tZEiucyZMjOU2f3u6t0Gkw9OoKI2EcgD8YRhj0GhKOhDiio5tm4NhmCLT4YbKgb6kXjeyaqkXN-Xb0E_4QNMVFNSiMT1dzKoRA_AwAA__-as3oD">