Skip to content

Commit 6942c9b

Browse files
committed
[IDE] Add pretty stack trace entry for IDE inspection location
Make it easier to reproduce e.g completion crashes by logging the location the inspection was done at.
1 parent 6a3ead3 commit 6942c9b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Parse/Parser.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ bool IDEInspectionSecondPassRequest::evaluate(
125125
auto state = parserState->takeIDEInspectionDelayedDeclState();
126126
auto &Ctx = SF->getASTContext();
127127

128+
auto inspectionLoc = Ctx.SourceMgr.getIDEInspectionTargetLoc();
129+
PrettyStackTraceLocation stackTrace(Ctx, "IDE inspecting", inspectionLoc);
130+
128131
auto BufferID = Ctx.SourceMgr.getIDEInspectionTargetBufferID();
129132
Parser TheParser(BufferID, *SF, nullptr, parserState);
130133

0 commit comments

Comments
 (0)