diff options
| -rw-r--r-- | clang/lib/Analysis/ProgramPoint.cpp | 3 | ||||
| -rw-r--r-- | clang/test/Analysis/dump_egraph.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Analysis/ProgramPoint.cpp b/clang/lib/Analysis/ProgramPoint.cpp index 45f165677f9..0398251b5ea 100644 --- a/clang/lib/Analysis/ProgramPoint.cpp +++ b/clang/lib/Analysis/ProgramPoint.cpp @@ -55,7 +55,8 @@ static void printLocJson(raw_ostream &Out, SourceLocation Loc, } 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 { diff --git a/clang/test/Analysis/dump_egraph.c b/clang/test/Analysis/dump_egraph.c index 701e9850798..5544d9fae2e 100644 --- a/clang/test/Analysis/dump_egraph.c +++ b/clang/test/Analysis/dump_egraph.c @@ -22,3 +22,5 @@ int foo() { // CHECK: \"has_report\": true +// CHECK: \"pretty\": \"*x\", \"location\": \{ \"line\": 16, \"column\": 10, \"file\": \"{{(.+)}}dump_egraph.c\" \} + |

