From 170226ef17bd6977c91adcdb6bde9faefc11ccb4 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Mon, 14 Apr 2014 15:19:07 +0000 Subject: [PATCH] [asan] Do not use lambda in sanitizer lit tests. We may be building with a very old C++ library. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206180 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/asan/TestCases/mmap_limit_mb.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/asan/TestCases/mmap_limit_mb.cc b/test/asan/TestCases/mmap_limit_mb.cc index cd8783b50..92c114127 100644 --- a/test/asan/TestCases/mmap_limit_mb.cc +++ b/test/asan/TestCases/mmap_limit_mb.cc @@ -22,8 +22,7 @@ int main(int argc, char **argv) { std::vector v; for (long total = total_mb << 20; total > 0; total -= allocation_size) v.push_back(new char[allocation_size]); - std::for_each(v.begin(), v.end(), - [](std::vector::reference ref) { delete[] ref; }); + for (auto p : v) delete[] p; printf("PASS\n"); // CHECK: AddressSanitizer CHECK failed{{.*}}total_mmaped{{.*}}mmap_limit_mb return 0; -- 2.11.4.GIT