llvm - printing line number of the source codes Stmt using clang libtooling -


hello i'm working clang libtooling. need take .c file , print names of functions present , lines function declaration in. in astrecursive class have function visitfunctiondecl , have found functions confused how find line number of stmts.

given functiondecl *f, f->getsourcerange() source range (beginning , end). given sourcerange sr, sr.getbegin() gives sourcelocation beginning of range.

look documentation / declarations of classes mentioned more details.


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -