Skip to content

Commit 989b69f

Browse files
committed
[IDE] Add debug output if we use fallback type checking for code completion
1 parent 46f5119 commit 989b69f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,8 +1441,12 @@ bool CodeCompletionCallbacksImpl::trySolverCompletion(bool MaybeFuncBody) {
14411441
// switch case where there control expression is invalid). Having normal
14421442
// typechecking still resolve even these cases would be beneficial for
14431443
// tooling in general though.
1444-
if (!Lookup.gotCallback())
1444+
if (!Lookup.gotCallback()) {
1445+
if (Context.TypeCheckerOpts.DebugConstraintSolver) {
1446+
llvm::errs() << "--- Fallback typecheck for code completion ---\n";
1447+
}
14451448
Lookup.fallbackTypeCheck(CurDeclContext);
1449+
}
14461450
};
14471451

14481452
switch (Kind) {

0 commit comments

Comments
 (0)