clang-ast: print constructors and destructors
This commit is contained in:
parent
1bb7c7fbf2
commit
05184555b2
|
@ -43,6 +43,8 @@ int main(int argc, char **argv)
|
||||||
[](CXCursor c, CXCursor parent, CXClientData client_data) {
|
[](CXCursor c, CXCursor parent, CXClientData client_data) {
|
||||||
switch (clang_getCursorKind(c)) {
|
switch (clang_getCursorKind(c)) {
|
||||||
case CXCursor_FunctionDecl:
|
case CXCursor_FunctionDecl:
|
||||||
|
case CXCursor_Constructor:
|
||||||
|
case CXCursor_Destructor:
|
||||||
case CXCursor_CXXMethod: {
|
case CXCursor_CXXMethod: {
|
||||||
CXSourceLocation location = clang_getCursorLocation(c);
|
CXSourceLocation location = clang_getCursorLocation(c);
|
||||||
CXString filename;
|
CXString filename;
|
||||||
|
@ -82,6 +84,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
//std::cout << "<" << clang_getCursorKindSpelling(clang_getCursorKind(c)) << " kind=\"" << clang_getCursorKind(c) << "\"/>\n";
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue