[CUDA] Disallow 'extern __shared__' variables.
authorJustin Lebar <jlebar@google.com>
Fri, 30 Sep 2016 23:57:30 +0000 (23:57 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 30 Sep 2016 23:57:30 +0000 (23:57 +0000)
commit1041101953dae8ac0db2b65ca5f8bf537e436dad
tree2388d3d3e62e4c303d80bf2dd417b0c12253fc06
parentb6a5578c5c7a94cf28246edca4790d35e3ef12d7
[CUDA] Disallow 'extern __shared__' variables.

Also add a test that we disallow

  __constant__ __shared__ int x;

because it's possible to break this without breaking

  __shared__ __constant__ int x;

Reviewers: rnk

Subscribers: cfe-commits, tra

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

llvm-svn: 282985
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/SemaCUDA/bad-attributes.cu
clang/test/SemaCUDA/extern-shared.cu [new file with mode: 0644]