[PATCH] D64380: Add 'require_designated_init' and 'required' attribute to clang

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 09:51:26 PDT 2019


compnerd added inline comments.


================
Comment at: clang/include/clang/Basic/Attr.td:1948
+def RequiresDesignator : InheritableAttr {
+  let Spellings = [Clang<"requires_designator">];
+  let Subjects = SubjectList<[Record]>;
----------------
aaron.ballman wrote:
> Hmm, after making this suggestion, I noticed that GCC seems to support a similar attribute named `designated_init` (https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#Common-Type-Attributes). Was your goal to support the same thing GCC supported?
`designated_init` is a suggestion, the original patch seemed to be a stronger version.  I think that we should be supporting the GNU spelling for `designated_init` and can support a Clang spelling of `requires_designated_init` if the goal is to have the stronger guarantee that this *must* happen.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64380/new/

https://reviews.llvm.org/D64380





More information about the cfe-commits mailing list