Fix warning in ObjectTransformLayerTest.

Doing "I++" inside of an EXPECT_* triggers

  warning: expression with side effects has no effect in an unevaluated context

because EXPECT_* partially expands to

  EqHelper<(sizeof(::testing::internal::IsNullLiteralHelper(MockObjects[I++] + 1)) == 1)>

which is an unevaluated context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275293 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Lebar 2016-07-13 18:27:49 +00:00
parent 972586b5a1
commit 00e79db851

View File

@ -62,7 +62,8 @@ public:
EXPECT_EQ(MockResolver, *Resolver) << "Resolver should pass through";
size_t I = 0;
for (auto &ObjPtr : Objects) {
EXPECT_EQ(MockObjects[I++] + 1, *ObjPtr) << "Transform should be applied";
EXPECT_EQ(MockObjects[I] + 1, *ObjPtr) << "Transform should be applied";
I++;
}
EXPECT_EQ(MockObjects.size(), I) << "Number of objects should match";
LastCalled = "addObjectSet";