[clang-tools-extra] [clang-tidy] Generate valid JSON for characters that require escaping (PR #187454)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 20 01:02:41 PDT 2026
================
@@ -44,14 +45,25 @@ void ClangTidyProfiling::printUserFriendlyTable(llvm::raw_ostream &OS,
void ClangTidyProfiling::printAsJSON(llvm::raw_ostream &OS,
llvm::TimerGroup &TG) {
- assert(Storage && "We should have a filename.");
- OS << "{\n";
- OS << R"("file": ")" << Storage->SourceFilename << "\",\n";
- OS << R"("timestamp": ")" << Storage->Timestamp << "\",\n";
- OS << "\"profile\": {\n";
- TG.printJSONValues(OS, "");
- OS << "\n}\n";
- OS << "}\n";
+ if (!Storage)
+ return;
----------------
vbvictor wrote:
Yes, 22.1.1 is in CI
https://github.com/llvm/llvm-project/blob/main/.github/workflows/containers/github-action-ci-tooling/Dockerfile#L1
https://github.com/llvm/llvm-project/pull/187454
More information about the cfe-commits
mailing list