Skip to content

Commit 9136ed2

Browse files
Add check that vector element type can be imported ... (#23885)
... before attempting to import the vector type. (<rdar://problem/49677353>)
1 parent 94be707 commit 9136ed2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/ClangImporter/ImportType.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ namespace {
515515
type->getElementType(), ImportTypeKind::Abstract,
516516
false /* No NSUIntegerAsInt */, Bridgeability::None,
517517
OptionalTypeKind::OTK_None);
518+
if (!element) { return Type(); }
518519
unsigned count = type->getNumElements();
519520
// Import vector-of-one as the element type.
520521
if (count == 1) { return element; }

0 commit comments

Comments
 (0)