From 8c06509f9590a63ab2d4361945aac18c02b71f0c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 13 Feb 2007 07:25:36 +0000 Subject: [PATCH] fix a critical bug in smallvector, where it would destroy elements that are not in its range (!). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34230 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/SmallVector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index befed925101..b5ee6c454b3 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -275,8 +275,8 @@ private: void destroy_range(T *S, T *E) { while (S != E) { - E->~T(); --E; + E->~T(); } } }; -- 2.34.1