This revision was automatically updated to reflect the committed changes.
Closed by commit rL270238: [OpenCL] Allow explicit cast of 0 to event_t.
(authored by yaxunl).
Changed prior to commit:
http://reviews.llvm.org/D17578?vs=56615=57951#toc
Repository:
rL LLVM
pxli168 accepted this revision.
pxli168 added a comment.
Sorry about late reply.
LGTM!
http://reviews.llvm.org/D17578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ashi1 added a comment.
Xiuli, are you OK with this patch?
http://reviews.llvm.org/D17578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl accepted this revision.
yaxunl added a comment.
LGTM. Thanks!
http://reviews.llvm.org/D17578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
joey accepted this revision.
joey added a comment.
This revision is now accepted and ready to land.
LGTM!
http://reviews.llvm.org/D17578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ashi1 updated this revision to Diff 56615.
ashi1 added a comment.
Modified the testcase. Tested this diff on clang-test and it passes.
http://reviews.llvm.org/D17578
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaCast.cpp
test/CodeGenOpenCL/event_t.cl
ashi1 updated this revision to Diff 56599.
ashi1 added a comment.
Added changes for comments from majnemer.
http://reviews.llvm.org/D17578
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaCast.cpp
test/CodeGenOpenCL/event_t.cl
test/SemaOpenCL/event_t.cl
Index:
ashi1 marked 5 inline comments as done.
ashi1 added a comment.
http://reviews.llvm.org/D17578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl added inline comments.
Comment at: lib/Sema/SemaCast.cpp:2317
@@ +2316,3 @@
+// OpenCL v2.0 s6.13.10 - Allow casts from '0' to event_t type.
+if (Self.getLangOpts().OpenCL && DestType->isEventT()) {
+ llvm::APSInt intValue;
yaxunl wrote:
>
yaxunl added inline comments.
Comment at: lib/Sema/SemaCast.cpp:2317
@@ +2316,3 @@
+// OpenCL v2.0 s6.13.10 - Allow casts from '0' to event_t type.
+if (Self.getLangOpts().OpenCL && DestType->isEventT()) {
+ llvm::APSInt intValue;
tstellarAMD wrote:
tstellarAMD added a comment.
Comment at: lib/Sema/SemaCast.cpp:2317
@@ +2316,3 @@
+// OpenCL v2.0 s6.13.10 - Allow casts from '0' to event_t type.
+if (Self.getLangOpts().OpenCL && DestType->isEventT()) {
+ llvm::APSInt intValue;
A similar patch
majnemer added a subscriber: majnemer.
Comment at: lib/Sema/SemaCast.cpp:2318
@@ +2317,3 @@
+if (Self.getLangOpts().OpenCL && DestType->isEventT()) {
+ llvm::APSInt intValue;
+ if (SrcExpr.get()->EvaluateAsInt(intValue, Self.Context)) {
Please name
ashi1 updated this revision to Diff 49219.
ashi1 marked an inline comment as done.
ashi1 added a comment.
Revised with Xiuli Pan's comments.
http://reviews.llvm.org/D17578
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaCast.cpp
test/CodeGenOpenCL/event_t.cl
Anastasia added a comment.
Joey Gouly!
Thanks!
http://reviews.llvm.org/D17578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Anastasia added a comment.
Could you please change my role to the Subscriber and add Joey as a reviewer
please.
http://reviews.llvm.org/D17578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
pxli168 added inline comments.
Comment at: lib/Sema/SemaCast.cpp:2324-2326
@@ +2323,5 @@
+} else {
+Self.Diag(OpRange.getBegin(),
+ diag::error_opencl_cast_non_zero_to_event_t)
+ << intValue.toString(10) <<
pxli168 added a comment.
foo((event_t)0);
Is above use have been hint by some test cases?
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7679
@@ -7678,2 +7678,3 @@
def err_wrong_sampler_addressspace: Error<
- "sampler type cannot be used with the __local and
ashi1 created this revision.
ashi1 added reviewers: Anastasia, pxli168, yaxunl.
ashi1 added subscribers: pekka.jaaskelainen, tstellarAMD, cfe-commits.
This patch will allow the cast of 0 to event_t type.
http://reviews.llvm.org/D17578
Files:
include/clang/Basic/DiagnosticSemaKinds.td
18 matches
Mail list logo