Underlying function_ref fix made in https://github.com/llvm/llvm-project/commit/cbce88dd3a9ea7161da3c57749cf03873dc7ea79 But I'm still happy to leave this code in as-is, though function_ref is small enough to be cheap to copy, I think it's simpler to write local/non-escaping lambdas with "[&]" for simplicity/clarity.
On Sun, Mar 22, 2020 at 10:44 PM David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > Author: David Blaikie > Date: 2020-03-22T22:43:44-07:00 > New Revision: 2ec59a0a40f4ec02e6b2dbe5f12261959c191aa9 > > URL: > https://github.com/llvm/llvm-project/commit/2ec59a0a40f4ec02e6b2dbe5f12261959c191aa9 > DIFF: > https://github.com/llvm/llvm-project/commit/2ec59a0a40f4ec02e6b2dbe5f12261959c191aa9.diff > > LOG: Buildbot debugging of 0d0b90105f92f6cd9cc7004d565834f4429183fb > (lambda/function_ref lifetime issues) > > This is failing on several buildbots with some inexplicable (to me, > right now) crashes. Let's see if this change is adequate to unblock the > buildbots & further understanding can be gained later. > > Added: > > > Modified: > clang/include/clang/AST/OpenMPClause.h > > Removed: > > > > > ################################################################################ > diff --git a/clang/include/clang/AST/OpenMPClause.h > b/clang/include/clang/AST/OpenMPClause.h > index 548328d36a79..a781797c2d56 100644 > --- a/clang/include/clang/AST/OpenMPClause.h > +++ b/clang/include/clang/AST/OpenMPClause.h > @@ -7061,9 +7061,9 @@ struct OMPTraitInfo { > > bool anyScoreOrCondition( > llvm::function_ref<bool(Expr *&, bool /* IsScore */)> Cond) { > - return llvm::any_of(Sets, [Cond](OMPTraitInfo::OMPTraitSet &Set) { > + return llvm::any_of(Sets, [&](OMPTraitInfo::OMPTraitSet &Set) { > return llvm::any_of( > - Set.Selectors, [Cond](OMPTraitInfo::OMPTraitSelector &Selector) > { > + Set.Selectors, [&](OMPTraitInfo::OMPTraitSelector &Selector) { > return Cond(Selector.ScoreOrCondition, > /* IsScore */ Selector.Kind != > llvm::omp::TraitSelector::user_condition); > > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits