Skip to content

Commit 89d50e3

Browse files
authored
[Sema] -serialize-diagnostics-path should imply -diagnostics-editor-mode so that live issues and editor builds can have the consistent behavior. (swiftlang#9166)
1 parent 3e46ab6 commit 89d50e3

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
902902

903903
Opts.UseMalloc |= Args.hasArg(OPT_use_malloc);
904904

905-
Opts.DiagnosticsEditorMode |= Args.hasArg(OPT_diagnostics_editor_mode);
905+
Opts.DiagnosticsEditorMode |= Args.hasArg(OPT_diagnostics_editor_mode,
906+
OPT_serialize_diagnostics_path);
906907

907908
Opts.EnableExperimentalPropertyBehaviors |=
908909
Args.hasArg(OPT_enable_experimental_property_behaviors);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: %target-typecheck-verify-swift -serialize-diagnostics-path %t.diag
2+
3+
protocol P1 {
4+
func foo1()
5+
func foo2()
6+
}
7+
8+
protocol P2 {
9+
func bar1()
10+
func bar2()
11+
}
12+
13+
class C1 : P1, P2 {} // expected-error{{type 'C1' does not conform to protocol 'P1'}} expected-error{{type 'C1' does not conform to protocol 'P2'}} expected-note{{do you want to add protocol stubs?}}{{20-20=\n func foo1() {\n <#code#>\n \}\n\n func foo2() {\n <#code#>\n \}\n\n func bar1() {\n <#code#>\n \}\n\n func bar2() {\n <#code#>\n \}\n}}

0 commit comments

Comments
 (0)