jacek added a comment. I don't mind dropping the patch, we can mitigate the problem in Wine. My understanding is that we could use "pedantic" logic similar to NSInteger in checkFormatExpr, please let me know if you'd like something like that.
I still think that using casts in such cases is not the right pattern. For an example, if developer knows that SIZE_T is a type that will always be compatible with %z, the code: printf("%zd", size); is not wrong. Proposed casts would change all such cases to: printf("%zd", (size_t)size); Now imagine that I made a mistake and changed type of size to a type of different size. In the first variant, clang will issue a warning. In the second case, the cast will hide the warning, but I'm probably interested in changing the format instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78508/new/ https://reviews.llvm.org/D78508 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits