Fix Driver tests that I broke on Windows in r214924

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214931 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Mangle empty type parameter packs compatibly

The MS mangling scheme apparently has separate manglings for type and
non-type parameter packs when they are empty.  Match template arguments
with parameters during mangling; check the parameter to see if it was
destined to hold type-ish things or nontype-ish things.

Differential Revision: http://reviews.llvm.org/D4792

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214935 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Mangle lambdas which are given the same mangling number

It is possible for lambdas to get the same mangling number because they
may exist in different mangling contexts.  To handle this correctly,
mangle the context into the name as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214947 91177308-0d34-0410-b5e6-96231b3b80d8
[Driver] Move information about toolchain specific include directories
from the common driver code to the corresponding `MultilibSet` declarations.

Now the `MultilibSet` can hold an optional callback function which is
responsible to return a set of include directories specific for the toolchain.
That allows to remove MIPS toolchain specific directories from
`Linux::AddClangSystemIncludeArgs` method and simplify adding new directories
in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214949 91177308-0d34-0410-b5e6-96231b3b80d8
[Driver] Add missed include header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214950 91177308-0d34-0410-b5e6-96231b3b80d8
Fix modelling of non-lifetime-extended temporary destructors in the analyzer.

1. Changes to the CFG:
When creating the CFG for temporary destructors, we create a structure
that mirrors the branch structure of the conditionally executed
temporary constructors in a full expression.
The branches we create use a CXXBindTemporaryExpr as terminator which
corresponds to the temporary constructor which must have been executed
to enter the destruction branch.

2. Changes to the Analyzer:
When we visit a CXXBindTemporaryExpr we mark the CXXBindTemporaryExpr as
executed in the state; when we reach a branch that contains the
corresponding CXXBindTemporaryExpr as terminator, we branch out
depending on whether the corresponding CXXBindTemporaryExpr was marked
as executed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214962 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix indentation in multi-line placement new.

Before:
  auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
      new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
      typename aaaaaaaaaaaaaaaaaaaaaaaa();

After:
  auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
      new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
          typename aaaaaaaaaaaaaaaaaaaaaaaa();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214964 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Add special comments to disable formatting.

With this patch:
  int ThisWillBeFormatted;
  // clang-format off
  int   ThisWontBeFormatted;
  // clang-format on
  int Formatted;

This is for regions where a significantly nicer code layout can be found
knowing the content of the code.

This fixes llvm.org/PR20463.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214967 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Correct SBPO_Always-behavior after function-like keywords

Before:
  auto f (int x) -> decltype(x) { return sizeof(x); }
  int g () noexcept(someCall ());
  static_assert(sizeof(char) == 1, "Your compiler is broken");

After:
  auto f (int x) -> decltype (x) { return sizeof (x); }
  int g () noexcept (someCall ());
  static_assert (sizeof (char) == 1, "Your compiler is broken");

This fixes llvm.org/PR20559.
Patch by Roman Kashitsyn, thank you!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214970 91177308-0d34-0410-b5e6-96231b3b80d8
FormatTokenLexer: Avoid non-static member initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214976 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C ARC. First patch toward generating new APIs
for Objective-C's array and dictionary literals.
rdar://17554063. This is wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214983 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C ARC. Adding declarations for Objective-C's
new APIs for literals. nfc. wip. rdar://17554063


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214993 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Fix modelling of non-lifetime-extended temporary destructors in the analyzer."

This reverts commit r214962 because after the change the
following code doesn't compile with -Wreturn-type -Werror.

  #include <cstdlib>

  class NoReturn {
  public:
    ~NoReturn() __attribute__((noreturn)) { exit(1); }
  };

  int check() {
    true ? NoReturn() : NoReturn();
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214998 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C ARC. More code for Objective-C's
new APIs for literals. nfc. wip. rdar://17554063


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215043 91177308-0d34-0410-b5e6-96231b3b80d8
Add back the leading space when printing commands with -###

This was an unintentional behavior change from r214924.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215044 91177308-0d34-0410-b5e6-96231b3b80d8
Use -Rblah, not -Wblah, to control remark diagnostics. This was always the
intent when we added remark support, but was never implemented in the general
case, because the first -R flags didn't need it. (-Rpass= had special handling
to accomodate its argument.)

-Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark,
or to turn on or off all remarks. Per discussion on cfe-commits, -Weverything
does not affect remarks, and -Reverything does not affect warnings or errors.

The only "real" -R flag we have right now is -Rmodule-build; that flag is
effectively renamed from -Wmodule-build to -Rmodule-build by this change.

-Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and
-Rno-pass by this change; it's not completely clear whether we intended to have
a -Rpass (with no =pattern), but that is unchanged by this commit, other than
the flag name. The default pattern is effectively one which matches no passes.
In future, we may want to make the default pattern be .*, so that -Reverything
works for -Rpass properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215046 91177308-0d34-0410-b5e6-96231b3b80d8
Make FullExprArg trivially copyable by removing the copy ctor

The default copy ctor is good.  This avoids using inalloca for a bunch
of Sema methods when self-hosting.

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