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 // the scope is from the ast
if (scope instanceof ICPPNamespaceScope) {
// mstodo revisit unnamed namespaces IName name= scope.getScopeName();
IScope testScope= scope;
while (testScope instanceof ICPPNamespaceScope) {
IName name= testScope.getScopeName();
if (name != null && name.toCharArray().length == 0) { if (name != null && name.toCharArray().length == 0) {
testScope= scope.getParent(); // skip unnamed namespaces
if (testScope != null) { return null;
scope= testScope;
}
}
else {
testScope= null;
} }
} }