blob: 39e6d16cc4fdcafa5609de14d892f53b36f7129e [file] [log] [blame]
Dominic Chen184c6242017-03-03 18:02:02 +00001// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
Andy Gibbsc6e68da2012-10-19 12:44:48 +00002// expected-no-diagnostics
Zhongxing Xud497e122010-03-02 10:08:30 +00003
4// Test parameter 'a' is registered to LiveVariables analysis data although it
5// is not referenced in the function body.
Zhongxing Xu6b11b4e2010-03-03 01:02:48 +00006// Before processing 'return 1;', in RemoveDeadBindings(), we query the liveness
7// of 'a', because we have a binding for it due to parameter passing.
Zhongxing Xud497e122010-03-02 10:08:30 +00008int f1(int a) {
9 return 1;
10}
11
12void f2() {
13 int x;
14 x = f1(1);
15}