[llvm-branch-commits] [clang-tools-extra] [clang-doc] Clean up implementation with better casting (PR #202060)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Jun 6 09:36:06 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 h,cpp -- clang-tools-extra/clang-doc/Representation.cpp clang-tools-extra/clang-doc/Representation.h --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/clang-tools-extra/clang-doc/Representation.cpp b/clang-tools-extra/clang-doc/Representation.cpp
index bd363dc42..48f189e7f 100644
--- a/clang-tools-extra/clang-doc/Representation.cpp
+++ b/clang-tools-extra/clang-doc/Representation.cpp
@@ -182,7 +182,7 @@ void mergeUnkeyed<CommentInfo>(DocList<CommentInfo> &Target,
 
 template <typename T>
 static llvm::Error mergeTypedInfo(Info *&Reduced, Info *NewInfo,
-                           llvm::BumpPtrAllocator &Arena) {
+                                  llvm::BumpPtrAllocator &Arena) {
   if (!Reduced)
     Reduced = allocatePtr<T>(Arena, NewInfo->USR);
   cast<T>(Reduced)->merge(std::move(*cast<T>(NewInfo)));

``````````

</details>


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


More information about the llvm-branch-commits mailing list