Allow @synchronized to contextually convert a C++ object to an ObjC object pointer.

Patch by Grant Paul!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215453 91177308-0d34-0410-b5e6-96231b3b80d8
Add a module cache path to test/Headers/cxx11

Don't depend on the serialization format remaining the same.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215454 91177308-0d34-0410-b5e6-96231b3b80d8
Verify all the module map files for a pcm are the same on load

We already verified the primary module map file (either the one that
defines the top-level module, or the one that allows inferring it if it
is an inferred framework module). Now we also verify any other module
map files that define submodules, such as when there is a
module.private.modulemap file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215455 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Check for negative values used as the size of a C variable-length array.

Patch by Daniel Fahlgren!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215456 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Mangle this qualifiers on function types

C++11 allows this qualifiers to exist on function types when used in
template arguments.  Previously, I believed it wasn't possible because
MSVC rejected declarations like: S<int () const &> s;

However, it turns out MSVC properly allows them in using declarations;
updated clang to be compatible with this mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215464 91177308-0d34-0410-b5e6-96231b3b80d8
Improve -Wuninitialized to catch const classes being used in their own copy
constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215471 91177308-0d34-0410-b5e6-96231b3b80d8
Support named values in the autocomplete feature.

Summary:
This includes:
 - Passing a Sema to completeExpression to allow for named values in the
   expression.
 - Passing a map of names to values to the parser.
 - Update the Sema interface to include completion for matchers.
 - Change the parser to use the Sema for completion, instead of going
   directly to Registry.

Reviewers: pcc

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215472 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the \param comments to have the parameter name.

Summary: This fixes the build break introduced in rL215472

Reviewers: pcc

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215476 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C [qoi]. Patch to not do Fix-It for fixing
a messaging expression except in the simple case
of a unary selector. We cannot reliably provide such a fixit due
to numerous reasons where a matching selector could not be found.
rdar://15756038


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215480 91177308-0d34-0410-b5e6-96231b3b80d8
[UBSan] Add returns-nonnull sanitizer.

Summary:
This patch adds a runtime check verifying that functions
annotated with "returns_nonnull" attribute do in fact return nonnull pointers.
It is based on suggestion by Jakub Jelinek:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140623/223693.html.

Test Plan: regression test suite

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215485 91177308-0d34-0410-b5e6-96231b3b80d8
[AVX512] Add intrinsics for FP scalar broadcasts

Similar approach to the set1 intrinsics is used: implement in terms of vector
initializers and then ensure with an LLVM test that a broadcast is generated
at the end.

Part of <rdar://problem/17688758>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215486 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] When performing a lookup into a namespace, ensure that any later
redefinitions of that namespace have already been loaded. When writing out the
names in a namespace, if we see a name that is locally declared and had
imported declarations merged on top of it, export the local declaration as the
lookup result, because it will be the most recent declaration of that entity in
the redeclaration chain of an importer of the module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215518 91177308-0d34-0410-b5e6-96231b3b80d8
PR20634: add some more cases that can legitimately come after a struct declaration to our list of special cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215520 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Understand #defines defining system includes.

Before:
  #define MY_IMPORT < a / b >

After:
  #define MY_IMPORT <a/b>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215527 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Format long lists in columns if without bin-packing.

After (even with BinPacking = false):
  const Aaaaaa aaaaa = {
      aaaaa,  bbbbb,  ccccc,  ddddd,  eeeee,  ffffff, ggggg, hhhhhh,
      iiiiii, jjjjjj, kkkkkk, aaaaa,  bbbbb,  ccccc,  ddddd, eeeee,
      ffffff, ggggg,  hhhhhh, iiiiii, jjjjjj, kkkkkk,
  };

Before:
  <each element on its own line>

This fixes http://llvm.org/PR20623.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215529 91177308-0d34-0410-b5e6-96231b3b80d8
Emit diagnostic for -munaligned-access on v6m targets

Rather than silently disabling unaligned accesses for v6m targets as
in the previous patch to llvm, instead produce a warning saying that
this architecture doesn't support unaligned accesses.

Patch by Ben Foster



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215531 91177308-0d34-0410-b5e6-96231b3b80d8
Default getFile() to use the last accessed name in the FileEntry.

With modules we start accessing headers for the first time while reading
the module map, which often has very different paths from the include
scanning logic.

Using the name by which the file was accessed gets us one step closer to
the right solution, which is using a FileName abstraction that decouples
the name by which a file was accessed from the FileEntry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215541 91177308-0d34-0410-b5e6-96231b3b80d8
Fix crasher bug in clang-format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215549 91177308-0d34-0410-b5e6-96231b3b80d8
For NetBSD, use the same settings for PPC64 as for PPC when it comes to
integrated assembler, libc++ and libgcc. Set emulation for ld for both
platforms for correct -m32 handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215551 91177308-0d34-0410-b5e6-96231b3b80d8
[Driver] Support -muclibc / -mglibc command line options for a couple
of MIPS toolchains.

The uCLibc implemented for multiple architectures. A couple of MIPS toolchains
contains both uCLibc and glibc implementation so these options allow to select
used C library.

Initially -muclibc / -mglibc (as well as -mbionic) have been implemented in gcc
for various architectures so they are not MIPS specific.

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