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

    <tr>
        <th>Summary</th>
        <td>
            `clang-tidy`: `clang-tidy` incorrectly treats a global function as a global variable [readability-identifier-naming]
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

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

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

<pre>
    There is the following .clang-tidy configuration file:
```yaml
---
Checks: '-*, readability-identifier-naming'
CheckOptions:
- { key: readability-identifier-naming.GlobalFunctionCase, value: lower_case }
- { key: readability-identifier-naming.GlobalVariableCase, value: lower_case }
- { key: readability-identifier-naming.GlobalVariablePrefix, value: g_ }
```

There is the following code:
```cpp
void fill_resources_from_uri(std::vector<int>& resources)
{
}
```

If I change `vector` to `stack`, everything is fine, but if I leave `vector` or `list`, clang-tidy displays the following error:
```bash
$ ./clang-tidy AdapterTest.cpp -p out/Release/

AdapterTest.cpp:30:6: warning: invalid case style for global variable 'fill_resources_from_uri' [readability-identifier-naming]
 30 | void fill_resources_from_uri(std::vector<int>& resources)
      | ^~~~~~~~~~~~~~~~~~~~~~~
      |      g_fill_resources_from_uri
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VE2P4zYM_TXKhXCgyF_JwQdPZrPYU4ti0GtAy7StjmIZkuypL_3thRzvJBvsTIGiFYJYIsQnku-R6Jxqe6KCpU8sfd7g6Dtji68vdmw2lann4qUjS6Ac-I6gMVqbN9W3sJUa-zbyqp5Bmr5R7WjRK9NDozSxuGT8mfGSZfz6m_Gir6Yoiq6bY0fy1bG4BCbyiImSiSNYwhorpZWfI1VT71WjyEY9XlTfMpHfuf4yhPfc-1sRsPwJXmkOkJ_ibL9qU6E-jb0MEEd0FN6eUI8hdNDmjexZoiNg-fO_RP8drcJK0_-L_qulRv35A357vuG-1389Lv8fUCpN_RPi5DBcLZNRdSBXny05M1pJ7txYczmPVjGxd74OznE5kfTGsvioes_iL0xk8O7AxGGFz5--bz6L9FsD30B22LcELOMrdMbBm3B2HuVrcBFHoIns7LuQiHLQqH4pejV6UAFEE04PGMaGs1bOrxB3kq6VGzTOjyUia0NqjzWq0HWrSSSwZeJ0B1XWOHiyL-T8Vg4DRAOY0TNx-o00Ldo43af8cJ3FZcxZXGaB2Te0fWiDuATVT6hVDYuMnJ91CNNCu4gDplUdobM-pCwHlj593m_pSg7EHFh-hP9UA7CsAMvSL3_9dD1eXFZ7_iiCH1nZ1EVcH-IDbqjY5WK3S0SSJZuuqCqR7uJc7iVmAtM0z3i2Swn3tE_2B8SNKgQXCc932S7leZJsU94cDpzXUqZC7JOcJZwuqPRW6-myNbbdKOdGKg4HnsYbjRVpt4xUIW5KYEKEEWuL4BRVY-tYssjP3WC88pqK0HY3t4wvM_LBBqqXxlqSXs_gLaF3gN_5b9bJBnhnvInin2nfjFYXnffDMl7FiYlTq3w3VltpLkycQsDrJxqs-YNkUPRSBMfE6VqHqRB_BwAA__-ugwbr">