]> granicus.if.org Git - clang/commitdiff
[analyzer] Testing: make diagnostic diffs more informative (add
authorAnna Zaks <ganna@apple.com>
Tue, 24 Jan 2012 21:57:32 +0000 (21:57 +0000)
committerAnna Zaks <ganna@apple.com>
Tue, 24 Jan 2012 21:57:32 +0000 (21:57 +0000)
diagnostic message).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148867 91177308-0d34-0410-b5e6-96231b3b80d8

utils/analyzer/CmpRuns.py

index 2072e4d0a1bd2c05a23b605ea91b4947d25720ad..6d4be712994e649ed76205da363f12276f2d48b4 100755 (executable)
@@ -65,15 +65,18 @@ class AnalysisDiagnostic:
         filename = self.report.run.getSourceName(self.report.files[loc['file']])
         line = loc['line']
         column = loc['col']
+        category = self.data['category']
+        description = self.data['description']
 
         # FIXME: Get a report number based on this key, to 'distinguish'
         # reports, or something.
         
-        return '%s:%d:%d' % (filename, line, column)
+        return '%s:%d:%d, %s: %s' % (filename, line, column, category, 
+                                   description)
 
     def getReportData(self):
         if self.htmlReport is None:
-            return "This diagnostic does not have any report data."
+            return " "
 
         return open(os.path.join(self.report.run.path,
                                  self.htmlReport), "rb").read()