mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 22:05:44 +02:00
Bug 305975: Fix creation of ICElements for enumerators.
This commit is contained in:
parent
2361b4c075
commit
b07eedb957
1 changed files with 12 additions and 0 deletions
|
@ -26,6 +26,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPEnumeration;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||||
|
@ -133,6 +134,17 @@ public class CElementHandleFactory {
|
||||||
return tu;
|
return tu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parentBinding instanceof IEnumeration) {
|
||||||
|
ICElement grandParent= createParent(tu, parentBinding);
|
||||||
|
if (parentBinding instanceof ICPPEnumeration && parentBinding.getNameCharArray().length > 0) {
|
||||||
|
if (grandParent != null) {
|
||||||
|
return new EnumerationHandle(grandParent, (ICPPEnumeration) parentBinding);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return grandParent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (parentBinding instanceof ICPPNamespace) {
|
if (parentBinding instanceof ICPPNamespace) {
|
||||||
char[] scopeName= parentBinding.getNameCharArray();
|
char[] scopeName= parentBinding.getNameCharArray();
|
||||||
// skip unnamed namespace
|
// skip unnamed namespace
|
||||||
|
|
Loading…
Add table
Reference in a new issue