1 // RUN: %clang_cc1 -Wmissing-variable-declarations -fsyntax-only -verify %s
3 int vbad1
; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}}
4 // expected-note@-1{{declare 'static' if the variable is not intended to be used outside of this translation unit}}
7 int vbad2
= 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad2'}}
8 // expected-note@-1{{declare 'static' if the variable is not intended to be used outside of this translation unit}}
10 struct { // expected-note{{declare 'static' if the variable is not intended to be used outside of this translation unit}}
12 } vbad3
; // expected-warning{{no previous extern declaration for non-static variable 'vbad3'}}
15 int vbad4
= 10; // expected-warning{{no previous extern declaration for non-static variable 'vbad4'}}
16 // expected-note@-1{{declare 'static' if the variable is not intended to be used outside of this translation unit}}