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

    <tr>
        <th>Summary</th>
        <td>
            performance-unnecessary-value-param.AllowedTypes has inconsistent behavior when namespaces and type aliases are involved
        </td>
    </tr>

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

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

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

<pre>
    Example:

```yaml
---
Checks: '-*,performance-*'
CheckOptions:
  - key: performance-unnecessary-value-param.AllowedTypes
    value: a::dt;
```

```cpp
namespace a {

struct dt {
  ~dt(){};
};

using a_dt_alias = a::dt;

} // namespace a

void f1(a::dt in) {};

void f2(a::a_dt_alias in) {};

```

```
warning: the parameter 'in' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
   13 | void f2(a::a_dt_alias in) {};
      |                       ^
      | const        &
```

If namespace is removed from code and from clang-tidy config then no warnings are generated.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVEGv4yYQ_jX4MnJEsB0nBx-c9zZST730vhqbiU0fBguw01z62ytwspvt20pdhJR4Zr6P4fsA9F4Nhqhh1ZlV7xkuYbSuMSu6YLWdSGWdlffmy184zZpY0TKe5oFv846TZrzN85zx9m2k_sOzogUm6pyJlom3mdzVuglNT1ukfhb-Pgdljd84AXL4oHvEviIWY6gn79Hd8xX1QvmMDqddq7W9kfzjPpNPaICUjniMjEUrAyvOr63-q_N-nhlvDU7kZ-wJEFh93mp8cEsfQIZHCOBvGZg4MnGKgfr9wfztD28Xr8wA-FWGr6gVemDF-6dOEgSYuDBxgZeVt9xqlYTrnonjNxwow8QJflj0WSi-F74s-1PAf0nAeHtDZ5QZom5hJEjqUiAXHYxcNSgPvZ0VSbhaB4T9CMqstsfoHnRLAGv0HRZPEtADQm-ND-DoSo5MT6w4p5CS5GDCj6iTCp_rgFXn_2E9q943w_cFsPoNfk0MSCPifj5Y9eWHqq3HZ1IcPov52_XFSeXB0WTXKJazE_RWEqB5fmk0Qx6UvEfeqxqi5AaMhYcLHtARDGTIYSC5y2RTyFNxwoyafV3xUhSH4pSNDR34oaPuKo_8KI9V34n6iPW-OMqKV5UUmWoEFxU_CL4XZb0_7Uq6ymNZVxVVZdWXkpWcJlR6p_U67awbMuX9Qs2-rHghMo0daZ9eBSEM3SBlmRDxkXBNBOXdMnhWcq188N9pggqaml-9wzAmu9I58YFMgI5GXJV1cEsaPSX2Sc5wnwmSx7RpFk-kXklmi9PNGMKcnpV00QYVxqXb9XZi4hLbfPzks7N_Uh-YuKTNeSYuj92vjfgnAAD__0R2jr4">