1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Keeps content of unnamed namespaces out of the index, see bug 160913

This commit is contained in:
Markus Schorn 2006-10-25 13:43:31 +00:00
parent 376ca09d3c
commit 8219ea4ef8

View file

@ -197,19 +197,11 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IBindingIdent
}
// the scope is from the ast
// mstodo revisit unnamed namespaces
IScope testScope= scope;
while (testScope instanceof ICPPNamespaceScope) {
IName name= testScope.getScopeName();
if (scope instanceof ICPPNamespaceScope) {
IName name= scope.getScopeName();
if (name != null && name.toCharArray().length == 0) {
testScope= scope.getParent();
if (testScope != null) {
scope= testScope;
}
}
else {
testScope= null;
// skip unnamed namespaces
return null;
}
}