diff options
| author | Volodymyr Sapsai <vsapsai@apple.com> | 2025-05-08 09:07:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-08 09:07:33 -0700 |
| commit | 64bb60a471a5ddc9c9bec413c65fdab730a1e4b0 (patch) | |
| tree | fd5ae4ba175adced3b705d90259dd3f8aaca0f66 /clang/test/Modules/Inputs/submodules/module.modulemap | |
| parent | 5b7ccdc2a29f3be4b01f0eadca8f52d5dcdd9846 (diff) | |
[Modules] Don't fail when an unused textual header is missing. (#138227)
According to the documentation
> A header declaration that does not contain `exclude` nor `textual`
specifies a header that contributes to the enclosing module.
Which means that `exclude` and `textual` header don't contribute to the
enclosing module and their presence isn't required to build such a
module. The keywords tell clang how a header should be treated in a
context of the module but they don't add headers to the module.
When a textual header *is* used, clang still emits "file not found"
error pointing to the location where the missing file is included.
Diffstat (limited to 'clang/test/Modules/Inputs/submodules/module.modulemap')
| -rw-r--r-- | clang/test/Modules/Inputs/submodules/module.modulemap | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/submodules/module.modulemap b/clang/test/Modules/Inputs/submodules/module.modulemap index 1c1b76a08969..9e8143b8101d 100644 --- a/clang/test/Modules/Inputs/submodules/module.modulemap +++ b/clang/test/Modules/Inputs/submodules/module.modulemap @@ -30,3 +30,7 @@ module missing_umbrella_with_inferred_submodules { module * { export * } export * } + +module missing_textual_header { + textual header "missing_textual.h" +} |
