data: parse typedefs

- added callbacks that will be called when clang encounters typedefs.
- added tests for this feature.

review id = 20

fortune cookie message = New ideas could be profitable.
This commit is contained in:
malte_langkabel
2014-06-03 13:37:13 +02:00
parent 877ee4d56e
commit 4ff064cb1d
9 changed files with 100 additions and 0 deletions
+17
View File
@@ -13,6 +13,23 @@ ASTVisitor::~ASTVisitor()
{
}
bool ASTVisitor::VisitTypedefDecl(const clang::TypedefDecl* declaration)
{
const clang::SourceLocation& location = declaration->getLocStart();
if (isValidLocation(location))
{
m_client->onTypedefParsed(
getParseLocation(location),
declaration->getQualifiedNameAsString(),
declaration->getUnderlyingType().getAsString(),
convertAccessType(declaration->getAccess())
);
}
return true;
}
bool ASTVisitor::VisitCXXRecordDecl(clang::CXXRecordDecl* declaration)
{
const clang::SourceLocation& location = declaration->getLocStart();