Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
smanna12 committed Jul 13, 2024
1 parent 223a3ce commit f971366
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions clang/lib/Sema/SemaDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6979,19 +6979,27 @@ static bool CheckValidFPGAMemoryAttributesVar(Sema &S, Decl *D) {
}

const auto *VD = dyn_cast<VarDecl>(D);
if (!VD) return false;
if (!VD)
return false;

// Check for non-static data member.
if (isa<FieldDecl>(D)) return false;
if (isa<FieldDecl>(D))
return false;

// Check for SYCL device global attribute decoration.
if (S.SYCL().isTypeDecoratedWithDeclAttribute<SYCLDeviceGlobalAttr>(VD->getType())) return false;
if (S.SYCL().
isTypeDecoratedWithDeclAttribute<SYCLDeviceGlobalAttr>(VD->getType()))
return false;

// Check for constant variables and variables in the OpenCL constant address space.
if (VD->getType().isConstQualified() || VD->getType().getAddressSpace() == LangAS::opencl_constant) return false;
// Check for constant variables and variables in the OpenCL constant
// address space.
if (VD->getType().isConstQualified() ||
VD->getType().getAddressSpace() == LangAS::opencl_constant)
return false;

// Check for static storage class or local storage.
if (VD->getStorageClass() == SC_Static || VD->hasLocalStorage()) return false;
if (VD->getStorageClass() == SC_Static || VD->hasLocalStorage())
return false;

return true;
}
Expand Down

0 comments on commit f971366

Please sign in to comment.