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

    <tr>
        <th>Summary</th>
        <td>
            [C++20] [Modules] We don't recognize the template names in Using statements correctly.
        </td>
    </tr>

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

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

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

<pre>
    Coming from https://reviews.llvm.org/D154324

Reproducer:

```
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 -emit-module-interface -I%t %t/module1.cppm -o %t/module1.pcm
// RUN: %clang_cc1 -std=c++20 -emit-module-interface -I%t %t/module2.cppm -o %t/module2.pcm
// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/merge.cpp -verify -fsyntax-only

//--- header.h
namespace NS {
template <int I>
class A {
};

template <template <int I_> class T>
class B {
};
}

//--- module1.cppm
// inside NS, using C = B<A>
module;
export module module1;
#include "header.h"
namespace NS {
using C = B<A>;
}
export struct D {
    using Type = NS::C;
};

//--- module2.cppm
// inside NS, using C = B<NS::A>
module;
export module module2;
#include "header.h"
namespace NS {
using C = B<NS::A>;
}
export struct D {
    using Type = NS::C;
};

//--- merge.cpp
// expected-no-diagnostics
import module1;
import module2;
D d;
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VV2vozYQ_TXmZeQI7JDAAw9J2Ej70PuwH2rfVmAGcGtsapu7N_31FZAv7s1WulW7UhRkj-ecmTP2TOGcbDRiRuI9ifOgGHxrbHZoh0L_KX8b0qA01Sk7mE7qBmprOmi97x3hO8KOhB0tPkv87lZKPXcrYxvCjnkUrzlbkzAn4W7-_4S9NdUg0I6OdwayCc-_eTlhwqevT4TvwHZAbQ2Exf6RufujkvaHVtcr6WktFY5H3Jtzj3wIi4UqdPNNiAio8xXhuSBsT9iehUCxk552phoUUqk92roQCPTjCD3js-Nsjlai7zug5vV2L7r_lZg9Jmb_krjuLZaDVFf2vvAt4fmCGG2DIy3QZ7SyPgGt3Un74oUarU6Lak_clFJosajQrtp5Xxcdun7M6ekzkO1-3vXY9arwCIQfpPbwkfAPs0WowjnY3Y6SbU74_p7q3vkN0DfCP8AM8uUV6P4HoNv8cSL39V4ILLWT1ZgQYQcY3Ph8DkB4DnvCD7sr6-x_5cGX3lh_Rr2A36JgXGqhhmq80-yqIWP_JOND7jd5nYmdt4PwkN_cAeAc_pdTjxPK0-fxFfPdYQGz1P-1QuydCl043qUU-2-VWsTwMxW7vKiFXPjSo_BYUW1oJYtGG-elcPMZ2d2pcbswi-2bOjlUN_JLBw6qjFcpT4sAs2iTpNuYb-IoaLNwHaVbUW8SkTC2qeuqxHWS1EmcJmUS4zqQGQsZD7dRGiZhGEeruixZGlZJFMV1VbOSrEPsCqmuUyKQzg2YbXi63gaqKFG5aQIxpvE7TMaxVnEe2Gz0oeXQOLIOlXT-NmsCL72aRtfh0rJInAOJ979MCbtx9StCZTRhWw8WhWm0_AvBtwjXrjBdBpAavk5Fc77w2KH2DoSxFoVXp1UwWJUtJ18jfTuUK2E6wo5jSOcP7a35HcXYGqdEHGHHKdG_AwAA__8c-h6m">