Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -verify -fsyntax-only |
Steve Naroff | e2ef815 | 2008-04-04 14:32:09 +0000 | [diff] [blame] | 2 | |
| 3 | typedef int int32_t; |
| 4 | typedef unsigned char Boolean; |
| 5 | |
Hans Wennborg | 122de3e | 2011-12-06 09:46:12 +0000 | [diff] [blame] | 6 | extern int printf(__const char *__restrict __format, ...); // expected-note{{'printf' declared here}} |
| 7 | |
Steve Naroff | e2ef815 | 2008-04-04 14:32:09 +0000 | [diff] [blame] | 8 | void func() { |
| 9 | int32_t *vector[16]; |
| 10 | const char compDesc[16 + 1]; |
| 11 | int32_t compCount = 0; |
Chris Lattner | e030358 | 2010-01-09 20:43:19 +0000 | [diff] [blame] | 12 | if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-note {{previous implicit declaration is here}} \ |
| 13 | expected-warning {{implicit declaration of function '_CFCalendarDecomposeAbsoluteTimeV' is invalid in C99}} |
Steve Naroff | e2ef815 | 2008-04-04 14:32:09 +0000 | [diff] [blame] | 14 | } |
Hans Wennborg | 122de3e | 2011-12-06 09:46:12 +0000 | [diff] [blame] | 15 | |
| 16 | printg("Hello, World!\n"); // expected-warning{{implicit declaration of function 'printg' is invalid in C99}} \ |
| 17 | // expected-note{{did you mean 'printf'?}} |
| 18 | |
| 19 | __builtin_is_les(1, 3); // expected-error{{use of unknown builtin '__builtin_is_les'}} \ |
| 20 | // expected-note{did you mean '__builtin_is_less'?}} |
Steve Naroff | e2ef815 | 2008-04-04 14:32:09 +0000 | [diff] [blame] | 21 | } |
| 22 | Boolean _CFCalendarDecomposeAbsoluteTimeV(const char *componentDesc, int32_t **vector, int32_t count) { // expected-error{{conflicting types for '_CFCalendarDecomposeAbsoluteTimeV'}} |
| 23 | return 0; |
| 24 | } |