rsmith added a comment. In D85256#2194892 <https://reviews.llvm.org/D85256#2194892>, @xbolva00 wrote:
> Could this solve https://bugs.llvm.org/show_bug.cgi?id=40921 ? Not directly; `GetExprRange` in `SemaChecking` apparently intentionally treats casts as producing an arbitrary value of the destination type: // I think we only want to look through implicit casts here; if the // user has an explicit widening cast, we should treat the value as // being of the new, wider type. I'm not entirely convinced that what the comment describes is the best approach. If we revisited that choice then, with this patch, we would indeed diagnose the PR40921 case. But I think that and this are separate changes and I'd prefer not to combine them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85256/new/ https://reviews.llvm.org/D85256 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits