Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc %s -fsyntax-only -verify |
Chris Lattner | d7d860d | 2007-12-18 06:06:23 +0000 | [diff] [blame] | 2 | |
| 3 | const char* test1 = 1 ? "i" : 1 == 1 ? "v" : "r"; |
| 4 | |
Nuno Lopes | d8de725 | 2008-06-04 19:14:12 +0000 | [diff] [blame] | 5 | void _efree(void *ptr); |
| 6 | |
| 7 | int _php_stream_free1() |
| 8 | { |
| 9 | return (1 ? free(0) : _efree(0)); // expected-error {{incompatible type returning 'void', expected 'int'}} |
| 10 | } |
| 11 | |
| 12 | int _php_stream_free2() |
| 13 | { |
| 14 | return (1 ? _efree(0) : free(0)); // expected-error {{incompatible type returning 'void', expected 'int'}} |
| 15 | } |