[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:03:35 PDT 2022
void added inline comments.
================
Comment at: clang/include/clang/Driver/Options.td:1155
+ NormalizedValuesScope<"LangOptions::StrictFlexArraysLevelKind">,
+ NormalizedValues<["Default", "OneZeroOrIncomplete", "ZeroOrIncomplete", "Incomplete"]>,
HelpText<"Enable optimizations based on the strict definition of flexible arrays">,
----------------
serge-sans-paille wrote:
> Note that this depends on https://reviews.llvm.org/D134902 to have the "Incomplete" support.
Would it be better to remove `Incomplete` until that is approved?
================
Comment at: clang/lib/StaticAnalyzer/Core/MemRegion.cpp:799
+ const FAMKind StrictFlexArraysLevel =
+ getContext().getLangOpts().getStrictFlexArraysLevel();
+ if (StrictFlexArraysLevel == FAMKind::ZeroOrIncomplete ||
----------------
steakhal wrote:
>
Doh! Thanks.
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