Clang importer; FieldDecl in CXXRecordDecl

This commit is contained in:
Daniel Marjamäki 2020-01-08 19:43:01 +01:00
parent 64953f36b3
commit 27be51cb49
1 changed files with 3 additions and 1 deletions

View File

@ -356,7 +356,9 @@ Token *clangastdump::AstNode::createTokens(TokenList *tokenList)
Token *nameToken = addtoken(tokenList, mExtTokens[mExtTokens.size() - 2]); Token *nameToken = addtoken(tokenList, mExtTokens[mExtTokens.size() - 2]);
std::vector<AstNodePtr> children2; std::vector<AstNodePtr> children2;
for (auto child: children) { for (auto child: children) {
if (child->nodeType == "CXXMethodDecl") if (child->nodeType == CXXMethodDecl)
children2.push_back(child);
else if (child->nodeType == FieldDecl)
children2.push_back(child); children2.push_back(child);
} }
Scope *scope = createScope(tokenList, Scope::ScopeType::eClass, children2); Scope *scope = createScope(tokenList, Scope::ScopeType::eClass, children2);