From 589174b92d244bc6614cbbc90914c96ce27b1b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 31 Dec 2020 17:48:39 +0100 Subject: [PATCH] Clang import: Throw InternalError when nodeType is unknown --- lib/clangimport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/clangimport.cpp b/lib/clangimport.cpp index 8437764bb..1d955b0f9 100644 --- a/lib/clangimport.cpp +++ b/lib/clangimport.cpp @@ -1192,7 +1192,7 @@ Token *clangimport::AstNode::createTokens(TokenList *tokenList) createScope(tokenList, Scope::ScopeType::eWhile, body, whiletok); return nullptr; } - return addtoken(tokenList, "?" + nodeType + "?"); + throw InternalError(tokenList->back(), "ClangImport::AstNode::createTokens: Unhandled nodeType: nodeType"); } Token * clangimport::AstNode::createTokensCall(TokenList *tokenList)