diff options
author | Alessandro Portale <[email protected]> | 2018-06-22 15:11:29 +0200 |
---|---|---|
committer | Alessandro Portale <[email protected]> | 2018-06-26 10:38:38 +0000 |
commit | 4b13170565595ed64e89589f5a54a756920a6ec0 (patch) | |
tree | bc77a0870f2cac3dad3d5cb6772ee54117b1b719 /src/libs | |
parent | 64b8f98a351a4af2e3e98c57e60d4eb0402b278d (diff) |
qmljs: Use C++11’s override and remove virtual where applicable
Fixes warning: prefer using 'override' or (rarely) 'final' instead of
'virtual' [modernize-use-override]
Change-Id: I17955fd0fdb052678228f1bda32cd8d3b4298998
Reviewed-by: Marco Benelli <[email protected]>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/qmljs/qmljscheck.cpp | 44 | ||||
-rw-r--r-- | src/libs/qmljs/qmljsfindexportedcpptypes.cpp | 4 | ||||
-rw-r--r-- | src/libs/qmljs/qmljsinterpreter.cpp | 20 | ||||
-rw-r--r-- | src/libs/qmljs/qmljsreformatter.cpp | 174 |
4 files changed, 121 insertions, 121 deletions
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 805700f9428..e4ff7047ebe 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -70,7 +70,7 @@ public: _message = Message(type, _location); } - virtual void visit(const NumberValue *value) + void visit(const NumberValue *value) override { if (const QmlEnumValue *enumValue = value_cast<QmlEnumValue>(value)) { if (StringLiteral *stringLiteral = cast<StringLiteral *>(_ast)) { @@ -90,7 +90,7 @@ public: } } - virtual void visit(const BooleanValue *) + void visit(const BooleanValue *) override { UnaryMinusExpression *unaryMinus = cast<UnaryMinusExpression *>(_ast); @@ -101,7 +101,7 @@ public: } } - virtual void visit(const StringValue *value) + void visit(const StringValue *value) override { UnaryMinusExpression *unaryMinus = cast<UnaryMinusExpression *>(_ast); @@ -132,7 +132,7 @@ public: } } - virtual void visit(const ColorValue *) + void visit(const ColorValue *) override { if (StringLiteral *stringLiteral = cast<StringLiteral *>(_ast)) { if (!toQColor(stringLiteral->value.toString()).isValid()) @@ -142,7 +142,7 @@ public: } } - virtual void visit(const AnchorLineValue *) + void visit(const AnchorLineValue *) override { if (! (_rhsValue->asAnchorLineValue() || _rhsValue->asUnknownValue())) setMessage(ErrAnchorLineExpected); @@ -189,7 +189,7 @@ protected: return _state; } - virtual bool preVisit(Node *ast) + bool preVisit(Node *ast) override { if (ast->expressionCast()) return false; @@ -204,7 +204,7 @@ protected: return false; } - virtual bool visit(LabelledStatement *ast) + bool visit(LabelledStatement *ast) override { // get the target statement Statement *end = ast->statement; @@ -219,7 +219,7 @@ protected: return true; } - virtual bool visit(BreakStatement *ast) + bool visit(BreakStatement *ast) override { _state = Break; if (!ast->label.isEmpty()) { @@ -232,12 +232,12 @@ protected: } // labelled continues don't change control flow... - virtual bool visit(ContinueStatement *) { _state = Continue; return false; } + bool visit(ContinueStatement *) override { _state = Continue; return false; } - virtual bool visit(ReturnStatement *) { _state = ReturnOrThrow; return false; } - virtual bool visit(ThrowStatement *) { _state = ReturnOrThrow; return false; } + bool visit(ReturnStatement *) override { _state = ReturnOrThrow; return false; } + bool visit(ThrowStatement *) override { _state = ReturnOrThrow; return false; } - virtual bool visit(IfStatement *ast) + bool visit(IfStatement *ast) override { State ok = check(ast->ok); State ko = check(ast->ko); @@ -256,7 +256,7 @@ protected: } } - virtual bool visit(SwitchStatement *ast) + bool visit(SwitchStatement *ast) override { if (!ast->block) return false; @@ -282,7 +282,7 @@ protected: return false; } - virtual bool visit(TryStatement *ast) + bool visit(TryStatement *ast) override { State tryBody = check(ast->statement); State catchBody = ReturnOrThrow; @@ -303,13 +303,13 @@ protected: return false; } - virtual bool visit(WhileStatement *ast) { return preconditionLoopStatement(ast, ast->statement); } - virtual bool visit(ForStatement *ast) { return preconditionLoopStatement(ast, ast->statement); } - virtual bool visit(ForEachStatement *ast) { return preconditionLoopStatement(ast, ast->statement); } - virtual bool visit(LocalForStatement *ast) { return preconditionLoopStatement(ast, ast->statement); } - virtual bool visit(LocalForEachStatement *ast) { return preconditionLoopStatement(ast, ast->statement); } + bool visit(WhileStatement *ast) override { return preconditionLoopStatement(ast, ast->statement); } + bool visit(ForStatement *ast) override { return preconditionLoopStatement(ast, ast->statement); } + bool visit(ForEachStatement *ast) override { return preconditionLoopStatement(ast, ast->statement); } + bool visit(LocalForStatement *ast) override { return preconditionLoopStatement(ast, ast->statement); } + bool visit(LocalForEachStatement *ast) override { return preconditionLoopStatement(ast, ast->statement); } - virtual bool visit(DoWhileStatement *ast) + bool visit(DoWhileStatement *ast) override { check(ast->statement); // not necessarily an infinite loop due to labelled breaks @@ -335,7 +335,7 @@ public: } protected: - virtual State check(Node *node) + State check(Node *node) override { bool oldwarning = _emittedWarning; _emittedWarning = false; @@ -344,7 +344,7 @@ protected: return s; } - virtual void onUnreachable(Node *node) + void onUnreachable(Node *node) override { if (_emittedWarning) return; diff --git a/src/libs/qmljs/qmljsfindexportedcpptypes.cpp b/src/libs/qmljs/qmljsfindexportedcpptypes.cpp index 84ada6a0d63..6bf17505d68 100644 --- a/src/libs/qmljs/qmljsfindexportedcpptypes.cpp +++ b/src/libs/qmljs/qmljsfindexportedcpptypes.cpp @@ -119,7 +119,7 @@ public: } protected: - virtual bool visit(CompoundStatementAST *ast) + bool visit(CompoundStatementAST *ast) override { CompoundStatementAST *old = _compound; _compound = ast; @@ -128,7 +128,7 @@ protected: return false; } - virtual bool visit(CallAST *ast) + bool visit(CallAST *ast) override { if (checkForQmlRegisterType(ast)) return false; diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index eaf27d433e7..d8df6ed570f 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -103,27 +103,27 @@ public: const Value *value() const { return m_value; } - virtual bool processProperty(const QString &name, const Value *value, const PropertyInfo &) + bool processProperty(const QString &name, const Value *value, const PropertyInfo &) override { return process(name, value); } - virtual bool processEnumerator(const QString &name, const Value *value) + bool processEnumerator(const QString &name, const Value *value) override { return process(name, value); } - virtual bool processSignal(const QString &name, const Value *value) + bool processSignal(const QString &name, const Value *value) override { return process(name, value); } - virtual bool processSlot(const QString &name, const Value *value) + bool processSlot(const QString &name, const Value *value) override { return process(name, value); } - virtual bool processGeneratedSlot(const QString &name, const Value *value) + bool processGeneratedSlot(const QString &name, const Value *value) override { return process(name, value); } @@ -2574,31 +2574,31 @@ class MemberDumper: public MemberProcessor public: MemberDumper() {} - virtual bool processProperty(const QString &name, const Value *, const PropertyInfo &pInfo) + bool processProperty(const QString &name, const Value *, const PropertyInfo &pInfo) override { qCDebug(qmljsLog) << "property: " << name << " flags:" << pInfo.toString(); return true; } - virtual bool processEnumerator(const QString &name, const Value *) + bool processEnumerator(const QString &name, const Value *) override { qCDebug(qmljsLog) << "enumerator: " << name; return true; } - virtual bool processSignal(const QString &name, const Value *) + bool processSignal(const QString &name, const Value *) override { qCDebug(qmljsLog) << "signal: " << name; return true; } - virtual bool processSlot(const QString &name, const Value *) + bool processSlot(const QString &name, const Value *) override { qCDebug(qmljsLog) << "slot: " << name; return true; } - virtual bool processGeneratedSlot(const QString &name, const Value *) + bool processGeneratedSlot(const QString &name, const Value *) override { qCDebug(qmljsLog) << "generated slot: " << name; return true; diff --git a/src/libs/qmljs/qmljsreformatter.cpp b/src/libs/qmljs/qmljsreformatter.cpp index 10bd46fd8b0..2116fa74676 100644 --- a/src/libs/qmljs/qmljsreformatter.cpp +++ b/src/libs/qmljs/qmljsreformatter.cpp @@ -53,12 +53,12 @@ protected: BlockData data; }; - virtual void saveBlockData(QTextBlock *block, const BlockData &data) const + void saveBlockData(QTextBlock *block, const BlockData &data) const override { block->setUserData(new FormatterData(data)); } - virtual bool loadBlockData(const QTextBlock &block, BlockData *data) const + bool loadBlockData(const QTextBlock &block, BlockData *data) const override { if (!block.userData()) return false; @@ -67,12 +67,12 @@ protected: return true; } - virtual void saveLexerState(QTextBlock *block, int state) const + void saveLexerState(QTextBlock *block, int state) const override { block->setUserState(state); } - virtual int loadLexerState(const QTextBlock &block) const + int loadLexerState(const QTextBlock &block) const override { return block.userState(); } @@ -464,7 +464,7 @@ protected: loc.length += 2; } - virtual bool preVisit(Node *ast) + bool preVisit(Node *ast) override { SourceLocation firstLoc; if (ExpressionNode *expr = ast->expressionCast()) @@ -486,7 +486,7 @@ protected: return true; } - virtual void postVisit(Node *ast) + void postVisit(Node *ast) override { SourceLocation lastLoc; if (ExpressionNode *expr = ast->expressionCast()) @@ -525,14 +525,14 @@ protected: } } - virtual bool visit(UiPragma *ast) + bool visit(UiPragma *ast) override { out("pragma ", ast->pragmaToken); accept(ast->pragmaType); return false; } - virtual bool visit(UiImport *ast) + bool visit(UiImport *ast) override { out("import ", ast->importToken); if (!ast->fileName.isNull()) @@ -550,7 +550,7 @@ protected: return false; } - virtual bool visit(UiObjectDefinition *ast) + bool visit(UiObjectDefinition *ast) override { accept(ast->qualifiedTypeNameId); out(" "); @@ -558,7 +558,7 @@ protected: return false; } - virtual bool visit(UiObjectInitializer *ast) + bool visit(UiObjectInitializer *ast) override { out(ast->lbraceToken); if (ast->members) @@ -568,7 +568,7 @@ protected: return false; } - virtual bool visit(UiParameterList *list) + bool visit(UiParameterList *list) override { for (UiParameterList *it = list; it; it = it->next) { out(it->propertyTypeToken); @@ -580,7 +580,7 @@ protected: return false; } - virtual bool visit(UiPublicMember *ast) + bool visit(UiPublicMember *ast) override { if (ast->type == UiPublicMember::Property) { if (ast->isDefaultMember) @@ -618,7 +618,7 @@ protected: return false; } - virtual bool visit(UiObjectBinding *ast) + bool visit(UiObjectBinding *ast) override { if (ast->hasOnToken) { accept(ast->qualifiedTypeNameId); @@ -634,7 +634,7 @@ protected: return false; } - virtual bool visit(UiScriptBinding *ast) + bool visit(UiScriptBinding *ast) override { accept(ast->qualifiedId); out(": ", ast->colonToken); @@ -642,7 +642,7 @@ protected: return false; } - virtual bool visit(UiArrayBinding *ast) + bool visit(UiArrayBinding *ast) override { accept(ast->qualifiedId); out(ast->colonToken); @@ -654,16 +654,16 @@ protected: return false; } - virtual bool visit(ThisExpression *ast) { out(ast->thisToken); return true; } - virtual bool visit(NullExpression *ast) { out(ast->nullToken); return true; } - virtual bool visit(TrueLiteral *ast) { out(ast->trueToken); return true; } - virtual bool visit(FalseLiteral *ast) { out(ast->falseToken); return true; } - virtual bool visit(IdentifierExpression *ast) { out(ast->identifierToken); return true; } - virtual bool visit(StringLiteral *ast) { out(ast->literalToken); return true; } - virtual bool visit(NumericLiteral *ast) { out(ast->literalToken); return true; } - virtual bool visit(RegExpLiteral *ast) { out(ast->literalToken); return true; } + bool visit(ThisExpression *ast) override { out(ast->thisToken); return true; } + bool visit(NullExpression *ast) override { out(ast->nullToken); return true; } + bool visit(TrueLiteral *ast) override { out(ast->trueToken); return true; } + bool visit(FalseLiteral *ast) override { out(ast->falseToken); return true; } + bool visit(IdentifierExpression *ast) override { out(ast->identifierToken); return true; } + bool visit(StringLiteral *ast) override { out(ast->literalToken); return true; } + bool visit(NumericLiteral *ast) override { out(ast->literalToken); return true; } + bool visit(RegExpLiteral *ast) override { out(ast->literalToken); return true; } - virtual bool visit(ArrayLiteral *ast) + bool visit(ArrayLiteral *ast) override { out(ast->lbracketToken); if (ast->elements) @@ -676,7 +676,7 @@ protected: return false; } - virtual bool visit(ObjectLiteral *ast) + bool visit(ObjectLiteral *ast) override { out(ast->lbraceToken); lnAcceptIndented(ast->properties); @@ -685,7 +685,7 @@ protected: return false; } - virtual bool visit(ElementList *ast) + bool visit(ElementList *ast) override { for (ElementList *it = ast; it; it = it->next) { if (it->elision) @@ -700,7 +700,7 @@ protected: return false; } - virtual bool visit(PropertyAssignmentList *ast) + bool visit(PropertyAssignmentList *ast) override { for (PropertyAssignmentList *it = ast; it; it = it->next) { PropertyNameAndValue *assignment = AST::cast<PropertyNameAndValue *>(it->assignment); @@ -739,7 +739,7 @@ protected: return false; } - virtual bool visit(NestedExpression *ast) + bool visit(NestedExpression *ast) override { out(ast->lparenToken); accept(ast->expression); @@ -747,11 +747,11 @@ protected: return false; } - virtual bool visit(IdentifierPropertyName *ast) { out(ast->id.toString()); return true; } - virtual bool visit(StringLiteralPropertyName *ast) { out(ast->id.toString()); return true; } - virtual bool visit(NumericLiteralPropertyName *ast) { out(QString::number(ast->id)); return true; } + bool visit(IdentifierPropertyName *ast) override { out(ast->id.toString()); return true; } + bool visit(StringLiteralPropertyName *ast) override { out(ast->id.toString()); return true; } + bool visit(NumericLiteralPropertyName *ast) override { out(QString::number(ast->id)); return true; } - virtual bool visit(ArrayMemberExpression *ast) + bool visit(ArrayMemberExpression *ast) override { accept(ast->base); out(ast->lbracketToken); @@ -760,7 +760,7 @@ protected: return false; } - virtual bool visit(FieldMemberExpression *ast) + bool visit(FieldMemberExpression *ast) override { accept(ast->base); out(ast->dotToken); @@ -768,7 +768,7 @@ protected: return false; } - virtual bool visit(NewMemberExpression *ast) + bool visit(NewMemberExpression *ast) override { out("new ", ast->newToken); accept(ast->base); @@ -778,14 +778,14 @@ protected: return false; } - virtual bool visit(NewExpression *ast) + bool visit(NewExpression *ast) override { out("new ", ast->newToken); accept(ast->expression); return false; } - virtual bool visit(CallExpression *ast) + bool visit(CallExpression *ast) override { accept(ast->base); out(ast->lparenToken); @@ -795,84 +795,84 @@ protected: return false; } - virtual bool visit(PostIncrementExpression *ast) + bool visit(PostIncrementExpression *ast) override { accept(ast->base); out(ast->incrementToken); return false; } - virtual bool visit(PostDecrementExpression *ast) + bool visit(PostDecrementExpression *ast) override { accept(ast->base); out(ast->decrementToken); return false; } - virtual bool visit(PreIncrementExpression *ast) + bool visit(PreIncrementExpression *ast) override { out(ast->incrementToken); accept(ast->expression); return false; } - virtual bool visit(PreDecrementExpression *ast) + bool visit(PreDecrementExpression *ast) override { out(ast->decrementToken); accept(ast->expression); return false; } - virtual bool visit(DeleteExpression *ast) + bool visit(DeleteExpression *ast) override { out("delete ", ast->deleteToken); accept(ast->expression); return false; } - virtual bool visit(VoidExpression *ast) + bool visit(VoidExpression *ast) override { out("void ", ast->voidToken); accept(ast->expression); return false; } - virtual bool visit(TypeOfExpression *ast) + bool visit(TypeOfExpression *ast) override { out("typeof ", ast->typeofToken); accept(ast->expression); return false; } - virtual bool visit(UnaryPlusExpression *ast) + bool visit(UnaryPlusExpression *ast) override { out(ast->plusToken); accept(ast->expression); return false; } - virtual bool visit(UnaryMinusExpression *ast) + bool visit(UnaryMinusExpression *ast) override { out(ast->minusToken); accept(ast->expression); return false; } - virtual bool visit(TildeExpression *ast) + bool visit(TildeExpression *ast) override { out(ast->tildeToken); accept(ast->expression); return false; } - virtual bool visit(NotExpression *ast) + bool visit(NotExpression *ast) override { out(ast->notToken); accept(ast->expression); return false; } - virtual bool visit(BinaryExpression *ast) + bool visit(BinaryExpression *ast) override { ++_binaryExpDepth; accept(ast->left); @@ -893,7 +893,7 @@ protected: return false; } - virtual bool visit(ConditionalExpression *ast) + bool visit(ConditionalExpression *ast) override { accept(ast->expression); out(" ? ", ast->questionToken); @@ -903,7 +903,7 @@ protected: return false; } - virtual bool visit(Block *ast) + bool visit(Block *ast) override { out(ast->lbraceToken); lnAcceptIndented(ast->statements); @@ -912,14 +912,14 @@ protected: return false; } - virtual bool visit(VariableStatement *ast) + bool visit(VariableStatement *ast) override { out("var ", ast->declarationKindToken); accept(ast->declarations); return false; } - virtual bool visit(VariableDeclaration *ast) + bool visit(VariableDeclaration *ast) override { out(ast->identifierToken); if (ast->expression) { @@ -929,13 +929,13 @@ protected: return false; } - virtual bool visit(EmptyStatement *ast) + bool visit(EmptyStatement *ast) override { out(ast->semicolonToken); return false; } - virtual bool visit(IfStatement *ast) + bool visit(IfStatement *ast) override { out(ast->ifToken); out(" "); @@ -955,7 +955,7 @@ protected: return false; } - virtual bool visit(DoWhileStatement *ast) + bool visit(DoWhileStatement *ast) override { out(ast->doToken); acceptBlockOrIndented(ast->statement, true); @@ -967,7 +967,7 @@ protected: return false; } - virtual bool visit(WhileStatement *ast) + bool visit(WhileStatement *ast) override { out(ast->whileToken); out(" "); @@ -978,7 +978,7 @@ protected: return false; } - virtual bool visit(ForStatement *ast) + bool visit(ForStatement *ast) override { out(ast->forToken); out(" "); @@ -993,7 +993,7 @@ protected: return false; } - virtual bool visit(LocalForStatement *ast) + bool visit(LocalForStatement *ast) override { out(ast->forToken); out(" "); @@ -1010,7 +1010,7 @@ protected: return false; } - virtual bool visit(ForEachStatement *ast) + bool visit(ForEachStatement *ast) override { out(ast->forToken); out(" "); @@ -1023,7 +1023,7 @@ protected: return false; } - virtual bool visit(LocalForEachStatement *ast) + bool visit(LocalForEachStatement *ast) override { out(ast->forToken); out(" "); @@ -1038,7 +1038,7 @@ protected: return false; } - virtual bool visit(ContinueStatement *ast) + bool visit(ContinueStatement *ast) override { out(ast->continueToken); if (!ast->label.isNull()) { @@ -1048,7 +1048,7 @@ protected: return false; } - virtual bool visit(BreakStatement *ast) + bool visit(BreakStatement *ast) override { out(ast->breakToken); if (!ast->label.isNull()) { @@ -1058,7 +1058,7 @@ protected: return false; } - virtual bool visit(ReturnStatement *ast) + bool visit(ReturnStatement *ast) override { out(ast->returnToken); if (ast->expression) { @@ -1068,7 +1068,7 @@ protected: return false; } - virtual bool visit(ThrowStatement *ast) + bool visit(ThrowStatement *ast) override { out(ast->throwToken); if (ast->expression) { @@ -1078,7 +1078,7 @@ protected: return false; } - virtual bool visit(WithStatement *ast) + bool visit(WithStatement *ast) override { out(ast->withToken); out(" "); @@ -1089,7 +1089,7 @@ protected: return false; } - virtual bool visit(SwitchStatement *ast) + bool visit(SwitchStatement *ast) override { out(ast->switchToken); out(" "); @@ -1101,7 +1101,7 @@ protected: return false; } - virtual bool visit(CaseBlock *ast) + bool visit(CaseBlock *ast) override { out(ast->lbraceToken); newLine(); @@ -1117,7 +1117,7 @@ protected: return false; } - virtual bool visit(CaseClause *ast) + bool visit(CaseClause *ast) override { out("case ", ast->caseToken); accept(ast->expression); @@ -1127,7 +1127,7 @@ protected: return false; } - virtual bool visit(DefaultClause *ast) + bool visit(DefaultClause *ast) override { out(ast->defaultToken); out(ast->colonToken); @@ -1135,7 +1135,7 @@ protected: return false; } - virtual bool visit(LabelledStatement *ast) + bool visit(LabelledStatement *ast) override { out(ast->identifierToken); out(": ", ast->colonToken); @@ -1143,7 +1143,7 @@ protected: return false; } - virtual bool visit(TryStatement *ast) + bool visit(TryStatement *ast) override { out("try ", ast->tryToken); accept(ast->statement); @@ -1158,7 +1158,7 @@ protected: return false; } - virtual bool visit(Catch *ast) + bool visit(Catch *ast) override { out(ast->catchToken); out(" "); @@ -1169,19 +1169,19 @@ protected: return false; } - virtual bool visit(Finally *ast) + bool visit(Finally *ast) override { out("finally ", ast->finallyToken); accept(ast->statement); return false; } - virtual bool visit(FunctionDeclaration *ast) + bool visit(FunctionDeclaration *ast) override { return visit(static_cast<FunctionExpression *>(ast)); } - virtual bool visit(FunctionExpression *ast) + bool visit(FunctionExpression *ast) override { out("function ", ast->functionToken); if (!ast->name.isNull()) @@ -1200,7 +1200,7 @@ protected: } - virtual bool visit(UiHeaderItemList *ast) + bool visit(UiHeaderItemList *ast) override { for (UiHeaderItemList *it = ast; it; it = it->next) { accept(it->headerItem); @@ -1210,7 +1210,7 @@ protected: return false; } - virtual bool visit(UiObjectMemberList *ast) + bool visit(UiObjectMemberList *ast) override { for (UiObjectMemberList *it = ast; it; it = it->next) { accept(it->member); @@ -1220,7 +1220,7 @@ protected: return false; } - virtual bool visit(UiArrayMemberList *ast) + bool visit(UiArrayMemberList *ast) override { for (UiArrayMemberList *it = ast; it; it = it->next) { accept(it->member); @@ -1232,7 +1232,7 @@ protected: return false; } - virtual bool visit(UiQualifiedId *ast) + bool visit(UiQualifiedId *ast) override { for (UiQualifiedId *it = ast; it; it = it->next) { out(it->identifierToken); @@ -1242,13 +1242,13 @@ protected: return false; } - virtual bool visit(UiQualifiedPragmaId *ast) + bool visit(UiQualifiedPragmaId *ast) override { out(ast->identifierToken); return false; } - virtual bool visit(Elision *ast) + bool visit(Elision *ast) override { for (Elision *it = ast; it; it = it->next) { if (it->next) @@ -1257,7 +1257,7 @@ protected: return false; } - virtual bool visit(ArgumentList *ast) + bool visit(ArgumentList *ast) override { for (ArgumentList *it = ast; it; it = it->next) { accept(it->expression); @@ -1269,7 +1269,7 @@ protected: return false; } - virtual bool visit(StatementList *ast) + bool visit(StatementList *ast) override { for (StatementList *it = ast; it; it = it->next) { // ### work around parser bug: skip empty statements with wrong tokens @@ -1285,7 +1285,7 @@ protected: return false; } - virtual bool visit(SourceElements *ast) + bool visit(SourceElements *ast) override { for (SourceElements *it = ast; it; it = it->next) { accept(it->element); @@ -1295,7 +1295,7 @@ protected: return false; } - virtual bool visit(VariableDeclarationList *ast) + bool visit(VariableDeclarationList *ast) override { for (VariableDeclarationList *it = ast; it; it = it->next) { accept(it->declaration); @@ -1305,7 +1305,7 @@ protected: return false; } - virtual bool visit(CaseClauses *ast) + bool visit(CaseClauses *ast) override { for (CaseClauses *it = ast; it; it = it->next) { accept(it->clause); @@ -1315,7 +1315,7 @@ protected: return false; } - virtual bool visit(FormalParameterList *ast) + bool visit(FormalParameterList *ast) override { for (FormalParameterList *it = ast; it; it = it->next) { if (it->commaToken.isValid()) |