[PATCH] D51513: [analyzer] [NFC] Move methods for dumping the coverage in HTMLDiagnostics into the class
George Karpenkov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 7 15:18:31 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rC341724: [analyzer] [NFC] Move methods for dumping the coverage in HTMLDiagnostics into… (authored by george.karpenkov, committed by ).
Herald added a subscriber: cfe-commits.
Changed prior to commit:
https://reviews.llvm.org/D51513?vs=163421&id=164528#toc
Repository:
rC Clang
https://reviews.llvm.org/D51513
Files:
lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
Index: lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
===================================================================
--- lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
+++ lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
@@ -122,6 +122,15 @@
/// \return Javascript for navigating the HTML report using j/k keys.
StringRef generateKeyboardNavigationJavascript();
+
+ /// \return JavaScript for an option to only show relevant lines.
+ std::string showRelevantLinesJavascript(
+ const PathDiagnostic &D, const PathPieces &path);
+
+ /// Write executed lines from \p D in JSON format into \p os.
+ void dumpCoverageData(const PathDiagnostic &D,
+ const PathPieces &path,
+ llvm::raw_string_ostream &os);
};
} // namespace
@@ -333,8 +342,7 @@
return os.str();
}
-/// Write executed lines from \p D in JSON format into \p os.
-static void serializeExecutedLines(
+void HTMLDiagnostics::dumpCoverageData(
const PathDiagnostic &D,
const PathPieces &path,
llvm::raw_string_ostream &os) {
@@ -360,13 +368,12 @@
os << "};";
}
-/// \return JavaScript for an option to only show relevant lines.
-static std::string showRelevantLinesJavascript(
+std::string HTMLDiagnostics::showRelevantLinesJavascript(
const PathDiagnostic &D, const PathPieces &path) {
std::string s;
llvm::raw_string_ostream os(s);
os << "<script type='text/javascript'>\n";
- serializeExecutedLines(D, path, os);
+ dumpCoverageData(D, path, os);
os << R"<<<(
var filterCounterexample = function (hide) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51513.164528.patch
Type: text/x-patch
Size: 1572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180907/2bea0d12/attachment-0001.bin>
More information about the cfe-commits
mailing list