[CUDA] Allow "extern __shared__ Foo foo[]" within anon. namespaces.
authorJustin Lebar <jlebar@google.com>
Thu, 17 May 2018 16:15:07 +0000 (16:15 +0000)
committerJustin Lebar <jlebar@google.com>
Thu, 17 May 2018 16:15:07 +0000 (16:15 +0000)
commit5489f85fdad03b81e445c9cd18997ee5c5a6f6f2
tree8362d1824e8561ea32b89911d765d65532f4ada2
parenta907bf6a314cb6de39e47006930afc1ddd59d581
[CUDA] Allow "extern __shared__ Foo foo[]" within anon. namespaces.

Summary:
Previously this triggered a -Wundefined-internal warning.  But it's not
an undefined variable -- any variable of this form is a pointer to the
base of GPU core's shared memory.

Reviewers: tra

Subscribers: sanjoy, rsmith

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

llvm-svn: 332621
clang/include/clang/AST/Decl.h
clang/lib/AST/Decl.cpp
clang/lib/Sema/Sema.cpp
clang/test/SemaCUDA/extern-shared.cu