// RUN: %clang_cc1 -pedantic -Wunused-label -Wno-deprecated-non-prototype -verify -x c %s
// RUN: cp %s %t
// RUN: not %clang_cc1 -pedantic -Wunused-label -fixit -x c %t
// RUN: %clang_cc1 -pedantic -Wunused-label -Wno-deprecated-non-prototype -Werror -x c %t
// RUN: grep -v CHECK %t | FileCheck %t
/* This is a test of the various code modification hints that are
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. */
// FIXME: FIX-IT should add #include <string.h>?
int ;
void ; // expected-warning {{';'}}
;
// CHECK: _Complex double cd;
_Complex cd; // expected-warning {{assuming '_Complex double'}}
// CHECK: struct s s0 = { .y = 5 };
struct s s0 = ; // expected-warning {{GNU old-style}}
// CHECK: int array0[5] = { [3] = 3 };
int array0 = ; // expected-warning {{GNU 'missing ='}}
// CHECK: int x
// CHECK: int y
void
int i0 = ;
int
// CHECK: const typedef int int_t;
const typedef typedef int int_t; // expected-warning {{duplicate 'typedef'}}
// <rdar://problem/7159693>
;
// rdar://9295072
;
void
int oopsAComma = 0, // expected-error {{';'}}
void
int
int
// expected-error {{expected ';' after struct}}
// expected-error {{expected ';' after enum}}
int PR17175 ; // expected-error {{'visibility' attribute requires a string}}