I had a go at writing a test for this (attached). However... my test fails
both with and without your change.
On Thu, Oct 31, 2013 at 6:22 PM, Richard Smith <[email protected]>wrote:
> On Thu, Oct 31, 2013 at 5:39 PM, Dmitri Gribenko <[email protected]>wrote:
>
>> On Thu, Oct 31, 2013 at 5:33 PM, Richard Smith <[email protected]>
>> wrote:
>> > Please add a testcase!
>>
>> Sorry, I don't think this is feasible -- the testcase will involve a
>> mock of this whole huge module structure. Offline Doug OK'ed
>> committing this without a testcase.
>
>
> Could you test this by adding relevant (empty) modules to
> test/Modules/Inputs/module.map and maybe one extra header?
>
Index: Inputs/recursive_visibility_a.h
===================================================================
--- Inputs/recursive_visibility_a.h (revision 0)
+++ Inputs/recursive_visibility_a.h (revision 0)
@@ -0,0 +1,4 @@
+namespace N {
+ struct X {};
+ void f(X);
+}
Index: Inputs/recursive_visibility_c.h
===================================================================
--- Inputs/recursive_visibility_c.h (revision 0)
+++ Inputs/recursive_visibility_c.h (revision 0)
@@ -0,0 +1,4 @@
+@import recursive_visibility_b;
+template<template<typename T> class Y> void g() {
+ f(typename Y<N::X>::type{});
+}
Index: Inputs/module.map
===================================================================
--- Inputs/module.map (revision 193848)
+++ Inputs/module.map (working copy)
@@ -263,3 +263,14 @@
module a { header "using-decl-a.h" export * }
module b { header "using-decl-b.h" export * }
}
+
+module recursive_visibility_a {
+ module inner { header "recursive_visibility_a.h" }
+}
+module recursive_visibility_b {
+ header "recursive_visibility_b.h"
+ export *
+}
+module recursive_visibility_c {
+ header "recursive_visibility_c.h"
+}
Index: Inputs/recursive_visibility_b.h
===================================================================
--- Inputs/recursive_visibility_b.h (revision 0)
+++ Inputs/recursive_visibility_b.h (revision 0)
@@ -0,0 +1 @@
+@import recursive_visibility_a;
Index: recursive_visibility.mm
===================================================================
--- recursive_visibility.mm (revision 0)
+++ recursive_visibility.mm (revision 0)
@@ -0,0 +1,9 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
+
+// expected-no-diagnostics
+
+@import recursive_visibility_c;
+
+template<typename T> struct Z { typedef T type; };
+template void g<Z>();
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits