New warnings work, improvements to default warning behavior

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

New warnings work, improvements to default warning behavior

Kristóf Umann via cfe-dev
I have been working on several patches to improve Clang warnings.  The changes touch warnings that are in the default warning set or in common build configurations.  I am posting these patches so interested people can test the warning behavior before they committed.  In my testing, these warnings have caught many interesting and hard to find bugs already.

I've combined all the patches into one for easy testing: 
https://reviews.llvm.org/D66048

Individual patches, spread out:
https://reviews.llvm.org/D66043 - New precedence warning for mixing bitwise and/or with conditional operator
https://reviews.llvm.org/D66044 - -Wtautological-overlap-compare to work on negative numbers
https://reviews.llvm.org/D66045 - Better detection of same value operands for tautological warnings
https://reviews.llvm.org/D66046 - New warning -Wtautological-bitwise-compare to check for non-zero value bitwise-or in bool context

These are improvements to -Wparentheses, -Wtautological-compare, and -Wtautological-overlap-compare with new warning -Wtautological-bitwise-compare.  

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: New warnings work, improvements to default warning behavior

Kristóf Umann via cfe-dev
Thanks for the heads-up!

akhuang gave the combined patch a try on Chromium. The improved warnings found two bugs and had no false positives :)


On Fri, Aug 9, 2019 at 10:16 PM Richard Trieu via cfe-dev <[hidden email]> wrote:
I have been working on several patches to improve Clang warnings.  The changes touch warnings that are in the default warning set or in common build configurations.  I am posting these patches so interested people can test the warning behavior before they committed.  In my testing, these warnings have caught many interesting and hard to find bugs already.

I've combined all the patches into one for easy testing: 
https://reviews.llvm.org/D66048

Individual patches, spread out:
https://reviews.llvm.org/D66043 - New precedence warning for mixing bitwise and/or with conditional operator
https://reviews.llvm.org/D66044 - -Wtautological-overlap-compare to work on negative numbers
https://reviews.llvm.org/D66045 - Better detection of same value operands for tautological warnings
https://reviews.llvm.org/D66046 - New warning -Wtautological-bitwise-compare to check for non-zero value bitwise-or in bool context

These are improvements to -Wparentheses, -Wtautological-compare, and -Wtautological-overlap-compare with new warning -Wtautological-bitwise-compare.  
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: New warnings work, improvements to default warning behavior

Kristóf Umann via cfe-dev
Thanks for testing out the warnings.  Always nice to get more data on how well they are working.

On Tue, Aug 13, 2019 at 7:15 AM Nico Weber <[hidden email]> wrote:
Thanks for the heads-up!

akhuang gave the combined patch a try on Chromium. The improved warnings found two bugs and had no false positives :)


On Fri, Aug 9, 2019 at 10:16 PM Richard Trieu via cfe-dev <[hidden email]> wrote:
I have been working on several patches to improve Clang warnings.  The changes touch warnings that are in the default warning set or in common build configurations.  I am posting these patches so interested people can test the warning behavior before they committed.  In my testing, these warnings have caught many interesting and hard to find bugs already.

I've combined all the patches into one for easy testing: 
https://reviews.llvm.org/D66048

Individual patches, spread out:
https://reviews.llvm.org/D66043 - New precedence warning for mixing bitwise and/or with conditional operator
https://reviews.llvm.org/D66044 - -Wtautological-overlap-compare to work on negative numbers
https://reviews.llvm.org/D66045 - Better detection of same value operands for tautological warnings
https://reviews.llvm.org/D66046 - New warning -Wtautological-bitwise-compare to check for non-zero value bitwise-or in bool context

These are improvements to -Wparentheses, -Wtautological-compare, and -Wtautological-overlap-compare with new warning -Wtautological-bitwise-compare.  
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev