Correctly compute the index of the first string format argument when deciding
whether to emit a -Wformat-security warning.  <rdar://problem/14178260>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184214 91177308-0d34-0410-b5e6-96231b3b80d8
Use llvm::sys::fs::GetUniqueID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184218 91177308-0d34-0410-b5e6-96231b3b80d8
DR14, DR101, and part of DR1: fix handling of extern "C" declarations in
namespaces, by treating them just like we treat extern "C" declarations in
function scope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184223 91177308-0d34-0410-b5e6-96231b3b80d8
Fix C++ constructor/destructor tests when run on ARM


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184225 91177308-0d34-0410-b5e6-96231b3b80d8
[multiprecision-builtins] Added missing builtin __builtin_{add,sub}cb for {add,sub} with carry for bytes.

I have had several people ask me about why this builtin was not available in
clang (since it seems like a logical conclusion). This patch implements said
builtins.

Relevant tests are included as well. I also updated the Clang language extension reference.

rdar://14192664.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184227 91177308-0d34-0410-b5e6-96231b3b80d8
Partially revert r184225 test changes and make a smaller and more generic fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184232 91177308-0d34-0410-b5e6-96231b3b80d8
Use llvm::sys::fs::can_write.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184234 91177308-0d34-0410-b5e6-96231b3b80d8
When declaring an ObjC interface decl with a @compatibility_alias alias name, change the class name to the "real" one.

If we have something like

  @class NewImage;
  @compatibility_alias OldImage NewImage;
  @class OldImage;

the lookup for 'OldImage' will return the 'NewImage' decl ("@class NewImage").
In such a case, when creating the decl for "@class OldImage" use the real declaration name ("NewImage"),
instead of the alias one ("OldImage"), otherwise we will break IdentifierResolver and redecls-chain invariants.

Fixes crash of rdar://14112291.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184238 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure the assembler-with-cpp hack for "#" works with multiple "#"s in
succession. Fixes PR16363.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184240 91177308-0d34-0410-b5e6-96231b3b80d8
doc. parsing: Allow parameter name "..." for variadic functions/methods.
// rdar://14124644


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184249 91177308-0d34-0410-b5e6-96231b3b80d8
Introduce a new mangling for protocol-qualified ObjC types in C++.  This allows
to provide proper overloading, and also prevents mangling conflicts with
template arguments of protocol-qualified type.

This is a non-backward-compatible mangling change, but per discussion with
John, the benefits outweigh this cost.

Fixes <rdar://problem/14074822>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184250 91177308-0d34-0410-b5e6-96231b3b80d8
Emit forward decls for structs with declarations only when we are
limiting debug info.

FIXME: There is still work left to do here, the testcase should work even with -flimit-debug-info.

rdar://problem/14101097

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184252 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Do not report uninitialized value warnings inside swap functions.

This silences warnings that could occur when one is swapping partially initialized structs. We suppress
not only the assignments of uninitialized members, but any values inside swap because swap could
potentially be used as a subroutine to swap class members.

This silences a warning from std::try::function::swap() on partially initialized objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184256 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Do not create a CompoundVal for lvalue InitListExprs.

These should be treated like scalars. This fixes a crash reported in radar://14164698.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184257 91177308-0d34-0410-b5e6-96231b3b80d8
Add some comments to r184252.

rdar://problem/14101097

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184259 91177308-0d34-0410-b5e6-96231b3b80d8
Add test coverage for serialization of dependent function template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184275 91177308-0d34-0410-b5e6-96231b3b80d8
Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4

These options will add a module flag with name "Dwarf Version".
The behavior flag is currently set to Warning, so when two values disagree,
a warning will be emitted.


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184277 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r184249, "doc. parsing: Allow parameter name "..." for variadic functions/methods."

It crashes in the case;

/// Without any "param"s in the description.
int printf(const char *format, ...);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184283 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a warning. [-Wunused-variable]

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