File tree Expand file tree Collapse file tree 7 files changed +46
-6
lines changed
Inputs/clang-importer-sdk/usr/include Expand file tree Collapse file tree 7 files changed +46
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ typedef struct CGPoint CGPoint;
5
5
typedef CGPoint NSPoint ;
6
6
NSString *NSStringToNSString (NSString *str);
7
7
8
- struct FooStruct1 {
8
+ struct FooStructA {
9
9
int x;
10
10
double y;
11
11
};
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public func testProtocolWrapper(_ conformer: ForwardClassUser) {
24
24
conformer. consumeForwardClass ( conformer. forward)
25
25
}
26
26
27
- public func testStruct( _ p: Point ) -> Point {
27
+ public func testStruct( _ p: Darwin . Point ) -> Darwin . Point {
28
28
var result = p
29
29
result. y += 5
30
30
return result
Original file line number Diff line number Diff line change @@ -27,5 +27,5 @@ func testCrossReferences(_ derived: Derived) {
27
27
_ = obj. safeOverrideProto ( ForwardProtoAdopter ( ) ) as NSObject
28
28
29
29
testProtocolWrapper ( ProtoConformer ( ) )
30
- _ = testStruct ( Point ( x: 2 , y: 3 ) )
30
+ _ = testStruct ( Darwin . Point ( x: 2 , y: 3 ) )
31
31
}
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ func testProtocolWrapper(_ conformer: ForwardClassUser) {
39
39
}
40
40
testProtocolWrapper ( ProtoConformer ( ) )
41
41
42
- func testStruct( _ p: Point ) -> Point {
42
+ func testStruct( _ p: Darwin . Point ) -> Darwin . Point {
43
43
var result = p
44
44
result. y += 5
45
45
return result
Original file line number Diff line number Diff line change @@ -17,5 +17,5 @@ let encoding: UInt = NSUTF8StringEncoding
17
17
let viaTypedef : Redeclaration . NSPoint = AppKit . NSPoint ( x: 0 , y: 0 )
18
18
Redeclaration . NSStringToNSString ( AppKit . NSStringToNSString ( " abc " ) ) // expected-warning {{result of call is unused}}
19
19
20
- let viaStruct : Redeclaration . FooStruct1 = AppKit . FooStruct1 ( )
20
+ let viaStruct : Redeclaration . FooStructA = AppKit . FooStructA ( )
21
21
let forwardDecl : Redeclaration . Tribool = AppKit . Tribool ( ) // expected-error {{no type named 'Tribool' in module 'Redeclaration'}}
Original file line number Diff line number Diff line change 1
1
#ifndef __MACTYPES__
2
2
#define __MACTYPES__
3
3
4
- #include "ctypes.h"
4
+ #define STDLIB_TEST (TYPE , NAME ) extern NAME NAME##_test
5
+ #define STDLIB_TYPEDEF (TYPE , NAME ) \
6
+ typedef TYPE NAME; \
7
+ STDLIB_TEST(TYPE, NAME)
8
+
9
+ STDLIB_TYPEDEF (__INT8_TYPE__ , SInt8 );
10
+ STDLIB_TYPEDEF (__INT16_TYPE__ , SInt16 );
11
+ STDLIB_TYPEDEF (__INT32_TYPE__ , SInt32 );
12
+
13
+ STDLIB_TYPEDEF (__UINT8_TYPE__ , UInt8 );
14
+ STDLIB_TYPEDEF (__UINT16_TYPE__ , UInt16 );
15
+ STDLIB_TYPEDEF (__UINT32_TYPE__ , UInt32 );
16
+
17
+ #include <stdint.h>
18
+
19
+ #if !defined(__have_Point )
20
+ #define __have_Point
21
+ struct Point {
22
+ float x ;
23
+ float y ;
24
+ };
25
+ #endif
26
+
27
+ /*!
28
+ @keyword FooA, StructA
29
+ */
30
+ struct FooStructA {
31
+ /*!
32
+ @keyword x, StructA
33
+ @recommended y
34
+ */
35
+ int x ;
36
+ /*!
37
+ @keyword y, StructA
38
+ @recommendedover x
39
+ */
40
+ double y ;
41
+ };
5
42
6
43
typedef SInt32 Fixed ;
7
44
typedef Fixed * FixedPtr ;
Original file line number Diff line number Diff line change @@ -17,10 +17,13 @@ enum {
17
17
AnonConstSmall2
18
18
};
19
19
20
+ #if !defined(__have_Point )
21
+ #define __have_Point
20
22
struct Point {
21
23
float x ;
22
24
float y ;
23
25
};
26
+ #endif
24
27
25
28
typedef struct {
26
29
struct {
You can’t perform that action at this time.
0 commit comments