| 1 | // RUN: %clang_cc1 -std=c++17 -fmodules-ts -verify %s -DFOO=export -DBAR=export |
| 2 | // RUN: %clang_cc1 -std=c++17 -fmodules-ts -verify %s -DFOO=export -DBAR= |
| 3 | // RUN: %clang_cc1 -std=c++17 -fmodules-ts %s -DFOO=export -emit-module-interface -o %t |
| 4 | // RUN: %clang_cc1 -std=c++17 -fmodules-ts %s -fmodule-file=%t -DFOO= |
| 5 | // RUN: %clang_cc1 -std=c++17 -fmodules-ts %s -fmodule-file=%t -DBAR=export |
| 6 | // RUN: %clang_cc1 -std=c++17 -fmodules-ts -verify %s -fmodule-file=%t -DFOO= -DBAR=export |
| 7 | |
| 8 | #ifdef FOO |
| 9 | FOO module foo; // expected-note {{previous module declaration is here}} |
| 10 | #endif |
| 11 | |
| 12 | #ifdef BAR |
| 13 | BAR module bar; // expected-error {{translation unit contains multiple module declarations}} |
| 14 | #endif |
| 15 | |