]> granicus.if.org Git - clang/commit
[PR41157][OpenCL] Prevent implicit init of local addr space var in C++ mode.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Thu, 4 Apr 2019 11:08:51 +0000 (11:08 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Thu, 4 Apr 2019 11:08:51 +0000 (11:08 +0000)
commita009ce58cfce26d389ff3ac49228a921950ced27
tree2d0543f9ed558b986a755f75c9abea89a0c0fcdf
parent5e1826201aa4e8e5d60c3f6b8c476dfa130b2022
[PR41157][OpenCL] Prevent implicit init of local addr space var in C++ mode.

Prevent adding initializers implicitly to variables declared in
local address space. This happens when they get converted into
global variables and therefore theoretically have to be default
initialized in C++.

Differential Revision: https://reviews.llvm.org/D59646

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357684 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/CodeGenOpenCLCXX/addrspace-of-this.cl
test/CodeGenOpenCLCXX/local_addrspace_init.cl [new file with mode: 0644]