Sema: Handle C11 atomics when diagnosing out of range comparisons

This fixes a couple of asserts when analyzing comparisons involving
C11 atomics that were uncovered by r205608 when we extended the
applicability of -Wtautological-constant-out-of-range-compare.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213573 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for '#pragma unroll'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213574 91177308-0d34-0410-b5e6-96231b3b80d8
Emit lifetime.start / lifetime.end markers for unnamed temporary objects.

This will give more information to the optimizers so that they can reuse stack slots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213576 91177308-0d34-0410-b5e6-96231b3b80d8
Fix build breakage caused by use of std::to_string(int).  Replace with raw_string_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213578 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Emit lifetime.start / lifetime.end markers for unnamed temporary objects."

This commit did break the sanitizer-x86 bot. Revert it while
investigating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213579 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format vs plugin: set version number from cmake (PR20307)

Previously it was hard-coded to 1.0, which meant the installer would
not install the plugin over previous versions.

This commit makes us use LLVM's major.minor.patch version from cmake,
or whatever CLANG_FORMAT_VS_VERSION is set to when configuring the build.

It's pretty dirty to update a configuration file in the source directory
from the cmake build like this. However, the plugin build is already
dirty in this regard since it builds in the source dir when visual studio,
and then copies out the resulting vsix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213584 91177308-0d34-0410-b5e6-96231b3b80d8
Rename metadata llvm.loop.vectorize.unroll to llvm.loop.vectorize.interleave.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213587 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: ignore /showIncludes when combined with /E (PR20336)

Both /showIncludes and /E write to stdout. Allowing both results
in interleaved output and an error when double-closing the file
descriptor, intended to catch issues like this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213589 91177308-0d34-0410-b5e6-96231b3b80d8
-fms-extensions: Implement half of #pragma init_seg

Summary:
This pragma is very rare.  We could *hypothetically* lower some uses of
it down to @llvm.global_ctors, but given that GlobalOpt isn't able to
optimize prioritized global ctors today, there's really no point.

If we wanted to do this in the future, I would check if the section used
in the pragma started with ".CRT$XC" and had up to two characters after
it.  Those two characters could form the 16-bit initialization priority
that we support in @llvm.global_ctors.  We would have to teach LLVM to
lower prioritized global ctors on COFF as well.

This should let us compile some silly uses of this pragma in WebKit /
Blink.

Reviewers: rsmith, majnemer

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213593 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid crash if default argument parsed with errors.

If function parameters have default values, and that of the second
parameter is parsed with errors, function declaration would have
a parameter without default value that follows a parameter with
that. Such declaration breaks logic of selecting overloaded
function. As a solution, put opaque object as default value in such case.

This patch fixes PR20055.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213594 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: correct handling for __va_start for WoA

Windows ARM indicates __va_start as a variadic function.  However, the function
itself is treated as having 4 formal arguments:
  - (out) pointer to the va_list
  - (in) address of the last named argument
  - (in) slot size for the type of the last argument
  - address of the last named argument

The last argument does not seem to have any bearing on codegen, and thus is not
explicitly type checked at this point.

Unlike the previous handling for __va_start, it does not currently validate if
the parameter is the last named parameter (it seems that MSVC currently accepts
this).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213595 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a template diffing problem were an '&' is unexpectedly printed in
a template argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213609 91177308-0d34-0410-b5e6-96231b3b80d8
More gracefully handle parentheses in templare arguments in template diffing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213611 91177308-0d34-0410-b5e6-96231b3b80d8
Fix '&' printing for template arguments in parentheses in template diffing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213613 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Initial parsing and sema analysis for 'ordered' directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213616 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Initial parsing and sema analysis for 'atomic' directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213639 91177308-0d34-0410-b5e6-96231b3b80d8
AVX-512: Added intrinsics to clang.
The set is small, that what I have right now.
Everybody is welcome to add more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213641 91177308-0d34-0410-b5e6-96231b3b80d8
AVX-512: I added new headers to makefiles. It should resolve tests fail.
If it will not, I'm reverting the both commits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213645 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Tests for nesting of regions for 'atomic' directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213648 91177308-0d34-0410-b5e6-96231b3b80d8
Disallowing GNU-style attributes in new expressions, since they are prohibited by GCC as well.

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