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