turran wrote: > Maybe a flag. But I'd prefer to explore the design space first. What patterns > do we care about? Can we detect all the relevant cases at compile-time? Can > we generalize this by performing some checks at runtime?
I added a couple of tests that highly represent the main set of use cases that this PR solves. Using a cast for a function pointer struct field declaration, and when using a cast for call arguments. About other potential relevant cases, I guess there might be more, but for my own scenario with the PR, it is enough. Let me know if the design is reasonable for these cases https://github.com/llvm/llvm-project/pull/153168 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits