From: Csaba Dabis Date: Wed, 29 May 2019 18:21:14 +0000 (+0000) Subject: [analyzer] print() JSONify: Decl revision X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d05e8e655d6567a622bdedb6a89b0101790a4a5;p=clang [analyzer] print() JSONify: Decl revision Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62495 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362002 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ProgramPoint.cpp b/lib/Analysis/ProgramPoint.cpp index fb29300f52..32ae439c8c 100644 --- a/lib/Analysis/ProgramPoint.cpp +++ b/lib/Analysis/ProgramPoint.cpp @@ -116,18 +116,16 @@ void ProgramPoint::printJson(llvm::raw_ostream &Out, const char *NL) const { case ProgramPoint::PreImplicitCallKind: { ImplicitCallPoint PC = castAs(); - Out << "PreCall\", \"stmt\": \""; - PC.getDecl()->print(Out, Context.getLangOpts()); - Out << "\", "; + Out << "PreCall\", \"decl\": \"" + << PC.getDecl()->getAsFunction()->getQualifiedNameAsString() << "\", "; printLocJson(Out, PC.getLocation(), SM); break; } case ProgramPoint::PostImplicitCallKind: { ImplicitCallPoint PC = castAs(); - Out << "PostCall\", \"stmt\": \""; - PC.getDecl()->print(Out, Context.getLangOpts()); - Out << "\", "; + Out << "PostCall\", \"decl\": \"" + << PC.getDecl()->getAsFunction()->getQualifiedNameAsString() << "\", "; printLocJson(Out, PC.getLocation(), SM); break; }