diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-03-29 16:17:41 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-03-30 15:04:17 +0200 |
commit | 97da5b5fe02b7fb7f0fdc4607c7759ccc8057d84 (patch) | |
tree | 538079472bfb69708b559129b5c9e8ff75e384f4 /src/qml/compiler | |
parent | 8a3bf4e2969b2f668ce06e996a8d601f834702bd (diff) |
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 <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qv4compilerscanfunctions.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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("*"); |