Clang import; Add a validation step
This commit is contained in:
parent
0adf09c507
commit
cb9efcb100
|
@ -1523,6 +1523,12 @@ void clangimport::parseClangAstDump(Tokenizer *tokenizer, std::istream &f)
|
||||||
if (!tree.empty())
|
if (!tree.empty())
|
||||||
tree[0]->createTokens1(tokenList);
|
tree[0]->createTokens1(tokenList);
|
||||||
|
|
||||||
|
// Validation
|
||||||
|
for (const Token *tok = tokenList->front(); tok; tok = tok->next()) {
|
||||||
|
if (Token::Match(tok, "(|)|[|]|{|}") && !tok->link())
|
||||||
|
throw InternalError(tok, "Token::link() is not set properly");
|
||||||
|
}
|
||||||
|
|
||||||
symbolDatabase->clangSetVariables(data.getVariableList());
|
symbolDatabase->clangSetVariables(data.getVariableList());
|
||||||
tokenList->clangSetOrigFiles();
|
tokenList->clangSetOrigFiles();
|
||||||
setTypes(tokenList);
|
setTypes(tokenList);
|
||||||
|
|
Loading…
Reference in New Issue