blob: 1c7486a6133e7c0d692730b8abf24143cf987405 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc %s -fsyntax-only -verify
Chris Lattnerd7d860d2007-12-18 06:06:23 +00002
3const char* test1 = 1 ? "i" : 1 == 1 ? "v" : "r";
4
Nuno Lopesd8de7252008-06-04 19:14:12 +00005void _efree(void *ptr);
6
7int _php_stream_free1()
8{
9 return (1 ? free(0) : _efree(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
10}
11
12int _php_stream_free2()
13{
14 return (1 ? _efree(0) : free(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
15}