Commit Graph

19 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
Doug Gregor
f39fe1a755 [Tests] Put NSObject Equatable/Hashable back in the ObjectiveC module.
Technically, these operations belong in the ObjectiveC module, where NSObject
is defined. Keep them there. However, we need to build the mock ObjectiveC
overlay with `-disable-objc-attr-requires-foundation-module` now.
2018-08-01 09:25:28 -07:00
Mani Ramezan
9df5adb150 Move mock Foundation framework into clang shared folder 2018-07-11 02:32:59 -04:00
Dmitri Gribenko
984210aa53 tests: replace '// RUN: rm -rf' '// RUN: mkdir' pairs with '%empty-directory(...)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Tim Bodeit
96c964ee0d [test/PrintAsObjc] Adjust existing test cases for SWIFT_WARN_UNUSED_RESULT 2016-12-10 01:48:49 +01:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Dmitri Gribenko
55864d10cb Tests: use 'mkdir -p' 2016-09-02 21:36:45 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Saleem Abdulrasool
89d37bc694 test: ignore unused options in some tests
These tests explicitly disable the use of modules.  However, the lit
configuration is such that the module cache path will be passed unconditionally
to the clang invocation.  Squelch the unused option warning (error).
2016-04-05 10:00:37 -07:00
Stephen Canon
71b1cea35c Tests for uint vectors in simd. 2016-03-24 10:48:53 -04:00
Dmitri Hrybenko
b4aea08bd5 Fix the test in the configuration with a separate SDK build
Swift SVN r28702
2015-05-18 08:07:34 +00:00
Joe Groff
cef754de45 Update ClangImporter to map SIMD types to their C-like Swift counterparts.
Swift SVN r28386
2015-05-09 23:03:39 +00:00
Joe Groff
95d1cf5e6d Revert "ClangImporter etc.: Remap C vector types to nested BaseType.VectorN types."
Reverts r28087. We're going back to the C++ interface for SIMD, and the changes in this patch are needless complication for that design.

Swift SVN r28384
2015-05-09 23:03:33 +00:00
Joe Groff
d0473756ec ClangImporter etc.: Remap C vector types to nested BaseType.VectorN types.
The design we landed on for SIMD is to define the vector types as nested types of their element, e.g. Float.Vector4, Int32.Vector2, etc. Update the Clang importer and other mapping facilities to match.

Swift SVN r28087
2015-05-02 15:04:43 +00:00
Joe Groff
fbd76737a4 Clang Importer: Rename the special vector type module to "simd".
We want this to act as an overlay/replacement for the C "simd" module.

Swift SVN r28047
2015-05-01 20:11:01 +00:00
Doug Gregor
5de47e93dd Remove uses of getProtocols() from serialization.
NFC except for having to work around the brokenness of
-enable-source-import in more places.

Swift SVN r27979
2015-04-30 16:13:45 +00:00
Dmitri Hrybenko
384ff12e1d Annotate tests that require ObjC runtime
Swift SVN r27431
2015-04-17 10:09:23 +00:00
Joe Groff
58660ec6ba PrintAsObjC: Support for SIMD types.
Splat out a bunch of typedefs for the small vector types we want to support, and map the SIMD.* types to them.

Swift SVN r27385
2015-04-16 22:07:09 +00:00