mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Diagnostics] Use the new swift-syntax formatter for -diagnostic-style swift.
We're going to move toward the new swift-syntax formatter. Use it for the "swift" diagnostic style instead of the experimental formatter written in C++. There are some tests for the experimental formatter in C++ that test precise formatting of diagnostics. I've disabled them in the same places where the new swift-syntax formatter is enabled, for now. We may choose to remove them entirely, because swift-syntax itself is where the specific format is defined, and has those same kinds of tests already.
This commit is contained in:
@@ -1517,9 +1517,6 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
|
||||
Opts.PrintedFormattingStyle = DiagnosticOptions::FormattingStyle::LLVM;
|
||||
} else if (contents == "swift") {
|
||||
Opts.PrintedFormattingStyle = DiagnosticOptions::FormattingStyle::Swift;
|
||||
} else if (contents == "swift-syntax") {
|
||||
Opts.PrintedFormattingStyle =
|
||||
DiagnosticOptions::FormattingStyle::SwiftSyntax;
|
||||
} else {
|
||||
Diags.diagnose(SourceLoc(), diag::error_unsupported_option_argument,
|
||||
arg->getOption().getPrefixedName(), arg->getValue());
|
||||
|
||||
Reference in New Issue
Block a user