summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/conditional.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/conditional.c')
-rw-r--r--clang/test/Sema/conditional.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/test/Sema/conditional.c b/clang/test/Sema/conditional.c
index 3af0fe57b43..e1ad1a51ba9 100644
--- a/clang/test/Sema/conditional.c
+++ b/clang/test/Sema/conditional.c
@@ -1,4 +1,15 @@
-// RUN: clang %s -fsyntax-only
+// RUN: clang %s -fsyntax-only -verify
const char* test1 = 1 ? "i" : 1 == 1 ? "v" : "r";
+void _efree(void *ptr);
+
+int _php_stream_free1()
+{
+ return (1 ? free(0) : _efree(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
+}
+
+int _php_stream_free2()
+{
+ return (1 ? _efree(0) : free(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
+}
OpenPOWER on IntegriCloud