r364197 - [analyzer] print() JSONify: ProgramPoint revision
Csaba Dabis via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 24 09:19:39 PDT 2019
Author: charusso
Date: Mon Jun 24 09:19:39 2019
New Revision: 364197
URL: http://llvm.org/viewvc/llvm-project?rev=364197&view=rev
Log:
[analyzer] print() JSONify: ProgramPoint revision
Summary: Now we also print out the filename with its path.
Reviewers: NoQ
Reviewed By: NoQ
Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin,
mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63438
Modified:
cfe/trunk/lib/Analysis/ProgramPoint.cpp
cfe/trunk/test/Analysis/dump_egraph.c
Modified: cfe/trunk/lib/Analysis/ProgramPoint.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ProgramPoint.cpp?rev=364197&r1=364196&r2=364197&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/ProgramPoint.cpp (original)
+++ cfe/trunk/lib/Analysis/ProgramPoint.cpp Mon Jun 24 09:19:39 2019
@@ -55,7 +55,8 @@ static void printLocJson(raw_ostream &Ou
}
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 {
Modified: cfe/trunk/test/Analysis/dump_egraph.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/dump_egraph.c?rev=364197&r1=364196&r2=364197&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/dump_egraph.c (original)
+++ cfe/trunk/test/Analysis/dump_egraph.c Mon Jun 24 09:19:39 2019
@@ -22,3 +22,5 @@ int foo() {
// CHECK: \"has_report\": true
+// CHECK: \"pretty\": \"*x\", \"location\": \{ \"line\": 16, \"column\": 10, \"file\": \"{{(.+)}}dump_egraph.c\" \}
+
More information about the cfe-commits
mailing list