blob: 7bf9a58430f112c8d9dc7207854a2bb9267798a6 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -pedantic -fixit %s -o - | %clang_cc1 -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}