[cfe-dev] Advise about tool using clang
johnd
nicmail777 at yahoo.com
Thu Oct 17 14:25:40 PDT 2013
Hi,
I'm interested a building a tool, which will do a simple task on c,cpp and h
files:
It is intended to compile and run on Windows.
It will wrap all strings with a function call.
e.g:
char* a = "abc";
will change to:
char* a = toupper("abc");
It is required to take of all strings "variations" (macros, unicode, etc),
e.g:
wchar_t* u = L"abc";
TCHAR* t = TEXT("abc");
TCHAR* t = _T("abc");
std:string s("abc");
etc...
I've succeeded in compiling clang,
and played around with the examples,
and also so found this "refactoring" example:
http://kevinaboos.blogspot.com/2013/07/clang-tutorial-part-ii-libtooling.html
Since clang is such a huge project,
I would like to ask for your advise, for how to do it using clang -
what is the suggested way ?
which interfaces/classes ?
The example in kevinaboos.blogspot.com is using the "CompilationDatabase",
but I want to do it only with parsing, not compiling.
Thanks for your advise and help.
jd.
--
View this message in context: http://clang-developers.42468.n3.nabble.com/Advise-about-tool-using-clang-tp4035196.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list