[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-18 Thread Ole Strohm via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG642d2f000b26: [OpenCL] Fix initialization of __constant constructors without arguments (authored by olestrohm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. LGTM! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102248/new/ https://reviews.llvm.org/D102248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-17 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 345845. olestrohm added a comment. Relaxed the checks in the codegen test because of failures on platforms with slightly different IR being generated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102248/new/ https://reviews.llvm.org/D102248

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-14 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. LGTM! Thanks! Comment at: clang/test/CodeGenOpenCLCXX/addrspace-constructors.clcpp:22 + +// CHECK: @cx1 = dso_local addrspace(2) constant %struct.X zeroinitializer,

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-14 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 345436. olestrohm added a comment. Added a codegen test and clarified what some parts are testing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102248/new/ https://reviews.llvm.org/D102248 Files: clang/lib/Sema/SemaDecl.cpp

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
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

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-12 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm added inline comments. Comment at: clang/test/SemaOpenCLCXX/addrspace-constructors.clcpp:36 + Z() __local = default; + Z() __global = default; + constexpr Z() __constant : z(0) {} Anastasia wrote: > We seem to be missing the coverage with __constant

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:12643 + if (CXXRecordDecl *RD = Var->getType()->getAsCXXRecordDecl()) { +for (auto *ctor : RD->ctors()) { + if (ctor->isConstexpr() && ctor->getNumParams() == 0 &&

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-11 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, yaxunl. olestrohm requested review of this revision. Herald added a subscriber: cfe-commits. This fixes the implicit initialization that uses