]> granicus.if.org Git - clang/commitdiff
After spending 15 minutes trying to figure out why this was crashing, I realized...
authorAnders Carlsson <andersca@mac.com>
Mon, 1 Jun 2009 00:40:08 +0000 (00:40 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 1 Jun 2009 00:40:08 +0000 (00:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72680 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaTemplate/example-dynarray.cpp

index dd2488fc382a6b474ca76d48143ef34909c09af0..cca3709bebbf9836c785be8e9b0803d90242a520 100644 (file)
@@ -31,7 +31,7 @@ public:
     T* NewStart = (T*)malloc(sizeof(T) * other.size());
 
     for (unsigned I = 0, N = other.size(); I != N; ++I)
-      new (Start + I) T(other[I]);
+      new (NewStart + I) T(other[I]);
 
     // FIXME: destroy everything in Start
     free(Start);