]> granicus.if.org Git - clang/log
clang
8 years ago[analyzer] Command line option to show enabled checker list.
Gabor Horvath [Mon, 8 Aug 2016 13:41:04 +0000 (13:41 +0000)]
[analyzer] Command line option to show enabled checker list.

This patch adds a command line option to list the checkers that were enabled
by analyzer-checker and not disabled by -analyzer-disable-checker.

It can be very useful to debug long command lines when it is not immediately
apparent which checkers are turned on and which checkers are turned off.

Differential Revision: https://reviews.llvm.org/D23060

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

8 years agoFixes calculateRangesAfterReplacements crash when Replacements is empty.
Eric Liu [Mon, 8 Aug 2016 13:37:39 +0000 (13:37 +0000)]
Fixes calculateRangesAfterReplacements crash when Replacements is empty.

Reviewers: klimek, djasper

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D23264

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

8 years ago[analyzer] Model base to derived casts more precisely.
Gabor Horvath [Mon, 8 Aug 2016 09:22:59 +0000 (09:22 +0000)]
[analyzer] Model base to derived casts more precisely.

Dynamic casts are handled relatively well by the static analyzer.
BaseToDerived casts however are treated conservatively. This can cause some
false positives with the NewDeleteLeaks checker.

This patch alters the behavior of BaseToDerived casts. In case a dynamic cast
would succeed use the same semantics. Otherwise fall back to the conservative
approach.

Differential Revision: https://reviews.llvm.org/D23014

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

8 years agoFix two bugs for musl-libc on ARM
Diana Picus [Mon, 8 Aug 2016 08:27:36 +0000 (08:27 +0000)]
Fix two bugs for musl-libc on ARM

Bug 1: triples like armv7-pc-linux-musl use the wrong linker name
ld-musl-armv7.so.1; the right name should be ld-musl-arm.so.1, disregarding the
subarch field.

Bug 2: when compiler option -mhard-float is used, we should use the "hardfloat"
linker, no matter whether the triple itself mentions "hardfloat".

Patch by Lei Zhang!

Differential Revision: https://reviews.llvm.org/D22904

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

8 years agoPass information in a record instead of stack. NFC
Serge Pavlov [Mon, 8 Aug 2016 04:02:15 +0000 (04:02 +0000)]
Pass information in a record instead of stack. NFC

Functions of Sema that work with building of nested name specifiers have too
many parameters (BuildCXXNestedNameSpecifier already expects 10 arguments).
With this change the information about identifier and its context is packed
into a structure, which is then passes to the semantic functions.

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

8 years ago[AVX512] integer comparisions enumeration.
Asaf Badouh [Sun, 7 Aug 2016 10:43:04 +0000 (10:43 +0000)]
[AVX512] integer comparisions enumeration.

fix Bug 28842 https://llvm.org/bugs/show_bug.cgi?id=28842

Differential Revision: https://reviews.llvm.org/D22212

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

8 years agoUpdate clang tests for LLVM r277950
David Majnemer [Sun, 7 Aug 2016 08:28:58 +0000 (08:28 +0000)]
Update clang tests for LLVM r277950

We infer inbounds on GEPs of allocas leading to minor perturbations in
tests.

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

8 years agoAdd the new scan-build option (--show-description) in the 4.0 release notes
Sylvestre Ledru [Sat, 6 Aug 2016 20:23:54 +0000 (20:23 +0000)]
Add the new scan-build option (--show-description) in the 4.0 release notes

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

8 years agoHeaders: Add ARM support to intrin.h for MSVC compatibility
Saleem Abdulrasool [Sat, 6 Aug 2016 17:58:24 +0000 (17:58 +0000)]
Headers: Add ARM support to intrin.h for MSVC compatibility

This fixes compiling with headers from the Windows SDK for ARM, where the
YieldProcessor function (in winnt.h) refers to _ARM_BARRIER_ISHST.

The actual MSVC armintr.h contains a lot more definitions, but this is enough to
build code that uses the Windows SDK but doesn't use ARM intrinsics directly.

An alternative would to just keep the addition to intrin.h (to include
armintr.h), but not actually ship armintr.h, instead having clang's intrin.h
include armintr.h from MSVC's include directory. (That one works fine with
clang, at least for building code that uses the Windows SDK.)

Patch by Martin Storsjö!

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

8 years ago[ASTReader] Use real move semantics instead of emulating them in the copy ctor.
Benjamin Kramer [Sat, 6 Aug 2016 12:45:16 +0000 (12:45 +0000)]
[ASTReader] Use real move semantics instead of emulating them in the copy ctor.

No functionality change intended.

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

8 years ago[Sema] Make switch fully covered again.
Benjamin Kramer [Sat, 6 Aug 2016 11:28:20 +0000 (11:28 +0000)]
[Sema] Make switch fully covered again.

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

8 years agoMove helpers into anonymous namespaces. NFC.
Benjamin Kramer [Sat, 6 Aug 2016 11:21:04 +0000 (11:21 +0000)]
Move helpers into anonymous namespaces. NFC.

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

8 years ago[StaticAnalyzer] Remove dead code.
Benjamin Kramer [Sat, 6 Aug 2016 11:20:59 +0000 (11:20 +0000)]
[StaticAnalyzer] Remove dead code.

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

8 years ago[NFC] Silence noisy -Wreturn-type warnings
Erik Pilkington [Sat, 6 Aug 2016 01:54:50 +0000 (01:54 +0000)]
[NFC] Silence noisy -Wreturn-type warnings

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

8 years agoFix typos from r277797 and unused variable from r277889.
Richard Trieu [Sat, 6 Aug 2016 01:44:06 +0000 (01:44 +0000)]
Fix typos from r277797 and unused variable from r277889.

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

8 years agoFix two false positives in -Wreturn-stack-address
Richard Trieu [Fri, 5 Aug 2016 23:24:47 +0000 (23:24 +0000)]
Fix two false positives in -Wreturn-stack-address

If the return type is a pointer and the function returns the reference to a
pointer, don't warn since only the value is returned, not the reference.

If a reference function parameter appears in the reference chain, don't warn
since binding happens at the caller scope, so addresses returned are not
to local stack.  This includes default arguments as well.

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

8 years ago[NFC][ObjC Availability] Refactor DiagnoseAvailabilityOfDecl
Erik Pilkington [Fri, 5 Aug 2016 22:59:03 +0000 (22:59 +0000)]
[NFC][ObjC Availability] Refactor DiagnoseAvailabilityOfDecl

Differential revision: https://reviews.llvm.org/D23221

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

8 years ago[clang-tblgen] Remove unused #include (NFC)
Vedant Kumar [Fri, 5 Aug 2016 22:48:53 +0000 (22:48 +0000)]
[clang-tblgen] Remove unused #include (NFC)

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

8 years agoFix false positive in -Wunsequenced and templates.
Richard Trieu [Fri, 5 Aug 2016 21:02:34 +0000 (21:02 +0000)]
Fix false positive in -Wunsequenced and templates.

For builtin logical operators, there is a well-defined ordering of argument
evaluation.  For overloaded operator of the same type, there is no argument
evaluation order, similar to other function calls.  When both are present,
uninstantiated templates with an operator&& is treated as an unresolved
function call.  Unresolved function calls are treated as normal function calls,
and may result in false positives when the builtin logical operator is used.
Have the unsequenced checker ignore dependent expressions to avoid this
false positive.  The check also happens in template instantiations to catch
when the overloaded operator is used.

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

8 years agoPR26423: Assert on valid use of using declaration of a function with an undeduced...
David Blaikie [Fri, 5 Aug 2016 19:03:01 +0000 (19:03 +0000)]
PR26423: Assert on valid use of using declaration of a function with an undeduced auto return type

For now just disregard the using declaration in this case. Suboptimal,
but wiring up the ability to have declarations of functions that are
separate from their definition (we currently only do that for member
functions) and have differing return types (we don't have any support
for that) is more work than seems reasonable to at least fix this crash.

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

8 years ago[SemaOpenMP] Some miscellaneous cleanups
David Majnemer [Fri, 5 Aug 2016 17:44:54 +0000 (17:44 +0000)]
[SemaOpenMP] Some miscellaneous cleanups

Clean up some typos, follow the coding style a little more rigorously.

No functionality change is intended.

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

8 years agoRevert "[Sema] Add sizeof diagnostics for bzero"
Bruno Cardoso Lopes [Fri, 5 Aug 2016 16:41:00 +0000 (16:41 +0000)]
Revert "[Sema] Add sizeof diagnostics for bzero"

This reverts commit r277787, which caused PR28870.

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

8 years agoAMDGPU : Add Clang builtin intrinsics for compare with the full
Wei Ding [Fri, 5 Aug 2016 15:38:46 +0000 (15:38 +0000)]
AMDGPU : Add Clang builtin intrinsics for compare with the full
wavefront result.

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

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

8 years ago[OpenMP] Sema and parsing for 'teams distribute' pragma
Kelvin Li [Fri, 5 Aug 2016 14:37:37 +0000 (14:37 +0000)]
[OpenMP] Sema and parsing for 'teams distribute' pragma

This patch is to implement sema and parsing for 'teams distribute' pragma.

Differential Revision: https://reviews.llvm.org/D23189

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

8 years agoReapply r276973 "Adjust Registry interface to not require plugins to export a registry"
John Brawn [Fri, 5 Aug 2016 11:01:08 +0000 (11:01 +0000)]
Reapply r276973 "Adjust Registry interface to not require plugins to export a registry"

This differs from the previous version by being more careful about template
instantiation/specialization in order to prevent errors when building with
clang -Werror. Specifically:
 * begin is not defined in the template and is instead instantiated when Head
   is. I think the warning when we don't do that is wrong (PR28815) but for now
   at least do it this way to avoid the warning.
 * Instead of performing template specializations in LLVM_INSTANTIATE_REGISTRY
   instead provide a template definition then do explicit instantiation. No
   compiler I've tried has problems with doing it the other way, but strictly
   speaking it's not permitted by the C++ standard so better safe than sorry.

Original commit message:

Currently the Registry class contains the vestiges of a previous attempt to
allow plugins to be used on Windows without using BUILD_SHARED_LIBS, where a
plugin would have its own copy of a registry and export it to be imported by
the tool that's loading the plugin. This only works if the plugin is entirely
self-contained with the only interface between the plugin and tool being the
registry, and in particular this conflicts with how IR pass plugins work.

This patch changes things so that instead the add_node function of the registry
is exported by the tool and then imported by the plugin, which solves this
problem and also means that instead of every plugin having to export every
registry they use instead LLVM only has to export the add_node functions. This
allows plugins that use a registry to work on Windows if
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is used.

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

8 years agoFix crash in template type diffing.
Richard Trieu [Fri, 5 Aug 2016 03:16:36 +0000 (03:16 +0000)]
Fix crash in template type diffing.

When the type being diffed is a type alias, and the orginal type is not a
templated type, then there will be no unsugared TemplateSpecializationType.
When this happens, exit early from the constructor.  Also add assertions to
the other iterator accessor to prevent the iterator from being used.

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

8 years agoAllow -1 to assign max value to unsigned bitfields.
Richard Trieu [Fri, 5 Aug 2016 02:39:30 +0000 (02:39 +0000)]
Allow -1 to assign max value to unsigned bitfields.

Silence the -Wbitfield-constant-conversion warning for when -1 or other
negative values are assigned to unsigned bitfields, provided that the bitfield
is wider than the minimum number of bits needed to encode the negative value.

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

8 years ago[Sema] Add sizeof diagnostics for bzero
Bruno Cardoso Lopes [Thu, 4 Aug 2016 23:55:22 +0000 (23:55 +0000)]
[Sema] Add sizeof diagnostics for bzero

For memset (and others) we can get diagnostics like:

  struct stat { int x; };
  void foo(struct stat *stamps) {
    bzero(stamps, sizeof(stamps));
    memset(stamps, 0, sizeof(stamps));
  }

  t.c:7:28: warning: 'memset' call operates on objects of type 'struct stat' while the size is based on a different type 'struct stat *' [-Wsizeof-pointer-memaccess]
    memset(stamps, 0, sizeof(stamps));
           ~~~~~~            ^~~~~~
  t.c:7:28: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
    memset(stamps, 0, sizeof(stamps));
                             ^~~~~~

This patch implements the same class of warnings for bzero.

Differential Revision: https://reviews.llvm.org/D22525

rdar://problem/18963514

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

8 years ago[ADT] Migrate DepthFirstIterator to use NodeRef
Tim Shen [Thu, 4 Aug 2016 23:03:44 +0000 (23:03 +0000)]
[ADT] Migrate DepthFirstIterator to use NodeRef

Summary: The corresponding LLVM change is D23146.

Reviewers: dblaikie, chandlerc

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D23147

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

8 years ago[analyzer] Make CloneDetector recognize different variable patterns.
Artem Dergachev [Thu, 4 Aug 2016 19:37:00 +0000 (19:37 +0000)]
[analyzer] Make CloneDetector recognize different variable patterns.

CloneDetector should be able to detect clones with renamed variables.
However, if variables are referenced multiple times around the code sample,
the usage patterns need to be recognized.

For example, (x < y ? y : x) and (y < x ? y : x) are no longer clones,
however (a < b ? b : a) is still a clone of the former.

Variable patterns are computed and compared during a separate filtering pass.

Patch by Raphael Isemann!

Differential Revision: https://reviews.llvm.org/D22982

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

8 years ago[OpenCL] Add the lit test for image size which was omitted by r277647.
Yaxun Liu [Thu, 4 Aug 2016 19:35:17 +0000 (19:35 +0000)]
[OpenCL] Add the lit test for image size which was omitted by r277647.

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

8 years ago[OpenCL] Remove extra native_ functions from opencl-c.h
Yaxun Liu [Thu, 4 Aug 2016 19:30:54 +0000 (19:30 +0000)]
[OpenCL] Remove extra native_ functions from opencl-c.h

There should be no native_ builtin functions with double type arguments.

Patch by Aaron En Ye Shi.

Differential Revision : https://reviews.llvm.org/D23071

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

8 years ago[OpenCL] Added underscores to the names of 'to_addr' OpenCL built-ins.
Alexey Bader [Thu, 4 Aug 2016 18:06:27 +0000 (18:06 +0000)]
[OpenCL] Added underscores to the names of 'to_addr' OpenCL built-ins.

Summary:
In order to re-define OpenCL built-in functions
'to_{private,local,global}' in OpenCL run-time library LLVM names must
be different from the clang built-in function names.

Reviewers: yaxunl, Anastasia

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D23120

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

8 years agoMake isExternC work on VarDecls too.
Benjamin Kramer [Thu, 4 Aug 2016 10:02:03 +0000 (10:02 +0000)]
Make isExternC work on VarDecls too.

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

8 years agoAfter PR28761 use -Wall with -Werror in builtins tests to identify
Eric Christopher [Thu, 4 Aug 2016 06:02:50 +0000 (06:02 +0000)]
After PR28761 use -Wall with -Werror in builtins tests to identify
possible problems in headers.

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

8 years ago[Concepts] remove default argument for RequiresClause; NFC
Hubert Tong [Wed, 3 Aug 2016 22:07:50 +0000 (22:07 +0000)]
[Concepts] remove default argument for RequiresClause; NFC

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

8 years ago[OpenCL] Fix size of image type
Yaxun Liu [Wed, 3 Aug 2016 20:38:06 +0000 (20:38 +0000)]
[OpenCL] Fix size of image type

The size of image type is reported incorrectly as size of a pointer to address space 0, which causes error when casting image type to pointers by __builtin_astype.

The fix is to get image address space from TargetInfo then report the size accordingly.

Differential Revision: https://reviews.llvm.org/D22927

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

8 years agoFix bug in conflict check for Replacements::add().
Manuel Klimek [Wed, 3 Aug 2016 15:12:00 +0000 (15:12 +0000)]
Fix bug in conflict check for Replacements::add().

We would not detect conflicts when inserting insertions at the same
offset as previously contained replacements.

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

8 years agoFix quadratic runtime when adding items to tooling::Replacements.
Manuel Klimek [Wed, 3 Aug 2016 14:12:17 +0000 (14:12 +0000)]
Fix quadratic runtime when adding items to tooling::Replacements.

Previously, we would search through all replacements when inserting a
new one to check for overlaps. Instead, make use of the fact that we
already have a set of replacments without overlaps to find the potential
overlap with lower_bound.

Differential Revision: https://reviews.llvm.org/D23119

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

8 years ago[clang/test] Fix a flaky unittest on windows
Etienne Bergeron [Wed, 3 Aug 2016 06:10:15 +0000 (06:10 +0000)]
[clang/test] Fix a flaky unittest on windows

Summary:
The append operator on a shell command for quick command-line is
causing trouble on windows. [NFC]
The easiest way to fix them is to avoid using them.

This patch is an attempt to fix this broken build bot:
  clang-x86-win2008-selfhost

http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9523

Reviewers: rnk

Subscribers: cfe-commits, chrisha

Differential Revision: https://reviews.llvm.org/D23105

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

8 years ago[index] Fix crash with indexing designated init expressions inside templates.
Argyrios Kyrtzidis [Wed, 3 Aug 2016 05:38:53 +0000 (05:38 +0000)]
[index] Fix crash with indexing designated init expressions inside templates.

rdar://27452869

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

8 years ago[CUDA] Updated CUDA tests that must run w/o CUDA installation.
Artem Belevich [Tue, 2 Aug 2016 23:43:04 +0000 (23:43 +0000)]
[CUDA] Updated CUDA tests that must run w/o CUDA installation.

Fixes test failures after r277542 on systems that don't have
CUDA installed.

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

8 years ago[analyzer] Update two comments in MPI-Checker. NFC.
Devin Coughlin [Tue, 2 Aug 2016 23:24:40 +0000 (23:24 +0000)]
[analyzer] Update two comments in MPI-Checker. NFC.

Correct two comments that do not match the current behavior of the checker.

A patch by Alexander Droste!

Differential Revision: https://reviews.llvm.org/D22670

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

8 years ago[CUDA] Fix libdevice selection.
Artem Belevich [Tue, 2 Aug 2016 23:12:51 +0000 (23:12 +0000)]
[CUDA] Fix libdevice selection.

This makes clang's libdevice selection match that of NVCC as described in
http://docs.nvidia.com/cuda/libdevice-users-guide/basic-usage.html#version-selection

If required libdevice variant is not found, driver now fails with an error.

Differential Revision: https://reviews.llvm.org/D23037

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

8 years ago[CUDA] Do not allow using NVPTX target for host compilation.
Artem Belevich [Tue, 2 Aug 2016 22:37:47 +0000 (22:37 +0000)]
[CUDA] Do not allow using NVPTX target for host compilation.

Differential Revision: https://reviews.llvm.org/D23042

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

8 years ago[CFG] Fix crash finding destructor of lifetime-extended temporary.
Devin Coughlin [Tue, 2 Aug 2016 21:07:23 +0000 (21:07 +0000)]
[CFG] Fix crash finding destructor of lifetime-extended temporary.

Fix a crash under -Wthread-safety when finding the destructor for a
lifetime-extending reference.

A patch by Nandor Licker!

Differential Revision: https://reviews.llvm.org/D22419

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

8 years agoRevert "[Order Files] Remove dtrace predicate"
Chris Bieneman [Tue, 2 Aug 2016 18:23:56 +0000 (18:23 +0000)]
Revert "[Order Files] Remove dtrace predicate"

This reverts commit r277487.

Removing the probe predicate was a red herring. It results in more symbols being placed in the final order file, but they are symbols from outside the clang image.

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

8 years agoUpdate Clang Parser test error message to match new parser errors
Nirav Dave [Tue, 2 Aug 2016 17:58:14 +0000 (17:58 +0000)]
Update Clang Parser test error message to match new parser errors

Update clang tests in light of r277489.

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

8 years agoUpdated documentation
Vitaly Buka [Tue, 2 Aug 2016 17:51:48 +0000 (17:51 +0000)]
Updated documentation

Reviewers: kcc, eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22992

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

8 years ago[Order Files] Remove dtrace predicate
Chris Bieneman [Tue, 2 Aug 2016 17:50:53 +0000 (17:50 +0000)]
[Order Files] Remove dtrace predicate

Having the dtrace predicate setup to only show probes in clang filters out static initializers executed by dyld, which we do want included in the order files.

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

8 years ago[analyzer] Hotfix for buildbot failure due to unspecified triple in r277449
Artem Dergachev [Tue, 2 Aug 2016 15:16:06 +0000 (15:16 +0000)]
[analyzer] Hotfix for buildbot failure due to unspecified triple in r277449

If a target triple is not specified, the default host triple is used,
which is not good for compiling inline assembler code.

Patch by Raphael Isemann!

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

8 years ago[clang-cl] Fix PCH tests to use x86_64 as target
Diana Picus [Tue, 2 Aug 2016 13:53:00 +0000 (13:53 +0000)]
[clang-cl] Fix PCH tests to use x86_64 as target

These tests require x86-registered-target, but they don't force the target as
x86 on the command line, which means they will be run and they might fail when
building the x86 backend on another platform (such as AArch64).

Fixes https://llvm.org/bugs/show_bug.cgi?id=28797

Differential Revision: https://reviews.llvm.org/D23054

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

8 years ago[analyzer] Respect statement-specific data in CloneDetection.
Artem Dergachev [Tue, 2 Aug 2016 12:21:09 +0000 (12:21 +0000)]
[analyzer] Respect statement-specific data in CloneDetection.

So far the CloneDetector only respected the kind of each statement when
searching for clones. This patch refines the way the CloneDetector collects data
from each statement by providing methods for each statement kind,
that will read the kind-specific attributes.

For example, statements 'a < b' and 'a > b' are no longer considered to be
clones, because they are different in operation code, which is an attribute
specific to the BinaryOperator statement kind.

Patch by Raphael Isemann!

Differential Revision: https://reviews.llvm.org/D22514

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

8 years agoRevert r276896 "Update Clang Parser test error message to match new parser errors"
Hans Wennborg [Mon, 1 Aug 2016 23:34:42 +0000 (23:34 +0000)]
Revert r276896 "Update Clang Parser test error message to match new parser errors"

This depended on r276895, which was reverted in r277402.

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

8 years ago[Order Files] Fixing an error in the perf-helper script
Chris Bieneman [Mon, 1 Aug 2016 22:54:00 +0000 (22:54 +0000)]
[Order Files] Fixing an error in the perf-helper script

Dtrace probemod needs to be based on the first argument of the command, not the first argument of the args. This error was introduced a while back when I added support for skipping the driver and invoking cc1 directly.

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

8 years agoAdd FIXMEs for MSVC 2013 hacks in r277211. NFC.
Paul Robinson [Mon, 1 Aug 2016 22:12:46 +0000 (22:12 +0000)]
Add FIXMEs for MSVC 2013 hacks in r277211. NFC.

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

8 years agoCodeGen: simplify the CC handling for TLS wrappers
Saleem Abdulrasool [Mon, 1 Aug 2016 21:31:24 +0000 (21:31 +0000)]
CodeGen: simplify the CC handling for TLS wrappers

Use the calling convention of the wrapper directly to set the calling convention
to ensure that the calling convention matches.  Incorrectly setting the calling
convention results in the code path being entirely nullified as InstCombine +
SimplifyCFG will prune the mismatched CC calls.

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

8 years ago[ObjC Availability] Fix partial-availability false positive introduced in r277058
Erik Pilkington [Mon, 1 Aug 2016 20:19:49 +0000 (20:19 +0000)]
[ObjC Availability] Fix partial-availability false positive introduced in r277058

Thanks to Nico Weber for pointing this out!

Differential revision: https://reviews.llvm.org/D23024

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

8 years ago[codeview] Skip injected class names in nested record emission
Reid Kleckner [Mon, 1 Aug 2016 18:56:13 +0000 (18:56 +0000)]
[codeview] Skip injected class names in nested record emission

We were already trying to do this, but our check wasn't quite right.

Fixes PR28790

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

8 years ago[AArch64] Add support for Samsung Exynos M2 (NFC).
Evandro Menezes [Mon, 1 Aug 2016 18:39:55 +0000 (18:39 +0000)]
[AArch64] Add support for Samsung Exynos M2 (NFC).

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

8 years ago[Parse] Let declarations follow labels in -fms-extensions mode
David Majnemer [Mon, 1 Aug 2016 16:39:29 +0000 (16:39 +0000)]
[Parse] Let declarations follow labels in -fms-extensions mode

MSVC permits declarations in these places as conforming extension (it is
a constraint violation otherwise).

This fixes PR28782.

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

8 years agoMake RecursiveASTVisitor visit lambda capture initialization expressions
Martin Bohme [Mon, 1 Aug 2016 12:15:46 +0000 (12:15 +0000)]
Make RecursiveASTVisitor visit lambda capture initialization expressions

Summary:
Lambda capture initializations are part of the explicit source code and
therefore should be visited by default but, so far, RecursiveASTVisitor does not
visit them.

This appears to be an oversight. Because the lambda body needs custom handling
(calling TraverseLambdaBody()), the DEF_TRAVERSE_STMT for LambdaExpr sets
ShouldVisitChildren to false but then neglects to visit the lambda capture
initializations. This patch adds code to visit the expressions associated with
lambda capture initializations.

Reviewers: klimek

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D22566

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

8 years ago[analyzer] Fix execution permissions for the scan-build-py scripts.
Artem Dergachev [Mon, 1 Aug 2016 10:55:59 +0000 (10:55 +0000)]
[analyzer] Fix execution permissions for the scan-build-py scripts.

Differential Revision: https://reviews.llvm.org/D22969

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

8 years agoImplement tooling::Replacements as a class.
Eric Liu [Mon, 1 Aug 2016 10:16:37 +0000 (10:16 +0000)]
Implement tooling::Replacements as a class.

Summary:
- Implement clang::tooling::Replacements as a class to provide interfaces to
  control how replacements for a single file are combined and provide guarantee
  on the order of replacements being applied.
- tooling::Replacements only contains replacements for the same file now.
  Use std::map<std::string, tooling::Replacements> to represent multi-file
  replacements.
- Error handling for the interface change will be improved in followup patches.

Reviewers: djasper, klimek

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D21748

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

8 years agoAllow .exe extension to ld to fix test with mingw.
Yaron Keren [Mon, 1 Aug 2016 10:14:54 +0000 (10:14 +0000)]
Allow .exe extension to ld to fix test with mingw.

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

8 years agoscan-build: Add an option to show the description in the list of defect
Sylvestre Ledru [Mon, 1 Aug 2016 08:04:45 +0000 (08:04 +0000)]
scan-build: Add an option to show the description in the list of defect

Summary:
This patch adds an option //--show-description// to add the defect description to the list of defect. This helps to get a better understanding of the defect without opening the page.

For example, this is used for Firefox:
https://people.mozilla.org/~sledru/reports/fx-scan-build/

Reviewers: rizsotto.mailinglist, zaks.anna

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D22810

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

8 years agoAdd more gcc compatibility names to clang's cpuid.h
Dimitry Andric [Sun, 31 Jul 2016 20:23:23 +0000 (20:23 +0000)]
Add more gcc compatibility names to clang's cpuid.h

Summary:
Some cpuid bit defines are named slightly different from how gcc's
cpuid.h calls them.

Define a few more compatibility names to appease software built for gcc:

* `bit_PCLMUL`      alias of `bit_PCLMULQDQ`
* `bit_SSE4_1`      alias of `bit_SSE41`
* `bit_SSE4_2`      alias of `bit_SSE42`
* `bit_AES`         alias of `bit_AESNI`
* `bit_CMPXCHG8B`   alias of `bit_CX8`

While here, add the misssing 29th bit, `bit_F16C` (which is how gcc
calls this bit).

Reviewers: joerg, rsmith

Subscribers: bruno, cfe-commits

Differential Revision: https://reviews.llvm.org/D22010

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

8 years ago[NFC] Rearrange an example-file so the c++14 specific example is on top.
Faisal Vali [Sun, 31 Jul 2016 01:19:17 +0000 (01:19 +0000)]
[NFC] Rearrange an example-file so the c++14 specific example is on top.

This makes it easier to add C++1z examples to the bottom, just before the #endif.

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

8 years agoReapply r276069 with workaround for MSVC 2013
Hubert Tong [Sat, 30 Jul 2016 22:33:34 +0000 (22:33 +0000)]
Reapply r276069 with workaround for MSVC 2013

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

8 years agoCorrecting some sphinx formatting issues so that the attribute documentation builds...
Aaron Ballman [Sat, 30 Jul 2016 20:20:03 +0000 (20:20 +0000)]
Correcting some sphinx formatting issues so that the attribute documentation builds again.

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

8 years ago[analyzer] Update APIs taking user-facing strings.
Devin Coughlin [Sat, 30 Jul 2016 16:16:51 +0000 (16:16 +0000)]
[analyzer] Update APIs taking user-facing strings.

Add new APIs that require localized strings and remove two APIs that were
incorrectly marked as requiring a user-facing string.

A patch by Kulpreet Chilana!

Differential Revision: https://reviews.llvm.org/D22926

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

8 years ago[c-index-test] Make sure to check that clang_Cursor_getNumTemplateArguments did not...
Argyrios Kyrtzidis [Sat, 30 Jul 2016 02:20:21 +0000 (02:20 +0000)]
[c-index-test] Make sure to check that clang_Cursor_getNumTemplateArguments did not return -1.

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

8 years agoFix VS2013 build of CGOpenMPRuntime.cpp
Hans Wennborg [Sat, 30 Jul 2016 00:41:37 +0000 (00:41 +0000)]
Fix VS2013 build of CGOpenMPRuntime.cpp

It seems the compiler was getting confused by the in-class initializers
in local struct MapInfo, so moving those to a default constructor
instead.

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

8 years ago[Perf-Helper] Add logging for dtrace commands
Chris Bieneman [Fri, 29 Jul 2016 22:48:17 +0000 (22:48 +0000)]
[Perf-Helper] Add logging for dtrace commands

Logging the dtrace command into the top of the dtrace log is useful when debugging why the order file generation is flaky.

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

8 years agoRemove unused variable.
Eric Christopher [Fri, 29 Jul 2016 22:11:11 +0000 (22:11 +0000)]
Remove unused variable.

Fixes PR28761.

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

8 years agoFix CGOpenMPRuntime.cpp for VS2013. NFC.
Paul Robinson [Fri, 29 Jul 2016 20:46:16 +0000 (20:46 +0000)]
Fix CGOpenMPRuntime.cpp for VS2013.  NFC.
I don't know why these changes work but they do.

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

8 years agoEnsure Ident_GNU_final is properly initialized in the Parser Initialize function
David Majnemer [Fri, 29 Jul 2016 20:01:12 +0000 (20:01 +0000)]
Ensure Ident_GNU_final is properly initialized in the Parser Initialize function

The recent change implementing __final forgot to initialize a variable.
This was caught by the Memory Sanitizer.

Properly initialize the value to nullptr to ensure proper memory reads.

Patch by Erich Keane!

Differential Revision: https://reviews.llvm.org/D22970

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

8 years agoFix naked.cpp test on 32-bit Windows
Reid Kleckner [Fri, 29 Jul 2016 19:43:28 +0000 (19:43 +0000)]
Fix naked.cpp test on 32-bit Windows

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

8 years agoCodeGen: try harder to make the CFString structure RW
Saleem Abdulrasool [Fri, 29 Jul 2016 19:15:51 +0000 (19:15 +0000)]
CodeGen: try harder to make the CFString structure RW

The previous change was insufficient to mark the content as read-write as the
structure itself was marked constant.  Adjust this and add tests to ensure that
the section is marked appropriately as being read-write.

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

8 years agoImprove documentation of the type safety attributes.
Yunzhong Gao [Fri, 29 Jul 2016 18:34:21 +0000 (18:34 +0000)]
Improve documentation of the type safety attributes.
1. Add description of the arguments to these attributes.
2. Add missing declarations to some of the MPI code examples.
3. Made clarifications where possible.

Based on the write-up by: Craig Flores.

Differential Revision: https://reviews.llvm.org/D22717

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

8 years ago[OpenCL] Add extension cl_khr_mipmap_image to clang
Yaxun Liu [Fri, 29 Jul 2016 17:52:34 +0000 (17:52 +0000)]
[OpenCL] Add extension cl_khr_mipmap_image to clang

Adding extension cl_khr_mipmap_image to clang's OpenCL Extensions and initiated inside AMDGPU Target.

Patch by Aaron En Ye Shi.

Differential Revision: https://reviews.llvm.org/D22637

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

8 years ago[OpenCL] Added CLK_ABGR definition for get_image_channel_order return value
Yaxun Liu [Fri, 29 Jul 2016 17:50:10 +0000 (17:50 +0000)]
[OpenCL] Added CLK_ABGR definition for get_image_channel_order return value

Added CLK_ABGR definition for get_image_channel_order return value inside opencl-c.h file.

Patch by Aaron En Ye Shi.

Differential Revision: https://reviews.llvm.org/D22767

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

8 years agoReapply r277058: "[ObjC] Consider availability of context when emitting availability...
Erik Pilkington [Fri, 29 Jul 2016 17:37:38 +0000 (17:37 +0000)]
Reapply r277058: "[ObjC] Consider availability of context when emitting availability warnings"

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

8 years agoFix a typo in document.
Haojian Wu [Fri, 29 Jul 2016 17:30:13 +0000 (17:30 +0000)]
Fix a typo in document.

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

8 years agoInitial vectorization support for svml calls (short vector math library).
Matt Masten [Fri, 29 Jul 2016 16:44:24 +0000 (16:44 +0000)]
Initial vectorization support for svml calls (short vector math library).

Differential Revision: https://reviews.llvm.org/D19544

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

8 years ago[ASTMatcher] Add templateName matcher.
Haojian Wu [Fri, 29 Jul 2016 15:45:11 +0000 (15:45 +0000)]
[ASTMatcher] Add templateName matcher.

Reviewers: klimek

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D22963

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

8 years ago[ASTMatcher] Add hasTemplateArgument/hasAnyTemplateArgument support in functionDecl.
Haojian Wu [Fri, 29 Jul 2016 13:57:27 +0000 (13:57 +0000)]
[ASTMatcher] Add hasTemplateArgument/hasAnyTemplateArgument support in functionDecl.

Reviewers: klimek

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D22957

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

8 years agoAdd missing '-no-canonical-prefixes' in test.
Daniel Jasper [Fri, 29 Jul 2016 13:45:03 +0000 (13:45 +0000)]
Add missing '-no-canonical-prefixes' in test.

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

8 years agoMake test not fail on hosts where the default omp library is gomp.
Benjamin Kramer [Fri, 29 Jul 2016 13:07:09 +0000 (13:07 +0000)]
Make test not fail on hosts where the default omp library is gomp.

This is the case on some linuxes, just force libomp so we get the
desired results.

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

8 years ago[GCC] Support for __final specifier
Andrey Bokhanko [Fri, 29 Jul 2016 10:42:48 +0000 (10:42 +0000)]
[GCC] Support for __final specifier

As reported in bug 28473, GCC supports "final" functionality in pre-C++11 code using the __final keyword. Clang currently supports the "final" keyword in accordance with the C++11 specification, however it ALSO supports it in pre-C++11 mode, with a warning.

This patch adds the "__final" keyword for compatibility with GCC in GCC Keywords mode (so it is enabled with existing flags), and issues a warning on its usage (suggesting switching to the C++11 keyword). This patch also adds a regression test for the functionality described. I believe this patch has minimal impact, as it simply adds a new keyword for existing behavior.

This has been validated with check-clang to avoid regressions. Patch is created in reference to revisions 276665.

Patch by Erich Keane.

Differential Revision: https://reviews.llvm.org/D22919

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

8 years ago[Typo police] s/proccess/process/, s/auxiliary/auxilliary/.
Justin Lebar [Fri, 29 Jul 2016 05:26:58 +0000 (05:26 +0000)]
[Typo police] s/proccess/process/, s/auxiliary/auxilliary/.

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

8 years ago[Parser] Fix bug where delayed typo in conditional expression was corrected twice
Erik Pilkington [Fri, 29 Jul 2016 00:55:40 +0000 (00:55 +0000)]
[Parser] Fix bug where delayed typo in conditional expression was corrected twice

Patch by David Tarditi!

Differential revision: https://reviews.llvm.org/D22930

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

8 years agoChange a test to be less prone to random failures due to
Wolfgang Pieb [Fri, 29 Jul 2016 00:54:13 +0000 (00:54 +0000)]
Change a test to be less prone to random failures due to
unintended matches of label numbers to debug metadata
handles in release builds.

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

8 years ago[docs] Coverage: Reference the new -output-dir option
Vedant Kumar [Thu, 28 Jul 2016 23:22:42 +0000 (23:22 +0000)]
[docs] Coverage: Reference the new -output-dir option

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

8 years ago[docs] Mention some new options in llvm-cov
Vedant Kumar [Thu, 28 Jul 2016 23:18:48 +0000 (23:18 +0000)]
[docs] Mention some new options in llvm-cov

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

8 years agoRevert "[ObjC] Consider availability of context when emitting availability warnings"
Erik Pilkington [Thu, 28 Jul 2016 22:51:11 +0000 (22:51 +0000)]
Revert "[ObjC] Consider availability of context when emitting availability warnings"

Reverting r277058, while I fugure out why it broke internal bots.

This reverts commit e514ffa8b657416c6784bbe6da9f5de19365103d.

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

8 years ago[CUDA] Unswitch enumerators in the selection of the offloading tool chain.
Samuel Antao [Thu, 28 Jul 2016 22:42:42 +0000 (22:42 +0000)]
[CUDA] Unswitch enumerators in the selection of the offloading tool chain.

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

8 years ago[ObjC] Consider availability of context when emitting availability warnings
Erik Pilkington [Thu, 28 Jul 2016 22:09:53 +0000 (22:09 +0000)]
[ObjC] Consider availability of context when emitting availability warnings

This means that a function marked with an availability attribute can safely
refer to a declaration that is greater than the deployment target, but less then
or equal to the context availability without -Wpartial-availability firing.

Differential revision: https://reviews.llvm.org/D22697

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

8 years ago[analyzer] Update the web manual for checker developers.
Artem Dergachev [Thu, 28 Jul 2016 20:13:14 +0000 (20:13 +0000)]
[analyzer] Update the web manual for checker developers.

Fix the explanation of how to run tests after migration
from autotools to cmake.

Significantly expand the "debugging" section
with more interesting stuff.

Update the table of contents accordingly.

Fix paragraphs in the overview section.

Differential Revision: https://reviews.llvm.org/D22874

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

8 years ago[OpenCL] Generate opaque type for sampler_t and function call for the initializer
Yaxun Liu [Thu, 28 Jul 2016 19:26:30 +0000 (19:26 +0000)]
[OpenCL] Generate opaque type for sampler_t and function call for the initializer

Currently Clang use int32 to represent sampler_t, which have been a source of issue for some backends, because in some backends sampler_t cannot be represented by int32. They have to depend on kernel argument metadata and use IPA to find the sampler arguments and global variables and transform them to target specific sampler type.

This patch uses opaque pointer type opencl.sampler_t* for sampler_t. For each use of file-scope sampler variable, it generates a function call of __translate_sampler_initializer. For each initialization of function-scope sampler variable, it generates a function call of __translate_sampler_initializer.

Each builtin library can implement its own __translate_sampler_initializer(). Since the real sampler type tends to be architecture dependent, allowing it to be initialized by a library function simplifies backend design. A typical implementation of __translate_sampler_initializer could be a table lookup of real sampler literal values. Since its argument is always a literal, the returned pointer is known at compile time and easily optimized to finally become some literal values directly put into image read instructions.

This patch is partially based on Alexey Sotkin's work in Khronos Clang (https://github.com/KhronosGroup/SPIR/commit/3d4eec61623502fc306e8c67c9868be2b136e42b).

Differential Revision: https://reviews.llvm.org/D21567

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