Skip to content

Framework modules cannot have textual headers in umbrella directories #164029

@Bigcheese

Description

@Bigcheese

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 <module-includes> 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 #158249

testcase.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:modulesC++20 modules and Clang Header Modules

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions