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

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -