From: Nick Kledzik Date: Tue, 28 Jan 2014 23:25:13 +0000 (+0000) Subject: Be more explicit about which overloaded variant to use. Caught by ASan! X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ffcc42764e6915c99e9118285f699701126b7063;p=oota-llvm.git Be more explicit about which overloaded variant to use. Caught by ASan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200353 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index d259415bc39..275086bffdf 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -211,7 +211,7 @@ public: typename enable_if, ArrayRef >::type allocateCopy(ArrayRef Src) { size_t Length = Src.size(); - T *P = allocateCopy(Src.data(), Length*sizeof(T)); + T *P = allocateCopy(Src.data(), Length); return makeArrayRef(P, Length); }