Author: Yi Kong Date: 2021-08-20T00:37:01+08:00 New Revision: ca6d5813d17598cd180995fb3bdfca00f364475f
URL: https://github.com/llvm/llvm-project/commit/ca6d5813d17598cd180995fb3bdfca00f364475f DIFF: https://github.com/llvm/llvm-project/commit/ca6d5813d17598cd180995fb3bdfca00f364475f.diff LOG: [clang] Do not warn unused -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang Android enables zero initialisation globally by default, but also allows subprojects to override with different option. Clang complains the above flag being unused in this case. Instead of adding a 75 char long -no-* flag, don't warn unused argument for this flag. Differential Revision: https://reviews.llvm.org/D108278 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 fd9ecd7394a01..a91dacb0ec348 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -2561,7 +2561,7 @@ def ftrivial_auto_var_init : Joined<["-"], "ftrivial-auto-var-init=">, Group<f_G NormalizedValues<["Uninitialized", "Zero", "Pattern"]>, 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]>, + 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">; def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits