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

    <tr>
        <th>Summary</th>
        <td>
            Clang considers result of call using `using` to be dependent
        </td>
    </tr>

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

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

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

<pre>
    In the following code clang considers the call to `get_foo().to<int>();` to be dependent and require `template`, but if the `using` is removed and `ns::get_foo().to<int>();` used it works just fine. It also works if the namespace & `using` are removed. As far as I understand the rules this does not look as dependent name to me. The problem is in many (all?) versions of clang: https://godbolt.org/z/4GEb4PGf1.

```cpp
struct Foo {
    template<typename T>
    T to();
};

namespace ns {
    Foo get_foo();
}

template<typename T>
struct Dep {
    void foo() {
        using ns::get_foo;
        get_foo().to<int>();
    }
};

int main() {
    Foo().to<int>();
    Dep<int>().foo();
}
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNU8FyozAM_Rpz0SxDgIRw4NAmTae3PfS-Y7BI3BqbxXY63a9f2aRJk93plCFEtqWn5yepNeK9edLgDgi9Ucq8Sb2HzgiETvFoaisFTja6dFwpcAbYKtuj-9Ubw_I1y-vUGVZspHaseJh3WHFPTsG3RRA4ohaoHXAtYMLfXk4YQBwOo-IOyWT5BlrvQPYxE-14S1wCiLQUM5gjihhPW9qy4o7e75HwliKlgzczvVp48dZBLzWm8ESElDWng1NmzQe0I--IQ7664sGJ9IlICncWej4Bt_AEXgeFXCAXECavMOhFvIUhSxsHypjX4HyRIuQJ-gxE5Jmixsm0CodwW6lh4PqdCKxJcFbs6C5wpBSSqgGmn2tD94eDc2PUIief3d6I1iiXmmlPqz_0Kx8f2vLnY79IWbZl2d3pS3LHtxvHece6yXcOdoZqW93Pe0DPuUDFxr0T88D5Oeh79nimO1zUnuGr7cWO34umxP8qQch4VcUrlE8QXzM58d_ieA1_NFLAGfv6LDyxtnDbTsWN1zfa7Ox_of2PChRDdZX6f2R234SnG94cp19J91HoeZmIphB1UfPESaew2dyM-ITWKxcbLAz6LM7nCbgZ58RPqrlpQekOvk07M9BCqePH3w9q7xfsHC2ltR4tGcvlol4lh6ZatGLVZrzkedX2y7aos7IWbdEvKqyqXiSKt6hsw5b3LM81vkGEIJstt4ls8izPszKvF3W5zrO0X5dl1vdrCl2ueLFiZYYku0oDjzAbydRESq3fWzpU0jp7OeTWyr1GjOkIn3t3MFNzVNZJpZKYuonU_wIXFo5N">