Skip to content

Commit dd4a0ec

Browse files
committed
[nfc] Format changes.
1 parent f85d687 commit dd4a0ec

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

include/swift/AST/CASTBridging.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ void *SwiftIntegerLiteralExpr_create(void *ctx, const uint8_t *_Nullable string,
125125
void *SwiftBooleanLiteralExpr_create(void *ctx, _Bool value, void *TokenLoc);
126126

127127
void *SwiftVarDecl_create(void *ctx, BridgedIdentifier _Nullable name,
128-
void *initExpr,
129-
void *loc, _Bool isStatic, _Bool isLet, void *dc);
128+
void *initExpr, void *loc, _Bool isStatic,
129+
_Bool isLet, void *dc);
130130

131131
void *IfStmt_create(void *ctx, void *ifLoc, void *cond, void *_Nullable then,
132132
void *_Nullable elseLoc, void *_Nullable elseStmt);

lib/AST/CASTBridging.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include "swift/AST/Expr.h"
77
#include "swift/AST/GenericParamList.h"
88
#include "swift/AST/Identifier.h"
9-
#include "swift/AST/Pattern.h"
109
#include "swift/AST/ParameterList.h"
10+
#include "swift/AST/Pattern.h"
1111
#include "swift/AST/Stmt.h"
1212
#include "swift/AST/TypeRepr.h"
1313

@@ -140,8 +140,8 @@ void *SwiftBooleanLiteralExpr_create(void *ctx, bool value, void *TokenLoc) {
140140
}
141141

142142
void *SwiftVarDecl_create(void *ctx, BridgedIdentifier _Nullable nameId,
143-
void *initExpr,
144-
void *loc, bool isStatic, bool isLet, void *dc) {
143+
void *initExpr, void *loc, bool isStatic, bool isLet,
144+
void *dc) {
145145
ASTContext &Context = *static_cast<ASTContext *>(ctx);
146146
auto name = (UnresolvedDeclRefExpr *)nameId;
147147
auto sourceLoc = getSourceLocFromPointer(loc);
@@ -150,7 +150,8 @@ void *SwiftVarDecl_create(void *ctx, BridgedIdentifier _Nullable nameId,
150150
sourceLoc, name->getName().getBaseIdentifier(),
151151
reinterpret_cast<DeclContext *>(dc));
152152
auto pattern = NamedPattern::createImplicit(Context, varDecl);
153-
return PatternBindingDecl::create(Context, sourceLoc,
153+
return PatternBindingDecl::create(
154+
Context, sourceLoc,
154155
isStatic ? StaticSpellingKind::KeywordStatic : StaticSpellingKind::None,
155156
sourceLoc, pattern, sourceLoc, (Expr *)initExpr,
156157
reinterpret_cast<DeclContext *>(dc));
@@ -196,8 +197,7 @@ void *ParamDecl_create(void *ctx, void *loc, void *_Nullable argLoc,
196197
BridgedIdentifier _Nullable argName,
197198
void *_Nullable paramLoc,
198199
BridgedIdentifier _Nullable paramName,
199-
void *_Nullable type,
200-
void *declContext) {
200+
void *_Nullable type, void *declContext) {
201201
ASTContext &Context = *static_cast<ASTContext *>(ctx);
202202
if (!paramName)
203203
paramName = argName;

lib/ASTGen/Sources/ASTGen/Decls.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ extension ASTGenVisitor {
7575
let isLet = node.letOrVarKeyword.tokenKind == .letKeyword
7676

7777
// TODO: don't drop "initializer" on the floor.
78-
return .decl(SwiftVarDecl_create(ctx, pattern, initializer, loc, isStateic,
79-
isLet, declContext))
78+
return .decl(
79+
SwiftVarDecl_create(
80+
ctx, pattern, initializer, loc, isStateic,
81+
isLet, declContext))
8082
}
8183

8284
public func visit(_ node: FunctionParameterSyntax) -> ASTNode {
@@ -103,7 +105,7 @@ extension ASTGenVisitor {
103105
} else {
104106
secondName = nil
105107
}
106-
108+
107109
if let typeSyntax = node.type {
108110
type = visit(typeSyntax).rawValue
109111
} else {

0 commit comments

Comments
 (0)