]> granicus.if.org Git - clang/log
clang
10 years agoclang-cl: Diagnose the usage of ASAN with a debug runtime library
Ehsan Akhgari [Tue, 14 Oct 2014 23:15:44 +0000 (23:15 +0000)]
clang-cl: Diagnose the usage of ASAN with a debug runtime library

Summary:
AddressSanitizer currently doesn't support this configuration, and binaries
built with it will just get into an infinite loop during startup.

Test Plan: Includes an automated test.

Reviewers: samsonov

Subscribers: cfe-commits

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

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

10 years agoSort files list in lib/Headers/CMakeLists.txt
Hans Wennborg [Tue, 14 Oct 2014 23:15:43 +0000 (23:15 +0000)]
Sort files list in lib/Headers/CMakeLists.txt

majnemer pointed out that vadefs.h was added in the wrong place. Might
as well sort the rest too.

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

10 years agoMS Compat: interpose vadefs.h to fix definitions of _crt_va_{start,end,arg} (PR21247)
Hans Wennborg [Tue, 14 Oct 2014 22:35:42 +0000 (22:35 +0000)]
MS Compat: interpose vadefs.h to fix definitions of _crt_va_{start,end,arg} (PR21247)

Differential revision: http://reviews.llvm.org/D5784

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

10 years agoDebugInfo: Lazily built static member variable declarations should use the canonical...
David Blaikie [Tue, 14 Oct 2014 22:22:17 +0000 (22:22 +0000)]
DebugInfo: Lazily built static member variable declarations should use the canonical declaration for line/file information.

When lazily constructing static member variable declarations (when
the vtable optimization fires and the definition of the type is omitted
(or built later, lazily), but the out of line definition of the static
member is provided and must be described in debug info) ensure we use
the canonical declaration when computing the file, line, etc for that
declaration (rather than the definition, which is also a declaration,
but not the canonical one).

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

10 years agoARM: remove ARM/Thumb distinction for preferred alignment.
Tim Northover [Tue, 14 Oct 2014 22:12:21 +0000 (22:12 +0000)]
ARM: remove ARM/Thumb distinction for preferred alignment.

Thumb1 has legitimate reasons for preferring 32-bit alignment of types
i1/i8/i16, since the 16-bit encoding of "add rD, sp, #imm" requires #imm to be
a multiple of 4. However, this is a trade-off betweem code size and RAM usage;
the DataLayout string is not the best place to represent it even if desired.

So this patch removes the extra Thumb requirements, hopefully making ARM and
Thumb completely compatible in this respect.

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

10 years agoBe smarter when parsing variable declarations with unknown types.
Kaelyn Takata [Tue, 14 Oct 2014 21:57:21 +0000 (21:57 +0000)]
Be smarter when parsing variable declarations with unknown types.

Specifically, avoid typo-correcting the variable name into a type before
typo-correcting the actual type name in the declaration. Doing so
results in a very unpleasant cascade of errors, with the typo correction
of the actual type name being buried in the middle.

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

10 years agoARM: set preferred aggregate alignment to 32 universally.
Tim Northover [Tue, 14 Oct 2014 20:57:29 +0000 (20:57 +0000)]
ARM: set preferred aggregate alignment to 32 universally.

Before, ARM and Thumb mode code had different preferred alignments, which could
lead to some rather unexpected results. There's justification for reducing it
from the default 64-bits (wasted space), but I don't think there is for going
below 32-bits.

There's no actual ABI change here, just to reassure people.

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

10 years agoFactor code into CXXRecordDecl::getTemplateInstantiationPattern() helper
Reid Kleckner [Tue, 14 Oct 2014 20:28:40 +0000 (20:28 +0000)]
Factor code into CXXRecordDecl::getTemplateInstantiationPattern() helper

This moves some code from SemaType.cpp's hasVisibleDefinition() into
DeclCXX.cpp so that it can be used elsewhere. I found one other instance
of code trying to do the same thing, there are probably more. Search for
getInstantiatedFrom() to try to find more.

No functionality change.

Reviewed By: rsmith

Subscribers: cfe-commits

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

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

10 years agoPatch to warn on interger overflow in presence of
Fariborz Jahanian [Tue, 14 Oct 2014 20:27:05 +0000 (20:27 +0000)]
Patch to warn on interger overflow in presence of
implicit casts. Reviewed by Reid Kleckner.
rdar://18405357

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

10 years agoCodeGen: correct block mangling in ObjC
Saleem Abdulrasool [Tue, 14 Oct 2014 17:20:18 +0000 (17:20 +0000)]
CodeGen: correct block mangling in ObjC

Mangling for blocks defined within blocks in an ObjectiveC context were also
broken by SVN r219393.  Because the code in mangleName assumed that the code was
either C or C++, we would trigger assertions when trying to mangle the inner
blocks in an ObjectiveC context.

Add a test and use the ObjectiveC specific mangling when dealing with an
ObjectiveC method declaration.

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

10 years agoCodeGen: correct mangling for blocks
Saleem Abdulrasool [Tue, 14 Oct 2014 17:20:14 +0000 (17:20 +0000)]
CodeGen: correct mangling for blocks

This addresses a regression introduced with SVN r219393.  A block may be
contained within another block.  In such a scenario, we would end up within a
BlockDecl, which is not a NamedDecl (as the names are synthesised).  The cast to
a NamedDecl of the DeclContext would then assert as the types are unrelated.

Restore the mangling behaviour to that prior to SVN r219393.  If the current
block is contained within a BlockDecl, walk up to the parent DeclContext,
recursively, until we have a non-BlockDecl.  This is expected to be a NamedDecl.
Add in a couple of asserts to ensure that the assumption that we only encounter
a block within a NamedDecl or a BlockDecl.

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

10 years agoFormatting for prior commit
David Blaikie [Tue, 14 Oct 2014 17:09:38 +0000 (17:09 +0000)]
Formatting for prior commit

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

10 years ago[SystemZ] Address review comments for r219679
Ulrich Weigand [Tue, 14 Oct 2014 16:46:45 +0000 (16:46 +0000)]
[SystemZ] Address review comments for r219679

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

10 years agoDebugInfo: Don't leak location information from one function into the prologue of...
David Blaikie [Tue, 14 Oct 2014 16:43:46 +0000 (16:43 +0000)]
DebugInfo: Don't leak location information from one function into the prologue of the next function.

CodeGenFunction objects aren't really designed to be reused for more
than one function, and doing so can leak debug info location information
from one function into the prologue of the next.

Add an assertion in to catch reuses of CodeGenFunction, which
surprisingly only caught the ObjC atomic getter/setter cases. Fix those
and add a test to demonstrate the issue.

The test is a bit slim, because we're just testing for the absence of a
debug location on the prologue instructions, which by itself probably
wouldn't be the end of the world - but the particular debug location
that was ending up there was for the previous function's last
instruction. This produced debug info for another function within this
function, which is something I'm trying to remove all cases of as its a
substantial source of bugs, especially around inlining (see r219215).

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

10 years ago[SystemZ] Add test case to verify default use of integrated assembler
Ulrich Weigand [Tue, 14 Oct 2014 11:45:53 +0000 (11:45 +0000)]
[SystemZ] Add test case to verify default use of integrated assembler

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

10 years agoRe-apply "Frontend: Extract SerializedDiagnosticReader out of CXLoadedDiagnostic...
Justin Bogner [Tue, 14 Oct 2014 06:30:31 +0000 (06:30 +0000)]
Re-apply "Frontend: Extract SerializedDiagnosticReader out of CXLoadedDiagnostic (NFC)"

I'd mispelled "Bitcode/BitCodes.h" before, and tested on a case
insensitive filesystem.

This reverts commit r219649, effectively re-applying r219647 and
r219648.

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

10 years agoExtend -Rmodule-build to also remark when module building finishes.
Richard Smith [Tue, 14 Oct 2014 02:08:30 +0000 (02:08 +0000)]
Extend -Rmodule-build to also remark when module building finishes.

In cases of nested module builds, or when you care how long module builds take,
this information was not previously easily available / obvious.

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

10 years ago[modules] Merging for class-scope using-declarations.
Richard Smith [Tue, 14 Oct 2014 02:00:47 +0000 (02:00 +0000)]
[modules] Merging for class-scope using-declarations.

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

10 years agoRevert "Frontend: Extract SerializedDiagnosticReader out of CXLoadedDiagnostic (NFC)"
Justin Bogner [Tue, 14 Oct 2014 00:57:34 +0000 (00:57 +0000)]
Revert "Frontend: Extract SerializedDiagnosticReader out of CXLoadedDiagnostic (NFC)"

The bots can't seem to find an include file. Reverting for now and
I'll look into it in a bit.

This reverts commits r219647 and r219648.

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

10 years agoFrontend: Try to fix cmake builders after r219647
Justin Bogner [Tue, 14 Oct 2014 00:51:18 +0000 (00:51 +0000)]
Frontend: Try to fix cmake builders after r219647

Looks like I missed a dependency here.

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

10 years agoFrontend: Extract SerializedDiagnosticReader out of CXLoadedDiagnostic (NFC)
Justin Bogner [Tue, 14 Oct 2014 00:40:55 +0000 (00:40 +0000)]
Frontend: Extract SerializedDiagnosticReader out of CXLoadedDiagnostic (NFC)

We currently read serialized diagnostics directly in the C API, which
makes it difficult to reuse this logic elsewhere. This extracts the
core of the serialized diagnostic parsing logic into a base class that
can be subclassed using a visitor pattern.

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

10 years agoSanitize upcasts and conversion to virtual base.
Alexey Samsonov [Mon, 13 Oct 2014 23:59:00 +0000 (23:59 +0000)]
Sanitize upcasts and conversion to virtual base.

This change adds UBSan check to upcasts. Namely, when we
perform derived-to-base conversion, we:
1) check that the pointer-to-derived has suitable alignment
   and underlying storage, if this pointer is non-null.
2) if vptr-sanitizer is enabled, and we perform conversion to
   virtual base, we check that pointer-to-derived has a matching vptr.

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

10 years agoFix the build
David Majnemer [Mon, 13 Oct 2014 22:18:22 +0000 (22:18 +0000)]
Fix the build

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

10 years agoObjective-C [Sema]. Fixes a bug in comparing qualified
Fariborz Jahanian [Mon, 13 Oct 2014 21:07:45 +0000 (21:07 +0000)]
Objective-C [Sema]. Fixes a bug in comparing qualified
Objective-C pointer types. In this case, checker incorrectly
claims incompatible pointer types if redundant protocol conformance
is specified. rdar://18491222

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

10 years ago[analyzer] Check all 'nonnull' attributes, not just the first one.
Jordan Rose [Mon, 13 Oct 2014 19:38:02 +0000 (19:38 +0000)]
[analyzer] Check all 'nonnull' attributes, not just the first one.

Patch by Daniel Fahlgren!

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

10 years agoFix order of evaluation bug in DynTypedMatcher::constructVariadic().
Samuel Benzaquen [Mon, 13 Oct 2014 18:17:11 +0000 (18:17 +0000)]
Fix order of evaluation bug in DynTypedMatcher::constructVariadic().

Fix order of evaluation bug in DynTypedMatcher::constructVariadic().
If it evaluates right-to-left, the vector gets moved before we read the
kind from it.

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

10 years agoFix bug in DynTypedMatcher::constructVariadic() that would cause false negatives.
Samuel Benzaquen [Mon, 13 Oct 2014 17:38:12 +0000 (17:38 +0000)]
Fix bug in DynTypedMatcher::constructVariadic() that would cause false negatives.

Summary:
Change r219118 fixed the bug for anyOf and eachOf, but it is still
present for unless.
The variadic wrapper doesn't have enough information to know how to
restrict the type. Different operators handle restrict failures in
different ways.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

10 years agoRelinquish ownership of MS-style inline assembly.
Chad Rosier [Mon, 13 Oct 2014 16:45:21 +0000 (16:45 +0000)]
Relinquish ownership of MS-style inline assembly.

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

10 years agoMore OpenMP test case compatibility fixes
Ulrich Weigand [Mon, 13 Oct 2014 13:49:39 +0000 (13:49 +0000)]
More OpenMP test case compatibility fixes

Allow "signext" in a couple of more places in recently
added test cases to fix failures on SystemZ.

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

10 years ago[AArch64] Fixup test from A53 erratum patch after buildbot failures
Bradley Smith [Mon, 13 Oct 2014 11:18:05 +0000 (11:18 +0000)]
[AArch64] Fixup test from A53 erratum patch after buildbot failures

Don't include stdint.h directly, instead typedef int64_t which is all we need.

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

10 years agoAdds support for the Cortex-A17 processor to Clang
Renato Golin [Mon, 13 Oct 2014 10:22:48 +0000 (10:22 +0000)]
Adds support for the Cortex-A17 processor to Clang

Patch by Matthew Wahab.

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

10 years ago[AArch64] Add workaround for Cortex-A53 erratum (835769)
Bradley Smith [Mon, 13 Oct 2014 10:16:06 +0000 (10:16 +0000)]
[AArch64] Add workaround for Cortex-A53 erratum (835769)

Some early revisions of the Cortex-A53 have an erratum (835769) whereby it is
possible for a 64-bit multiply-accumulate instruction in AArch64 state to
generate an incorrect result.  The details are quite complex and hard to
determine statically, since branches in the code may exist in some
circumstances, but all cases end with a memory (load, store, or prefetch)
instruction followed immediately by the multiply-accumulate operation.

The safest work-around for this issue is to make the compiler avoid emitting
multiply-accumulate instructions immediately after memory instructions and the
simplest way to do this is to insert a NOP.

This patch implements clang options to enable this workaround in the backend.

The work-around code generation is not enabled by default.

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

10 years agoFix incompatibility issue in /OpenMP/parallel_num_threads_codegen.cpp
Alexey Bataev [Mon, 13 Oct 2014 08:51:32 +0000 (08:51 +0000)]
Fix incompatibility issue in /OpenMP/parallel_num_threads_codegen.cpp

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

10 years ago[OPENMP] Codegen for 'num_threads' clause in 'parallel' directive.
Alexey Bataev [Mon, 13 Oct 2014 08:23:51 +0000 (08:23 +0000)]
[OPENMP] Codegen for 'num_threads' clause in 'parallel' directive.
This patch generates call to "kmpc_push_num_threads(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_threads);" library function before calling "kmpc_fork_call" each time there is an associated "num_threads" clause in the "omp parallel" directive.
Differential Revision: http://reviews.llvm.org/D5145

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

10 years agoFix test OpenMP/parallel_if_codegen.cpp.
Alexey Bataev [Mon, 13 Oct 2014 06:21:04 +0000 (06:21 +0000)]
Fix test OpenMP/parallel_if_codegen.cpp.

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

10 years ago[OPENMP] Codegen for 'if' clause in 'parallel' directive.
Alexey Bataev [Mon, 13 Oct 2014 06:02:40 +0000 (06:02 +0000)]
[OPENMP] Codegen for 'if' clause in 'parallel' directive.
Adds codegen for 'if' clause. Currently only for 'if' clause used with the 'parallel' directive.
If condition evaluates to true, the code executes parallel version of the code by calling __kmpc_fork_call(loc, 1, microtask, captured_struct/*context*/), where loc - debug location, 1 - number of additional parameters after "microtask" argument, microtask - is outlined finction for the code associated with the 'parallel' directive, captured_struct - list of variables captured in this outlined function.
If condition evaluates to false, the code executes serial version of the code by executing the following code:

global_thread_id.addr = alloca i32
store i32 global_thread_id, global_thread_id.addr
zero.addr = alloca i32
store i32 0, zero.addr
kmpc_serialized_parallel(loc, global_thread_id);
microtask(global_thread_id.addr, zero.addr, captured_struct/*context*/);
kmpc_end_serialized_parallel(loc, global_thread_id);

Where loc - debug location, global_thread_id - global thread id, returned by __kmpc_global_thread_num() call or passed as a first parameter in microtask() call, global_thread_id.addr - address of the variable, where stored global_thread_id value, zero.addr - implicit bound thread id (should be set to 0 for serial call), microtask() and captured_struct are the same as in parallel call.

Also this patch checks if the condition is constant and if it is constant it evaluates its value and then generates either parallel version of the code (if the condition evaluates to true), or the serial version of the code (if the condition evaluates to false).
Differential Revision: http://reviews.llvm.org/D4716

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

10 years agoPredefinedExpr deserialization test in dependent context.
Alexey Bataev [Mon, 13 Oct 2014 03:27:35 +0000 (03:27 +0000)]
PredefinedExpr deserialization test in dependent context.
For commit r219561 - Fix deserialization of PredefinedExpr in dependent context.

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

10 years ago[Modules] Make header standalone. NFC.
Benjamin Kramer [Sun, 12 Oct 2014 22:49:21 +0000 (22:49 +0000)]
[Modules] Make header standalone. NFC.

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

10 years agoFixed a problem in r19589.
Tyler Nowicki [Sun, 12 Oct 2014 21:28:02 +0000 (21:28 +0000)]
Fixed a problem in r19589.

Several systems failed to compile the array allocation of the TokenArray.

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

10 years agoAllow constant expressions in pragma loop hints.
Tyler Nowicki [Sun, 12 Oct 2014 20:46:07 +0000 (20:46 +0000)]
Allow constant expressions in pragma loop hints.

Previously loop hints such as #pragma loop vectorize_width(#) required a constant. This patch allows a constant expression to be used as well. Such as a non-type template parameter or an expression (2 * c + 1).

Reviewed by Richard Smith

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

10 years agoCodeGen: Strip qualifiers from qualified array types in catches
David Majnemer [Sun, 12 Oct 2014 06:58:22 +0000 (06:58 +0000)]
CodeGen: Strip qualifiers from qualified array types in catches

While we ran getUnqualifiedType over the catch type,
it isn't enough for array types.  Use getUnqualifiedArrayType instead.

This fixes PR21252.

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

10 years agoclang/test/Driver: Some tests don't REQUIRE asserts any more. Remove them.
NAKAMURA Takumi [Sun, 12 Oct 2014 06:44:05 +0000 (06:44 +0000)]
clang/test/Driver: Some tests don't REQUIRE asserts any more. Remove them.

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

10 years agoSuppress a warning about an unused variable in NDEBUG builds.
Chandler Carruth [Sat, 11 Oct 2014 11:29:26 +0000 (11:29 +0000)]
Suppress a warning about an unused variable in NDEBUG builds.

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

10 years ago[complex] Teach the other two binary operators on complex numbers (==
Chandler Carruth [Sat, 11 Oct 2014 11:03:30 +0000 (11:03 +0000)]
[complex] Teach the other two binary operators on complex numbers (==
and !=) to support mixed complex and real operand types.

This requires removing an assert from SemaChecking, and adding support
both to the constant evaluator and the code generator to synthesize the
imaginary part when needed. This seemed somewhat cleaner than having
just the comparison operators force real-to-complex conversions.

I've added test cases for these operations. I'm really terrified that
there were *no* tests in-tree which exercised this.

This turned up when trying to build R after my change to the complex
type lowering.

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

10 years agoFix typo in ARM reserved-r9 test case
Renato Golin [Sat, 11 Oct 2014 10:34:18 +0000 (10:34 +0000)]
Fix typo in ARM reserved-r9 test case

Patch by Charlie Turner.

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

10 years ago[complex] Use the much more powerful EmitCall routine to call libcalls
Chandler Carruth [Sat, 11 Oct 2014 09:24:41 +0000 (09:24 +0000)]
[complex] Use the much more powerful EmitCall routine to call libcalls
for complex math.

This should fix the windows build bots that started having trouble here
and generally fix complex libcall emission on targets which use sret for
complex data types. It also makes the code a bit simpler (despite
calling into a much more complex bucket of code).

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

10 years agoclang-format: [ObjC] Wrap ObjC method declarations before annotations.
Daniel Jasper [Sat, 11 Oct 2014 08:24:56 +0000 (08:24 +0000)]
clang-format: [ObjC] Wrap ObjC method declarations before annotations.

Before:
  - (instancetype)initXxxxxxxxxxxxxxxxxxxxxxxxx:(id<x>)x
                                              y:(id<yyyyyyyyyyyyyyyyyyyy>)
                                                    y NS_DESIGNATED_INITIALIZER;
After:
  - (instancetype)initXxxxxxxxxxxxxxxxxxxxxxxxx:(id<x>)x
                                              y:(id<yyyyyyyyyyyyyyyyyyyy>)y
      NS_DESIGNATED_INITIALIZER;

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

10 years agoFix deserialization of PredefinedExpr in dependent context.
Alexey Bataev [Sat, 11 Oct 2014 05:07:24 +0000 (05:07 +0000)]
Fix deserialization of PredefinedExpr in dependent context.

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

10 years ago[complex] Teach Clang to preserve different-type operands to arithmetic
Chandler Carruth [Sat, 11 Oct 2014 00:57:18 +0000 (00:57 +0000)]
[complex] Teach Clang to preserve different-type operands to arithmetic
operators where one type is a C complex type, and to emit both the
efficient and correct implementation for complex arithmetic according to
C11 Annex G using this extra information.

For both multiply and divide the old code was writing a long-hand
reduced version of the math without any of the special handling of inf
and NaN recommended by the standard here. Instead of putting more
complexity here, this change does what GCC does which is to emit
a libcall for the fully general case.

However, the old code also failed to do the proper minimization of the
set of operations when there was a mixed complex and real operation. In
those cases, C provides a spec for much more minimal operations that are
valid. Clang now emits the exact suggested operations. This change isn't
*just* about performance though, without minimizing these operations, we
again lose the correct handling of infinities and NaNs. It is critical
that this happen in the frontend based on assymetric type operands to
complex math operations.

The performance implications of this change aren't trivial either. I've
run a set of benchmarks in Eigen, an open source mathematics library
that makes heavy use of complex. While a few have slowed down due to the
libcall being introduce, most sped up and some by a huge amount: up to
100% and 140%.

In order to make all of this work, also match the algorithm in the
constant evaluator to the one in the runtime library. Currently it is
a broken port of the simplifications from C's Annex G to the long-hand
formulation of the algorithm.

Splitting this patch up is very hard because none of this works without
the AST change to preserve non-complex operands. Sorry for the enormous
change.

Follow-up changes will include support for sinking the libcalls onto
cold paths in common cases and fastmath improvements to allow more
aggressive backend folding.

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

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

10 years ago[modules] When instantiating a class member, don't expect to find the previous
Richard Smith [Sat, 11 Oct 2014 00:37:16 +0000 (00:37 +0000)]
[modules] When instantiating a class member, don't expect to find the previous
declaration in the instantiation if the previous declaration came from another
definition of the class template that got merged into the pattern definition.

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

10 years agoclang-cl: Don't warn for unused private fields when encountering a late parsed templa...
Ehsan Akhgari [Sat, 11 Oct 2014 00:24:15 +0000 (00:24 +0000)]
clang-cl: Don't warn for unused private fields when encountering a late parsed template member

Summary: This fixes PR21235.

Test Plan: Includes an automated test.

Reviewers: hansw

Subscribers: cfe-commits

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

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

10 years agoTreat -mios-simulator-version-min option as an alias for -mios-version-min.
Bob Wilson [Fri, 10 Oct 2014 23:10:10 +0000 (23:10 +0000)]
Treat -mios-simulator-version-min option as an alias for -mios-version-min.

We can safely rely on the architecture to distinguish iOS device builds from
iOS simulator builds. We already have code to do that, in fact. This simplifies
some of the error checking for the option handling.

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

10 years ago[modules] Delay loading the field declared with an anonymous tag declaration
Richard Smith [Fri, 10 Oct 2014 22:37:41 +0000 (22:37 +0000)]
[modules] Delay loading the field declared with an anonymous tag declaration
until after we've had a chance to merge that tag.

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

10 years agoCorrectly handle reading locations from serialized diagnostics
Justin Bogner [Fri, 10 Oct 2014 22:20:26 +0000 (22:20 +0000)]
Correctly handle reading locations from serialized diagnostics

When reading a serialized diagnostic location with no file ID, we were
failing to increment the cursor past the rest of the location. This
would lead to the flags and category always appearing blank in such
diagnostics.

This changes the function to unconditionally increment the cursor and
updates the test to check for the correct output instead of testing
that we were doing this wrong. I've also updated the error check to
check for the correct number of fields.

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

10 years agoObjective-C [qoi]. When reporting that a property is not
Fariborz Jahanian [Fri, 10 Oct 2014 22:08:23 +0000 (22:08 +0000)]
Objective-C [qoi]. When reporting that a property is not
auto synthesized because it is synthesized in its super
class. locate property declaration in super class
which will default synthesize the property. rdar://18488727

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

10 years agoAdd libclang capabilities to retriete template arguments from specializations.
Eli Bendersky [Fri, 10 Oct 2014 20:01:05 +0000 (20:01 +0000)]
Add libclang capabilities to retriete template arguments from specializations.

Includes Python bindings.

Reviewed in http://reviews.llvm.org/D5621
Patch by Rob Springer

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

10 years agoRemove rest of the comment that is no longer true after r219527.
Bob Wilson [Fri, 10 Oct 2014 19:59:18 +0000 (19:59 +0000)]
Remove rest of the comment that is no longer true after r219527.

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

10 years agoRemove a FIXME: use the ios_simulator_version_min linker option consistently.
Bob Wilson [Fri, 10 Oct 2014 19:38:34 +0000 (19:38 +0000)]
Remove a FIXME: use the ios_simulator_version_min linker option consistently.

This was previously only used when explicitly requested with a command line
option because it had to work with some old versions of the linker when it
was first introduced. That is ancient history now, and it should be safe to
use the correct option even when using the IPHONEOS_DEPLOYMENT_TARGET
environment variable to specify that the target is the iOS simulator.
Besides updating the test for this, I also added a few more tests for the
iOS linker options.

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

10 years agoMake test more robust to appease build bots
David Majnemer [Fri, 10 Oct 2014 19:23:49 +0000 (19:23 +0000)]
Make test more robust to appease build bots

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

10 years agoBugfix for predefined expressions in dependent context.
Alexey Bataev [Fri, 10 Oct 2014 18:58:13 +0000 (18:58 +0000)]
Bugfix for predefined expressions in dependent context.
This bug break compilation with precompiled headers and predefined expressions in dependent context.

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

10 years agoCodeGen: FieldMemcpyizer didn't handle copies starting inside bitfields
David Majnemer [Fri, 10 Oct 2014 18:57:10 +0000 (18:57 +0000)]
CodeGen: FieldMemcpyizer didn't handle copies starting inside bitfields

It's possible to construct cases where the first field we are trying to
copy is in the middle of an IR field.  In some complicated cases, we
would fail to use an appropriate offset inside the object.  Earlier
builds of clang seemed to miscompile the code by copying an insufficient
number of bytes.  Up until now, we would assert: the copying offset was
insufficiently aligned.

This fixes PR21232.

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

10 years agoChange how we distinguish bitfield widths, in-class
John McCall [Fri, 10 Oct 2014 18:44:34 +0000 (18:44 +0000)]
Change how we distinguish bitfield widths, in-class
initializers, and captured VLA types so that we can
answer questions like "is this a bit-field" without
looking at the enclosing DeclContext.  NFC.

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

10 years ago[PowerPC] Reduce names from Power8Vector to P8Vector
Bill Schmidt [Fri, 10 Oct 2014 17:21:23 +0000 (17:21 +0000)]
[PowerPC] Reduce names from Power8Vector to P8Vector

Per Hal Finkel's review, improving typability of some variable names.

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

10 years agoAlright, just XFAIL all these for Windows.
Dan Albert [Fri, 10 Oct 2014 17:20:10 +0000 (17:20 +0000)]
Alright, just XFAIL all these for Windows.

I'm going to fix up FileCheck to better handle things like this soon,
but for now let's just unblock the Windows people.

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

10 years agoFix documentation typo.
JF Bastien [Fri, 10 Oct 2014 16:09:48 +0000 (16:09 +0000)]
Fix documentation typo.

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

10 years agoReduce double set lookups. NFC.
Benjamin Kramer [Fri, 10 Oct 2014 15:32:48 +0000 (15:32 +0000)]
Reduce double set lookups. NFC.

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

10 years ago[PowerPC] Add feature for Power8 vector extensions
Bill Schmidt [Fri, 10 Oct 2014 15:09:43 +0000 (15:09 +0000)]
[PowerPC] Add feature for Power8 vector extensions

The current VSX feature for PowerPC specifies availability of the VSX
instructions added with the 2.06 architecture version.  With 2.07, the
architecture adds new instructions to both the Category:Vector and
Category:VSX instruction sets.  Additionally, unaligned vector storage
operations have improved performance.

This patch adds a feature to provide access to the new instructions
and performance capabilities of Power8.  For compatibility with GCC,
the feature is controlled via a new -mpower8-vector switch, and the
feature causes the __POWER8_VECTOR__ builtin define to be generated by
the preprocessor.

There is a companion patch for llvm being committed at the same time.

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

10 years agoUnfriend CGOpenMPRegionInfo so it can go into an anonymous namespace.
Benjamin Kramer [Fri, 10 Oct 2014 13:57:57 +0000 (13:57 +0000)]
Unfriend CGOpenMPRegionInfo so it can go into an anonymous namespace.

Also remove some unnecessary virtual keywords. NFC.

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

10 years agoFixing the MSVC 2013 build, NFC.
Aaron Ballman [Fri, 10 Oct 2014 12:40:56 +0000 (12:40 +0000)]
Fixing the MSVC 2013 build, NFC.

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

10 years agoCode reformatting and improvement for OpenMP.
Alexey Bataev [Fri, 10 Oct 2014 12:19:54 +0000 (12:19 +0000)]
Code reformatting and improvement for OpenMP.
Moved CGOpenMPRegionInfo from CGOpenMPRuntime.h to CGOpenMPRuntime.cpp file and reworked the code for this change. Also added processing of ThreadID variable passed as an argument in outlined functions in parallel and task directives.

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

10 years agoCode improvements in OpenMP CodeGen.
Alexey Bataev [Fri, 10 Oct 2014 09:48:26 +0000 (09:48 +0000)]
Code improvements in OpenMP CodeGen.
This patch makes class OMPPrivateScope a common class for all private variables. Reworked processing of firstprivate variables (now it is based on OMPPrivateScope too).

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

10 years agoXFAIL coverage -no-integrated-as tests for msvc.
Dan Albert [Fri, 10 Oct 2014 04:28:04 +0000 (04:28 +0000)]
XFAIL coverage -no-integrated-as tests for msvc.

Windows can't use -no-integrated-as, so split these tests out into a
separate file and XFAIL them for win32,win64.

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

10 years agoRevert r218865 because it introduced PR21236, a crash in codegen emitting the try...
Nick Lewycky [Fri, 10 Oct 2014 04:05:00 +0000 (04:05 +0000)]
Revert r218865 because it introduced PR21236, a crash in codegen emitting the try block.

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

10 years ago_Really_ fix these tests (probably).
Dan Albert [Fri, 10 Oct 2014 03:51:59 +0000 (03:51 +0000)]
_Really_ fix these tests (probably).

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

10 years agoRemove support for the IOS_SIMULATOR_DEPLOYMENT_TARGET env var.
Bob Wilson [Fri, 10 Oct 2014 03:12:15 +0000 (03:12 +0000)]
Remove support for the IOS_SIMULATOR_DEPLOYMENT_TARGET env var.

It turns out that this was never used. Instead we just use the
IPHONEOS_DEPLOYMENT_TARGET variable for both iOS devices and simulator.
rdar://problem/18596744

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

10 years agoFix for OpenMP/parallel_firstprivate_codegen.cpp
Alexey Bataev [Fri, 10 Oct 2014 02:50:06 +0000 (02:50 +0000)]
Fix for OpenMP/parallel_firstprivate_codegen.cpp
Fix compatibility issues of the test with SystemZ target.

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

10 years agoHopefully fixes test failures for msvc.
Dan Albert [Fri, 10 Oct 2014 02:26:00 +0000 (02:26 +0000)]
Hopefully fixes test failures for msvc.

Looks like llvm::sys::path::filename() was canonicalizing my paths
before emitting them for FileCheck to stumble over.

Fix a style nit with r219460 while I'm at it.

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

10 years agoPR21195: Emit .gcno files to the proper location.
Dan Albert [Fri, 10 Oct 2014 01:01:29 +0000 (01:01 +0000)]
PR21195: Emit .gcno files to the proper location.

When building with coverage, -no-integrated-as, and -c, the driver was
emitting -cc1 -coverage-file pointing at a file in /tmp. Ensure the
coverage file is emitted in the same directory as the output file.

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

10 years agoPromote null pointer constants used as arguments to variadic functions
Reid Kleckner [Fri, 10 Oct 2014 00:05:45 +0000 (00:05 +0000)]
Promote null pointer constants used as arguments to variadic functions

Make it possible to pass NULL through variadic functions on 64-bit
Windows targets. The Visual C++ headers define NULL to 0, when they
should define it to 0LL on Win64 so that NULL is a pointer-sized
integer.

Fixes PR20949.

Reviewers: thakis, rsmith

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

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

10 years agoFix completion logic to allow for heterogeneous argument types in matcher overloads.
Samuel Benzaquen [Thu, 9 Oct 2014 22:08:52 +0000 (22:08 +0000)]
Fix completion logic to allow for heterogeneous argument types in matcher overloads.

Summary:
There was an assumption that there were no matchers that were overloaded
on matchers and other types of arguments.
This assumption was broken recently with the addition of new matcher
overloads.

Fixes http://llvm.org/PR21226

Reviewers: pcc

Subscribers: klimek, cfe-commits

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

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

10 years agoObjective-C SDK modernization. import Foundation even
Fariborz Jahanian [Thu, 9 Oct 2014 22:04:27 +0000 (22:04 +0000)]
Objective-C SDK modernization. import Foundation even
when a previous definition of NS_OPTION is available
; e.g. from a pch. enhancement to rdar://18498550

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

10 years ago[Analysis] Add missing newlines at end of file.
Daniel Dunbar [Thu, 9 Oct 2014 20:34:45 +0000 (20:34 +0000)]
[Analysis] Add missing newlines at end of file.

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

10 years agoSpecial case 0 and 1 matcher in makeAllOfComposite().
Samuel Benzaquen [Thu, 9 Oct 2014 19:28:18 +0000 (19:28 +0000)]
Special case 0 and 1 matcher in makeAllOfComposite().

Summary:
Remove unnecessary wrapping for the 0 and 1 matcher cases of
makeAllOfComposite(). We don't need a variadic wrapper for those cases.
Refactor TrueMatcher to take advandage of the new conversions between
DynTypedMatcher and Matcher<T>. Also, make it a singleton.
This change improves our clang-tidy related benchmarks by ~12%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

10 years ago[SystemZ] Turn on the integrated assembler by default
Ulrich Weigand [Thu, 9 Oct 2014 18:46:38 +0000 (18:46 +0000)]
[SystemZ] Turn on the integrated assembler by default

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

10 years agoObjective-C SDK modernization. convert message expression
Fariborz Jahanian [Thu, 9 Oct 2014 18:30:56 +0000 (18:30 +0000)]
Objective-C SDK modernization. convert message expression
to Objective-C dot-syntax. rdar://18498572

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

10 years agoAdd experimental clang/driver flag -fsanitize-address-field-padding=N
Kostya Serebryany [Thu, 9 Oct 2014 17:53:04 +0000 (17:53 +0000)]
Add experimental clang/driver flag -fsanitize-address-field-padding=N

Summary:
This change adds an experimental flag -fsanitize-address-field-padding=N (0, 1, 2)
to clang and driver. With this flag ASAN will be able to detect some cases of
intra-object-overflow bugs,
see https://code.google.com/p/address-sanitizer/wiki/IntraObjectOverflow

There is no actual functionality here yet, just the flag parsing.
The functionality is being reviewed at http://reviews.llvm.org/D5687

Test Plan: Build and run SPEC, LLVM Bootstrap, Chrome with this flag.

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: cfe-commits

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

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

10 years agoSeparated RecursiveASTVisitorTest into multiple files.
Manuel Klimek [Thu, 9 Oct 2014 15:02:06 +0000 (15:02 +0000)]
Separated RecursiveASTVisitorTest into multiple files.

Patch by Marek Kurdej.

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

10 years agoImplement various matchers around template argument handling.
Manuel Klimek [Thu, 9 Oct 2014 13:06:22 +0000 (13:06 +0000)]
Implement various matchers around template argument handling.

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

10 years agoEscaping a special character in the documentation.
Aaron Ballman [Thu, 9 Oct 2014 13:03:12 +0000 (13:03 +0000)]
Escaping a special character in the documentation.

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

10 years agoFix compatibility issues in tests for PredefinedExpr with MSVC.
Alexey Bataev [Thu, 9 Oct 2014 11:58:26 +0000 (11:58 +0000)]
Fix compatibility issues in tests for PredefinedExpr with MSVC.

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

10 years agoclang-format: Add option to control call argument bin-packing separately
Daniel Jasper [Thu, 9 Oct 2014 09:52:05 +0000 (09:52 +0000)]
clang-format: Add option to control call argument bin-packing separately

This is desirable for the Chromium style guide:
http://www.chromium.org/developers/coding-style

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

10 years agoFix for bug http://llvm.org/PR17427.
Alexey Bataev [Thu, 9 Oct 2014 08:45:04 +0000 (08:45 +0000)]
Fix for bug http://llvm.org/PR17427.
Assertion failed: "Computed __func__ length differs from type!"
Reworked PredefinedExpr representation with internal StringLiteral field for function declaration.
Differential Revision: http://reviews.llvm.org/D5365

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

10 years ago[OPENMP] 'omp teams' directive basic support.
Alexey Bataev [Thu, 9 Oct 2014 04:18:56 +0000 (04:18 +0000)]
[OPENMP] 'omp teams' directive basic support.
Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive.

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

10 years agoReplace a destructor of EHCleanupScope with a Destroy() method to reflect the current...
Kostya Serebryany [Wed, 8 Oct 2014 18:31:54 +0000 (18:31 +0000)]
Replace a destructor of EHCleanupScope with a Destroy() method to reflect the current usage.

Summary:
The current code uses memset to re-initialize EHCleanupScope objects
with breaks the assumptions of the upcoming asan's intra-object-overflow checker.
If there is no DTOR, the new checker will refuse to work.

Test Plan: bootstrap with asan

Reviewers: rnk

Reviewed By: rnk

Subscribers: cfe-commits

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

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

10 years agoAdded new headers to CMakeLists.txt.
Robert Khasanov [Wed, 8 Oct 2014 17:37:51 +0000 (17:37 +0000)]
Added new headers to CMakeLists.txt.
Fix for rev219319

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

10 years agoms-inline-asm: Correctly mark MS inline ASM labels as used
Ehsan Akhgari [Wed, 8 Oct 2014 17:28:34 +0000 (17:28 +0000)]
ms-inline-asm: Correctly mark MS inline ASM labels as used

Summary: This fixes PR21155.

Test Plan: The patch includes a test.

Reviewers: rnk

Subscribers: cfe-commits

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

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

10 years ago[AVX512] Added VPCMPEQ intrinisics to headers.
Robert Khasanov [Wed, 8 Oct 2014 17:18:13 +0000 (17:18 +0000)]
[AVX512] Added VPCMPEQ intrinisics to headers.
Added tests.

Patch by Maxim Blumenthal <maxim.blumenthal@intel.com>

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

10 years agoFixed OpenMP/parallel_firstprivate_codegen.cpp
Alexey Bataev [Wed, 8 Oct 2014 15:39:06 +0000 (15:39 +0000)]
Fixed OpenMP/parallel_firstprivate_codegen.cpp
Fixed compatibility issues on ARM.

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

10 years agoFix test OpenMP/parallel_firstprivate_codegen.cpp
Alexey Bataev [Wed, 8 Oct 2014 14:34:59 +0000 (14:34 +0000)]
Fix test OpenMP/parallel_firstprivate_codegen.cpp
Fixed compatibility issues with MSVC mode and ARM target.

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

10 years agoRevert "Remove threshold on object size for inserting lifetime begin / end"
Arnaud A. de Grandmaison [Wed, 8 Oct 2014 14:04:26 +0000 (14:04 +0000)]
Revert "Remove threshold on object size for inserting lifetime begin / end"

Revert this patch while I investigate some sanitizer failures off-line.

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