aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/ProgramPoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/ProgramPoint.cpp')
-rw-r--r--lib/Analysis/ProgramPoint.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Analysis/ProgramPoint.cpp b/lib/Analysis/ProgramPoint.cpp
index 97e90965d007..0783fbed5315 100644
--- a/lib/Analysis/ProgramPoint.cpp
+++ b/lib/Analysis/ProgramPoint.cpp
@@ -188,7 +188,11 @@ void ProgramPoint::printJson(llvm::raw_ostream &Out, const char *NL) const {
Out << "Statement\", \"stmt_kind\": \"" << S->getStmtClassName()
<< "\", \"stmt_id\": " << S->getID(Context)
- << ", \"pointer\": \"" << (const void *)S << "\", \"pretty\": ";
+ << ", \"pointer\": \"" << (const void *)S << "\", ";
+ if (const auto *CS = dyn_cast<CastExpr>(S))
+ Out << "\"cast_kind\": \"" << CS->getCastKindName() << "\", ";
+
+ Out << "\"pretty\": ";
S->printJson(Out, nullptr, PP, AddQuotes);