[cfe-users] add method to a existing class and save to source file
? ?? via cfe-users
cfe-users at lists.llvm.org
Fri May 4 17:22:24 PDT 2018
Dear Clang users:
I have a class named classA in a.h and a.cpp file. it have some methods, I want to add a new method definition to a.h and add new method body after last method use clang . How to do it ?
I know the RecursiveASTVisitor::VisitCXXRecordDecl(...) can visit CXXRecordDecl and CXXMethodDecl , Rewriter be used to write code . but how to create new method definition and body to a.h and a.cpp?
//insert a new method
// inset new method body
licux6 at hotmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-users