Skip to content

Commit 8ed35de

Browse files
committed
Switch to the 'Swift' diagnostic style as the default
1 parent aa90657 commit 8ed35de

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

include/swift/Basic/DiagnosticOptions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ class DiagnosticOptions {
7070
bool PrintEducationalNotes = false;
7171

7272
/// Whether to emit diagnostics in the terse LLVM style or in a more
73-
/// descriptive style that's specific to Swift (currently experimental).
74-
FormattingStyle PrintedFormattingStyle = FormattingStyle::LLVM;
73+
/// descriptive style that's specific to Swift.
74+
FormattingStyle PrintedFormattingStyle = FormattingStyle::Swift;
7575

7676
/// Whether to emit macro expansion buffers into separate, temporary files.
7777
bool EmitMacroExpansionFiles = true;

lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,7 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
19741974
OPT_no_color_diagnostics,
19751975
/*Default=*/llvm::sys::Process::StandardErrHasColors());
19761976
// If no style options are specified, default to LLVM style.
1977-
Opts.PrintedFormattingStyle = DiagnosticOptions::FormattingStyle::LLVM;
1977+
Opts.PrintedFormattingStyle = DiagnosticOptions::FormattingStyle::Swift;
19781978
if (const Arg *arg = Args.getLastArg(OPT_diagnostic_style)) {
19791979
StringRef contents = arg->getValue();
19801980
if (contents == "llvm") {

stdlib/public/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
4949
list(APPEND SWIFT_RUNTIME_CORE_CXX_FLAGS "-xc++")
5050
endif()
5151

52-
# Use the new diagnostic formatter.
53-
list(APPEND SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS "-diagnostic-style" "swift")
54-
5552
# We should avoid non-literals in format strings, or appropriately mark
5653
# functions.
5754
check_cxx_compiler_flag("-Wformat-nonliteral -Werror=format-nonliteral" CXX_SUPPORTS_FORMAT_NONLITERAL_WARNING)

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
170170
SWIFT_COMPILE_FLAGS
171171
${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
172172
-parse-stdlib
173-
-diagnostic-style swift
174173
${SWIFT_RUNTIME_CONCURRENCY_SWIFT_FLAGS}
175174
${swift_concurrency_options}
176175
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"

0 commit comments

Comments
 (0)