Author: Fangrui Song Date: 2022-01-28T14:30:49-08:00 New Revision: 354ec4af749ccd910a1cffc5e9cce2bb93239b9b
URL: https://github.com/llvm/llvm-project/commit/354ec4af749ccd910a1cffc5e9cce2bb93239b9b DIFF: https://github.com/llvm/llvm-project/commit/354ec4af749ccd910a1cffc5e9cce2bb93239b9b.diff LOG: [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` Added: Modified: clang/include/clang/Basic/AttrDocs.td Removed: ################################################################################ diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index 18fac924b114..67a69bc9fd59 100644 --- a/clang/include/clang/Basic/AttrDocs.td +++ b/clang/include/clang/Basic/AttrDocs.td @@ -434,43 +434,43 @@ The syntax of the attribute is as follows: .. code-block:: c++ - class __attribute__((sycl_special_class)) accessor {}; - class [[clang::sycl_special_class]] accessor {}; + class __attribute__((sycl_special_class)) accessor {}; + class [[clang::sycl_special_class]] accessor {}; This is a code example that illustrates the use of the attribute: .. code-block:: c++ - class __attribute__((sycl_special_class)) SpecialType { - int F1; - int F2; - void __init(int f1) { - F1 = f1; - F2 = f1; - } - void __finalize() {} - public: - SpecialType() = default; - int getF2() const { return F2; } - }; - - int main () { - SpecialType T; - cgh.single_task([=] { - T.getF2(); - }); -} + class __attribute__((sycl_special_class)) SpecialType { + int F1; + int F2; + void __init(int f1) { + F1 = f1; + F2 = f1; + } + void __finalize() {} + public: + SpecialType() = default; + int getF2() const { return F2; } + }; + + int main () { + SpecialType T; + cgh.single_task([=] { + T.getF2(); + }); + } This would trigger the following kernel entry point in the AST: .. code-block:: c++ - void __sycl_kernel(int f1) { - SpecialType T; - T.__init(f1); - ... - T.__finalize() - } + void __sycl_kernel(int f1) { + SpecialType T; + T.__init(f1); + ... + T.__finalize() + } }]; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits