From a890c82f9dee11a41fcb4a987d6da8b764284b5e Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 6 Mar 2022 23:14:53 -0500 Subject: [PATCH] Remove use of `using namespace` in header file --- libsolidity/ast/ASTAnnotations.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/libsolidity/ast/ASTAnnotations.h b/libsolidity/ast/ASTAnnotations.h index 53931e426..2b07eebbd 100644 --- a/libsolidity/ast/ASTAnnotations.h +++ b/libsolidity/ast/ASTAnnotations.h @@ -47,7 +47,6 @@ namespace solidity::frontend class Type; class ArrayType; -using namespace util; struct CallGraph; @@ -91,13 +90,13 @@ struct StructurallyDocumentedAnnotation struct SourceUnitAnnotation: ASTAnnotation { /// The "absolute" (in the compiler sense) path of this source unit. - SetOnce path; + util::SetOnce path; /// The exported symbols (all global symbols). - SetOnce>> exportedSymbols; + util::SetOnce>> exportedSymbols; /// Experimental features. std::set experimentalFeatures; /// Using the new ABI coder. Set to `false` if using ABI coder v1. - SetOnce useABICoderV2; + util::SetOnce useABICoderV2; }; struct ScopableAnnotation @@ -127,7 +126,7 @@ struct DeclarationAnnotation: ASTAnnotation, ScopableAnnotation struct ImportAnnotation: DeclarationAnnotation { /// The absolute path of the source unit to import. - SetOnce absolutePath; + util::SetOnce absolutePath; /// The actual source unit. SourceUnit const* sourceUnit = nullptr; }; @@ -135,7 +134,7 @@ struct ImportAnnotation: DeclarationAnnotation struct TypeDeclarationAnnotation: DeclarationAnnotation { /// The name of this type, prefixed by proper namespaces if globally accessible. - SetOnce canonicalName; + util::SetOnce canonicalName; }; struct StructDeclarationAnnotation: TypeDeclarationAnnotation @@ -162,9 +161,9 @@ struct ContractDefinitionAnnotation: TypeDeclarationAnnotation, StructurallyDocu /// These can either be inheritance specifiers or modifier invocations. std::map baseConstructorArguments; /// A graph with edges representing calls between functions that may happen during contract construction. - SetOnce> creationCallGraph; + util::SetOnce> creationCallGraph; /// A graph with edges representing calls between functions that may happen in a deployed contract. - SetOnce> deployedCallGraph; + util::SetOnce> deployedCallGraph; /// List of contracts whose bytecode is referenced by this contract, e.g. through "new". /// The Value represents the ast node that referenced the contract. @@ -252,7 +251,7 @@ struct IdentifierPathAnnotation: ASTAnnotation /// Referenced declaration, set during reference resolution stage. Declaration const* referencedDeclaration = nullptr; /// What kind of lookup needs to be done (static, virtual, super) find the declaration. - SetOnce requiredLookup; + util::SetOnce requiredLookup; }; struct ExpressionAnnotation: ASTAnnotation @@ -260,11 +259,11 @@ struct ExpressionAnnotation: ASTAnnotation /// Inferred type of the expression. Type const* type = nullptr; /// Whether the expression is a constant variable - SetOnce isConstant; + util::SetOnce isConstant; /// Whether the expression is pure, i.e. compile-time constant. - SetOnce isPure; + util::SetOnce isPure; /// Whether it is an LValue (i.e. something that can be assigned to). - SetOnce isLValue; + util::SetOnce isLValue; /// Whether the expression is used in a context where the LValue is actually required. bool willBeWrittenTo = false; /// Whether the expression is an lvalue that is only assigned. @@ -291,7 +290,7 @@ struct IdentifierAnnotation: ExpressionAnnotation /// Referenced declaration, set at latest during overload resolution stage. Declaration const* referencedDeclaration = nullptr; /// What kind of lookup needs to be done (static, virtual, super) find the declaration. - SetOnce requiredLookup; + util::SetOnce requiredLookup; /// List of possible declarations it could refer to (can contain duplicates). std::vector candidateDeclarations; /// List of possible declarations it could refer to. @@ -303,7 +302,7 @@ struct MemberAccessAnnotation: ExpressionAnnotation /// Referenced declaration, set at latest during overload resolution stage. Declaration const* referencedDeclaration = nullptr; /// What kind of lookup needs to be done (static, virtual, super) find the declaration. - SetOnce requiredLookup; + util::SetOnce requiredLookup; }; struct BinaryOperationAnnotation: ExpressionAnnotation