[compiler-rt] r206180 - [asan] Do not use lambda in sanitizer lit tests.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Apr 14 08:19:07 PDT 2014
Author: eugenis
Date: Mon Apr 14 10:19:07 2014
New Revision: 206180
URL: http://llvm.org/viewvc/llvm-project?rev=206180&view=rev
Log:
[asan] Do not use lambda in sanitizer lit tests.
We may be building with a very old C++ library.
Modified:
compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc
Modified: compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc?rev=206180&r1=206179&r2=206180&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/mmap_limit_mb.cc Mon Apr 14 10:19:07 2014
@@ -22,8 +22,7 @@ int main(int argc, char **argv) {
std::vector<char *> 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<char *>::reference ref) { delete[] ref; });
+ for (auto p : v) delete[] p;
printf("PASS\n");
// CHECK: AddressSanitizer CHECK failed{{.*}}total_mmaped{{.*}}mmap_limit_mb
return 0;
More information about the llvm-commits
mailing list