]> granicus.if.org Git - clang/log
clang
5 years agoMerging r370850:
Hans Wennborg [Thu, 5 Sep 2019 09:48:06 +0000 (09:48 +0000)]
Merging r370850:
------------------------------------------------------------------------
r370850 | hans | 2019-09-04 10:19:30 +0200 (Wed, 04 Sep 2019) | 20 lines

Re-commit r363191 "[MS] Pretend constexpr variable template specializations are inline"

While the next Visual Studio update (16.3) will fix this issue, that hasn't
shipped yet. Until then Clang wouldn't work with MSVC's headers which seems
unfortunate. Let's keep this in until VS 16.3 ships. (See also PR42843.)

> Fixes link errors with clang and the latest Visual C++ 14.21.27702
> headers, which was reported as PR42027.
>
> I chose to intentionally make these things linkonce_odr, i.e.
> discardable, so that we don't emit definitions of these things in every
> translation unit that includes STL headers.
>
> Note that this is *not* what MSVC does: MSVC has not yet implemented C++
> DR2387, so they emit fully specialized constexpr variable templates with
> static / internal linkage.
>
> Reviewers: rsmith
>
> Differential Revision: https://reviews.llvm.org/D63175
------------------------------------------------------------------------

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

5 years agoRe-generate {Attribute,ClangCommandLine,Diagnostics}Reference.rst
Hans Wennborg [Fri, 30 Aug 2019 09:22:24 +0000 (09:22 +0000)]
Re-generate {Attribute,ClangCommandLine,Diagnostics}Reference.rst

$ bin/clang-tblgen -gen-diag-docs -I../cfe.src/include \
      -I../cfe.src/include/clang/Basic/ \
      ../cfe.src/include/clang/Basic/Diagnostic.td -o \
      ../cfe.src/docs/DiagnosticsReference.rst && \
bin/clang-tblgen -gen-attr-docs -I../cfe.src/include \
        ../cfe.src/include/clang/Basic/Attr.td -o \
        ../cfe.src/docs/AttributeReference.rst && \
bin/clang-tblgen -gen-opt-docs -I../cfe.src/include \
        -I../cfe.src/include/clang/Driver -I../llvm.src/include \
        ../cfe.src/include/clang/Driver/ClangOptionDocs.td -o \
        ../cfe.src/docs/ClangCommandLineReference.rst

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

5 years agoReleaseNotes: fixes
Hans Wennborg [Thu, 29 Aug 2019 14:18:54 +0000 (14:18 +0000)]
ReleaseNotes: fixes

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

5 years agoReleaseNotes: drop in-progress warning and empty sections
Hans Wennborg [Thu, 29 Aug 2019 13:49:56 +0000 (13:49 +0000)]
ReleaseNotes: drop in-progress warning and empty sections

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

5 years agoMerging r370035:
Hans Wennborg [Wed, 28 Aug 2019 14:49:27 +0000 (14:49 +0000)]
Merging r370035:
------------------------------------------------------------------------
r370035 | devnexen | 2019-08-27 12:04:03 +0200 (Tue, 27 Aug 2019) | 7 lines

[ReleaseNotes] MemorySanitizer support of ASLR on FreeBSD

Reviewers: sylvestre.ledru, kcc

Reviewed By: sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D66792
------------------------------------------------------------------------

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

5 years agoMerging r370073:
Hans Wennborg [Wed, 28 Aug 2019 09:46:17 +0000 (09:46 +0000)]
Merging r370073:
------------------------------------------------------------------------
r370073 | lenary | 2019-08-27 17:41:16 +0200 (Tue, 27 Aug 2019) | 13 lines

[RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 targets with atomics

Summary: This ensures that libcalls aren't generated when the target supports atomics. Atomics aren't in the base RV32I/RV64I instruction sets, so MaxAtomicInlineWidth and MaxAtomicPromoteWidth are set only when the atomics extension is being targeted. This must be done in setMaxAtomicWidth, as this should be done after handleTargetFeatures has been called.

Reviewers: jfb, jyknight, wmi, asb

Reviewed By: asb

Subscribers: pzheng, MaskRay, s.egerton, lenary, dexonsmith, psnobl, benna, Jim, JohnLLVM, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, lewis-revill, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57450
------------------------------------------------------------------------

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

5 years ago[analyzer] Add 9.0.0. release notes.
Hans Wennborg [Wed, 28 Aug 2019 08:12:39 +0000 (08:12 +0000)]
[analyzer] Add 9.0.0. release notes.

By Kristóf Umann!

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

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

5 years agoMerging r369834:
Hans Wennborg [Tue, 27 Aug 2019 10:38:25 +0000 (10:38 +0000)]
Merging r369834:
------------------------------------------------------------------------
r369834 | rsmith | 2019-08-24 04:30:00 +0200 (Sat, 24 Aug 2019) | 8 lines

PR42513: Enter the proper DeclContext before substituting into an
default template argument expression.

We already did this for type template parameters and template template
parameters, but apparently forgot to do so for non-type template
parameters. This causes the substituted default argument expression to
be substituted in the proper context, and in particular to properly mark
its subexpressions as odr-used.
------------------------------------------------------------------------

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

5 years agoMerging r369749:
Hans Wennborg [Tue, 27 Aug 2019 09:54:32 +0000 (09:54 +0000)]
Merging r369749:
------------------------------------------------------------------------
r369749 | stulova | 2019-08-23 13:43:49 +0200 (Fri, 23 Aug 2019) | 5 lines

[Docs][OpenCL] Several corrections to C++ for OpenCL

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

------------------------------------------------------------------------

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

5 years agoMerging r369829:
Hans Wennborg [Mon, 26 Aug 2019 16:04:59 +0000 (16:04 +0000)]
Merging r369829:
------------------------------------------------------------------------
r369829 | rsmith | 2019-08-24 03:23:57 +0200 (Sat, 24 Aug 2019) | 3 lines

PR40674: fix assertion failure if a structured binding declaration has a
tuple-like decomposition that produces value-dependent reference
bindings.
------------------------------------------------------------------------

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

5 years agoMerge 'r369779 - [OpenCL] Renamed value of std flag in C++ mode'
Hans Wennborg [Mon, 26 Aug 2019 15:05:12 +0000 (15:05 +0000)]
Merge 'r369779 - [OpenCL] Renamed value of std flag in C++ mode'

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

5 years agoMerging r366447:
Hans Wennborg [Mon, 26 Aug 2019 12:31:59 +0000 (12:31 +0000)]
Merging r366447:
------------------------------------------------------------------------
r366447 | jdevlieghere | 2019-07-18 17:17:42 +0200 (Thu, 18 Jul 2019) | 19 lines

[CMake] Don't set Python_ADDITIONAL_VERSIONS

Until recently, Python_ADDITIONAL_VERSIONS was used to limit LLVM's
Python support to 2.7. Now that both LLVM and LLDB both support Python
3, there's no longer a need to put an arbitrary limit on this.

However, instead of removing the variable, r365692 expanded the list,
which has the (presumably unintentional) side-effect of expression
preference for Python 3.

Instead, as Michal proposed in the original code review, we should just
not set the list at all, and let CMake pick whatever Python interpreter
you have in your path.

This patch removes the Python_ADDITIONAL_VERSIONS variable in llvm,
clang and lld. I've also updated the docs with the default behavior and
how to force a different Python version to be used.

Differential revision: https://reviews.llvm.org/D64894
------------------------------------------------------------------------

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

5 years agoReleaseNotes: __declspec(allocator)
Hans Wennborg [Mon, 26 Aug 2019 11:58:46 +0000 (11:58 +0000)]
ReleaseNotes: __declspec(allocator)

By Amy Huang!

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

5 years agoRelease notes: -ftime-trace
Hans Wennborg [Mon, 26 Aug 2019 11:49:09 +0000 (11:49 +0000)]
Release notes: -ftime-trace

By Aras Pranckevicius!

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

5 years ago[Docs][OpenCL] Release 9.0 notes for OpenCL
Anastasia Stulova [Fri, 23 Aug 2019 13:54:19 +0000 (13:54 +0000)]
[Docs][OpenCL] Release 9.0 notes for OpenCL

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

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

5 years agoMerging r369641:
Hans Wennborg [Fri, 23 Aug 2019 07:57:37 +0000 (07:57 +0000)]
Merging r369641:
------------------------------------------------------------------------
r369641 | yaxunl | 2019-08-22 13:18:59 +0200 (Thu, 22 Aug 2019) | 4 lines

[OpenCL] Fix declaration of enqueue_marker

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

------------------------------------------------------------------------

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

5 years agoMerging r369093:
Hans Wennborg [Thu, 22 Aug 2019 13:42:47 +0000 (13:42 +0000)]
Merging r369093:
------------------------------------------------------------------------
r369093 | lewis-revill | 2019-08-16 12:23:56 +0200 (Fri, 16 Aug 2019) | 11 lines

[RISCV] Add inline asm constraint A for RISC-V

This allows the constraint A to be used in inline asm for RISC-V, which
allows an address held in a register to be used.

This patch adds the minimal amount of code required to get operands with
the right constraints to compile.

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

------------------------------------------------------------------------

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

5 years agoMerging r369251:
Hans Wennborg [Wed, 21 Aug 2019 07:33:40 +0000 (07:33 +0000)]
Merging r369251:
------------------------------------------------------------------------
r369251 | stulova | 2019-08-19 13:43:16 +0200 (Mon, 19 Aug 2019) | 10 lines

[OpenCL] Fix addr space deduction for pointers/references to arrays.

Rewrite the logic for detecting if we are deducing addr space of
a pointee type to take into account special logic for arrays. For
pointers/references to arrays we can have any number of parentheses
expressions as well as nested pointers.

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

------------------------------------------------------------------------

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

5 years agoMerging r369043:
Hans Wennborg [Tue, 20 Aug 2019 10:00:41 +0000 (10:00 +0000)]
Merging r369043:
------------------------------------------------------------------------
r369043 | rnk | 2019-08-15 21:45:28 +0200 (Thu, 15 Aug 2019) | 15 lines

[Sema] Implement DR2386 for C++17 structured binding

Allow implementations to provide complete definitions of
std::tuple_size<T>, but to omit the 'value' member to signal that T is
not tuple-like. The Microsoft standard library implements
std::tuple_size<const T> this way.

If the value member exists, clang still validates that it is an ICE, but
if it does not, then the type is considered to not be tuple-like.

Fixes PR33236

Reviewers: rsmith

Differential Revision: https://reviews.llvm.org/D66040
------------------------------------------------------------------------

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

5 years agoRevert r365860 for PR42966 (with a tweak to the test case for r365862)
Hans Wennborg [Tue, 20 Aug 2019 07:21:14 +0000 (07:21 +0000)]
Revert r365860 for PR42966 (with a tweak to the test case for r365862)

> Author: maskray
> Date: Thu Jul 11 19:01:51 2019
> New Revision: 365860
>
> URL: http://llvm.org/viewvc/llvm-project?rev=365860&view=rev
> Log:
> [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-frame-pointer
>
> Use a tri-state enum to represent shouldUseFramePointer() and
> shouldUseLeafFramePointer().
>
> This simplifies the logic and fixes PR9825:
>   -fno-omit-frame-pointer doesn't imply -mno-omit-leaf-frame-pointer.
>
> and PR24003:
>   /Oy- /O2 should not omit leaf frame pointer: this matches MSVC x86-32.
>   (/Oy- is a no-op on MSVC x86-64.)
>
> and:
>   when CC1 option -mdisable-fp-elim if absent, -momit-leaf-frame-pointer
>   can also be omitted.
>
> The new behavior matches GCC:
>   -fomit-frame-pointer wins over -mno-omit-leaf-frame-pointer
>   -fno-omit-frame-pointer loses out to -momit-leaf-frame-pointer
>
> The behavior makes lots of sense. We have 4 states:
>
> - 00) leaf retained, non-leaf retained
> - 01) leaf retained, non-leaf omitted  (this is invalid)
> - 10) leaf omitted, non-leaf retained  (what -momit-leaf-frame-pointer was designed for)
> - 11) leaf omitted, non-leaf omitted
>
> "omit" options taking precedence over "no-omit" options is the only way
> to make 3 valid states representable with -f(no-)?omit-frame-pointer and
> -m(no-)?omit-leaf-pointer.
>
> Reviewed By: ychen
>
> Differential Revision: https://reviews.llvm.org/D64294

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

5 years agoMerging r368940:
Hans Wennborg [Fri, 16 Aug 2019 08:11:28 +0000 (08:11 +0000)]
Merging r368940:
------------------------------------------------------------------------
r368940 | rsmith | 2019-08-15 00:57:50 +0200 (Thu, 15 Aug 2019) | 19 lines

Fix handling of class member access into a vector type.

When handling a member access into a non-class, non-ObjC-object type, we
would perform a lookup into the surrounding scope as if for an
unqualified lookup. If the member access was followed by a '<' and this
lookup (or the typo-correction for it) found a template name, we'd treat
the member access as naming that template.

Now we treat such accesses as never naming a template if the type of the
object expression is of vector type, so that vector component accesses
are never misinterpreted as naming something else. This is not entirely
correct, since it is in fact valid to name a template from the enclosing
scope in this context, when invoking a pseudo-destructor for the vector
type via an alias template, but that's very much a corner case, and this
change leaves that case only as broken as the corresponding case for
Objective-C types is.

This incidentally adds support for dr2292, which permits a 'template'
keyword at the start of a member access naming a pseudo-destructor.
------------------------------------------------------------------------

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

5 years agoCorrecting clang-cpp release not to spcify supported targets.
Chris Bieneman [Thu, 15 Aug 2019 16:54:13 +0000 (16:54 +0000)]
Correcting clang-cpp release not to spcify supported targets.

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

5 years agoMerging release note update in r368874
Chris Bieneman [Wed, 14 Aug 2019 18:11:11 +0000 (18:11 +0000)]
Merging release note update in r368874

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

5 years agoMerging r368552:
Hans Wennborg [Wed, 14 Aug 2019 12:56:18 +0000 (12:56 +0000)]
Merging r368552:
------------------------------------------------------------------------
r368552 | stulova | 2019-08-12 12:44:07 +0200 (Mon, 12 Aug 2019) | 12 lines

[OpenCL] Fix lang mode predefined macros for C++ mode.

In C++ mode we should only avoid adding __OPENCL_C_VERSION__,
all other predefined macros about the language mode are still
valid.

This change also fixes the language version check in the
headers accordingly.

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

------------------------------------------------------------------------

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

5 years agoMerging r368561:
Hans Wennborg [Wed, 14 Aug 2019 12:53:30 +0000 (12:53 +0000)]
Merging r368561:
------------------------------------------------------------------------
r368561 | svenvh | 2019-08-12 14:44:26 +0200 (Mon, 12 Aug 2019) | 9 lines

[OpenCL] Ignore parentheses for sampler initialization

The sampler handling logic in SemaInit.cpp would inadvertently treat
parentheses around sampler arguments as an implicit cast, leading to
an unreachable "can't implicitly cast lvalue to rvalue with
this cast kind".  Fix by ignoring parentheses once we are in the
sampler initializer case.

Differential Revision: https://reviews.llvm.org/D66080
------------------------------------------------------------------------

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

5 years agoMerging r367802:
Hans Wennborg [Fri, 9 Aug 2019 10:19:34 +0000 (10:19 +0000)]
Merging r367802:
------------------------------------------------------------------------
r367802 | baloghadamsoftware | 2019-08-05 08:45:41 +0200 (Mon, 05 Aug 2019) | 6 lines

[Analyzer] Iterator Checkers - Fix for Crash on Iterator Differences

Iterators differences were mistakenly handled as random decrements which
causes an assertion. This patch fixes this.

------------------------------------------------------------------------

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

5 years agoMerging r368104 and r368202:
Hans Wennborg [Fri, 9 Aug 2019 09:48:02 +0000 (09:48 +0000)]
Merging r368104 and r368202:

------------------------------------------------------------------------
r368104 | void | 2019-08-07 00:41:22 +0200 (Wed, 07 Aug 2019) | 13 lines

Delay diagnosing asm constraints that require immediates until after inlining

Summary:
An inline asm call may result in an immediate input value after inlining.
Therefore, don't emit a diagnostic here if the input isn't an immediate.

Reviewers: joerg, eli.friedman, rsmith

Subscribers: asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, s.egerton, krytarowski, mgorny, riccibruno, eraman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D60943
------------------------------------------------------------------------

------------------------------------------------------------------------
r368202 | void | 2019-08-07 21:36:48 +0200 (Wed, 07 Aug 2019) | 2 lines

Add target requirements for those bots which don't handle x86.

------------------------------------------------------------------------

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

5 years agoMerging r367403:
Hans Wennborg [Fri, 9 Aug 2019 09:40:09 +0000 (09:40 +0000)]
Merging r367403:
------------------------------------------------------------------------
r367403 | lenary | 2019-07-31 11:45:55 +0200 (Wed, 31 Jul 2019) | 20 lines

[RISCV] Support 'f' Inline Assembly Constraint

Summary:
This adds the 'f' inline assembly constraint, as supported by GCC. An
'f'-constrained operand is passed in a floating point register. Exactly
which kind of floating-point register (32-bit or 64-bit) is decided
based on the operand type and the available standard extensions (-f and
-d, respectively).

This patch adds support in both the clang frontend, and LLVM itself.

Reviewers: asb, lewis-revill

Reviewed By: asb

Subscribers: hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D65500
------------------------------------------------------------------------

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

5 years agoMerging r367906:
Hans Wennborg [Tue, 6 Aug 2019 08:22:46 +0000 (08:22 +0000)]
Merging r367906:
------------------------------------------------------------------------
r367906 | jkorous | 2019-08-05 20:44:07 +0200 (Mon, 05 Aug 2019) | 5 lines

[DirectoryWatcher][linux] Fix build for older kernels

Apparently kernel support for IN_EXCL_UNLINK in inotify_add_watch() doesn't imply it's defined in sys/inotify.h.

https://bugs.llvm.org/show_bug.cgi?id=42824
------------------------------------------------------------------------

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

5 years agoMerging r367675 and r367823:
Hans Wennborg [Tue, 6 Aug 2019 07:59:51 +0000 (07:59 +0000)]
Merging r367675 and r367823:

------------------------------------------------------------------------
r367675 | stulova | 2019-08-02 13:19:35 +0200 (Fri, 02 Aug 2019) | 10 lines

[OpenCL] Allow OpenCL C style vector initialization in C++

Allow creating vector literals from other vectors.

 float4 a = (float4)(1.0f, 2.0f, 3.0f, 4.0f);
 float4 v = (float4)(a.s23, a.s01);

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

------------------------------------------------------------------------

------------------------------------------------------------------------
r367823 | stulova | 2019-08-05 11:50:28 +0200 (Mon, 05 Aug 2019) | 6 lines

[OpenCL] Fix vector literal test broken in rL367675.

Avoid checking alignment unnecessary that is not portable
among targets.

------------------------------------------------------------------------

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

5 years agoMerging r367661:
Hans Wennborg [Mon, 5 Aug 2019 07:31:33 +0000 (07:31 +0000)]
Merging r367661:
------------------------------------------------------------------------
r367661 | hans | 2019-08-02 09:51:41 +0200 (Fri, 02 Aug 2019) | 5 lines

Don't try emitting dllexported explicitly defaulted non-trivial ctors twice during explicit template instantiation definition (PR42857)

Trying to emit the definition twice triggers an assert.

Differential revision: https://reviews.llvm.org/D65579
------------------------------------------------------------------------

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

5 years agoMerging r367520:
Hans Wennborg [Mon, 5 Aug 2019 07:27:39 +0000 (07:27 +0000)]
Merging r367520:
------------------------------------------------------------------------
r367520 | hans | 2019-08-01 10:01:09 +0200 (Thu, 01 Aug 2019) | 15 lines

Delay emitting dllexport explicitly defaulted members until the class is fully parsed (PR40006)

This is similar to r245139, but that only addressed dllexported classes.
It was still possible to run into the same problem with dllexported
members in an otherwise normal class (see bug). This uses the same
strategy to fix: delay defining the method until the whole class has
been parsed.

(The easiest way to see the ordering problem is in
Parser::ParseCXXMemberSpecification(): it calls
ParseLexedMemberInitializers() *after* ActOnFinishCXXMemberDecls(),
which was trying to define the dllexport method. Now we delay it to
ActOnFinishCXXNonNestedClass() which is called after both of those.)

Differential revision: https://reviews.llvm.org/D65511
------------------------------------------------------------------------

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

5 years agoMerging r367530:
Hans Wennborg [Fri, 2 Aug 2019 13:39:28 +0000 (13:39 +0000)]
Merging r367530:
------------------------------------------------------------------------
r367530 | ibiryukov | 2019-08-01 11:10:37 +0200 (Thu, 01 Aug 2019) | 17 lines

[Preprocessor] Always discard body of #define if we failed to parse it

Summary:
Preivously we would only discard it if we failed to parse parameter lists.
If we do not consume the body, parser sees tokens inside directive. In
turn, this leads to spurious diagnostics and a crash in TokenBuffer, see
the added tests.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65517
------------------------------------------------------------------------

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

5 years agoUpdate release notes for things I've done since the last release
Martin Storsjo [Thu, 1 Aug 2019 20:44:45 +0000 (20:44 +0000)]
Update release notes for things I've done since the last release

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

5 years agoMerging r367387:
Hans Wennborg [Thu, 1 Aug 2019 09:03:00 +0000 (09:03 +0000)]
Merging r367387:
------------------------------------------------------------------------
r367387 | jdoerfert | 2019-07-31 07:16:38 +0200 (Wed, 31 Jul 2019) | 26 lines

[Fix] Customize warnings for missing built-in types

If we detect a built-in declaration for which we cannot derive a type
matching the pattern in the Builtins.def file, we currently emit a
warning that the respective header is needed. However, this is not
necessarily the behavior we want as it has no connection to the location
of the declaration (which can actually be in the header in question).
Instead, this warning is generated
  - if we could not build the type for the pattern on file (for some
    reason). Here we should make the reason explicit. The actual problem
    is otherwise circumvented as the warning is misleading, see [0] for
    an example.
  - if we could not build the type for the pattern because we do not
    have a type on record, possible since D55483, we should not emit any
    warning. See [1] for a legitimate problem.

This patch address both cases. For the "setjmp" family a new warning is
introduced and for built-ins without type on record, so far
"pthread_create", we do not emit the warning anymore.

Also see: PR40692

[0] https://lkml.org/lkml/2019/1/11/718
[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235583

Differential Revision: https://reviews.llvm.org/D58091
------------------------------------------------------------------------

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

5 years agoMerging r367305:
Hans Wennborg [Thu, 1 Aug 2019 08:49:35 +0000 (08:49 +0000)]
Merging r367305:
------------------------------------------------------------------------
r367305 | ro | 2019-07-30 12:38:41 +0200 (Tue, 30 Jul 2019) | 32 lines

[Driver] Define _FILE_OFFSET_BITS=64 on Solaris

make check-all currently fails on x86_64-pc-solaris2.11 when building with GCC 9:

  Undefined                       first referenced
   symbol                             in file
  _ZN11__sanitizer14internal_lseekEimi SANITIZER_TEST_OBJECTS.sanitizer_libc_test.cc.i386.o
  _ZN11__sanitizer23MapWritableFileToMemoryEPvmim SANITIZER_TEST_OBJECTS.sanitizer_libc_test.cc.i386.o
  ld: fatal: symbol referencing errors
  clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
  make[3]: *** [projects/compiler-rt/lib/sanitizer_common/tests/CMakeFiles/TSanitizer-i386-Test.dir/build.make:92: projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-i386-Test] Error 1

While e.g. __sanitizer::internal_lseek is defined in sanitizer_solaris.cc, g++ 9
predefines _FILE_OFFSET_BITS=64 while clang++ currently does not.

This patch resolves this inconsistency by following the gcc lead, which allows
make check-all to finish successfully.

There's one caveat: gcc defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE for C++ only, while clang has long been doing it for
all languages.  I'd like to keep it this way because those macros do is to make
declarations of fseek/ftello (_LARGEFILE_SOURCE) resp. the 64-bit versions
of largefile functions (*64 with _LARGEFILE64_SOURCE) visible additionally.
However, _FILE_OFFSET_BITS=64 changes all affected functions to be largefile-aware.
I'd like to restrict this to C++, just like gcc does.

To avoid a similar inconsistence with host compilers that don't predefine _FILE_OFFSET_BITS=64
(e.g. clang < 9, gcc < 9), this needs a compantion patch https://reviews.llvm.org/D64483.

Tested on x86_64-pc-solaris2.11.

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

------------------------------------------------------------------------

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

5 years agoMerging r367323:
Hans Wennborg [Thu, 1 Aug 2019 08:40:43 +0000 (08:40 +0000)]
Merging r367323:
------------------------------------------------------------------------
r367323 | dmajor | 2019-07-30 17:32:49 +0200 (Tue, 30 Jul 2019) | 9 lines

[COFF][ARM64] Reorder handling of aarch64 MSVC builtins

In `CodeGenFunction::EmitAArch64BuiltinExpr()`, bulk move all of the aarch64 MSVC-builtin cases to an earlier point in the function (the `// Handle non-overloaded intrinsics first` switch block) in order to avoid an unreachable in `GetNeonType()`. The NEON type-overloading logic is not appropriate for the Windows builtins.

Fixes https://llvm.org/pr42775

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

------------------------------------------------------------------------

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

5 years agoMerging r366878 and r367301:
Hans Wennborg [Wed, 31 Jul 2019 14:20:16 +0000 (14:20 +0000)]
Merging r366878 and r367301:

------------------------------------------------------------------------
r366878 | s.desmalen | 2019-07-24 10:42:34 +0200 (Wed, 24 Jul 2019) | 12 lines

[SVE][Inline-Asm] Add support to specify SVE registers in the clobber list

Adds the SVE vector and predicate registers to the list of known registers.

Patch by Kerry McLaughlin.

Reviewers: erichkeane, sdesmalen, rengolin

Reviewed By: sdesmalen

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

------------------------------------------------------------------------

------------------------------------------------------------------------
r367301 | s.desmalen | 2019-07-30 12:14:39 +0200 (Tue, 30 Jul 2019) | 15 lines

[AArch64] Disable __ARM_FEATURE_SVE without ACLE.

The Arm C Language Extensions for SVE document specifies that
__ARM_FEATURE_SVE should be set when the compiler supports SVE and
implements all the extensions described in the document.

This is currently not yet the case, so the feature should be disabled
until the compiler can provide all the extensions as described.

Reviewers: c-rhodes, rengolin, rovka, ktkachov

Reviewed By: rengolin

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

------------------------------------------------------------------------

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

5 years agoMerging r367008:
Hans Wennborg [Tue, 30 Jul 2019 08:44:48 +0000 (08:44 +0000)]
Merging r367008:
------------------------------------------------------------------------
r367008 | stulova | 2019-07-25 13:04:29 +0200 (Thu, 25 Jul 2019) | 12 lines

[OpenCL] Rename lang mode flag for C++ mode

Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++
or -std=clc++/-std=CLC++.

This aligns with OpenCL C conversion and removes ambiguity
with OpenCL C++.

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

------------------------------------------------------------------------

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

5 years agoUsersManual.rst: Update clang-cl command reference
Hans Wennborg [Mon, 29 Jul 2019 09:16:42 +0000 (09:16 +0000)]
UsersManual.rst: Update clang-cl command reference

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

5 years agoMerging r367055:
Hans Wennborg [Mon, 29 Jul 2019 08:56:00 +0000 (08:56 +0000)]
Merging r367055:
------------------------------------------------------------------------
r367055 | compnerd | 2019-07-25 22:59:48 +0200 (Thu, 25 Jul 2019) | 6 lines

Revert "Revert "CodeGen: ensure placeholder instruction for cleanup is created""

This reverts commit fd1274fa78cb0fd32cc1fa2e6f5bb8e62d29df19.

Add an explicit triple for the test which is pattern matching overly
aggressively.
------------------------------------------------------------------------

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

5 years ago[clang][docs][release notes] mention asm goto support
Hans Wennborg [Fri, 26 Jul 2019 21:31:11 +0000 (21:31 +0000)]
[clang][docs][release notes] mention asm goto support

By Nick Desaulniers!

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

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

5 years agoMerging r367134:
Hans Wennborg [Fri, 26 Jul 2019 20:47:20 +0000 (20:47 +0000)]
Merging r367134:
------------------------------------------------------------------------
r367134 | nathan-huckleberry | 2019-07-26 19:29:35 +0200 (Fri, 26 Jul 2019) | 16 lines

[Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

Summary:
Do not automatically report self references of structs in statement expression
as warnings. Instead wait for uninitialized cfg analysis.
https://bugs.llvm.org/show_bug.cgi?id=42604

Reviewers: aaron.ballman, rsmith, nickdesaulniers

Reviewed By: aaron.ballman, nickdesaulniers

Subscribers: nathanchance, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64678
------------------------------------------------------------------------

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

5 years agoMerging r367039 and r367103:
Hans Wennborg [Fri, 26 Jul 2019 16:45:43 +0000 (16:45 +0000)]
Merging r367039 and r367103:
------------------------------------------------------------------------
r367039 | erichkeane | 2019-07-25 19:14:45 +0200 (Thu, 25 Jul 2019) | 6 lines

Remove CallingConvMethodType

This seems to be an old vestage of a previous implementation of getting
the default calling convention, and everything is now using
CXXABI/ASTContext's getDefaultCallingConvention.  Remove it, since it
isn't doing anything.
------------------------------------------------------------------------

------------------------------------------------------------------------
r367103 | erichkeane | 2019-07-26 14:36:12 +0200 (Fri, 26 Jul 2019) | 6 lines

Make the CXXABIs respect the target's default calling convention.

SPIR targets need to have all functions be SPIR calling convention,
however the CXXABIs were just returning CC_C in all non-'this-CC' cases.

https://reviews.llvm.org/D65294
------------------------------------------------------------------------

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

5 years agoGenerate {Attribute,ClangCommandLine,Diagnostics}Reference.rst
Hans Wennborg [Thu, 25 Jul 2019 00:29:40 +0000 (00:29 +0000)]
Generate {Attribute,ClangCommandLine,Diagnostics}Reference.rst

$ bin/clang-tblgen -gen-diag-docs -I../cfe.src/include \
      -I../cfe.src/include/clang/Basic/ \
      ../cfe.src/include/clang/Basic/Diagnostic.td -o \
      ../cfe.src/docs/DiagnosticsReference.rst && \
bin/clang-tblgen -gen-attr-docs -I../cfe.src/include \
        ../cfe.src/include/clang/Basic/Attr.td -o \
        ../cfe.src/docs/AttributeReference.rst && \
bin/clang-tblgen -gen-opt-docs -I../cfe.src/include \
        -I../cfe.src/include/clang/Driver -I../llvm.src/include \
        ../cfe.src/include/clang/Driver/ClangOptionDocs.td -o \
        ../cfe.src/docs/ClangCommandLineReference.rst

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

5 years agoMerging r366670 and r366694:
Hans Wennborg [Tue, 23 Jul 2019 14:58:27 +0000 (14:58 +0000)]
Merging r366670 and r366694:
------------------------------------------------------------------------
r366670 | mantognini | 2019-07-22 11:39:13 +0200 (Mon, 22 Jul 2019) | 4 lines

[OpenCL] Improve destructor support in C++ for OpenCL

This re-applies r366422 with a fix for Bug PR42665 and a new regression
test.
------------------------------------------------------------------------

------------------------------------------------------------------------
r366694 | mantognini | 2019-07-22 16:47:36 +0200 (Mon, 22 Jul 2019) | 5 lines

[NFC] Relaxed regression tests for PR42665

Following up on the buildbot failures, this commits relaxes some tests:
instead of checking for specific IR output, it now ensures that the
underlying issue (the crash), and only that, doesn't happen.
------------------------------------------------------------------------

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

5 years agoMerging r366448 and r366457:
Hans Wennborg [Mon, 22 Jul 2019 18:12:26 +0000 (18:12 +0000)]
Merging r366448 and r366457:
------------------------------------------------------------------------
r366448 | ibiryukov | 2019-07-18 17:21:34 +0200 (Thu, 18 Jul 2019) | 24 lines

[ASTUnit] Fix a regression in cached completions

Summary:
After r345152 cached completions started adding namespaces after
nested name specifiers, e.g. in `some_name::^`

The CCC_Symbol indicates the completed item cannot be a namespace (it is
described as being "a type, a function or a variable" in the comments).

Therefore, 'nested specifier' completions should only be added from cache
when the context is CCC_SymbolOrNewName (which roughly seems to indicate
that a nested name specifier is allowed).

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

Reviewers: kadircet, sammccall

Reviewed By: kadircet, sammccall

Subscribers: arphaman, nik, sammccall, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64918
------------------------------------------------------------------------

------------------------------------------------------------------------
r366457 | ibiryukov | 2019-07-18 18:24:09 +0200 (Thu, 18 Jul 2019) | 1 line

[ASTUnit] Attempt to unbreak Windows buildbots after r366448
------------------------------------------------------------------------

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

5 years agoMerging r366699:
Hans Wennborg [Mon, 22 Jul 2019 17:56:32 +0000 (17:56 +0000)]
Merging r366699:
------------------------------------------------------------------------
r366699 | probinson | 2019-07-22 18:14:09 +0200 (Mon, 22 Jul 2019) | 1 line

[X86] Remove const from some intrinsics that shouldn't have them
------------------------------------------------------------------------

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

5 years agoMerging r366483:
Hans Wennborg [Mon, 22 Jul 2019 17:45:30 +0000 (17:45 +0000)]
Merging r366483:
------------------------------------------------------------------------
r366483 | abataev | 2019-07-18 21:40:24 +0200 (Thu, 18 Jul 2019) | 6 lines

[OPENMP]Fix sharing of threadprivate variables with TLS support.

If the threadprivate variable is used in the copyin clause on inner
parallel directive with TLS support, we capture this variable in all
outer OpenMP scopes. It leads to the fact that in all scopes we're
working with the original variable, not the threadprivate copies.
------------------------------------------------------------------------

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

5 years agoMerging r366474:
Hans Wennborg [Mon, 22 Jul 2019 17:42:16 +0000 (17:42 +0000)]
Merging r366474:
------------------------------------------------------------------------
r366474 | abataev | 2019-07-18 19:49:13 +0200 (Thu, 18 Jul 2019) | 8 lines

[OPENMP]Provide correct data sharing attributes for loop control
variables.

Loop control variables are private in loop-based constructs and we shall
take this into account when generate the code for inner constructs.
Currently, those variables are reported as shared in many cases. Moved
the analysis of the data-sharing attributes of the loop control variable
to an early semantic stage to correctly handle their attributes.
------------------------------------------------------------------------

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

5 years agoMerging r366511:
Hans Wennborg [Fri, 19 Jul 2019 09:55:32 +0000 (09:55 +0000)]
Merging r366511:
------------------------------------------------------------------------
r366511 | lhames | 2019-07-19 00:47:18 +0200 (Fri, 19 Jul 2019) | 3 lines

Update the SimpleJIT class in the clang-interpreter example to use ORCv2.

This will remove the ORCv1 deprecation warnings.
------------------------------------------------------------------------

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

5 years agoMerging r366480:
Hans Wennborg [Fri, 19 Jul 2019 09:43:12 +0000 (09:43 +0000)]
Merging r366480:
------------------------------------------------------------------------
r366480 | asb | 2019-07-18 20:29:59 +0200 (Thu, 18 Jul 2019) | 25 lines

[RISCV] Hard float ABI support

The RISC-V hard float calling convention requires the frontend to:

* Detect cases where, once "flattened", a struct can be passed using
int+fp or fp+fp registers under the hard float ABI and coerce to the
appropriate type(s)
* Track usage of GPRs and FPRs in order to gate the above, and to
determine when signext/zeroext attributes must be added to integer
scalars

This patch attempts to do this in compliance with the documented ABI,
and uses ABIArgInfo::CoerceAndExpand in order to do this. @rjmccall, as
author of that code I've tagged you as reviewer for initial feedback on
my usage.

Note that a previous version of the ABI indicated that when passing an
int+fp struct using a GPR+FPR, the int would need to be sign or
zero-extended appropriately. GCC never did this and the ABI was changed,
which makes life easier as ABIArgInfo::CoerceAndExpand can't currently
handle sign/zero-extension attributes.

Re-landed after backing out 366450 due to missed hunks.

Differential Revision: https://reviews.llvm.org/D60456
------------------------------------------------------------------------

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

5 years agoMerging r366429:
Hans Wennborg [Fri, 19 Jul 2019 09:36:22 +0000 (09:36 +0000)]
Merging r366429:
------------------------------------------------------------------------
r366429 | ibiryukov | 2019-07-18 13:55:33 +0200 (Thu, 18 Jul 2019) | 5 lines

Revert r366422: [OpenCL] Improve destructor support in C++ for OpenCL

Reason: this commit causes crashes in the clang compiler when building
LLVM Support with libc++, see https://bugs.llvm.org/show_bug.cgi?id=42665
for details.
------------------------------------------------------------------------

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

5 years agoCreating release_90 branch off revision 366426
Hans Wennborg [Thu, 18 Jul 2019 11:53:54 +0000 (11:53 +0000)]
Creating release_90 branch off revision 366426

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

5 years ago[OpenCL] Improve destructor support in C++ for OpenCL
Marco Antognini [Thu, 18 Jul 2019 10:04:18 +0000 (10:04 +0000)]
[OpenCL] Improve destructor support in C++ for OpenCL

Summary:
This patch does mainly three things:
 1. It fixes a false positive error detection in Sema that is similar to
    D62156. The error happens when explicitly calling an overloaded
    destructor for different address spaces.
 2. It selects the correct destructor when multiple overloads for
    address spaces are available.
 3. It inserts the expected address space cast when invoking a
    destructor, if needed, and therefore fixes a crash due to the unmet
    assertion in llvm::CastInst::Create.

The following is a reproducer of the three issues:

    struct MyType {
      ~MyType() {}
      ~MyType() __constant {}
    };

    __constant MyType myGlobal{};

    kernel void foo() {
      myGlobal.~MyType(); // 1 and 2.
      // 1. error: cannot initialize object parameter of type
      //    '__generic MyType' with an expression of type '__constant MyType'
      // 2. error: no matching member function for call to '~MyType'
    }

    kernel void bar() {
      // 3. The implicit call to the destructor crashes due to:
      //    Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed.
      //    in llvm::CastInst::Create.
      MyType myLocal;
    }

The added test depends on D62413 and covers a few more things than the
above reproducer.

Subscribers: yaxunl, Anastasia, cfe-commits

Tags: #clang

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

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

5 years ago[OpenCL] Update comments/diagnostics to refer to C++ for OpenCL
Anastasia Stulova [Thu, 18 Jul 2019 10:02:35 +0000 (10:02 +0000)]
[OpenCL] Update comments/diagnostics to refer to C++ for OpenCL

Clang doesn't implement OpenCL C++, change the comments to
reflect that.

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

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

5 years ago[OpenCL][PR42033] Fix addr space deduction with template parameters
Anastasia Stulova [Thu, 18 Jul 2019 09:12:49 +0000 (09:12 +0000)]
[OpenCL][PR42033] Fix addr space deduction with template parameters

If dependent types appear in pointers or references we allow addr
space deduction because the addr space in template argument will
belong to the pointee and not the pointer or reference itself.

We also don't diagnose addr space on a function return type after
template instantiation. If any addr space for the return type was
provided on a template parameter this will be diagnosed during the
parsing of template definition.

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

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

5 years ago[CodeComplete] Fix ASTUnit cached completion of macros from preamble, broken in r342528
Sam McCall [Thu, 18 Jul 2019 07:17:49 +0000 (07:17 +0000)]
[CodeComplete] Fix ASTUnit cached completion of macros from preamble, broken in r342528

Summary:
The problem is the default LoadExternal with no completer, which happens when
loading global results.

Reviewers: ilya-biryukov, nik

Subscribers: arphaman, llvm-commits

Tags: #llvm

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

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

5 years ago[PowerPC][Clang] Remove use of malloc in mm_malloc
Qiu Chaofan [Thu, 18 Jul 2019 06:20:12 +0000 (06:20 +0000)]
[PowerPC][Clang] Remove use of malloc in mm_malloc

Remove dependency of malloc in implementation of mm_malloc function in PowerPC
intrinsics and alignment assumption on glibc.

Reviewed By: Hal Finkel

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

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

5 years ago[analyzer] MallocChecker: Prevent Integer Set Library false positives
Csaba Dabis [Thu, 18 Jul 2019 00:03:55 +0000 (00:03 +0000)]
[analyzer] MallocChecker: Prevent Integer Set Library false positives

Summary:
Integer Set Library using retain-count based allocation which is not
modeled in MallocChecker.

Reviewed By: NoQ

Tags: #clang

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

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

5 years agohwasan: Initialize the pass only once.
Peter Collingbourne [Wed, 17 Jul 2019 21:45:19 +0000 (21:45 +0000)]
hwasan: Initialize the pass only once.

This will let us instrument globals during initialization. This required
making the new PM pass a module pass, which should still provide access to
analyses via the ModuleAnalysisManager.

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

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

5 years agoRenamed and changed the wording of warn_cconv_ignored
Sunil Srivastava [Wed, 17 Jul 2019 20:41:26 +0000 (20:41 +0000)]
Renamed and changed the wording of warn_cconv_ignored

As discussed in D64780 the wording of this warning message is being
changed to say 'is not supported' instead of 'ignored', and the
diag ID itself is being changed to warn_cconv_not_supported.

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

5 years ago[OPENMP]Fix PR42632: crash on the analysis of the OpenMP constructs.
Alexey Bataev [Wed, 17 Jul 2019 18:03:39 +0000 (18:03 +0000)]
[OPENMP]Fix PR42632: crash on the analysis of the OpenMP constructs.

Fixed processing of the CapturedStmt children to fix the crash of the
OpenMP constructs during analysis.

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

5 years agoRevert [AArch64] Add support for Transactional Memory Extension (TME)
Momchil Velikov [Wed, 17 Jul 2019 17:43:32 +0000 (17:43 +0000)]
Revert [AArch64] Add support for Transactional Memory Extension (TME)

This reverts r366322 (git commit 4b8da3a503e434ddbc08ecf66582475765f449bc)

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

5 years ago[Docs][OpenCL] Documentation of C++ for OpenCL mode
Anastasia Stulova [Wed, 17 Jul 2019 17:21:31 +0000 (17:21 +0000)]
[Docs][OpenCL] Documentation of C++ for OpenCL mode

Added documentation of C++ for OpenCL mode into Clang
User Manual and Language Extensions document.

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

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

5 years ago[OPENMP]Fix crash in LoopCounterRefChecker when MemberExpr is not Var or Field
Mike Rice [Wed, 17 Jul 2019 15:18:45 +0000 (15:18 +0000)]
[OPENMP]Fix crash in LoopCounterRefChecker when MemberExpr is not Var or Field

checkDecl is only valid for VarDecls or FieldDecls, since getCanonicalDecl
expects only these. Prevent other Decl kinds (such as CXXMethodDecls and
EnumConstantDecls) from entering and asserting.

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

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

5 years ago[ASTImporter] Fix structural eq of lambdas
Gabor Marton [Wed, 17 Jul 2019 14:40:09 +0000 (14:40 +0000)]
[ASTImporter] Fix structural eq of lambdas

Summary:
The structural equivalence check reported false eq between lambda classes
with different parameters in their call signature.
The solution is to check the methods for equality too in case of lambda
classes.

Reviewers: a_sidorin, a.sidorin

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

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

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

5 years ago[ASTImporter] Fix LLDB lookup in transparent ctx and with ext src
Gabor Marton [Wed, 17 Jul 2019 13:47:46 +0000 (13:47 +0000)]
[ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

Summary:
With LLDB we use localUncachedLookup(), however, that fails to find
Decls when a transparent context is involved and the given DC has
external lexical storage.  The solution is to use noload_lookup, which
works well with transparent contexts.  But, we cannot use only the
noload_lookup since the slow case of localUncachedLookup is still needed
in some other cases.

These other cases are handled in ASTImporterLookupTable, but we cannot
use that with LLDB since that traverses through the AST which initiates
the load of external decls again via DC::decls().

We must avoid loading external decls during the import becuase
ExternalASTSource is implemented with ASTImporter, so external loads
during import results in uncontrolled and faulty import.

Reviewers: shafik, teemperor, jingham, clayborg, a_sidorin, a.sidorin

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits, lldb-commits

Tags: #clang, #lldb

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

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

5 years ago[AArch64] Add support for Transactional Memory Extension (TME)
Momchil Velikov [Wed, 17 Jul 2019 13:23:27 +0000 (13:23 +0000)]
[AArch64] Add support for Transactional Memory Extension (TME)

TME is a future architecture technology, documented in

https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools
https://developer.arm.com/docs/ddi0601/a

More about the future architectures:

https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/new-technologies-for-the-arm-a-profile-architecture

This patch adds support for the TME instructions TSTART, TTEST, TCOMMIT, and
TCANCEL and the target feature/arch extension "tme".

It also implements TME builtin functions, defined in ACLE Q2 2019
(https://developer.arm.com/docs/101028/latest)

Patch by Javed Absar and Momchil Velikov

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

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

5 years ago[AArch64] Consistent types and naming for AArch64 target features (NFC)
Momchil Velikov [Wed, 17 Jul 2019 11:24:37 +0000 (11:24 +0000)]
[AArch64] Consistent types and naming for AArch64 target features (NFC)

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

Committed as obvious.

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

5 years ago[OpenCL][Sema] Minor refactoring and constraint checking
Marco Antognini [Wed, 17 Jul 2019 08:52:09 +0000 (08:52 +0000)]
[OpenCL][Sema] Minor refactoring and constraint checking

Summary:
Simplify code a bit and add assertion to address post-landing comments
from D64083.

Subscribers: yaxunl, Anastasia, cfe-commits

Tags: #clang

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

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

5 years ago[Driver] Enable __cxa_atexit on Solaris
Rainer Orth [Wed, 17 Jul 2019 08:37:00 +0000 (08:37 +0000)]
[Driver] Enable __cxa_atexit on Solaris

Starting with Solaris 11.4 (which is now the required minimal version), Solaris does
support __cxa_atexit.  This patch reflects that.

One might consider removing the affected tests altogether instead of inverting them,
as is done on other targets.

Besides, this lets two ASan tests PASS:

  AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc
  AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc

Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

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

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

5 years agoAMDGPU: Add some missing builtins
Matt Arsenault [Wed, 17 Jul 2019 00:01:03 +0000 (00:01 +0000)]
AMDGPU: Add some missing builtins

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

5 years agoFix OpenCLCXX test on 32-bit Windows where thiscall is present
Reid Kleckner [Tue, 16 Jul 2019 23:44:33 +0000 (23:44 +0000)]
Fix OpenCLCXX test on 32-bit Windows where thiscall is present

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

5 years agoFix darwin-ld.c if dsymutil.exe exists on PATH
Reid Kleckner [Tue, 16 Jul 2019 23:38:05 +0000 (23:38 +0000)]
Fix darwin-ld.c if dsymutil.exe exists on PATH

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

5 years agoFix a typo in target features
George Burgess IV [Tue, 16 Jul 2019 22:32:17 +0000 (22:32 +0000)]
Fix a typo in target features

There was a slight typo in r364352 that ended up causing our backend to
complain on some x86 Android builds. This CL fixes that.

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

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

5 years ago[WebAssembly] Implement thread-local storage (local-exec model)
Guanzhong Chen [Tue, 16 Jul 2019 22:00:45 +0000 (22:00 +0000)]
[WebAssembly] Implement thread-local storage (local-exec model)

Summary:
Thread local variables are placed inside a `.tdata` segment. Their symbols are
offsets from the start of the segment. The address of a thread local variable
is computed as `__tls_base` + the offset from the start of the segment.

`.tdata` segment is a passive segment and `memory.init` is used once per thread
to initialize the thread local storage.

`__tls_base` is a wasm global. Since each thread has its own wasm instance,
it is effectively thread local. Currently, `__tls_base` must be initialized
at thread startup, and so cannot be used with dynamic libraries.

`__tls_base` is to be initialized with a new linker-synthesized function,
`__wasm_init_tls`, which takes as an argument a block of memory to use as the
storage for thread locals. It then initializes the block of memory and sets
`__tls_base`. As `__wasm_init_tls` will handle the memory initialization,
the memory does not have to be zeroed.

To help allocating memory for thread-local storage, a new compiler intrinsic
is introduced: `__builtin_wasm_tls_size()`. This instrinsic function returns
the size of the thread-local storage for the current function.

The expected usage is to run something like the following upon thread startup:

    __wasm_init_tls(malloc(__builtin_wasm_tls_size()));

Reviewers: tlively, aheejin, kripken, sbc100

Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, jfb, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

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

5 years ago[clang-format] Don't detect call to ObjC class method as C++11 attribute specifier
Ben Hamilton [Tue, 16 Jul 2019 21:29:40 +0000 (21:29 +0000)]
[clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

Summary:
Previously, clang-format detected something like the following as a C++11 attribute specifier.

  @[[NSArray class]]

instead of an array with an Objective-C method call inside. In general, when the attribute specifier checking runs, if it sees 2 identifiers in a row, it decides that the square brackets represent an Objective-C method call. However, here, `class` is tokenized as a keyword instead of an identifier, so this check fails.

To fix this, the attribute specifier first checks whether the first square bracket has an "@" before it. If it does, then that square bracket is not the start of a attribute specifier because it is an Objective-C array literal. (The assumption is that @[[.*]] is not valid C/C++.)

Contributed by rkgibson2.

Reviewers: benhamilton

Reviewed By: benhamilton

Subscribers: aaron.ballman, cfe-commits

Tags: #clang

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

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

5 years agofix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic
Yonghong Song [Tue, 16 Jul 2019 17:24:33 +0000 (17:24 +0000)]
fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic

The original commit is r366076. It is temporarily reverted (r366155)
due to test failure. This resubmit makes test more robust by accepting
regex instead of hardcoded names/references in several places.

This is a followup patch for https://reviews.llvm.org/D61809.
Handle unnamed bitfield properly and add more test cases.

Fixed the unnamed bitfield issue. The unnamed bitfield is ignored
by debug info, so we need to ignore such a struct/union member
when we try to get the member index in the debug info.

D61809 contains two test cases but not enough as it does
not checking generated IRs in the fine grain level, and also
it does not have semantics checking tests.
This patch added unit tests for both code gen and semantics checking for
the new intrinsic.

Signed-off-by: Yonghong Song <yhs@fb.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366231 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[OpenCL] Fixing sampler initialisations for C++ mode.
Neil Hickey [Tue, 16 Jul 2019 14:57:32 +0000 (14:57 +0000)]
[OpenCL] Fixing sampler initialisations for C++ mode.

Allow conversions between integer and sampler type.

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

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

5 years ago[OPENMP]Add support for analysis of if clauses.
Alexey Bataev [Tue, 16 Jul 2019 14:51:46 +0000 (14:51 +0000)]
[OPENMP]Add support for analysis of if clauses.

Summary:
Added support for analysis of if clauses in the OpenMP directives to be
able to check for the use of uninitialized variables.

Reviewers: NoQ

Subscribers: guansong, jfb, jdoerfert, caomhin, kkwli0, cfe-commits

Tags: clang

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

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

5 years ago[Driver] Don't pass --dynamic-linker to ld on Solaris
Rainer Orth [Tue, 16 Jul 2019 11:06:43 +0000 (11:06 +0000)]
[Driver] Don't pass --dynamic-linker to ld on Solaris

I noticed that clang currently passes --dynamic-linker to ld.  This has been the case
since Solaris 11 support was added initially back in 2012 by David Chisnall (r150580).
I couldn't find any patch submission, let alone a justification, for this, and it seems
completely useless: --dynamic-linker is a gld compatibility form of the option, the
native option being -I.  First of all, however, the dynamic linker passed is simply the
default, so there's no reason at all to specify it in the first place.

This patch removes passing the option and adjusts the affected testcase accordingly.

Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

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

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

5 years ago[SemaTemplate] Fix uncorrected typos after pack expansion
Sam McCall [Tue, 16 Jul 2019 10:30:21 +0000 (10:30 +0000)]
[SemaTemplate] Fix uncorrected typos after pack expansion

Summary:
This case is particularly important for clangd, as it is triggered after
inserting the snippet for variadic functions.

Reviewers: kadircet, ilya-biryukov

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years ago[AArch64] Implement __jcvt intrinsic from Armv8.3-A
Kyrylo Tkachov [Tue, 16 Jul 2019 09:27:39 +0000 (09:27 +0000)]
[AArch64] Implement __jcvt intrinsic from Armv8.3-A

The jcvt intrinsic defined in ACLE [1] is available when ARM_FEATURE_JCVT is defined.

This change introduces the AArch64 intrinsic, wires it up to the instruction and a new clang builtin function.
The __ARM_FEATURE_JCVT macro is now defined when an Armv8.3-A or higher target is used.
I've implemented the target detection logic in Clang so that this feature is enabled for architectures from armv8.3-a onwards (so -march=armv8.4-a also enables this, for example).

make check-all didn't show any new failures.

[1] https://developer.arm.com/docs/101028/latest/data-processing-intrinsics

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

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

5 years ago[clang-scan-view] Force utf-8 when handling report (python2 only)
Serge Guelton [Tue, 16 Jul 2019 08:56:47 +0000 (08:56 +0000)]
[clang-scan-view] Force utf-8 when handling report (python2 only)

Original patch by random human <random.bored.human@gmail.com>

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

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

5 years agoFinish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"
Stephan Bergmann [Tue, 16 Jul 2019 06:23:27 +0000 (06:23 +0000)]
Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"

i.e., recent 5745eccef54ddd3caca278d1d292a88b2281528b:

* Bump the function_type_mismatch handler version, as its signature has changed.

* The function_type_mismatch handler can return successfully now, so
  SanitizerKind::Function must be AlwaysRecoverable (like for
  SanitizerKind::Vptr).

* But the minimal runtime would still unconditionally treat a call to the
  function_type_mismatch handler as failure, so disallow -fsanitize=function in
  combination with -fsanitize-minimal-runtime (like it was already done for
  -fsanitize=vptr).

* Add tests.

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

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

5 years agoFix parameter name comments using clang-tidy. NFC.
Rui Ueyama [Tue, 16 Jul 2019 04:46:31 +0000 (04:46 +0000)]
Fix parameter name comments using clang-tidy. NFC.

This patch applies clang-tidy's bugprone-argument-comment tool
to LLVM, clang and lld source trees. Here is how I created this
patch:

$ git clone https://github.com/llvm/llvm-project.git
$ cd llvm-project
$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \
    -DLLVM_ENABLE_PROJECTS='clang;lld;clang-tools-extra' \
    -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_LLD=On \
    -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../llvm
$ ninja
$ parallel clang-tidy -checks='-*,bugprone-argument-comment' \
    -config='{CheckOptions: [{key: StrictMode, value: 1}]}' -fix \
    ::: ../llvm/lib/**/*.{cpp,h} ../clang/lib/**/*.{cpp,h} ../lld/**/*.{cpp,h}

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

5 years agoRevert "[OPENMP]Add support for analysis of if clauses."
Ali Tamur [Tue, 16 Jul 2019 03:20:15 +0000 (03:20 +0000)]
Revert "[OPENMP]Add support for analysis of if clauses."

This reverts commit rL366068.
The patch broke 86 tests under clang/test/OpenMP/ when run with address sanitizer.

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

5 years agoChange a lit test to permit vendor specific clang version
Nathan Lanza [Tue, 16 Jul 2019 02:05:52 +0000 (02:05 +0000)]
Change a lit test to permit vendor specific clang version

A test manually checks for the string `__VERSION__ "Clang`. This needs
to permit vendor specific variants.

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

5 years agoreland "add -fthinlto-index= option to clang-cl"
Bob Haarman [Tue, 16 Jul 2019 01:35:49 +0000 (01:35 +0000)]
reland "add -fthinlto-index= option to clang-cl"

Summary:
This is a reland of r366146, adding in the previously missing '--'
flag that prevents filenames from being interpreted as flags.

Original description:
This adds a -fthinlto-index= option to clang-cl, which allows it to
be used to drive ThinLTO backend passes. This allows clang-cl to be
used for distributed ThinLTO.

Tags: #clang

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

5 years ago[Sema] Suppress additional warnings for C's zero initializer
Peter Wu [Tue, 16 Jul 2019 01:13:36 +0000 (01:13 +0000)]
[Sema] Suppress additional warnings for C's zero initializer

Summary:
D28148 relaxed some checks for assigning { 0 } to a structure for all C
standards, but it failed to handle structures with non-integer
subobjects. Relax -Wmissing-braces checks for such structures, and add
some additional tests.

This fixes PR39931.

Patch By: al3xtjames

Reviewed By: Lekensteyn

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

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

5 years agoAllow for vendor prefixes in a list test
Nathan Lanza [Tue, 16 Jul 2019 00:57:50 +0000 (00:57 +0000)]
Allow for vendor prefixes in a list test

Summary:
Preprocessor/init.c contains a line that explicitly checks for the
string

__VERSION__ "Clang{{.*}}

It's valid to have a toolchain configured to emit a vendor prefix
before the word Clang. e.g.

__VERSION__ "Vendor Clang{{.*}}

Subscribers: fedor.sergeev, cfe-commits

Tags: #clang

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

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

5 years agoTemporarily revert "add -fthinlto-index= option to clang-cl"
Eric Christopher [Tue, 16 Jul 2019 00:02:40 +0000 (00:02 +0000)]
Temporarily revert "add -fthinlto-index= option to clang-cl"

This is causing testsuite failures on (at least) darwin release+asserts.

This reverts commit r366146.

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

5 years agoTemporarily Revert "fix unnamed fiefield issue and add tests for __builtin_preserve_a...
Eric Christopher [Mon, 15 Jul 2019 23:49:31 +0000 (23:49 +0000)]
Temporarily Revert "fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic"

The commit had tests that would only work with names in the IR.

This reverts commit r366076.

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

5 years agoRevert "[NewPM] Port Sancov"
Leonard Chan [Mon, 15 Jul 2019 23:18:31 +0000 (23:18 +0000)]
Revert "[NewPM] Port Sancov"

This reverts commit 5652f35817f07b16f8b3856d594cc42f4d7ee29c.

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

5 years ago[DirectoryWatcher][linux] Fix for older kernels
Jan Korous [Mon, 15 Jul 2019 23:14:00 +0000 (23:14 +0000)]
[DirectoryWatcher][linux] Fix for older kernels

IN_EXCL_UNLINK exists since Linux 2.6.36

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

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

5 years agoadd -fthinlto-index= option to clang-cl
Bob Haarman [Mon, 15 Jul 2019 22:50:04 +0000 (22:50 +0000)]
add -fthinlto-index= option to clang-cl

Summary:
This adds a -fthinlto-index= option to clang-cl, which allows it to
be used to drive ThinLTO backend passes. This allows clang-cl to be
used for distributed ThinLTO.

Reviewers: tejohnson, pcc, rnk

Subscribers: mehdi_amini, steven_wu, dexonsmith, arphaman, cfe-commits

Tags: #clang

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

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

5 years ago[OpenCL] Make TableGen'd builtin tables and helper functions static
Tom Stellard [Mon, 15 Jul 2019 22:34:19 +0000 (22:34 +0000)]
[OpenCL] Make TableGen'd builtin tables and helper functions static

Reviewers: Pierre, Anastasia

Reviewed By: Anastasia

Subscribers: yaxunl, cfe-commits

Tags: #clang

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

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

5 years ago[clang-fuzzer] Remove 'setUseOrcMCJITReplacement(false)' call.
Lang Hames [Mon, 15 Jul 2019 22:27:57 +0000 (22:27 +0000)]
[clang-fuzzer] Remove 'setUseOrcMCJITReplacement(false)' call.

The default value for this option (UseMCJITReplacement) is already false, and
OrcMCJITReplacement is going to have deprecation warnings attached in LLVM 9.0.
Removing this call removes a spurious warning.

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

5 years ago[DirectoryWatcher][test] Relax test assumptions
Jan Korous [Mon, 15 Jul 2019 22:11:51 +0000 (22:11 +0000)]
[DirectoryWatcher][test] Relax test assumptions

Workaround for FSEvents sometimes sending notifications for events that happened
before DirectoryWatcher was created.

This caused tests to be flaky on green dragon.

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