[clang] [ExtractAPI] Format pointers in params correctly (PR #146182)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 27 18:05:57 PDT 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 HEAD~1 HEAD --extensions c,cpp -- clang/test/ExtractAPI/pointers.c clang/lib/ExtractAPI/DeclarationFragments.cpp clang/test/ExtractAPI/global_record.c clang/test/ExtractAPI/global_record_multifile.c clang/test/ExtractAPI/macro_undefined.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/ExtractAPI/DeclarationFragments.cpp b/clang/lib/ExtractAPI/DeclarationFragments.cpp
index 200029ed9..74918ca1d 100644
--- a/clang/lib/ExtractAPI/DeclarationFragments.cpp
+++ b/clang/lib/ExtractAPI/DeclarationFragments.cpp
@@ -331,8 +331,7 @@ DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForType(
// before the `*` as the preceding character in the type name is a `*`.
if (!PointeeT->isAnyPointerType() && !PointeeT->isObjCObjectPointerType())
Fragments.appendSpace();
- return Fragments
- .append("*", DeclarationFragments::FragmentKind::Text);
+ return Fragments.append("*", DeclarationFragments::FragmentKind::Text);
}
// For Objective-C `id` and `Class` pointers
``````````
</details>
https://github.com/llvm/llvm-project/pull/146182
More information about the cfe-commits
mailing list