summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH/variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/PCH/variables.c')
-rw-r--r--clang/test/PCH/variables.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/PCH/variables.c b/clang/test/PCH/variables.c
new file mode 100644
index 00000000000..2981a6796a7
--- /dev/null
+++ b/clang/test/PCH/variables.c
@@ -0,0 +1,6 @@
+// RUN: clang-cc -emit-pch -o %t %S/variables.h &&
+// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s
+
+int *ip2 = &x;
+float *fp = &ip; // expected-warning{{incompatible pointer types}}
+
OpenPOWER on IntegriCloud