diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -127,6 +127,9 @@ Removed Compiler Flags ------------------------- +* ``-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang`` has been removed. + It has not been needed to enable ``-ftrivial-auto-var-init=zero`` since Clang 16. + Attribute Changes in Clang -------------------------- - On X86, a warning is now emitted if a function with ``__attribute__((no_caller_saved_registers))`` diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -272,12 +272,6 @@ def mmpx : Flag<["-"], "mmpx">, Group; def mno_mpx : Flag<["-"], "mno-mpx">, Group; -// Retired with clang-16.0, to provide a deprecation period; it should -// be removed in Clang 18 or later. -def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">, - Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option, CLOption]>, - Group; - // Group that ignores all gcc optimizations that won't be implemented def clang_ignored_gcc_optimization_f_Group : OptionGroup< "">, Group, Flags<[Ignored]>; diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/test/Driver/clang_f_opts.c @@ -563,12 +563,9 @@ // RUN: %clang -### -S -ftrivial-auto-var-init=uninitialized %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-UNINIT %s // RUN: %clang -### -S -ftrivial-auto-var-init=pattern %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN %s // RUN: %clang -### -S -ftrivial-auto-var-init=zero %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO %s -// RUN: %clang -### -S -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang \ -// RUN: -ftrivial-auto-var-init=zero %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-ENABLE-DEPRECATED %s // CHECK-TRIVIAL-UNINIT-NOT: hasn't been enabled // CHECK-TRIVIAL-PATTERN-NOT: hasn't been enabled // CHECK-TRIVIAL-ZERO-NOT: hasn't been enabled -// CHECK-TRIVIAL-ZERO-ENABLE-DEPRECATED: has been deprecated // RUN: %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER %s // RUN: %clang -### -S -ftrivial-auto-var-init=zero -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER %s