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,c -- 
clang/lib/AST/Expr.cpp clang/lib/CodeGen/CGAtomic.cpp 
clang/lib/Sema/SemaChecking.cpp 
clang/test/CodeGen/AArch64/atomic-ops-float-check-minmax.c 
clang/test/Sema/atomic-ops.c clang/test/Sema/scoped-atomic-ops.c 
--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/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index a292a1eff..22597db2d 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -4920,15 +4920,16 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, 
SourceRange ExprRange,
       return true;
     };
     if (!IsAllowedValueType(ValType, ArithAllows)) {
-      auto DID = ArithAllows == AOEVT_FP
-                     ? diag::err_atomic_op_needs_atomic_fp
-                     : (ArithAllows & AOEVT_FP
-                            ? (ArithAllows & AOEVT_Pointer
-                                   ? 
diag::err_atomic_op_needs_atomic_int_ptr_or_fp
-                                   : 
diag::err_atomic_op_needs_atomic_int_or_fp)
-                            : (ArithAllows & AOEVT_Pointer
-                                   ? 
diag::err_atomic_op_needs_atomic_int_or_ptr
-                                   : diag::err_atomic_op_needs_atomic_int));
+      auto DID =
+          ArithAllows == AOEVT_FP
+              ? diag::err_atomic_op_needs_atomic_fp
+              : (ArithAllows & AOEVT_FP
+                     ? (ArithAllows & AOEVT_Pointer
+                            ? diag::err_atomic_op_needs_atomic_int_ptr_or_fp
+                            : diag::err_atomic_op_needs_atomic_int_or_fp)
+                     : (ArithAllows & AOEVT_Pointer
+                            ? diag::err_atomic_op_needs_atomic_int_or_ptr
+                            : diag::err_atomic_op_needs_atomic_int));
       Diag(ExprRange.getBegin(), DID)
           << IsC11 << Ptr->getType() << Ptr->getSourceRange();
       return ExprError();

``````````

</details>


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

Reply via email to