<div dir="ltr"><div>Hi, all,</div><div> I am new to LLVM and Clang,</div><div> I am interested in the following problem:</div><div>   Given a function with parameters, obtain the part of parameters which are used in branch conditions within the function or sub-functions. </div>
<div> </div><div>For the following example, I hope to get v.c1</div><div>  struct p {</div><div>      int c1,</div><div>      int c2</div><div>  };</div><div>  void foo (p v) {</div><div>      if (v.c1) </div><div>          ...</div>
<div>      else</div><div>         ...</div><div>  }</div><div> </div><div>Does LLVM or Clang contains the code that could easily achieve this efficiently?</div><div> </div><div>Thanks,</div><div>Feng Lu</div></div>