Skip to content

Commit 2b96511

Browse files
Add tests for VisitSubstNonTypeTemplateParmPackExpr
1 parent ced2272 commit 2b96511

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

clang/unittests/AST/ASTImporterTest.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3300,6 +3300,22 @@ TEST_P(ImportExpr, ConceptNestedNonInstantiationDependentRequirement) {
33003300
conceptDecl(has(requiresExpr(has(requiresExprBodyDecl())))));
33013301
}
33023302

3303+
TEST_P(ImportExpr, ImportSubstNonTypeTemplateParmPackExpr) {
3304+
MatchVerifier<Decl> Verifier;
3305+
const char *Code = R"(
3306+
template<auto ...> struct X {};
3307+
template<typename ...> struct Z {};
3308+
3309+
template<int ...N> struct E {
3310+
template<int ...M> using B = Z<X<N, M>...>;
3311+
template<int M1, int M2> E(B<M1, M2>);
3312+
};
3313+
using declToImport = E<1, 3>;
3314+
)";
3315+
testImport(Code, Lang_CXX20, "", Lang_CXX20, Verifier,
3316+
typedefNameDecl(hasName("declToImport")));
3317+
}
3318+
33033319
class ImportImplicitMethods : public ASTImporterOptionSpecificTestBase {
33043320
public:
33053321
static constexpr auto DefaultCode = R"(

0 commit comments

Comments
 (0)