We can query to Attributor whether the value is captured in the scope or not on the following way:
const auto & NoCapAA = A.getAAFor<AANoCapture>(*this, IRPosition::value(V));
And if V is CallSiteReturned then getDeducedAttribute will add nocatpure to the callsite returned value. It is not valid.
This patch checks the position is an argument or call site argument.