blob: 030f505e610e2376f2caf0737a8bf12782a3fb86 [file] [log] [blame]
Daniel Dunbar73dd7682009-11-14 04:39:42 +00001// RUN: clang-cc -pedantic -fixit %s -o - | clang-cc -pedantic -Werror -x c -
Douglas Gregora3a83512009-04-01 23:51:29 +00002
3/* This is a test of the various code modification hints that are
Douglas Gregorfe057ac2009-04-02 03:20:30 +00004 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 Gregora3a83512009-04-01 23:51:29 +00008struct s; // expected-note{{previous use is here}}
9
10union s *s1; // expected-error{{use of 's' with tag type that does not match previous declaration}}
Douglas Gregor3f0b5fd2009-11-06 06:30:47 +000011
12struct Point {
13 float x, y, z;
14};
15
16struct Point *get_origin();
17
18void test_point() {
19 (void)get_origin->x;
20}