Hi,
I’m trying to match certain expressions with clang-tidy, see code:
template
using Addr32 = T;
Addr32* p32 = nullptr;
int* p64 = p32; // I want to match this
int* pTestNative = p64; // I don’t want to match this
int main()
{
}
So I want to match any DeclRefExpr whose type is Addr32, but I can’t figure out how.
The closest I’ve gotten using clang-query is match declRefExpr(hasType( asString(“Addr32 *”) )), but I don’t want to have the specify the type int. I want to match all possible types Addr32.
Any ideas?
Regards,
- | - |
Patrik Eklöf
Programmer
patrik.eklof@vmssoftware.com
VMS Software, inc.
Skeppsgatan 19, SE-211 11 Malmö Sweden
http://vmssoftware.com/