clang/test/CXX/basic/basic.link/p2.cpp
raw| 1 | // RUN: %clang_cc1 -std=c++2a -DEXPORT %s -verify |
| 2 | // RUN: %clang_cc1 -std=c++2a -DEXPORT %s -emit-module-interface -o %t.pcm |
| 3 | // RUN: %clang_cc1 -std=c++2a -UEXPORT %s -verify -fmodule-file=M=%t.pcm |
| 4 | |
| 5 | #ifdef EXPORT |
| 6 | // expected-no-diagnostics |
| 7 | export |
| 8 | #else |
| 9 | // expected-note@+2 {{add 'export' here}} |
| 10 | #endif |
| 11 | module M; |
| 12 | |
| 13 | #ifndef EXPORT |
| 14 | // expected-error@+2 {{private module fragment in module implementation unit}} |
| 15 | #endif |
| 16 | module :private; |