================ @@ -8147,6 +8149,26 @@ TEST_P(ImportFunctions, CTADWithLocalTypedef) { ASSERT_TRUE(ToD); } +TEST_P(ImportFunctions, CTADAliasTemplate) { + Decl *TU = getTuDecl( + R"( + template <typename T> struct A { + A(T); + }; + template<typename T> + using B = A<T>; + B b{(int)0}; + )", + Lang_CXX20, "input.cc"); + auto *FromD = FirstDeclMatcher<CXXDeductionGuideDecl>().match( + TU, cxxDeductionGuideDecl(hasParameter(0, hasType(asString("int"))))); + auto *ToD = Import(FromD, Lang_CXX20); + ASSERT_TRUE(ToD); + EXPECT_TRUE(ToD->getSourceDeductionGuideKind() == + CXXDeductionGuideDecl::SourceDeductionGuideKind::Alias); ---------------- shafik wrote:
Can we also get a test that covers the `None` case to ensure we are serializing and deserializing correctly for both. Testing should if possible always cover all path, otherwise this opens us to undetected regressions in the untested paths. https://github.com/llvm/llvm-project/pull/123875 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits