[clang] [clang]: support std::meta::info for primitive types (PR #190356)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 4 09:11:39 PDT 2026


================
@@ -701,6 +716,16 @@ class APValue {
     return ((const AddrLabelDiffData *)(const char *)&Data)->RHSExpr;
   }
 
+  const ReflectionKind getReflectionOperandKind() const {
+    assert(isReflection() && "Invalid accessor");
+    return ((const ReflectionData *)(const char *)&Data)->OperandKind;
+  }
+
+  const void* getOpaqueReflectionOperand() const {
----------------
tbaederr wrote:

All current getters are named "get" followed by what type of APValue they operate on, i.e. it's `getStructNumFields()`, not `getNumStructFields()`, even though the latter might sound better.

https://github.com/llvm/llvm-project/pull/190356


More information about the cfe-commits mailing list