File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
test/SymbolGraph/ClangImporter Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -583,6 +583,12 @@ bool SymbolGraph::isImplicitlyPrivate(const Decl *D,
583
583
584
584
// Don't record effectively internal declarations if specified
585
585
if (D->hasUnderscoredNaming ()) {
586
+ // Some implicit decls from Clang with underscored names sneak in, so throw those out
587
+ if (const auto *clangD = D->getClangDecl ()) {
588
+ if (clangD->isImplicit ())
589
+ return true ;
590
+ }
591
+
586
592
AccessLevel symLevel = AccessLevel::Public;
587
593
if (const ValueDecl *VD = dyn_cast<ValueDecl>(D)) {
588
594
symLevel = VD->getFormalAccess ();
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-pch -pch-output-dir %t %S/Inputs/ObjcProperty/ObjcProperty.framework/Headers/ObjcProperty.h
3
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-module-path %t/BridgingHeader.swiftmodule -import-objc-header %S/Inputs/ObjcProperty/ObjcProperty.framework/Headers/ObjcProperty.h -pch-output-dir %t -module-name BridgingHeader -disable-objc-attr-requires-foundation-module %s -emit-symbol-graph -emit-symbol-graph-dir %t -symbol-graph-minimum-access-level internal
4
+
5
+ // RUN: %FileCheck %s --input-file %t/BridgingHeader.symbols.json
6
+
7
+ // REQUIRES: objc_interop
8
+
9
+ // There are a few implicit symbols from Clang that snuck in when building with minimum-access
10
+ // level of "internal". Make sure they don't sneak back in. rdar://92018648
11
+
12
+ // CHECK-NOT: __NSConstantString
13
+ // CHECK-NOT: __builtin_ms_va_list
14
+ // CHECK-NOT: __builtin_va_list
15
+
You can’t perform that action at this time.
0 commit comments