3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/x.cppm -o %t/x.pcm
6 // RUN: %clang_cc1 -std=c++20 -emit-module-interface -fmodule-file=x=%t/x.pcm %t/x.y.cppm -o %t/x.y.pcm
7 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.b.cppm -o %t/a.b.pcm
9 // RUN: %clang_cc1 -std=c++20 -I%t -fmodule-file=x.y=%t/x.y.pcm -fmodule-file=x=%t/x.pcm -verify %t/test.cpp \
10 // RUN: -DMODULE_NAME=z -DINTERFACE
11 // RUN: %clang_cc1 -std=c++20 -I%t -fmodule-file=x.y=%t/x.y.pcm -fmodule-file=x=%t/x.pcm \
12 // RUN: -fmodule-file=a.b=%t/a.b.pcm -verify %t/test.cpp -DMODULE_NAME=a.b
13 // RUN: %clang_cc1 -std=c++20 -I%t -fmodule-file=x.y=%t/x.y.pcm -fmodule-file=x=%t/x.pcm -verify %t/test.x.cpp
33 // There is no relation between module x and module x.y.
34 int use_3 = c; // expected-error {{use of undeclared identifier 'c'}}
38 export module MODULE_NAME;
46 import x [[foo]]; // expected-warning {{unknown attribute 'foo' ignored}}
47 import x [[noreturn]]; // expected-error {{'noreturn' attribute cannot be applied to a module import}}
48 import x [[blarg::noreturn]]; // expected-warning {{unknown attribute 'noreturn' ignored}}
51 import x.; // expected-error {{expected a module name after 'import'}}
52 import .x; // expected-error {{expected a module name after 'import'}}
54 import blarg; // expected-error {{module 'blarg' not found}}