<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/67548>67548</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
libclang is giving different type spelling starting from clang 15.0.0
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mosvard
</td>
</tr>
</table>
<pre>
After updating Clang from version 14 to 15, I noticed a change in the behavior of the **clang_getTypeSpelling(CXType CT)** function. Previously, the function used to return the full type name, including the namespace. However, after the update, it now returns the type name without the namespace. Perhaps there is a flag or some other setting that we can use to achieve the same behavior as we had in Clang 14. We need to obtain the full type name, including the namespace. Please suggest what we can do to address this issue.
Here is an example of my class.
```
#include <string>
namespace cppbind::example {
class Task {
public:
Task(){};
Task(const std::string& title) : _title(title) {};
std::string& title() {
return _title;
};
void setTitle(const std::string& title) {
_title = title;
};
bool equals(Task* t) const {
return this == t;
}
protected:
std::string _title;
};
}
```
For example, before the update, the `equals` method's argument type spelling was `cppbind::example::Task * ` but now it is `Task *`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVU1v4zYQ_TX0ZbCCRH1YPujgxDW2twAN0N4WlDiS2FKkyqHs5t8XpOQ4cXeBbRDIIGfmvXnD4VAQqcEgNqx8YuVpJxY_WtdMli7CyV1r5Vtz7D06WGYpvDIDPGthBuidneCCjpQ1kBXgLWQl48_wKxjrVYcSBHSjMAOCMuBHhBZHcVHWge3jmvEj48cuwH0b0L--zfjbjForMzBeP_8RNuD5lfHD6gn9YjqvrEngxeFF2YX0W6AMYDcbLIQyZOPQL85sNq3BBzQjJgwRynR6kUFNsIddmkWHCXy1V7ygCz4iyg72KH2N82DsdcOmaHzHhavyo138I-QLulHM0dkhKAIBvRYDWAdkJwQbDEDo_ZqP8HBF6ESUEpSIblR4wYhLgei9kIKC6yhkKPF6LlmRwO8IBtcq2NYL9b-r8K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