aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/ImmutableSetTest.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-01-02 23:13:30 +0000
committerBill Wendling <isanbard@gmail.com>2009-01-02 23:13:30 +0000
commitaeac31c8a15bd5e399dcef65f98b11239f18f998 (patch)
treea119c2bc6560558f76e6c5842f129ff2cb4712ec /llvm/unittests/ADT/ImmutableSetTest.cpp
parentfcef90909a0e849a4220019faedcad014ec8f5ad (diff)
downloadllvm-aeac31c8a15bd5e399dcef65f98b11239f18f998.zip
llvm-aeac31c8a15bd5e399dcef65f98b11239f18f998.tar.gz
llvm-aeac31c8a15bd5e399dcef65f98b11239f18f998.tar.bz2
Reassign the buffer to the pointer so that we don't overwrite memory.
llvm-svn: 61596
Diffstat (limited to 'llvm/unittests/ADT/ImmutableSetTest.cpp')
-rw-r--r--llvm/unittests/ADT/ImmutableSetTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/ImmutableSetTest.cpp b/llvm/unittests/ADT/ImmutableSetTest.cpp
index 2282cb8..74cd684 100644
--- a/llvm/unittests/ADT/ImmutableSetTest.cpp
+++ b/llvm/unittests/ADT/ImmutableSetTest.cpp
@@ -172,9 +172,11 @@ TEST_F(ImmutableSetTest, Callback2CharSetTest) {
ASSERT_EQ(obj.counter, 6);
+ ptr = buffer;
S2.foreach<MyIter>(obj);
ASSERT_EQ(obj.counter, 6+3);
+ ptr = buffer;
S.foreach<MyIter>(obj);
ASSERT_EQ(obj.counter, 6+3+0);
}