Author: serge-sans-paille
Date: 2025-05-04T08:17:51Z
New Revision: f35e172833f1bdd502e2847e13c3a58430bc654b

URL: 
https://github.com/llvm/llvm-project/commit/f35e172833f1bdd502e2847e13c3a58430bc654b
DIFF: 
https://github.com/llvm/llvm-project/commit/f35e172833f1bdd502e2847e13c3a58430bc654b.diff

LOG: [clang] Document -fstrict-flex-arrays option (#138388)

Fix #138185

Added: 
    

Modified: 
    clang/include/clang/Driver/Options.td

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Driver/Options.td 
b/clang/include/clang/Driver/Options.td
index 2946ffaa28da0..11677626dbf1f 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -1554,7 +1554,11 @@ def fstrict_flex_arrays_EQ : Joined<["-"], 
"fstrict-flex-arrays=">, Group<f_Grou
   Visibility<[ClangOption, CC1Option]>,
   NormalizedValuesScope<"LangOptions::StrictFlexArraysLevelKind">,
   NormalizedValues<["Default", "OneZeroOrIncomplete", "ZeroOrIncomplete", 
"IncompleteOnly"]>,
-  HelpText<"Enable optimizations based on the strict definition of flexible 
arrays">,
+  HelpText<"Enable optimizations based on the strict definition of flexible 
arrays.">,
+  DocBrief<[{If ``<n>`` is equal to 0, any trailing array member is considered 
a flexible array.
+             If ``<n>`` is equal to 1, trailing array members of size 0, 1 or 
undefined are considered flexible arrays.
+             If ``<n>`` is equal to 2, trailing array members of size 0 or 
undefined are considered flexible arrays.
+             If ``<n>`` is equal to 3, only trailing array members of 
undefined size are considered flexible arrays.}]>,
   MarshallingInfoEnum<LangOpts<"StrictFlexArraysLevel">, "Default">;
 defm apple_pragma_pack : BoolFOption<"apple-pragma-pack",
   LangOpts<"ApplePragmaPack">, DefaultFalse,


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

Reply via email to