MCPcopy Create free account
hub / github.com/KDE/kdevelop / unAliasedType

Function unAliasedType

kdevplatform/language/duchain/types/typeutils.cpp:18–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16using namespace KDevelop;
17
18AbstractType::Ptr unAliasedType(const AbstractType::Ptr& _type)
19{
20 auto type = _type;
21 auto alias = type.dynamicCast<KDevelop::TypeAliasType>();
22
23 int depth = 0; //Prevent endless recursion
24 while (alias && depth < 20) {
25 uint hadModifiers = alias->modifiers();
26
27 type = alias->type();
28
29 if (hadModifiers && type)
30 type->setModifiers(type->modifiers() | hadModifiers);
31
32 alias = type.dynamicCast<KDevelop::TypeAliasType>();
33 ++depth;
34 }
35
36 return type;
37}
38
39///@todo remove constant and topContext
40AbstractType::Ptr targetType(const AbstractType::Ptr& _base, const TopDUContext* /*topContext*/, bool* /*constant*/)

Callers 3

DeclarationTestFunction · 0.85
testSizeAlignOfMethod · 0.85

Calls 3

modifiersMethod · 0.80
setModifiersMethod · 0.80
typeMethod · 0.45

Tested by 2

DeclarationTestFunction · 0.68
testSizeAlignOfMethod · 0.68