<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/77681>77681</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Ability to parse C++ types from string provided a context
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          deadlocklogic
      </td>
    </tr>
</table>

<pre>
    Is there a way to parse a type from a string provided a context : a declaration for instance.
Consider a simple example:
```C++
#include <memory>
namespace ns {
struct Struct {
};
}
```
Consider parsing for instance: `const Struct*` in the `clang::CXXRecordDecl` named `ns::Struct`, how it is done?
I would expect a functionality like: `parseType("const Struct*", D);`, but couldn't find anything similar in the documentation.
Any clues would be much appreciated, I am working on a code generator built on top of clang.
Thanks.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U8FuqzoQ_RqzGTUCQ0KyYJEmL1K373XR7WBPwC_GRvbQlL-_MqS9vZWuZMngGZ8554wHYzSdI2rE9llszxlO3PvQaEJtvbpZ3xmVtV7PzUsE7ikQINxxBvYwYojpl-eR4Br8AAiRg3EdjMG_G00aEJR3TB8MojwCgiZlMSAb7-DqAxgXGZ2ijcjPIj-evItGU0hIZhgtAX1g2kV5XDPELl_XScjntNZTWRqn7KQJRHkaaPBhFuU_a9DhQHFEReAiiPpxJXKYFMN_6_Z1LOqzKL99_1n0B8vkQJL7XUnSKXa58i5-oguZEMC45OAStOi6JKk8nt7e_iXlgz6TsikrsdUpycU144Gxy4U8Qe_vYBhMBO0difKyMnqBu5-sBvoYSTEgXCenksloDc9gze2T19K013kkIfdCyp80pUxVzkIekgtrzXZiUAneCVkzXI3TgG7mPkmPZjAWw6c47dU0kOOlw4-mHt0Myk4UHyRbgmFSPeA4BlIGmXQq8wI4wN2HW4L1bnk6mqAjRwHZB2gnYzlF2I_gr7C4-Kjx2qO7xU2mm1IfygNm1BR1Xh2KfX7YZn1TtXK321OFOV6rq64OqijqutC1rkkW2yozjcxllRdFLnNZlNsNbuWBynJfaq0kylZUOQ1o7Mba92HjQ5eZGCdq6nq3LzKLLdm4TJGUju6wBJOd23MWmnTnqZ26KKrcmsjxNwobttQcW7N06musHs97Ga64TtdfZyubgm165nF5MfIi5KUz3E_tRvlByEuq9diexuD_p9Try8IwCnlZFPwKAAD___LFSh0">