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 -- 
clang/lib/ExtractAPI/DeclarationFragments.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/clang/lib/ExtractAPI/DeclarationFragments.cpp 
b/clang/lib/ExtractAPI/DeclarationFragments.cpp
index 16a524702..dbef6a3dc 100644
--- a/clang/lib/ExtractAPI/DeclarationFragments.cpp
+++ b/clang/lib/ExtractAPI/DeclarationFragments.cpp
@@ -65,7 +65,8 @@ void findTypeLocForBlockDecl(const clang::TypeSourceInfo 
*TSInfo,
 
 static std::string OriginalNameTypedef(const clang::QualType &qt,
                                        const clang::PrintingPolicy &policy) {
-  if (const auto *tt = 
llvm::dyn_cast<clang::TypedefType>(qt.getTypePtrOrNull())) {
+  if (const auto *tt =
+          llvm::dyn_cast<clang::TypedefType>(qt.getTypePtrOrNull())) {
     const auto *td = tt->getDecl();
     if (!td->getName().empty())
       return td->getName().str();
@@ -73,7 +74,6 @@ static std::string OriginalNameTypedef(const clang::QualType 
&qt,
   return qt.getAsString(policy);
 }
 
-
 DeclarationFragments &
 DeclarationFragments::appendUnduplicatedTextCharacter(char Character) {
   if (!Fragments.empty()) {
@@ -464,8 +464,8 @@ DeclarationFragments 
DeclarationFragmentsBuilder::getFragmentsForType(
   SmallString<128> USR;
   clang::index::generateUSRForType(Base, Context, USR);
   std::string typestr = OriginalNameTypedef(Base, Context.getPrintingPolicy());
-  Fragments.append(typestr,
-                   DeclarationFragments::FragmentKind::TypeIdentifier, USR);
+  Fragments.append(typestr, DeclarationFragments::FragmentKind::TypeIdentifier,
+                   USR);
 
   return Fragments;
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/167319
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to