llvm.org GIT mirror llvm / 00e79db
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 Justin Lebar 3 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
6161 EXPECT_EQ(MockResolver, *Resolver) << "Resolver should pass through";
6262 size_t I = 0;
6363 for (auto &ObjPtr : Objects) {
64 EXPECT_EQ(MockObjects[I++] + 1, *ObjPtr) << "Transform should be applied";
64 EXPECT_EQ(MockObjects[I] + 1, *ObjPtr) << "Transform should be applied";
65 I++;
6566 }
6667 EXPECT_EQ(MockObjects.size(), I) << "Number of objects should match";
6768 LastCalled = "addObjectSet";