Clang doesn't issue warnings against tautological comparisons like
(uchar < 0) and (uchar == -1).  Such tautological comparisons are
often logic bugs that break the error handling.  Below are some
recent examples.

http://git.kernel.org/linus/3a7f8fb1
http://git.kernel.org/linus/589665f5
http://git.kernel.org/linus/4690c33d

This patch enhances Clang to catch such tautological comparisons,
where bool/uchar/ushort is sign-extended to signed int.  Clang
currently only warns against unsigned tautological comparisons.

- xi

Attachment: scmp.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to