rsmith added a comment. I don't think this problem really has anything to do with statement expressions; consider:
struct Widget a = (init2(&a), a); ... which has the same behaviour and presumably produces the same warning. It's just a C / C++ difference. In C++, these examples are undefined because the lifetime of the object hasn't started yet, but I think in C they're valid. We should just disable the whole warning in C mode and leave it to the CFG analysis. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/ https://reviews.llvm.org/D64678 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits