[analyzer;alternate edges] fix type that was causing the wrong path piece to get removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182562 91177308-0d34-0410-b5e6-96231b3b80d8
Expand parsing of braced init lists.

Allows formatting of C++11 braced init list constructs, like:
vector<int> v { 1, 2, 3 };
f({ 1, 2 });

This involves some changes of how tokens are handled in the
UnwrappedLineFormatter. Note that we have a plan to evolve the
design of the token flow into one where we create all tokens
up-front and then annotate them in the various layers (as we
currently already have to create all tokens at once anyway, the
current abstraction does not help). Thus, this introduces
FIXMEs towards that goal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182568 91177308-0d34-0410-b5e6-96231b3b80d8
Fix no-assert compiles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182569 91177308-0d34-0410-b5e6-96231b3b80d8
Improve formatting of braced lists.

Before:
vector<int> x { 1, 2, 3 };
After:
vector<int> x{ 1, 2, 3 };

Also add a style option to remove the spaces inside braced lists,
so that the above becomes:
std::vector<int> v{1, 2, 3};

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182570 91177308-0d34-0410-b5e6-96231b3b80d8
Use a SourceRange for the whitespace location in FormatToken.

Replaces the use of WhitespaceStart + WhitspaceLength.
This made a bug in the formatter obvous where we would incorrectly
calculate the next column.

FIXME: There's a similar bug left regarding TokenLength. We should
probably also move to have a TokenRange instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182572 91177308-0d34-0410-b5e6-96231b3b80d8
Stop aligning trailing comments which are aligned with the next line.

Previously we would align:
f(); // comment
     // other comment
g();

Even if // other comment was at the start of the line. Now we do not
align trailing comments if they have been already aligned correctly
with the next line.

Thus,
f(); // comment
// other comment
g();
will not be changed, while:
f(); // comment
  // other commment
g();
will lead to the two trailing comments being aligned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182577 91177308-0d34-0410-b5e6-96231b3b80d8
Make helper functions static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182589 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format integration for git.

Put this somewhere on your path and use:

git clang-format

Awesome work by Mark Lodato. Many thanks!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182596 91177308-0d34-0410-b5e6-96231b3b80d8
Improve formatting of braced lists.

Before: vector<int> v{ -1};
After:  vector<int> v{-1};

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182597 91177308-0d34-0410-b5e6-96231b3b80d8
Increase test coverage for braced init lists.

Also fix a minor bug for constructor initializers with braced init lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182601 91177308-0d34-0410-b5e6-96231b3b80d8
Add caveat to __builtin_readcyclecounter documentation.

The ARM cycle-counter can be restricted by the operating system; it's
worth warning potential users of this issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182604 91177308-0d34-0410-b5e6-96231b3b80d8
Fix aligning of comments that are at the start of the line.

Now correctly leaves:
f(); // comment
// comment
g(); // comment
... alone if the middle comment was aligned with g() before formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182605 91177308-0d34-0410-b5e6-96231b3b80d8
Fix aligning of comments.

Previously we started sequences to align for single line comments when
the previous line had a trailing comment, but the sequence was broken
for other reasons.

Now we re-format:
// a
 // b
f(); // c
to:
// a
// b
f(); // c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182608 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer; alternate edges] Add a new test case file to regression test the new arrows algorithm.

This essentially combines the tests in plist-output.m and plist-alternate-output.m.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182612 91177308-0d34-0410-b5e6-96231b3b80d8
More tests and a fix for braced init lists.

Before: f(new vector<int> { 1, 2, 3 });
After:  f(new vector<int>{ 1, 2, 3 });

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182614 91177308-0d34-0410-b5e6-96231b3b80d8
Fix assert on temporary std::initializer_list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182615 91177308-0d34-0410-b5e6-96231b3b80d8
Constify the 'dump' method so that it can be called by a const object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182620 91177308-0d34-0410-b5e6-96231b3b80d8
Fix crash-on-invalid if list-initialization works, but we bail out when
building the resulting expression because it invokes a deleted constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182624 91177308-0d34-0410-b5e6-96231b3b80d8
Update static analyzer build to checker-275.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182626 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] If we hit a failure while loading a PCH/module, abort parsing instead of trying to continue in an invalid state.

Also don't let libclang create a PCH with such an error.

Fixes rdar://13953768

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