This patch introduces UPCStandalonePointerGadget, a FixableGadget that emits fixits to handle cases where a pointer identified as unsafe is simply referenced. An example of such a case is when the pointer is input as an argument to a method call, where we can not change the type of the argument. For cases where the strategy for the unsafe pointer is to use std::span, the idea is to extract the underlying pointer by invoking the "data()" method on the span instance.
For example, the gadget emits a fixit for S3, where S1, S2 are handled by other gadgets:
S1: int *ptr = new int[10]; S2: int val1 = ptr[k]; // Unsafe operation on ptr S3: foo(ptr); // Some method that accepts raw pointer => FIXIT: foo(ptr.data());
🚲🏠 : "Reference" kinda reads like "int *&q = p" which is not what we mean. (Yes, in DeclRefExpr "Ref" stands for "Reference" but nobody likes it.) Folks also seem to be adding UPC/ULC when appropriate. Maybe UPCStandalonePointer???