Skip to content

Commit

Permalink
Fix up some more non-prototyped declarations with swift_names.
Browse files Browse the repository at this point in the history
This is now diagnosed on the Clang side.
  • Loading branch information
jckarter committed May 18, 2016
1 parent ca53873 commit e248f83
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions test/IDE/Inputs/custom-modules/ImportAsMemberError.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ typedef NSObject<ImportedProtocolBase> *ImportedProtocolBase_t;
typedef NSObject<ErrorProto> *ErrorProto_t;

// Instance and static member onto protocol
void mutateSomeStaticState()
void mutateSomeStaticState(void)
__attribute__((swift_name("ErrorProto.mutateSomeStaticState()"))); // ok
void mutateSomeInstanceState(ErrorProto_t self) __attribute__((
swift_name("ErrorProto.mutateSomeInstanceState(self:)"))); // error

// Non-prototype declaration
extern void IAMErrorStructHasPrototype(void)
__attribute__((swift_name("ErrorStruct.hasPrototype()"))); // ok
extern void IAMErrorStructNonPrototype()
__attribute__((swift_name("ErrorStruct.nonPrototype()"))); // error

#endif // IMPORT_AS_MEMBER_ERR_H
2 changes: 0 additions & 2 deletions test/IDE/import_as_member_objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ import IAMError

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

// Protocols
@objc class Foo : NSObject, IAMProto {}
Expand Down

0 comments on commit e248f83

Please sign in to comment.