Skip to content

Commit 7af7f43

Browse files
zoecarverhyp
authored andcommitted
[cxx-interop] Cleanup: remove debug printing, enable more tests.
1 parent ce86772 commit 7af7f43

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3886,17 +3886,6 @@ namespace {
38863886
auto loc = Impl.importSourceLoc(decl->getLocation());
38873887
auto dc = Impl.importDeclContextOf(
38883888
decl, importedName.getEffectiveContext());
3889-
3890-
#ifndef NDEBUG
3891-
if (dc == nullptr) {
3892-
llvm::dbgs() << "No decl context!\n";
3893-
llvm::dbgs() << "Decl: " << importedName.getDeclName().getBaseIdentifier().str() << "\n";
3894-
llvm::dbgs() << "Decl: "; decl->dump();
3895-
llvm::dbgs() << "Efective ctx: "; importedName.getEffectiveContext().DC->dumpAsDecl();
3896-
llvm::dbgs() << "Decl ctx: "; decl->getDeclContext()->dumpAsDecl();
3897-
llvm_unreachable("");
3898-
}
3899-
#endif
39003889

39013890
SmallVector<GenericTypeParamDecl *, 4> genericParams;
39023891
for (auto &param : *decl->getTemplateParameters()) {

test/Interop/Cxx/stdlib/std-unique-ptr.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ StdUniquePtrTestSuite.test("int") {
2121
StdUniquePtrTestSuite.test("array") {
2222
var u = makeArray()
2323
expectEqual(u[0], 1)
24-
// Over consume:
25-
// expectEqual(u[1], 2)
26-
// expectEqual(u[2], 3)
27-
// Crash:
28-
// u[0] = 10
29-
// expectEqual(u[0], 10)
24+
expectEqual(u[1], 2)
25+
expectEqual(u[2], 3)
26+
u[0] = 10
27+
expectEqual(u[0], 10)
3028
}
3129

3230
StdUniquePtrTestSuite.test("custom dtor") {

0 commit comments

Comments
 (0)