[PATCH] Loss of Sign Checker

Daniel Marjamäki daniel.marjamaki at evidente.se
Tue Jun 23 01:57:33 PDT 2015


I recommend a more specific name than LossOfSignChecker unless you want it to have more warnings later. Right now, a name such as LossOfSignInAssignmentChecker.cpp would be better imho.

Sure there can be issues with loss of sign. If we can warn about mistakes that is awesome!

However personally I think it seems noisy to warn about:

  unsigned char uc1 = -1;

As I see it, it is quite clear that the developer wants to assign -1 to uc1 and that a cast is expected. On a normal machine the uc1 would get the value 255 and this is likely expected.


http://reviews.llvm.org/D10634

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list