[clang-tools-extra] [llvm] [clang-tidy] Restructure JSON profile structure to be parsable (PR #86821)

via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 27 08:57:54 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 880eb339cae3acba9be0b2ea3271dba22ea9ec1f eebffcd379bd4dabb8a8cd442916925822aa87bb -- clang-tools-extra/clang-tidy/ClangTidyProfiling.cpp clang-tools-extra/test/clang-tidy/infrastructure/clang-tidy-store-check-profile-one-tu.cpp llvm/lib/Support/Timer.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index 6f79deff97..5cdf30b955 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -475,7 +475,7 @@ const char *TimerGroup::printJSONValues(raw_ostream &OS, const char *delim) {
     const TimeRecord &T = R.Time;
     constexpr auto max_digits10 = std::numeric_limits<double>::max_digits10;
     OS << "  \"check\": {\n";
-    OS << "    \"name\": \"" << Name << '.' << R.Name << "\""<< delim;
+    OS << "    \"name\": \"" << Name << '.' << R.Name << "\"" << delim;
     OS << "    \"wall\": " << format("%.*e", max_digits10 - 1, T.getWallTime())
        << delim;
     OS << "    \"user\": " << format("%.*e", max_digits10 - 1, T.getUserTime())

``````````

</details>


https://github.com/llvm/llvm-project/pull/86821


More information about the cfe-commits mailing list