<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64815>64815</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP] cannot handle double square bracket
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            jdoerfert
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ye-luo
      </td>
    </tr>
</table>

<pre>
    ```
#define PRAGMA_OFFLOAD(x) _Pragma(x)

int main()
{
  PRAGMA_OFFLOAD("omp target ompx_attribute([[clang::amdgpu_flat_work_group_size(3, 17)]])")
  for (int i = 0; i < 1000; ++i)
  {}
}
```
got error
```
$ clang++ -fopenmp --offload-arch=gfx90a main.cpp
main.cpp:5:3: warning: '[' tokens introducing attribute appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
    5 |   PRAGMA_OFFLOAD("omp target ompx_attribute([[clang::amdgpu_flat_work_group_size(3, 17)]])")
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:1:27: note: expanded from macro 'PRAGMA_OFFLOAD'
    1 | #define PRAGMA_OFFLOAD(x) _Pragma(x)
      | ^~~~~~~~~~
<scratch space>:2:28: note: expanded from here
    2 |  omp target ompx_attribute([[clang::amdgpu_flat_work_group_size(3, 17)]])
 |                            ^
main.cpp:5:3: note: second '[' token is here
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEVM1u4zYQfprxZSBDIvV70EGO4166SNBLjwYljWRuJJIlqcbpoc9eUFaS7e7mUiAoIVskRjP8fjgUzslREdWQHYCxr70mO5D1wBhkx51Y_EXb-oWiadG7VvcvNeTx9sRHiBtgvKdBKsLH35pfvjTnh9Pp14fmCKy8Aqvw_GjFOIttueWs_1J5nIVUwMr3SHG4TfDHcsCYng16YUfyqGdzPQvvrWwXTyGcHSA7dJNQI_AGeCPmfjTLeZiEPz9r-3QerV7M2cm_wucc2B0mRdg5O4aHVYHzKxDEQVsEVgaUEoEfMQZ-WKd3mMTxugJ2AHaQ32QFAsXxlczr5N-SjdojWavtT6PAUryxWItjNGhDajYYRXoYJi36SNjuAvw4DtcqFquG-86YW_rbijcZ8IYDb_BZWCVXWRBYsTpdoNdPpBxK5a3ul06qEd_kRGEMCYtSYS-HgSytXnVWI12NUE5qhZ1Wnq7eIWSH6PdOz0Yvqo_WupEzk_RR-xKtWUHfTSDEDKG4w__f4DACEsju__6s8YMnCfCGFcEJpT2F9ypoTz0OVs-byMCK79Up3mEnN9j_ofF-Tno7d_zOdVb47oLOiI6A3wes4Vd-jPdClt5rs5u1n-zibbvbIfpwQHb_cUO8cnHUadV_3xQo3Te83tpz19e8r3gldlQnecV4mTHOdpc6TVmS8TyN87LKc56LIUmGNslFmaRcZMVO1ixmPC6TMqnimLN9nOQ9T_pMVJVIqySDNKZZyGk_TX_Oe23HnXRuoTpPyyTbTaKlyW03tKJnXIPbDW3rkBO1y-ggjSfpvHuv4qWf1qv9wZD68gjZETuhlPZ4EaqfCHu9tBOh-2MRlrC1onsiv1vsVF-8Ny44xE7ATqP0l6Xdd3oGdgrlt1dkrP5KnQd2WkE5YKcV9D8BAAD__41o6Xw">