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}}
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) {
22 var
; // expected-note {{initialize}}
23 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:10}:" = 0"
24 return var
; // expected-warning {{uninitialized}}