Nick Lewycky | ba5f6ec | 2010-04-24 01:30:46 +0000 | [diff] [blame] | 1 | // RUN: cp %s %t |
| 2 | // RUN: %clang_cc1 -pedantic -verify -fixit -x c %t || true |
| 3 | // RUN: %clang_cc1 -pedantic -Werror -x c %t |
Nick Lewycky | d4a97a1 | 2010-04-15 06:46:58 +0000 | [diff] [blame] | 4 | // XFAIL: * |
Douglas Gregor | a3a8351 | 2009-04-01 23:51:29 +0000 | [diff] [blame] | 5 | |
| 6 | /* This is a test of the various code modification hints that are |
Douglas Gregor | fe057ac | 2009-04-02 03:20:30 +0000 | [diff] [blame] | 7 | provided as part of warning or extension diagnostics. All of the |
| 8 | warnings will be fixed by -fixit, and the resulting file should |
| 9 | compile cleanly with -Werror -pedantic. */ |
| 10 | |
Douglas Gregor | a3a8351 | 2009-04-01 23:51:29 +0000 | [diff] [blame] | 11 | struct s; // expected-note{{previous use is here}} |
| 12 | |
| 13 | 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] | 14 | |
| 15 | struct Point { |
| 16 | float x, y, z; |
| 17 | }; |
| 18 | |
| 19 | struct Point *get_origin(); |
| 20 | |
| 21 | void test_point() { |
| 22 | (void)get_origin->x; |
| 23 | } |