Skip to content

Commit a890c82

Browse files
committed
Remove use of using namespace in header file
1 parent 198b705 commit a890c82

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

libsolidity/ast/ASTAnnotations.h

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ namespace solidity::frontend
4747

4848
class Type;
4949
class ArrayType;
50-
using namespace util;
5150

5251
struct CallGraph;
5352

@@ -91,13 +90,13 @@ struct StructurallyDocumentedAnnotation
9190
struct SourceUnitAnnotation: ASTAnnotation
9291
{
9392
/// The "absolute" (in the compiler sense) path of this source unit.
94-
SetOnce<std::string> path;
93+
util::SetOnce<std::string> path;
9594
/// The exported symbols (all global symbols).
96-
SetOnce<std::map<ASTString, std::vector<Declaration const*>>> exportedSymbols;
95+
util::SetOnce<std::map<ASTString, std::vector<Declaration const*>>> exportedSymbols;
9796
/// Experimental features.
9897
std::set<ExperimentalFeature> experimentalFeatures;
9998
/// Using the new ABI coder. Set to `false` if using ABI coder v1.
100-
SetOnce<bool> useABICoderV2;
99+
util::SetOnce<bool> useABICoderV2;
101100
};
102101

103102
struct ScopableAnnotation
@@ -127,15 +126,15 @@ struct DeclarationAnnotation: ASTAnnotation, ScopableAnnotation
127126
struct ImportAnnotation: DeclarationAnnotation
128127
{
129128
/// The absolute path of the source unit to import.
130-
SetOnce<std::string> absolutePath;
129+
util::SetOnce<std::string> absolutePath;
131130
/// The actual source unit.
132131
SourceUnit const* sourceUnit = nullptr;
133132
};
134133

135134
struct TypeDeclarationAnnotation: DeclarationAnnotation
136135
{
137136
/// The name of this type, prefixed by proper namespaces if globally accessible.
138-
SetOnce<std::string> canonicalName;
137+
util::SetOnce<std::string> canonicalName;
139138
};
140139

141140
struct StructDeclarationAnnotation: TypeDeclarationAnnotation
@@ -162,9 +161,9 @@ struct ContractDefinitionAnnotation: TypeDeclarationAnnotation, StructurallyDocu
162161
/// These can either be inheritance specifiers or modifier invocations.
163162
std::map<FunctionDefinition const*, ASTNode const*> baseConstructorArguments;
164163
/// A graph with edges representing calls between functions that may happen during contract construction.
165-
SetOnce<std::shared_ptr<CallGraph const>> creationCallGraph;
164+
util::SetOnce<std::shared_ptr<CallGraph const>> creationCallGraph;
166165
/// A graph with edges representing calls between functions that may happen in a deployed contract.
167-
SetOnce<std::shared_ptr<CallGraph const>> deployedCallGraph;
166+
util::SetOnce<std::shared_ptr<CallGraph const>> deployedCallGraph;
168167

169168
/// List of contracts whose bytecode is referenced by this contract, e.g. through "new".
170169
/// The Value represents the ast node that referenced the contract.
@@ -252,19 +251,19 @@ struct IdentifierPathAnnotation: ASTAnnotation
252251
/// Referenced declaration, set during reference resolution stage.
253252
Declaration const* referencedDeclaration = nullptr;
254253
/// What kind of lookup needs to be done (static, virtual, super) find the declaration.
255-
SetOnce<VirtualLookup> requiredLookup;
254+
util::SetOnce<VirtualLookup> requiredLookup;
256255
};
257256

258257
struct ExpressionAnnotation: ASTAnnotation
259258
{
260259
/// Inferred type of the expression.
261260
Type const* type = nullptr;
262261
/// Whether the expression is a constant variable
263-
SetOnce<bool> isConstant;
262+
util::SetOnce<bool> isConstant;
264263
/// Whether the expression is pure, i.e. compile-time constant.
265-
SetOnce<bool> isPure;
264+
util::SetOnce<bool> isPure;
266265
/// Whether it is an LValue (i.e. something that can be assigned to).
267-
SetOnce<bool> isLValue;
266+
util::SetOnce<bool> isLValue;
268267
/// Whether the expression is used in a context where the LValue is actually required.
269268
bool willBeWrittenTo = false;
270269
/// Whether the expression is an lvalue that is only assigned.
@@ -291,7 +290,7 @@ struct IdentifierAnnotation: ExpressionAnnotation
291290
/// Referenced declaration, set at latest during overload resolution stage.
292291
Declaration const* referencedDeclaration = nullptr;
293292
/// What kind of lookup needs to be done (static, virtual, super) find the declaration.
294-
SetOnce<VirtualLookup> requiredLookup;
293+
util::SetOnce<VirtualLookup> requiredLookup;
295294
/// List of possible declarations it could refer to (can contain duplicates).
296295
std::vector<Declaration const*> candidateDeclarations;
297296
/// List of possible declarations it could refer to.
@@ -303,7 +302,7 @@ struct MemberAccessAnnotation: ExpressionAnnotation
303302
/// Referenced declaration, set at latest during overload resolution stage.
304303
Declaration const* referencedDeclaration = nullptr;
305304
/// What kind of lookup needs to be done (static, virtual, super) find the declaration.
306-
SetOnce<VirtualLookup> requiredLookup;
305+
util::SetOnce<VirtualLookup> requiredLookup;
307306
};
308307

309308
struct BinaryOperationAnnotation: ExpressionAnnotation

0 commit comments

Comments
 (0)