[clang] Carving out -Wformat warning about scoped enums into a subwarning (PR #88595)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 18 07:29:23 PDT 2024


================
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -Wformat %s
-// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -Wformat %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-pedantic %s
----------------
AaronBallman wrote:

We're missing a comparison between `-Wformat` and `-Wformat-pedantic` in terms of handling scoped enumerations. We should have a pair of RUN lines to show that this diagnostic is in pedantic only.

One thing that helps with testing this is to use something like `-verify=expected,pedantic` and `// pedantic-warning {{msg}}`: https://clang.llvm.org/docs/InternalsManual.html#verifying-diagnostics

https://github.com/llvm/llvm-project/pull/88595


More information about the cfe-commits mailing list