r324362 - [analyzer] [tests] Show function name in CmpRuns output

George Karpenkov via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 6 09:22:10 PST 2018


Author: george.karpenkov
Date: Tue Feb  6 09:22:09 2018
New Revision: 324362

URL: http://llvm.org/viewvc/llvm-project?rev=324362&view=rev
Log:
[analyzer] [tests] Show function name in CmpRuns output

Combined with enabled flag for stable filenames, this greatly simplifies
finding the offending report.

Differential Revision: https://reviews.llvm.org/D42831

Modified:
    cfe/trunk/utils/analyzer/CmpRuns.py

Modified: cfe/trunk/utils/analyzer/CmpRuns.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/analyzer/CmpRuns.py?rev=324362&r1=324361&r2=324362&view=diff
==============================================================================
--- cfe/trunk/utils/analyzer/CmpRuns.py (original)
+++ cfe/trunk/utils/analyzer/CmpRuns.py Tue Feb  6 09:22:09 2018
@@ -86,9 +86,15 @@ class AnalysisDiagnostic:
         return os.path.join(self._report.run.path, self._htmlReport)
 
     def getReadableName(self):
-        return '%s:%d:%d, %s: %s' % (self.getFileName(), self.getLine(),
-                                     self.getColumn(), self.getCategory(),
-                                     self.getDescription())
+        if 'issue_context' in self._data:
+            funcnamePostfix = "#" + self._data['issue_context']
+        else:
+            funcnamePostfix = ""
+        return '%s%s:%d:%d, %s: %s' % (self.getFileName(),
+                                       funcnamePostfix,
+                                       self.getLine(),
+                                       self.getColumn(), self.getCategory(),
+                                       self.getDescription())
 
     # Note, the data format is not an API and may change from one analyzer
     # version to another.




More information about the cfe-commits mailing list