xazax.hun abandoned this revision. xazax.hun added a comment. It looks like this solution is not going to work in general. The problem is that it can be really hard to tell when it is valid to create a gsl::Pointer from an unannotated local type.
For example the code below is definitely buggy: reference_wrapper<int> f() { int i; return i; // Invalid! } While the code below can be safe: some_iterator f() { MyUnannotatedSpan local = ...; return std::begin(local); // this is fine } Note that, this problem will be solved once we have function annotations, as each constructor can be annotated what it actually does. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66486/new/ https://reviews.llvm.org/D66486 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits