| Index: base/tools_sanity_unittest.cc
|
| diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc
|
| index 64a9ca68f1878431713960c7a2a41a95abacbfa2..661b58e44ec98f0c4fad0126ada8d6bb2c2fdc1c 100644
|
| --- a/base/tools_sanity_unittest.cc
|
| +++ b/base/tools_sanity_unittest.cc
|
| @@ -84,7 +84,8 @@ TEST(ToolsSanityTest, ArrayDeletedWithoutBraces) {
|
| if (!RunningOnValgrind())
|
| return;
|
|
|
| - int *foo = new int[10];
|
| + // Without the |volatile|, clang optimizes away the next two lines.
|
| + int* volatile foo = new int[10];
|
| delete foo;
|
| }
|
|
|
| @@ -93,7 +94,8 @@ TEST(ToolsSanityTest, SingleElementDeletedWithBraces) {
|
| if (!RunningOnValgrind())
|
| return;
|
|
|
| - int *foo = new int;
|
| + // Without the |volatile|, clang optimizes away the next two lines.
|
| + int* volatile foo = new int;
|
| delete [] foo;
|
| }
|
|
|
|
|