[analyzer] Handle the M_ZERO and __GFP_ZERO flags in kernel mallocs.

Add M_ZERO awareness to malloc() static analysis in Clang for FreeBSD,
NetBSD, and OpenBSD in a similar fashion to O_CREAT for open(2).
These systems have a three-argument malloc() in the kernel where the
third argument contains flags; the M_ZERO flag will zero-initialize the
allocated buffer.

This should reduce the number of false positives when running static
analysis on BSD kernels.

Additionally, add kmalloc() (Linux kernel malloc()) and treat __GFP_ZERO
like M_ZERO on Linux.

Future work involves a better method of checking for named flags without
hardcoding values.

Patch by Conrad Meyer, with minor modifications by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204832 91177308-0d34-0410-b5e6-96231b3b80d8
Fix atomic libcall.

This commit fixes a cast instruction assertion failure
due to the incompatible type cast.  This will only happen when
the target requires atomic libcalls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204834 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Remove the implemented Identical* checkers from the "potential" list.

Edit by Daniel Fahlgren.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204842 91177308-0d34-0410-b5e6-96231b3b80d8
InstrProf: Use references

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204845 91177308-0d34-0410-b5e6-96231b3b80d8
InstrProf: Use unique_ptr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204846 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Fixes a bogus warning on unimplemented
selectors because we were not going through entire
elements in list of all implemented selectors. 
// rdar://16428638


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204852 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Improve diagnostic error for '@import' 
when modules are disabled. // rdar://15505492


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