File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
Relationships/Synthesized Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -679,8 +679,12 @@ bool SymbolGraph::canIncludeDeclAsNode(const Decl *D) const {
679
679
if (D->getModuleContext ()->getName () != M.getName () && !Walker.isFromExportedImportedModule (D)) {
680
680
return false ;
681
681
}
682
-
683
- if (!isa<ValueDecl>(D)) {
682
+
683
+ if (const auto *VD = dyn_cast<ValueDecl>(D)) {
684
+ if (VD->getOverriddenDecl () && D->isImplicit ()) {
685
+ return false ;
686
+ }
687
+ } else {
684
688
return false ;
685
689
}
686
690
return !isImplicitlyPrivate (cast<ValueDecl>(D))
Original file line number Diff line number Diff line change 3
3
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-module -o %t/ObjcProperty.framework/Modules/ObjcProperty.swiftmodule/%target-swiftmodule-name -import-underlying-module -F %t -module-name ObjcProperty -disable-objc-attr-requires-foundation-module %s
4
4
// RUN: %target-swift-symbolgraph-extract -sdk %clang-importer-sdk -module-name ObjcProperty -F %t -output-dir %t -pretty-print -v
5
5
// RUN: %FileCheck %s --input-file %t/ObjcProperty.symbols.json
6
+ // RUN: %FileCheck %s --input-file %t/ObjcProperty.symbols.json --check-prefix XLANG
6
7
7
8
// REQUIRES: objc_interop
8
9
9
10
import Foundation
10
11
11
12
public enum SwiftEnum { }
12
13
14
+ public class SwiftClass : Foo { }
15
+
16
+ // ensure that synthesized inherited objc symbols do not appear in the symbol graph
17
+
18
+ // CHECK-NOT: "c:objc(cs)NSObject(im)init"
19
+
20
+ // ensure that children of clang nodes appear in the symbol graph
21
+
13
22
// CHECK: "precise": "c:objc(cs)Foo(py)today"
23
+
24
+ // ensure that a swift class that inherits from an objc class still doesn't generate inherited
25
+ // symbols
26
+
27
+ // XLANG-COUNT-2: selectDate:
Original file line number Diff line number Diff line change @@ -19,8 +19,14 @@ public class Base {
19
19
20
20
public class Derived : Base {
21
21
// CHECK-NOT: "precise": "s:24SuperclassImplementation4BaseC3fooyyF::SYNTHESIZED::s:24SuperclassImplementation7DerivedC"
22
+
23
+ // Also skip synthesized constructors
24
+ // CHECK-NOT: "precise": "s:24SuperclassImplementation7DerivedCACycfc"
22
25
}
23
26
24
27
public class DerivedDerived : Derived {
25
28
// CHECK-NOT: "precise": "s:24SuperclassImplementation4BaseC3fooyyF::SYNTHESIZED::s:24SuperclassImplementation07DerivedC0C"
29
+
30
+ // Also skip synthesized constructors
31
+ // CHECK-NOT: "precise": "s:24SuperclassImplementation07DerivedC0CACycfc"
26
32
}
You can’t perform that action at this time.
0 commit comments