clang-ast: print constructors and destructors

This commit is contained in:
Daniel Marjamäki 2018-04-30 15:42:40 +02:00
parent 1bb7c7fbf2
commit 05184555b2
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,8 @@ int main(int argc, char **argv)
[](CXCursor c, CXCursor parent, CXClientData client_data) {
switch (clang_getCursorKind(c)) {
case CXCursor_FunctionDecl:
case CXCursor_Constructor:
case CXCursor_Destructor:
case CXCursor_CXXMethod: {
CXSourceLocation location = clang_getCursorLocation(c);
CXString filename;
@ -82,6 +84,7 @@ int main(int argc, char **argv)
}
break;
default:
//std::cout << "<" << clang_getCursorKindSpelling(clang_getCursorKind(c)) << " kind=\"" << clang_getCursorKind(c) << "\"/>\n";
break;
};