We should never track if a gsl::Pointer is created from an unannotated 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.
This patch also fixes a false positive from the use of address of operator.
All in all this patch reduces the number of warnings emitted but all it fixes all the false positives we know so far. The added tests with the TODO will be useful once we start to add function annotations and great for documenting the currently known false negatives.