1ba5f6eced29937e4e4851a2c0980744768413d66Nick Lewycky// RUN: cp %s %t
22315318436b3e94d54c220c3b8986e8002394a43Richard Smith// RUN: %clang_cc1 -pedantic -verify -fixit -x c %t
3ba5f6eced29937e4e4851a2c0980744768413d66Nick Lewycky// RUN: %clang_cc1 -pedantic -Werror -x c %t
4d4a97a18ea3cda3ba095e7c0c6708e7a39cf31dbNick Lewycky// XFAIL: *
5a3a835149ed4b183e3b009a1f94a6123779d696bDouglas Gregor
6a3a835149ed4b183e3b009a1f94a6123779d696bDouglas Gregor/* This is a test of the various code modification hints that are
7fe057ac36b9a76cdfa37dfa003f986461fb5fb98Douglas Gregor   provided as part of warning or extension diagnostics. All of the
8fe057ac36b9a76cdfa37dfa003f986461fb5fb98Douglas Gregor   warnings will be fixed by -fixit, and the resulting file should
9fe057ac36b9a76cdfa37dfa003f986461fb5fb98Douglas Gregor   compile cleanly with -Werror -pedantic. */
10fe057ac36b9a76cdfa37dfa003f986461fb5fb98Douglas Gregor
11a3a835149ed4b183e3b009a1f94a6123779d696bDouglas Gregorstruct s; // expected-note{{previous use is here}}
12a3a835149ed4b183e3b009a1f94a6123779d696bDouglas Gregor
13a3a835149ed4b183e3b009a1f94a6123779d696bDouglas Gregorunion s *s1; // expected-error{{use of 's' with tag type that does not match previous declaration}}
143f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregor
153f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregorstruct Point {
163f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregor  float x, y, z;
173f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregor};
183f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregor
193f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregorstruct Point *get_origin();
203f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregor
213f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregorvoid test_point() {
223f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregor  (void)get_origin->x;
233f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1Douglas Gregor}
24