xref: /aosp_15_r20/external/clang/test/Analysis/inline2.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s
2*67e74705SXin Li // expected-no-diagnostics
3*67e74705SXin Li 
4*67e74705SXin Li // Test parameter 'a' is registered to LiveVariables analysis data although it
5*67e74705SXin Li // is not referenced in the function body.
6*67e74705SXin Li // Before processing 'return 1;', in RemoveDeadBindings(), we query the liveness
7*67e74705SXin Li // of 'a', because we have a binding for it due to parameter passing.
f1(int a)8*67e74705SXin Li int f1(int a) {
9*67e74705SXin Li   return 1;
10*67e74705SXin Li }
11*67e74705SXin Li 
f2()12*67e74705SXin Li void f2() {
13*67e74705SXin Li   int x;
14*67e74705SXin Li   x = f1(1);
15*67e74705SXin Li }
16