yaxunl marked 6 inline comments as done.
Comment at: lib/Sema/SemaDecl.cpp:7600
@@ +7599,3 @@
+// Do not diagnose half type since it is diagnosed as invalid argument
+// type for any function eleswhere.
+if (!PT->isHalfType())
Anastasia wrote:
> ->
yaxunl added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:7599-7602
@@ -7595,3 +7598,6 @@
// of event_t type.
-S.Diag(Param->getLocation(), diag::err_bad_kernel_param_type) << PT;
+// Do not diagnose half type since it is diagnosed as invalid argument
+//
Anastasia added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:7600
@@ +7599,3 @@
+// Do not diagnose half type since it is diagnosed as invalid argument
+// type for any function eleswhere.
+if (!PT->isHalfType())
-> elsewhere
yaxunl added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:7599-7602
@@ -7595,3 +7598,6 @@
// of event_t type.
-S.Diag(Param->getLocation(), diag::err_bad_kernel_param_type) << PT;
+// Do not diagnose half type since it is diagnosed as invalid argument
+//
bader added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:7599-7602
@@ -7595,3 +7598,6 @@
// of event_t type.
-S.Diag(Param->getLocation(), diag::err_bad_kernel_param_type) << PT;
+// Do not diagnose half type since it is diagnosed as invalid argument
+//
yaxunl updated this revision to Diff 71667.
yaxunl added a comment.
Remove redundant diagnostic msg.
https://reviews.llvm.org/D24666
Files:
lib/Sema/SemaDecl.cpp
test/SemaOpenCL/half.cl
test/SemaOpenCL/invalid-kernel-parameters.cl
Index: test/SemaOpenCL/invalid-kernel-parameters.cl
bader added inline comments.
Comment at: test/SemaOpenCL/half.cl:29
@@ +28,3 @@
+kernel void half_disabled_kernel(global half *p,
+ half h); // expected-error{{'half' cannot be
used as the type of a kernel parameter}} // expected-error{{declaring
yaxunl created this revision.
yaxunl added reviewers: Anastasia, bader.
yaxunl added subscribers: cfe-commits, nhaustov, rampitec.
Herald added a subscriber: yaxunl.
https://reviews.llvm.org/D24666
Files:
lib/Sema/SemaDecl.cpp
test/SemaOpenCL/half.cl