1// RUN: rm -rf %t 2// RUN: mkdir -p %t 3// RUN: split-file %s %t 4// 5// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm 6// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-module-interface -o %t/b.pcm \ 7// RUN: -fprebuilt-module-path=%t 8// RUN: %clang_cc1 -std=c++20 %t/test.cc -fsyntax-only -verify \ 9// RUN: -fprebuilt-module-path=%t 10 11//--- foo.h 12inline auto x = []{}; 13 14//--- a.cppm 15module; 16#include "foo.h" 17export module a; 18export using ::x; 19 20//--- b.cppm 21module; 22import a; 23#include "foo.h" 24export module b; 25export using ::x; 26 27//--- test.cc 28// expected-no-diagnostics 29import a; 30import b; 31void test() { 32 x(); 33} 34