Skip to content

Commit 76e01b8

Browse files
author
Simon Barinka
committed
[SourceKit] Address minor PR comments
1 parent e5fa3f9 commit 76e01b8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ fillSymbolInfo(CursorSymbolInfo &Symbol, const DeclInfo &DInfo,
11511151
return llvm::Error::success();
11521152
}
11531153

1154-
// If E is a literal, returns the declaration that should be reported by
1154+
// If \p E is a literal, returns the declaration that should be reported by
11551155
// cursor info for that initializer.
11561156
static ValueDecl *getCursorInfoDeclForLiteral(Expr *E) {
11571157
if (auto *CollectionLit = dyn_cast<CollectionExpr>(E)) {
@@ -1163,7 +1163,7 @@ static ValueDecl *getCursorInfoDeclForLiteral(Expr *E) {
11631163
return nullptr;
11641164
}
11651165

1166-
bool IsObjectLiteral = dyn_cast<ObjectLiteralExpr>(E);
1166+
bool IsObjectLiteral = isa<ObjectLiteralExpr>(E);
11671167
if (!IsObjectLiteral && LitExpr->getInitializer().getDecl()) {
11681168
return LitExpr->getInitializer().getDecl();
11691169
}
@@ -1192,13 +1192,13 @@ static bool addCursorInfoForLiteral(
11921192
return false;
11931193
}
11941194

1195-
ValueDecl *InitDecl = getCursorInfoDeclForLiteral(LitExpr);
1196-
if (!InitDecl) {
1195+
ValueDecl *Decl = getCursorInfoDeclForLiteral(LitExpr);
1196+
if (!Decl) {
11971197
return false;
11981198
}
11991199

12001200
auto &Symbol = Data.Symbols.emplace_back();
1201-
DeclInfo Info(InitDecl, nullptr, true, false, {}, CompInvoc);
1201+
DeclInfo Info(Decl, nullptr, true, false, {}, CompInvoc);
12021202
auto Err = fillSymbolInfo(Symbol, Info, CursorLoc, false, Lang, CompInvoc,
12031203
PreviousSnaps, Data.Allocator);
12041204

0 commit comments

Comments
 (0)