<div dir="ltr">Underlying function_ref fix made in <a href="https://github.com/llvm/llvm-project/commit/cbce88dd3a9ea7161da3c57749cf03873dc7ea79">https://github.com/llvm/llvm-project/commit/cbce88dd3a9ea7161da3c57749cf03873dc7ea79</a> 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.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 22, 2020 at 10:44 PM David Blaikie via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: David Blaikie<br>
Date: 2020-03-22T22:43:44-07:00<br>
New Revision: 2ec59a0a40f4ec02e6b2dbe5f12261959c191aa9<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/2ec59a0a40f4ec02e6b2dbe5f12261959c191aa9" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/2ec59a0a40f4ec02e6b2dbe5f12261959c191aa9</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/2ec59a0a40f4ec02e6b2dbe5f12261959c191aa9.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/2ec59a0a40f4ec02e6b2dbe5f12261959c191aa9.diff</a><br>
<br>
LOG: Buildbot debugging of 0d0b90105f92f6cd9cc7004d565834f4429183fb (lambda/function_ref lifetime issues)<br>
<br>
This is failing on several buildbots with some inexplicable (to me,<br>
right now) crashes. Let's see if this change is adequate to unblock the<br>
buildbots & further understanding can be gained later.<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    clang/include/clang/AST/OpenMPClause.h<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/clang/include/clang/AST/OpenMPClause.h b/clang/include/clang/AST/OpenMPClause.h<br>
index 548328d36a79..a781797c2d56 100644<br>
--- a/clang/include/clang/AST/OpenMPClause.h<br>
+++ b/clang/include/clang/AST/OpenMPClause.h<br>
@@ -7061,9 +7061,9 @@ struct OMPTraitInfo {<br>
<br>
   bool anyScoreOrCondition(<br>
       llvm::function_ref<bool(Expr *&, bool /* IsScore */)> Cond) {<br>
-    return llvm::any_of(Sets, [Cond](OMPTraitInfo::OMPTraitSet &Set) {<br>
+    return llvm::any_of(Sets, [&](OMPTraitInfo::OMPTraitSet &Set) {<br>
       return llvm::any_of(<br>
-          Set.Selectors, [Cond](OMPTraitInfo::OMPTraitSelector &Selector) {<br>
+          Set.Selectors, [&](OMPTraitInfo::OMPTraitSelector &Selector) {<br>
             return Cond(Selector.ScoreOrCondition,<br>
                         /* IsScore */ Selector.Kind !=<br>
                             llvm::omp::TraitSelector::user_condition);<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>