[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / Parser / pointer_promotion.c
blob8b718ad565cebadf25e96c24469f5d00e7dc9d0f
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 void test() {
4 void *vp;
5 int *ip;
6 char *cp;
7 struct foo *fp;
8 struct bar *bp;
9 short sint = 7;
11 if (ip < cp) {} // expected-warning {{comparison of distinct pointer types ('int *' and 'char *')}}
12 if (cp < fp) {} // expected-warning {{comparison of distinct pointer types ('char *' and 'struct foo *')}}
13 if (fp < bp) {} // expected-warning {{comparison of distinct pointer types ('struct foo *' and 'struct bar *')}}
14 if (ip < 7) {} // expected-warning {{comparison between pointer and integer ('int *' and 'int')}}
15 if (sint < ip) {} // expected-warning {{comparison between pointer and integer ('short' and 'int *')}}
16 if (ip == cp) {} // expected-warning {{comparison of distinct pointer types ('int *' and 'char *')}}