[clang] [clang] Define ATOMIC_FLAG_INIT correctly for C++. (PR #97534)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 3 00:33:26 PDT 2024


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 690ecee40cd2f3d6655af09272c89a2ea15ada60 34a618e2ac88291cf44b84f1c22cddefdb34bc29 -- clang/lib/Headers/stdatomic.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Headers/stdatomic.h b/clang/lib/Headers/stdatomic.h
index 88172038be..51a5d004e8 100644
--- a/clang/lib/Headers/stdatomic.h
+++ b/clang/lib/Headers/stdatomic.h
@@ -167,7 +167,7 @@ typedef _Atomic(uintmax_t)          atomic_uintmax_t;
 typedef struct atomic_flag { atomic_bool _Value; } atomic_flag;
 
 #ifdef __cplusplus
-#define ATOMIC_FLAG_INIT { false }
+#define ATOMIC_FLAG_INIT {false}
 #else
 #define ATOMIC_FLAG_INIT { 0 }
 #endif

``````````

</details>


https://github.com/llvm/llvm-project/pull/97534


More information about the cfe-commits mailing list