[PATCH] D101168: [C++4OpenCL] Add clang extension for unsafe kernel parameters

2021-04-27 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 340796. olestrohm added a comment. Improved the description and example per the feedback. The check for dependent type is needed. If it is not included the diagnostic will get triggered when the extension is disabled, but not when it's enabled. CHANGES S

[PATCH] D101168: [C++4OpenCL] Add clang extension for unsafe kernel parameters

2021-04-27 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:8651 static OpenCLParamType getOpenCLKernelParameterType(Sema &S, QualType PT) { + if (PT->isDependentType()) +return InvalidKernelParam; Anastasia wrote: > I would rather add an asser

[PATCH] D101168: [C++4OpenCL] Add clang extension for unsafe kernel parameters

2021-04-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/docs/LanguageExtensions.rst:1804 +``__cl_clang_allow_unsafe_kernel_parameters`` +- How about `__cl_clang_unsafe_kernel_parameters` to match the other extension namin

[PATCH] D101168: [C++4OpenCL] Add clang extension for unsafe kernel parameters

2021-04-23 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm created this revision. olestrohm added reviewers: Anastasia, svenvh. olestrohm added a project: clang. Herald added subscribers: ldrumm, kerbowa, jfb, yaxunl, nhaehnle, jvesely, jholewinski. olestrohm requested review of this revision. Herald added a subscriber: cfe-commits. This featur