| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: split-file %s %t |
| 3 |
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %t %t/no-undeclared-includes.c -verify |
| 4 |
|
| 5 |
//--- no-undeclared-includes.c |
| 6 |
// expected-no-diagnostics |
| 7 |
#include <assert.h> |
| 8 |
|
| 9 |
//--- assert.h |
| 10 |
#include <base.h> |
| 11 |
|
| 12 |
//--- base.h |
| 13 |
#ifndef base_h |
| 14 |
#define base_h |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#endif /* base_h */ |
| 19 |
|
| 20 |
//--- module.modulemap |
| 21 |
module cstd [system] [no_undeclared_includes] { |
| 22 |
use base |
| 23 |
module assert { |
| 24 |
textual header "assert.h" |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
module base [system] { |
| 29 |
header "base.h" |
| 30 |
export * |
| 31 |
} |