]> granicus.if.org Git - clang/log
clang
8 years agoSema: Treat 'strict' availability flag like unavailable
Duncan P. N. Exon Smith [Tue, 8 Mar 2016 06:12:54 +0000 (06:12 +0000)]
Sema: Treat 'strict' availability flag like unavailable

This is a follow-up to r261512, which made the 'strict' availability
attribute flag behave like 'unavailable'.  However, that fix was
insufficient.  The following case would (erroneously) error when the
deployment target was older than 10.9:

    struct __attribute__((availability(macosx,strict,introduced=10.9))) A;
    __attribute__((availability(macosx,strict,introduced=10.9))) void f(A*);

The use of A* in the argument list for f is valid here, since f and A
have the same availability.

The fix is to return AR_Unavailable from DeclBase::getAvailability
instead of AR_NotYetIntroduced.  This also reverts the special handling
added in r261163, instead relying on the well-tested logic for
AR_Unavailable.

rdar://problem/23791325

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

8 years agoAdd doxygen comments to bmiintrin.h's intrinsics.
Ekaterina Romanova [Tue, 8 Mar 2016 01:36:59 +0000 (01:36 +0000)]
Add doxygen comments to bmiintrin.h's intrinsics.
The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.

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

8 years ago[analyzer] Fix missed leak from MSVC specific allocation functions
Anna Zaks [Tue, 8 Mar 2016 01:21:51 +0000 (01:21 +0000)]
[analyzer] Fix missed leak from MSVC specific allocation functions

Add the wide character strdup variants (wcsdup, _wcsdup) and the MSVC
version of alloca (_alloca) and other differently named function used
by the Malloc checker.

A patch by Alexander Riccio!

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

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

8 years agoUse class="svn" for features with SVN status.
Richard Smith [Tue, 8 Mar 2016 00:45:37 +0000 (00:45 +0000)]
Use class="svn" for features with SVN status.

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

8 years agoMove [[nodiscard]] tests into test/CXX tree.
Richard Smith [Tue, 8 Mar 2016 00:44:49 +0000 (00:44 +0000)]
Move [[nodiscard]] tests into test/CXX tree.

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

8 years agoDefine __has_cpp_attribute(fallthrough) to a more reasonable value. (What year is...
Richard Smith [Tue, 8 Mar 2016 00:40:32 +0000 (00:40 +0000)]
Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What year is it?!)

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

8 years agoAdd accidentally forgotten testcase from r262881.
Richard Smith [Tue, 8 Mar 2016 00:34:49 +0000 (00:34 +0000)]
Add accidentally forgotten testcase from r262881.

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

8 years agoP0188R1: add support for standard [[fallthrough]] attribute. This is almost
Richard Smith [Tue, 8 Mar 2016 00:32:55 +0000 (00:32 +0000)]
P0188R1: add support for standard [[fallthrough]] attribute. This is almost
exactly the same as clang's existing [[clang::fallthrough]] attribute, which
has been updated to have the same semantics. The one significant difference
is that [[fallthrough]] is ill-formed if it's not used immediately before a
switch label (even when -Wimplicit-fallthrough is disabled). To support that,
we now build a CFG of any function that uses a '[[fallthrough]];' statement
to check.

In passing, fix some bugs with our support for statement attributes -- in
particular, diagnose their use on declarations, rather than asserting.

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

8 years agoImplement support for [[nodiscard]] in C++1z that is based off existing support for...
Aaron Ballman [Mon, 7 Mar 2016 22:44:55 +0000 (22:44 +0000)]
Implement support for [[nodiscard]] in C++1z that is based off existing support for warn_unused_result, and treat it as an extension pre-C++1z. This also means extending the existing warn_unused_result attribute so that it can be placed on an enum as well as a class.

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

8 years agoModule Debugging: Fix a crash when emitting debug info for nested tag types
Adrian Prantl [Mon, 7 Mar 2016 20:58:52 +0000 (20:58 +0000)]
Module Debugging: Fix a crash when emitting debug info for nested tag types
whose DeclContext is not yet complete by deferring their emission.

rdar://problem/24918680

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

8 years ago[CLANG][AVX512][BUILTIN] Add builtin vcomi{ss|sd}
Michael Zuckerman [Mon, 7 Mar 2016 19:15:00 +0000 (19:15 +0000)]
[CLANG][AVX512][BUILTIN] Add builtin vcomi{ss|sd}

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

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

8 years agopython binding: expose compile command filename
Guillaume Papin [Mon, 7 Mar 2016 18:44:42 +0000 (18:44 +0000)]
python binding: expose compile command filename

Reviewers: compnerd, skalinichev

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

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

8 years ago[ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag...
Marina Yatsina [Mon, 7 Mar 2016 18:10:25 +0000 (18:10 +0000)]
[ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag with curly braces

Until now curly braces could only be used in MS inline assembly to mark block start/end.
All curly braces were removed completely at a very early stage.
This approach caused bugs like:
"m{o}v eax, ebx" turned into "mov eax, ebx" without any error.

In addition, AVX-512 added special operands (e.g., k registers), which are also surrounded by curly braces that mark them as such.
Now, we need to keep the curly braces and identify at a later stage if they are marking block start/end (if so, ignore them), or surrounding special AVX-512 operands (if so, parse them as such).

This patch fixes the bug described above and enables the use of AVX-512 special operands.

This commit is the the clang part of the patch.
The clang part of the review is: http://reviews.llvm.org/D17766
The llvm part of the review is: http://reviews.llvm.org/D17767

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

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

8 years agoImplement __builtin_eh_return_data_regno for SPARC and SPARC64.
Joerg Sonnenberger [Mon, 7 Mar 2016 17:19:15 +0000 (17:19 +0000)]
Implement __builtin_eh_return_data_regno for SPARC and SPARC64.

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

8 years agoDescribe the magic numbers returned by getEHDataRegisterNumber.
Joerg Sonnenberger [Mon, 7 Mar 2016 17:18:41 +0000 (17:18 +0000)]
Describe the magic numbers returned by getEHDataRegisterNumber.

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

8 years ago[CLANG][AVX512][BUILTIN] Adding new feature flag headed files and new BUILTIN vpermi2...
Michael Zuckerman [Mon, 7 Mar 2016 17:04:11 +0000 (17:04 +0000)]
[CLANG][AVX512][BUILTIN] Adding new feature flag headed files and new BUILTIN vpermi2varq{i|t}{128|256|512}{mask|maskz}

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

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

8 years ago[OPENMP] Codegen for distribute directive: fix bug in ordering of parameters.
Carlo Bertolli [Mon, 7 Mar 2016 16:19:13 +0000 (16:19 +0000)]
[OPENMP] Codegen for distribute directive: fix bug in ordering of parameters.

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

8 years agoReapply r262741 [OPENMP] Codegen for distribute directive
Carlo Bertolli [Mon, 7 Mar 2016 16:04:49 +0000 (16:04 +0000)]
Reapply r262741 [OPENMP] Codegen for distribute directive

This patch provide basic implementation of codegen for teams directive, excluding all clauses except dist_schedule. It also fixes parts of AST reader/writer to enable correct pre-compiled header handling.

http://reviews.llvm.org/D17170

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

8 years agoResolved Bug 26414.
Amjad Aboud [Mon, 7 Mar 2016 14:22:46 +0000 (14:22 +0000)]
Resolved Bug 26414.
https://llvm.org/bugs/show_bug.cgi?id=26414
Since interrupt handler must be returned with iret, tail call can't be used.

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

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

8 years ago[CLANG][AVX512][BUILTIN] Adding new feature flag header file and new builtin vpmadd52...
Michael Zuckerman [Mon, 7 Mar 2016 09:55:55 +0000 (09:55 +0000)]
[CLANG][AVX512][BUILTIN] Adding new feature flag header file and new builtin vpmadd52{h|l}uq{128|256|512}{mask|maskz}

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

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

8 years ago[MS ABI] Mangle symbols names longer than 4096 characters correctly
David Majnemer [Mon, 7 Mar 2016 08:51:17 +0000 (08:51 +0000)]
[MS ABI] Mangle symbols names longer than 4096 characters correctly

Really long symbols are hashed using MD5 and prefixed/suffixed with the
usual sigils.  There is an additional reason beyond the usual
compatibility with MSVC, it is important to keep COFF symbols shorter
than 0xFFFF because the CodeView debugging format has a maximum
symbol/record size of 0xFFFF.

There are some quirks worth noting:
- Some mangled names reference other entities which are mangled
separately.  A quick example:

int I;
template <int *> struct S {};
S<I> s;

In this case, the mangling for 's' doesn't depend directly on the
mangling for 'I'.  While 's' would need an MD5 hash if 'I' also needed
one, the hash for 's' applied to the fully realized mangled name.  In
other words, the mangled name for 's' will not depend on the MD5 of the
mangled name for 'I'.

- Some mangled names, like the venerable CatchableType, embed the MD5
verbatim.

- Finally, the complete object locator is handled as a special case.
A complete object locators are mangled exactly like a VFTable except for
a small deviation in the prefix sigils.  However, complete object
locators for hashed vftables result in a complete object locator whose
name is identical to the vftable except for an additional suffix.

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

8 years ago[CLANG][AVX512][BUILTIN] Adding vpmultishiftqb{128|256|512}
Michael Zuckerman [Mon, 7 Mar 2016 08:29:10 +0000 (08:29 +0000)]
[CLANG][AVX512][BUILTIN] Adding vpmultishiftqb{128|256|512}

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

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

8 years ago[ASTMatchers] Document that isAnyPointer() matcher also matches Objective-C object...
Felix Berger [Sun, 6 Mar 2016 15:27:59 +0000 (15:27 +0000)]
[ASTMatchers] Document that isAnyPointer() matcher also matches Objective-C object pointers.

Summary: Add test for Objective-C object pointer matching.

Reviewers: aaron.ballman

Subscribers: klimek

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

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

8 years ago[Modules] Don't swallow errors when parsing optional attributes.
Davide Italiano [Sun, 6 Mar 2016 04:20:05 +0000 (04:20 +0000)]
[Modules] Don't swallow errors when parsing optional attributes.

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

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

8 years agoFixed -Wdocumentation warning - typo in a parameter name
Simon Pilgrim [Sat, 5 Mar 2016 22:35:55 +0000 (22:35 +0000)]
Fixed -Wdocumentation warning - typo in a parameter name

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

8 years agoMisc: add a test for TargetParser usage
Saleem Abdulrasool [Sat, 5 Mar 2016 21:12:33 +0000 (21:12 +0000)]
Misc: add a test for TargetParser usage

Ensure that an invalid value passed to target parser does not cause an assertion
in +Asserts builds.

Supporting test for PR26839.

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

8 years agoclang-format: [JS] Support destructuring assignments in for loops.
Daniel Jasper [Sat, 5 Mar 2016 18:34:26 +0000 (18:34 +0000)]
clang-format: [JS] Support destructuring assignments in for loops.

Before:
  for (let { a, b } of x) {
  }

After:
  for (let {a, b} of x) {
  }

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

8 years ago[X86] AMD Bobcat CPU (btver1) doesn't support XSAVE
Simon Pilgrim [Sat, 5 Mar 2016 14:35:44 +0000 (14:35 +0000)]
[X86] AMD Bobcat CPU (btver1) doesn't support XSAVE

btver1 is a SSSE3/SSE4a only CPU - it doesn't have AVX and doesn't support XSAVE.

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

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

8 years agoAdd null check to diagnostic path for lambda captures.
Richard Trieu [Sat, 5 Mar 2016 04:04:57 +0000 (04:04 +0000)]
Add null check to diagnostic path for lambda captures.

Previously, the failed capture of a variable in nested lambdas may crash when
the lambda pointer is null.  Only give the note if a location can be retreived
from the lambda pointer.

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

8 years agoTest commit: Fix run-on sentence in comment
Mike Spertus [Sat, 5 Mar 2016 01:56:07 +0000 (01:56 +0000)]
Test commit: Fix run-on sentence in comment

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

8 years ago[analyzer] Nullability: add option to not report on calls to system headers.
Devin Coughlin [Sat, 5 Mar 2016 01:32:43 +0000 (01:32 +0000)]
[analyzer] Nullability: add option to not report on calls to system headers.

Add an -analyzer-config 'nullability:NoDiagnoseCallsToSystemHeaders' option to
the nullability checker. When enabled, this option causes the analyzer to not
report about passing null/nullable values to functions and methods declared
in system headers.

This option is motivated by the observation that large projects may have many
nullability warnings. These projects may find warnings about nullability
annotations that they have explicitly added themselves higher priority to fix
than warnings on calls to system libraries.

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

8 years agoUpdate diagnostics now that hexadecimal literals look likely to be part of C++17.
Richard Smith [Fri, 4 Mar 2016 22:32:06 +0000 (22:32 +0000)]
Update diagnostics now that hexadecimal literals look likely to be part of C++17.

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

8 years agoPR5941 - improve diagnostic for * vs & confusion when choosing overload candidate...
David Blaikie [Fri, 4 Mar 2016 22:29:11 +0000 (22:29 +0000)]
PR5941 - improve diagnostic for * vs & confusion when choosing overload candidate with a parameter of incomplete (ref or pointer) type

Reviewers: dblaikie

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

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

8 years agoclang-cl: Enable PCH flags by default.
Nico Weber [Fri, 4 Mar 2016 21:59:42 +0000 (21:59 +0000)]
clang-cl: Enable PCH flags by default.

Now that pragma comment and pragma detect_mismatch are implemented, this might
just work.

Some pragmas aren't serialized yet (from the top of my head: code_seg, bss_seg,
data_seg, const_seg, init_seg, section, vtordisp), but these are as far as I
know usually pushed and popped within the header and usually don't leak out.
If it turns out the current PCH support isn't good enough yet, we can turn it
off again.

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

8 years agoImplement P0036R0: remove support for empty unary folds of +, *, |, &.
Richard Smith [Fri, 4 Mar 2016 21:27:21 +0000 (21:27 +0000)]
Implement P0036R0: remove support for empty unary folds of +, *, |, &.

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

8 years agoRevert r262741 - [OPENMP] Codegen for distribute directive
Samuel Antao [Fri, 4 Mar 2016 21:02:14 +0000 (21:02 +0000)]
Revert r262741 - [OPENMP] Codegen for distribute directive

Was causing a failure in one of the buildbot slaves.

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

8 years agoUpdate cxx_status with likely new features from Jacksonville WG21 meeting.
Richard Smith [Fri, 4 Mar 2016 21:01:14 +0000 (21:01 +0000)]
Update cxx_status with likely new features from Jacksonville WG21 meeting.

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

8 years agoSwitch krait to use -mcpu=cortex-a15 for assembler tool invocations.
Stephen Hines [Fri, 4 Mar 2016 20:57:22 +0000 (20:57 +0000)]
Switch krait to use -mcpu=cortex-a15 for assembler tool invocations.

Summary:
Using -no-integrated-as causes -mcpu=krait to be transformed into
-march=armv7-a today. This precludes the assembler from using
instructions like sdiv, which are present for krait. Cortex-a15 is the
closest subset of functionality for krait, so we should switch the
assembler to use that instead.

Reviewers: cfe-commits, apazos, weimingz

Subscribers: aemerson

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

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

8 years ago[OPENMP] Codegen for distribute directive
Carlo Bertolli [Fri, 4 Mar 2016 20:24:58 +0000 (20:24 +0000)]
[OPENMP] Codegen for distribute directive

This patch provide basic implementation of codegen for teams directive, excluding all clauses except dist_schedule. It also fixes parts of AST reader/writer to enable correct pre-compiled header handling.

http://reviews.llvm.org/D17170

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

8 years agoMake TargetInfo store an actual DataLayout instead of a string.
James Y Knight [Fri, 4 Mar 2016 19:00:41 +0000 (19:00 +0000)]
Make TargetInfo store an actual DataLayout instead of a string.

Use it to calculate UserLabelPrefix, instead of specifying it (often
incorrectly).

Note that the *actual* user label prefix has always come from the
DataLayout, and is handled within LLVM. The main thing clang's
TargetInfo::UserLabelPrefix did was to set the #define value. Having
these be different from each-other is just silly.

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

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

8 years ago[analyzer] Add diagnostic in ObjCDeallocChecker for use of -dealloc instead of -release.
Devin Coughlin [Fri, 4 Mar 2016 18:09:58 +0000 (18:09 +0000)]
[analyzer] Add diagnostic in ObjCDeallocChecker for use of -dealloc instead of -release.

In dealloc methods, the analyzer now warns when -dealloc is called directly on
a synthesized retain/copy ivar instead of -release. This is intended to find mistakes of
the form:

- (void)dealloc {
  [_ivar dealloc]; // Mistaken call to -dealloc instead of -release

  [super dealloc];
}

rdar://problem/16227989

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

8 years agoMove class into anonymous namespace. NFC.
Benjamin Kramer [Fri, 4 Mar 2016 14:18:52 +0000 (14:18 +0000)]
Move class into anonymous namespace. NFC.

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

8 years ago[SemaExprCXX] Avoid calling isInSystemHeader for invalid source locations
Pavel Labath [Fri, 4 Mar 2016 10:00:08 +0000 (10:00 +0000)]
[SemaExprCXX] Avoid calling isInSystemHeader for invalid source locations

Summary:
While diagnosing a CXXNewExpr warning, we were calling isInSystemHeader(), which expect to be
called with a valid source location. This causes an assertion failure if the location is unknown.
A quick grep shows it's not without precedent to guard calls to the function with a
"Loc.isValid()".

This fixes a test failure in LLDB, which always creates object with invalid source locations as it
does not (always) have access to the source.

Reviewers: nlewycky

Subscribers: lldb-commits, cfe-commits

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

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

8 years ago[OPENMP 4.0] Codegen for 'declare reduction' construct.
Alexey Bataev [Fri, 4 Mar 2016 09:22:22 +0000 (09:22 +0000)]
[OPENMP 4.0] Codegen for 'declare reduction' construct.

Emit function for 'combiner' part of 'declare reduction' construct and
'initialilzer' part, if any.

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

8 years ago[Coverage] Fix the start/end locations of switch statements
Vedant Kumar [Fri, 4 Mar 2016 08:07:15 +0000 (08:07 +0000)]
[Coverage] Fix the start/end locations of switch statements

While pushing switch statements onto the region stack we neglected to
specify their start/end locations. This results in a crash (PR26825) if
we end up in nested macro expansions without enough information to
handle the relevant file exits.

I added a test in switchmacro.c and fixed up a bunch of incorrect CHECK
lines that specify strange end locations for switches.

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

8 years ago[OPENMP] Simplify handling of clauses with postupdates, NFC.
Alexey Bataev [Fri, 4 Mar 2016 07:21:16 +0000 (07:21 +0000)]
[OPENMP] Simplify handling of clauses with postupdates, NFC.

Clauses with post-update expressions always have pre-init statement. So
OMPClauseWithPreInit now is the base for OMPClauseWithPostUpdate.

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

8 years ago[index] Distinguish USRs of anonymous enums by using their first enumerator.
Argyrios Kyrtzidis [Fri, 4 Mar 2016 07:17:53 +0000 (07:17 +0000)]
[index] Distinguish USRs of anonymous enums by using their first enumerator.

rdar://24609949.

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

8 years ago[index] Include parameter types in the USRs for C functions marked with 'overloadable...
Argyrios Kyrtzidis [Fri, 4 Mar 2016 07:17:48 +0000 (07:17 +0000)]
[index] Include parameter types in the USRs for C functions marked with 'overloadable' attribute.

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

8 years ago[index] In ObjC++ handle objc type parameters for function USRs.
Argyrios Kyrtzidis [Fri, 4 Mar 2016 07:17:43 +0000 (07:17 +0000)]
[index] In ObjC++ handle objc type parameters for function USRs.

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

8 years ago[OpenCL] Refine pipe builtin support
Xiuli Pan [Fri, 4 Mar 2016 07:11:16 +0000 (07:11 +0000)]
[OpenCL] Refine pipe builtin support

Summary:
Refine the type builtin support as the request with
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160201/148637.html

Reviewers: pekka.jaaskelainen, Anastasia, yaxunl

Subscribers: rsmith, cfe-commits

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

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

8 years ago[MIPS] initFeatureMap() to handle empty string argument
Bhushan D. Attarde [Fri, 4 Mar 2016 06:56:29 +0000 (06:56 +0000)]
[MIPS] initFeatureMap() to handle empty string argument

    SUMMARY:
    This patch sets CPU string to its default value when it is not supplied by caller.

    Reviewers: vkalintiris, dsanders
    Subscribers: mohit.bhakkad, sagar, jaydeep, cfe-commits
    Differential Revision: http://reviews.llvm.org/D16139

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

8 years ago[X86] Pass __m64 types via SSE registers for GCC compatibility
David Majnemer [Fri, 4 Mar 2016 05:26:16 +0000 (05:26 +0000)]
[X86] Pass __m64 types via SSE registers for GCC compatibility

For compatibility with GCC, classify __m64 as SSE.
However, clang is a platform compiler for certain targets; retain our
old behavior on those targets: classify __m64 as integer.

This fixes PR26832.

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

8 years ago[VFS] Switch from close to SafelyCloseFileDescriptor
David Majnemer [Fri, 4 Mar 2016 05:26:14 +0000 (05:26 +0000)]
[VFS] Switch from close to SafelyCloseFileDescriptor

The SafelyCloseFileDescriptor machinery does the right thing in the face
of signals while close will do something platform specific which results
in the FD potentially getting leaked.

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

8 years ago[index] Ignore ObjCTypeParamDecls during indexing.
Argyrios Kyrtzidis [Fri, 4 Mar 2016 04:24:32 +0000 (04:24 +0000)]
[index] Ignore ObjCTypeParamDecls during indexing.

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

8 years ago[OPENMP] firstprivate and private clauses of teams, host codegeneration
Carlo Bertolli [Thu, 3 Mar 2016 22:09:40 +0000 (22:09 +0000)]
[OPENMP] firstprivate and private clauses of teams, host codegeneration

Add code generation support for firstprivate and private clauses of teams on the host. Add extensive regression tests including lambda functions and vla testing.

http://reviews.llvm.org/D17582

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

8 years ago[analyzer] ObjCDeallocChecker: Only check for nil-out when type is retainable.
Devin Coughlin [Thu, 3 Mar 2016 21:38:39 +0000 (21:38 +0000)]
[analyzer] ObjCDeallocChecker: Only check for nil-out when type is retainable.

This fixes a crash when setting a property of struct type in -dealloc.

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

8 years agoAdd code generation for teams directive inside target region
Carlo Bertolli [Thu, 3 Mar 2016 20:34:23 +0000 (20:34 +0000)]
Add code generation for teams directive inside target region

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

8 years ago[OpenCL] Improve diagnostics of address spaces for variables in function
Anastasia Stulova [Thu, 3 Mar 2016 18:38:40 +0000 (18:38 +0000)]
[OpenCL] Improve diagnostics of address spaces for variables in function

 - Prevent local variables to be declared in global AS
 - Diagnose AS of local variables with an extern storage class
   as if they would be in a program scope

Review: http://reviews.llvm.org/D17345

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

8 years agoclang-format: Use stable_sort when sorting #includes.
Daniel Jasper [Thu, 3 Mar 2016 17:34:14 +0000 (17:34 +0000)]
clang-format: Use stable_sort when sorting #includes.

Otherwise, clang-format can output useless replacements in the presence
of identical #includes

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

8 years ago[OpenMP] Code generation for teams - kernel launching
Samuel Antao [Thu, 3 Mar 2016 16:20:23 +0000 (16:20 +0000)]
[OpenMP] Code generation for teams - kernel launching

Summary:
This patch implements the launching of a target region in the presence of a nested teams region, i.e calls tgt_target_teams with the required arguments gathered from the enclosed teams directive.

The actual codegen of the region enclosed by the teams construct will be contributed in a separate patch.

Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev

Subscribers: cfe-commits, caomhin, fraggamuffin

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

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

8 years ago[ARM] Add Clang targeting for ARMv8-M Baseline/Mainline
Bradley Smith [Thu, 3 Mar 2016 13:52:22 +0000 (13:52 +0000)]
[ARM] Add Clang targeting for ARMv8-M Baseline/Mainline

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

8 years ago[CLANG][AVX512][BUILTIN] movddup{128|256|512}
Michael Zuckerman [Thu, 3 Mar 2016 13:43:05 +0000 (13:43 +0000)]
[CLANG][AVX512][BUILTIN] movddup{128|256|512}

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

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

8 years ago[OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0
Anastasia Stulova [Thu, 3 Mar 2016 13:33:19 +0000 (13:33 +0000)]
[OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

Applying the following restrictions for block types in OpenCL (v2.0 s6.12.5):
 - __block storage class is disallowed
 - every block declaration must be const qualified and initialized
 - a block can't be used as a return type of a function
 - a blocks can't be used to declare a structure or union field
 - extern speficier is disallowed

Corrected image and sampler types diagnostics with struct and unions.

Review: http://reviews.llvm.org/D16928

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

8 years agoFixing a checkfile error in avx512vlbw-builtins.c
Michael Zuckerman [Thu, 3 Mar 2016 12:17:50 +0000 (12:17 +0000)]
Fixing a checkfile error in avx512vlbw-builtins.c

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

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

8 years ago[CLANG][AVX512][BUILTIN] movdqu{qi|hi} {128|256|512}
Michael Zuckerman [Thu, 3 Mar 2016 11:34:52 +0000 (11:34 +0000)]
[CLANG][AVX512][BUILTIN] movdqu{qi|hi} {128|256|512}

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

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

8 years agoTweak CMakeLists not for libclang to depend on the variable CLANG_TOOL_EXTRA_BUILD.
NAKAMURA Takumi [Thu, 3 Mar 2016 11:09:43 +0000 (11:09 +0000)]
Tweak CMakeLists not for libclang to depend on the variable CLANG_TOOL_EXTRA_BUILD.

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

8 years ago[docs] Add missing file
Alexander Kornienko [Thu, 3 Mar 2016 10:44:10 +0000 (10:44 +0000)]
[docs] Add missing file

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

8 years ago[docs] Updated doxygen files to work well with doxygen 1.8.11
Alexander Kornienko [Thu, 3 Mar 2016 10:42:46 +0000 (10:42 +0000)]
[docs] Updated doxygen files to work well with doxygen 1.8.11

Doxygen 1.8.11 doesn't seem to like files with ".intro" extension by default.

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

8 years ago[CLANG][AVX512][BUILTIN] movdqa{32|64}{load|store|}{128|256|512}
Michael Zuckerman [Thu, 3 Mar 2016 09:26:01 +0000 (09:26 +0000)]
[CLANG][AVX512][BUILTIN] movdqa{32|64}{load|store|}{128|256|512}

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

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

8 years ago[libclang] Link clang-tidy plugin into libclang if present.
Benjamin Kramer [Thu, 3 Mar 2016 08:58:18 +0000 (08:58 +0000)]
[libclang] Link clang-tidy plugin into libclang if present.

This is a sad workaround for the lack of plugin support in libclang. Depends
on D17807, a tools-extra change that also contains the test case.

This is designed to be easy to remove again if libclang ever grows proper
plugin support.

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

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

8 years ago[Clang][AVX512][BUILTIN] Adding PSRL{W|WI}{128|256|512}
Michael Zuckerman [Thu, 3 Mar 2016 08:55:20 +0000 (08:55 +0000)]
[Clang][AVX512][BUILTIN] Adding PSRL{W|WI}{128|256|512}

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

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

8 years agoSemantic analysis for the swiftcall calling convention.
John McCall [Thu, 3 Mar 2016 06:39:32 +0000 (06:39 +0000)]
Semantic analysis for the swiftcall calling convention.

I've tried to keep the infrastructure behind parameter ABI
treatments fairly general.

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

8 years ago[index] Report references of ObjC super class/protocols in interfaces and protocols.
Argyrios Kyrtzidis [Thu, 3 Mar 2016 05:33:54 +0000 (05:33 +0000)]
[index] Report references of ObjC super class/protocols in interfaces and protocols.

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

8 years ago[test] Re-enable asan on the test, stack usage should be lower.
Argyrios Kyrtzidis [Thu, 3 Mar 2016 05:33:48 +0000 (05:33 +0000)]
[test] Re-enable asan on the test, stack usage should be lower.

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

8 years ago[OPENMP 4.0] Initial support for 'omp declare reduction' construct.
Alexey Bataev [Thu, 3 Mar 2016 05:21:39 +0000 (05:21 +0000)]
[OPENMP 4.0] Initial support for 'omp declare reduction' construct.

Add parsing, sema analysis and serialization/deserialization for 'declare reduction' construct.
User-defined reductions are defined as

#pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )]
These custom reductions may be used in 'reduction' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The
combiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will
denote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting
combined value after executing the combiner.
As the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause
will be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier
omp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced.
Differential Revision: http://reviews.llvm.org/D11182

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

8 years ago[OPENMP 4.5] Initial support for data members in 'linear' clause.
Alexey Bataev [Thu, 3 Mar 2016 03:52:24 +0000 (03:52 +0000)]
[OPENMP 4.5] Initial support for data members in 'linear' clause.

OpenMP 4.5 allows to privatize data members of current class in member
functions. Patch adds initial support for privatization of data members
in 'linear' clause, no codegen support.

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

8 years agoCaught and fixed a typo in r262572.
Sean Callanan [Thu, 3 Mar 2016 02:22:05 +0000 (02:22 +0000)]
Caught and fixed a typo in r262572.

I should have checked and imported D's in-class initializer.
Instead I accidentally used ToField's in-class initializer,
which is always NULL so ToField will never get one.

<rdar://problem/24943405>

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

8 years agoFixed a problem where the ASTImporter mishandled in-class initializers.
Sean Callanan [Thu, 3 Mar 2016 01:21:28 +0000 (01:21 +0000)]
Fixed a problem where the ASTImporter mishandled in-class initializers.

Previously, the ASTImporter, when copying a FieldDecl, would make the
new FieldDecl use the exact same in-class initializer as the original
FieldDecl, which is a problem since the initializer is in the wrong AST.
The initializer must be imported, just like all the other parts of the
field.

Doug Gregor reviewed this fix.

<rdar://problem/24943405>

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

8 years agoThis patch adds doxygen comments for all the intrinsincs in the header file tmmintrin.h.
Ekaterina Romanova [Thu, 3 Mar 2016 00:20:11 +0000 (00:20 +0000)]
This patch adds doxygen comments for all the intrinsincs in the header file tmmintrin.h.
The doxygen comments are automatically generated based on Sony's intrinsics document.

I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.

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

8 years agoSerialize `pragma pointers_to_members` state.
Nico Weber [Thu, 3 Mar 2016 00:17:35 +0000 (00:17 +0000)]
Serialize `pragma pointers_to_members` state.

Like r262539, but for pointers_to_members.

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

8 years agoImprove some infrastructure for extended parameter infos and
John McCall [Thu, 3 Mar 2016 00:10:03 +0000 (00:10 +0000)]
Improve some infrastructure for extended parameter infos and
fix a bug with the instantiation of ns_consumed parameter
attributes in ARC.

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

8 years agoclang-cl pch test: Instead of copying the input, use /Fp to not write into the test...
Nico Weber [Wed, 2 Mar 2016 23:29:29 +0000 (23:29 +0000)]
clang-cl pch test: Instead of copying the input, use /Fp to not write into the test directory.

Also fix a bug with /Fp and absolute paths uncovered by this.
Follow-up to r262487.

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

8 years agoSerialize `pragma ms_struct` state.
Nico Weber [Wed, 2 Mar 2016 23:22:00 +0000 (23:22 +0000)]
Serialize `pragma ms_struct` state.

pragma ms_struct has an effect on struct decls, and the effect is serialized
correctly already.  But the "is ms_struct currently on" state wasn't before
this change.

This uses the same approach as `pragma clang optimize`: When writing a module,
the state isn't serialized, only when writing a pch file.

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

8 years agoclang-format: [JS] Optionally re-quote string literals.
Daniel Jasper [Wed, 2 Mar 2016 22:44:03 +0000 (22:44 +0000)]
clang-format: [JS] Optionally re-quote string literals.

Turns "foo" into 'foo' (or vice versa, depending on configuration).
This makes it more convenient to follow the Google JavaScript style
guide:
https://google.github.io/styleguide/javascriptguide.xml?showone=Strings#Strings

This functionality is behind the option "JavaScriptQuotes", which can be:

  * "leave" (no re-quoting)
  * "single" (change to single quotes)
  * "double" (change to double quotes)

This also changes single quoted JavaScript string literals to be treated
as tok::string_literal, not tok::char_literal, which fixes two unrelated
tests.

Patch by Martin Probst. Thank you.

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

8 years ago[analyzer] Move ObjCSuperDeallocChecker out of the alpha package.
Devin Coughlin [Wed, 2 Mar 2016 22:01:03 +0000 (22:01 +0000)]
[analyzer] Move ObjCSuperDeallocChecker out of the alpha package.

It will now be on by default on Darwin.

rdar://problem/6953275

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

8 years ago[analyzer] Move ObjCDeallocChecker out of the alpha package.
Devin Coughlin [Wed, 2 Mar 2016 21:50:54 +0000 (21:50 +0000)]
[analyzer] Move ObjCDeallocChecker out of the alpha package.

It will now be on by default on Darwin.

rdar://problem/6927496

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

8 years ago[analyzer] Fix capitalization in ObjCSuperDeallocChecker diagnostic.
Devin Coughlin [Wed, 2 Mar 2016 21:22:48 +0000 (21:22 +0000)]
[analyzer] Fix capitalization in ObjCSuperDeallocChecker diagnostic.

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

8 years agoFixed test failure platforms with name mangling different from Linux.
Artem Belevich [Wed, 2 Mar 2016 21:03:20 +0000 (21:03 +0000)]
Fixed test failure platforms with name mangling different from Linux.
* Run cc with -triple x86_64-linux-gnu to make symbol mangling predictable.
* Use temporary file as a fake GPU input so its content
  does not interfere with pattern matching.

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

8 years ago[PGO] Change profile use cc1 option to handle IR level profiles
Rong Xu [Wed, 2 Mar 2016 20:59:36 +0000 (20:59 +0000)]
[PGO] Change profile use cc1 option to handle IR level profiles

This patch changes cc1 option for PGO profile use from
-fprofile-instr-use=<path> to -fprofile-instrument-use-path=<path>.
-fprofile-instr-use=<path> is now a driver only option.

In addition to decouple the cc1 option from the driver level option, this patch
also enables IR level profile use. cc1 option handling now reads the profile
header and sets CodeGenOpt ProfileUse (valid values are {None, Clang, LLVM}
-- this is a common enum for -fprofile-instrument={}, for the profile
instrumentation), and invoke the pipeline to enable the respective PGO use pass.

Reviewers: silvas, davidxl

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

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

8 years agofix test from r262506
Nico Weber [Wed, 2 Mar 2016 19:38:24 +0000 (19:38 +0000)]
fix test from r262506

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

8 years agoSerialize `#pragma detect_mismatch`.
Nico Weber [Wed, 2 Mar 2016 19:28:54 +0000 (19:28 +0000)]
Serialize `#pragma detect_mismatch`.

This is like r262493, but for pragma detect_mismatch instead of pragma comment.
The two pragmas have similar behavior, so use the same approach for both.

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

8 years ago[libFuzzer] allow -fsanitize-coverage=0 (disables all coverage)
Kostya Serebryany [Wed, 2 Mar 2016 19:16:54 +0000 (19:16 +0000)]
[libFuzzer] allow -fsanitize-coverage=0 (disables all coverage)

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

8 years ago[CUDA] Do not generate unnecessary runtime init code.
Artem Belevich [Wed, 2 Mar 2016 18:28:53 +0000 (18:28 +0000)]
[CUDA] Do not generate unnecessary runtime init code.

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

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

8 years ago[CUDA] Emit host-side 'shadows' for device-side global variables
Artem Belevich [Wed, 2 Mar 2016 18:28:50 +0000 (18:28 +0000)]
[CUDA] Emit host-side 'shadows' for device-side global variables

... and register them with CUDA runtime.

This is needed for commonly used cudaMemcpy*() APIs that use address of
host-side shadow to access their counterparts on device side.

Fixes PR26340

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

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

8 years agoSerialize `#pragma comment`.
Nico Weber [Wed, 2 Mar 2016 17:28:48 +0000 (17:28 +0000)]
Serialize `#pragma comment`.

`#pragma comment` was handled by Sema calling a function on ASTConsumer, and
CodeGen then implementing this function and writing things to its output.

Instead, introduce a PragmaCommentDecl AST node and hang one off the
TranslationUnitDecl for every `#pragma comment` line, and then use the regular
serialization machinery. (Since PragmaCommentDecl has codegen relevance, it's
eagerly deserialized.)

http://reviews.llvm.org/D17799

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

8 years agotest/Driver/cl-pch-errorhandling.cpp: Copy input file to a temporary
Daniel Jasper [Wed, 2 Mar 2016 14:26:59 +0000 (14:26 +0000)]
test/Driver/cl-pch-errorhandling.cpp: Copy input file to a temporary
location as we cannot assume the location of the input file to be
writable.

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding PSRA{W|WI}{128|256|512}.
Michael Zuckerman [Wed, 2 Mar 2016 12:06:06 +0000 (12:06 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding PSRA{W|WI}{128|256|512}.

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

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

8 years ago[CLANG] [AVX512] [BUILTIN] Adding PSRAV
Michael Zuckerman [Wed, 2 Mar 2016 09:05:46 +0000 (09:05 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding PSRAV

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

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

8 years ago[Sema] PR26444 fix crash when alignment value is >= 2**16
David Majnemer [Wed, 2 Mar 2016 06:48:47 +0000 (06:48 +0000)]
[Sema] PR26444 fix crash when alignment value is >= 2**16

Sema allows max values up to 2**28, use unsigned instead of unsiged
short to hold values that large.

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

Patch by Don Hinton!

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

8 years ago[modules] addHeaderInclude() can't fail.
Davide Italiano [Wed, 2 Mar 2016 06:09:18 +0000 (06:09 +0000)]
[modules] addHeaderInclude() can't fail.

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

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