[clang-tools-extra] [clang-tidy] Add misc-bool-bitwise-operation check (PR #142324)

Denis Mikhailov via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 8 01:49:51 PDT 2025


================
@@ -0,0 +1,59 @@
+// RUN: %check_clang_tidy %s misc-bool-bitwise-operation %t \
+// RUN:   -config="{CheckOptions: { \
+// RUN:     misc-bool-bitwise-operation.IgnoreMacros: true }}"
+
+#define MY_OR |
+#define MY_AND &
+#define MY_OR_ASSIGN |=
+#define MY_AND_ASSIGN &=
+#define MY_LOG_AND &&
----------------
denzor200 wrote:

The test you've asked for will become not actual in future versions(See note https://github.com/denzor200/llvm-project/blob/b9be35d4d4bec7ede2ebe141eeb8a9d4fe1c550c/clang-tools-extra/test/clang-tidy/checkers/misc/bool-bitwise-operation.cpp#L352 )
I will just remove these defines

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


More information about the cfe-commits mailing list