]> granicus.if.org Git - clang/log
clang
8 years agoFix documentation bot after r272656
Adam Nemet [Tue, 14 Jun 2016 19:33:16 +0000 (19:33 +0000)]
Fix documentation bot after r272656

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

8 years ago[perf-training] Ignore 'Profile Note' warnings from the runtime
Vedant Kumar [Tue, 14 Jun 2016 19:06:48 +0000 (19:06 +0000)]
[perf-training] Ignore 'Profile Note' warnings from the runtime

After r272599, -DLLVM_BUILD_INSTRUMENTED passes a default argument to
-fprofile-instr-generate. This confuses the perf-helper script because
the runtime emits a note stating that the default is overridden by the
LLVM_PROFILE_FILE environment variable.

Change the perf-helper script s.t it does not treat these notes as
failures.

This isn't a strictly NFC change, but I don't see a simple way to add a
test for it.

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

8 years ago[clang-format] do not add existing includes.
Eric Liu [Tue, 14 Jun 2016 14:09:21 +0000 (14:09 +0000)]
[clang-format] do not add existing includes.

Summary: do not add existing includes.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoclang-format: [JS] Fix failing format with TypeScript casts.
Daniel Jasper [Tue, 14 Jun 2016 13:54:38 +0000 (13:54 +0000)]
clang-format: [JS] Fix failing format with TypeScript casts.

Before, this could be formatted at all (with BracketAlignmentStyle
AlwaysBreak):

  foo = <Bar[]>[
    1, /* */
    2
  ];

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

8 years ago[Clang][avx512][Intrinsics] adding prefetch gather intrinsics
Michael Zuckerman [Tue, 14 Jun 2016 13:45:17 +0000 (13:45 +0000)]
[Clang][avx512][Intrinsics] adding prefetch gather intrinsics

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

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

8 years agoStart adding support for Musl.
Rafael Espindola [Tue, 14 Jun 2016 12:47:24 +0000 (12:47 +0000)]
Start adding support for Musl.

The two patches together enable clang to support targets like
"x86_64-pc-linux-musl" and build binaries against musl-libc instead of
glibc. This make it easy for clang to work on some musl-based systems
like Alpine Linux and certain flavors of Gentoo.

Patch by Lei Zhang.

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

8 years ago[Clang][AVX512][intrinsics] Adding missing intrinsics div_pd and div_ps
Michael Zuckerman [Tue, 14 Jun 2016 12:38:58 +0000 (12:38 +0000)]
[Clang][AVX512][intrinsics] Adding missing intrinsics div_pd and div_ps

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

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

8 years agoAdd loop pragma for Loop Distribution
Adam Nemet [Tue, 14 Jun 2016 12:04:26 +0000 (12:04 +0000)]
Add loop pragma for Loop Distribution

Summary:
This is similar to other loop pragmas like 'vectorize'.  Currently it
only has state values: distribute(enable) and distribute(disable).  When
one of these is specified the corresponding loop metadata is generated:

  !{!"llvm.loop.distribute.enable", i1 true/false}

As a result, loop distribution will be attempted on the loop even if
Loop Distribution in not enabled globally.  Analogously, with 'disable'
distribution can be turned off for an individual loop even when the pass
is otherwise enabled.

There are some slight differences compared to the existing loop pragmas.

1. There is no 'assume_safety' variant which makes its handling slightly
different from 'vectorize'/'interleave'.

2. Unlike the existing loop pragmas, it does not have a corresponding
numeric pragma like 'vectorize' -> 'vectorize_width'.  So for the
consistency checks in CheckForIncompatibleAttributes we don't need to
check it against other pragmas.  We just need to check for duplicates of
the same pragma.

Reviewers: rsmith, dexonsmith, aaron.ballman

Subscribers: bob.wilson, cfe-commits, hfinkel

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

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

8 years agoclang-format: [JS] Support annotated classes.
Daniel Jasper [Tue, 14 Jun 2016 11:28:02 +0000 (11:28 +0000)]
clang-format: [JS] Support annotated classes.

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

8 years agoReverting "Warn when taking address of a packed member"
Roger Ferrer Ibanez [Tue, 14 Jun 2016 11:20:07 +0000 (11:20 +0000)]
Reverting "Warn when taking address of a packed member"

This new diagnostic is causing some false positives that have to be addressed.

This reverts commit 272552

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

8 years ago[mips] Defer validity check for CPU/ABI pairs and improve error message for invalid...
Daniel Sanders [Tue, 14 Jun 2016 08:58:50 +0000 (08:58 +0000)]
[mips] Defer validity check for CPU/ABI pairs and improve error message for invalid cases.

Summary:
The validity of ABI/CPU pairs is no longer checked on the fly but is
instead checked after initialization. As a result, invalid CPU/ABI pairs
can be reported as being known but invalid instead of being unknown. For
example, we now emit:
  error: ABI 'n32' is not supported on CPU 'mips32r2'
instead of:
  error: unknown target ABI 'n64'

Reviewers: atanasyan

Subscribers: sdardis, cfe-commits

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

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

8 years agoFix PR28100 - Allow redeclarations of deleted explicit specializations.
Faisal Vali [Tue, 14 Jun 2016 03:23:15 +0000 (03:23 +0000)]
Fix PR28100 - Allow redeclarations of deleted explicit specializations.

See https://llvm.org/bugs/show_bug.cgi?id=28100.

In r266561 when I implemented allowing explicit specializations of function templates to override deleted status, I mistakenly assumed (and hence introduced a violable assertion) that when an explicit specialization was being declared, the corresponding specialization of the most specialized function template that it would get linked to would always be the one that was implicitly generated - and so if it was marked as 'deleted' it must have inherited it from the primary template and so should be safe to reset its deleted status, and set it to being an explicit specialization.  Obviously during redeclaration of a deleted explicit specialization, in order to avoid a recursive reset, we need to check that the previous specialization is not an explicit specialization (instead of assuming and asserting it) and that it hasn't been referenced, and so only then is it safe to reset its 'deleted' status.

All regression tests pass.

Thanks to Zhendong Su for reporting the bug and David Majnemer for tracking it to my commit r266561, and promptly bringing it to my attention.

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

8 years ago[Parser] Handle __pragma(pack, etc. after type definitions
David Majnemer [Tue, 14 Jun 2016 03:20:28 +0000 (03:20 +0000)]
[Parser] Handle __pragma(pack, etc. after type definitions

Support certain MS pragmas right after the closing curly brace of a
class.  Clang did not expect __pragma in this position.

This fixes PR28094.

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

8 years agoDetect recursive default argument definition
Serge Pavlov [Tue, 14 Jun 2016 02:55:56 +0000 (02:55 +0000)]
Detect recursive default argument definition

If definition of default function argument uses itself, clang crashed,
because corresponding function parameter is not associated with the default
argument yet. With this fix clang emits appropriate error message.

This change fixes PR28105.

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

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

8 years agoRemove stray semi-colon in *.py file, NFC
Vedant Kumar [Tue, 14 Jun 2016 01:14:50 +0000 (01:14 +0000)]
Remove stray semi-colon in *.py file, NFC

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

8 years agoRemove nonsense and simplify. To forward a reference, we always just load the
Richard Smith [Tue, 14 Jun 2016 01:13:21 +0000 (01:13 +0000)]
Remove nonsense and simplify. To forward a reference, we always just load the
pointer-to-pointer representing the parameter. An aggregate rvalue representing
a pointer does not make sense.

We got away with this weirdness because CGCall happens to blindly load an
RValue in aggregate form in this case, without checking whether an RValue for
the type should be in scalar or aggregate form.

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

8 years agoAdd a test to ensure that pass_object_size is handled properly by a delegate constructor.
Richard Smith [Tue, 14 Jun 2016 00:48:35 +0000 (00:48 +0000)]
Add a test to ensure that pass_object_size is handled properly by a delegate constructor.

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

8 years ago[docs] Coverage: Document the profile merge pool specifier
Vedant Kumar [Tue, 14 Jun 2016 00:42:12 +0000 (00:42 +0000)]
[docs] Coverage: Document the profile merge pool specifier

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

8 years agoPatch for r272584 (http://reviews.llvm.org/rL272584) to address clang-x64-ninja-win7...
Taewook Oh [Mon, 13 Jun 2016 21:55:33 +0000 (21:55 +0000)]
Patch for r272584 (http://reviews.llvm.org/rL272584) to address clang-x64-ninja-win7 buildbot failure.

Patch by Eric Niebler

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

8 years ago[Parser] Only correct delayed typos when needed
Erik Pilkington [Mon, 13 Jun 2016 20:56:45 +0000 (20:56 +0000)]
[Parser] Only correct delayed typos when needed

ActOnBinOp corrects delayed typos when in C mode; don't correct them in that
case. Fixes PR26700.

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

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

8 years agoUse the name of the file on disk to issue a new diagnostic about non-portable #includ...
Taewook Oh [Mon, 13 Jun 2016 20:40:21 +0000 (20:40 +0000)]
Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths.

Differential Revision: http://reviews.llvm.org/D19843
Corresponding LLVM change: http://reviews.llvm.org/D19842

Re-commit of r272562 after addressing clang-x86-win2008-selfhost failure.

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

8 years agoclang-cl: Support -resource-dir option (PR28074)
Hans Wennborg [Mon, 13 Jun 2016 20:31:30 +0000 (20:31 +0000)]
clang-cl: Support -resource-dir option (PR28074)

It's useful e.g. for distributed build systems.

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

8 years agoAdd test for DR1359.
Richard Smith [Mon, 13 Jun 2016 19:04:44 +0000 (19:04 +0000)]
Add test for DR1359.

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

8 years agoTest fix -- use captured call result instead of hardcoded %2.
Artem Belevich [Mon, 13 Jun 2016 18:44:22 +0000 (18:44 +0000)]
Test fix -- use captured call result instead of hardcoded %2.

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

8 years agoRevert r272562 for build bot failure (clang-x86-win2008-selfhost)
Taewook Oh [Mon, 13 Jun 2016 18:32:30 +0000 (18:32 +0000)]
Revert r272562 for build bot failure (clang-x86-win2008-selfhost)

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

8 years ago[CUDA][OpenMP] Create generic offload toolchains
Samuel Antao [Mon, 13 Jun 2016 18:10:57 +0000 (18:10 +0000)]
[CUDA][OpenMP] Create generic offload toolchains

Summary:
This patch introduces the concept of offloading tool chain and offloading kind. Each tool chain may have associated an offloading kind that marks it as used in a given programming model that requires offloading.

It also adds the logic to iterate on the tool chains based on the kind. Currently, only CUDA is supported, but in general a programming model (an offloading kind) may have associated multiple tool chains that require supporting offloading.

This patch does not add tests - its goal is to keep the existing functionality.

This patch is the first of a series of three that attempts to make the current support of CUDA more generic and easier to extend to other programming models, namely OpenMP. It tries to capture the suggestions/improvements/concerns on the initial proposal in  http://lists.llvm.org/pipermail/cfe-dev/2016-February/047547.html. It only tackles the more consensual part of the proposal, i.e.does not address the problem of intermediate files bundling yet.

Reviewers: ABataev, jlebar, echristo, hfinkel, tra

Subscribers: guansong, Hahnfeld, andreybokhanko, tcramer, mkuron, cfe-commits, arpith-jacob, carlo.bertolli, caomhin

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

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

8 years agoclang-format: [JS] Initialize new configuration value.
Martin Probst [Mon, 13 Jun 2016 17:50:10 +0000 (17:50 +0000)]
clang-format: [JS] Initialize new configuration value.

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

8 years agoCapture the resource directory and use it for subsequent checks.
Paul Robinson [Mon, 13 Jun 2016 17:41:05 +0000 (17:41 +0000)]
Capture the resource directory and use it for subsequent checks.
This is the same tactic used in linux-header-search.cpp.

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

8 years ago[immintrin] Reimplement _bit_scan_{forward,reverse}
David Majnemer [Mon, 13 Jun 2016 17:26:16 +0000 (17:26 +0000)]
[immintrin] Reimplement _bit_scan_{forward,reverse}

There is no need to use a target-specific intrinsic to implement
_bit_scan_forward or _bit_scan_reverse, reimplementing them using
generic intrinsics makes it more likely that the middle end will
understand what's going on.

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

8 years agoUse the name of the file on disk to issue a new diagnostic about non-portable #includ...
Taewook Oh [Mon, 13 Jun 2016 17:03:18 +0000 (17:03 +0000)]
Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths.

Differential Revision: http://reviews.llvm.org/D19843
Corresponding LLVM change: http://reviews.llvm.org/D19842

Re-commit after addressing issues with of generating too many warnings for Windows and asan test failures.

Patch by Eric Niebler

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

8 years agoclang-format: [JS] Indent namespaces in JavaScript/TS by default.
Martin Probst [Mon, 13 Jun 2016 16:41:28 +0000 (16:41 +0000)]
clang-format: [JS] Indent namespaces in JavaScript/TS by default.

Summary: There's no convention of avoiding the nested indentation.

Reviewers: djasper

Subscribers: klimek, alexeagle, cfe-commits

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

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

8 years agoclang-format: [JS] Introduce JavaScriptWrapImports option.
Martin Probst [Mon, 13 Jun 2016 16:39:50 +0000 (16:39 +0000)]
clang-format: [JS] Introduce JavaScriptWrapImports option.

Summary:
When turned on, clang-format wraps JavaScript imports (and importing exports),
instead of forcing the entire import statement onto one line.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoWarn when taking address of a packed member
Roger Ferrer Ibanez [Mon, 13 Jun 2016 15:41:40 +0000 (15:41 +0000)]
Warn when taking address of a packed member

This patch implements PR#22821.

Taking the address of a packed member is dangerous since the reduced
alignment of the pointee is lost. This can lead to memory alignment
faults in some architectures if the pointer value is dereferenced.

This change adds a new warning to clang emitted when taking the address
of a packed member. A packed member is either a field/data member
declared as attribute((packed)) or belonging to a struct/class
declared as such. The associated flag is -Waddress-of-packed-member

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

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

8 years ago[X86][AVX512F] bugfix - sqrtps should get __mask16 as mask parameter
Asaf Badouh [Mon, 13 Jun 2016 15:15:57 +0000 (15:15 +0000)]
[X86][AVX512F] bugfix - sqrtps should get __mask16 as mask parameter

CR: Michael Zuckerman

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

8 years agoclang-format: Restrict r272537 to function ref qualifiers.
Daniel Jasper [Mon, 13 Jun 2016 14:45:12 +0000 (14:45 +0000)]
clang-format: Restrict r272537 to function ref qualifiers.

Seems this isn't generally desirable.

Before:
  int const * a;

After:
  int const* a;

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

8 years agoFix unused variable warning
Simon Pilgrim [Mon, 13 Jun 2016 10:05:19 +0000 (10:05 +0000)]
Fix unused variable warning

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

8 years ago[Clang][X86] Convert non-temporal store builtins to generic __builtin_nontemporal_sto...
Simon Pilgrim [Mon, 13 Jun 2016 09:57:52 +0000 (09:57 +0000)]
[Clang][X86] Convert non-temporal store builtins to generic __builtin_nontemporal_store in headers

We can now use __builtin_nontemporal_store instead of target specific builtins for naturally aligned nontemporal stores which avoids the need for handling in CGBuiltin.cpp

The scalar integer nontemporal (unaligned) store builtins will have to wait as __builtin_nontemporal_store currently assumes natural alignment and doesn't accept the 'packed struct' trick that we use for normal unaligned load/stores.

The nontemporal loads require further backend support before we can safely convert them to __builtin_nontemporal_load

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

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

8 years agoclang-format: Fix incorrect function type detection.
Daniel Jasper [Mon, 13 Jun 2016 07:49:35 +0000 (07:49 +0000)]
clang-format: Fix incorrect function type detection.

Before:
  returnsFunction (&param1, &param2)(param);

After:
  returnsFunction(&param1, &param2)(param);

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

8 years agoclang-format: Don't merge const and &, e.g. in function ref qualifiers.
Daniel Jasper [Mon, 13 Jun 2016 07:49:28 +0000 (07:49 +0000)]
clang-format: Don't merge const and &, e.g. in function ref qualifiers.

Before (when aligning & to the right):
  SomeType MemberFunction(const Deleted &) const&;

After:
  SomeType MemberFunction(const Deleted &) const &;

This also applies to variable declarations, e.g.:
  int const * a;

However, this form is very uncommon (most people would write
"const int* a" instead) and contracting to "const*" might actually send
the wrong signal of what the const binds to.

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

8 years agoclang-format: Fix incorrect cast detection.
Daniel Jasper [Mon, 13 Jun 2016 07:49:09 +0000 (07:49 +0000)]
clang-format: Fix incorrect cast detection.

Before:
  auto s = sizeof...(Ts)-1;

After:
  auto s = sizeof...(Ts) - 1;

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

8 years agoclang-format: Don't indent lambda body relative to its return type.
Daniel Jasper [Mon, 13 Jun 2016 07:48:45 +0000 (07:48 +0000)]
clang-format: Don't indent lambda body relative to its return type.

Before:
  []()  //
      -> int {
        return 1;  //
      };

After:
  []()  //
      -> int {
    return 1;  //
  };

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

8 years agoMPIBugReporter.h: Fix a warning. [-Wdocumentation]
NAKAMURA Takumi [Mon, 13 Jun 2016 05:46:35 +0000 (05:46 +0000)]
MPIBugReporter.h: Fix a warning. [-Wdocumentation]

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

8 years ago[AVX512] Masked pcmpeqd, pcmpeqq, pcmpgtd, and pcmpgtq don't require avx512bw, just...
Craig Topper [Mon, 13 Jun 2016 04:15:11 +0000 (04:15 +0000)]
[AVX512] Masked pcmpeqd, pcmpeqq, pcmpgtd, and pcmpgtq don't require avx512bw, just avx512vl.

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

8 years agoImproved Visual Studio visualization of OpaquePtr
Mike Spertus [Mon, 13 Jun 2016 04:02:35 +0000 (04:02 +0000)]
Improved Visual Studio visualization of OpaquePtr

Create a special visualizer for OpaquePtr<QualType> because the
standard visualizer doesn't work with OpaquePtr<QualType>
due to QualType being heavily dependent on traits to be pointer-like.

Also, created an identical visualizer for UnionOpaquePtr

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

8 years ago[analyzer] Remove some list initialization from MPI Checker to make MSVC bots happy.
Devin Coughlin [Mon, 13 Jun 2016 03:58:58 +0000 (03:58 +0000)]
[analyzer] Remove some list initialization from MPI Checker to make MSVC bots happy.

This is a speculative attempt to fix the compiler error: "list initialization inside
member initializer list or non-static data member initializer is not implemented" with
r272529.

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

8 years ago[analyzer] Add checker to verify the correct usage of the MPI API
Devin Coughlin [Mon, 13 Jun 2016 03:22:41 +0000 (03:22 +0000)]
[analyzer] Add checker to verify the correct usage of the MPI API

This commit adds a static analysis checker to verify the correct usage of the MPI API in C
and C++. This version updates the reverted r271981 to fix a memory corruption found by the
ASan bots.

Three path-sensitive checks are included:
- Double nonblocking: Double request usage by nonblocking calls without intermediate wait
- Missing wait: Nonblocking call without matching wait.
- Unmatched wait: Waiting for a request that was never used by a nonblocking call

Examples of how to use the checker can be found at https://github.com/0ax1/MPI-Checker

A patch by Alexander Droste!

Reviewers: zaks.anna, dcoughlin

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

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

8 years agoclang-format: [JS] post-fix non-null assertion operator.
Martin Probst [Mon, 13 Jun 2016 00:49:54 +0000 (00:49 +0000)]
clang-format: [JS] post-fix non-null assertion operator.

Summary:
Do not insert whitespace preceding the "!" postfix operator. This is an
incomplete fix, but should cover common usage.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

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

8 years agoVisual Studio Visualizer for PackExpansionType
Mike Spertus [Sun, 12 Jun 2016 22:54:46 +0000 (22:54 +0000)]
Visual Studio Visualizer for PackExpansionType

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

8 years agoVisual Studio native visualizer for ParsedTemplateArgument
Mike Spertus [Sun, 12 Jun 2016 22:21:56 +0000 (22:21 +0000)]
Visual Studio native visualizer for ParsedTemplateArgument

Does a good job with type and non-type template arguments
and lays the groundwork for template template arguments to
visualize well once there is a TemplateName visualizer.
Also fixed what looks like an incorrect comment in the
header for ParsedTemplate.h.

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

8 years agoAdd some std::move where the value is only read otherwise.
Benjamin Kramer [Sun, 12 Jun 2016 20:05:23 +0000 (20:05 +0000)]
Add some std::move where the value is only read otherwise.

This mostly affects smart pointers. No functionality change intended.

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

8 years agoRudimentary support for Visual Studio Stmt visualizer
Mike Spertus [Sun, 12 Jun 2016 18:42:04 +0000 (18:42 +0000)]
Rudimentary support for Visual Studio Stmt visualizer

Better than nothing...

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

8 years ago[CodeGen] Update to use an ArrayRef of uint32_t instead of int in calls to CreateShuf...
Craig Topper [Sun, 12 Jun 2016 00:41:24 +0000 (00:41 +0000)]
[CodeGen] Update to use an ArrayRef of uint32_t instead of int in calls to CreateShuffleVector to match llvm interface change.

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

8 years ago[X86][BMI] Improved bmi intrinsics checks
Simon Pilgrim [Sat, 11 Jun 2016 22:40:01 +0000 (22:40 +0000)]
[X86][BMI] Improved bmi intrinsics checks

Ready for matching with llvm/test/CodeGen/X86/bmi-intrinsics-fast-isel.ll (to be added shortly)

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

8 years agoVisual Studio Visualizers for ActionResult, LocInfoType, and and TypeSourceInfo
Mike Spertus [Sat, 11 Jun 2016 20:15:19 +0000 (20:15 +0000)]
Visual Studio Visualizers for ActionResult, LocInfoType, and and TypeSourceInfo

Created a visualizer for ActionResult that displayed the validity and the pointer,
but many of them initially displayed poorly. It turns out that the primary culprit
is that LocInfoType is often passed in an action result, but it is not the same
as other types. For example, LocInfoType is not in TypeNodes.def and clang::Type::TypeClass
does not have a LocInfoType enum. After adding a special visualizer for LocInfoType,
the display was more useful

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

8 years agoFix cv-qualification of '*this' captures and nasty bug PR27507
Faisal Vali [Sat, 11 Jun 2016 16:41:54 +0000 (16:41 +0000)]
Fix cv-qualification of '*this' captures and nasty bug PR27507

The bug report by Gonzalo (https://llvm.org/bugs/show_bug.cgi?id=27507 -- which results in clang crashing when generic lambdas that capture 'this' are instantiated in contexts where the Functionscopeinfo stack is not in a reliable state - yet getCurrentThisType expects it to be) - unearthed some additional bugs in regards to maintaining proper cv qualification through 'this' when performing by value captures of '*this'.

This patch attempts to correct those bugs and makes the following changes:

   o) when capturing 'this', we do not need to remember the type of 'this' within the LambdaScopeInfo's Capture - it is never really used for a this capture - so remove it.
   o) teach getCurrentThisType to walk the stack of lambdas (even in scenarios where we run out of LambdaScopeInfo's such as when instantiating call operators) looking for by copy captures of '*this' and resetting the type of 'this' based on the constness of that capturing lambda's call operator.

This patch has been baking in review-hell for > 6 weeks - all the comments so far have been addressed and the bug (that it addresses in passing, and I regret not submitting as a separate patch initially) has been reported twice independently, so is frequent and important for us not to just sit on. I merged the cv qualification-fix and the PR-fix initially in one patch, since they resulted from my initial implementation of star-this and so were related. If someone really feels strongly, I can put in the time to revert this - separate the two out - and recommit.  I won't claim it's immunized against all bugs, but I feel confident enough about the fix to land it for now.

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

8 years ago[AVX512] Use a regular expression instead of checking for a specific name in a CHECK...
Craig Topper [Sat, 11 Jun 2016 13:35:43 +0000 (13:35 +0000)]
[AVX512] Use a regular expression instead of checking for a specific name in a CHECK line in test.

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

8 years ago[AVX512] Implement masked and 512-bit pshufd intrinsics directly with __builtin_shuff...
Craig Topper [Sat, 11 Jun 2016 12:50:19 +0000 (12:50 +0000)]
[AVX512] Implement masked and 512-bit pshufd intrinsics directly with __builtin_shufflevector and __builtin_ia32_select.

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

8 years ago[X86] Add explicit typecasts to some intrinsics.
Craig Topper [Sat, 11 Jun 2016 12:50:12 +0000 (12:50 +0000)]
[X86] Add explicit typecasts to some intrinsics.

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

8 years ago[clang-format] pass Style by reference instead of value.
Eric Liu [Sat, 11 Jun 2016 11:45:08 +0000 (11:45 +0000)]
[clang-format] pass Style by reference instead of value.

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

8 years agoFix this test to handle NDEBUG builds which don't have a name for the
Chandler Carruth [Sat, 11 Jun 2016 06:32:56 +0000 (06:32 +0000)]
Fix this test to handle NDEBUG builds which don't have a name for the
basic block.

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

8 years agoRevert "Strip Android version when looking up toolchain paths."
Chandler Carruth [Sat, 11 Jun 2016 04:57:29 +0000 (04:57 +0000)]
Revert "Strip Android version when looking up toolchain paths."

This reverts commit r272413. The tests here have been failing on several
different build bots for over 10 hours.

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

8 years agoRevert "[ASTMatchers] New forEachOverriden matcher."
Chandler Carruth [Sat, 11 Jun 2016 04:45:38 +0000 (04:45 +0000)]
Revert "[ASTMatchers] New forEachOverriden matcher."

This reverts commit r272386. It doesn't compile with MSVC and those bots
have been red the entire day as a consequence.

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

8 years ago[AVX512] Implement 512-bit and masked shufflelo and shufflehi intrinsics directly...
Craig Topper [Sat, 11 Jun 2016 03:31:13 +0000 (03:31 +0000)]
[AVX512] Implement 512-bit and masked shufflelo and shufflehi intrinsics directly with __builtin_shufflevector and __builtin_ia32_select. Also improve the formatting of the AVX2 version.

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

8 years ago[AVX512] Add _mm512_bsrli_epi128 and _mm512_bslli_epi128 intrinsics.
Craig Topper [Sat, 11 Jun 2016 03:31:07 +0000 (03:31 +0000)]
[AVX512] Add _mm512_bsrli_epi128 and _mm512_bslli_epi128 intrinsics.

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

8 years agoVisual Studio visualizers associated with LookupResults
Mike Spertus [Sat, 11 Jun 2016 03:02:33 +0000 (03:02 +0000)]
Visual Studio visualizers associated with LookupResults

Visualizers for DeclAccessPair, UnresolvedSet, and LookupResult. For example,
when combined with LLVM diff D21256 (currently in review), a Lookup set will
show much more naturally in the Locals window something like

  Found: {public typename ...Ts}

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

8 years ago[Sema] Return an appropriate result from CheckSpecifiedExceptionType
David Majnemer [Sat, 11 Jun 2016 01:25:04 +0000 (01:25 +0000)]
[Sema] Return an appropriate result from CheckSpecifiedExceptionType

We shouldn't return true from CheckSpecifiedExceptionType if
the record type is incomplete and -fms-extensions is engaged.  Otherwise
we will have an incomplete AST.

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

8 years agoAdded missing close brace to OpaquePtr Visual Studio visualizer
Mike Spertus [Fri, 10 Jun 2016 22:25:43 +0000 (22:25 +0000)]
Added missing close brace to OpaquePtr Visual Studio visualizer

This syntax error resulted in garbage being appended to OpaquePtr visualizations

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

8 years agoRevise RenderScript attribute declaration
Pirama Arumuga Nainar [Fri, 10 Jun 2016 21:51:18 +0000 (21:51 +0000)]
Revise RenderScript attribute declaration

Summary:
Address post-patch comments to r272342.

- Rename the 'kernel' attribute's name
- Idiomatically restrict the attribute to the 'RenderScript' LangOpt.

Reviewers: aaron.ballman, rsmith

Subscribers: cfe-commits, srhines

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

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

8 years ago[-fms-extensions] Don't crash on explicit class-scope specializations & default arguments
David Majnemer [Fri, 10 Jun 2016 20:21:15 +0000 (20:21 +0000)]
[-fms-extensions] Don't crash on explicit class-scope specializations & default arguments

The code had a typo it was doing:
  Param->setUninstantiatedDefaultArg(Param->getUninstantiatedDefaultArg());

This is a no-op but may assert, we wanted to do:
  Param->setUninstantiatedDefaultArg(OldParam->getUninstantiatedDefaultArg());

This fixes PR28082.

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

8 years agoDriver: make it easier to select the SjLj EH model
Saleem Abdulrasool [Fri, 10 Jun 2016 20:12:00 +0000 (20:12 +0000)]
Driver: make it easier to select the SjLj EH model

GCC still permits enabling the SjLj EH model.  This is something which can be
done on various targets.  Hoist the -fsjlj-exceptions option into the driver and
pass it through.  This allows one to opt into the alternative EH model while
retaining the default to be the target's default.

Resolves PR27749!

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

8 years agoRemove a few gendered pronouns.
Nico Weber [Fri, 10 Jun 2016 18:53:04 +0000 (18:53 +0000)]
Remove a few gendered pronouns.

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

8 years agoStrip Android version when looking up toolchain paths.
Josh Gao [Fri, 10 Jun 2016 18:30:33 +0000 (18:30 +0000)]
Strip Android version when looking up toolchain paths.

Summary:
Android target triples can include a version number in the abi field
(e.g. 'aarch64-linux-android21'), used for checking for availability.
However, the driver was searching for toolchain binaries using the
passed in triple as a prefix.

Reviewers: srhines, danalbert, t.p.northover

Subscribers: t.p.northover, aemerson, tberghammer, danalbert, srhines, cfe-commits

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

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

8 years ago[-fms-extensions] Permit incomplete types in dynamic exception specifications
David Majnemer [Fri, 10 Jun 2016 18:24:41 +0000 (18:24 +0000)]
[-fms-extensions] Permit incomplete types in dynamic exception specifications

Microsoft headers, comdef.h and comutil.h, assume that this is an OK
thing to do.  Downgrade the hard error to a warning if we are in
-fms-extensions mode.

This fixes PR28080.

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

8 years agoThis patch fixes target linker emulation for ARM 32 big endian.
Strahinja Petrovic [Fri, 10 Jun 2016 16:09:20 +0000 (16:09 +0000)]
This patch fixes target linker emulation for ARM 32 big endian.

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

8 years agoPreallocate ExplodedNode hash table
Ben Craig [Fri, 10 Jun 2016 13:22:13 +0000 (13:22 +0000)]
Preallocate ExplodedNode hash table

Rehashing the ExplodedNode table is very expensive. The hashing
itself is expensive, and the general activity of iterating over the
hash table is highly cache unfriendly. Instead, we guess at the
eventual size by using the maximum number of steps allowed. This
generally avoids a rehash. It is possible that we still need to
rehash if the backlog of work that is added to the worklist
significantly exceeds the number of work items that we process. Even
if we do need to rehash in that scenario, this change is still a
win, as we still have fewer rehashes that we would have prior to
this change.

For small work loads, this will increase the memory used. For large
work loads, it will somewhat reduce the memory used. Speed is
significantly increased. A large .C file took 3m53.812s to analyze
prior to this change. Now it takes 3m38.976s, for a ~6% improvement.

http://reviews.llvm.org/D20933

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

8 years ago[ASTMatchers] New forEachOverriden matcher.
Clement Courbet [Fri, 10 Jun 2016 11:54:43 +0000 (11:54 +0000)]
[ASTMatchers] New forEachOverriden matcher.

Matches methods overridden by the given method.

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

8 years agotest commit: remove trailing whitespace in comments
Clement Courbet [Fri, 10 Jun 2016 08:12:37 +0000 (08:12 +0000)]
test commit: remove trailing whitespace in comments

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

8 years agoCheck for null pointers before calling the Stmt Profiler
Richard Trieu [Fri, 10 Jun 2016 04:52:09 +0000 (04:52 +0000)]
Check for null pointers before calling the Stmt Profiler

Some calls from OMPClauseProfiler were calling the Stmt Profiler with null
pointers, but the profiler can only handle non-null pointers.  Add an assert
to the VisitStmt for valid pointers, and check all calls from OMPClauseProfiler
to be non-null pointers.

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

8 years agoFix recognition of shadowed template parameter
Serge Pavlov [Fri, 10 Jun 2016 04:39:07 +0000 (04:39 +0000)]
Fix recognition of shadowed template parameter

Crash reported in PR28023 is caused by the fact that non-type template
parameters are found by tag name lookup.  In the code provided in that PR:

template<int V> struct A {
  struct B {
    template <int> friend struct V;
  };
};

the template parameter V is found when lookup for redeclarations of 'struct V'
is made. Latter on the error about shadowing of 'V' is emitted but the semantic
context of 'struct V' is already determined wrong: 'struct A' instead of
translation unit.

The fix moves the check for shadowing toward the beginning of the method and
thus prevents from wrong context calculations.

This change fixes PR28023.

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

8 years agoReduce sizeof(CXXConstructorDecl) by 4-8 bytes.
Richard Smith [Fri, 10 Jun 2016 02:01:28 +0000 (02:01 +0000)]
Reduce sizeof(CXXConstructorDecl) by 4-8 bytes.

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

8 years agoRemove CXXConstructExpr::getFoundDecl(); it turned out to not be useful.
Richard Smith [Fri, 10 Jun 2016 00:58:19 +0000 (00:58 +0000)]
Remove CXXConstructExpr::getFoundDecl(); it turned out to not be useful.

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

8 years agoAdd doxygen comments to mmintrin.h's intrinsics.
Ekaterina Romanova [Fri, 10 Jun 2016 00:10:40 +0000 (00:10 +0000)]
Add doxygen comments to mmintrin.h's intrinsics.

The doxygen comments are automatically generated based on Sony's intrinsics docu
ment.

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@272350 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRenderScript support in the Frontend
Pirama Arumuga Nainar [Thu, 9 Jun 2016 23:34:20 +0000 (23:34 +0000)]
RenderScript support in the Frontend

Summary:

Create a new Frontend LangOpt to specify the renderscript language. It
is enabled by the "-x renderscript" option from the driver.

Add a "kernel" function attribute only for RenderScript (an "ignored
attribute" warning is generated otherwise).

Make the NativeHalfType and NativeHalfArgsAndReturns LangOpts be implied
by the RenderScript LangOpt.

Reviewers: rsmith

Subscribers: cfe-commits, srhines

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

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

8 years agoclang-format: [JS] recognized named functions in AnnotatingParser.
Martin Probst [Thu, 9 Jun 2016 22:49:04 +0000 (22:49 +0000)]
clang-format: [JS] recognized named functions in AnnotatingParser.

Summary: This also fixes union type formatting in function parameter types.

Before: function x(path: number| string) {}
After: function x(path: number|string) {}

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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

8 years agoRedirect unused output in test to /dev/null
Richard Trieu [Thu, 9 Jun 2016 22:39:20 +0000 (22:39 +0000)]
Redirect unused output in test to /dev/null

Discard unused output so when the test fails, it only prints information that
is helpful about the failure.  No functional change.

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

8 years ago[CMake] Cleaning up CMake version checks in ExternalProject calls
Chris Bieneman [Thu, 9 Jun 2016 22:38:42 +0000 (22:38 +0000)]
[CMake] Cleaning up CMake version checks in ExternalProject calls

Now that we're on CMake 3.4.3 all the ExternalProject features we use are supported everywhere, so we don't need the version checks anymore.

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

8 years ago[CMake] Version is aways greater than 3
Chris Bieneman [Thu, 9 Jun 2016 22:38:40 +0000 (22:38 +0000)]
[CMake] Version is aways greater than 3

We don't need any checks for this code anymore. Since CMake version is always greater than 3 we can always generate the exports file.

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

8 years agoFix a crash in the AST dumper.
Richard Trieu [Thu, 9 Jun 2016 22:03:04 +0000 (22:03 +0000)]
Fix a crash in the AST dumper.

Boxed expressions in a template context may have a null method decl.  If so,
don't try to access the selector.

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

8 years agoAdd a RenderScript language type
Pirama Arumuga Nainar [Thu, 9 Jun 2016 21:57:40 +0000 (21:57 +0000)]
Add a RenderScript language type

Summary:
Add RenderScript language type and associate it with ".rs" extensions.
Test that the driver passes "-x renderscript" to the frontend for ".rs"
files.

(Also add '.rs' to the list of suffixes tested by lit).

Reviewers: rsmith

Subscribers: cfe-commits, srhines

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

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

8 years ago[CMake] Cleaning up CMake feature gating on 2.8.12
Chris Bieneman [Thu, 9 Jun 2016 21:29:55 +0000 (21:29 +0000)]
[CMake] Cleaning up CMake feature gating on 2.8.12

CMake 2.8.12 introduced interface libraries and some related policies. This removes the conditional block because we're now past 2.8.12.

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

8 years agoRevert "[Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr."
Tim Shen [Thu, 9 Jun 2016 21:13:39 +0000 (21:13 +0000)]
Revert "[Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr."

This reverts r272296, since there are clang-tidy failures that appear to
be caused by this change.

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

8 years ago[CUDA] Implement __shfl* intrinsics in clang headers.
Justin Lebar [Thu, 9 Jun 2016 20:04:57 +0000 (20:04 +0000)]
[CUDA] Implement __shfl* intrinsics in clang headers.

Summary: Clang changes to make use of the LLVM intrinsics added in D21160.

Reviewers: tra

Subscribers: jholewinski, cfe-commits

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

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

8 years ago[Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr.
Tim Shen [Thu, 9 Jun 2016 19:54:46 +0000 (19:54 +0000)]
[Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr.

These ExprWithCleanups are added for holding a RunCleanupsScope not
for destructor calls; rather, they are for lifetime marks. This requires
ExprWithCleanups to keep a bit to indicate whether it have cleanups with
side effects (e.g. dtor calls).

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

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

8 years agoRevert "[CMake] Fix an issue building out-of-tree introduced in r272200"
Chris Bieneman [Thu, 9 Jun 2016 17:24:16 +0000 (17:24 +0000)]
Revert "[CMake] Fix an issue building out-of-tree introduced in r272200"

This reverts r272275. This actually wasn't the right way to fix the problem. The correct solution is in r272279.

Applying the fix to LLVM as done in r272279, means this fix will get picked up by all projects building out of tree using LLVM's CMake modules. As opposed to the fix I had in r272275, which would require each project to change.

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

8 years ago[CMake] Fix an issue building out-of-tree introduced in r272200
Chris Bieneman [Thu, 9 Jun 2016 16:21:10 +0000 (16:21 +0000)]
[CMake] Fix an issue building out-of-tree introduced in r272200

The out-of-tree build needs to read LLVM_TOOLS_INSTALL_DIR out of TOOLS_BINARY_DIR because LLVM_TOOLS_INSTALL_DIR is used by AddLLVM.cmake

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

8 years agoMake sizeof and alignof a CXCursor_UnaryExpr
Olivier Goffart [Thu, 9 Jun 2016 16:16:06 +0000 (16:16 +0000)]
Make sizeof and alignof a CXCursor_UnaryExpr

So we can match sizeof expressions more accurately than with UnexposedExpr

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

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

8 years agoCIndex: add support for static_assert
Olivier Goffart [Thu, 9 Jun 2016 16:15:55 +0000 (16:15 +0000)]
CIndex: add support for static_assert

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

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

8 years agoReplace an ambiguous "it"
Rafael Espindola [Thu, 9 Jun 2016 13:35:55 +0000 (13:35 +0000)]
Replace an ambiguous "it"

Thanks to Sean for the suggestion.

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

8 years agoclang/test/CodeGenCXX/debug-info-method.cpp: Tweak for thiscall, for targeting Win32...
NAKAMURA Takumi [Thu, 9 Jun 2016 10:06:13 +0000 (10:06 +0000)]
clang/test/CodeGenCXX/debug-info-method.cpp: Tweak for thiscall, for targeting Win32 x86.

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

8 years ago[Sema] Don't crash when a field w/ a mem-initializer clashes with a record name
David Majnemer [Thu, 9 Jun 2016 05:26:56 +0000 (05:26 +0000)]
[Sema] Don't crash when a field w/ a mem-initializer clashes with a record name

It is possible for a field and a class to have the same name.  In such
cases, performing lookup for the field might return a result set with
more than one entry.  An overzealous assertion fired, causing us to
crash instead of using the non-class lookup result.

This fixes PR28060.

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