Commit Graph

6 Commits

Author SHA1 Message Date
Rintaro Ishizaki
a8fba10da1 [Parse] Ignore '(' on newline after attribute names
Also '#error', '#warning', and '#sourceLocation'.

Other call-like syntax (call expression, macro expansion, and custom
attribtues) requires '(' on the same line as the callee. For consistency,
built-in attributes and built-in directives should also ignore '(' on
next line.
2025-08-24 19:20:33 -07:00
Harlan Haskins
c9980f1b20 [test] Add some more tests for #warning
It should support multi-line strings and strings with custom delimiters, as long as they’re not interpolating.
2018-12-17 18:05:17 -08:00
Harlan Haskins
7bd2061bbd [TBDGen] Allow #warning/#error in protocols
Resolves [SR-9519](https://bugs.swift.org/browse/SR-9519)
2018-12-17 18:05:17 -08:00
Rintaro Ishizaki
2e14337e4a [Parse] Don't allow attributed #errror/#warning (#15705) 2018-04-04 08:36:18 +09:00
Harlan
a42c5ce733 Add no-op visitor in SILGenFunction for #warning/#error (#15008)
* Add no-op visitor in SILGenFunction for #warning/#error

* Switch to a compile-based test

* Actually add file substitution
2018-03-06 12:26:39 -05:00
Harlan
5e02d2a877 Implement #warning and #error (#14048)
* Implement #warning and #error

* Fix #warning/#error in switch statements

* Fix AST printing for #warning/#error

* Add to test case

* Add extra handling to ParseDeclPoundDiagnostic

* fix dumping

* Consume the right paren even in the failure case

* Diagnose extra tokens on the same line after a diagnostic directive
2018-02-03 18:07:05 -05:00