[clang] [sema] Improve -Wsign-compare (PR #65684)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 8 08:37:23 PDT 2023


================
@@ -0,0 +1,129 @@
+// RUN: %clang_cc1 -fsyntax-only -Wsign-compare -Wno-unused-comparison -Wno-empty-body -Wno-unused-value -verify %s
+// RUN: cp %s %t
+// RUN: %clang_cc1 -fsyntax-only -Wsign-compare -fixit -x c %t 2> /dev/null
+// RUN: grep -v CHECK %t | FileCheck %s
+
+unsigned Uf(void);
+int Sf(void);
+
+void test(signed S, unsigned U) {
----------------
shafik wrote:

I would like to see what you do w/ the `-1L < 1U` case for both `-m32` and not.

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


More information about the cfe-commits mailing list