Home | History | Annotate | Download | only in Parser
      1 // RUN: %clang_cc1 -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 
      6 int x;
      7 /* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak
      8 #pragma weak x
      9 
     10 extern int z;
     11 /* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z = =
     12 /* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z =
     13 /* expected-warning {{weak identifier 'y' never declared}} */ #pragma weak z = y
     14 
     15 extern int a;
     16 /* 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
     18