Skip to content

Commit 3981a7c

Browse files
authored
Merge pull request #35222 from zoecarver/cxx/fix-using-shadow
[cxx-interop] Using shadow with class template.
2 parents d557688 + 655c381 commit 3981a7c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4458,8 +4458,10 @@ namespace {
44584458
return nullptr;
44594459

44604460
Decl *SwiftDecl = Impl.importDecl(decl->getUnderlyingDecl(), getActiveSwiftVersion());
4461+
if (!SwiftDecl)
4462+
return nullptr;
4463+
44614464
const TypeDecl *SwiftTypeDecl = dyn_cast<TypeDecl>(SwiftDecl);
4462-
44634465
if (!SwiftTypeDecl)
44644466
return nullptr;
44654467

test/Interop/Cxx/class/Inputs/type-classification.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,10 @@ struct StructWithCopyConstructorAndSubobjectCopyConstructorAndValue {
189189
: member(other.member) {}
190190
};
191191

192+
template<class> struct DependentParent { struct Child { }; };
193+
194+
struct HasUnsupportedUsingShadow : DependentParent<int> {
195+
using typename DependentParent<int>::Child;
196+
};
197+
192198
#endif // TEST_INTEROP_CXX_CLASS_INPUTS_TYPE_CLASSIFICATION_H

0 commit comments

Comments
 (0)