File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -2236,7 +2236,9 @@ namespace {
22362236 Decl *member = Impl.importDecl (nd, getActiveSwiftVersion ());
22372237
22382238 if (!member) {
2239- if (!isa<clang::TypeDecl>(nd) && !isa<clang::FunctionDecl>(nd)) {
2239+ if (!isa<clang::TypeDecl>(nd) && !isa<clang::FunctionDecl>(nd) &&
2240+ !isa<clang::TypeAliasTemplateDecl>(nd) &&
2241+ !isa<clang::FunctionTemplateDecl>(nd)) {
22402242 // We don't know what this member is.
22412243 // Assume it may be important in C.
22422244 hasUnreferenceableStorage = true ;
Original file line number Diff line number Diff line change 11#ifndef TEST_INTEROP_CXX_CLASS_INPUTS_MEMBERWISE_INITIALIZER_H
22#define TEST_INTEROP_CXX_CLASS_INPUTS_MEMBERWISE_INITIALIZER_H
33
4+ template <typename T>
5+ struct TemplatedType {};
6+
7+
48struct StructPrivateOnly {
59private:
610 int varPrivate;
@@ -52,4 +56,20 @@ struct ClassWithUnimportedMemberFunction {
5256 int ClassWithUnimportedMemberFunction::* unimportedMemberFunction ();
5357};
5458
59+ struct ClassWithTemplatedFunction {
60+ public:
61+ int varPublic;
62+
63+ template <int I>
64+ void foo ();
65+ };
66+
67+ struct ClassWithTemplatedUsingDecl {
68+ public:
69+ int varPublic;
70+
71+ template <typename T>
72+ using MyUsing = TemplatedType<T>;
73+ };
74+
5575#endif
Original file line number Diff line number Diff line change 4242// CHECK-NEXT: init(varPublic: Int32)
4343// CHECK-NEXT: var varPublic: Int32
4444// CHECK-NEXT: }
45+ // CHECK-NEXT: struct ClassWithTemplatedFunction {
46+ // CHECK-NEXT: init()
47+ // CHECK-NEXT: init(varPublic: Int32)
48+ // CHECK-NEXT: var varPublic: Int32
49+ // CHECK-NEXT: }
50+ // CHECK-NEXT: struct ClassWithTemplatedUsingDecl {
51+ // CHECK-NEXT: init()
52+ // CHECK-NEXT: init(varPublic: Int32)
53+ // CHECK-NEXT: var varPublic: Int32
54+ // CHECK-NEXT: }
You can’t perform that action at this time.
0 commit comments