Do you mean Translation unit means compilation unit ?  If you are compiling more than one c or cxx files using clang then <br>when single .c or .cxx is compiled , all function calls and function protos and function definations within that file are obtained.<br>
<br>To get all function calls there is virtual function VisitCallExpr ( you can all function calls within that single c file ) and <br>another function is VisitFunctionDecl  ( all functions i,e function body ( defination) and function prototypes handle by FunctionDecl Object) <br>
I got hint from following and then i modified some code according to my need ( I googled it for sample code and found <br><a href="https://github.com/mozilla/dxr/blob/master/xref-tools/cxx-clang/dxr-index.cpp">https://github.com/mozilla/dxr/blob/master/xref-tools/cxx-clang/dxr-index.cpp</a>. There are some very useful functions there<br>
)<br><br><br><br clear="all">Suhas Limaye. <br>Pune.<br>
<br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 4:52 PM, akshay ratnaparkhi <span dir="ltr"><<a href="mailto:ackk007@gmail.com">ackk007@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks suhas...<br>I have again one problem that how can i handle the different translation units for retrieving the function names.<br><br>by the way it is just informal, I am also from pune.  <br><div class="HOEnZb"><div class="h5">
<br><div class="gmail_quote">
On Thu, Apr 12, 2012 at 12:03 PM, Suhas <span dir="ltr"><<a href="mailto:suhaslimaye@gmail.com" target="_blank">suhaslimaye@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

use std::ofstream for writting text fie!<br><br clear="all">Suhas Limaye. <br>Pune.<br>
<br><br><div class="gmail_quote"><div><div>On Wed, Apr 11, 2012 at 10:17 AM, akshay ratnaparkhi <span dir="ltr"><<a href="mailto:ackk007@gmail.com" target="_blank">ackk007@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hi all, <br>      Can any one tell me how to handle files in clang. I want to open the file in write mode and write some data in file. Can i use iostream ios:: file handling in clang plugin.<br> Thanks,<br>      akshay<br>



<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>