Cases like this:
char *C;
C != ((void*)0);
Should not warn about incompatible pointer types. Also, make sure to
insert an implicit conversion even if the operand is null.
llvm-svn: 41408
diff --git a/clang/test/Sema/compare.c b/clang/test/Sema/compare.c
new file mode 100644
index 0000000..0aeeb30
--- /dev/null
+++ b/clang/test/Sema/compare.c
@@ -0,0 +1,8 @@
+// RUN: clang -parse-ast-check %s
+
+int test(char *C) { // nothing here should warn.
+ return C != ((void*)0);
+ return C != (void*)0;
+ return C != 0;
+}
+