Displayed reference count:

Real reference count:

It takes reference count of namespace instead of a current function.
X-macro breaks it, but I believe it will be very hard to find a workaround:

*If it helps with macros:
This technique takes each member of one macros and passes it to other macros)
It will look like this on other, simpler example:

It will count diagnnostic on each "unrolled" member of such construction. Which is pretty expectable.
Displayed reference count:

Real reference count:

It takes reference count of namespace instead of a current function.
X-macro breaks it, but I believe it will be very hard to find a workaround:

*If it helps with macros:

This technique takes each member of one macros and passes it to other macros)
It will look like this on other, simpler example:
It will count diagnnostic on each "unrolled" member of such construction. Which is pretty expectable.