<div dir="ltr">Hi,<div><br></div><div>I am trying to add a new #pragma for certain call-sites of a C/C++ program. For example,</div><div><br></div><div>#pragma markme</div><div>a = foo(1, 2);</div><div><br></div><div>I have been able extend clang to add a pragma handler that has a callback on the Sema actions. That's the easy part. In Sema action implementation, I want to ensure that this indeed is a call statement. So, </div>
<div><br></div><div>1) Is there is any boilerplate code (or guidelines) to ensure that the "pragma" following statement is indeed a call statement. </div><div><br></div><div>2)  What would be a convenient way to carry extra information from this Sema action implementation to the CodeGen for this call statement (in CGStmt.cpp). I would like to carry more information than just a flag. It seems a waste to add an extra pointer to Stmt class for this.</div>
<div><br></div><div>3) I understand that CGStmt.cpp is the top level code generator for statements. Any clue on what path (or function) is taken for a call-site statement? I need this to emit extra code related to the my pragma.</div>
<div><br></div><div>(Note, this is my first time hacking on clang! Thanks!)</div><div><br></div><div>Best Regards,</div><div>Raj</div><div><br></div><div> </div></div>