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/test/CIR/CodeGen/vbase.cpp clang/test/CIR/CodeGen/vtt.cpp 
clang/lib/CIR/CodeGen/CIRGenCXXABI.h clang/lib/CIR/CodeGen/CIRGenClass.cpp 
clang/lib/CIR/CodeGen/CIRGenExpr.cpp 
clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp 
clang/lib/CIR/CodeGen/CIRGenRecordLayout.h 
clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp 
clang/lib/CodeGen/CGClass.cpp
``````````

: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/CIR/CodeGen/CIRGenClass.cpp 
b/clang/lib/CIR/CodeGen/CIRGenClass.cpp
index f3de8cd50..9a27932c1 100644
--- a/clang/lib/CIR/CodeGen/CIRGenClass.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenClass.cpp
@@ -258,7 +258,7 @@ void CIRGenFunction::emitCtorPrologue(const 
CXXConstructorDecl *cd,
   auto nonVirtualBaseInits =
       llvm::make_range(virtualBaseEnd, nonVirtualBaseEnd);
   auto memberInits = llvm::make_range(nonVirtualBaseEnd, allInits.end());
-    
+
   const mlir::Value oldThisValue = cxxThisValue;
 
   auto emitInitializer = [&](CXXCtorInitializer *baseInit) {
diff --git a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp 
b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
index 3603fd1f2..6c7cf75aa 100644
--- a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
@@ -941,15 +941,16 @@ void CIRRecordLowering::accumulateVBases() {
     CharUnits offset = astRecordLayout.getVBaseClassOffset(baseDecl);
     // If the vbase is a primary virtual base of some base, then it doesn't
     // get its own storage location but instead lives inside of that base.
-    if (isOverlappingVBaseABI() &&
-        astContext.isNearlyEmpty(baseDecl) &&
+    if (isOverlappingVBaseABI() && astContext.isNearlyEmpty(baseDecl) &&
         !hasOwnStorage(cxxRecordDecl, baseDecl)) {
-      members.push_back(MemberInfo(offset, MemberInfo::InfoKind::VBase, 
nullptr,
-                                   baseDecl));
+      members.push_back(
+          MemberInfo(offset, MemberInfo::InfoKind::VBase, nullptr, baseDecl));
       continue;
     }
     // If we've got a vtordisp, add it as a storage type.
-    if 
(astRecordLayout.getVBaseOffsetsMap().find(baseDecl)->second.hasVtorDisp())
+    if (astRecordLayout.getVBaseOffsetsMap()
+            .find(baseDecl)
+            ->second.hasVtorDisp())
       members.push_back(makeStorageInfo(offset - CharUnits::fromQuantity(4),
                                         getUIntNType(32)));
     members.push_back(MemberInfo(offset, MemberInfo::InfoKind::VBase,

``````````

</details>


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

Reply via email to