[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 12 08:21:21 PDT 2021
Anastasia added inline comments.
================
Comment at: clang/test/SemaOpenCLCXX/addrspace-constructors.clcpp:36
+ Z() __local = default;
+ Z() __global = default;
+ constexpr Z() __constant : z(0) {}
----------------
olestrohm wrote:
> Anastasia wrote:
> > We seem to be missing the coverage with __constant and `= default`.
> This is because of the struct W below, you can't default a constexpr constructor, but __constant constructors need to be constexpr. Though it is currently possible to create them, they just can't actually be used. Or maybe just combine Z and W?
I see makes sense. I think it's ok to have separate structs. You could add a comment though to explain what you aim to test in each?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102248/new/
https://reviews.llvm.org/D102248
More information about the cfe-commits
mailing list