[PATCH] D124221: Add new builtin __builtin_reflect_struct.
    Richard Smith - zygoloid via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Apr 21 17:52:01 PDT 2022
    
    
  
rsmith created this revision.
rsmith added reviewers: aaron.ballman, erichkeane, yihanaa.
Herald added a project: All.
rsmith requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This builtin, like __builtin_dump_struct, allows for limited
introspection into a struct value. Unlike __builtin_dump_struct, it
makes no assumption that you want to pass the value to printf, and
instead provides a general interface that can be used for any kind of
introspection.
This builtin is supported during constant evaluation. It's also
permitted in C, but not particularly usable there.
Repository:
  rG LLVM Github Monorepo
https://reviews.llvm.org/D124221
Files:
  clang/docs/LanguageExtensions.rst
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Basic/Builtins.def
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/AST/Expr.cpp
  clang/lib/Sema/SemaChecking.cpp
  clang/lib/Sema/SemaStmt.cpp
  clang/test/CodeGenCXX/builtin-reflect-struct.cpp
  clang/test/SemaCXX/builtin-reflect-struct.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124221.424347.patch
Type: text/x-patch
Size: 16675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220422/a2038f7b/attachment-0001.bin>
    
    
More information about the cfe-commits
mailing list