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 {
679679 if (D->getModuleContext ()->getName () != M.getName () && !Walker.isFromExportedImportedModule (D)) {
680680 return false ;
681681 }
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 {
684688 return false ;
685689 }
686690 return !isImplicitlyPrivate (cast<ValueDecl>(D))
Original file line number Diff line number Diff line change 33// 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
44// RUN: %target-swift-symbolgraph-extract -sdk %clang-importer-sdk -module-name ObjcProperty -F %t -output-dir %t -pretty-print -v
55// RUN: %FileCheck %s --input-file %t/ObjcProperty.symbols.json
6+ // RUN: %FileCheck %s --input-file %t/ObjcProperty.symbols.json --check-prefix XLANG
67
78// REQUIRES: objc_interop
89
910import Foundation
1011
1112public enum SwiftEnum { }
1213
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+
1322// 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 {
1919
2020public class Derived : Base {
2121 // CHECK-NOT: "precise": "s:24SuperclassImplementation4BaseC3fooyyF::SYNTHESIZED::s:24SuperclassImplementation7DerivedC"
22+
23+ // Also skip synthesized constructors
24+ // CHECK-NOT: "precise": "s:24SuperclassImplementation7DerivedCACycfc"
2225}
2326
2427public class DerivedDerived : Derived {
2528 // CHECK-NOT: "precise": "s:24SuperclassImplementation4BaseC3fooyyF::SYNTHESIZED::s:24SuperclassImplementation07DerivedC0C"
29+
30+ // Also skip synthesized constructors
31+ // CHECK-NOT: "precise": "s:24SuperclassImplementation07DerivedC0CACycfc"
2632}
You can’t perform that action at this time.
0 commit comments