[llvm] [LLVM] Clang format cleanups. (PR #82184)

via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 18 10:14:02 PST 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 cc2fe7b516c1dbf1f8747ade0f17891f9990dede 5991063c204299f1fc73c75755a22c52202b8c9a -- llvm/include/llvm/ADT/GenericUniformityImpl.h llvm/include/llvm/ADT/STLExtras.h llvm/include/llvm/BinaryFormat/Dwarf.h llvm/unittests/ADT/STLExtrasTest.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index dcccafa6b7..24906c40dc 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -898,9 +898,8 @@ template <typename Iter> Iter next_or_end(const Iter &I, const Iter &End) {
 }
 
 template <typename Iter>
-auto deref_or_none(const Iter &I, const Iter &End)
-    -> std::optional<
-        std::remove_const_t<std::remove_reference_t<decltype(*I)>>> {
+auto deref_or_none(const Iter &I, const Iter &End) -> std::optional<
+    std::remove_const_t<std::remove_reference_t<decltype(*I)>>> {
   if (I == End)
     return std::nullopt;
   return *I;
@@ -2124,7 +2123,8 @@ template <typename Container, typename StreamT,
           typename T = detail::ValueOfRange<Container>>
 inline void interleave(const Container &c, StreamT &os,
                        const StringRef &separator) {
-  interleave(c, os, [&](const T &a) { os << a; }, separator);
+  interleave(
+      c, os, [&](const T &a) { os << a; }, separator);
 }
 
 template <typename Container, typename UnaryFunctor, typename StreamT,

``````````

</details>


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


More information about the llvm-commits mailing list