steakhal added a comment.

The StaticAnalyzer changes seem to be correct.



================
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.
----------------
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.


================
Comment at: clang/lib/StaticAnalyzer/Core/MemRegion.cpp:799
+        const FAMKind StrictFlexArraysLevel =
+          getContext().getLangOpts().getStrictFlexArraysLevel();
+        if (StrictFlexArraysLevel == FAMKind::ZeroOrIncomplete ||
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135107

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to