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/test/CodeGenCXX/bug175423.cpp clang/lib/CodeGen/CodeGenFunction.cpp 
clang/lib/CodeGen/CodeGenModule.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/CodeGen/CodeGenModule.cpp 
b/clang/lib/CodeGen/CodeGenModule.cpp
index 377eb3013..34dccf25a 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -5222,20 +5222,20 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMFunction(
       // Look for a declaration that's lexically in a record.
       for (const auto *FD = cast<FunctionDecl>(D)->getMostRecentDecl(); FD;
            FD = FD->getPreviousDecl()) {
-          const auto *LexicalRD =
-              dyn_cast<CXXRecordDecl>(FD->getLexicalDeclContext());
-          if (!LexicalRD)
-             continue;
-
-          // Do not attempt to emit template patterns. These are still in a
-          // dependent context and cannot be code generated until instantiated.
-          if (LexicalRD->isDependentContext())
-             continue;
-
-          if (FD->doesThisDeclarationHaveABody()) {
-             addDeferredDeclToEmit(GD.getWithDecl(FD));
-             break;
-           }
+        const auto *LexicalRD =
+            dyn_cast<CXXRecordDecl>(FD->getLexicalDeclContext());
+        if (!LexicalRD)
+          continue;
+
+        // Do not attempt to emit template patterns. These are still in a
+        // dependent context and cannot be code generated until instantiated.
+        if (LexicalRD->isDependentContext())
+          continue;
+
+        if (FD->doesThisDeclarationHaveABody()) {
+          addDeferredDeclToEmit(GD.getWithDecl(FD));
+          break;
+        }
       }
     }
   }

``````````

</details>


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

Reply via email to