[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed May 28 09:47:24 PDT 2025
================
@@ -0,0 +1,64 @@
+// RUN: %clang_cc1 %s -verify -Wimplicit-int-conversion
+// RUN: %clang_cc1 %s -verify -Wimplicit-int-conversion -Wno-implicit-int-conversion-on-negation -DNO_DIAG
+
+char test_char(char x) {
+ return -x;
+#ifndef NO_DIAG
+ // expected-warning at -2 {{implicit conversion loses integer precision}}
----------------
AaronBallman wrote:
Is this actually checking for the new diagnostic ("on negation")? If so, you should update the expected warning to include the whole diagnostic text.
https://github.com/llvm/llvm-project/pull/139429
More information about the cfe-commits
mailing list