diff options
-rw-r--r-- | clang/test/Analysis/exploded-graph-rewriter/program_points.dot | 3 | ||||
-rwxr-xr-x | clang/utils/analyzer/exploded-graph-rewriter.py | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/Analysis/exploded-graph-rewriter/program_points.dot b/clang/test/Analysis/exploded-graph-rewriter/program_points.dot index 342a923725e..772fe4de806 100644 --- a/clang/test/Analysis/exploded-graph-rewriter/program_points.dot +++ b/clang/test/Analysis/exploded-graph-rewriter/program_points.dot @@ -52,7 +52,7 @@ Node0x1 [shape=record,label= // CHECK-SAME: <table border="0" align="left" width="0"> // CHECK-SAME: <tr> // CHECK-SAME: <td align="left" width="0"> -// CHECK-SAME: (main file):<b>4</b>:<b>5</b>: +// CHECK-SAME: main.cpp:<b>4</b>:<b>5</b>: // CHECK-SAME: </td> // CHECK-SAME: <td align="left" width="0"> // CHECK-SAME: <font color="cyan4">DeclRefExpr</font> @@ -83,6 +83,7 @@ Node0x2 [shape=record,label= "pointer": "0x3", "pretty": "x", "location": { + "file": "main.cpp", "line": 4, "column": 5 }, diff --git a/clang/utils/analyzer/exploded-graph-rewriter.py b/clang/utils/analyzer/exploded-graph-rewriter.py index 99f5403189b..baf1be8de06 100755 --- a/clang/utils/analyzer/exploded-graph-rewriter.py +++ b/clang/utils/analyzer/exploded-graph-rewriter.py @@ -16,6 +16,7 @@ import collections import difflib import json import logging +import os import re @@ -50,8 +51,8 @@ class SourceLocation(object): super(SourceLocation, self).__init__() self.line = json_loc['line'] self.col = json_loc['column'] - self.filename = json_loc['filename'] \ - if 'filename' in json_loc else '(main file)' + self.filename = os.path.basename(json_loc['file']) \ + if 'file' in json_loc else '(main file)' # A deserialized program point. |