Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -Wnonunit-statement to warn about discarded values in statement position #9893

Merged
merged 4 commits into from Jul 29, 2022

Commits on Jul 29, 2022

  1. Add -Wnonunit-statement and -Wnonunit-if

    Warn about any interesting value in statement position,
    for some definition of interest.
    
    Generalizes the current warning for "pure" expressions.
    
    By default, warns about unibranch if, which lack an else
    in user code.
    
    Specify -Wnonunit-if:false to turn off warning about
    unibranch if. (That also turns off -Wvalue-discard for
    those cases.)
    
    Improve explicit Unit check
    
    Accommodate field when method is this.type
    
    Handle Match
    som-snytt committed Jul 29, 2022
    Configuration menu
    Copy the full SHA
    83423c9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b599c60 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8774492 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9fe44e8 View commit details
    Browse the repository at this point in the history