From 7eb2b8e1ec0f5aaf1854cafcb1de7f9cf7d86e3c Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Sat, 28 Nov 2020 10:42:25 +0200 Subject: Fix clang-tidy warnings --- JSImpl/src/Parser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'JSImpl/src/Parser.cpp') diff --git a/JSImpl/src/Parser.cpp b/JSImpl/src/Parser.cpp index 00907a0..8f415fb 100644 --- a/JSImpl/src/Parser.cpp +++ b/JSImpl/src/Parser.cpp @@ -140,7 +140,8 @@ ExpressionPtr Parser::PrimaryExpression(NormalType a) { if (a == NormalType::Initial) { - return SimpleExpression(); + auto simple = SimpleExpression(); + return simple; } if (auto simple = SimpleExpression()) @@ -682,9 +683,11 @@ ExpressionPtr Parser::ConditionalExpression(NormalType a, AllowType b) if (Match(TokenType::QuestionMark)) { auto trueExpr= AssignmentExpression(NormalType::Normal, b); + (void)trueExpr; if (Match(TokenType::Colon)) { auto falseExpr = AssignmentExpression(NormalType::Normal, b); + (void)falseExpr; // TODO implement trinary operator assert(false); return ExpressionPtr(); -- cgit v1.3.1-23-gd82d