Commit Graph

26 Commits

Author SHA1 Message Date
Rintaro Ishizaki
c9785d955d [SourceKit] Stop printing normal comments in clang generated interface
Generated interfaces for Clang modules used to try printing normal
comments between decls extracted from the header text. That was because
doc-comment was not common in C/ObjC headers. But mainly because of
"import as member feature" Clang decls aren't printed in the order as
they appear in the header file, the logic determinig which comment
belongs to which decl was not working property. We've decided to remove
that feature and only print the proper doc-comments as it has been
getting common.

rdar://93731287
2024-03-21 11:52:32 +09:00
Hamish Knight
1ffa8eeea4 [ClangImporter] Query Preprocessor::macros instead of getPreprocessingRecord for header printing
This better matches what the clang importer does
normally, avoids a Clang issue where
`getPreprocessedEntitiesInRange` returns incorrect
results, and avoids the need to enable the
preprocessor record. This then lets us re-enable
`print_clang_headers.swift`.

rdar://102151774
2023-05-11 21:10:28 +01:00
Erik Eckstein
e0e4e84b29 tests: temporarily disable an IDE test which is failing in rebranch
rdar://102151774
2022-12-01 15:26:27 +01:00
Robert Widmann
22f3e9620b Remap aarch64_32 to arm64_32 When Searching for Modules
The triple name aarch64_32 does not actually name a valid platform. The
actual platform (and valid triple arch string, confusingly enough) is
arm64_32. Remap between the two to correct for this difference.

rdar://77281393
2021-04-28 17:39:06 -07:00
Arnold Schwaighofer
a5440a8abd Disable IDE/print_clang_header(_swift_name).swift on arm64_32
It fails on the non_executable bot.
rdar://77281884
2021-04-28 13:30:36 -07:00
Saleem Abdulrasool
0a4bce94ea test: improve IDE test coverage for Windows
This improves the test pass rate for the IDE tests on Windows.  Some
failures remain.  Tests which expect the compiler to be built with
libxml2 cause 2 failures.  Another set of tests fail due to `stdint.h`
not being accessible to Windows due to include path ordering.  Some
other failures seem to stem from incomplete processing of sources.
2019-01-17 16:58:10 -08:00
Davide Italiano
64dfc22fb1 [IDE] XFAIL some tests on FreeBSD. They're broken on non-mac OS. 2017-11-19 15:24:16 -08:00
Jordan Rose
01cb554387 Re-apply "Make all CF types Equatable and Hashable." (#4568)
Like NSObject, CFType has primitive operations CFEqual and CFHash,
so Swift should allow those types to show up in Hashable positions
(like dictionaries). The most general way to do this was to
introduce a new protocol, _CFObject, and then have the importer
automatically make all CF types conform to it.

This did require one additional change: the == implementation that
calls through to CFEqual is in a new CoreFoundation overlay, but the
conformance is in the underlying Clang module. Therefore, operator
lookup for conformances has been changed to look in the overlay for
an imported declaration (if there is one).

This re-applies 361ab62454, reverted in
f50b1e73dc, after a /very/ long interval
where we decided if it was worth breaking people who've added these
conformances on their own. Since the workaround isn't too difficult---
use `#if swift(>=3.2)` to guard the extension introducing the
conformance---it was deemed acceptable.

https://bugs.swift.org/browse/SR-2388
2017-05-08 14:05:11 -07:00
Michael Gottesman
8d00a6cb59 Merge remote-tracking branch 'origin/master' into master-next
Conflicts:
	stdlib/public/SDK/GameplayKit/CMakeLists.txt
	test/DebugInfo/bound-namealiastype.swift
	test/DebugInfo/structs.swift
	test/IRGen/c_globals.swift
	test/SourceKit/DocSupport/doc_clang_module.swift
	test/SourceKit/Indexing/index_with_clang_module.swift
	utils/update-checkout
2016-06-25 01:13:50 -07:00
Ben Langmuir
39d204d9e4 [IDE, SourceKit] Pass in clang as arg[0] in initInvocationByClangArguments
This applies the same fix as cfdb8ac2e61, but this time to libIDE so
that SourceKit and swift-ide-test will also pass in an appropriate
argv[0]. Re-enable the tests that broke.

rdar://problem/24431137
2016-06-09 09:37:36 -07:00
Saleem Abdulrasool
06e0ea2a9c test: update test for clang changes
SVN r261372 flattened the -fmodule-implementation-of and -fmodule-name options.
Update the test accordingly.
2016-03-26 02:01:19 -07:00
Michael Gottesman
904301a6a0 Make two IDE tests only run on macosx. Argyrios is going to fix them after the merge. 2016-02-06 11:22:28 -08:00
Argyrios Kyrtzidis
729a1c89b5 [test] Split an OSX-specific invocation to its own file and make sure to use the mock SDK for a sourcekit test.
rdar://24263618
2016-01-20 20:26:19 -08:00
Xi Ge
8cc155c9e0 [ObjcHeaderPrint] When initializing CompilerInvocation with clang tuples, update i386 to x86_64 so that Stdlib is available. rdar://22978765
Swift SVN r32709
2015-10-15 19:19:15 +00:00
Argyrios Kyrtzidis
c8acc85ef7 [test] Try fixing test/IDE/print_clang_header.swift for the iOS bots by passing the right clang architecture and platform version.
rdar://22122556

Swift SVN r30965
2015-08-03 23:56:55 +00:00
Argyrios Kyrtzidis
b3dd0fa461 [IDE] When doing ObjC header interface printing, make sure to handle -include properly.
rdar://20893507

Swift SVN r30939
2015-08-03 02:12:14 +00:00
Argyrios Kyrtzidis
9917e74533 [IDE] Support printing the header interface for a header, that belongs to a clang module
that the clang invocation is importing.

Fully addresses rdar://21067984

Swift SVN r28962
2015-05-23 08:14:59 +00:00
Argyrios Kyrtzidis
054ebaaa3c [IDE] Handle properly the clang flag '-fmodule-implementation-of' when doing header interface printing.
Part of rdar://21067984

Swift SVN r28961
2015-05-23 08:14:57 +00:00
Argyrios Kyrtzidis
42cc79b27a [test] Move inputs for test/IDE/print_clang_header.swift to their own subdirectory. NFC.
Swift SVN r28960
2015-05-23 08:14:54 +00:00
Graham Batty
2207f6582d Minor flag changes to tests for linux compat.
Swift SVN r28417
2015-05-11 16:06:09 +00:00
Argyrios Kyrtzidis
f000fcd383 [IDE] For header interface printing, include macros and module imports.
Swift SVN r28413
2015-05-11 06:48:28 +00:00
Argyrios Kyrtzidis
3df7a35683 [IDE] Speed up header interface printing.
Instead of importing everything and filtering later (so all of clang modules get deserialized and associated Swift decls get created),
lazily import as Swift decls only the Clang decls that we need from a particular header.

This also fixes printing ObjC categories in the header as Swift extensions.

Swift SVN r28358
2015-05-09 02:03:51 +00:00
Ted Kremenek
a6bf5f919f Revert "[test] Use '-target' for cc args as well."
This is breaking the iOS bots.

Swift SVN r28215
2015-05-06 20:00:53 +00:00
Argyrios Kyrtzidis
2b8b244b86 [test] Use '-target' for cc args as well.
Swift SVN r28206
2015-05-06 17:03:48 +00:00
Argyrios Kyrtzidis
0de049b6b6 [test/IDE] Fix the test for non-osx targets.
rdar://20828828

Swift SVN r28198
2015-05-06 04:44:10 +00:00
Argyrios Kyrtzidis
a586753f0f [IDE] Implement generating the Swift interface for an C/ObjC header
This translates clang arguments to swift ones, uses the bridging header
functionality to parse the provided file, and re-uses part of the module interface
printing implementation to print an interface for the header.

Part of rdar://19939192

Swift SVN r28062
2015-05-02 01:17:45 +00:00