Creating IdentifierInfo object from a string token

Hello,

I am using Clang to develop some extensions on C99. I want to do some transformations to Clang generated AST. So far I did some changes related to declarations. Now I want to do some semantic checking on tokens i am introducing in the middle of compilation process. Following function does exactly what I want to do;

ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, …)

In SemaDecl.cpp (L201).

But inorder to call above function I need to craft a IdentifierInfo object from a string. What is the best way to create IdentifierInfo object without querying IdentifierTable ?

Appreciate your help on this.

Thank you
Regards
-Thejaka