• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: cp %s %t
2 // RUN: true || %clang_cc1 -pedantic -verify -fixit -x c %t
3 // RUN: %clang_cc1 -pedantic -Werror -x c %t
4 // XFAIL: *
5 
6 /* This is a test of the various code modification hints that are
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 
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}}
14 
15 struct Point {
16   float x, y, z;
17 };
18 
19 struct Point *get_origin();
20 
test_point()21 void test_point() {
22   (void)get_origin->x;
23 }
24