2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -pedantic -fixit %s -o - | grep -v 'CHECK' > %t
|
|
|
|
// RUN: %clang_cc1 -pedantic -Werror -x c -
|
2009-11-15 03:25:21 +08:00
|
|
|
// RUN: FileCheck -input-file=%t %s
|
2009-04-02 06:41:11 +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-11-18 06:25:16 +08:00
|
|
|
|
|
|
|
// FIXME: FIX-IT should add #include <string.h>?
|
|
|
|
int strcmp(const char *s1, const char *s2);
|
2009-04-02 06:41:11 +08:00
|
|
|
|
|
|
|
void f0(void) { };
|
|
|
|
|
|
|
|
struct s {
|
|
|
|
int x, y;;
|
|
|
|
};
|
|
|
|
|
2009-11-15 03:25:21 +08:00
|
|
|
// CHECK: _Complex double cd;
|
2009-04-02 06:41:11 +08:00
|
|
|
_Complex cd;
|
|
|
|
|
2009-11-15 03:25:21 +08:00
|
|
|
// CHECK: struct s s0 = { .y = 5 };
|
2009-04-02 06:41:11 +08:00
|
|
|
struct s s0 = { y: 5 };
|
2009-11-15 03:25:21 +08:00
|
|
|
|
|
|
|
// CHECK: int array0[5] = { [3] = 3 };
|
2009-04-02 06:41:11 +08:00
|
|
|
int array0[5] = { [3] 3 };
|
2009-04-02 07:51:29 +08:00
|
|
|
|
|
|
|
void f1(x, y)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
int i0 = { 17 };
|
|
|
|
|