llvm/llvm-project

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

Open

#159,225 创建于 2025年9月17日

在 GitHub 查看
 (3 评论) (0 反应) (1 负责人)C++ (10,782 fork)batch import
clang:moduleshelp wanted

仓库指标

Star
 (26,378 star)
PR 合并指标
 (平均合并 1天 2小时) (30 天内合并 1,000 个 PR)

描述

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.)

贡献者指南