Skip to content

Commit 0f13ebf

Browse files
committed
Added attribute docs
1 parent 5aeee76 commit 0f13ebf

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ def CUDAGridConstant : InheritableAttr {
14541454
let Spellings = [GNU<"grid_constant">, Declspec<"__grid_constant__">];
14551455
let Subjects = SubjectList<[ParmVar]>;
14561456
let LangOpts = [CUDA];
1457-
let Documentation = [Undocumented];
1457+
let Documentation = [CUDAGridConstantAttrDocs];
14581458
}
14591459

14601460
def NVPTXKernel : InheritableAttr, TargetSpecificAttr<TargetNVPTX> {

clang/include/clang/Basic/AttrDocs.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6620,6 +6620,16 @@ unbind runtime APIs.
66206620
}];
66216621
}
66226622

6623+
def CUDAGridConstantAttrDocs : Documentation {
6624+
let Category = DocCatDecl;
6625+
let Content = [{
6626+
The ``__grid_constant__`` attribute can be applied to a ``const``-qualified kernel
6627+
function argument and allows compiler to take the address of that argument without
6628+
making a copy. The argument applies to sm_70 or newer GPUs, during compilation
6629+
with CUDA-11.7(PTX 7.7) or newer, and is ignored otherwise.
6630+
}];
6631+
}
6632+
66236633
def HIPManagedAttrDocs : Documentation {
66246634
let Category = DocCatDecl;
66256635
let Content = [{

0 commit comments

Comments
 (0)