diff options
author | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 056abd2059c65a3e908193aeae16fad98017437c (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/Sema/compare.c | |
parent | cc73504950eb7b5dff2dded9bedd67bc36d64641 (diff) | |
download | FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz |
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'test/Sema/compare.c')
-rw-r--r-- | test/Sema/compare.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/Sema/compare.c b/test/Sema/compare.c index 406ade8..b5d4ef5 100644 --- a/test/Sema/compare.c +++ b/test/Sema/compare.c @@ -93,8 +93,8 @@ int ints(long a, unsigned long b) { // (C,b) (C == (unsigned long) b) + (C == (unsigned int) b) + - (C == (unsigned short) b) + - (C == (unsigned char) b) + + (C == (unsigned short) b) + // expected-warning {{comparison of constant 65536 with expression of type 'unsigned short' is always false}} + (C == (unsigned char) b) + // expected-warning {{comparison of constant 65536 with expression of type 'unsigned char' is always false}} ((long) C == b) + ((int) C == b) + ((short) C == b) + @@ -105,8 +105,8 @@ int ints(long a, unsigned long b) { ((signed char) C == (unsigned char) b) + (C < (unsigned long) b) + (C < (unsigned int) b) + - (C < (unsigned short) b) + - (C < (unsigned char) b) + + (C < (unsigned short) b) + // expected-warning {{comparison of constant 65536 with expression of type 'unsigned short' is always false}} + (C < (unsigned char) b) + // expected-warning {{comparison of constant 65536 with expression of type 'unsigned char' is always false}} ((long) C < b) + ((int) C < b) + ((short) C < b) + @@ -123,8 +123,8 @@ int ints(long a, unsigned long b) { (a == (unsigned char) C) + ((long) a == C) + ((int) a == C) + - ((short) a == C) + - ((signed char) a == C) + + ((short) a == C) + // expected-warning {{comparison of constant 65536 with expression of type 'short' is always false}} + ((signed char) a == C) + // expected-warning {{comparison of constant 65536 with expression of type 'signed char' is always false}} ((long) a == (unsigned long) C) + ((int) a == (unsigned int) C) + ((short) a == (unsigned short) C) + @@ -135,8 +135,8 @@ int ints(long a, unsigned long b) { (a < (unsigned char) C) + ((long) a < C) + ((int) a < C) + - ((short) a < C) + - ((signed char) a < C) + + ((short) a < C) + // expected-warning {{comparison of constant 65536 with expression of type 'short' is always true}} + ((signed char) a < C) + // expected-warning {{comparison of constant 65536 with expression of type 'signed char' is always true}} ((long) a < (unsigned long) C) + // expected-warning {{comparison of integers of different signs}} ((int) a < (unsigned int) C) + // expected-warning {{comparison of integers of different signs}} ((short) a < (unsigned short) C) + @@ -145,8 +145,8 @@ int ints(long a, unsigned long b) { // (0x80000,b) (0x80000 == (unsigned long) b) + (0x80000 == (unsigned int) b) + - (0x80000 == (unsigned short) b) + - (0x80000 == (unsigned char) b) + + (0x80000 == (unsigned short) b) + // expected-warning {{comparison of constant 524288 with expression of type 'unsigned short' is always false}} + (0x80000 == (unsigned char) b) + // expected-warning {{comparison of constant 524288 with expression of type 'unsigned char' is always false}} ((long) 0x80000 == b) + ((int) 0x80000 == b) + ((short) 0x80000 == b) + @@ -157,8 +157,8 @@ int ints(long a, unsigned long b) { ((signed char) 0x80000 == (unsigned char) b) + (0x80000 < (unsigned long) b) + (0x80000 < (unsigned int) b) + - (0x80000 < (unsigned short) b) + - (0x80000 < (unsigned char) b) + + (0x80000 < (unsigned short) b) + // expected-warning {{comparison of constant 524288 with expression of type 'unsigned short' is always false}} + (0x80000 < (unsigned char) b) + // expected-warning {{comparison of constant 524288 with expression of type 'unsigned char' is always false}} ((long) 0x80000 < b) + ((int) 0x80000 < b) + ((short) 0x80000 < b) + @@ -175,8 +175,8 @@ int ints(long a, unsigned long b) { (a == (unsigned char) 0x80000) + ((long) a == 0x80000) + ((int) a == 0x80000) + - ((short) a == 0x80000) + - ((signed char) a == 0x80000) + + ((short) a == 0x80000) + // expected-warning {{comparison of constant 524288 with expression of type 'short' is always false}} + ((signed char) a == 0x80000) + // expected-warning {{comparison of constant 524288 with expression of type 'signed char' is always false}} ((long) a == (unsigned long) 0x80000) + ((int) a == (unsigned int) 0x80000) + ((short) a == (unsigned short) 0x80000) + @@ -187,8 +187,8 @@ int ints(long a, unsigned long b) { (a < (unsigned char) 0x80000) + ((long) a < 0x80000) + ((int) a < 0x80000) + - ((short) a < 0x80000) + - ((signed char) a < 0x80000) + + ((short) a < 0x80000) + // expected-warning {{comparison of constant 524288 with expression of type 'short' is always true}} + ((signed char) a < 0x80000) + // expected-warning {{comparison of constant 524288 with expression of type 'signed char' is always true}} ((long) a < (unsigned long) 0x80000) + // expected-warning {{comparison of integers of different signs}} ((int) a < (unsigned int) 0x80000) + // expected-warning {{comparison of integers of different signs}} ((short) a < (unsigned short) 0x80000) + |