[llvm] r275293 - Fix warning in ObjectTransformLayerTest.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 11:27:49 PDT 2016
Author: jlebar
Date: Wed Jul 13 13:27:49 2016
New Revision: 275293
URL: http://llvm.org/viewvc/llvm-project?rev=275293&view=rev
Log:
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.
Modified:
llvm/trunk/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp
Modified: llvm/trunk/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp?rev=275293&r1=275292&r2=275293&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp Wed Jul 13 13:27:49 2016
@@ -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";
More information about the llvm-commits
mailing list