[clang] [libcxx] [clang] [libc++] P3309 constexpr atomic and atomic ref [WIP] (PR #98738)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 13 04:07:34 PDT 2024
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>,
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/98738 at github.com>
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 3b7a7f4cc43f90e79292700959c55a62ab87fd9a 957d0cdae5ea2258f8d1671edb2c70632b7bf26d --extensions h,cpp -- clang/lib/AST/ExprConstant.cpp libcxx/include/__atomic/atomic.h libcxx/include/__atomic/atomic_base.h libcxx/include/__atomic/atomic_flag.h libcxx/include/__atomic/atomic_ref.h libcxx/include/__atomic/cxx_atomic_impl.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 2cb7de0ed7..e484c747d3 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -7940,7 +7940,7 @@ public:
AtomicLV, AtomicVal)) {
return false;
}
-
+
if (!StoreToResultAfter) {
Result = AtomicVal;
}
@@ -8010,7 +8010,8 @@ public:
APFloat::opStatus St;
switch (E->getOp()) {
- case AtomicExpr::AO__c11_atomic_fetch_add: // GCC atomics doesn't support floats
+ case AtomicExpr::AO__c11_atomic_fetch_add: // GCC atomics doesn't support
+ // floats
St = AtomicFlt.add(ArgumentFlt, RM);
Replacement = APValue(AtomicFlt);
break;
@@ -8058,7 +8059,7 @@ public:
// not float,int,pointer?
return false;
}
-
+
if (StoreToResultAfter) {
Result = Replacement;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/98738
More information about the cfe-commits
mailing list