[OpenCL] Disallows static kernel functions in C++ for OpenCL
authorJustas Janickas <Justas.Janickas@arm.com>
Thu, 2 Sep 2021 10:51:39 +0000 (11:51 +0100)
committerJustas Janickas <Justas.Janickas@arm.com>
Tue, 7 Sep 2021 09:23:50 +0000 (10:23 +0100)
commitc33e296be1daa621f5933f3729a0ce51172f1505
tree248cf32dbc2e67f6ad3756a9206942c04aaf42dd
parentda9ed3dc719bbe0dbe8d4d8b7e6e2061532392fe
[OpenCL] Disallows static kernel functions in C++ for OpenCL

It is disallowed in OpenCL C to declare static kernel functions and
C++ for OpenCL is expected to inherit such behaviour. Error is now
correctly reported in C++ for OpenCL when declaring a static kernel
function.

Differential Revision: https://reviews.llvm.org/D109150
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaOpenCL/storageclass-cl20.cl