Skip to content

Commit 2304bb9

Browse files
authored
Merge pull request #59837 from ahoppen/pr/rename-dotexprcompletion-postfixcompletion
[CodeCompletion] Rename DotExprCompletion -> PostfixCompletion
2 parents 57807fb + 803e667 commit 2304bb9

File tree

4 files changed

+21
-23
lines changed

4 files changed

+21
-23
lines changed

include/swift/IDE/DotExprCompletion.h renamed to include/swift/IDE/PostfixCompletion.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef SWIFT_IDE_DOTEXPRCODECOMPLETION_H
14-
#define SWIFT_IDE_DOTEXPRCODECOMPLETION_H
13+
#ifndef SWIFT_IDE_POSTFIXCOMPLETION_H
14+
#define SWIFT_IDE_POSTFIXCOMPLETION_H
1515

1616
#include "swift/IDE/CodeCompletionConsumer.h"
1717
#include "swift/IDE/CodeCompletionContext.h"
@@ -23,7 +23,7 @@ namespace ide {
2323
/// Used to collect and store information needed to perform member completion
2424
/// (\c CompletionKind::DotExpr ) from the solutions formed during expression
2525
/// type-checking.
26-
class DotExprTypeCheckCompletionCallback : public TypeCheckCompletionCallback {
26+
class PostfixCompletionCallback : public TypeCheckCompletionCallback {
2727
struct Result {
2828
Type BaseTy;
2929
ValueDecl *BaseDecl;
@@ -46,8 +46,7 @@ class DotExprTypeCheckCompletionCallback : public TypeCheckCompletionCallback {
4646
void sawSolutionImpl(const constraints::Solution &solution) override;
4747

4848
public:
49-
DotExprTypeCheckCompletionCallback(CodeCompletionExpr *CompletionExpr,
50-
DeclContext *DC)
49+
PostfixCompletionCallback(CodeCompletionExpr *CompletionExpr, DeclContext *DC)
5150
: CompletionExpr(CompletionExpr), DC(DC) {}
5251

5352
/// Typecheck the code completion expression in isolation, calling
@@ -62,4 +61,4 @@ class DotExprTypeCheckCompletionCallback : public TypeCheckCompletionCallback {
6261
} // end namespace ide
6362
} // end namespace swift
6463

65-
#endif // SWIFT_IDE_DOTEXPRCODECOMPLETION_H
64+
#endif // SWIFT_IDE_POSTFIXCOMPLETION_H

lib/IDE/CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11

22
add_swift_host_library(swiftIDE STATIC
33
AfterPoundExprCompletion.cpp
4+
APIDigesterData.cpp
45
ArgumentCompletion.cpp
56
CodeCompletion.cpp
67
CodeCompletionCache.cpp
7-
CodeCompletionContext.cpp
88
CodeCompletionConsumer.cpp
9+
CodeCompletionContext.cpp
910
CodeCompletionDiagnostics.cpp
11+
CodeCompletionResult.cpp
1012
CodeCompletionResultBuilder.cpp
1113
CodeCompletionResultPrinter.cpp
12-
CodeCompletionResult.cpp
1314
CodeCompletionResultType.cpp
1415
CodeCompletionString.cpp
1516
CodeCompletionStringPrinter.cpp
@@ -20,26 +21,25 @@ add_swift_host_library(swiftIDE STATIC
2021
CompletionOverrideLookup.cpp
2122
ConformingMethodList.cpp
2223
DependencyChecking.cpp
23-
DotExprCompletion.cpp
2424
ExprCompletion.cpp
2525
ExprContextAnalysis.cpp
2626
Formatting.cpp
2727
FuzzyStringMatcher.cpp
28-
Refactoring.cpp
28+
IDERequests.cpp
29+
IDETypeChecking.cpp
30+
ImportDepth.cpp
2931
KeyPathCompletion.cpp
3032
ModuleInterfacePrinting.cpp
33+
PostfixCompletion.cpp
34+
Refactoring.cpp
3135
REPLCodeCompletion.cpp
36+
SourceEntityWalker.cpp
3237
SwiftSourceDocInfo.cpp
3338
SyntaxModel.cpp
3439
TypeCheckCompletionCallback.cpp
40+
TypeContextInfo.cpp
3541
UnresolvedMemberCompletion.cpp
3642
Utils.cpp
37-
IDETypeChecking.cpp
38-
ImportDepth.cpp
39-
APIDigesterData.cpp
40-
SourceEntityWalker.cpp
41-
TypeContextInfo.cpp
42-
IDERequests.cpp
4343
)
4444
target_link_libraries(swiftIDE PRIVATE
4545
swiftAST

lib/IDE/CodeCompletion.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
#include "swift/IDE/CodeCompletionStringPrinter.h"
4141
#include "swift/IDE/CompletionLookup.h"
4242
#include "swift/IDE/CompletionOverrideLookup.h"
43-
#include "swift/IDE/DotExprCompletion.h"
4443
#include "swift/IDE/ExprCompletion.h"
4544
#include "swift/IDE/KeyPathCompletion.h"
45+
#include "swift/IDE/PostfixCompletion.h"
4646
#include "swift/IDE/TypeCheckCompletionCallback.h"
4747
#include "swift/IDE/UnresolvedMemberCompletion.h"
4848
#include "swift/IDE/Utils.h"
@@ -1413,8 +1413,7 @@ bool CodeCompletionCallbacksImpl::trySolverCompletion(bool MaybeFuncBody) {
14131413
assert(CodeCompleteTokenExpr);
14141414
assert(CurDeclContext);
14151415

1416-
DotExprTypeCheckCompletionCallback Lookup(CodeCompleteTokenExpr,
1417-
CurDeclContext);
1416+
PostfixCompletionCallback Lookup(CodeCompleteTokenExpr, CurDeclContext);
14181417
typeCheckWithLookup(Lookup);
14191418

14201419
addKeywords(CompletionContext.getResultSink(), MaybeFuncBody);

lib/IDE/DotExprCompletion.cpp renamed to lib/IDE/PostfixCompletion.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "swift/IDE/DotExprCompletion.h"
13+
#include "swift/IDE/PostfixCompletion.h"
1414
#include "swift/IDE/CodeCompletion.h"
1515
#include "swift/IDE/CompletionLookup.h"
1616
#include "swift/Sema/CompletionContextFinder.h"
@@ -21,7 +21,7 @@ using namespace swift;
2121
using namespace swift::constraints;
2222
using namespace swift::ide;
2323

24-
void DotExprTypeCheckCompletionCallback::fallbackTypeCheck(DeclContext *DC) {
24+
void PostfixCompletionCallback::fallbackTypeCheck(DeclContext *DC) {
2525
assert(!gotCallback());
2626

2727
// Default to checking the completion expression in isolation.
@@ -44,7 +44,7 @@ void DotExprTypeCheckCompletionCallback::fallbackTypeCheck(DeclContext *DC) {
4444
[&](const Solution &S) { sawSolution(S); });
4545
}
4646

47-
void DotExprTypeCheckCompletionCallback::sawSolutionImpl(
47+
void PostfixCompletionCallback::sawSolutionImpl(
4848
const constraints::Solution &S) {
4949
auto &CS = S.getConstraintSystem();
5050
auto *ParsedExpr = CompletionExpr->getBase();
@@ -96,7 +96,7 @@ void DotExprTypeCheckCompletionCallback::sawSolutionImpl(
9696
}
9797
}
9898

99-
void DotExprTypeCheckCompletionCallback::deliverResults(
99+
void PostfixCompletionCallback::deliverResults(
100100
Expr *BaseExpr, DeclContext *DC, SourceLoc DotLoc, bool IsInSelector,
101101
CodeCompletionContext &CompletionCtx, CodeCompletionConsumer &Consumer) {
102102
ASTContext &Ctx = DC->getASTContext();

0 commit comments

Comments
 (0)