3 // RUN: split-file %s %t
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 -fmodule-file=mod1=%t/mod1.pcm \
7 // RUN: -fsyntax-only -verify
9 // RUN: %clang_cc1 -std=c++20 %t/mod3.cppm -emit-module-interface -o %t/mod3.pcm
10 // RUN: %clang_cc1 -std=c++20 %t/mod4.cppm -fmodule-file=mod3=%t/mod3.pcm \
11 // RUN: -fsyntax-only -verify
13 // Testing the behavior of `-fskip-odr-check-in-gmf`
14 // RUN: %clang_cc1 -std=c++20 %t/mod3.cppm -fskip-odr-check-in-gmf \
15 // RUN: -emit-module-interface -o %t/mod3.pcm
16 // RUN: %clang_cc1 -std=c++20 %t/mod4.cppm -fmodule-file=mod3=%t/mod3.pcm \
17 // RUN: -fskip-odr-check-in-gmf -DSKIP_ODR_CHECK_IN_GMF -fsyntax-only -verify
22 typedef unsigned int size_t;
32 enum class align_val_t : size_t {};
40 export using std::align_val_t;
43 // expected-no-diagnostics
50 export using std::align_val_t;
53 // Test that we can still find the case if the underlying type is different
55 typedef signed int size_t;
63 export using std::align_val_t;
67 #include "signed_size_t.h"
72 export using std::align_val_t;
74 #ifdef SKIP_ODR_CHECK_IN_GMF
75 // expected-no-diagnostics
77 // expected-error@align.h:* {{'std::align_val_t' has different definitions in different modules; defined here first difference is enum with specified type 'size_t' (aka 'int')}}
78 // expected-note@align.h:* {{but in 'mod3.<global>' found enum with specified type 'size_t' (aka 'unsigned int')}}