2008-02-06 12:53:22 +08:00
|
|
|
// RUN: clang -fsyntax-only -pedantic -verify %s
|
2007-08-26 09:10:14 +08:00
|
|
|
|
|
|
|
int test(char *C) { // nothing here should warn.
|
|
|
|
return C != ((void*)0);
|
|
|
|
return C != (void*)0;
|
|
|
|
return C != 0;
|
|
|
|
}
|
|
|
|
|
2007-08-27 12:08:11 +08:00
|
|
|
int equal(char *a, const char *b)
|
|
|
|
{
|
|
|
|
return a == b;
|
|
|
|
}
|
2008-02-06 12:53:22 +08:00
|
|
|
|
|
|
|
int arrays(char (*a)[5], char(*b)[10], char(*c)[5]) {
|
|
|
|
int d = (a == c);
|
|
|
|
return a == b; // expected-warning {{comparison of distinct pointer types}}
|
|
|
|
}
|