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/mod1.cppm -emit-module-interface -o %t/mod1.pcm 6// RUN: %clang_cc1 -std=c++20 %t/mod2.cppm -emit-module-interface -o %t/mod2.pcm 7// RUN: %clang_cc1 -std=c++20 %t/test.cpp -fprebuilt-module-path=%t -verify -fsyntax-only 8 9//--- size_t.h 10 11extern "C" { 12 typedef unsigned int size_t; 13} 14 15//--- csize_t 16namespace std { 17 using :: size_t; 18} 19 20//--- align.h 21namespace std { 22 enum class align_val_t : size_t {}; 23} 24 25//--- mod1.cppm 26module; 27#include "size_t.h" 28#include "align.h" 29export module mod1; 30namespace std { 31export using std::align_val_t; 32} 33 34//--- mod2.cppm 35module; 36#include "size_t.h" 37#include "csize_t" 38#include "align.h" 39export module mod2; 40namespace std { 41export using std::align_val_t; 42} 43 44//--- test.cpp 45// expected-no-diagnostics 46import mod1; 47import mod2; 48void test() { 49 std::align_val_t v; 50} 51 52