1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 11:55:40 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-11-25 11:40:05 -08:00
parent eff4487436
commit f7a0fb2c7f
2 changed files with 13 additions and 15 deletions

View file

@ -657,18 +657,17 @@ public class CPPVisitor extends ASTQueries {
binding = new ProblemBinding(alias.getAlias(), IProblemBinding.SEMANTIC_NAME_NOT_FOUND); binding = new ProblemBinding(alias.getAlias(), IProblemBinding.SEMANTIC_NAME_NOT_FOUND);
} }
} }
return binding; return binding;
} else if (declaration instanceof ICPPASTAliasDeclaration) { } else if (declaration instanceof ICPPASTAliasDeclaration) {
ICPPASTAliasDeclaration alias = (ICPPASTAliasDeclaration) declaration; ICPPASTAliasDeclaration alias = (ICPPASTAliasDeclaration) declaration;
ICPPScope scope = (ICPPScope) getContainingScope(declaration); ICPPScope scope = (ICPPScope) getContainingScope(declaration);
IBinding binding = scope.getBinding(alias.getAlias(), false); IBinding binding = scope.getBinding(alias.getAlias(), false);
if (!(binding instanceof ICPPInternalBinding)) { if (!(binding instanceof ICPPInternalBinding)) {
IType type = createType(alias.getMappingTypeId()); IType type = createType(alias.getMappingTypeId());
if (type instanceof IProblemBinding) { if (type instanceof IProblemBinding) {
IProblemBinding problem = (IProblemBinding) type; IProblemBinding problem = (IProblemBinding) type;
type = new CPPClassType.CPPClassTypeProblem(problem.getASTNode(), problem.getID(), alias.getMappingTypeId().getAbstractDeclarator().getName().toCharArray()); type = new CPPClassType.CPPClassTypeProblem(problem.getASTNode(), problem.getID(),
alias.getMappingTypeId().getAbstractDeclarator().getName().toCharArray());
} }
if (type != null) { if (type != null) {
if (alias.getParent() instanceof ICPPASTTemplateDeclaration) { if (alias.getParent() instanceof ICPPASTTemplateDeclaration) {
@ -1836,13 +1835,12 @@ public class CPPVisitor extends ASTQueries {
return pTypes; return pTypes;
} }
/** /**
* Adjusts the parameter type according to 8.3.5-3: * Adjusts the parameter type according to 8.3.5-3:
* cv-qualifiers are deleted, arrays and function types are converted to pointers. * cv-qualifiers are deleted, arrays and function types are converted to pointers.
*/ */
static IType adjustParameterType(final IType pt, boolean forFunctionType) { static IType adjustParameterType(final IType pt, boolean forFunctionType) {
// bug 239975 // Bug 239975
IType t= SemanticUtil.getNestedType(pt, TDEF); IType t= SemanticUtil.getNestedType(pt, TDEF);
if (t instanceof IArrayType) { if (t instanceof IArrayType) {
IArrayType at = (IArrayType) t; IArrayType at = (IArrayType) t;