Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -pedantic -fixit %s -o - | %clang_cc1 -pedantic -Werror -x c - |
Douglas Gregor | a3a8351 | 2009-04-01 23:51:29 +0000 | [diff] [blame] | 2 | |
| 3 | /* This is a test of the various code modification hints that are |
Douglas Gregor | fe057ac | 2009-04-02 03:20:30 +0000 | [diff] [blame] | 4 | provided as part of warning or extension diagnostics. All of the |
| 5 | warnings will be fixed by -fixit, and the resulting file should |
| 6 | compile cleanly with -Werror -pedantic. */ |
| 7 | |
Douglas Gregor | a3a8351 | 2009-04-01 23:51:29 +0000 | [diff] [blame] | 8 | struct s; // expected-note{{previous use is here}} |
| 9 | |
| 10 | union s *s1; // expected-error{{use of 's' with tag type that does not match previous declaration}} |
Douglas Gregor | 3f0b5fd | 2009-11-06 06:30:47 +0000 | [diff] [blame] | 11 | |
| 12 | struct Point { |
| 13 | float x, y, z; |
| 14 | }; |
| 15 | |
| 16 | struct Point *get_origin(); |
| 17 | |
| 18 | void test_point() { |
| 19 | (void)get_origin->x; |
| 20 | } |