]> granicus.if.org Git - clang/commit
[OpenCL 2.0] Enable program scope variables, Section 6.5.1.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 30 Sep 2015 14:08:20 +0000 (14:08 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Wed, 30 Sep 2015 14:08:20 +0000 (14:08 +0000)
commit9dc179d618b695b365ca457b3a378a17cb2a4d49
tree6c76ba672c8e76664397cfcc84cb368376ab81cb
parent1ea622e6b8c6b4f6ac8a60409dbe3d6c4e8c7b06
[OpenCL 2.0] Enable program scope variables, Section 6.5.1.

 - Remove virtual SC_OpenCLWorkGroupLocal storage type specifier
as it conflicts with static local variables now and prevents
diagnosing static local address space variables correctly.

 - Allow static local and global variables (OpenCL2.0 s6.8 and s6.5.1).

 - Improve diagnostics of allowed ASes for variables in different scopes:
(i) Global or static local variables have to be in global
or constant ASes (OpenCL1.2 s6.5, OpenCL2.0 s6.5.1);
(ii) Non-kernel function variables can't be declared in local
or constant ASes (OpenCL1.1 s6.5.2 and s6.5.3).

http://reviews.llvm.org/D13105

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248906 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/Specifiers.h
lib/AST/Decl.cpp
lib/AST/DeclPrinter.cpp
lib/CodeGen/CGDecl.cpp
lib/Sema/SemaDecl.cpp
test/Parser/opencl-storage-class.cl
test/SemaOpenCL/storageclass.cl
tools/libclang/CIndex.cpp