From 61ed1f19864e48cf092417c3db903cc41a832472 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 5 Nov 2020 11:57:01 +0000 Subject: [PATCH] cleanup --- libyul/AsmParser.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libyul/AsmParser.cpp b/libyul/AsmParser.cpp index 4dcc6b19a..e1bcabaf2 100644 --- a/libyul/AsmParser.cpp +++ b/libyul/AsmParser.cpp @@ -256,9 +256,14 @@ Expression Parser::parseExpression() { if (currentToken() == Token::LParen) return parseCall(std::move(operation)); - else if (auto const& name = std::get(operation).name; m_dialect.builtin(name)) - fatalParserError(7104_error, "Builtin function \"" + name.str() + "\" must be called."); - return std::get(operation); + auto identifier = std::get(operation); + if (m_dialect.builtin(identifier.name)) + fatalParserError( + 7104_error, + identifier.location, + "Builtin function \"" + identifier.name.str() + "\" must be called." + ); + return identifier; } else {