[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / warn-missing-variable-declarations.c
blobf9644bec603acbdab4acd7ded974ae71a54d63dd
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}}
6 int vbad2;
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}}
11 int mgood1;
12 } vbad3; // expected-warning{{no previous extern declaration for non-static variable 'vbad3'}}
14 int vbad4;
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}}
17 extern int vbad4;
19 extern int vgood1;
20 int vgood1;
21 int vgood1 = 10;