a.sidorin added a comment.

Looks like a right fix.



================
Comment at: lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp:93
 
     // Warn when there is widening cast.
     unsigned ToWidth = Ctx.getTypeInfo(ToPointeeTy).Width;
----------------
NoQ wrote:
> I think we should move the check here then. That'd avoid double-checking if 
> `ToPointeeTy` is a record type (we could `cast<>` directly on this branch).
Or just hoist it out of condition?


https://reviews.llvm.org/D28297



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to