From 36a7cc62923248423d664c95b0840121dfeb8b8c Mon Sep 17 00:00:00 2001 From: Timur Iskhodzhanov Date: Mon, 9 Apr 2012 11:50:27 +0000 Subject: [PATCH] Use 'typename' instead of 'class' in template<> definitions supporting POD types llvm-svn: 154314 --- compiler-rt/lib/asan/tests/asan_test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler-rt/lib/asan/tests/asan_test.cc b/compiler-rt/lib/asan/tests/asan_test.cc index 51647a0e7405..220dea92191f 100644 --- a/compiler-rt/lib/asan/tests/asan_test.cc +++ b/compiler-rt/lib/asan/tests/asan_test.cc @@ -66,7 +66,7 @@ static uint32_t global_seed = 0; const size_t kLargeMalloc = 1 << 24; -template +template NOINLINE void asan_write(T *a) { *a = 0; } @@ -112,7 +112,7 @@ NOINLINE void free_ccc(void *p) { free(p); break_optimization(0);} NOINLINE void free_bbb(void *p) { free_ccc(p); break_optimization(0);} NOINLINE void free_aaa(void *p) { free_bbb(p); break_optimization(0);} -template +template NOINLINE void oob_test(int size, int off) { char *p = (char*)malloc_aaa(size); // fprintf(stderr, "writing %d byte(s) into [%p,%p) with offset %d\n", @@ -122,7 +122,7 @@ NOINLINE void oob_test(int size, int off) { } -template +template NOINLINE void uaf_test(int size, int off) { char *p = (char *)malloc_aaa(size); free_aaa(p); @@ -282,7 +282,7 @@ TEST(AddressSanitizer, DISABLED_TSDTest) { pthread_key_delete(test_key); } -template +template void OOBTest() { char expected_str[100]; for (int size = sizeof(T); size < 20; size += 5) { @@ -795,7 +795,7 @@ static string LeftOOBErrorMessage(int oob_distance) { return string(expected_str); } -template +template void MemSetOOBTestTemplate(size_t length) { if (length == 0) return; size_t size = Ident(sizeof(T) * length); @@ -852,7 +852,7 @@ TEST(AddressSanitizer, MemSetOOBTest) { } // Same test for memcpy and memmove functions -template +template void MemTransferOOBTestTemplate(size_t length) { if (length == 0) return; size_t size = Ident(sizeof(T) * length); -- GitLab