Improve formatting of function types in template parameters.

Before: A<int * (int)>;
After:  A<int *(int)>;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177505 91177308-0d34-0410-b5e6-96231b3b80d8
Add clang-format binary to cfe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177506 91177308-0d34-0410-b5e6-96231b3b80d8
Don't remove all indentation when in #defines.

Otherwise, this can become hard to read.

Before: #define A \
        case 1:
After:  #define A \
           case 1:

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177509 91177308-0d34-0410-b5e6-96231b3b80d8
Add extra indentation for multiline comparisons.

This seems to be generally more desired.

Before:
if (aaaaaaaa &&
    bbbbbbbb >
    cccccccc) {}
After:
if (aaaaaaaa &&
    bbbbbbbb >
        cccccccc) {}

Also: Some formatting cleanup on clang-format's files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177514 91177308-0d34-0410-b5e6-96231b3b80d8
Reduce penalty for breaks after "(" for functions with parameters.

Before:
  aaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
                    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
After:
  aaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177521 91177308-0d34-0410-b5e6-96231b3b80d8
Do not consider comments when adjusting to local indent style.

Before (when only reformatting "int b"):
int a; // comment
       // comment
       int b;

After:
int a; // comment
       // comment
int b;

This also fixes llvm.org/PR15433.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177524 91177308-0d34-0410-b5e6-96231b3b80d8
Fix infinite-loop in unwrapped line parser.

Discovered when accidentally formatting a python file :-).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177527 91177308-0d34-0410-b5e6-96231b3b80d8
Remove assertion that can be triggered on bad input.

clang-format can't do anything useful, so it should leave the remainder
of the line unchanged, but it should not assert/segfault.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177530 91177308-0d34-0410-b5e6-96231b3b80d8
Support for pointers-to-members usage via .*

Summary: Added support for pointers-to-members usage via .* and a few tests.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177537 91177308-0d34-0410-b5e6-96231b3b80d8
Exploit this-return of a callsite in a this-return function.

For constructors/desctructors that return 'this', if there exists a callsite
that returns 'this' and is immediately before the return instruction, make
sure we are using the return value from the callsite.

We don't need to keep 'this' alive through the callsite. It also enables
optimizations in the backend, such as tail call optimization.

Updated from r177211.
rdar://12818789


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177541 91177308-0d34-0410-b5e6-96231b3b80d8
Only introduce the SDKSettings.plist dependency in modules/PCH files that don't depend on any other modules or PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177542 91177308-0d34-0410-b5e6-96231b3b80d8
Fix typo and grammaro in modules documentation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177544 91177308-0d34-0410-b5e6-96231b3b80d8
PR7256: Provide a fixit for incorrect destructor declarations

Fix by Ismail Pazarbasi (ismail.pazarbasi@gmail.com), review by Dmitri Gribenko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177546 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C [qoi] more gracefull recovery when 
'}' is missing for the ivar declarations.
// rdar://6854840


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177549 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] Prominently note that modules are expemental.

And ask for people to try it out and send us bug reports!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177551 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] Point inquisitive users to existing module.map files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177552 91177308-0d34-0410-b5e6-96231b3b80d8
Do the error recovery for @end only.
I am not sure how much we can improve for
when a randon ObjC keyword is thrown into the
ivar decl. block. // rdar://6854840


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177553 91177308-0d34-0410-b5e6-96231b3b80d8
Enhance debug info namespace test to check for context/scope reference

The #line directive is mostly for backend testing (keeping these files matching
should simplify maintenance somewhat) though the corresponding backend test
improvement/update doesn't verify the file information directly just yet.
Coming in a later iteration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177559 91177308-0d34-0410-b5e6-96231b3b80d8
refactoring file/directory for namespace debug info

(this is a paired commit with an LLVM change to DIBuilder - expect some
buildbot skew/fallout)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177565 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Remove strip of ElementRegion in CallEvent::invalidateRegions.

This is a bit of old code trying to deal with the fact that functions that
take pointers often use them to access an entire array via pointer
arithmetic. However, RegionStore already conservatively assumes you can use
pointer arithmetic to access any part of a region.

Some day we may want to go back to handling this specifically for calls,
but we can do that in the future.

No functionality change.

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