forked from OSchip/llvm-project
Allow clang to compile the "extern" storage class in OpenCL 1.2.
Patch from Fraser Cormack! llvm-svn: 199906
This commit is contained in:
parent
348273df97
commit
b3cdee01e9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue