Skip to content

Commit 6115216

Browse files
authored
Merge pull request #15591 from ikesyo/demangling-using-over-typedef
[gardening][Demangling] Replace `typedef` with `using`
2 parents c8b886f + 17b833a commit 6115216

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

include/swift/Demangling/Demangle.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct DemangleOptions {
7575
};
7676

7777
class Node;
78-
typedef Node *NodePointer;
78+
using NodePointer = Node *;
7979

8080
enum class FunctionSigSpecializationParamKind : unsigned {
8181
// Option Flags use bits 0-5. This give us 6 bits implying 64 entries to
@@ -133,7 +133,7 @@ class Node {
133133
#include "swift/Demangling/DemangleNodes.def"
134134
};
135135

136-
typedef uint64_t IndexType;
136+
using IndexType = uint64_t;
137137

138138
friend class NodeFactory;
139139

@@ -182,10 +182,10 @@ class Node {
182182
assert(hasIndex());
183183
return IndexPayload;
184184
}
185-
186-
typedef NodePointer *iterator;
187-
typedef const NodePointer *const_iterator;
188-
typedef size_t size_type;
185+
186+
using iterator = NodePointer *;
187+
using const_iterator = const NodePointer *;
188+
using size_type = size_t;
189189

190190
bool hasChildren() const { return NumChildren != 0; }
191191
size_t getNumChildren() const { return NumChildren; }

include/swift/Demangling/Demangler.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ template<typename T> class Vector {
207207
size_t Capacity = 0;
208208

209209
public:
210-
211-
typedef T *iterator;
210+
using iterator = T *;
212211

213212
Vector() { }
214213

0 commit comments

Comments
 (0)