AttributeList::get/hasAttribute() are confusing because they use indexes
where (unsigned)-1 represents the function, 0 represents the return
value, and 1+ represents parameters. I've been bitten by this multiple
times, assuming that the index only corresponds to parameters.
Adding Impl at the end of the name encourages users to use the less
confusing {get,has}{Fn,Ret,Param}Attribute().
Some places require a larger cleanup, so keep those using
get/hasAttribute() for now. Also, the C API uses these so we can't
really get rid of them/make them private.
This doesn't touch the methods that modify attributes. I'll clean those
up in the future.
clang-tidy: warning: 'auto Ty' can be declared as 'auto *Ty' [llvm-qualified-auto]
not useful