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 {
2236
2236
Decl *member = Impl.importDecl (nd, getActiveSwiftVersion ());
2237
2237
2238
2238
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)) {
2240
2242
// We don't know what this member is.
2241
2243
// Assume it may be important in C.
2242
2244
hasUnreferenceableStorage = true ;
Original file line number Diff line number Diff line change 1
1
#ifndef TEST_INTEROP_CXX_CLASS_INPUTS_MEMBERWISE_INITIALIZER_H
2
2
#define TEST_INTEROP_CXX_CLASS_INPUTS_MEMBERWISE_INITIALIZER_H
3
3
4
+ template <typename T>
5
+ struct TemplatedType {};
6
+
7
+
4
8
struct StructPrivateOnly {
5
9
private:
6
10
int varPrivate;
@@ -52,4 +56,20 @@ struct ClassWithUnimportedMemberFunction {
52
56
int ClassWithUnimportedMemberFunction::* unimportedMemberFunction ();
53
57
};
54
58
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
+
55
75
#endif
Original file line number Diff line number Diff line change 42
42
// CHECK-NEXT: init(varPublic: Int32)
43
43
// CHECK-NEXT: var varPublic: Int32
44
44
// 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