[sphinx cleanup]
Fix warning introduced by r211098.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217864 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for putting constructors and destructos in explicit comdats.

There are situations when clang knows that the C1 and C2 constructors
or the D1 and D2 destructors are identical. We already optimize some
of these cases, but cannot optimize it when the GlobalValue is
weak_odr.

The problem with weak_odr is that an old TU seeing the same code will
have a C1 and a C2 comdat with the corresponding symbols. We cannot
suddenly start putting the C2 symbol in the C1 comdat as we cannot
guarantee that the linker will not pick a .o with only C1 in it.

The solution implemented by GCC is to expand the ABI to have a comdat
whose name uses a C5/D5 suffix and always has both symbols. That is
what this patch implements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217874 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Restructure and add missing tests.

Patch by Jean-Philippe Dufraigne, Thank you!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217880 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Allow unbroken ::: in inline assembly.

Before:
  asm volatile("nop" :: : "memory");

After:
  asm volatile("nop" ::: "memory");

Patch by Eugene Toder. Thank you.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217883 91177308-0d34-0410-b5e6-96231b3b80d8
Fix forwarding -l to MSVC's link.exe

Translate -lfoo to -lfoo.lib while making sure that -lfoo.lib stays as
-lfoo.lib. Also, these arguments were being passed twice: once
explicitly via AddAllArgs, and again implicitly as linker inputs. Now
they are passed once.

Fixes PR20868.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217895 91177308-0d34-0410-b5e6-96231b3b80d8
Don't try to use C5/D5 comdats in COFF.

This should fix the mingw bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217897 91177308-0d34-0410-b5e6-96231b3b80d8
Don't try to devirtualize non-virtual calls

We would end up marking the vtable of the derived class as used for no
reason. Because the call itself is qualified, it is never virtual, and
the vtable of the derived class isn't helpful. We would end up rejecting
code that MSVC accepts for no benefit.

See http://crbug.com/413478

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217910 91177308-0d34-0410-b5e6-96231b3b80d8
Basic: whitespace fixup for ARM target info

Fix whitespace.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217955 91177308-0d34-0410-b5e6-96231b3b80d8
Basic: use range-based for loops for ARM target

Tweak handleTargetFeature for the ARM(32) target to use range based for loops.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217956 91177308-0d34-0410-b5e6-96231b3b80d8
Basic: add support for ARM ACLE 6.5.1

Extend ARM ACLE support (Section 6.5.1) for AArch32.  Define __ARM_FP if
hardware floating point support is available as per the value defined by the
ACLE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217957 91177308-0d34-0410-b5e6-96231b3b80d8
[X86, inline-asm] Check that the input size is correct for constraints R, q, Q,
S, D, A, y, x, f, t, and u.

This is a follow-up patch for r167717.

rdar://problem/11846140
rdar://problem/17476970


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217994 91177308-0d34-0410-b5e6-96231b3b80d8
Instantiate exception specifications when instantiating function types (other
than the type of a function declaration). We previously didn't instantiate
these at all! This also covers the pathological case where the only mention of
a parameter pack is within the exception specification; this gives us a second
way (other than alias templates) to reach the horrible state where a type
contains an unexpanded pack, but its canonical type does not.


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

This is a follow-up to r217994.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217996 91177308-0d34-0410-b5e6-96231b3b80d8
Skip parens when detecting whether we're instantiating a function declaration.


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

This is another follow-up patch to r217996.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218003 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Diagnose undefined structs used as Microsoft anonymous structs

Previously, we would not mark structs containing anonymous structs as
invalid.  Later, horrific things would occur when trying to determine
the size of the parent record.

Instead, require the struct to be a complete type when used as an
anonymous struct.  Mark both the anonymous field for the struct and the
parent context as invalid (this is similar to what we do when a struct
contains a field with an incomplete type.)

This fixes PR11847.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218006 91177308-0d34-0410-b5e6-96231b3b80d8
Change -Wbind-to-temporary-copy from an ExtWarn to an Extension.

The reasoning is that this construct is accepted by all compilers and valid in
C++11, so it doesn't seem like a useful warning to have enabled by default.
Building with -pedantic, -Wbind-to-temporary-copy, or -Wc++98-compat still
shows the warning.

The motivation is that I built re2, and this was the only warning that was
emitted during the build. Both changing re2 to fix the warning and detecting
clang and suppressing the warning in re2's build seem inferior than just giving
the compiler a good default for this warning.

Also move the cxx98compat version of this warning to CXX98CompatPedantic, and
update tests accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218008 91177308-0d34-0410-b5e6-96231b3b80d8
Basic: use hex string for __ARM_FP macro

The ARM ACLE describes the values as hex constants rather than numeric
constants; follow suit.  Address post-commit review comments from Jon Roelofs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218009 91177308-0d34-0410-b5e6-96231b3b80d8
Work around MSVC parser bug by putting redundant braces around the body of
this range-based for loop.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218011 91177308-0d34-0410-b5e6-96231b3b80d8
Parsing/Sema of directive omp for simd

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