diff --git a/include/swift/AST/DiagnosticsSema.def b/include/swift/AST/DiagnosticsSema.def index d1d61706b35eb..563561f91ece8 100644 --- a/include/swift/AST/DiagnosticsSema.def +++ b/include/swift/AST/DiagnosticsSema.def @@ -7113,9 +7113,7 @@ ERROR(macro_undefined,PointsToFirstBadToken, "no macro named %0", (Identifier)) ERROR(external_macro_not_found,none, "external macro implementation type '%0.%1' could not be found for " - "macro %2; the type must be public and provided by a macro target in a " - "Swift package, or via '-plugin-path' or '-load-plugin-library'", - (StringRef, StringRef, DeclName)) + "macro %2", (StringRef, StringRef, DeclName)) ERROR(macro_must_be_defined,none, "macro %0 requires a definition", (DeclName)) ERROR(external_macro_outside_macro_definition,none, diff --git a/include/swift/Option/Options.td b/include/swift/Option/Options.td index dcaeec6876b06..6e5f7cae29689 100644 --- a/include/swift/Option/Options.td +++ b/include/swift/Option/Options.td @@ -1823,8 +1823,8 @@ def load_plugin_library: def load_plugin_executable: Separate<["-"], "load-plugin-executable">, Group, Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>, - HelpText<"Path to an executable compiler plugins and providing module names " - "such as macros">, + HelpText<"Path to a compiler plugin executable and a comma-separated list " + "of module names where the macro types are declared">, MetaVarName<"#">; include "FrontendOptions.td" diff --git a/test/Macros/macro_plugin_broken.swift b/test/Macros/macro_plugin_broken.swift index 55fb3bbe8be22..6ec89f4050ffb 100644 --- a/test/Macros/macro_plugin_broken.swift +++ b/test/Macros/macro_plugin_broken.swift @@ -20,8 +20,8 @@ // RUN: c-index-test -read-diagnostics %t/macro_expand.dia 2>&1 | %FileCheck -check-prefix CHECK %s // CHECK: (null):0:0: warning: compiler plugin not loaded: {{.+}}broken-plugin; failed to initialize -// CHECK: test.swift:1:33: warning: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; -// CHECK: test.swift:4:7: error: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; +// CHECK: test.swift:1:33: warning: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro' +// CHECK: test.swift:4:7: error: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro' // CHECK: +-{{.+}}test.swift:1:33: note: 'fooMacro' declared here //--- test.swift diff --git a/test/Macros/macros_diagnostics.swift b/test/Macros/macros_diagnostics.swift index f6ec5a5f5093b..0c6ba47d8e8c7 100644 --- a/test/Macros/macros_diagnostics.swift +++ b/test/Macros/macros_diagnostics.swift @@ -136,7 +136,7 @@ func shadow(a: Int, b: Int, stringify: Int) { } func testMissing() { - #missingMacro1("hello") // expected-error{{external macro implementation type 'MissingModule.MissingType' could not be found for macro 'missingMacro1'; the type must be public and provided by a macro target in a Swift package, or via '-plugin-path' or '-load-plugin-library'}} + #missingMacro1("hello") // expected-error{{external macro implementation type 'MissingModule.MissingType' could not be found for macro 'missingMacro1'}} } @freestanding(expression) macro undefined() // expected-error{{macro 'undefined()' requires a definition}}