Skip to content

Commit cca9a85

Browse files
Implement review comments
Signed-off-by: Elizabeth Andrews <[email protected]>
1 parent 0418fea commit cca9a85

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10431,7 +10431,7 @@ bool isDeviceAspectType(const QualType Ty) {
1043110431
if (!ET)
1043210432
return false;
1043310433

10434-
if (const SYCLTypeAttr *Attr = ET->getDecl()->getAttr<SYCLTypeAttr>())
10434+
if (const auto *Attr = ET->getDecl()->getAttr<SYCLTypeAttr>())
1043510435
return Attr->getType() == SYCLTypeAttr::aspect;
1043610436

1043710437
return false;
@@ -10561,7 +10561,7 @@ static void handleSYCLKernelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
1056110561

1056210562
SYCLTypeAttr *Sema::MergeSYCLTypeAttr(Decl *D, const AttributeCommonInfo &CI,
1056310563
SYCLTypeAttr::SYCLType TypeName) {
10564-
if (const auto ExistingAttr = D->getAttr<SYCLTypeAttr>()) {
10564+
if (const auto *ExistingAttr = D->getAttr<SYCLTypeAttr>()) {
1056510565
if (ExistingAttr->getType() != TypeName) {
1056610566
Diag(ExistingAttr->getLoc(), diag::err_duplicate_attribute)
1056710567
<< ExistingAttr;

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ static bool isSyclType(QualType Ty, SYCLTypeAttr::SYCLType TypeName) {
7272
if (!RD)
7373
return false;
7474

75-
if (const SYCLTypeAttr *Attr = RD->getAttr<SYCLTypeAttr>())
75+
if (const auto *Attr = RD->getAttr<SYCLTypeAttr>())
7676
return Attr->getType() == TypeName;
7777

7878
if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RD))
7979
if (CXXRecordDecl *TemplateDecl =
8080
CTSD->getSpecializedTemplate()->getTemplatedDecl())
81-
if (const SYCLTypeAttr *Attr = TemplateDecl->getAttr<SYCLTypeAttr>())
81+
if (const auto *Attr = TemplateDecl->getAttr<SYCLTypeAttr>())
8282
return Attr->getType() == TypeName;
8383

8484
return false;
@@ -97,7 +97,7 @@ static bool isAccessorPropertyType(QualType Ty,
9797
SYCLTypeAttr::SYCLType TypeName) {
9898
if (const auto *RD = Ty->getAsCXXRecordDecl())
9999
if (const auto *Parent = dyn_cast<CXXRecordDecl>(RD->getParent()))
100-
if (const SYCLTypeAttr *Attr = Parent->getAttr<SYCLTypeAttr>())
100+
if (const auto *Attr = Parent->getAttr<SYCLTypeAttr>())
101101
return Attr->getType() == TypeName;
102102

103103
return false;

0 commit comments

Comments
 (0)