[PATCH] D80829: [OpenMP][SYCL] Do not crash on attempt to diagnose unsupported type use
Alexey Bader via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat May 30 03:09:08 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbd85b7d66887: [OpenMP][SYCL] Do not crash on attempt to diagnose unsupported type use (authored by Fznamznon, committed by bader).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80829/new/
https://reviews.llvm.org/D80829
Files:
clang/lib/Sema/Sema.cpp
clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
Index: clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
===================================================================
--- clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
+++ clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
@@ -120,3 +120,14 @@
long double qa, qb;
decltype(qa + qb) qc;
double qd[sizeof(-(-(qc * 2)))];
+
+struct A { };
+
+template <bool>
+struct A_type { typedef A type; };
+
+template <class Sp, class Tp>
+struct B {
+ enum { value = bool(Sp::value) || bool(Tp::value) };
+ typedef typename A_type<value>::type type;
+};
Index: clang/lib/Sema/Sema.cpp
===================================================================
--- clang/lib/Sema/Sema.cpp
+++ clang/lib/Sema/Sema.cpp
@@ -1725,6 +1725,9 @@
}
auto CheckType = [&](QualType Ty) {
+ if (Ty->isDependentType())
+ return;
+
if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type()) ||
((Ty->isFloat128Type() ||
(Ty->isRealFloatingType() && Context.getTypeSize(Ty) == 128)) &&
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80829.267449.patch
Type: text/x-patch
Size: 1029 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200530/c4f02c08/attachment.bin>
More information about the cfe-commits
mailing list