Don't hardcode the alias order in this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192464 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: Mark /FA and /Fa as unsupported options

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192465 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC migrator: fixes a bug when in NS_ENUM/NS_OPTIONS
migration, the typedef has annotations.
// rdar://15200602


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192473 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Don't remove 'unknown' tokens.

In certain macros or incorrect string literals, the token stream can
contain 'unknown' tokens, e.g. a single backslash or a set of empty
ticks. clang-format simply treated them as whitespace and removed them
prior to this patch.

This fixes llvm.org/PR17215

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192490 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ref-qualifier information of function type.

Patch by Che-Liang Chiou!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192493 91177308-0d34-0410-b5e6-96231b3b80d8
Adds Microsoft compatiable C++ record layout code to clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192494 91177308-0d34-0410-b5e6-96231b3b80d8
Fix unused variable warning in MS record layout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192495 91177308-0d34-0410-b5e6-96231b3b80d8
Use castAs instead of cast in thunk generation

Calling convention attributes can add sugar to methods that we have to
look through.  This fixes an assertion failure in the provided test
case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192496 91177308-0d34-0410-b5e6-96231b3b80d8
Turn struct-path aware TBAA on by default.

Use -no-struct-path-tbaa to turn it off.
This is the same as r191695, which was reverted because it depends on a
commit that has issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192497 91177308-0d34-0410-b5e6-96231b3b80d8
Only use the MS record layout when using the MS C++ ABI

We're not ready to use it everywhere we use a win32 triple yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192502 91177308-0d34-0410-b5e6-96231b3b80d8
Support formatting of preprocessor branches.

We now correctly format:
  void SomeFunction(int param1,
  #ifdef X
                    NoTemplate param2,
  #else
                    template <
  #ifdef A
                        MyType<Some> >
  #else
                        Type1, Type2>
  #endif
                    param2,
  #endif
                    param3) {
    f();
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192503 91177308-0d34-0410-b5e6-96231b3b80d8
Changed clang-format-diff.py to output diff by default. Added -i option to apply changes to files instead.

Summary:
"svn diff|clang-format-diff.py" will just output the diff.
Now it's possible to use:
  svn diff|clang-format-diff.py|patch -p0
as an equivalent to:
  svn diff|clang-format-diff.py -i
;)

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192505 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC migrator. also support migration to
NS_ENUM/NS_OPTIONS macros when typedef declaration
precedes enum declaration. // rdar://15200915 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192506 91177308-0d34-0410-b5e6-96231b3b80d8
Don't break string literals inside preprocessor directives.

Summary:
This way we avoid breaking code which uses unknown preprocessor
directives with long string literals. The specific use case in
http://llvm.org/PR17035 isn't very common, but it seems to be a good idea to
avoid this kind of problem anyway.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192507 91177308-0d34-0410-b5e6-96231b3b80d8
Consumed analysis: check destructor calls.
This allows the callable_when attribute to be attached to destructors.
Original patch by chris.wailes@gmail.com, reviewed and edited by delesley.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192508 91177308-0d34-0410-b5e6-96231b3b80d8
Improve the error message for attempting to build a for range loop using a
function parameter that has array type.  Such a parameter will be treated as
a pointer type instead, resulting in a missing begin function error is a
suggestion to dereference the pointer.  This provides a different,
more informative diagnostic as well as point to the parameter declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192512 91177308-0d34-0410-b5e6-96231b3b80d8
Consumed analysis: switch from tests_consumed/unconsumed to a general
tests_typestate attribute.  Patch by chris.wailes@gmail.com.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192513 91177308-0d34-0410-b5e6-96231b3b80d8
Consumed analysis: replace the consumes attribute with a set_typestate
attribute.  Patch by chris.wailes@gmail.com; reviewed and edited by delesley.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192515 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing flags -fexpensive-optimizations and -minline-all-stringops as noops.


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