[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 9 10:01:13 PDT 2022


aaron.ballman added a comment.

Also, you should definitely add some release notes for this change.



================
Comment at: clang/include/clang/Driver/Options.td:2700-2701
   MarshallingInfoEnum<LangOpts<"TrivialAutoVarInit">, "Uninitialized">;
 def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">,
-  Flags<[CC1Option, CoreOption, NoArgumentUnused]>,
-  HelpText<"Trivial automatic variable initialization to zero is only here for benchmarks, it'll eventually be removed, and I'm OK with that because I'm only using it to benchmark">;
+  Flags<[CC1Option, CoreOption, Ignored]>;
 def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>,
----------------
We might as well comment on when we expect to remove it; I took a stab in the dark and figured two releases of deprecation should be enough for most folks (so it's deprecated in Clang 15 and 16, then removed in Clang 17).

I don't think we want this option to be ignored though; I think we still want to accept the option, but then be loud about it being deprecated when translating it to `-ftrivial-auto-var-init=zero`. You can emit `diag::warn_drv_deprecated_arg` for the diagnostic.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125142



More information about the cfe-commits mailing list