Home | History | Annotate | Download | only in Sema
      1 // RUN: %clang_cc1 -Wmissing-variable-declarations -fsyntax-only -verify %s
      2 
      3 int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}}
      4 
      5 int vbad2;
      6 int vbad2 = 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad2'}}
      7 
      8 struct {
      9   int mgood1;
     10 } vbad3; // expected-warning{{no previous extern declaration for non-static variable 'vbad3'}}
     11 
     12 int vbad4;
     13 int vbad4 = 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad4'}}
     14 extern int vbad4;
     15 
     16 extern int vgood1;
     17 int vgood1;
     18 int vgood1 = 10;
     19