From f7f5f10de4cc3a071e6f45696bc4afbd8ce64ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 11 Jan 2020 16:15:18 +0100 Subject: [PATCH] Clang import; Tweaked IfStmt (Clang 3.8 compatibility) --- lib/clangimport.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/clangimport.cpp b/lib/clangimport.cpp index 153f92f87..4fd258036 100644 --- a/lib/clangimport.cpp +++ b/lib/clangimport.cpp @@ -599,9 +599,9 @@ Token *clangimport::AstNode::createTokens(TokenList *tokenList) return nullptr; } if (nodeType == IfStmt) { - AstNodePtr cond = children[2]; - AstNodePtr then = children[3]; - AstNodePtr else_ = children[4]; + AstNodePtr cond = children[children.size() - 3]; + AstNodePtr then = children[children.size() - 2]; + AstNodePtr else_ = children[children.size() - 1]; Token *iftok = addtoken(tokenList, "if"); Token *par1 = addtoken(tokenList, "("); par1->astOperand1(iftok);