xref: /aosp_15_r20/external/clang/test/Sema/uninit-det-order.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -Wuninitialized -fsyntax-only %s 2>&1 | FileCheck %s
2*67e74705SXin Li 
pr14901(int a)3*67e74705SXin Li void pr14901(int a) {
4*67e74705SXin Li    int b, c;
5*67e74705SXin Li    a = b;
6*67e74705SXin Li    a = c;
7*67e74705SXin Li }
8*67e74705SXin Li 
9*67e74705SXin Li // CHECK: 5:8: warning: variable 'b' is uninitialized when used here
10*67e74705SXin Li // CHECK: 4:9: note: initialize the variable 'b' to silence this warning
11*67e74705SXin Li // CHECK: 6:8: warning: variable 'c' is uninitialized when used here
12*67e74705SXin Li // CHECK: 4:12: note: initialize the variable 'c' to silence this warning
13*67e74705SXin Li 
14