[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / FixIt / fixit-uninit.c
blob4993ea6ecda6b6b7868845e0d8fb51abbed63ef1
1 // RUN: %clang_cc1 -fsyntax-only -Wuninitialized -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
4 _Bool test_bool_no_false(void) {
5 _Bool var; // expected-note {{initialize}}
6 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:12-[[@LINE-1]]:12}:" = 0"
7 return var; // expected-warning {{uninitialized}}
10 #define bool _Bool
11 #define false (bool)0
12 #define true (bool)1
13 bool test_bool_with_false(void) {
14 bool var; // expected-note {{initialize}}
15 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:11}:" = false"
16 return var; // expected-warning {{uninitialized}}
19 bool test_bool_with_false_undefined(void) {
20 bool
21 #undef false
22 var; // expected-note {{initialize}}
23 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:10}:" = 0"
24 return var; // expected-warning {{uninitialized}}