[cfe-dev] any complete example of a Rewriter that changes function call arguments?

Daniel Cheng dcheng at google.com
Sat Apr 6 00:31:48 PDT 2013


For what it's worth, you may want to check out
http://clang.llvm.org/docs/LibTooling.html and
http://clang.llvm.org/docs/LibASTMatchersTutorial.html.

Using RefactoringTool and Replacement makes it quite easy to rewrite things.

Daniel
On Apr 5, 2013 1:33 PM, "steveneliuk" <s.eliuk at sisa.samsung.com> wrote:

> I found the answer,
>
> bool VisitCallExpr(CallExpr *CE){
>  _rewriter.ReplaceText(CE->getLocStart(), II->getName().size(),
> "newFuncName");
> }
>
>
>
> --
> View this message in context:
> http://clang-developers.42468.n3.nabble.com/any-complete-example-of-a-Rewriter-that-changes-function-call-arguments-tp4029085p4031338.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130406/44824409/attachment.html>


More information about the cfe-dev mailing list