| // RUN: %clang_cc1 -std=c++20 %t/m1.cppm -emit-module-interface -o %t/m1.pcm |
| // RUN: %clang_cc1 -std=c++20 %t/m2.cppm -emit-module-interface -o %t/m2.pcm |
| // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/use.cc -fsyntax-only \ |
| // RUN: %clang_cc1 -std=c++20 %t/m1.cppm -Wall -emit-module-interface -o %t/m1.pcm |
| // RUN: %clang_cc1 -std=c++20 %t/m2.cppm -Wall -emit-module-interface -o %t/m2.pcm |
| // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/use.cc -fsyntax-only \ |
| // RUN: %clang_cc1 -std=c++20 %t/m1.cppm -Wdecls-in-multiple-modules -emit-module-interface -o %t/m1.pcm |
| // RUN: %clang_cc1 -std=c++20 %t/m2.cppm -Wdecls-in-multiple-modules -emit-module-interface -o %t/m2.pcm |
| // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/use.cc -fsyntax-only \ |
| // RUN: -verify -Wdecls-in-multiple-modules -DWARNING |
| // expected-no-diagnostics |
| // expected-warning@* {{declaration 'E' is detected to be defined in multiple module units}} |
| // expected-warning@* {{declaration 'foo' is detected to be defined in multiple module units}} |
| // expected-warning@* {{declaration 'a' is detected to be defined in multiple module units}} |
| // expected-warning@* {{declaration 'func' is detected to be defined in multiple module units}} |
| // expected-note@* 1+ {{}} |