mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +02:00
Return a meaningful name if we can.
This commit is contained in:
parent
2b86aeb5b9
commit
c9a37ff6c0
1 changed files with 2 additions and 2 deletions
|
@ -109,14 +109,14 @@ public class ProblemBinding extends PlatformObject implements IProblemBinding, I
|
||||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
|
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return CPPSemantics.EMPTY_NAME;
|
return node instanceof IASTName ? new String(((IASTName) node).getSimpleID()) : CPPSemantics.EMPTY_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
|
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
|
||||||
*/
|
*/
|
||||||
public char[] getNameCharArray() {
|
public char[] getNameCharArray() {
|
||||||
return CharArrayUtils.EMPTY;
|
return node instanceof IASTName ? ((IASTName) node).getSimpleID() : CharArrayUtils.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue