================ @@ -9342,6 +9342,38 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportConflictTypeAliasTemplate) { EXPECT_FALSE(ImportedCallable); } +AST_MATCHER(ClassTemplateSpecializationDecl, hasInstantiatedFromMember) { + if (auto Instantiate = Node.getInstantiatedFrom()) { + if (auto *FromPartialSpecialization = + Instantiate.get<ClassTemplatePartialSpecializationDecl *>()) { + return nullptr != FromPartialSpecialization->getInstantiatedFromMember(); + } + } + return false; +} + +TEST_P(ASTImporterOptionSpecificTestBase, ImportInstantiatedFromMember) { + const char *Code = + R"( + template <typename> struct B { + template <typename, bool = false> union D; + template <typename T> union D<T> {}; + D<int> d; + }; + B<int> b; + )"; + Decl *FromTU = getTuDecl(Code, Lang_CXX17); ---------------- shafik wrote:
nitpick, I don't think this requires C++17 even though the original test case uses C++17. https://github.com/llvm/llvm-project/pull/76493 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits