28 lines · c
1// RUN: rm -rf %t2// RUN: split-file %s %t3 4// RUN: %clang_cc1 -emit-module -x c -fmodules -I %t/Inputs -fmodule-name=aa %t/Inputs/module.modulemap -o %t/aa.pcm5// RUN: rm %t/Inputs/b.h6// RUN: not %clang_cc1 -E -fmodules -I %t/Inputs -fmodule-file=%t/aa.pcm %s -o - -fallow-pcm-with-compiler-errors 2>&1 | FileCheck %s7 8//--- Inputs/module.modulemap9module aa {10 header "a.h"11 header "b.h"12}13 14//--- Inputs/a.h15#define TEST(x) x16 17//--- Inputs/b.h18#define SUB "mypragma"19 20//--- test.c21#include "a.h"22 23_Pragma(SUB);24int a = TEST(SUB);25 26// CHECK: int a27// CHECK: 1 error generated28