| 67 | } |
| 68 | |
| 69 | AbstractType::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 | |
| 93 | AbstractType::Ptr resolveAliasType(const AbstractType::Ptr& eventualAlias) |
| 94 | { |
no test coverage detected