nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land.
It looks like clang still produces meaningful diagnostics from `-Wuninitialized` and `-Wsometimes-uninitialized` even with `-ftrivial-auto-var-init=zero`. Same for `[clang-diagnostic-sometimes-uninitialized]`, `[clang-analyzer-core.uninitialized.UndefReturn]`, and `[clang-diagnostic-uninitialized]`. Looks like GCC now even does a better job with `-Wuninitialized` on void init (int *x) {} int x (int z) { int y; init(&y); return y; } ================ Comment at: clang/test/Driver/clang_f_opts.c:573 +// RUN: %clang -### -S -ftrivial-auto-var-init=zero %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO %s +// RUN: %clang -### -S -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-UNUSED %s // CHECK-TRIVIAL-UNINIT-NOT: hasn't been enabled ---------------- consider breaking long run lines into 2 with `\`. Example: ``` // RUN: %clang -### ... -S \ // RUN: -ftrivial-auto-var-init=zero ... ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125142/new/ https://reviews.llvm.org/D125142 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits