mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ClangImporter] Don't put method redeclarations in a member list.
Previously we'd try to put the same method into the list of members multiple times--once for each redeclaration in the @interface. This led to an assertion failure. Checking the canonical decl isn't super cheap, but the ObjCMethodDecl redeclaration infrastructure seems to be fairly broken. We can revisit this later. There's also a test for what happens when categories get involved. I'm not convinced this is correct behavior, either, and will file an additional bug to look into that at some point. rdar://problem/19039485 Swift SVN r24129
This commit is contained in:
@@ -144,7 +144,7 @@ func testCompleteModuleQualifiedFoo2() {
|
||||
Foo#^CLANG_QUAL_FOO_2^#
|
||||
// If the number of results below changes, then you need to add a result to the
|
||||
// list below.
|
||||
// CLANG_QUAL_FOO_2: Begin completions, 61 items
|
||||
// CLANG_QUAL_FOO_2: Begin completions, 62 items
|
||||
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule: .FooClassBase[#FooClassBase#]{{$}}
|
||||
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule: .FooClassDerived[#FooClassDerived#]{{$}}
|
||||
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule: .ClassWithInternalProt[#ClassWithInternalProt#]{{$}}
|
||||
@@ -206,6 +206,7 @@ func testCompleteModuleQualifiedFoo2() {
|
||||
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule: .FooUnavailableMembers[#FooUnavailableMembers#]
|
||||
// CLANG_QUAL_FOO_2-DAG: Decl[TypeAlias]/OtherModule: .FooTypedef1[#Int32#]{{$}}
|
||||
// CLANG_QUAL_FOO_2-DAG: Decl[TypeAlias]/OtherModule: .FooCFTypeRef[#FooCFType#]{{$}}
|
||||
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule: .FooRepeatedMembers[#FooRepeatedMembers#]{{$}}
|
||||
// CLANG_QUAL_FOO_2: End completions
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user