Skip to content

Commit 478c133

Browse files
committed
IDE: Mark some functions as 'static'
1 parent 1467f55 commit 478c133

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/IDE/ExprContextAnalysis.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ class ExprParentFinder : public ASTWalker {
311311
};
312312

313313
/// Collect function (or subscript) members with the given \p name on \p baseTy.
314-
void collectPossibleCalleesByQualifiedLookup(
314+
static void collectPossibleCalleesByQualifiedLookup(
315315
DeclContext &DC, Type baseTy, DeclBaseName name,
316316
SmallVectorImpl<FunctionTypeAndDecl> &candidates) {
317317

@@ -358,7 +358,7 @@ void collectPossibleCalleesByQualifiedLookup(
358358

359359
/// Collect function (or subscript) members with the given \p name on
360360
/// \p baseExpr expression.
361-
void collectPossibleCalleesByQualifiedLookup(
361+
static void collectPossibleCalleesByQualifiedLookup(
362362
DeclContext &DC, Expr *baseExpr, DeclBaseName name,
363363
SmallVectorImpl<FunctionTypeAndDecl> &candidates) {
364364
ConcreteDeclRef ref = nullptr;
@@ -374,7 +374,7 @@ void collectPossibleCalleesByQualifiedLookup(
374374
}
375375

376376
/// For the given \c callExpr, collect possible callee types and declarations.
377-
bool collectPossibleCalleesForApply(
377+
static bool collectPossibleCalleesForApply(
378378
DeclContext &DC, ApplyExpr *callExpr,
379379
SmallVectorImpl<FunctionTypeAndDecl> &candidates) {
380380
auto *fnExpr = callExpr->getFn();
@@ -421,7 +421,7 @@ bool collectPossibleCalleesForApply(
421421

422422
/// For the given \c subscriptExpr, collect possible callee types and
423423
/// declarations.
424-
bool collectPossibleCalleesForSubscript(
424+
static bool collectPossibleCalleesForSubscript(
425425
DeclContext &DC, SubscriptExpr *subscriptExpr,
426426
SmallVectorImpl<FunctionTypeAndDecl> &candidates) {
427427
if (subscriptExpr->hasDecl()) {
@@ -441,8 +441,8 @@ bool collectPossibleCalleesForSubscript(
441441
/// Get index of \p CCExpr in \p Args. \p Args is usually a \c TupleExpr
442442
/// or \c ParenExpr.
443443
/// \returns \c true if success, \c false if \p CCExpr is not a part of \p Args.
444-
bool getPositionInArgs(DeclContext &DC, Expr *Args, Expr *CCExpr,
445-
unsigned &Position, bool &HasName) {
444+
static bool getPositionInArgs(DeclContext &DC, Expr *Args, Expr *CCExpr,
445+
unsigned &Position, bool &HasName) {
446446
if (isa<ParenExpr>(Args)) {
447447
HasName = false;
448448
Position = 0;

0 commit comments

Comments
 (0)