]> granicus.if.org Git - clang/commitdiff
Modules: Remove an invalid check in unit tests for r298278
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 21 Mar 2017 18:26:18 +0000 (18:26 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 21 Mar 2017 18:26:18 +0000 (18:26 +0000)
This is a fixup for the unit tests from r298278 (originally r298165).

Since the buffer that RawB2 pointed at was later deleted, a new call to
getBuffer may very well return a buffer at the same/old address.  Which is
fine.  Just delete the spurious check.

A Windows bot was occasionally hitting this in practice:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/7086

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298414 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Basic/MemoryBufferCacheTest.cpp

index e7d61e3ac967e64a5dde10ef44e3ceef6a085a85..99178f8150cc9dbd3eadf3fc56ddd3d2669046e1 100644 (file)
@@ -50,7 +50,6 @@ TEST(MemoryBufferCacheTest, addBuffer) {
 
   // Replace the middle buffer.
   B2 = getBuffer(2);
-  ASSERT_NE(RawB2, B2.get());
   RawB2 = B2.get();
   EXPECT_EQ(RawB2, &Cache.addBuffer("2", std::move(B2)));