================
@@ -108,6 +108,10 @@ void f(int a, double b, const char *cpc, const void *cpv,
X *pX) {
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: {{.*}}; use static_cast {{.*}}
// CHECK-FIXES: Y &rB = static_cast<Y&>(*pX);
+ void *vp = (void *) pX;
+ // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: redundant cast
+ // CHECK-FIXES: void *vp = pX;
----------------
vbvictor wrote:
Why we need to remove the cast completely? Shouldn't we provide fix it with
`reinterpret_cast`?
As for now it [says](https://godbolt.org/z/PfE3eKKPd) to provide just some
cast, and if developer previously used c-cast then the proper conversion is
`reinterpret` IMHO.
https://github.com/llvm/llvm-project/pull/167655
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits