mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-17 13:15:44 +02:00
Save the head of the type for the return value.
This commit is contained in:
parent
cf3d839940
commit
c7c666408a
1 changed files with 7 additions and 2 deletions
|
@ -232,6 +232,7 @@ public class SourceManager extends SessionObject implements ICDISourceManager {
|
||||||
|
|
||||||
// Parse the string.
|
// Parse the string.
|
||||||
GDBType gdbType = gdbTypeParser.parse(typename);
|
GDBType gdbType = gdbTypeParser.parse(typename);
|
||||||
|
Type headType = null;
|
||||||
Type type = null;
|
Type type = null;
|
||||||
|
|
||||||
for (Type aType = null; gdbType != null; type = aType) {
|
for (Type aType = null; gdbType != null; type = aType) {
|
||||||
|
@ -259,10 +260,14 @@ public class SourceManager extends SessionObject implements ICDISourceManager {
|
||||||
if (type instanceof DerivedType) {
|
if (type instanceof DerivedType) {
|
||||||
((DerivedType)type).setComponentType(aType);
|
((DerivedType)type).setComponentType(aType);
|
||||||
}
|
}
|
||||||
|
// Save the head to returning it.
|
||||||
|
if (headType == null) {
|
||||||
|
headType = aType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type != null) {
|
if (headType != null) {
|
||||||
return type;
|
return headType;
|
||||||
}
|
}
|
||||||
throw new CDIException("Unknown type");
|
throw new CDIException("Unknown type");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue