[cfe-dev] file handling
suhaslimaye at gmail.com
Thu Apr 12 19:19:23 PDT 2012
Do you mean Translation unit means compilation unit ? If you are compiling
more than one c or cxx files using clang then
when single .c or .cxx is compiled , all function calls and function protos
and function definations within that file are obtained.
To get all function calls there is virtual function VisitCallExpr ( you can
all function calls within that single c file ) and
another function is VisitFunctionDecl ( all functions i,e function body (
defination) and function prototypes handle by FunctionDecl Object)
I got hint from following and then i modified some code according to my
need ( I googled it for sample code and found
There are some very useful functions there
On Thu, Apr 12, 2012 at 4:52 PM, akshay ratnaparkhi <ackk007 at gmail.com>wrote:
> Thanks suhas...
> I have again one problem that how can i handle the different translation
> units for retrieving the function names.
> by the way it is just informal, I am also from pune.
> On Thu, Apr 12, 2012 at 12:03 PM, Suhas <suhaslimaye at gmail.com> wrote:
>> use std::ofstream for writting text fie!
>> Suhas Limaye.
>> On Wed, Apr 11, 2012 at 10:17 AM, akshay ratnaparkhi <ackk007 at gmail.com>wrote:
>>> Hi all,
>>> 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.
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev