Skip to content

Commit 354ec4a

Browse files
committed
[AttrDocs] Fix docs for the sycl_special_class attribute after D114483
Fixes `AttributeReference.rst:6628:Explicit markup ends without a blank line; unexpected unindent.` for `ninja docs-clang-html`
1 parent 1cf9876 commit 354ec4a

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -434,43 +434,43 @@ The syntax of the attribute is as follows:
434434

435435
.. code-block:: c++
436436

437-
class __attribute__((sycl_special_class)) accessor {};
438-
class [[clang::sycl_special_class]] accessor {};
437+
class __attribute__((sycl_special_class)) accessor {};
438+
class [[clang::sycl_special_class]] accessor {};
439439

440440
This is a code example that illustrates the use of the attribute:
441441

442442
.. code-block:: c++
443443

444-
class __attribute__((sycl_special_class)) SpecialType {
445-
int F1;
446-
int F2;
447-
void __init(int f1) {
448-
F1 = f1;
449-
F2 = f1;
450-
}
451-
void __finalize() {}
452-
public:
453-
SpecialType() = default;
454-
int getF2() const { return F2; }
455-
};
456-
457-
int main () {
458-
SpecialType T;
459-
cgh.single_task([=] {
460-
T.getF2();
461-
});
462-
}
444+
class __attribute__((sycl_special_class)) SpecialType {
445+
int F1;
446+
int F2;
447+
void __init(int f1) {
448+
F1 = f1;
449+
F2 = f1;
450+
}
451+
void __finalize() {}
452+
public:
453+
SpecialType() = default;
454+
int getF2() const { return F2; }
455+
};
456+
457+
int main () {
458+
SpecialType T;
459+
cgh.single_task([=] {
460+
T.getF2();
461+
});
462+
}
463463

464464
This would trigger the following kernel entry point in the AST:
465465

466466
.. code-block:: c++
467467

468-
void __sycl_kernel(int f1) {
469-
SpecialType T;
470-
T.__init(f1);
471-
...
472-
T.__finalize()
473-
}
468+
void __sycl_kernel(int f1) {
469+
SpecialType T;
470+
T.__init(f1);
471+
...
472+
T.__finalize()
473+
}
474474
}];
475475
}
476476

0 commit comments

Comments
 (0)