You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Macros] Diagnose attached and freestanding declaration macros that produce
something other than a declaration.
The validation code already diagnosed all sorts of invalid declarations, but
it was ignoring AST nodes that aren't declarations at all.
// expected-note@-1 {{in expansion of macro 'accidentalCodeItem' here}}
140
+
// CHECK-DIAGS: @__swiftmacro_9MacroUser018invalidDeclarationA0yyF18accidentalCodeItemfMf0_.swift:1:1: error: expected macro expansion to produce a declaration
141
+
142
+
@AccidentalCodeItemstructS{}
143
+
// expected-note@-1 {{in expansion of macro 'AccidentalCodeItem' on struct 'S' here}}
144
+
// CHECK-DIAGS: @__swiftmacro_9MacroUser018invalidDeclarationA0yyF1SL_18AccidentalCodeItemfMp_.swift:1:1: error: expected macro expansion to produce a declaration
0 commit comments