[PATCH] D17345: [OpenCL] Improve diagnostics of address spaces for variables inside function

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 17 11:54:24 PST 2016


Anastasia created this revision.
Anastasia added reviewers: pekka.jaaskelainen, yaxunl.
Anastasia added a subscriber: cfe-commits.

This patch:
1. Prevents local variables to be declared in global AS
2. Diagnoses AS of local variables with an extern storage class as if they would be in a program scope

http://reviews.llvm.org/D17345

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaDecl.cpp
  test/Parser/opencl-storage-class.cl
  test/SemaOpenCL/storageclass-cl20.cl
  test/SemaOpenCL/storageclass.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17345.48225.patch
Type: text/x-patch
Size: 5089 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160217/40bce4dd/attachment.bin>


More information about the cfe-commits mailing list