File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1906,10 +1906,11 @@ void SwiftDeclCollector::lookupVisibleDecls(ArrayRef<ModuleDecl *> Modules) {
19061906 for (auto *D: KnownDecls) {
19071907 if (auto *Ext = dyn_cast<ExtensionDecl>(D)) {
19081908 if (HandledExtensions.find (Ext) == HandledExtensions.end ()) {
1909- auto *NTD = Ext->getExtendedNominal ();
1910- // Check if the extension is from other modules.
1911- if (!llvm::is_contained (Modules, NTD->getModuleContext ())) {
1912- ExtensionMap[NTD].push_back (Ext);
1909+ if (auto *NTD = Ext->getExtendedNominal ()) {
1910+ // Check if the extension is from other modules.
1911+ if (!llvm::is_contained (Modules, NTD->getModuleContext ())) {
1912+ ExtensionMap[NTD].push_back (Ext);
1913+ }
19131914 }
19141915 }
19151916 }
You can’t perform that action at this time.
0 commit comments