mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
deal with C++ references
This commit is contained in:
parent
6accf8fc2d
commit
9ee027d183
1 changed files with 10 additions and 3 deletions
|
@ -106,7 +106,7 @@ public class GDBTypeParser {
|
|||
derived = (GDBDerivedType)gdbType;
|
||||
gdbType = derived.getChild();
|
||||
if (type == GDBType.FUNCTION) {
|
||||
sb.append("()");
|
||||
sb.append("()"); //$NON-NLS-1$
|
||||
} else if (type == GDBType.ARRAY) {
|
||||
sb.append('[').append(derived.getDimension()).append(']');
|
||||
} else if (type == GDBType.POINTER) {
|
||||
|
@ -116,10 +116,17 @@ public class GDBTypeParser {
|
|||
} else if (childType == GDBType.GENERIC) {
|
||||
sb.insert(0, '*');
|
||||
} else {
|
||||
sb.insert(0, "(*").append(")");
|
||||
sb.insert(0, "(*").append(')'); //$NON-NLS-1$
|
||||
}
|
||||
} else if (type == GDBType.REFERENCE) {
|
||||
sb.insert(0, "(&").append(")");
|
||||
int childType = (gdbType != null) ? gdbType.getType() : GDBType.GENERIC;
|
||||
if (childType == GDBType.POINTER || childType == GDBType.REFERENCE) {
|
||||
sb.append("&"); //$NON-NLS-1$
|
||||
} else if (childType == GDBType.GENERIC) {
|
||||
sb.insert(0, '&');
|
||||
} else {
|
||||
sb.insert(0, "(&").append(')'); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sb.insert(0, ' ');
|
||||
|
|
Loading…
Add table
Reference in a new issue