Replace TypePointer with Type const*

This commit is contained in:
Mathias Baumann
2021-03-23 11:47:19 +01:00
parent 8c583784c0
commit e197ebbdd1
50 changed files with 347 additions and 353 deletions
+4 -5
View File
@@ -46,7 +46,6 @@ namespace solidity::frontend
{
class Type;
using TypePointer = Type const*;
class ArrayType;
using namespace util;
@@ -192,7 +191,7 @@ struct ModifierDefinitionAnnotation: CallableDeclarationAnnotation, Structurally
struct VariableDeclarationAnnotation: DeclarationAnnotation, StructurallyDocumentedAnnotation
{
/// Type of variable (type of identifier referencing this variable).
TypePointer type = nullptr;
Type const* type = nullptr;
/// The set of functions this (public state) variable overrides.
std::set<CallableDeclaration const*> baseFunctions;
};
@@ -239,7 +238,7 @@ struct TypeNameAnnotation: ASTAnnotation
{
/// Type declared by this type name, i.e. type of a variable where this type name is used.
/// Set during reference resolution stage.
TypePointer type = nullptr;
Type const* type = nullptr;
};
struct IdentifierPathAnnotation: ASTAnnotation
@@ -253,7 +252,7 @@ struct IdentifierPathAnnotation: ASTAnnotation
struct ExpressionAnnotation: ASTAnnotation
{
/// Inferred type of the expression.
TypePointer type = nullptr;
Type const* type = nullptr;
/// Whether the expression is a constant variable
SetOnce<bool> isConstant;
/// Whether the expression is pure, i.e. compile-time constant.
@@ -305,7 +304,7 @@ struct BinaryOperationAnnotation: ExpressionAnnotation
{
/// The common type that is used for the operation, not necessarily the result type (which
/// e.g. for comparisons is bool).
TypePointer commonType = nullptr;
Type const* commonType = nullptr;
};
enum class FunctionCallKind