================
@@ -0,0 +1,10 @@
+// RUN: %check_clang_tidy %s bugprone-inc-dec-in-conditions %t
+
+#define foo(x)                                                 \
+  ({                                                           \
+    _BitInt(5) y = x;                                          \
+    16777215wb ?: ++y;                                         \
+  })
+
+_BitInt(8) v_401_0() { 0 && foo(0); }
----------------
DonatNagyE wrote:

Perhaps eliminate the macro definition and replace this function body with
```
if (0) {
  // block defined in the macro
}
```
because the current code seems to be "unnatural" for the untrained eye. (If I 
understand it correctly, this transformation would produce an equivalent 
testcase. If not, then explain why do you need the gcc statement expression.) 

https://github.com/llvm/llvm-project/pull/65889
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to