[PATCH] D23385: Implement __attribute__((require_constant_initialization)) for safe static initialization.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 14 13:33:16 PDT 2016


EricWF updated this revision to Diff 67986.
EricWF marked an inline comment as done.
EricWF added a comment.

Get all tests passing regarding duplicate warnings between `__attribute__((requires_constant_initialization))` and `-Wglobal-constructors`. The warning will not emit a duplicate warning about global constructors, but it will still warn if the variable has a global destructor, which make sense to me.

I believe this is ready to go and I have addressed all concerns.


https://reviews.llvm.org/D23385

Files:
  include/clang/Basic/Attr.td
  include/clang/Basic/AttrDocs.td
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/AttributeList.h
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaDeclAttr.cpp
  test/SemaCXX/attr-require-constant-initialization.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23385.67986.patch
Type: text/x-patch
Size: 19999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160814/c13144c2/attachment-0001.bin>


More information about the cfe-commits mailing list