Attempting to get type from typedef struct causes crash
I am trying to write a custom clang-tidy check (I want to check for the use of CAdapt<>) but have been struggling with the following issue: I am trying to make an AST matcher which checks the string representation of the type of a VarDecl
- but when it runs on certain code it crashes and I can’t figure out why. The issue seems to be some interaction between QualType::getAsString() and typedef struct variables, (there may be other code which crashes it but this is what I have been able to find).
The issue can be reproduced with the following custom clang-tidy check (apologies if there is a more sensible way to make a minimal repro than a clang-tidy check):