Skip to content

Commit 0d0b901

Browse files
committed
Revert "[FIX] Do not copy an llvm::function_ref if it has to be reused"
This fix doesn't seem to be right (function_ref can/should be passed by value) so I'm reverted it to see if the buildbots decide to explain what's wrong. This reverts commit 857bf5d.
1 parent 5d4c1c0 commit 0d0b901

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/include/clang/AST/OpenMPClause.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7060,10 +7060,10 @@ struct OMPTraitInfo {
70607060
llvm::SmallVector<OMPTraitSet, 4> Sets;
70617061

70627062
bool anyScoreOrCondition(
7063-
const llvm::function_ref<bool(Expr *&, bool /* IsScore */)> &Cond) {
7064-
return llvm::any_of(Sets, [&Cond](OMPTraitInfo::OMPTraitSet &Set) {
7063+
llvm::function_ref<bool(Expr *&, bool /* IsScore */)> Cond) {
7064+
return llvm::any_of(Sets, [Cond](OMPTraitInfo::OMPTraitSet &Set) {
70657065
return llvm::any_of(
7066-
Set.Selectors, [&Cond](OMPTraitInfo::OMPTraitSelector &Selector) {
7066+
Set.Selectors, [Cond](OMPTraitInfo::OMPTraitSelector &Selector) {
70677067
return Cond(Selector.ScoreOrCondition,
70687068
/* IsScore */ Selector.Kind !=
70697069
llvm::omp::TraitSelector::user_condition);

0 commit comments

Comments
 (0)