Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %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); |
Chris Lattner | e030358 | 2010-01-09 20:43:19 +0000 | [diff] [blame] | 6 | void free(void *ptr); |
Nuno Lopes | d8de725 | 2008-06-04 19:14:12 +0000 | [diff] [blame] | 7 | |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 8 | int _php_stream_free1() { |
| 9 | return (1 ? free(0) : _efree(0)); // expected-error {{incompatible type returning 'void', expected 'int'}} |
Nuno Lopes | d8de725 | 2008-06-04 19:14:12 +0000 | [diff] [blame] | 10 | } |
| 11 | |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 12 | int _php_stream_free2() { |
| 13 | return (1 ? _efree(0) : free(0)); // expected-error {{incompatible type returning 'void', expected 'int'}} |
Nuno Lopes | d8de725 | 2008-06-04 19:14:12 +0000 | [diff] [blame] | 14 | } |