Skip to content

Commit

Permalink
Ticket 12966 (returnDanglingLifetime): Added extra regression test.
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitcowboy committed Aug 5, 2024
1 parent 775e3d9 commit efb5b48
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/cfg/std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4917,6 +4917,16 @@ void stdspan()
#endif
}

void std::span<const int> returnDanglingLifetime_std_span0() {
static int a[10]{};
return a;
}

std::span<const int> returnDanglingLifetime_std_span1() {
static std::vector<int> v;
return v;
}

void beginEnd()
{
std::vector<int> v;
Expand Down

0 comments on commit efb5b48

Please sign in to comment.