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

Function targetTypeKeepAliases

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

Source from the content-addressed store, hash-verified

67}
68
69AbstractType::Ptr targetTypeKeepAliases(const AbstractType::Ptr& _base, const TopDUContext* /*topContext*/,
70 bool* /*constant*/)
71{
72 auto base = _base;
73
74 auto ref = base.dynamicCast<ReferenceType>();
75 auto pnt = base.dynamicCast<PointerType>();
76
77 while (ref || pnt) {
78 if (ref) {
79 uint hadModifiers = ref->modifiers();
80 base = ref->baseType();
81 if (hadModifiers && base)
82 base->setModifiers(base->modifiers() | hadModifiers);
83 } else if (pnt) {
84 base = pnt->baseType();
85 }
86 ref = base.dynamicCast<ReferenceType>();
87 pnt = base.dynamicCast<PointerType>();
88 }
89
90 return base;
91}
92
93AbstractType::Ptr resolveAliasType(const AbstractType::Ptr& eventualAlias)
94{

Callers 2

usefulDeclarationFunction · 0.85

Calls 3

modifiersMethod · 0.80
setModifiersMethod · 0.80
baseTypeMethod · 0.45

Tested by

no test coverage detected