mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Removed an unused piece of code and adjusted comments.
This commit is contained in:
parent
40a308476b
commit
d5b22c05c7
1 changed files with 11 additions and 10 deletions
|
@ -250,7 +250,6 @@ public class CPPSemantics {
|
||||||
return postResolution(binding, data);
|
return postResolution(binding, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static IBinding postResolution(IBinding binding, LookupData data) {
|
private static IBinding postResolution(IBinding binding, LookupData data) {
|
||||||
// If the normal lookup of the unqualified name finds a class member function, then ADL does not occur
|
// If the normal lookup of the unqualified name finds a class member function, then ADL does not occur
|
||||||
if (data.checkAssociatedScopes() && !data.hasMemberFunctionResult()) {
|
if (data.checkAssociatedScopes() && !data.hasMemberFunctionResult()) {
|
||||||
|
@ -1952,7 +1951,9 @@ public class CPPSemantics {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a binding belongs to an AST or is reachable from it through includes.
|
* Checks if a binding is an AST binding, or is reachable from the AST through includes.
|
||||||
|
* The binding is assumed to belong to the AST, if it is not an IIndexBinding and not
|
||||||
|
* a specialization of an IIndexBinding.
|
||||||
* @param ast
|
* @param ast
|
||||||
* @param binding
|
* @param binding
|
||||||
* @return <code>true</code> if the <code>binding</code> is reachable from <code>ast</code>.
|
* @return <code>true</code> if the <code>binding</code> is reachable from <code>ast</code>.
|
||||||
|
@ -1968,12 +1969,13 @@ public class CPPSemantics {
|
||||||
indexBinding = (IIndexBinding) binding;
|
indexBinding = (IIndexBinding) binding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (indexBinding != null) {
|
if (indexBinding == null) {
|
||||||
|
// We don't check if the binding really belongs to the AST specified by the ast
|
||||||
|
// parameter assuming that the caller doesn't deal with two ASTs at a time.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
IIndexFileSet indexFileSet = ast.getIndexFileSet();
|
IIndexFileSet indexFileSet = ast.getIndexFileSet();
|
||||||
return indexFileSet != null && indexFileSet.containsDeclaration(indexBinding);
|
return indexFileSet != null && indexFileSet.containsDeclaration(indexBinding);
|
||||||
} else {
|
|
||||||
return ast.getDeclarationsInAST(binding).length != 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static private void reduceToViable(LookupData data, IBinding[] functions) throws DOMException {
|
static private void reduceToViable(LookupData data, IBinding[] functions) throws DOMException {
|
||||||
|
@ -2117,7 +2119,6 @@ public class CPPSemantics {
|
||||||
boolean ambiguous = false; // ambiguity, 2 functions are equally good
|
boolean ambiguous = false; // ambiguity, 2 functions are equally good
|
||||||
FunctionCost bestFnCost = null; // the cost of the best function
|
FunctionCost bestFnCost = null; // the cost of the best function
|
||||||
|
|
||||||
|
|
||||||
// Loop over all functions
|
// Loop over all functions
|
||||||
List<FunctionCost> potentialCosts= null;
|
List<FunctionCost> potentialCosts= null;
|
||||||
for (IFunction fn : fns) {
|
for (IFunction fn : fns) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue