[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

Martin Storsjö via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 22 05:27:08 PDT 2024


mstorsjo wrote:

I managed to reduce this case further. Not entirely sure if it really managed to pinpoint the same thing or if it diverged into something else, but this snippet produces a different set of defined/undefined symbols before and after this change.

```c++
namespace a {
typedef int b;
}
class c;
class d {
  template <typename = int> void e(c *, int, int);
};
class f {
public:
  static bool g;
};
template <typename> struct h {
  template <typename, typename... i> static bool j(i...);
};
template <> template <typename, typename... i> bool h<d>::j(i...) {
  f::g ? h<int>::j<int> : 0;
}
template <> template <typename, typename... i> bool h<int>::j(i...) {}
template void d::e(c *, a::b, int);
template <typename> void d::e(c *, int, int) { f::g ? h<int>::j<int>() : 0; }
```

https://github.com/llvm/llvm-project/pull/106585


More information about the cfe-commits mailing list