Teach the analyzer that __builtin_assume_aligned returns its first argument.

Patch by Daniel Fahlgren!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217461 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Under a special flag, -Wcstring-format-directive,
off by default, issue a warning if %s directive is used in
certain CF/NS formatting APIs, to assist user in deprecating
use of such %s in these APIs. rdar://18182443


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217467 91177308-0d34-0410-b5e6-96231b3b80d8
Don't crash on access decls with invalid scope specifier, PR20887.

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

Unique_ptr creation stil needs to be moved earlier at some of the call sites.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217474 91177308-0d34-0410-b5e6-96231b3b80d8
Revert over-eager unique_ptr conversion.

This test wants to observe PPCallbacks after they have been moved into the
preprocessor. That doesn't work if the pointer has been moved away.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217481 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Use a fixed alignment for vtables.

Pointer-sized alignment is sufficient as we only ever read single values
from the table. Otherwise we'd bump the alignment to 16 bytes in the
backend if the vtable is larger than 16 bytes. This is great for
structures that are accessed with vector instructions or copied around, but
that's simply not the case for vtables.

Shrinks the data segment of a Release x86_64 clang by 0.3%. The wins are
larger for i386 and code bases that use vtables more often than we do.

This matches the behavior of GCC 5.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217495 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Add option to allow short case labels on a single line.

On a single line:
  switch (a) {
  case 1: x = 1; return;
  case 2: x = 2; return;
  default: break;
  }

Not on a single line:
  switch (a) {
  case 1:
    x = 1;
    return;
  case 2:
    x = 2;
    return;
  default:
    break;
  }

This partly addresses llvm.org/PR16535. In the long run, we probably want to
lay these out in columns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217501 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix pthread lock tests so that the API comes from a system header.

...and verify that a global mutex in user code can be used without warnings.

Patch by Aleksei Sidorin!

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217517 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test for an operator access decl.

In Parser::ParseCXXClassMemberDeclaration(), it was possible to change
      isAccessDecl = NextToken().is(tok::kw_operator);
to
      isAccessDecl = false;
and no tests would fail. Now there's coverage for this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217519 91177308-0d34-0410-b5e6-96231b3b80d8
Recognize .lib files as linker input explicitly

Summary:
Currently, this is done implicitly in Driver::BuildInputs by considering
any invalid input type as linker input.

Test Plan: I don't think this behavior is observable for the reason stated above.

Reviewers: hansw

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5294

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217522 91177308-0d34-0410-b5e6-96231b3b80d8
[sphinx cleanup]
Fix sphinx warning introduced by r217501.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217524 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C arc. Fixes a crash when issuing diagnostic for
passing parameter to an audited CF API. rdar://18222007


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217530 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Emit dynamic initializers for selectany globals in comdat-associative sections (PR20889)

This prevents initializers for comdat-folded globals from running multiple times.

Differential Revision: http://reviews.llvm.org/D5281

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217534 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Accept 'nil' as indexing argument to
dictionary literals since the API which implements 
them accepts it too.  // rdar://18254621


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217543 91177308-0d34-0410-b5e6-96231b3b80d8
Only override the target architecture on -m32 and friends if it is
actually different. Fixes a surprising link error with nodejs on rpi,
where armv6-netbsd-eabihf turned into armv5e-netbsd-eabihf, which
doesn't lacks the necessary VFP support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217546 91177308-0d34-0410-b5e6-96231b3b80d8
Update for llvm api change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217547 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid a couple of assertions when preprocessing with modules

1. We were hitting the NextIsPrevious assertion because we were trying
to merge decl chains that were independent of each other because we had
no Sema object to allow them to find existing decls. This is fixed by
delaying loading the "preloaded" decls until Sema is available.

2. We were trying to get identifier info from an annotation token, which
asserts.  The fix is to special-case the module annotations in the
preprocessed output printer.

Fixed in a single commit because when you hit 1 you almost invariably
hit 2 as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217550 91177308-0d34-0410-b5e6-96231b3b80d8
Remove a couple of fixed paths that snuck into my test from 217550

I forgot to fix these again the second time I copy-and-pasted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217552 91177308-0d34-0410-b5e6-96231b3b80d8
More test for "void *" argument as index of a dictionary literal.



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