rsmith added inline comments.
================ Comment at: clang/lib/Sema/SemaCast.cpp:264 + CheckNoderef(*this, E->getType(), TInfo->getType(), OpLoc); + ---------------- Warning on this seems reasonable for `static_cast` and `dynamic_cast`, but should `reinterpret_cast` (or the `reinterpret_cast` interpretation of a C-style cast) warn? Presumably we want to leave open some type system holes for the case where the programmer really does know what they're doing. ================ Comment at: clang/lib/Sema/SemaInit.cpp:8182-8184 + // Do not check static casts here because they are checked earlier + // in Sema::ActOnCXXNamedCast() + if (!Kind.isStaticCast()) { ---------------- Are there any `static_cast` cases that don't get here? I'm also a little surprised that `static_cast` would get here but the `static_cast` interpretation of a C-style or functional cast would not. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77836/new/ https://reviews.llvm.org/D77836 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits