Skip to content

cppfly: add Clang reflection row when upstream lands P2996 #215

Description

@Sunrisepeak

触发条件

上游 Clang(非 Bloomberg fork)落地 C++26 反射 P2996。截至 2026-07:上游 Clang 22/23 均无(cxx_status 反射行全 No,Clang 23 仅 expansion statements partial);已落地的只有 GCC 16(-freflection)与 bloomberg/clang-p2996 fork(-freflection/-freflection-latest)。

触发后要做的(即"加一行")

src/toolchain/cppfly.cppmkReflectionRules 表加一行:

constexpr GateRule kReflectionRules[] = {
    { CompilerId::GCC,   16, "-freflection" },
    { CompilerId::Clang, <落地的主版本>, "<clang 的实际旗标拼写>" },  // ← 新行
};

随后:test_cppfly.cppResolveClangLibcxx 断言改为反射 enabled;e2e 101_cppfly_llvm_soft.shskipped: reflection 断言按 llvm payload 版本条件化。全生态即通过 standard = "c++fly" 在 Clang 上获得反射,用户 manifest 零改动。

注意:版本号与旗标拼写必须落地后实机核实(本仓惯例:-fsyntax-only + 特性宏探测,参考 GCC16 契约定案过程,设计文档 §11-Q3),不要提前臆测入表。

替代/并行路径(独立决策)

把 clang-p2996 fork 打包进 mcpp 工具链生态(如 llvm-p2996@x),表里即可加该族行,不必等上游。属独立打包工作,不阻塞本 issue。

关联:#214.agents/docs/2026-07-14-std-features-experimental-gate-design.md §10。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions