Extend -Wuninitialized to warn when accessing uninitialized base classes in a
constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222503 91177308-0d34-0410-b5e6-96231b3b80d8
PR21323: Fix iterator invalidation issue when looking for redeclarations of a
special member function.

No test yet: the only testcases we have for this issue are extremely complex.
Testcase will be added once I get a reasonable reduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222506 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] When explicitly importing a module, it's fine for the imported module
to be newer than we were expecting. That happens if .pcm's get moved between
file systems during a distributed build. (It's still not OK for them to actually
be different, though, so we still check the size and signature matches.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222507 91177308-0d34-0410-b5e6-96231b3b80d8
Fix missing diagnostic for unsupported TLS for some thread_local variables.

Clang r181627 moved a check for block-scope variables into this code for
handling thread storage class specifiers, but in the process, it broke the
logic for checking if the target supports TLS. Fix this with some simple
restructuring of the code. rdar://problem/18796883

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

These mangling make clang more compatible with MSVC 2015.
Correctly mangling char16_t and char32_t will take a little more work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222515 91177308-0d34-0410-b5e6-96231b3b80d8
[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