| 1 |
// { dg-additional-options "-fmodules-ts -fdump-lang-module-graph-blocks" } |
| 2 |
// injection followed by declaration |
| 3 |
|
| 4 |
export module foo; |
| 5 |
// { dg-module-cmi foo } |
| 6 |
|
| 7 |
template <typename T> class TPL |
| 8 |
{ |
| 9 |
friend void foo (T, void *); // { dg-warning "non-template function" } |
| 10 |
|
| 11 |
T member; |
| 12 |
}; |
| 13 |
|
| 14 |
template class TPL<int>; // instantiate |
| 15 |
|
| 16 |
void foo (int, void *); |
| 17 |
|
| 18 |
// { dg-final { scan-lang-dump {Cluster members:\n \[0\]=decl definition '::template TPL'\n( \[.\]=[^\n]*'\n)* \[.\]=decl declaration '::template foo'\n( \[.\]=[^\n]*'\n)* \[.\]=binding '::TPL'} module } } |
| 19 |
// { dg-final { scan-lang-dump {Cluster members:\n \[0\]=decl declaration '::foo'\n \[.\]=binding '::foo'} module } } |
| 20 |
// { dg-final { scan-lang-dump {Cluster members:\n \[0\]=specialization definition '::TPL<int>'} module } } |