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
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
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?");
--
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