blob: 1378df4de152348a87f9423617b8b8b372f32d72 [file] [log] [blame]
Douglas Gregoref5cc752009-04-02 04:59:27 +00001// RUN: clang-cc -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 Gregora86b8322009-04-06 18:45:53 +00007#include <string.h> // FIXME: FIX-IT hint should add this for us!
Douglas Gregor9b3064b2009-04-01 22:41:11 +00008
9void f0(void) { };
10
11struct s {
12 int x, y;;
13};
14
15_Complex cd;
16
17struct s s0 = { y: 5 };
18int array0[5] = { [3] 3 };
Douglas Gregora3a83512009-04-01 23:51:29 +000019
20void f1(x, y)
21{
22}
23
24int i0 = { 17 };
25
26int f2(const char *my_string) {
27 // FIXME: terminal output isn't so good when "my_string" is shorter
Douglas Gregora86b8322009-04-06 18:45:53 +000028 return my_string == "foo";
Douglas Gregora3a83512009-04-01 23:51:29 +000029}