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

    <tr>
        <th>Summary</th>
        <td>
            Missing FoundDecl in ConceptReference.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    Given the following code, the `FoundDecl` is null in the `Foo`'s AST node (`ConceptReference`).

```
namespace ns {
template<typename T> concept Foo = true;
}

using ns::Foo;
template<typename T>concept Bar = Foo<T>;  // reference `Foo` points to the underlying of ns::Foo, rather than the `using` decl.
```

This breaks some clang tools: include-cleaner will report the file of the underlying decl, rather than the one for using decl; clangd's go-to-def on `Foo` jumps to the underlying decl.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEU8tu4zAM_Br6QiRQJMdODj7ksd7TXnb7A7JM22plyZDkFv37hZT0sUWBBQIGlqiZ4ZCUIejREjWwP8P-Wsg1Ts43k3sibYvO9a_NT_1MFuNEODhj3Iu2IyrXE_BLPoWKtW61_ZWUgYqhDmhXY1Dbj2sHFQNeBzz9eUDrekLgB6jYxVlFS_xNA3myinLacQvsCux0jxW7__KnlTOFRSpCGxDq8-000rwYGQnEJb4ulJLwAcQPVDcCbJ1DEFeMfiUQ91dQXz8zrSGVZgOIE4hTEi3-A_-GfpY-o-c3l3QD4owIvAXeon-r7sMLXJy2MWB02aPV9uTNa6J3wz8K-AW9jBN5jJN8NzQrTTA9KbP91qdbfJh0wM6TfAoY3EyojLQjRudMIkFtlVl72ihD0pLHF20Melqcj7eOa0NJ0heRifY7ac6mIfF4czJnifONs8_tH90muk1PAzr7yY3HdV6-M-NzeTkWfSP6ozjKgppdzQ7VruSsLKZmGLg6lNWuLneK7_d7IcWRV1QNrOyOXAyFbjjjJeOc7_ZM8HLbC67qUu461rOq7vZQMpqlNltjnuet82OhQ1ipOfCKHwojOzIhbwnnuSDgPC2Mb1L-plvHACUzOsTwgRB1NNT80iH78b4laTW-Tv62WL1pphiX3P08OaOO09ptlZuBtwn0_rdZvHskFYG3WWMA3maZfwMAAP__42UwiA">