File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
test/Interop/SwiftToCxx/stdlib Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2397,6 +2397,11 @@ static bool isAsyncAlternativeOfOtherDecl(const ValueDecl *VD) {
2397
2397
}
2398
2398
2399
2399
static bool hasExposeAttr (const ValueDecl *VD) {
2400
+ if (isa<NominalTypeDecl>(VD) && VD->getModuleContext ()->isStdlibModule ()) {
2401
+ if (VD == VD->getASTContext ().getStringDecl ())
2402
+ return true ;
2403
+ return false ;
2404
+ }
2400
2405
if (VD->getAttrs ().hasAttribute <ExposeAttr>())
2401
2406
return true ;
2402
2407
if (const auto *NMT = dyn_cast<NominalTypeDecl>(VD->getDeclContext ()))
Original file line number Diff line number Diff line change 5
5
// RUN: %check-interop-cxx-header-in-clang(%t/Swift.h -Wno-unused-private-field -Wno-unused-function)
6
6
7
7
// CHECK: namespace Swift {
8
+
9
+ // CHECK: class String final {
10
+ // CHECK-NEXT: public:
11
+ // CHECK-NEXT: inline ~String() {
12
+ // CHECK: }
13
+ // CHECK-NEXT: inline String(const String &other) {
14
+ // CHECK: }
15
+ // CHECK-NEXT: inline String(String &&) = default;
16
+ // CHECK-NEXT: static inline String init();
17
+ // CHECK-NEXT: private:
18
+
8
19
// CHECK: } // namespace Swift
You can’t perform that action at this time.
0 commit comments