Skip to content

Commit 46aae67

Browse files
committed
[gardening][Parse] Replace typedef with using
1 parent 6115216 commit 46aae67

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

include/swift/Parse/Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ class Parser {
715715
};
716716

717717
/// Options that control the parsing of declarations.
718-
typedef OptionSet<ParseDeclFlags> ParseDeclOptions;
718+
using ParseDeclOptions = OptionSet<ParseDeclFlags>;
719719

720720
void delayParseFromBeginningToHere(ParserPosition BeginParserPosition,
721721
ParseDeclOptions Flags);

include/swift/Parse/PersistentParserState.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ class PersistentParserState {
104104
bool PerformConditionEvaluation = true;
105105
private:
106106
ScopeInfo ScopeInfo;
107-
typedef llvm::DenseMap<AbstractFunctionDecl *,
108-
std::unique_ptr<FunctionBodyState>>
109-
DelayedFunctionBodiesTy;
107+
using DelayedFunctionBodiesTy =
108+
llvm::DenseMap<AbstractFunctionDecl *,
109+
std::unique_ptr<FunctionBodyState>>;
110110
DelayedFunctionBodiesTy DelayedFunctionBodies;
111111

112-
typedef llvm::DenseMap<AbstractFunctionDecl *,
113-
std::unique_ptr<AccessorBodyState>>
114-
DelayedAccessorBodiesTy;
112+
using DelayedAccessorBodiesTy =
113+
llvm::DenseMap<AbstractFunctionDecl *,
114+
std::unique_ptr<AccessorBodyState>>;
115115
DelayedAccessorBodiesTy DelayedAccessorBodies;
116116

117117
/// \brief Parser sets this if it stopped parsing before the buffer ended.

include/swift/Parse/Scope.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ namespace swift {
3333
class ScopeInfo {
3434
friend class Scope;
3535
public:
36-
typedef std::pair<unsigned, ValueDecl*> ValueScopeEntry;
37-
38-
typedef TreeScopedHashTable<DeclName, ValueScopeEntry> ScopedHTTy;
39-
typedef ScopedHTTy::ScopeTy ScopedHTScopeTy;
40-
typedef ScopedHTTy::DetachedScopeTy ScopedHTDetachedScopeTy;
36+
using ValueScopeEntry = std::pair<unsigned, ValueDecl *>;
37+
38+
using ScopedHTTy = TreeScopedHashTable<DeclName, ValueScopeEntry>;
39+
using ScopedHTScopeTy = ScopedHTTy::ScopeTy;
40+
using ScopedHTDetachedScopeTy = ScopedHTTy::DetachedScopeTy;
4141

4242
private:
4343
ScopedHTTy HT;

0 commit comments

Comments
 (0)