Skip to content

Commit e248f83

Browse files
committed
Fix up some more non-prototyped declarations with swift_names.
This is now diagnosed on the Clang side.
1 parent ca53873 commit e248f83

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

test/IDE/Inputs/custom-modules/ImportAsMemberError.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ typedef NSObject<ImportedProtocolBase> *ImportedProtocolBase_t;
1919
typedef NSObject<ErrorProto> *ErrorProto_t;
2020

2121
// Instance and static member onto protocol
22-
void mutateSomeStaticState()
22+
void mutateSomeStaticState(void)
2323
__attribute__((swift_name("ErrorProto.mutateSomeStaticState()"))); // ok
2424
void mutateSomeInstanceState(ErrorProto_t self) __attribute__((
2525
swift_name("ErrorProto.mutateSomeInstanceState(self:)"))); // error
2626

2727
// Non-prototype declaration
2828
extern void IAMErrorStructHasPrototype(void)
2929
__attribute__((swift_name("ErrorStruct.hasPrototype()"))); // ok
30-
extern void IAMErrorStructNonPrototype()
31-
__attribute__((swift_name("ErrorStruct.nonPrototype()"))); // error
3230

3331
#endif // IMPORT_AS_MEMBER_ERR_H

test/IDE/import_as_member_objc.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ import IAMError
4343

4444
// Errors
4545
ErrorStruct.hasPrototype();
46-
ErrorStruct.nonPrototype();
47-
// expected-error@-1{{type 'ErrorStruct' has no member 'nonPrototype'}}
4846

4947
// Protocols
5048
@objc class Foo : NSObject, IAMProto {}

0 commit comments

Comments
 (0)