[all-commits] [llvm/llvm-project] 101f57: [clang]: support std::meta::info for primitive typ...

Nhat Nguyen via All-commits all-commits at lists.llvm.org
Fri Oct 2 09:12:04 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 101f57538b5b751c1b2e96f1936217e0bec48287
      https://github.com/llvm/llvm-project/commit/101f57538b5b751c1b2e96f1936217e0bec48287
  Author: Nhat Nguyen <nhat7203 at gmail.com>
  Date:   2026-10-02 (Fri, 02 Oct 2026)

  Changed paths:
    M clang/include/clang/AST/APValue.h
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/AST/BuiltinTypes.def
    M clang/include/clang/AST/ExprCXX.h
    M clang/include/clang/AST/PropertiesBase.td
    A clang/include/clang/AST/Reflection.h
    M clang/include/clang/AST/TypeBase.h
    M clang/include/clang/Serialization/ASTBitCodes.h
    M clang/lib/AST/APValue.cpp
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/AST/ByteCode/Compiler.cpp
    M clang/lib/AST/ByteCode/Compiler.h
    M clang/lib/AST/ByteCode/Context.cpp
    M clang/lib/AST/ByteCode/Descriptor.cpp
    M clang/lib/AST/ByteCode/Disasm.cpp
    M clang/lib/AST/ByteCode/Interp.cpp
    M clang/lib/AST/ByteCode/Interp.h
    M clang/lib/AST/ByteCode/InterpBuiltinBitCast.cpp
    M clang/lib/AST/ByteCode/InterpStack.h
    M clang/lib/AST/ByteCode/InterpState.cpp
    M clang/lib/AST/ByteCode/Opcodes.td
    M clang/lib/AST/ByteCode/PrimType.cpp
    M clang/lib/AST/ByteCode/PrimType.h
    M clang/lib/AST/ByteCode/Program.cpp
    M clang/lib/AST/ByteCode/Program.h
    A clang/lib/AST/ByteCode/Reflect.h
    M clang/lib/AST/ExprCXX.cpp
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/MicrosoftMangle.cpp
    M clang/lib/AST/NSAPI.cpp
    M clang/lib/AST/StmtPrinter.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/AST/TextNodeDumper.cpp
    M clang/lib/AST/Type.cpp
    M clang/lib/AST/TypeLoc.cpp
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M clang/lib/CodeGen/CGExprConstant.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/CodeGenTypes.cpp
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/CodeGen/QualTypeMapper.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTCommon.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTReaderStmt.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp
    M clang/lib/UnifiedSymbolResolution/USRGeneration.cpp
    A clang/test/AST/ast-dump-APValue-reflection.cpp
    A clang/test/CodeGenCXX/reflection-emit-meta-info-itanium.cpp
    A clang/test/CodeGenCXX/reflection-emit-meta-info-ms.cpp
    M clang/test/CodeGenCXX/reflection-mangle-itanium.cpp
    R clang/test/CodeGenCXX/reflection-mangle-ms.cpp
    A clang/test/PCH/reflection.cpp
    A clang/test/PCH/reflection_include.h
    A clang/test/Sema/reflection-meta-info.fail.cpp
    A clang/test/Sema/reflection-meta-info.pass.cpp
    M clang/tools/libclang/CIndex.cpp
    M clang/unittests/AST/ASTImporterTest.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

  Log Message:
  -----------
  [clang]: support std::meta::info for primitive types (#190356)

This PR introduces std::meta::info type for reflection on primitive
types, as parsing right now only supports primitive types. This
implementation is based on the fork of @katzdm

For constant evaluation of std::meta::info, a new kind `Reflection` is
introduced in APValue::ValueKind.
For reflection mangling, the convention proposed in this issue is
applied - https://github.com/itanium-cxx-abi/cxx-abi/issues/208

Godbolt links: 

Basic tests checked against gcc and clang fork:
https://godbolt.org/z/cj44oWcef
Expected fail tests checked against gcc and clang fork:
https://godbolt.org/z/d8aha3E63
Checked against gcc for mangling output: https://godbolt.org/z/bhb5YEY99



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list