brintos

brintos / llvm-project-archived public Read only

0
0
Text · 922 B · b156d29 Raw
33 lines · c
1// Check that Wsystem-headers-in-module shows diagnostics in the named system2// module, but not in other system headers or modules.3 4// RUN: rm -rf %t5// RUN: split-file %s %t6 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 %s10 11// CHECK-NOT: warning:12// CHECK: sys_mod.h:2:7: warning: extra ';'13// CHECK-NOT: warning:14 15//--- sys/other_sys_header.h16int x;;17//--- sys_mod.h18#include "dependent_sys_mod.h"19int y;;20//--- other_sys_mod.h21int z;;22//--- dependent_sys_mod.h23int w;;24//--- module.modulemap25module sys_mod [system] { header "sys_mod.h" }26module other_sys_mod [system] { header "other_sys_mod.h" }27module dependent_sys_mod [system] { header "dependent_sys_mod.h" }28 29//--- tu.c30#include "sys_mod.h"31#include "other_sys_mod.h"32#include "other_sys_header.h"33