ClangImport; throw exception if CXXForRangeStmt can't be imported

This commit is contained in:
Daniel Marjamäki 2021-01-04 10:14:51 +01:00
parent a4a225203c
commit c546b244a9
1 changed files with 2 additions and 0 deletions

View File

@ -810,6 +810,8 @@ Token *clangimport::AstNode::createTokens(TokenList *tokenList)
break;
}
}
if (!range)
throw InternalError(tokenList->back(), "Failed to import CXXForRangeStmt. Range?");
Token *expr2 = range->createTokens(tokenList);
Token *par2 = addtoken(tokenList, ")");