[clang] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)
Henrik G. Olsson via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 1 06:33:41 PDT 2023
================
@@ -4,7 +4,7 @@
// RUN: %clang_cc1 -std=c++20 %s -verify=cxx20,expected,reorder -Wno-c99-designator -Werror=reorder-init-list -Wno-initializer-overrides
// RUN: %clang_cc1 -std=c++20 %s -verify=cxx20,expected,override -Wno-c99-designator -Wno-reorder-init-list -Werror=initializer-overrides
// RUN: %clang_cc1 -std=c++20 %s -verify=cxx20,expected -Wno-c99-designator -Wno-reorder-init-list -Wno-initializer-overrides
-// RUN: %clang_cc1 -std=c++20 %s -verify=cxx20,expected,wmissing -Wmissing-field-initializers -Wno-c99-designator -Wno-reorder-init-list -Wno-initializer-overrides
+// RUN: %clang_cc1 -std=c++20 %s -verify=cxx20,expected,wmissing -Wmissing-field-initializers -Wno-c99-designator -Wno-reorder-init-list -Wno-initializer-overrides -D NON_PEDANTIC
----------------
hnrklssn wrote:
Imo it's clearer to unconditionally compile the same code for each test case, and instead introduce another `-verify` prefix for the diagnostics that aren't emitted by this invocation.
https://github.com/llvm/llvm-project/pull/70829
More information about the cfe-commits
mailing list