[PATCH] D16970: scoped alloc construct: adds basic tests

Alisdair Meredith via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 7 11:15:19 PST 2016


AlisdairM added a subscriber: AlisdairM.

================
Comment at: test/support/instrumentingallocators.h:25
@@ +24,3 @@
+    ~Instrumentation() {
+        assert(allocs_.empty());
+    }
----------------
Perhaps a loop, showing what leaked?

for (auto const& alloc : allocs_) {
    std::cout << "leaked: address(" << alloc.first <<)  size(" << alloc.second << ")\n";
}


http://reviews.llvm.org/D16970





More information about the cfe-commits mailing list