Skip to content

Commit 1735df4

Browse files
committed
Fix the bug causing lit test failure
1 parent 882b3d0 commit 1735df4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,6 +2037,8 @@ void Sema::MarkDevice(void) {
20372037
Diag(Existing->getLocation(), diag::note_conflicting_attribute);
20382038
Diag(Attr->getLocation(), diag::note_conflicting_attribute);
20392039
SYCLKernel->setInvalidDecl();
2040+
} else {
2041+
SYCLKernel->addAttr(A);
20402042
}
20412043
} else {
20422044
SYCLKernel->addAttr(A);
@@ -2054,6 +2056,8 @@ void Sema::MarkDevice(void) {
20542056
Diag(Existing->getLocation(), diag::note_conflicting_attribute);
20552057
Diag(Attr->getLocation(), diag::note_conflicting_attribute);
20562058
SYCLKernel->setInvalidDecl();
2059+
} else {
2060+
SYCLKernel->addAttr(A);
20572061
}
20582062
} else {
20592063
SYCLKernel->addAttr(A);

0 commit comments

Comments
 (0)