From babd4476b2fa93ce2e746b9d8ca165c6fc3449d5 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 11 Jan 2017 08:23:29 +0000 Subject: [PM] Pull a lambda out of an argument into a named variable to try and get a little more clarity about the nature of the issue MSVC is having with this code. llvm-svn: 291656 --- llvm/unittests/Analysis/LoopPassManagerTest.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/llvm/unittests/Analysis/LoopPassManagerTest.cpp b/llvm/unittests/Analysis/LoopPassManagerTest.cpp index 97c27987909..6288dc993e4 100644 --- a/llvm/unittests/Analysis/LoopPassManagerTest.cpp +++ b/llvm/unittests/Analysis/LoopPassManagerTest.cpp @@ -82,13 +82,14 @@ protected: ON_CALL(static_cast(*this), run(_, _, testing::Matcher(_)...)) .WillByDefault(Return(this->getResult())); + auto InvalidateLambda = [](IRUnitT &IR, const PreservedAnalyses &PA, + typename AnalysisManagerT::Invalidator &Inv) { + auto PAC = PA.template getChecker(); + return !PAC.preserved() && + !PAC.template preservedSet>(); + }; ON_CALL(static_cast(*this), invalidate(_, _, _)) - .WillByDefault(Invoke([](IRUnitT &IR, const PreservedAnalyses &PA, - typename AnalysisManagerT::Invalidator &Inv) { - auto PAC = PA.template getChecker(); - return !PAC.preserved() && - !PAC.template preservedSet>(); - })); + .WillByDefault(Invoke(InvalidateLambda)); } }; -- cgit v1.2.3