[libcxx-commits] [libcxx] [libc++] Add code size benchmarks (PR #226152)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 24 06:03:04 PDT 2026
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 origin/main HEAD --extensions cpp -- libcxx/test/benchmarks/containers/sequence/vector.codesize.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/benchmarks/containers/sequence/vector.codesize.cpp b/libcxx/test/benchmarks/containers/sequence/vector.codesize.cpp
index 9f5961bdd..b4a0ff9fa 100644
--- a/libcxx/test/benchmarks/containers/sequence/vector.codesize.cpp
+++ b/libcxx/test/benchmarks/containers/sequence/vector.codesize.cpp
@@ -13,26 +13,14 @@
#define CODESIZE_BM [[gnu::abi_tag("BENCHMARK_THIS")]]
-CODESIZE_BM auto bm_default_constructor() {
- return std::vector<int>();
-}
+CODESIZE_BM auto bm_default_constructor() { return std::vector<int>(); }
-CODESIZE_BM auto bm_copy_constructor(const std::vector<int>& v) {
- return v;
-}
+CODESIZE_BM auto bm_copy_constructor(const std::vector<int>& v) { return v; }
-CODESIZE_BM auto bm_copy_assign(std::vector<int>& lhs, const std::vector<int>& rhs) {
- lhs = rhs;
-}
+CODESIZE_BM auto bm_copy_assign(std::vector<int>& lhs, const std::vector<int>& rhs) { lhs = rhs; }
-CODESIZE_BM auto bm_move_constructor(std::vector<int>&& v) {
- return std::move(v);
-}
+CODESIZE_BM auto bm_move_constructor(std::vector<int>&& v) { return std::move(v); }
-CODESIZE_BM auto bm_push_back(std::vector<int>& v) {
- v.push_back(1);
-}
+CODESIZE_BM auto bm_push_back(std::vector<int>& v) { v.push_back(1); }
-CODESIZE_BM auto bm_emplace_back(std::vector<int>& v) {
- v.emplace_back(1);
-}
+CODESIZE_BM auto bm_emplace_back(std::vector<int>& v) { v.emplace_back(1); }
``````````
</details>
https://github.com/llvm/llvm-project/pull/226152
More information about the libcxx-commits
mailing list