diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java index e5427b68185..16f7a4d0e6e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java @@ -86,8 +86,7 @@ public class ASTTypeUtil { if (parameters.length == 0) { return false; } else if (parameters.length == 1) { - IType ultimateType = SemanticUtil - .getUltimateTypeViaTypedefs(parameters[0].getType()); + IType ultimateType = SemanticUtil.getUltimateTypeViaTypedefs(parameters[0].getType()); if (ultimateType instanceof IBasicType) { if (((IBasicType) ultimateType).getType() == IBasicType.t_void) { @@ -514,7 +513,7 @@ public class ASTTypeUtil { */ public static String getType(IASTDeclarator decltor) { // get the most nested declarator - while(decltor.getNestedDeclarator() != null) + while (decltor.getNestedDeclarator() != null) decltor = decltor.getNestedDeclarator(); IBinding binding = decltor.getName().resolveBinding(); @@ -559,7 +558,9 @@ public class ASTTypeUtil { return getType((IType)((IASTName) node).resolveBinding()); if (node instanceof IASTTypeId) return getType((IASTTypeId) node); - } catch (DOMException e) { return EMPTY_STRING; } + } catch (DOMException e) { + return EMPTY_STRING; + } return EMPTY_STRING; } @@ -681,8 +682,7 @@ public class ASTTypeUtil { IASTNode node= null; if (binding instanceof ICInternalBinding) { node= ((ICInternalBinding) binding).getPhysicalNode(); - } - else if (binding instanceof ICPPInternalBinding) { + } else if (binding instanceof ICPPInternalBinding) { node= ((ICPPInternalBinding) binding).getDefinition(); } if (node != null) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java index 691bb083e22..8379dbacea5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java @@ -2039,8 +2039,9 @@ public class CPPSemantics { return null; if (data.forFunctionDeclaration()) return firstViable; - - final IType[] sourceParameters = getSourceParameterTypes(data.functionParameters); // the parameters the function is being called with + + // The parameters the function is being called with + final IType[] sourceParameters = getSourceParameterTypes(data.functionParameters); if (CPPTemplates.containsDependentType(sourceParameters)) { if (viableCount == 1) return firstViable; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeFunctionType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeFunctionType.java index 23449d23650..9520271e83a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeFunctionType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/CompositeFunctionType.java @@ -22,20 +22,19 @@ public class CompositeFunctionType extends CompositeType implements IFunctionTyp } public IType[] getParameterTypes() throws DOMException { - IType[] result = ((IFunctionType)type).getParameterTypes(); - for(int i=0; i