[llvm] r200353 - Be more explicit about which overloaded variant to use. Caught by ASan!

Nick Kledzik kledzik at apple.com
Tue Jan 28 15:25:13 PST 2014


Author: kledzik
Date: Tue Jan 28 17:25:13 2014
New Revision: 200353

URL: http://llvm.org/viewvc/llvm-project?rev=200353&view=rev
Log:
Be more explicit about which overloaded variant to use. Caught by ASan!

Modified:
    llvm/trunk/include/llvm/Support/Allocator.h

Modified: llvm/trunk/include/llvm/Support/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Allocator.h?rev=200353&r1=200352&r2=200353&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Allocator.h (original)
+++ llvm/trunk/include/llvm/Support/Allocator.h Tue Jan 28 17:25:13 2014
@@ -211,7 +211,7 @@ public:
   typename enable_if<isPodLike<T>, ArrayRef<T> >::type
   allocateCopy(ArrayRef<T> Src) {
     size_t Length = Src.size();
-    T *P = allocateCopy(Src.data(), Length*sizeof(T));
+    T *P = allocateCopy<T>(Src.data(), Length);
     return makeArrayRef(P, Length);
   }
 





More information about the llvm-commits mailing list