-Wformat: Don't check format strings in uninstantiated templates.

Also applies to -Wnonnull, -Wtype-safety, and -Wnon-pod-varargs.
All of these can be better checked at instantiation time.

This change does not actually affect regular CallExpr function calls,
since the checks there only happen after overload resolution.
However, it will affect Objective-C method calls.

<rdar://problem/12373934>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164984 91177308-0d34-0410-b5e6-96231b3b80d8
Re-enable this test to reflect re-enabling the new SROA pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164987 91177308-0d34-0410-b5e6-96231b3b80d8
Check if an IdentifierInfo* is null when the FunctionDecl isn't a simple C function.

Fixes <rdar://problem/12355298>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164988 91177308-0d34-0410-b5e6-96231b3b80d8
Add FP_CONTRACT support for clang.

Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164989 91177308-0d34-0410-b5e6-96231b3b80d8
Tweak diagnostic text to indicate that __weak on a local variable is only allowed
for ARC.  Fixes <rdar://problem/12407705>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164990 91177308-0d34-0410-b5e6-96231b3b80d8
Use an environment variable instead of what's in the make cmd goals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164992 91177308-0d34-0410-b5e6-96231b3b80d8
Merge pending instantiations instead of overwriting existing ones.
Check whether a pending instantiation needs to be instantiated (or whether an instantiation already exists).
Verify the size of the PendingInstantiations record (was only checking size of existing PendingInstantiations).

Migrate Obj-C++ part of redecl-merge into separate test, now that this is growing.
templates.mm: test that CodeGen has seen exactly one definition of template instantiations.
redecl-merge.m: use "@" specifier for expected-diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164993 91177308-0d34-0410-b5e6-96231b3b80d8
Force triple in test to unbreak it on non-darwin platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164994 91177308-0d34-0410-b5e6-96231b3b80d8
-arch is a darwin-specific driver feature, use a triple instead in rewriter test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164995 91177308-0d34-0410-b5e6-96231b3b80d8
Only those InterestingDecls that got added to the AST should be passed to the ASTConsumer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165001 91177308-0d34-0410-b5e6-96231b3b80d8
Enable programmatic provisioning of virtual module.map files (instead of writing out actual module.map files).
Opens up the wonders of clang::Modules to tools - though they remain as experimental as before.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165002 91177308-0d34-0410-b5e6-96231b3b80d8
Add redecls into their lexical DeclContext: this is what they assert on, and the merging should have set it correctly.
This is especially relevant for templatedDecls that might be injected (and thus have their DeclContext set to) somewhere completely different.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165005 91177308-0d34-0410-b5e6-96231b3b80d8
Silencing an MSVC warning about */ being found outside of a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165007 91177308-0d34-0410-b5e6-96231b3b80d8
Allowing individual targets to determine whether a given calling convention is allowed or ignored with warning. This allows for correct name mangling for x64 targets on Windows, which in turn allows for linking against the Win32 APIs.

Fixes PR13782

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165015 91177308-0d34-0410-b5e6-96231b3b80d8
Splitting this test case into two because the behavior for the calling convention code is target-specific.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165016 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Implement the importedASTFile indexing callback to provide
info about imported modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165020 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Even though we disable the preprocessing record during indexing,
make sure that it gets enabled for when a module needs to be created.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165021 91177308-0d34-0410-b5e6-96231b3b80d8
Add info in the preprocessing record whether an inclusion directive
resulted in an automatic module import.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165022 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] When indexing an AST file, only deserialize the preprocessing record
entities of the current primary module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165023 91177308-0d34-0410-b5e6-96231b3b80d8
FP_CONTRACT: Fix two tests for -Asserts.

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