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 c,cpp,h -- 
clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGExpr.cpp 
clang/lib/CodeGen/CodeGenFunction.cpp clang/lib/CodeGen/CodeGenFunction.h 
clang/lib/CodeGen/VarBypassDetector.cpp clang/lib/CodeGen/VarBypassDetector.h 
clang/lib/Parse/ParseDecl.cpp clang/lib/Sema/SemaDecl.cpp 
clang/lib/Sema/SemaExpr.cpp clang/test/CodeGen/compound-literal-lifetime.c 
clang/test/CodeGen/lifetime2.c clang/test/CodeGenCXX/trivial-auto-var-init.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/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index a761d96a4..576a8a2f5 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -15859,9 +15859,9 @@ Sema::BuildDeclaratorGroup(MutableArrayRef<Decl *> 
Group) {
     return VD && VD->isCXXForRangeDecl();
   });
   if (!IsCXXForRange) {
-    ExprCleanupObjects.erase(
-        ExprCleanupObjects.begin() + ExprEvalContexts.back().NumCleanupObjects,
-        ExprCleanupObjects.end());
+    ExprCleanupObjects.erase(ExprCleanupObjects.begin() +
+                                 ExprEvalContexts.back().NumCleanupObjects,
+                             ExprCleanupObjects.end());
     Cleanup.reset();
   }
 
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index f1ad8b569..766839e2f 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -19188,9 +19188,8 @@ void Sema::PopExpressionEvaluationContext() {
   // temporaries that we may have created as part of the evaluation of
   // the expression in that context: they aren't relevant because they
   // will never be constructed.
-  if (Rec.isUnevaluated() ||
-      (Rec.isConstantEvaluated() &&
-       !Rec.InConditionallyConstantEvaluateContext)) {
+  if (Rec.isUnevaluated() || (Rec.isConstantEvaluated() &&
+                              !Rec.InConditionallyConstantEvaluateContext)) {
     ExprCleanupObjects.erase(ExprCleanupObjects.begin() + 
Rec.NumCleanupObjects,
                              ExprCleanupObjects.end());
     Cleanup = Rec.ParentCleanup;
@@ -19202,7 +19201,7 @@ void Sema::PopExpressionEvaluationContext() {
     Cleanup.mergeFrom(Rec.ParentCleanup);
     CleanupVarDeclMarking();
     std::swap(MaybeODRUseExprs, Rec.SavedMaybeODRUseExprs);
-  // Otherwise, merge the contexts together.
+    // Otherwise, merge the contexts together.
   } else {
     Cleanup.mergeFrom(Rec.ParentCleanup);
     MaybeODRUseExprs.insert_range(Rec.SavedMaybeODRUseExprs);

``````````

</details>


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

Reply via email to