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) {
1906
1906
for (auto *D: KnownDecls) {
1907
1907
if (auto *Ext = dyn_cast<ExtensionDecl>(D)) {
1908
1908
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
+ }
1913
1914
}
1914
1915
}
1915
1916
}
You can’t perform that action at this time.
0 commit comments