llvm / llvm/llvm-project

Framework modules cannot have textual headers in umbrella directories

Open
#164,029 1 comment 0 reactions 0 assignees View on GitHub
clang:modules
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Given:

```
framework module FW {
umbrella "Headers"
module * { export * }
textual header "ignore.h"
}
```

Where the framework’s `Headers` directory contains `ignore.h` and other headers. Clang will still include `ignore.h` in the `` buffer. Non-framework modules do not have this issue.

This causes problems when other parts of the framework include `ignore.h`, as you can get duplicate definitions.

This may be caused by framework modules having more complicated semantics around the module directory. `header` decls are relative to the `Headers` directory, but `umbrella "Headers"` is relative to the framework directory.

Encountered as part of https://github.com/llvm/llvm-project/issues/158249

[testcase.zip](https://github.com/user-attachments/files/22980814/testcase.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.