Be a bit stricter about array type compatibility.
llvm-svn: 46799
diff --git a/clang/test/Sema/compare.c b/clang/test/Sema/compare.c
index 25d7a91..e1ebf57 100644
--- a/clang/test/Sema/compare.c
+++ b/clang/test/Sema/compare.c
@@ -1,4 +1,4 @@
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang -fsyntax-only -pedantic -verify %s
int test(char *C) { // nothing here should warn.
return C != ((void*)0);
@@ -10,3 +10,8 @@
{
return a == b;
}
+
+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}}
+}