brintos

brintos / llvm-project-archived public Read only

0
0
Text · 629 B · fada031 Raw
28 lines · cpp
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: %clang_cc1 -I %t/include -fmodules -fimplicit-module-maps \4// RUN:   -fmodules-cache-path=%t/cache -fsyntax-only %t/tu.c5 6//--- include/module.modulemap7module A [no_undeclared_includes] { textual header "A.h" }8module B { header "B.h" }9 10//--- include/A.h11#if __has_include(<B.h>)12#error B.h should not be available from A.h.13#endif14 15//--- include/B.h16// This file intentionally left blank.17 18//--- tu.c19#if !__has_include(<B.h>)20#error B.h should be available from tu.c.21#endif22 23#include "A.h"24 25#if !__has_include(<B.h>)26#error B.h should still be available from tu.c.27#endif28