[PATCH] D91348: [OpenCL] Warn about side effects for unevaluated vec_step arg

2021-01-05 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0e4d2361b817: [OpenCL] Warn about side effects for unevaluated vec_step arg (authored by svenvh). Changed prior to commit: https://reviews.llvm.or

[PATCH] D91348: [OpenCL] Warn about side effects for unevaluated vec_step arg

2020-12-31 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. In D91348#2475646 , @Anastasia wrote: > LGTM, the change seems reasonable. Thanks! > >> A minor side-effect of this change is that it also produces the >> warning for co_await and co_yield now. > > This warning is produced for **siz

[PATCH] D91348: [OpenCL] Warn about side effects for unevaluated vec_step arg

2020-12-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. Herald added a subscriber: lxfind. LGTM, the change seems reasonable. Thanks! > A minor side-effect of this change is that it also produces the > warning for co_await and co_yield now. T

[PATCH] D91348: [OpenCL] Warn about side effects for unevaluated vec_step arg

2020-11-13 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 305058. svenvh added a comment. Add test case for OpenCL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91348/new/ https://reviews.llvm.org/D91348 Files: clang/lib/Sema/SemaExpr.cpp clang/test/SemaCXX/corou

[PATCH] D91348: [OpenCL] Warn about side effects for unevaluated vec_step arg

2020-11-12 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added a subscriber: yaxunl. Herald added a project: clang. svenvh requested review of this revision. The argument to the `vec_step` builtin is not evaluated. Hoist the diagnostic for this in `Sema::CheckUnaryExprOrTypeTraitO