Matheus Izvekov 5b6f71b8f6
WIP: [clang] store sugared converted arguments on TemplateSpecializationType
Not ready for review

This is a quite large patch, half of which will
be redone following a different approach.

Although it improves sugar retention in template argument
deduction on its own, this is an enabler for resugaring.

This stores the sugared converted template arguments in
a TST, in addition to the existing as-written ones,
so this is quite wasteful.

This is the biggest performance impact on the whole
of resugaring so far, although it is hoped the
new approach will have negligible impact.

This is a continuation of https://reviews.llvm.org/D134113
2025-04-03 14:29:45 -03:00

21 lines
636 B
C++

// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s
// FIXME: With deduction changes to better preserve
// type sugar, the bug that this test case used to
// expose is harder to reproduce.
template <class> struct Pair;
template <class...> struct Tuple {
template <class _Up> Tuple(_Up);
};
template <typename> struct StatusOr;
template <int> using ElementType = int;
template <int... fields>
using Key = Tuple<ElementType<fields>...>;
template <int... fields>
StatusOr<Pair<Key<fields...>>> Parser();
struct Helper { Helper(Tuple<>, Tuple<>, int, int); };
struct D : Helper {
D(Key<> f, int n, int e) : Helper(f, Parser<>, n, e) {}
};