blob: 355a95487b97f706986dd4cec620b97898e1ae9b [file] [log] [blame]
Eli Friedman29b1d072009-06-05 00:50:43 +00001// RUN: clang-cc -fsyntax-only -verify %s
2
3// Note that this puts the expected lines before the directives to work around
4// limitations in the -verify mode.
5
6int x;
7/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak
8#pragma weak x
Eli Friedman29b1d072009-06-05 00:50:43 +00009
Eli Friedman1dbe36a2009-06-05 02:49:06 +000010extern int z;
Eli Friedman29b1d072009-06-05 00:50:43 +000011/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z = =
12/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z =
13#pragma weak z = y
14
Eli Friedman1dbe36a2009-06-05 02:49:06 +000015extern int a;
Eli Friedman29b1d072009-06-05 00:50:43 +000016/* expected-warning {{extra tokens at end of '#pragma weak'}}*/ #pragma weak a b
17/* expected-warning {{extra tokens at end of '#pragma weak'}}*/ #pragma weak a = x c