[PATCH] D32828: [Modules] Fix conservative assertion for import diagnostics
Richard Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 9 12:06:50 PDT 2017
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?");
----------------
`Decl` could also now be visible due to its lexically-enclosing context having a visible merged definition. I think this assertion should either be removed or changed to something like
```
assert(!isVisible(Decl) || <ever created a module import for error recovery>);
```
https://reviews.llvm.org/D32828
More information about the cfe-commits
mailing list