File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -665,10 +665,14 @@ void swift::ide::printModuleInterface(
665665 // An imported namespace decl will contain members from all redecls, so
666666 // make sure we add all the redecls.
667667 for (auto redecl : namespaceDecl->redecls ()) {
668+ if (redecl->decls_empty ())
669+ continue ;
668670 // Namespace redecls may exist across mutliple modules. We want to
669671 // add the decl "D" to every module that has a redecl. But we only
670672 // want to add "D" once to prevent duplicate printing.
671673 clang::SourceLocation loc = redecl->getLocation ();
674+ assert (loc.isValid () &&
675+ " expected a valid SourceLocation for a non-empty namespace" );
672676 auto *owningModule = Importer.getClangOwningModule (redecl);
673677 auto found = ClangDecls.find (owningModule);
674678 if (found != ClangDecls.end () &&
You can’t perform that action at this time.
0 commit comments