Skip to content

Commit 1deb72d

Browse files
committed
Enable emission of macro expansion buffers for diagnostics by default
This feature is too handy to leave off-by-default. Enable it by default, but allow `-emit-macro-expansion-files no-diagnostics` to disable it.
1 parent a6ab50c commit 1deb72d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/swift/Basic/DiagnosticOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class DiagnosticOptions {
7474
FormattingStyle PrintedFormattingStyle = FormattingStyle::LLVM;
7575

7676
/// Whether to emit macro expansion buffers into separate, temporary files.
77-
bool EmitMacroExpansionFiles = false;
77+
bool EmitMacroExpansionFiles = true;
7878

7979
std::string DiagnosticDocumentationPath = "";
8080

test/Macros/macro_expand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Diagnostics testing
66
// RUN: %target-typecheck-verify-swift -enable-experimental-feature Macros -load-plugin-library %t/%target-library-name(MacroDefinition) -I %swift-host-lib-dir -module-name MacroUser -DTEST_DIAGNOSTICS
77

8-
// RUN: not %target-swift-frontend -typecheck -enable-experimental-feature Macros -load-plugin-library %t/%target-library-name(MacroDefinition) -I %swift-host-lib-dir -module-name MacroUser -DTEST_DIAGNOSTICS -serialize-diagnostics-path %t/macro_expand.dia %s
8+
// RUN: not %target-swift-frontend -typecheck -enable-experimental-feature Macros -load-plugin-library %t/%target-library-name(MacroDefinition) -I %swift-host-lib-dir -module-name MacroUser -DTEST_DIAGNOSTICS -serialize-diagnostics-path %t/macro_expand.dia %s -emit-macro-expansion-files no-diagnostics
99
// RUN: c-index-test -read-diagnostics %t/macro_expand.dia 2>&1 | %FileCheck -check-prefix CHECK-DIAGS %s
1010

1111
// Debug info SIL testing

0 commit comments

Comments
 (0)