1 // RUN: %clang_cc1 -fsyntax-only \
2 // RUN: -fno-signed-char \
3 // RUN: -Wtautological-unsigned-zero-compare \
4 // RUN: -Wtautological-unsigned-char-zero-compare \
5 // RUN: -verify=unsigned %s
6 // RUN: %clang_cc1 -fsyntax-only \
7 // RUN: -Wtautological-unsigned-zero-compare \
8 // RUN: -Wtautological-unsigned-char-zero-compare \
9 // RUN: -verify=signed %s
11 void f(char c
, unsigned char uc
, signed char cc
) {
14 // unsigned-warning@-2 {{comparison of char expression < 0 is always false, since char is interpreted as unsigned}}
17 // unsigned-warning@-2 {{comparison of unsigned expression < 0 is always false}}
18 // signed-warning@-3 {{comparison of unsigned expression < 0 is always false}}
21 // Promoted to integer expressions should not warn.
26 void ref(char &c
, unsigned char &uc
, signed char &cc
) {
29 // unsigned-warning@-2 {{comparison of char expression < 0 is always false, since char is interpreted as unsigned}}
32 // unsigned-warning@-2 {{comparison of unsigned expression < 0 is always false}}
33 // signed-warning@-3 {{comparison of unsigned expression < 0 is always false}}
36 // Promoted to integer expressions should not warn.