[PATCH] D99488: [SYCL][Doc] Add design document for SYCL mode

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 29 08:55:28 PDT 2021


Anastasia added a comment.

In D99488#2725501 <https://reviews.llvm.org/D99488#2725501>, @bader wrote:

> In D99488#2725435 <https://reviews.llvm.org/D99488#2725435>, @Anastasia wrote:
>
>> If I build docs now I get the following output:
>>
>>   llvm-project/build-doc/tools/clang/docs/SYCLSupport.rst:102: WARNING: Error in "code-block" directive:
>>   1 argument(s) required, 0 supplied.
>>   
>>   .. code-block::
>>   
>>      TODO: add support for `__attribute__((opencl_global_host))` and
>>      `__attribute__((opencl_global_device))`.
>>
>> Is this something already being looked at?
>
> It looks like it can be fixed by adding language parameter:
>
>> .. code-block:: c++
>
> Unfortunately, I can't verify this fix locally. I see other types of warnings, which are treated as errors.
>
> tools/clang/docs/ClangCommandLineReference.rst:22:Duplicate explicit target name: "cmdoption-clang--prefix".
>
> Does anyone know how to avoid this issue?

I think you expected to get some bots failing. If not you can ask on `cfe-dev` perhaps...

I normally verify locally by building the docs e.g. `docs-clang-html` build target. It should catch the issues.

> If no, @Anastasia, could you confirm that adding `c++` parameter fixes the warning, please? If it does, I can commit this fix.

With the following diff

  diff --git a/clang/docs/SYCLSupport.rst b/clang/docs/SYCLSupport.rst
  index 8c1ed19dff4e..b03dcfadafa5 100644
  --- a/clang/docs/SYCLSupport.rst
  +++ b/clang/docs/SYCLSupport.rst
  @@ -98,8 +98,7 @@ space attributes for pointers:
      * - ``__attribute__((opencl_private))``
        - private_space
   
  -
  -.. code-block::
  +.. code-block:: C++
   
      TODO: add support for `__attribute__((opencl_global_host))` and
      `__attribute__((opencl_global_device))`.

I get

  llvm-project/build-doc/tools/clang/docs/SYCLSupport.rst:101: WARNING: Could not lex literal_block as "C++". Highlighting skipped.

But this seems to work

  diff --git a/clang/docs/SYCLSupport.rst b/clang/docs/SYCLSupport.rst
  index 8c1ed19dff4e..f714500300e1 100644
  --- a/clang/docs/SYCLSupport.rst
  +++ b/clang/docs/SYCLSupport.rst
  @@ -98,8 +98,6 @@ space attributes for pointers:
      * - ``__attribute__((opencl_private))``
        - private_space
   
  +.. code-block:: C++
   
  -.. code-block::
  -
  -   TODO: add support for `__attribute__((opencl_global_host))` and
  -   `__attribute__((opencl_global_device))`.
  +    //TODO: add support for __attribute__((opencl_global_host)) and __attribute__((opencl_global_device)).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99488/new/

https://reviews.llvm.org/D99488



More information about the cfe-commits mailing list