Skip to content

Commit a78a7ec

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

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
@@ -3922,17 +3922,6 @@ namespace {
39223922
auto loc = Impl.importSourceLoc(decl->getLocation());
39233923
auto dc = Impl.importDeclContextOf(
39243924
decl, importedName.getEffectiveContext());
3925-
3926-
#ifndef NDEBUG
3927-
if (dc == nullptr) {
3928-
llvm::dbgs() << "No decl context!\n";
3929-
llvm::dbgs() << "Decl: " << importedName.getDeclName().getBaseIdentifier().str() << "\n";
3930-
llvm::dbgs() << "Decl: "; decl->dump();
3931-
llvm::dbgs() << "Efective ctx: "; importedName.getEffectiveContext().DC->dumpAsDecl();
3932-
llvm::dbgs() << "Decl ctx: "; decl->getDeclContext()->dumpAsDecl();
3933-
llvm_unreachable("");
3934-
}
3935-
#endif
39363925

39373926
SmallVector<GenericTypeParamDecl *, 4> genericParams;
39383927
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)