[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2018-06-10 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood marked 2 inline comments as done. hamzasood added inline comments. Comment at: lib/Sema/SemaDecl.cpp:16185-16194 + if (getLangOpts().ModulesTS) { +Module *CurrentModule = getCurrentModule(); +assert(CurrentModule && "Expected to be in a module scope"); + +

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2018-06-10 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 150649. hamzasood added a comment. Addressed Richard's comments. https://reviews.llvm.org/D40443 Files: include/clang/Basic/Module.h lib/Basic/Module.cpp lib/Sema/SemaDecl.cpp test/CXX/modules-ts/basic/basic.def.odr/p6/module-vs-module.cpp

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2018-04-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:16135 +for (Module *ImportedModule : Mod->Imports) + VisibleModules.setVisible(ImportedModule, ModuleLoc); + } For completeness, you should also call

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-12-28 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added inline comments. Comment at: lib/Basic/Module.cpp:349 + // Everything visible to the interface unit's global module fragment is + // visible to the interface unit. boris wrote: > This comment (not sure about the code) sounds wrong to me:

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-12-28 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. I don't think it will be wise for me to accept this revision since I can't claim to have good understanding of Clang's internal modules model. I think it will be wise to have Richard take a look. Comment at: lib/Basic/Module.cpp:349 + // Everything

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-12-28 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 128284. hamzasood added a comment. I've been investigating an issue regarding visibility during code synthesis, and I noticed that this patch half fixes it. I've added the rest of the fix since it's related to what's going on here, and I guess this is now

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-12-21 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. Ping https://reviews.llvm.org/D40443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-11-24 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 124231. hamzasood added a comment. Good idea, I've added that to the test. I'll give Richard some time to look over this before committing. https://reviews.llvm.org/D40443 Files: lib/Sema/SemaDecl.cpp

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-11-24 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. LGTM. Maybe it makes sense to also test that an unrelated translation unit that imports module 'test' sees neither 'a' nor 'b'. https://reviews.llvm.org/D40443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-11-24 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood created this revision. This provides an implementation for the changes outlined in section 4.1 of P0731r0, which clarifies the intended behaviour regarding implementation units being able to see imports made within their corresponding interface unit. https://reviews.llvm.org/D40443