blob: ff063635f693c6b1b830b1b666be8b4f86687ffb [file] [log] [blame]
Nick Lewyckyba5f6ec2010-04-24 01:30:46 +00001// 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 Lewyckyd4a97a12010-04-15 06:46:58 +00004// XFAIL: *
Douglas Gregora3a83512009-04-01 23:51:29 +00005
6/* This is a test of the various code modification hints that are
Douglas Gregorfe057ac2009-04-02 03:20:30 +00007 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 Gregora3a83512009-04-01 23:51:29 +000011struct s; // expected-note{{previous use is here}}
12
13union s *s1; // expected-error{{use of 's' with tag type that does not match previous declaration}}
Douglas Gregor3f0b5fd2009-11-06 06:30:47 +000014
15struct Point {
16 float x, y, z;
17};
18
19struct Point *get_origin();
20
21void test_point() {
22 (void)get_origin->x;
23}