If a function is internal and all call sites are statically known, we can
try to derive attributes for the arguments. With this patch we introduce
this attribute deduction for the following attributes:
- non-null
- no-capture
- read-none
- read-only
- write-only
- no-alias
- alignment
- dereferencable
- dereferencable_or_null
Note that many internal functions are inlined, but some are not. This
could be caused by size constrains, recursion, or because the internal
function is used as a "callback", thus an indirect call that might or
might not be visible in the current module. While this patch does not
require callback calls to be identified, it is especially designed to
allow them later on. One type of callback that can significantly benefit
from proper attribute deduction are outlined functions passed to OpenMP
runtime calls. Though, in practice we see various kinds of callbacks
including user defined higher-order functions and calls to builtins like
qsort.
Note that this patch should be a generalization of D4609.
Here we need to check NullPointerIsDefined too.