Commit Graph

10 Commits

Author SHA1 Message Date
Slava Pestov
305620b354 ClangImporter: Reconcile Clang declaration hidden-ness between loadAllMembers() and lazy loading
Lazy loading checked if the ClangDecl was hidden, but loading all
members did not. Let's make loadAllMembers() behave like the lazy
path, and fix some of the mock SDKs in the test suite.
2020-01-24 17:07:08 -05:00
Saleem Abdulrasool
bc27395838 Inputs: sprinkle _Null_unspecified to silence nullability-completness
When trying to figure out errors from an import failure, the nullability
completeness warnings would clutter the output making it difficult to
identify the errors.  Sprinkle the declaarations with
`_Null_unspecified` to maintain the current nullability semantics and
silence the warnings.  NFC.
2018-06-11 09:23:22 -07:00
Jordan Rose
a4162c5d79 [ClangImporter] Don't put forward-declared structs in the lookup table.
Otherwise, the lookup table for "CGColor" has two entries, because of
this:

    typedef struct CGColor *CGColorRef;

and that interferes with our ability to import things as members of
"CGColor" (as opposed to "CGColorRef"), which affects the fix-its we
generate when you try to use the non-member form.

This isn't necessarily the best long-term solution (as noted in the
FIXME) but it is expedient and won't break any current users.

More rdar://problem/26347297
2016-05-19 18:00:19 -07:00
Joe Groff
7feb60da04 SILGen: Handle C functions imported as labeled unit constructors. 2016-04-13 08:17:04 -07:00
Joe Groff
fe7c1ca670 Clang importer: Global vars imported as static member properties are final. 2016-04-12 10:03:48 -07:00
Ted Kremenek
6eb16f6550 Revert "Clang importer: Global vars imported as static member properties are final." (#2155) 2016-04-12 08:24:29 -07:00
Joe Groff
08a4267f66 Clang importer: Global vars imported as static member properties are final. 2016-04-11 18:02:41 -07:00
Michael Ilseman
1fdd1535d1 [Import as member] Simplified SILGen test for global assert 2016-04-11 15:29:23 -07:00
Joe Groff
5db097d098 SILGen: Fixes for C functions imported as CF class members. 2016-03-21 19:33:22 -07:00
Doug Gregor
94ba6e7a16 [Clang importer] Test import-as-member with CF types. 2016-03-06 22:31:51 -08:00