Not worth/reasonable to have a test case? On Thu, Oct 13, 2016 at 7:44 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote:
> Author: rsmith > Date: Thu Oct 13 21:35:11 2016 > New Revision: 284187 > > URL: http://llvm.org/viewvc/llvm-project?rev=284187&view=rev > Log: > Fix bogus assert breaking modules self-host. > > Modified: > cfe/trunk/lib/AST/ASTContext.cpp > > Modified: cfe/trunk/lib/AST/ASTContext.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=284187&r1=284186&r2=284187&view=diff > > ============================================================================== > --- cfe/trunk/lib/AST/ASTContext.cpp (original) > +++ cfe/trunk/lib/AST/ASTContext.cpp Thu Oct 13 21:35:11 2016 > @@ -907,11 +907,13 @@ void ASTContext::mergeDefinitionIntoModu > assert(Other->isFromASTFile() && "merge of non-imported decl not > supported"); > assert(Def != Other && "merging definition into itself"); > > - if (!getLangOpts().ModulesLocalVisibility && !Other->isHidden()) > + if (!Other->isHidden()) { > Def->setHidden(false); > - else > - assert(Other->getImportedOwningModule() && > - "hidden, imported declaration has no owning module"); > + return; > + } > + > + assert(Other->getImportedOwningModule() && > + "hidden, imported declaration has no owning module"); > > // Mark Def as the canonical definition of merged definition Other. > { > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits