clang/test/Driver/darwin-sdkroot.c: Suppress this on msys bash, to introduce the feature "shell-preserves-root".

MSYS transforms '/' to 'X:/mingwroot/'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172598 91177308-0d34-0410-b5e6-96231b3b80d8
Remove errors were if statements were incorrectly put on a single line.

Before: if (a)  // This comment confused clang-format f();
After:  if (a)  // No more confusion
          f();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172600 91177308-0d34-0410-b5e6-96231b3b80d8
Never merge < and ::, as it produces different tokens.

Before: vector<::Type> t;
After:  vector< ::Type> t;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172601 91177308-0d34-0410-b5e6-96231b3b80d8
Change the datastructure for UnwrappedLines.

It was quite convoluted leading to us accidentally introducing O(N^2)
complexity while copying from UnwrappedLine to AnnotatedLine. We might
still want to improve the datastructure in AnnotatedLine (most
importantly not put them in a vector where they need to be copied on
vector resizing but that will be done as a follow-up.

This fixes most of the regression in llvm.org/PR14959.

No formatting changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172602 91177308-0d34-0410-b5e6-96231b3b80d8
Calculate the total length of a line up to each token up front.

This makes the tedious fitsIntoLimit() method unnecessary and I can
replace one hack (constructor initializers) by a slightly better hack.

Furthermore, this will enable calculating whether a certain part of a
line fits into the limit for future modifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172604 91177308-0d34-0410-b5e6-96231b3b80d8
Fix uninitialized bool flag access in SanitizerArgs parser

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172605 91177308-0d34-0410-b5e6-96231b3b80d8
Clang Format: Handle missing semicolon

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172606 91177308-0d34-0410-b5e6-96231b3b80d8
Clang Format: A couple of tests for the trailing stuff case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172607 91177308-0d34-0410-b5e6-96231b3b80d8
Use standard llvm Debug.h support for debugging output.

Leave a quick "// Uncomment this." hint to enable the debug output in
tests. FIXME: figure out whether we want to enable debug command line
handling for all tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172608 91177308-0d34-0410-b5e6-96231b3b80d8
Add debugging support for split penalties.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172616 91177308-0d34-0410-b5e6-96231b3b80d8
Add option to avoid "bin-packing" of parameters.

"Bin-packing" here means allowing multiple parameters on one line, if a
function call/declaration is spread over multiple lines.

This is required by the Chromium style guide and probably desired for
the Google style guide. Not making changes to LLVM style as I don't have
enough data.

With this enabled, we format stuff like:
aaaaaaaaaaaaaaa(aaaaaaaaaa,
                aaaaaaaaaa,
		aaaaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaaa();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172617 91177308-0d34-0410-b5e6-96231b3b80d8
Disable inlining of short ifs in Google style.

Various reasons seem to speak against it, so I am disabling this for
now.

Changed tests to still test this option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172618 91177308-0d34-0410-b5e6-96231b3b80d8
Improve understanding of unary operators.

Before: int x = ** a;
After:  int x = **a;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172619 91177308-0d34-0410-b5e6-96231b3b80d8
[PCH/Modules] Change how macro [re]definitions are de/serialized.

Previously we would serialize the macro redefinitions as a list, part of
the identifier, and try to chain them together across modules individually
without having the info that they were already chained at definition time.

Change this by serializing the macro redefinition chain and then try
to synthesize the chain parts across modules. This allows us to correctly
pinpoint when 2 different definitions are ambiguous because they came from
unrelated modules.

Fixes bogus "ambiguous expansion of macro" warning when a macro in a PCH
is redefined without undef'ing it first.

rdar://13016031

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172620 91177308-0d34-0410-b5e6-96231b3b80d8
Fix parsing error in conditional expressions.

We used to incorrectly parse

aaaaaa ? aaaaaa(aaaaaa) : aaaaaaaa;

Due to an l_paren being followed by a colon, we assumed it to be part of
a constructor initializer. Thus, we never found the colon belonging to
the conditional expression, marked the line as bing incorrect and did
not format it.

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