1 // Check that Wsystem-headers-in-module shows diagnostics in the named system 2 // module, but not in other system headers or modules. 3 4 // RUN: rm -rf %t 5 // RUN: split-file %s %t 6 7 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/mcp \ 8 // RUN: -isystem %t/sys %t/tu.c -fsyntax-only -Wextra-semi -Wsystem-headers-in-module=sys_mod \ 9 // RUN: 2>&1 | FileCheck %s 10 11 // CHECK-NOT: warning: 12 // CHECK: sys_mod.h:2:7: warning: extra ';' 13 // CHECK-NOT: warning: 14 15 //--- sys/other_sys_header.h 16 int x;; 17 //--- sys_mod.h 18 #include "dependent_sys_mod.h" 19 int y;; 20 //--- other_sys_mod.h 21 int z;; 22 //--- dependent_sys_mod.h 23 int w;; 24 //--- module.modulemap 25 module sys_mod [system] { header "sys_mod.h" } 26 module other_sys_mod [system] { header "other_sys_mod.h" } 27 module dependent_sys_mod [system] { header "dependent_sys_mod.h" } 28 29 //--- tu.c 30 #include "sys_mod.h" 31 #include "other_sys_mod.h" 32 #include "other_sys_header.h" 33