[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

Bill Wendling via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 13:01:17 PDT 2022


void added inline comments.


================
Comment at: clang/include/clang/Basic/LangOptions.h:369-376
+    /// Any trailing array memeber is a FAM.
+    Default = 0,
+    /// Any trailing array member of undefined, 0, or 1 size is a FAM.
+    OneZeroOrIncomplete = 1,
+    /// Any trailing array member of undefined or 0 is a FAM.
+    ZeroOrIncomplete = 2,
+    /// Any trailing array member of undefined or 0 is a FAM.
----------------
steakhal wrote:
> serge-sans-paille wrote:
> > typo: member
> For most cases, I can either see no initializers or only the first entry is being initialized.
> I believe, by default, the entries would be initialized to `0`, `1`, and `2` here anyway.
I wanted to be explicit with the numbering, because it corresponds with the value specified with `-fstrict-flex-arrays=<n>`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135107



More information about the cfe-commits mailing list