Format code around VCS conflict markers.

Now correctly formats:
  {
    int a;
    void f() {
      callme(some(parameter1,
  <<<<<<< text by the vcs
                  parameter2),
  ||||||| text by the vcs
                  parameter2),
             parameter3,
  ======= text by the vcs
                  parameter2, parameter3),
  >>>>>>> text by the vcs
             otherparameter);
    }
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206157 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Don't allow hanging indentation for operators on new lines

Before:
  if (aaaaaaaa && bbbbbbbbbbbbbbb // need to wrap
                  == cccccccccccccc) ...

After:
  if (aaaaaaaa
      && bbbbbbbbbbbbbbb // need to wrap
         == cccccccccccccc) ...

The same rule has already be implemented for BreakBeforeBinaryOperators
set to false in r205527.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206159 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: With ColumnLimit=0, keep short array literals on a line.

Before:
    NSArray* a = [[NSArray alloc] initWithArray:@[
                                                   @"a"
                                                ]
                                      copyItems:YES];

After:
    NSArray* a = [[NSArray alloc] initWithArray:@[ @"a" ]
                                      copyItems:YES];

This fixed llvm.org/PR19080.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206161 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve array literal formatting fix in r206161.

Instead of choosing based on the number of elements, simply respect the
user's choice of where to wrap array literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206162 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix incorrect &&-detection in macros.

Before:
  #define A(a, b) (a &&b)

After:
  #define A(a, b) (a && b)

This fixes llvm.org/PR19343.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206165 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix regression caused by r206165.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206173 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for named values in the parser.

Summary: Add support for named values in the parser.

Reviewers: pcc

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D3276

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206176 91177308-0d34-0410-b5e6-96231b3b80d8
Properly diagnose standard C++ attributes which have optional argument lists when the arguments are elided. eg)

[[deprecated()]] // error
[[deprecated]] // OK
[[deprecated("")]] // OK
[[gnu::deprecated()]] // OK


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206186 91177308-0d34-0410-b5e6-96231b3b80d8
OnDiskHashTable: clang-format and consistent naming

No functional change. Style cleanups in OnDiskChainedHashTable in
preparation for some other changes here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206188 91177308-0d34-0410-b5e6-96231b3b80d8
OnDiskHashTable: Make the iterable version separate.

Currently the on disk hash table's key_iterator and data_iterator make
the assumption that the table data starts exactly four bytes after the
base of the table. This happens to be true for all of the tables we
currently iterate over, but not for all of the OnDiskHashTables we
currently use. For example, key_ and data_iterator would iterate over
meaningless data if they were used on the hash tables in PTHLexer.

We make the API safer by breaking this into two types. One doesn't
have the iterators, and the other must be told where the payload
starts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206189 91177308-0d34-0410-b5e6-96231b3b80d8
Properly diagnose Microsoft __declspec attributes which have optional argument lists when the arguments are elided. eg)

__declspec(deprecated()) // error
__declspec(deprecated) // OK
__declspec(deprecated("")) // OK

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206191 91177308-0d34-0410-b5e6-96231b3b80d8
Allow multiple modules with the same name to coexist in the module cache

To differentiate between two modules with the same name, we will
consider the path the module map file that they are defined by* part of
the ‘key’ for looking up the precompiled module (pcm file).
Specifically, this patch renames the precompiled module (pcm) files from
  cache-path/<module hash>/Foo.pcm
to
  cache-path/<module hash>/Foo-<hash of module map path>.pcm

In addition, I’ve taught the ASTReader to re-resolve the names of
imported modules during module loading so that if the header search
context changes between when a module was originally built and when it
is loaded we can rebuild it if necessary.  For example, if module A
imports module B

first time:
clang -I /path/to/A -I /path/to/B ...

second time:
clang -I /path/to/A -I /different/path/to/B ...

will now rebuild A as expected.

* in the case of inferred modules, we use the module map file that
allowed the inference, not the __inferred_module.map file, since the
inferred file path is the same for every inferred module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206201 91177308-0d34-0410-b5e6-96231b3b80d8
Add clang:: qualifier back to Module

Apparently this was required by some compilers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206202 91177308-0d34-0410-b5e6-96231b3b80d8
Fix find command in test/Modules/prune.m broken by r206201

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206203 91177308-0d34-0410-b5e6-96231b3b80d8
PR19411: Walk lexical parents, not semantic parents, when determining whether a
DeclContext is (lexically) within a C language linkage specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206204 91177308-0d34-0410-b5e6-96231b3b80d8
PR19415: Converting 'constexpr' to 'const' in a non-static data member can fail
if the member is already 'const'. Don't assert in that case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206205 91177308-0d34-0410-b5e6-96231b3b80d8
Add module name and module map file to -module-file-info

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206217 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure these two files are distinct, or else the modules system may, on certain file systems, treat them as if they were the same file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206221 91177308-0d34-0410-b5e6-96231b3b80d8
Ensure we evaluate VLA bounds if a variably-modified type is used as the
argument to __builtin_va_arg. Patch by Rahul Jain, some test massaging and
IR emission order changes by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206223 91177308-0d34-0410-b5e6-96231b3b80d8
Fix warning in ms-x86-vtordisp test case

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