[docs] Fix Kaleidoscope code example

* replace virtual with override
* use default like in full code example

Differential Revision: https://reviews.llvm.org/D123110
This commit is contained in:
Roman Sokolkov 2022-04-06 10:38:07 +01:00 committed by Jay Foad
parent 3369e474bb
commit 153431ec7a
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class:
/// ExprAST - Base class for all expression nodes.
class ExprAST {
public:
virtual ~ExprAST() {}
virtual ~ExprAST() = default;
virtual Value *codegen() = 0;
};
@ -44,7 +44,7 @@ class:
public:
NumberExprAST(double Val) : Val(Val) {}
virtual Value *codegen();
Value *codegen() override;
};
...