llvm/llvm-project

[C++20] [Modules] Support attributes on module declarations

Open

#159 225 ouverte le 17 sept. 2025

Voir sur GitHub
 (3 commentaires) (0 réactions) (1 assigné)C++ (10 782 forks)batch import
clang:moduleshelp wanted

Métriques du dépôt

Stars
 (26 378 stars)
Métriques de merge PR
 (Merge moyen 1j 2h) (1 000 PRs mergées en 30 j)

Description

The language allows we have attributes on module declarations, e.g.,

export module module_name [[attribute]];

Although we don't have any attribute right now, we will have. It will be good to have some basic support for this. So that we can add new attribute easily like we do for class or functions.

To implement this, I think the most simple way is to store the attributes in the clang::Module class. The other option may be to create a ModuleDecl class or add this to TranslationUnitDecl (as module units are basically translation unit.)

Guide contributeur