reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | // RUN: rm -rf %t // RUN: mkdir %t // RUN: echo 'struct tm;' > %t/a.h // RUN: echo 'struct X {}; void foo(struct tm*);' > %t/b.h // RUN: echo 'module X { module a { header "a.h" } module b { header "b.h" } }' > %t/x.modulemap // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x c++ -fmodule-map-file=%t/x.modulemap %s -I%t -verify -std=c++11 // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x c++ -fmodule-map-file=%t/x.modulemap %s -I%t -verify -fmodules-local-submodule-visibility -std=c++11 #include "a.h" using ::tm; struct A { // This use of 'struct X' makes the declaration (but not definition) of X visible. virtual void f(struct X *p); }; namespace N { struct B : A { void f(struct X *q) override; }; } X x; // expected-error {{definition of 'X' must be imported from module 'X.b' before it is required}} // [email protected]:1 {{here}} |