Remove plain new operators from AST.

This commit is contained in:
chriseth
2019-11-27 18:03:09 +01:00
parent 0bb88dabb7
commit 23181f549e
2 changed files with 25 additions and 30 deletions
+2 -2
View File
@@ -67,7 +67,7 @@ public:
using SourceLocation = langutil::SourceLocation;
explicit ASTNode(SourceLocation const& _location);
virtual ~ASTNode();
virtual ~ASTNode() {}
/// @returns an identifier of this AST node that is unique for a single compilation run.
size_t id() const { return m_id; }
@@ -111,7 +111,7 @@ public:
protected:
size_t const m_id = 0;
/// Annotation - is specialised in derived classes, is created upon request (because of polymorphism).
mutable ASTAnnotation* m_annotation = nullptr;
mutable std::unique_ptr<ASTAnnotation> m_annotation;
private:
SourceLocation m_location;