[libcxx-commits] [libcxx] [libc++][tuple] Applied `[[nodiscard]]` (PR #172008)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 12 05:36:25 PST 2025
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/libcxx/utilities/tuple/nodiscard.verify.cpp libcxx/include/tuple --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/include/tuple b/libcxx/include/tuple
index 7de91ffce..e02e45f42 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -491,9 +491,7 @@ public:
return 0;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() _NOEXCEPT {
- return static_cast<_Hp&>(*this);
- }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() _NOEXCEPT { return static_cast<_Hp&>(*this); }
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT {
return static_cast<const _Hp&>(*this);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/172008
More information about the libcxx-commits
mailing list