Skip to content

Commit c546b24

Browse files
committed
ClangImport; throw exception if CXXForRangeStmt can't be imported
1 parent a4a2252 commit c546b24

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/clangimport.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,8 @@ Token *clangimport::AstNode::createTokens(TokenList *tokenList)
810810
break;
811811
}
812812
}
813+
if (!range)
814+
throw InternalError(tokenList->back(), "Failed to import CXXForRangeStmt. Range?");
813815
Token *expr2 = range->createTokens(tokenList);
814816
Token *par2 = addtoken(tokenList, ")");
815817

0 commit comments

Comments
 (0)