File: | " << html::EscapeText(DirName) << html::EscapeText(Entry->getName()) << " |
Warning: | "
"line "
<< LineNumber
<< ", column "
<< ColumnNumber
<< " " << D.getVerboseDescription() << " |
Note: | "
<< "line "
<< LineNumber << ", column " << ColumnNumber << " " << P->getString() << " |
" << html::EscapeText(*I) << " |
[?] Use j/k keys for keyboard navigation
)<<<"; R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str()); } // Embed meta-data tags. { std::string s; llvm::raw_string_ostream os(s); StringRef BugDesc = D.getVerboseDescription(); if (!BugDesc.empty()) os << "\n\n"; StringRef BugType = D.getBugType(); if (!BugType.empty()) os << "\n\n"; PathDiagnosticLocation UPDLoc = D.getUniqueingLoc(); FullSourceLoc L(SMgr.getExpansionLoc(UPDLoc.isValid() ? UPDLoc.asLocation() : D.getLocation().asLocation()), SMgr); const Decl *DeclWithIssue = D.getDeclWithIssue(); StringRef BugCategory = D.getCategory(); if (!BugCategory.empty()) os << "\n\n"; os << "\n\n"; os << "\n\n"; os << "\n\n"; os << "\n\n"; os << "\n\n"; os << "\n\n"; os << "\n\n"; // Mark the end of the tags. os << "\n\n"; // Insert the text. R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str()); } html::AddHeaderFooterInternalBuiltinCSS(R, FID, Entry->getName()); } std::string HTMLDiagnostics::showRelevantLinesJavascript(const PathDiagnostic &D) { std::string s; llvm::raw_string_ostream os(s); os << " )<<<"; return os.str(); } std::string HTMLDiagnostics::serializeExecutedLines(const PathDiagnostic &D) { std::string s; llvm::raw_string_ostream os(s); os << "var relevant_lines = {"; for (auto I = D.executedLines_begin(), E = D.executedLines_end(); I != E; ++I) { if (I != D.executedLines_begin()) os << ", "; os << "\"" << I->first << "\": {"; for (unsigned LineNo : I->second) { if (LineNo != *(I->second.begin())) os << ", "; os << "\"" << LineNo << "\": 1"; } os << "}"; } os << "};"; return os.str(); } void HTMLDiagnostics::RewriteFile(Rewriter &R, const SourceManager& SMgr, const PathPieces& path, FileID FID) { // Process the path. // Maintain the counts of extra note pieces separately. unsigned TotalPieces = path.size(); unsigned TotalNotePieces = std::count_if(path.begin(), path.end(), [](const std::shared_ptr";
os << " " << num << " ";
if (num > 1) {
os << " | "; } os << " | ";
}
if (const PathDiagnosticMacroPiece *MP =
dyn_cast | ";
if (num < max) {
os << ""; } os << " |
";
EmitAlphaCounter(os, num++);
os << " | " << html::EscapeText(EP->getString()) << " |