From 97da5b5fe02b7fb7f0fdc4607c7759ccc8057d84 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Mon, 29 Mar 2021 16:17:41 +0200 Subject: QV4CompilerScanFunctions: Silence code checker warning The AST is constructed in such a way that having exportAll set always implies that a fromClause exists. Also, clean up exportAll: We do not need a separate member to track it. Its value is fully determined by the presence of fromClause and exportsClause. Thus, replace it with a function. Change-Id: Ib7db2bbaf326ecc36a7f4a2986a7c1fb54db6cd5 Reviewed-by: Andrei Golubev Reviewed-by: Ulf Hermann --- src/qml/compiler/qv4compilerscanfunctions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qml/compiler') diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp index ebc9a86a16..a942b3d2c9 100644 --- a/src/qml/compiler/qv4compilerscanfunctions.cpp +++ b/src/qml/compiler/qv4compilerscanfunctions.cpp @@ -181,7 +181,9 @@ bool ScanFunctions::visit(ExportDeclaration *declaration) QString localNameForDefaultExport = QStringLiteral("*default*"); - if (declaration->exportAll) { + if (declaration->exportsAll()) { + Q_ASSERT_X(declaration->fromClause, "ScanFunctions", + "ExportDeclaration with exportAll always have a fromClause"); Compiler::ExportEntry entry; entry.moduleRequest = declaration->fromClause->moduleSpecifier.toString(); entry.importName = QStringLiteral("*"); -- cgit v1.2.3