[OPENMP] Disable CapturedStmt generation for standalone directives.
No functional changes, just code improvement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222523 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Basic lambda support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222524 91177308-0d34-0410-b5e6-96231b3b80d8
clang: do not add -pie for tsan

Revision 220571 removes the requirement to use -pie for tsan binaries. So remove -pie from driver.
Also s/hasZeroBaseShadow/requiresPIE/ because that is what it is used for. Msan does not have zero-based shadow, but requires pie. And in general the relation between zero-based shadow and pie is unclear.

http://reviews.llvm.org/D6318



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222526 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Support more Java keywords.

Before:
  public final<X> Foo foo() {
  }

  public abstract<X> Foo foo();

After:
  public final <X> Foo foo() {
  }

  public abstract <X> Foo foo();

Patch by Harry Terkelsen. Thank you.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222527 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Handle comments in short case labels.

With AllowShortCaseLabelsOnASingleLine set to true:
This gets now left unchanged:
  case 1:
    // comment
    return;

Whereas before it was changed into:
  case 1: // comment return;

This fixes llvm.org/PR21630.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222529 91177308-0d34-0410-b5e6-96231b3b80d8
Fix test after r222526.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222530 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Use nested block special case for all languages.

Previously this was only used for JavaScript.

Before:
  functionCall({
                 int i;
                 int j;
               },
               aaaa, bbbb, cccc);

After:
  functionCall({
    int i;
    int j;
  }, aaaa, bbbb, cccc);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222531 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Understand more lambda return types.

Before:
  auto a = [&b, c ](D * d) -> D * {}

After:
 auto a = [&b, c](D* d) -> D* {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222534 91177308-0d34-0410-b5e6-96231b3b80d8
Use the full-Expr filter to disambiguate equidistant correction
candidates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222549 91177308-0d34-0410-b5e6-96231b3b80d8
Properly correct initializer expressions based on whether they would be valid.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222550 91177308-0d34-0410-b5e6-96231b3b80d8
Enable ActOnIdExpression to use delayed typo correction for non-C++ code
when calling DiagnoseEmptyLookup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222551 91177308-0d34-0410-b5e6-96231b3b80d8
Add an assertion for detecting missed/uncorrected TypoExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222552 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Mangle char16_t and char32_t string literals

We previously had support for char and wchar_t string literals.  VS 2015
added support for char16_t and char32_t.

String literals must be mangled in the MS ABI in order for them to be
deduplicated across translation units: their linker has no notion of
mergeable section.  Instead, they use the mangled name to make a COMDAT
for the string literal; the COMDAT will merge with other COMDATs in
other object files.

This allows strings in object files generated by clang to get merged
with strings in object files generated by MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222564 91177308-0d34-0410-b5e6-96231b3b80d8
Implement -Wcast-qual, fixing #13772.

Many thanks to dblaikie for his advices and suggestions!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222568 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Don't permit variably modified types in typeid

GCC and ICC both reject this and the 'Runtime-sized arrays with
automatic storage duration' (N3639) paper forbade this as well.
Previously, we would crash on our way to mangling.

This fixes PR21632.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222569 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C ARC. Fixes a crash when checking for 'weak' propery 
whose base is not an expression. rdar://19053620



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222570 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Mangle u8 string literals

UTF8 string literals are mangled just like ASCII string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222591 91177308-0d34-0410-b5e6-96231b3b80d8
Delay checking overrides for exception specifications if the overridden
specification has not yet been parsed.


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

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222610 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Make atomic operations play nice with address spaces

We were being a little sloppy with our pointer/address space casts.

This fixes PR21643.

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