Debuginfo: Correctly tag variadic ObjC methods with DW_TAG_unspecified_parameter.

Fixes rdar://13690847

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215423 91177308-0d34-0410-b5e6-96231b3b80d8
Correctly implement -include search logic.

According to the gcc docs, -include uses the current working directory
for the lookup instead of the main source file.

This patch gets rid of NormalizeIncludePath (which relied on an
implementation detail of FileManager / FileEntry for the include path
logic to work), and instead hands the correct lookup information down to
LookupFile.

This will allow us to change the FileEntry's behavior regarding its Name
caching.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215433 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Frontend/print-header-includes.c REQUIRES shell due to "cd".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215434 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Avoid bad line break.

Before:
  int
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(const
                                typename aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa);

After:
  int aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      const typename aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215442 91177308-0d34-0410-b5e6-96231b3b80d8
Add documentation on how Language option in .clang-format files work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215443 91177308-0d34-0410-b5e6-96231b3b80d8
Adding some test cases to test attribute-related source range diagnostics. This augments r214722, r214723 and r214507.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215444 91177308-0d34-0410-b5e6-96231b3b80d8
Use StringRef instead of MemoryBuffer&.

This code doesn't care where the data it is processing comes from, so a
StringRef is probably the most natural interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215448 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Fixes an assert where because of captured
variable in block is over-aligned with an align
attribute causing block metadata size not be multiple
of alignment. rdar://17878679


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215449 91177308-0d34-0410-b5e6-96231b3b80d8
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