Reapply r152745 (reverted in 152765) now that compiler-rt is fixed.

Original commit message:

Provide -Wnull-conversion separately from -Wconversion.

Like GCC, provide a NULL conversion to non-pointer conversion as a separate
flag, on by default. GCC's flag is "conversion-null" which we provide for
cross compatibility, but in the interests of consistency (with
-Wint-conversion, -Wbool-conversion, etc) the canonical Clang flag is called
-Wnull-conversion.

Patch by Lubos Lunak.
Review feedback by myself, Chandler Carruth, and Chad Rosier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152774 91177308-0d34-0410-b5e6-96231b3b80d8
Unrevert r152761 (reverted in r152772) with a fix for the issue which was
breaking bootstrap. No test yet: it's quite hard to tickle the failure case.
The specific testcase for this wouldn't be useful for testing anything more
general than a reintroduction of this precise bug in any case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152775 91177308-0d34-0410-b5e6-96231b3b80d8
Unpluralize -Wfoo-conversions warnings for consistency.

Err on the side of brevity and rename (while providing aliases for the original
name) -Wbool-conversions, -Wint-conversions, and -Wvector-conversions for
consistency with constant, literal, string, and sign conversion warnings. And
name the diagnostic groups explicitly while I'm here rather than rewriting the
string in the groups and sema td files.

Curiously, vector-conversion is not under -Wconversion. Perhaps it should be.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152776 91177308-0d34-0410-b5e6-96231b3b80d8
Fix codegen for vld{3,4}_dup intrinsics.

Patch by Silviu Baranga!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152788 91177308-0d34-0410-b5e6-96231b3b80d8
Add the object size checking support for a few other builtins.

The functions memccpy, strdup, strndup, strlcat, and strlcpy should also have
object size checking support. Of course, this is only good if the C library also
supports these functions.
<rdar://problem/10528974>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152789 91177308-0d34-0410-b5e6-96231b3b80d8
Adding in newer MinGW header paths.

Patch thanks to Nikola Smiljanic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152801 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] update asan docs: mention CMake problem and to explain the status of MacOS 10.7 and 32-bit Linux

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152806 91177308-0d34-0410-b5e6-96231b3b80d8
When laying out an Objective-C object, consult
the external source to complete the Decl if it
hasn't been completed already.

This fixes a crash in LLDB.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152807 91177308-0d34-0410-b5e6-96231b3b80d8
modern objective-c translator: please symbols generated
for @protocol expression into their own section.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152808 91177308-0d34-0410-b5e6-96231b3b80d8
Remove hacky temporary fix of r151585.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152818 91177308-0d34-0410-b5e6-96231b3b80d8
[Sema] Introduce a data recursive evaluator specific to binary operators.

This allows us to handle extreme cases of chained binary operators without causing stack
overflow.
The binary operators that are handled with the data recursive evaluator are
comma, logical, or operators that have operands with integral or enumeration type.

Part of rdar://10941790.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152819 91177308-0d34-0410-b5e6-96231b3b80d8
Make RecursiveASTVisitor to traverse certain statements using data recursion
to avoid a stack overflow with extreme cases.

Part of rdar://10941790.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152820 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] A couple of enhancements to c-index-test.

-When printing location avoid printing the filename if it is
same as the main file, not just if it has '.h' extension.
-Make sure we allocate enough bytes for storing as string a
huge line number.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152821 91177308-0d34-0410-b5e6-96231b3b80d8
[c-index-test] Make it C90 compliant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152823 91177308-0d34-0410-b5e6-96231b3b80d8
Document RedeclarableTemplateDecl::getInstantiatedFromMemberTemplate().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152826 91177308-0d34-0410-b5e6-96231b3b80d8
modern objective-c translator: rewriting of @catch-stmt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152830 91177308-0d34-0410-b5e6-96231b3b80d8
Provide the specific target type in the -Wnull-conversion warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152835 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Allow checkers to supply call stack diagnostic hints for the
BugVisitor DiagnosticPieces.

When checkers create a DiagnosticPieceEvent, they can supply an extra
string, which will be concatenated with the call exit message for every
call on the stack between the diagnostic event and the final bug report.
(This is a simple version, which could be/will be further enhanced.)

For example, this is used in Malloc checker to produce the ",
which allocated memory" in the following example:

static char *malloc_wrapper() { // 2. Entered call from 'use'
    return malloc(12);    // 3. Memory is allocated
}

void use() {
    char *v;
    v = malloc_wrapper(); // 1. Calling 'malloc_wrappers'
        // 4. Returning from 'malloc_wrapper', which allocated memory
}                         // 5. Memory is never released; potential
memory leak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152837 91177308-0d34-0410-b5e6-96231b3b80d8
It was pointed out that a checking version of strdup isn't needed. So much for late-night hacking. :)

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