<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylVdtu4zYQ_Rr5hbAgS7YTP-jBiddtgKBbNN3mcUFJI4kbilR5seN-fWdIXwM0KLCGIJnkcGbOnOFhpZtD-eCFbITqmPaG1bqBiltge2AGuBT_QMNczx2-gFk-AHsTqmG6ZXtuFG3bc8ucEV0HBm1bbdjjt5evz399-YNxtFTaHScfntcvaZJtkmwd3-vWgWGcVcKRQ6F2YJ3ouBNaJfkj5WD5PoZP8jU-lMRodCVhYMJihpI7SlCz1qua9lna2EArFM4LxXrgDQZphQSL41r6Bhf2wvUBkR5pE0uW2VTYg3Uw4N8Qu9dYBUWAO3AW4-fOcGVDQByw6oCZD7w2-hguZngDcIu4B20ALRwX0oaC4C6hxMAlpo9YGl8LxMPgnQ8jfi0A650bbVKgvy0-HSbrq7TWAw7A9dPa1ghzu3leT7feeYOht6OXEj_z-SrJC2GtB7QfQLnpLJvlq2y5ygrCVXnHej0ScVi1TuwAE_rbi_qN6R2YnYA9mSl4d7HCozahxFgsXjuPaXsL0zr0CFXx8dvmFjTGjw97AefHi9srm9gMgSrRttg4yskDa40ezs1Di1ienWiA6nZNJNFV-0py-32Xpz2OYo9Ird8sk-INcCzsTVLIanjqcTyneWwH4vbojo8C_eX5BzyRYBaNNh0MAzv_riYxmw_Rrv0Q91hFRV15ARAjBgRYBio5VToEFKE18WDQzKm_PwcV67r-_emY1ovjztvv7nj6Xp9-u6ydUkb493HmV0xRAlr34Q8xEDswTdNPgF0I__NyPG_Y1sMoZNAK6hirB-xiGhJVHxyj-PRxqpZcdUn-gA_DBNjpgFJO3hp8S11zavraNxw_Jzqnr1xK9l85e0uRG2Ggpp47M3FmELk4Shv2HVJy1rYoC9R_0QfREgXg1smRzUPYjfJ3czq-qqPujNoKhz11U5v_X4ynnyzDDUQu9_xwreLYEiKFNPIVMaKUxaIxjIbhVjewnthee9mgXh8CPngf0RQ9GbBeBikhuYF4j1yCS6svYnwsZn5Pp5e2xGU62j0fR1A22v7y-Ejx2aQpi2ZVrPiEe9drU3JZ4Q1i9MQbWX4iolLuTp8p9usPTJUKR6pJwroo8mw-6UvO6_y-4rN8WdTNssiWd3d13hRVUcECmqKdSF6BtGWyeEgWm8nPhxRlnuV5NpvNs1VezO9SaOfNMsv5gt_fARSzZJ7BgDdJSn5SbbqJKYPLyncWF6Wwzl4WubWiUwCnDJ1wEsrXU_Xpar5wvidtOskM6zSQFBntu1MHoErTdYj8BBbOFyZSMQlAyoDiXxKCqqA>53204</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Warnings not triggered when function goes through macro rename (with -isystem).
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          albestro
      </td>
    </tr>
</table>

<pre>
    Building our codebase we realized that the same kind of warning was triggered for CUSOLVER and not for CUBLAS.

After a bit of investigation, we saw that **the problem is related to functions, defined in header files included with the option `-isystem`, whose name gets "translated" by a macro define**.

For more details and a minimal reproducible example see https://github.com/eth-cscs/DLA-Future/pull/449#issuecomment-1012906903, but hoping to give a quick overview, next is reported the actual use-case with CUDA.

### Setup overview

CUBLAS, differently from CUSOLVER, provides an header file `cublas_v2.h` that looks like this

```cpp
#include "cublas_api.h"

#define cublasDgemm          cublasDgemm_v2
```

and then in `cublas_api.h` there is the definition of the function

```cpp
CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemm_v2 (cublasHandle_t handle, //...
```

### The problem

Compiling with something like
```bash
clang++ ... -isystem /usr/local/cuda/include -Wall ...
```
using directly `cublasDgemm_v2` warnings are triggered, while using the macro `cublasDgemm` they are not.

On the opposite compiling with
```bash
clang++ ... -I /usr/local/cuda/include -Wall ...
```
warnings are always triggered (i.e. with macro or direct call).

I would say the expected result is to get the warnings also with the macro (this is also what happens with GCC). 
</pre>
<img width="1px" height="1px" alt=""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