This repository is a fork of LLVM's llvm-project
repository, created to host a fork of the
clang compiler front-end implementing experimental support for ISO C++
proposal P2996 ("Reflection for C++26"). Support for a handful of
related proposals is also implemented (P1036 ("Expansion Statements"),
P3096 ("Function Parameter Reflection in Reflection for C++26"),
P3394 ("Annotations for Reflection"),
P3491 ("define_static_{string,object,array}
")), which can be enabled
with the -freflection-latest
flag. Development primarily
takes place on the p2996 branch; you can
learn more about this fork in our project documentation.
P2996, and the proposals listed above, were adopted into C++26 during the 2025 Sofia meeting of WG21. Although this fork remains the most complete existing implementation of P2996 as of June 2025, we expect for the development of production-grade implementations in upstream compilers to soon begin. With the caveat that this implementation of P2996 is and always has been experimental (and often made choices in the name of expediency, or easier merge conflict resolution, than would be made by an upstream implementation), the contributors to this fork hope that it may serve as a starting point for would-be implementers of P2996 in the upstream LLVM project.
The Clang/P2996 fork is highly experimental; sharp edges abound and occasional crashes should be expected. Memory usage has not been optimized and is, in many cases, wasteful. DO NOT use this project to build any artifacts destined for production.