Skip to content

Commit db12dff

Browse files
authored
Merge pull request #73722 from rintaro/6.0-macros-attachedmacro-decllocation
[6.0][Macros] Fix source location for declaration syntax of attached macros
2 parents a5ca148 + fd23985 commit db12dff

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/ASTGen/Sources/ASTGen/Macros.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ func expandAttachedMacroIPC(
888888

889889
let declSyntax = PluginMessage.Syntax(
890890
syntax: Syntax(declarationNode),
891-
in: customAttrSourceFilePtr
891+
in: declarationSourceFilePtr
892892
)!
893893

894894
let parentDeclSyntax: PluginMessage.Syntax?

test/Macros/DebugDescription/error_complex_implementation.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// RUN: %empty-directory(%t)
44
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -verify -plugin-path %swift-plugin-dir
5+
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -verify -external-plugin-path %swift-plugin-dir#%swift-plugin-server
56

67
@DebugDescription
78
struct MyStruct {

0 commit comments

Comments
 (0)