clang-format: Add special case for leading comments in braced lists.

A comment following the "{" of a braced list seems to almost always
refer to the first element of the list and thus should be aligned
to it.

Before (with Cpp11 braced list style):
  SomeFunction({  // Comment 1
                   "first entry",
                   // Comment 2
                   "second entry"});
After:
  SomeFunction({// Comment 1
                "first entry",
                // Comment 2
                "second entry"});

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197725 91177308-0d34-0410-b5e6-96231b3b80d8
After discussing with John McCall, removing the ns_bridged attribute as it is unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197729 91177308-0d34-0410-b5e6-96231b3b80d8
Remove dead code identified by Aaron Ballman.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197730 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Always use 'bool' as the SValBuilder condition type in C++.

We have assertions for this, but a few edge cases had snuck through where
we were still unconditionally using 'int'.

<rdar://problem/15703011>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197733 91177308-0d34-0410-b5e6-96231b3b80d8
Wordsmith "maybe" into "may be" in diagnostic, and move warning under flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197736 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix test in previous commit to account for compiler warning.

--analyze passes -w, but -cc1 -analyze doesn't. Oops!

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197748 91177308-0d34-0410-b5e6-96231b3b80d8
ASTUnit::getMainBufferWithPrecompiledPreamble: use MD5 hash of the remapped
files to tell if they were changed since the last time we have computed the
preamble

We used to check only the buffer size, so if the new remapped buffer has the
same size as the previous one, we would think that the buffer did not change,
and we did not rebuild the preambule, which sometimes caused us to crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197755 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test I forgot to svn add in r197755


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197756 91177308-0d34-0410-b5e6-96231b3b80d8
Correctly compute the size in bytes of PreambleFileHash.MD5


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197762 91177308-0d34-0410-b5e6-96231b3b80d8
Serialize source range info for TypeTraitExpr.

This caused some crazy crashes involving std::unordered_map being
deserialized from a PCH file and then template instantiation requiring
an explicit instantiation location; unfortunately I don't really know
how to come up with a minimal test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197764 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang/python] Add CompilationDatabase.getAllCompileCommands to the python bindings.

Patch by Laszlo Nagy!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197765 91177308-0d34-0410-b5e6-96231b3b80d8
Move tools/libclang/RecursiveASTVisitor.h -> include/clang/AST/DataRecursiveASTVisitor.h

This is to make it available so the static analyzer can use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197766 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Use DataRecursiveASTVisitor for the AnalysisConsumer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197767 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Better support for multi-line wide string literals.

Before:
  SomeFunction(L"A" L"B");

After:
  SomeFunction(L"A"
               L"B");

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197785 91177308-0d34-0410-b5e6-96231b3b80d8
Enable layering check in unavailable modules.

If a header file belonging to a certain module is not found on the
filesystem, that header gets marked as unavailable. Now, the layering
warning (-fmodules-decluse) should still warn about headers of this
module being wrongfully included. Currently, headers belonging to those
modules are just treated as not belonging to modules at all which means
they can be included freely from everywhere.

To implement this (somewhat) cleanly, I have moved most of the layering
checks into the ModuleMap. This will also help with showing FixIts
later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197805 91177308-0d34-0410-b5e6-96231b3b80d8
Document the -fno-limit-debug-info switch in the man page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197819 91177308-0d34-0410-b5e6-96231b3b80d8
Remove an outdated statement about debugging optimized code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197820 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: Support /P and /E (preprocess to file or stdout)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197827 91177308-0d34-0410-b5e6-96231b3b80d8
Move the TargetMachine instance into EmitAssemblyHelper

Cleanup in preparation for enhanced DataLayout checking.

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