Allow clang to compile the "extern" storage class in OpenCL 1.2.

Patch from Fraser Cormack!

llvm-svn: 199906
This commit is contained in:
Pekka Jaaskelainen 2014-01-23 16:21:02 +00:00
parent 348273df97
commit b3cdee01e9
1 changed files with 1 additions and 1 deletions

View File

@ -8541,7 +8541,7 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl,
// be initialized.
if (!Var->isInvalidDecl() &&
Var->getType().getAddressSpace() == LangAS::opencl_constant &&
!Var->getInit()) {
Var->getStorageClass() != SC_Extern && !Var->getInit()) {
Diag(Var->getLocation(), diag::err_opencl_constant_no_init);
Var->setInvalidDecl();
return;