From: Chandler Carruth Date: Wed, 11 Jan 2017 08:23:29 +0000 (+0000) Subject: [PM] Pull a lambda out of an argument into a named variable to try and X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3bb9ef6a28e3c697187eaf5f2a98c886beffa0a;p=llvm [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291656 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Analysis/LoopPassManagerTest.cpp b/unittests/Analysis/LoopPassManagerTest.cpp index 97c27987909..6288dc993e4 100644 --- a/unittests/Analysis/LoopPassManagerTest.cpp +++ b/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)); } };