Skip to content

Conversation

@artemcm
Copy link
Contributor

@artemcm artemcm commented Apr 17, 2020

-no-warnings-as-errors

This functionality is required for build systems to be able to overload/disable a given Swift project's preference of treating warnings as errors.

Resolves rdar://problem/35699776

@artemcm
Copy link
Contributor Author

artemcm commented Apr 17, 2020

@swift-ci test

@varungandhi-apple
Copy link
Contributor

varungandhi-apple commented Apr 17, 2020

There's this piece of code which needs to be updated.

static void validateWarningControlArgs(DiagnosticEngine &diags,
                                       const ArgList &args) {
  if (args.hasArg(options::OPT_suppress_warnings) &&
      args.hasArg(options::OPT_warnings_as_errors)) {
    diags.diagnose(SourceLoc(), diag::error_conflicting_options,
                   "-warnings-as-errors", "-suppress-warnings");
  }
}

If there is a -no-warnings-as-errors afterwards, we shouldn't emit a error_conflicting_options.

`-no-warnings-as-errors`

This functionality is required for build systems to be able to overload/disable a given Swift project's preference of treating warnings as errors.

Resolves rdar://problem/35699776
@artemcm artemcm force-pushed the NoWarningsAsErrorsOption branch from 598381e to c3b0232 Compare April 17, 2020 19:10
@varungandhi-apple
Copy link
Contributor

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 598381e948970332c47748173b6fd9bcb0f00d52

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 598381e948970332c47748173b6fd9bcb0f00d52

@artemcm artemcm merged commit c11f013 into swiftlang:master Apr 20, 2020
@artemcm artemcm deleted the NoWarningsAsErrorsOption branch April 20, 2020 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants