mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Macros/Parser] Attributes on MacroExpansionDecl
* Parse `#<identifier>` attribute list as a `MacroExpansionDecl` regardless of the position * Diagnose whitespaces between `#` and the macro name. * Correctly attach attributes to `MacroExpansionDecl` * Fix `OrigDeclAttributes` to handle modifiers (use `getLocation()` instead of `AtLoc`.) Type checking is a TODO rdar://107386648
This commit is contained in:
@@ -12,7 +12,7 @@ let _ = #"\##("invalid")"#
|
||||
let _ = ###"""invalid"######
|
||||
// expected-error@-1{{too many '#' characters in closing delimiter}}{{26-29=}}
|
||||
// expected-error@-2{{consecutive statements on a line must be separated by ';'}}
|
||||
// expected-error@-3 3 {{expected a macro identifier}}
|
||||
// expected-error@-3{{expected a macro identifier}}
|
||||
|
||||
let _ = ####"invalid"###
|
||||
// expected-error@-1{{unterminated string literal}}
|
||||
@@ -20,7 +20,7 @@ let _ = ####"invalid"###
|
||||
let _ = ###"invalid"######
|
||||
// expected-error@-1{{too many '#' characters in closing delimiter}}{{24-27=}}
|
||||
// expected-error@-2{{consecutive statements on a line must be separated by ';'}}
|
||||
// expected-error@-3 3 {{expected a macro identifier}}
|
||||
// expected-error@-3{{expected a macro identifier}}
|
||||
|
||||
let _ = ##"""aa
|
||||
foobar
|
||||
|
||||
Reference in New Issue
Block a user