Skip to content

Commit 04a4c83

Browse files
committed
Impelmention getAttributeSpellingListIndex()
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
1 parent dc0eaac commit 04a4c83

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2922,7 +2922,9 @@ static void handleWorkGroupSize(Sema &S, Decl *D, const ParsedAttr &AL) {
29222922
return;
29232923

29242924
uint32_t WGSize[3];
2925-
if (AL.getNormalizedFullName() == "intel::reqd_work_group_size") {
2925+
if (AL.getKind() == ParsedAttr::AT_ReqdWorkGroupSize &&
2926+
AL.getAttributeSpellingListIndex() ==
2927+
ReqdWorkGroupSizeAttr::CXX11_intel_reqd_work_group_size) {
29262928
WGSize[1] = ReqdWorkGroupSizeAttr::DefaultYDim;
29272929
WGSize[2] = ReqdWorkGroupSizeAttr::DefaultZDim;
29282930
} else if (!checkAttributeNumArgs(S, AL, 3))

clang/test/SemaSYCL/intel-reqd-work-group-size.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void bar() {
2424
[[intel::reqd_work_group_size(32)]] void f32x1x1() {} // expected-note {{conflicting attribute is here}}
2525

2626
[[intel::reqd_work_group_size(16)]] void f16x1x1() {} // expected-note {{conflicting attribute is here}}
27-
[[intel::reqd_work_group_size(16)]] void f16x16x1() {} // expected-note {{conflicting attribute is here}}
27+
[[intel::reqd_work_group_size(16, 16)]] void f16x16x1() {} // expected-note {{conflicting attribute is here}}
2828

2929
[[intel::reqd_work_group_size(32, 32)]] void f32x32x1() {} // expected-note {{conflicting attribute is here}}
3030
[[intel::reqd_work_group_size(32, 32, 32)]] void f32x32x32() {} // expected-note {{conflicting attribute is here}}

0 commit comments

Comments
 (0)