2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -pedantic -fixit %s -o - | %clang_cc1 -pedantic -Werror -x c -
|
2010-04-15 14:46:58 +08:00
|
|
|
// XFAIL: *
|
2009-04-02 07:51:29 +08:00
|
|
|
|
|
|
|
/* This is a test of the various code modification hints that are
|
2009-04-02 11:20:30 +08:00
|
|
|
provided as part of warning or extension diagnostics. All of the
|
|
|
|
warnings will be fixed by -fixit, and the resulting file should
|
|
|
|
compile cleanly with -Werror -pedantic. */
|
|
|
|
|
2009-04-02 07:51:29 +08:00
|
|
|
struct s; // expected-note{{previous use is here}}
|
|
|
|
|
|
|
|
union s *s1; // expected-error{{use of 's' with tag type that does not match previous declaration}}
|
2009-11-06 14:30:47 +08:00
|
|
|
|
|
|
|
struct Point {
|
|
|
|
float x, y, z;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Point *get_origin();
|
|
|
|
|
|
|
|
void test_point() {
|
|
|
|
(void)get_origin->x;
|
|
|
|
}
|