clang-format: Don't wrap after @interface.

This fixes llvm.org/PR19450.

Before:
  @interface
  BookmarkHomeHandsetViewController ()<BookmarkAllCollectionViewDelegate,
                                       BookmarkFolderCollectionViewDelegate,
                                       BookmarkMenuViewControllerDelegate,
                                       BookmarkSearchViewControllerDelegate> {
  }

After:
  @interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()<
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> {
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207400 91177308-0d34-0410-b5e6-96231b3b80d8
[ARM64]Fix a bug cannot select UQSHL/SQSHL with constant i64 shift amount.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207401 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fixes spaces in case statements.

This fixes llvm.org/PR19482.

Before:
  switch (a) {
    case(B) :
      return;
  }

After:
  switch (a) {
    case (B):
      return;
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207402 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve binary operator detection.

Before:
  *(int *)(p &~3UL) = 0;

After:
  *(int *)(p & ~3UL) = 0;

This fixes llvm.org/PR19464.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207405 91177308-0d34-0410-b5e6-96231b3b80d8
[C++11] Converting to range-based for loops. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207416 91177308-0d34-0410-b5e6-96231b3b80d8
Renaming range-based for loop variables so they don't appear iterator-like.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207422 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused using statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207427 91177308-0d34-0410-b5e6-96231b3b80d8
[driver] Disable the slp vectorizer at -O0, -O1, and -Oz.  This mirrors the
behavior of the loop vectorizer, which is enabled at -O2, -O3, -O4, -Ofast
and -Os.
PR19568

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207433 91177308-0d34-0410-b5e6-96231b3b80d8
[cleanup] Fix an 80-column violation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207446 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Fix linkage of reference temporaries

Summary:
A reference temporary should inherit the linkage of the variable it
initializes.  Otherwise, we may hit cases where a reference temporary
wouldn't have the same value in all translation units.

Reviewers: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207451 91177308-0d34-0410-b5e6-96231b3b80d8
Move all CUDA testing inputs to Inputs/ subdirectory inside the tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207453 91177308-0d34-0410-b5e6-96231b3b80d8
When Driver::generateCompilationDiagnostics is filtering the list of
inputs to the preprocessor, check for invalid types first because not
all linker inputs have an option value to retrieve.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207454 91177308-0d34-0410-b5e6-96231b3b80d8
LLVM supports TLS on Windows and we can use it from Clang

Patch by Martell Malone!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207470 91177308-0d34-0410-b5e6-96231b3b80d8
Check -Werror options during module validation

This patch checks whether the diagnostic options that could lead to
errors (principally -Werror) are consistent between when a module was
built and when it is loaded.  If there are new -Werror flags, then the
module is rebuilt.  In order to canonicalize the options we do this
check at the level of the constructed DiagnosticsEngine, which contains
the final set of diag to diagnostic level mappings.  Currently we only
rebuild with the new diagnostic options, but we intend to refine this in
the future to include the union of the new and old flags, since we know
the old ones did not cause errors.  System modules are only rebuilt when
-Wsystem-headers is enabled.

One oddity is that unlike checking language options, we don’t perform
this diagnostic option checking when loading from a precompiled header.
The reason for this is that the compiler cannot rebuild the PCH, so
anything that requires it to be rebuilt effectively leaks into the build
system.  And in this case, that would mean the build system
understanding the complex relationship between diagnostic options and
the underlying diagnostic mappings, which is unreasonable.  Skipping the
check is safe, because these options do not affect the generated AST.
You simply won’t get new build errors due to changed -Werror options
automatically, which is also true for non-module cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207477 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Clean up the lists of current and potential checkers.

Patch by Anton Yartsev, modified by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207478 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing triple to make -isysroot work

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207479 91177308-0d34-0410-b5e6-96231b3b80d8
Debug info: Improve line table for functions with cleanups an early exit
and no return expr at the end of the function.
The "function has only simple returns" check in FinishFunction tests
whether the number of simple return exprs equals the number of return
exprs, but so far a fallthrough at the end of a function was not counted
as a return, which would result in cleanup code being associated with the
wrong source line.

rdar://problem/16733984.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207480 91177308-0d34-0410-b5e6-96231b3b80d8
Let stddef.h redefine NULL if __need_NULL is set, as needed by glibc, PR12997.

See the bug and the cfe-commits thread "[patch] Let stddef.h redefine NULL if
__need_NULL is set" for discussion.

Fixes PR12997 and is similar to the __need_wint_t bits already in this file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207482 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r207482; I fail at reading IRC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207483 91177308-0d34-0410-b5e6-96231b3b80d8
scan-build: Don't use realpath when the user provides an explicit path.

PR19583

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