OSDN Git Service

[OpenMP][SYCL] Improve diagnosing of unsupported types usage
authorMariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Fri, 29 May 2020 12:41:37 +0000 (15:41 +0300)
committerAlexey Bader <alexey.bader@intel.com>
Fri, 29 May 2020 15:00:48 +0000 (18:00 +0300)
commitcf6cc662eeee2b1416430f517850be9032788e39
treee3fca4c08972f7c116a32d18ba118a77202c6599
parent0e265e315784b4e47f984f8ed9fb7586130bacdc
[OpenMP][SYCL] Improve diagnosing of unsupported types usage

Summary:
Diagnostic is emitted if some declaration of unsupported type
declaration is used inside device code.
Memcpy operations for structs containing member with unsupported type
are allowed. Fixed crash on attempt to emit diagnostic outside of the
functions.

The approach is generalized between SYCL and OpenMP.
CUDA/OMP deferred diagnostic interface is going to be used for SYCL device.

Reviewers: rsmith, rjmccall, ABataev, erichkeane, bader, jdoerfert, aaron.ballman

Reviewed By: jdoerfert

Subscribers: guansong, sstefan1, yaxunl, mgorny, bader, ebevhan, Anastasia, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74387
15 files changed:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/CMakeLists.txt
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/lib/Sema/SemaSYCL.cpp [new file with mode: 0644]
clang/lib/Sema/SemaType.cpp
clang/test/Headers/nvptx_device_math_sin.c
clang/test/Headers/nvptx_device_math_sin.cpp
clang/test/OpenMP/nvptx_unsupported_type_codegen.cpp
clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
clang/test/SemaSYCL/float128.cpp [new file with mode: 0644]