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

twig - Using Twigbridge in a Laravel 5.1 Package -

Kivy: Swiping (Carousel & ScreenManager) -

jdbc - Not able to establish database connection in eclipse -