Make 'CheckNonNullArguments' a static function.  No functionality change.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@199464 91177308-0d34-0410-b5e6-96231b3b80d8
Push NonNullAttr inspection loop into CheckNonNullArguments.

No functionality change.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@199465 91177308-0d34-0410-b5e6-96231b3b80d8
Add ArrayRef<> interface to get the parameters of a FunctionDecl/ObjCMethodDecl.

This is an alternate interface to the separate iterator interfaces
provided by FunctionDecl and ObjCMethodDecl, which precede ArrayRef.

Providing this new interface is more convenient for some uses, and
likely the old interfaces should be removed.  I have not undertaken
that effort in this change because this API introduction may
solicit commentary and that was a larger change than I wanted
to introduce all at once to serve a direct purpose.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@199466 91177308-0d34-0410-b5e6-96231b3b80d8
Enhance attribute 'nonnull' to be applicable to parameters directly (infix).

This allows the following syntax:

  void baz(__attribute__((nonnull)) const char *str);

instead of:

  void baz(const char *str) __attribute__((nonnull(1)));

This also extends to Objective-C methods.

The checking logic in Sema is not as clean as I would like.  Effectively
now we need to check both the FunctionDecl/ObjCMethodDecl and the parameters,
so the point of truth is spread in two places, but the logic isn't that
cumbersome.

Implements <rdar://problem/14691443>.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@199467 91177308-0d34-0410-b5e6-96231b3b80d8