Skip to content

Commit

Permalink
Fix a dangling reference in FunctionRefTest.cpp (llvm#114949)
Browse files Browse the repository at this point in the history
  • Loading branch information
hokein authored and PhilippRados committed Nov 6, 2024
1 parent 00b971e commit 04ba09f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/unittests/ADT/FunctionRefTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ TEST(FunctionRefTest, SFINAE) {
}

TEST(FunctionRefTest, Equality) {
function_ref<int()> X = [] { return 1; };
const auto Lambda = []() { return 0; };
function_ref<int()> X = Lambda;
function_ref<int()> Y = X;
EXPECT_EQ(X, Y);

const auto Lambda = []() { return 0; };
function_ref<int()> A(Lambda), B(Lambda);
EXPECT_EQ(A, B);
}
Expand Down

0 comments on commit 04ba09f

Please sign in to comment.