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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -