Skip to content

Commit e6f680d

Browse files
authored
Merge pull request #74188 from augusto2112/null-decl-context
Check if decl context returned by importDeclContextOf is null
2 parents 83ef1cd + fedf24c commit e6f680d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ClangImporter/ImportType.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3429,7 +3429,9 @@ ImportedType ClangImporter::Implementation::importAccessorParamsAndReturnType(
34293429
// FIXME: Duplicated from importMethodParamsAndReturnType.
34303430
DeclContext *origDC = importDeclContextOf(property,
34313431
property->getDeclContext());
3432-
assert(origDC);
3432+
if (!origDC)
3433+
return {Type(), false};
3434+
34333435
auto fieldType = isGetter ? clangDecl->getReturnType()
34343436
: clangDecl->getParamDecl(0)->getType();
34353437

0 commit comments

Comments
 (0)