1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

Partial fix for bug 229917.

This commit is contained in:
Sergey Prigogin 2008-05-04 00:35:11 +00:00
parent 7f19b400e8
commit b0849e06bf
3 changed files with 570 additions and 550 deletions

View file

@ -649,7 +649,7 @@ public class CPPSemantics {
// store using-directives found in this block or namespace for later use.
if ((!data.hasResults() || !data.qualified() || data.contentAssist) && scope instanceof ICPPNamespaceScope) {
final ICPPNamespaceScope blockScope= (ICPPNamespaceScope) scope;
if (! (blockScope instanceof ICPPBlockScope)) {
if (!(blockScope instanceof ICPPBlockScope)) {
data.visited.put(blockScope); // namespace has been searched.
if (data.tu != null) {
data.tu.handleAdditionalDirectives(blockScope);
@ -776,7 +776,7 @@ public class CPPSemantics {
//if the inheritanceChain already contains the parent, then that
//is circular inheritance
if (! data.inheritanceChain.containsKey(parent)) {
if (!data.inheritanceChain.containsKey(parent)) {
//is this name define in this scope?
if (ASTInternal.isFullyCached(parent)) {
if (data.astName != null && !data.contentAssist) {
@ -1395,7 +1395,7 @@ public class CPPSemantics {
return alias;
} else if (declaration instanceof IASTFunctionDefinition) {
IASTFunctionDefinition functionDef = (IASTFunctionDefinition) declaration;
if (! ((ICPPASTDeclSpecifier) functionDef.getDeclSpecifier()).isFriend()) {
if (!((ICPPASTDeclSpecifier) functionDef.getDeclSpecifier()).isFriend()) {
IASTFunctionDeclarator declarator = functionDef.getDeclarator();
//check the function itself
@ -1562,7 +1562,9 @@ public class CPPSemantics {
final boolean indexBased= data.tu != null && data.tu.getIndex() != null;
@SuppressWarnings("unchecked")
ObjectSet<IFunction> fns= ObjectSet.EMPTY_SET, templateFns= ObjectSet.EMPTY_SET;
ObjectSet<IFunction> fns= ObjectSet.EMPTY_SET;
@SuppressWarnings("unchecked")
ObjectSet<IFunction> templateFns= ObjectSet.EMPTY_SET;
IBinding type = null;
IBinding obj = null;
IBinding temp = null;

View file

@ -1223,6 +1223,7 @@ public class CPPTemplates {
}
return false;
}
static public boolean deduceTemplateArgument(ObjectMap map, IType p, IType a) throws DOMException {
boolean pIsAReferenceType = (p instanceof ICPPReferenceType);
p = getParameterTypeForDeduction(p);
@ -1308,6 +1309,8 @@ public class CPPTemplates {
}
}
return true;
} else if (p instanceof ICPPInternalUnknown) {
return true; // An unknown type may match anything.
} else {
return p.isSameType(a);
}
@ -1330,7 +1333,6 @@ public class CPPTemplates {
* for each occurrence of that parameter in the function parameter list
* @throws DOMException
*/
static private IType[] createArgsForFunctionTemplateOrdering(ICPPFunctionTemplate template) throws DOMException{
ICPPTemplateParameter[] paramList = template.getTemplateParameters();
int size = paramList.length;