How to get actual name of invalid/unresolved type in clang AST

468 views Asked by At

Consider the following code

int function()
{
  unknownType variable;
}

In the above code snippet, "unknownType" is not resolved at compile time, so clang will put default type as int in the AST and mark the declaration as invalid.

Now the question is while traversing the AST, how to get the name "unknownType". Getting the type name with existing API will give int, and its source range is also invalid.

Does anybody encounter such problem? Please help?

Thanks, Hemant

0

There are 0 answers