summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/AnalysisDeclContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/AnalysisDeclContext.cpp')
-rw-r--r--clang/lib/Analysis/AnalysisDeclContext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Analysis/AnalysisDeclContext.cpp b/clang/lib/Analysis/AnalysisDeclContext.cpp
index ba1f8375124..28d308132fd 100644
--- a/clang/lib/Analysis/AnalysisDeclContext.cpp
+++ b/clang/lib/Analysis/AnalysisDeclContext.cpp
@@ -527,7 +527,8 @@ void LocationContext::printJson(raw_ostream &Out, const char *NL,
unsigned Frame = 0;
for (const LocationContext *LCtx = this; LCtx; LCtx = LCtx->getParent()) {
- Indent(Out, Space, IsDot) << "{ \"location_context\": \"";
+ Indent(Out, Space, IsDot)
+ << "{ \"lctx_id\": " << LCtx->getID() << ", \"location_context\": \"";
switch (LCtx->getKind()) {
case StackFrame:
Out << '#' << Frame << " Call\", \"calling\": \"";
@@ -541,7 +542,7 @@ void LocationContext::printJson(raw_ostream &Out, const char *NL,
if (const Stmt *S = cast<StackFrameContext>(LCtx)->getCallSite()) {
Out << '\"';
printLocation(Out, SM, S->getBeginLoc());
- Out << '\"';
+ Out << '\"';
} else {
Out << "null";
}
OpenPOWER on IntegriCloud