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/parser | |
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/parser')
-rw-r--r-- | src/qml/parser/qqmljsast_p.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h index cb6d5fa3ee..6836579209 100644 --- a/src/qml/parser/qqmljsast_p.h +++ b/src/qml/parser/qqmljsast_p.h @@ -2957,7 +2957,6 @@ public: ExportDeclaration(FromClause *fromClause) : fromClause(fromClause) { - exportAll = true; kind = K; } @@ -2980,6 +2979,11 @@ public: kind = K; } + bool exportsAll() const + { + return fromClause && !exportClause; + } + void accept0(BaseVisitor *visitor) override; SourceLocation firstSourceLocation() const override @@ -2989,7 +2993,6 @@ public: // attributes SourceLocation exportToken; - bool exportAll = false; ExportClause *exportClause = nullptr; FromClause *fromClause = nullptr; Node *variableStatementOrDeclaration = nullptr; |