Commit Graph

5 Commits

Author SHA1 Message Date
Becca Royal-Gordon
da07ff577c [PrintAsClang] Warn about unstable decl order
PrintAsClang is supposed to emit declarations in the same order regardless of the compiler’s internal state, but we have repeatedly found that our current criteria are inadequate, resulting in non-functionality-affecting changes to generated header content. Add a diagnostic that’s emitted when this happens soliciting a bug report.

Since there *should* be no cases where the compiler fails to order declarations, this diagnostic is never actually emitted. Instead, we test this change by enabling `-verify` on nearly all PrintAsClang tests to make sure they are unaffected.

This did demonstrate a missing criterion that only mattered in C++ mode: extensions that varied only in their generic signature were not sorted stably. Add a sort criterion for this.
2025-02-14 21:41:36 -08:00
Saleem Abdulrasool
b67d5f0cf7 test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper
substitution in lit.  This will make it easier to replace it
appropriately with Windows equivalents.
2018-03-06 14:30:54 -08:00
Doug Gregor
80e9491fe3 Make Swift-3-inferred @objc explicit in test cases 2017-03-31 21:22:15 -07:00
Rintaro Ishizaki
4f51f7535f [PrintAsObjC] Add '__attribute__((return))' for 'Never' return methods
* Add 'SWIFT_NORETURN' macro to the prologue. This macro is evaluated to
  '__attribute__((noreturn))' where supported.
* Apply 'SWIFT_NORETURN' to 'isUninhabited()' methods.
2017-01-30 13:40:46 +09:00
Slava Pestov
2c7aae4128 Sema: 'Never'-returning functions can be represented in Objective-C
Fixes <https://bugs.swift.org/browse/SR-3203>.
2017-01-03 20:13:42 -08:00