r362002 - [analyzer] print() JSONify: Decl revision

Csaba Dabis via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 11:21:14 PDT 2019


Author: charusso
Date: Wed May 29 11:21:14 2019
New Revision: 362002

URL: http://llvm.org/viewvc/llvm-project?rev=362002&view=rev
Log:
[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

Modified:
    cfe/trunk/lib/Analysis/ProgramPoint.cpp

Modified: cfe/trunk/lib/Analysis/ProgramPoint.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ProgramPoint.cpp?rev=362002&r1=362001&r2=362002&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/ProgramPoint.cpp (original)
+++ cfe/trunk/lib/Analysis/ProgramPoint.cpp Wed May 29 11:21:14 2019
@@ -116,18 +116,16 @@ void ProgramPoint::printJson(llvm::raw_o
 
   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;
   }




More information about the cfe-commits mailing list