r193815 - Clang modules: collect exports recursively
Dmitri Gribenko
gribozavr at gmail.com
Fri Nov 1 18:47:30 PDT 2013
On Thu, Oct 31, 2013 at 6:47 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> I had a go at writing a test for this (attached). However... my test fails
> both with and without your change.
Indeed. Seems like it fails because:
- recursive_visibility_a.inner is not imported (only recursive_visibility_a is),
- thus the 'inner' submodule is not showing up in any of the import lists,
- and because of this getExportedModules() is not returning the
correct module set -- it only considers modules that are imported.
Should it also add the immediate exported submodules to the list,
along with re-exported modules? I'm not sure about the best way to
implement this.
Also, I think using ADL in templates is a very indirect way of testing
this (although, I should admit, a real-life way of testing). I
thought it would be useful to have a tool that dumps the visibility
sets for modules imported in a given TU (possibly explaining why a
certain module is visible). This would not only simplify debugging,
but would allow us to test this easily.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list