File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -713,7 +713,7 @@ struct [[gsl::Pointer]] Span {
713
713
// Pointer from Owner<Pointer>
714
714
std::string_view test5 () {
715
715
std::string_view a = StatusOr<std::string_view>().valueLB (); // expected-warning {{object backing the pointer will be dest}}
716
- return StatusOr<std::string_view>().valueLB (); // expected-warning {{returning address of local temporary}}
716
+ return StatusOr<std::string_view>().valueLB (); // expected-warning {{returning address of local temporary}}
717
717
718
718
// No dangling diagnostics on non-lifetimebound methods.
719
719
std::string_view b = StatusOr<std::string_view>().valueNoLB ();
@@ -724,6 +724,7 @@ return StatusOr<std::string_view>().valueLB(); // expected-warning {{returning a
724
724
// Prevent regression GH108463
725
725
Span<int *> test6 (std::vector<int *> v) {
726
726
Span<int *> dangling = std::vector<int *>(); // expected-warning {{object backing the pointer}}
727
+ dangling = std::vector<int *>(); // expected-warning {{object backing the pointer}}
727
728
return v; // expected-warning {{address of stack memory}}
728
729
}
729
730
You can’t perform that action at this time.
0 commit comments