blob: c3dbe1321b6b2fa884343e4606a2df42c45e706e [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %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);
Chris Lattnere0303582010-01-09 20:43:19 +00006void free(void *ptr);
Nuno Lopesd8de7252008-06-04 19:14:12 +00007
Mike Stump1eb44332009-09-09 15:08:12 +00008int _php_stream_free1() {
9 return (1 ? free(0) : _efree(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
Nuno Lopesd8de7252008-06-04 19:14:12 +000010}
11
Mike Stump1eb44332009-09-09 15:08:12 +000012int _php_stream_free2() {
13 return (1 ? _efree(0) : free(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
Nuno Lopesd8de7252008-06-04 19:14:12 +000014}