xref: /minix3/external/bsd/llvm/dist/clang/test/Analysis/inline4.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s
2*f4a2713aSLionel Sambuc // expected-no-diagnostics
3*f4a2713aSLionel Sambuc 
g(int a)4*f4a2713aSLionel Sambuc int g(int a) {
5*f4a2713aSLionel Sambuc   return a;
6*f4a2713aSLionel Sambuc }
7*f4a2713aSLionel Sambuc 
f(int a)8*f4a2713aSLionel Sambuc int f(int a) {
9*f4a2713aSLionel Sambuc   // Do not remove block-level expression bindings of caller when analyzing
10*f4a2713aSLionel Sambuc   // in the callee.
11*f4a2713aSLionel Sambuc   if (1 && g(a)) // The binding of '1 && g(a)' which is an UndefinedVal
12*f4a2713aSLionel Sambuc                  // carries important information.
13*f4a2713aSLionel Sambuc     return 1;
14*f4a2713aSLionel Sambuc   return 0;
15*f4a2713aSLionel Sambuc }
16