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 @@ -1912,10 +1912,11 @@ void SwiftDeclCollector::lookupVisibleDecls(ArrayRef<ModuleDecl *> Modules) {
1912
1912
for (auto *D: KnownDecls) {
1913
1913
if (auto *Ext = dyn_cast<ExtensionDecl>(D)) {
1914
1914
if (HandledExtensions.find (Ext) == HandledExtensions.end ()) {
1915
- auto *NTD = Ext->getExtendedNominal ();
1916
- // Check if the extension is from other modules.
1917
- if (!llvm::is_contained (Modules, NTD->getModuleContext ())) {
1918
- ExtensionMap[NTD].push_back (Ext);
1915
+ if (auto *NTD = Ext->getExtendedNominal ()) {
1916
+ // Check if the extension is from other modules.
1917
+ if (!llvm::is_contained (Modules, NTD->getModuleContext ())) {
1918
+ ExtensionMap[NTD].push_back (Ext);
1919
+ }
1919
1920
}
1920
1921
}
1921
1922
}
You can’t perform that action at this time.
0 commit comments