blob: e9d78c7f38d0f93d0a078981744b50ca2ec47221 [file] [log] [blame]
Douglas Gregor558cb562009-04-02 01:08:08 +00001// RUN: clang -fsyntax-only -pedantic -fixit %s -o - | clang-cc -pedantic -Werror -x c -
Douglas Gregor9b3064b2009-04-01 22:41:11 +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. */
Douglas Gregor9b3064b2009-04-01 22:41:11 +00007
8void f0(void) { };
9
10struct s {
11 int x, y;;
12};
13
14_Complex cd;
15
16struct s s0 = { y: 5 };
17int array0[5] = { [3] 3 };
Douglas Gregora3a83512009-04-01 23:51:29 +000018
19void f1(x, y)
20{
21}
22
23int i0 = { 17 };
24
25int f2(const char *my_string) {
26 // FIXME: terminal output isn't so good when "my_string" is shorter
Douglas Gregor558cb562009-04-02 01:08:08 +000027 // FIXME: Needs an #include hint, too!
28 // return my_string == "foo";
Douglas Gregora3a83512009-04-01 23:51:29 +000029}