]> granicus.if.org Git - clang/commitdiff
[analyzer] print() JSONify: Decl revision
authorCsaba Dabis <dabis.csaba98@gmail.com>
Wed, 29 May 2019 18:21:14 +0000 (18:21 +0000)
committerCsaba Dabis <dabis.csaba98@gmail.com>
Wed, 29 May 2019 18:21:14 +0000 (18:21 +0000)
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

lib/Analysis/ProgramPoint.cpp

index fb29300f520f1d646e82ee65473d33a29c261b9e..32ae439c8ca5dcb7e0ca443a78f3ada08a0746ac 100644 (file)
@@ -116,18 +116,16 @@ void ProgramPoint::printJson(llvm::raw_ostream &Out, const char *NL) const {
 
   case ProgramPoint::PreImplicitCallKind: {
     ImplicitCallPoint PC = castAs<ImplicitCallPoint>();
-    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<ImplicitCallPoint>();
-    Out << "PostCall\", \"stmt\": \"";
-    PC.getDecl()->print(Out, Context.getLangOpts());
-    Out << "\", ";
+    Out << "PostCall\", \"decl\": \""
+        << PC.getDecl()->getAsFunction()->getQualifiedNameAsString() << "\", ";
     printLocJson(Out, PC.getLocation(), SM);
     break;
   }