forked from swiftlang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cherry-pick stable/20230725] [Modules] textual headers in submodules…
… never resolve their `use`s llvm#69651 rdar://117227965
- Loading branch information
1 parent
8a19e13
commit 492c174
Showing
2 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// RUN: rm -rf %t | ||
// RUN: split-file %s %t | ||
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %t %t/no-undeclared-includes.c -verify | ||
|
||
//--- no-undeclared-includes.c | ||
// expected-no-diagnostics | ||
#include <assert.h> | ||
|
||
//--- assert.h | ||
#include <base.h> | ||
|
||
//--- base.h | ||
#ifndef base_h | ||
#define base_h | ||
|
||
|
||
|
||
#endif /* base_h */ | ||
|
||
//--- module.modulemap | ||
module cstd [system] [no_undeclared_includes] { | ||
use base | ||
module assert { | ||
textual header "assert.h" | ||
} | ||
} | ||
|
||
module base [system] { | ||
header "base.h" | ||
export * | ||
} |