Skip to content

Commit 971eaa4

Browse files
committed
The AttrDocs.td changing and other little fixes
Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
1 parent fc10805 commit 971eaa4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,6 +1991,7 @@ Applies to a device function/lambda function. Indicates the dimensions
19911991
of a work group. Values must be positive integers. Default arguments
19921992
equaling to one can be used for second and third dimensions if
19931993
intel::reqd_work_group_size spelling was applied.
1994+
This attribute is also valid for OpenCL C.
19941995
}];
19951996
}
19961997

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2931,8 +2931,7 @@ static void handleWorkGroupSize(Sema &S, Decl *D, const ParsedAttr &AL) {
29312931
return;
29322932

29332933
for (unsigned i = 0; i < 3; ++i) {
2934-
if (i < AL.getNumArgs())
2935-
if (!checkUInt32Argument(S, AL, AL.getArgAsExpr(i), WGSize[i], i,
2934+
if (i < AL.getNumArgs() && !checkUInt32Argument(S, AL, AL.getArgAsExpr(i), WGSize[i], i,
29362935
/*StrictlyUnsigned=*/true))
29372936
return;
29382937
if (WGSize[i] == 0) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify -DTRIGGER_ERROR %s
2-
// RUN: %clang_cc1 -fsycl-is-device -ast-dump %s | FileCheck %s
3-
// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify %s
1+
// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -verify -DTRIGGER_ERROR %s
2+
// RUN: %clang_cc1 -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s
3+
// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s
44

55
#ifndef __SYCL_DEVICE_ONLY__
66
// expected-no-diagnostics

0 commit comments

Comments
 (0)