[PATCH] D63438: [analyzer] print() JSONify: ProgramPoint revision

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 17 08:49:41 PDT 2019


Charusso created this revision.
Charusso added a reviewer: NoQ.
Charusso added a project: clang.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.

Now we also print out the filename with its path.


Repository:
  rC Clang

https://reviews.llvm.org/D63438

Files:
  clang/lib/Analysis/ProgramPoint.cpp


Index: clang/lib/Analysis/ProgramPoint.cpp
===================================================================
--- clang/lib/Analysis/ProgramPoint.cpp
+++ clang/lib/Analysis/ProgramPoint.cpp
@@ -55,7 +55,8 @@
   }
 
   Out << "{ \"line\": " << SM.getExpansionLineNumber(Loc)
-      << ", \"column\": " << SM.getExpansionColumnNumber(Loc) << " }";
+      << ", \"column\": " << SM.getExpansionColumnNumber(Loc)
+      << ", \"file\": \"" << SM.getFilename(Loc) << "\" }";
 }
 
 void ProgramPoint::printJson(llvm::raw_ostream &Out, const char *NL) const {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63438.205090.patch
Type: text/x-patch
Size: 554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190617/07a2f036/attachment-0001.bin>


More information about the cfe-commits mailing list