================
@@ -0,0 +1,96 @@
+// RUN: %check_clang_tidy %s bugprone-casting-through-void %t
+
+using V = void*;
+using CV = const void*;
+
+int i = 100;
+double d = 100;
+const int ci = 100;
+const double cd = 100;
+
+void normal_test() {
+  static_cast<int *>(static_cast<void *>(&d));
+  // CHECK-MESSAGES: :[[@LINE-1]]:22: warning: do not cast 'double *' to 'int 
*' through 'void*' [bugprone-casting-through-void]
+
+  static_cast<int *>(static_cast<V>(&d));
+  // CHECK-MESSAGES: :[[@LINE-1]]:22: warning: do not cast 'double *' to 'int 
*' through 'void*' [bugprone-casting-through-void]
----------------
PiotrZSL wrote:

add space bettwen void and * to match other types.

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

Reply via email to