[cfe-users] How to create TranslationUnit for source code?

2019-04-08 Thread Kirill Bugaev via cfe-users
I write program which determines type of instance under cursor in source code. I pass on ast-file and cursor location as cmd arguments and output instance location(line number and column) and its type. #include > #include > #include > int main(int argc, char *argv[]) > { > CXIndex index; >

[cfe-users] clang_createTranslationUnitFromSourceFile() and C++ source code

2019-05-31 Thread Kirill Bugaev via cfe-users
I am trying to determine data types in C++ source code with help of libclang. My program is = #include #include #include int main(int argc, char *argv[]) { CXIndex index; CXTranslationUnit tu; CXFile file; CXSourceLocation loc; CXCursor cursor, def; CXType type;