Clang import; Type fixes
This commit is contained in:
parent
abc51afcf1
commit
cde757bcd3
|
@ -144,6 +144,7 @@ namespace clangimport {
|
||||||
mDeclMap.insert(std::pair<std::string, Decl>(addr, decl));
|
mDeclMap.insert(std::pair<std::string, Decl>(addr, decl));
|
||||||
def->varId(++mVarId);
|
def->varId(++mVarId);
|
||||||
def->variable(var);
|
def->variable(var);
|
||||||
|
if (def->valueType())
|
||||||
var->setValueType(*def->valueType());
|
var->setValueType(*def->valueType());
|
||||||
notFound(addr);
|
notFound(addr);
|
||||||
}
|
}
|
||||||
|
@ -386,6 +387,8 @@ void clangimport::AstNode::setValueType(Token *tok)
|
||||||
|
|
||||||
TokenList decl(nullptr);
|
TokenList decl(nullptr);
|
||||||
addTypeTokens(&decl, type);
|
addTypeTokens(&decl, type);
|
||||||
|
if (!decl.front())
|
||||||
|
return;
|
||||||
|
|
||||||
ValueType valueType = ValueType::parseDecl(decl.front(), mData->mSettings);
|
ValueType valueType = ValueType::parseDecl(decl.front(), mData->mSettings);
|
||||||
if (valueType.type != ValueType::Type::UNKNOWN_TYPE)
|
if (valueType.type != ValueType::Type::UNKNOWN_TYPE)
|
||||||
|
|
Loading…
Reference in New Issue