[PATCH] D156337: [clang] Allow setting the uninitialized attribute on record

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 26 07:52:20 PDT 2023


serge-sans-paille created this revision.
serge-sans-paille added reviewers: jfb, aaron.ballman.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
serge-sans-paille requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This attribute would then affect all stack variables of that type, when the type has been evaluated as ok wrt. initialisation, or a for performance / security trade-offs.
An example of use could be container with preallocated storage like SmallVector, if we consider that it is too costly to initialize that storage.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156337

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/lib/CodeGen/CGDecl.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/test/CodeGenCXX/trivial-auto-var-init-attribute.cpp
  clang/test/Misc/pragma-attribute-supported-attributes-list.test
  clang/test/Sema/attr-uninitialized.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156337.544368.patch
Type: text/x-patch
Size: 5769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230726/29c95876/attachment-0001.bin>


More information about the cfe-commits mailing list