[PATCH] D32828: [Modules] Fix conservative assertion for import diagnostics

2017-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303705: [Modules] Fix overly conservative assertion for import diagnostic (authored by bruno). Changed prior to commit: https://reviews.llvm.org/D32828?vs=100016&id=100023#toc Repository: rL LLVM ht

[PATCH] D32828: [Modules] Fix conservative assertion for import diagnostics

2017-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 100016. bruno added a comment. Updated the patch after Richard's comments. Removed the assertion but bail out early if the module is already visible. https://reviews.llvm.org/D32828 Files: lib/Sema/SemaDecl.cpp lib/Sema/SemaLookup.cpp test/Modules/Inpu

[PATCH] D32828: [Modules] Fix conservative assertion for import diagnostics

2017-05-09 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaLookup.cpp:4971-4972 assert(Owner && "definition of hidden declaration is not in a module"); + assert((!isVisible(Decl) || VisibleModules.isVisible(Owner)) && + "missing import for non-hidden decl?"); --

[PATCH] D32828: [Modules] Fix conservative assertion for import diagnostics

2017-05-03 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. We currenltly assert when want to diagnose a missing import and the decl in question is already visible. It turns out that the decl in question might be visible because another decl from the same module actually made the module visible in a previous error diagnostic