Skip to content

Commit

Permalink
Update patch
Browse files Browse the repository at this point in the history
  • Loading branch information
smanna12 committed Jul 13, 2024
1 parent f971366 commit db51039
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions clang/lib/Sema/SemaDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6982,13 +6982,18 @@ static bool CheckValidFPGAMemoryAttributesVar(Sema &S, Decl *D) {
if (!VD)
return false;

// Exclude implicit parameters and non-type template parameters.
if (VD->getKind() == Decl::ImplicitParam ||
VD->getKind() == Decl::NonTypeTemplateParm)
return false;

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

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

// Check for constant variables and variables in the OpenCL constant
Expand Down

0 comments on commit db51039

Please sign in to comment.