From 53ec9571cb132f17266802903b2f9e22bc726dae Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 25 Sep 2016 11:22:05 -0700 Subject: [PATCH] Cosmetics. Change-Id: I78635ca74bffd3df7b51f87e70464e99dd699324 --- .../gnu/AbstractGCCBOPConsoleParser.java | 2 +- .../ASTAmbiguousBinaryVsCastExpression.java | 54 +-- ...AmbiguousCastVsFunctionCallExpression.java | 18 +- .../core/dom/parser/ASTAmbiguousNode.java | 28 +- .../core/dom/parser/ASTAttributeOwner.java | 6 +- .../core/dom/parser/ASTCopyLocation.java | 16 +- .../core/dom/parser/ASTEnumerator.java | 6 +- .../core/dom/parser/ASTEqualsInitializer.java | 8 +- .../internal/core/dom/parser/ASTInternal.java | 12 +- .../cdt/internal/core/dom/parser/ASTNode.java | 2 +- .../core/dom/parser/ASTNodeSearch.java | 8 +- .../core/dom/parser/ASTNodeSpecification.java | 4 +- .../ASTPreprocessorSelectionResult.java | 10 +- .../internal/core/dom/parser/ASTProblem.java | 14 +- .../core/dom/parser/ASTTokenList.java | 4 +- .../core/dom/parser/ASTTranslationUnit.java | 50 +-- .../parser/AbstractGNUSourceCodeParser.java | 34 +- .../core/dom/parser/ArithmeticConversion.java | 90 ++--- .../core/dom/parser/BacktrackException.java | 14 +- .../core/dom/parser/CStringValue.java | 76 ++-- .../core/dom/parser/ChildCollector.java | 6 +- .../core/dom/parser/CompositeValue.java | 44 +-- .../core/dom/parser/DeclarationOptions.java | 8 +- .../dom/parser/FindNodeForOffsetAction.java | 6 +- .../core/dom/parser/FloatingPointValue.java | 58 +-- .../dom/parser/IASTAmbiguousDeclarator.java | 4 +- .../dom/parser/IASTAmbiguousExpression.java | 4 +- .../IASTAmbiguousParameterDeclaration.java | 4 +- .../IASTAmbiguousSimpleDeclaration.java | 2 +- .../IASTInternalEnumerationSpecifier.java | 4 +- .../dom/parser/IASTInternalNameOwner.java | 8 +- .../core/dom/parser/IASTInternalScope.java | 10 +- .../parser/IRecursionResolvingBinding.java | 2 +- .../dom/parser/ISerializableEvaluation.java | 4 +- .../dom/parser/ISerializableExecution.java | 4 +- .../core/dom/parser/ISerializableType.java | 2 +- .../core/dom/parser/ITypeMarshalBuffer.java | 22 +- .../core/dom/parser/IntegralValue.java | 12 +- .../internal/core/dom/parser/NodeFactory.java | 6 +- .../dom/parser/ParserLogServiceWrapper.java | 2 +- .../core/dom/parser/ProblemBinding.java | 2 +- .../core/dom/parser/ProblemFunctionType.java | 6 +- .../internal/core/dom/parser/ProblemType.java | 10 +- .../core/dom/parser/ValueFactory.java | 88 ++--- .../dom/parser/VariableReadWriteFlags.java | 36 +- .../core/dom/parser/c/CASTASMDeclaration.java | 16 +- .../dom/parser/c/CASTAlignmentSpecifier.java | 10 +- .../dom/parser/c/CASTAmbiguityResolver.java | 12 +- .../c/CASTAmbiguousAlignmentSpecifier.java | 6 +- .../dom/parser/c/CASTAmbiguousDeclarator.java | 6 +- .../dom/parser/c/CASTAmbiguousExpression.java | 10 +- .../c/CASTAmbiguousParameterDeclaration.java | 8 +- .../c/CASTAmbiguousSimpleDeclaration.java | 8 +- .../dom/parser/c/CASTAmbiguousStatement.java | 8 +- .../dom/parser/c/CASTArrayDeclarator.java | 4 +- .../dom/parser/c/CASTArrayDesignator.java | 2 +- .../core/dom/parser/c/CASTArrayModifier.java | 18 +- .../parser/c/CASTArrayRangeDesignator.java | 6 +- .../c/CASTArraySubscriptExpression.java | 18 +- .../core/dom/parser/c/CASTAttribute.java | 6 +- .../dom/parser/c/CASTBaseDeclSpecifier.java | 26 +- .../dom/parser/c/CASTBinaryExpression.java | 44 +-- .../core/dom/parser/c/CASTBreakStatement.java | 4 +- .../core/dom/parser/c/CASTCaseStatement.java | 6 +- .../core/dom/parser/c/CASTCastExpression.java | 34 +- .../parser/c/CASTCompositeTypeSpecifier.java | 16 +- .../dom/parser/c/CASTCompoundStatement.java | 4 +- .../c/CASTCompoundStatementExpression.java | 24 +- .../parser/c/CASTConditionalExpression.java | 74 ++-- .../dom/parser/c/CASTContinueStatement.java | 2 +- .../core/dom/parser/c/CASTDeclarator.java | 24 +- .../core/dom/parser/c/CASTDoStatement.java | 4 +- .../parser/c/CASTElaboratedTypeSpecifier.java | 42 +- .../parser/c/CASTEnumerationSpecifier.java | 14 +- .../core/dom/parser/c/CASTEnumerator.java | 4 +- .../core/dom/parser/c/CASTExpressionList.java | 16 +- .../dom/parser/c/CASTExpressionStatement.java | 2 +- .../dom/parser/c/CASTFieldDeclarator.java | 10 +- .../dom/parser/c/CASTFieldDesignator.java | 8 +- .../core/dom/parser/c/CASTFieldReference.java | 10 +- .../core/dom/parser/c/CASTForStatement.java | 6 +- .../parser/c/CASTFunctionCallExpression.java | 10 +- .../dom/parser/c/CASTFunctionDefinition.java | 14 +- .../core/dom/parser/c/CASTGotoStatement.java | 2 +- .../core/dom/parser/c/CASTIdExpression.java | 14 +- .../core/dom/parser/c/CASTIfStatement.java | 10 +- .../dom/parser/c/CASTInitializerList.java | 10 +- .../parser/c/CASTKnRFunctionDeclarator.java | 18 +- .../core/dom/parser/c/CASTLabelStatement.java | 6 +- .../dom/parser/c/CASTLiteralExpression.java | 22 +- .../internal/core/dom/parser/c/CASTName.java | 16 +- .../core/dom/parser/c/CASTNullStatement.java | 2 +- .../parser/c/CASTParameterDeclaration.java | 20 +- .../core/dom/parser/c/CASTPointer.java | 2 +- .../dom/parser/c/CASTProblemDeclaration.java | 2 +- .../dom/parser/c/CASTProblemExpression.java | 6 +- .../core/dom/parser/c/CASTProblemOwner.java | 8 +- .../dom/parser/c/CASTProblemStatement.java | 4 +- .../dom/parser/c/CASTReturnStatement.java | 2 +- .../dom/parser/c/CASTSimpleDeclSpecifier.java | 36 +- .../dom/parser/c/CASTSimpleDeclaration.java | 16 +- .../dom/parser/c/CASTSwitchStatement.java | 2 +- .../dom/parser/c/CASTTranslationUnit.java | 10 +- .../core/dom/parser/c/CASTTypeId.java | 4 +- .../dom/parser/c/CASTTypeIdExpression.java | 20 +- .../c/CASTTypeIdInitializerExpression.java | 4 +- .../parser/c/CASTTypedefNameSpecifier.java | 6 +- .../dom/parser/c/CASTUnaryExpression.java | 12 +- .../core/dom/parser/c/CASTWhileStatement.java | 4 +- .../dom/parser/c/CArithmeticConversion.java | 6 +- .../core/dom/parser/c/CArrayType.java | 26 +- .../core/dom/parser/c/CBasicType.java | 38 +- .../core/dom/parser/c/CBuiltinParameter.java | 10 +- .../core/dom/parser/c/CBuiltinVariable.java | 16 +- .../dom/parser/c/CCompositeTypeScope.java | 6 +- .../core/dom/parser/c/CEnumeration.java | 30 +- .../core/dom/parser/c/CEnumerator.java | 6 +- .../core/dom/parser/c/CExternalFunction.java | 4 +- .../internal/core/dom/parser/c/CField.java | 2 +- .../internal/core/dom/parser/c/CFunction.java | 10 +- .../core/dom/parser/c/CFunctionScope.java | 8 +- .../core/dom/parser/c/CFunctionType.java | 8 +- .../core/dom/parser/c/CImplicitFunction.java | 20 +- .../core/dom/parser/c/CImplicitTypedef.java | 38 +- .../core/dom/parser/c/CKnRParameter.java | 26 +- .../core/dom/parser/c/CNodeFactory.java | 118 +++--- .../core/dom/parser/c/CPointerType.java | 22 +- .../core/dom/parser/c/CQualifierType.java | 20 +- .../internal/core/dom/parser/c/CScope.java | 80 ++-- .../core/dom/parser/c/CStructMapper.java | 4 +- .../core/dom/parser/c/CStructure.java | 4 +- .../internal/core/dom/parser/c/CTypedef.java | 18 +- .../internal/core/dom/parser/c/CVariable.java | 6 +- .../dom/parser/c/CVariableReadWriteFlags.java | 2 +- .../internal/core/dom/parser/c/CVisitor.java | 358 +++++++++--------- .../parser/c/GCCASTSimpleDeclSpecifier.java | 2 +- .../dom/parser/c/GNUCASTGotoStatement.java | 4 +- .../core/dom/parser/c/GNUCSourceParser.java | 250 ++++++------ .../core/dom/parser/c/ICInternalBinding.java | 2 +- .../core/dom/parser/c/ICInternalFunction.java | 2 +- .../dom/parser/cpp/CPPASTASMDeclaration.java | 16 +- .../parser/cpp/CPPASTAliasDeclaration.java | 2 +- .../parser/cpp/CPPASTAlignmentSpecifier.java | 10 +- .../parser/cpp/CPPASTAmbiguityResolver.java | 28 +- .../CPPASTAmbiguousAlignmentSpecifier.java | 6 +- .../parser/cpp/CPPASTAmbiguousCondition.java | 6 +- .../parser/cpp/CPPASTAmbiguousDeclarator.java | 10 +- .../parser/cpp/CPPASTAmbiguousExpression.java | 6 +- .../CPPASTAmbiguousParameterDeclaration.java | 12 +- .../cpp/CPPASTAmbiguousSimpleDeclaration.java | 8 +- .../parser/cpp/CPPASTAmbiguousStatement.java | 12 +- .../cpp/CPPASTAmbiguousTemplateArgument.java | 12 +- .../dom/parser/cpp/CPPASTArrayModifier.java | 2 +- .../cpp/CPPASTArraySubscriptExpression.java | 44 +-- .../core/dom/parser/cpp/CPPASTAttribute.java | 4 +- .../dom/parser/cpp/CPPASTAttributeOwner.java | 4 +- .../parser/cpp/CPPASTBaseDeclSpecifier.java | 8 +- .../dom/parser/cpp/CPPASTBaseSpecifier.java | 8 +- .../parser/cpp/CPPASTBinaryExpression.java | 6 +- .../cpp/CPPASTBinaryTypeIdExpression.java | 26 +- .../core/dom/parser/cpp/CPPASTCapture.java | 2 +- .../dom/parser/cpp/CPPASTCaseStatement.java | 14 +- .../dom/parser/cpp/CPPASTCastExpression.java | 30 +- .../dom/parser/cpp/CPPASTCatchHandler.java | 4 +- .../parser/cpp/CPPASTClassVirtSpecifier.java | 4 +- .../cpp/CPPASTCompositeTypeSpecifier.java | 20 +- .../parser/cpp/CPPASTCompoundStatement.java | 4 +- .../CPPASTCompoundStatementExpression.java | 8 +- .../cpp/CPPASTConditionalExpression.java | 22 +- .../CPPASTConstructorChainInitializer.java | 12 +- .../parser/cpp/CPPASTContinueStatement.java | 2 +- .../dom/parser/cpp/CPPASTConversionName.java | 14 +- .../cpp/CPPASTDeclarationStatement.java | 8 +- .../core/dom/parser/cpp/CPPASTDeclarator.java | 18 +- .../parser/cpp/CPPASTDecltypeSpecifier.java | 12 +- .../parser/cpp/CPPASTDefaultStatement.java | 2 +- .../parser/cpp/CPPASTDeleteExpression.java | 20 +- .../cpp/CPPASTDesignatedInitializer.java | 2 +- .../dom/parser/cpp/CPPASTDoStatement.java | 6 +- .../cpp/CPPASTElaboratedTypeSpecifier.java | 18 +- .../cpp/CPPASTEnumerationSpecifier.java | 12 +- .../core/dom/parser/cpp/CPPASTEnumerator.java | 4 +- .../CPPASTExplicitTemplateInstantiation.java | 28 +- .../dom/parser/cpp/CPPASTExpressionList.java | 30 +- .../parser/cpp/CPPASTExpressionStatement.java | 6 +- .../dom/parser/cpp/CPPASTFieldDeclarator.java | 6 +- .../dom/parser/cpp/CPPASTFieldReference.java | 18 +- .../dom/parser/cpp/CPPASTForStatement.java | 8 +- .../cpp/CPPASTFunctionCallExpression.java | 64 ++-- .../parser/cpp/CPPASTFunctionDeclarator.java | 26 +- .../parser/cpp/CPPASTFunctionDefinition.java | 18 +- .../cpp/CPPASTFunctionWithTryBlock.java | 8 +- .../dom/parser/cpp/CPPASTGotoStatement.java | 4 +- .../dom/parser/cpp/CPPASTIfStatement.java | 26 +- .../dom/parser/cpp/CPPASTInitializerList.java | 22 +- .../dom/parser/cpp/CPPASTLabelStatement.java | 6 +- .../parser/cpp/CPPASTLambdaExpression.java | 20 +- .../cpp/CPPASTLinkageSpecification.java | 10 +- .../parser/cpp/CPPASTLiteralExpression.java | 170 ++++----- .../core/dom/parser/cpp/CPPASTNameBase.java | 34 +- .../parser/cpp/CPPASTNamedTypeSpecifier.java | 10 +- .../dom/parser/cpp/CPPASTNamespaceAlias.java | 8 +- .../parser/cpp/CPPASTNamespaceDefinition.java | 6 +- .../cpp/CPPASTNaryTypeIdExpression.java | 18 +- .../dom/parser/cpp/CPPASTNewExpression.java | 38 +- .../dom/parser/cpp/CPPASTOperatorName.java | 2 +- .../cpp/CPPASTPackExpansionExpression.java | 10 +- .../cpp/CPPASTParameterDeclaration.java | 8 +- .../core/dom/parser/cpp/CPPASTPointer.java | 4 +- .../dom/parser/cpp/CPPASTPointerToMember.java | 8 +- .../core/dom/parser/cpp/CPPASTProblem.java | 4 +- .../parser/cpp/CPPASTProblemStatement.java | 2 +- .../dom/parser/cpp/CPPASTProblemTypeId.java | 10 +- .../dom/parser/cpp/CPPASTQualifiedName.java | 48 +-- .../cpp/CPPASTRangeBasedForStatement.java | 30 +- .../parser/cpp/CPPASTReferenceOperator.java | 4 +- .../dom/parser/cpp/CPPASTReturnStatement.java | 4 +- .../parser/cpp/CPPASTSimpleDeclSpecifier.java | 10 +- .../parser/cpp/CPPASTSimpleDeclaration.java | 14 +- ...CPPASTSimpleTypeConstructorExpression.java | 24 +- .../CPPASTSimpleTypeTemplateParameter.java | 10 +- .../cpp/CPPASTStaticAssertionDeclaration.java | 14 +- .../dom/parser/cpp/CPPASTSwitchStatement.java | 28 +- .../parser/cpp/CPPASTTemplateDeclaration.java | 14 +- .../parser/cpp/CPPASTTemplateIDAmbiguity.java | 22 +- .../core/dom/parser/cpp/CPPASTTemplateId.java | 16 +- .../cpp/CPPASTTemplateSpecialization.java | 16 +- .../CPPASTTemplatedTypeTemplateParameter.java | 18 +- .../dom/parser/cpp/CPPASTTranslationUnit.java | 32 +- .../core/dom/parser/cpp/CPPASTTypeId.java | 8 +- .../CPPASTTypeIdInitializerExpression.java | 12 +- .../CPPASTTypeTransformationSpecifier.java | 10 +- .../parser/cpp/CPPASTTypenameExpression.java | 4 +- .../dom/parser/cpp/CPPASTUnaryExpression.java | 20 +- .../parser/cpp/CPPASTUsingDeclaration.java | 20 +- .../dom/parser/cpp/CPPASTUsingDirective.java | 4 +- .../dom/parser/cpp/CPPASTVirtSpecifier.java | 8 +- .../dom/parser/cpp/CPPASTVisibilityLabel.java | 4 +- .../dom/parser/cpp/CPPASTWhileStatement.java | 24 +- .../core/dom/parser/cpp/CPPAliasTemplate.java | 12 +- .../parser/cpp/CPPAliasTemplateInstance.java | 4 +- .../parser/cpp/CPPArithmeticConversion.java | 10 +- .../core/dom/parser/cpp/CPPArrayType.java | 18 +- .../core/dom/parser/cpp/CPPBaseClause.java | 8 +- .../core/dom/parser/cpp/CPPBasicType.java | 18 +- .../core/dom/parser/cpp/CPPBlockScope.java | 6 +- .../dom/parser/cpp/CPPBuiltinParameter.java | 2 +- .../dom/parser/cpp/CPPBuiltinVariable.java | 28 +- .../core/dom/parser/cpp/CPPClassInstance.java | 12 +- .../core/dom/parser/cpp/CPPClassScope.java | 20 +- .../cpp/CPPClassSpecializationScope.java | 2 +- .../core/dom/parser/cpp/CPPClassTemplate.java | 16 +- ...CPPClassTemplatePartialSpecialization.java | 4 +- ...tePartialSpecializationSpecialization.java | 4 +- .../core/dom/parser/cpp/CPPClassType.java | 38 +- .../core/dom/parser/cpp/CPPClosureType.java | 32 +- .../dom/parser/cpp/CPPCompositeBinding.java | 4 +- .../core/dom/parser/cpp/CPPConstructor.java | 30 +- .../cpp/CPPConstructorSpecialization.java | 10 +- .../parser/cpp/CPPConstructorTemplate.java | 4 +- .../parser/cpp/CPPDeferredClassInstance.java | 26 +- .../parser/cpp/CPPDeferredConstructor.java | 6 +- .../dom/parser/cpp/CPPDeferredFunction.java | 16 +- .../core/dom/parser/cpp/CPPEnumScope.java | 4 +- .../core/dom/parser/cpp/CPPEnumeration.java | 18 +- .../core/dom/parser/cpp/CPPEnumerator.java | 2 +- .../core/dom/parser/cpp/CPPField.java | 2 +- .../core/dom/parser/cpp/CPPFunction.java | 28 +- .../dom/parser/cpp/CPPFunctionInstance.java | 4 +- .../core/dom/parser/cpp/CPPFunctionScope.java | 12 +- .../parser/cpp/CPPFunctionSpecialization.java | 26 +- .../dom/parser/cpp/CPPFunctionTemplate.java | 38 +- .../CPPFunctionTemplateSpecialization.java | 6 +- .../core/dom/parser/cpp/CPPFunctionType.java | 14 +- .../parser/cpp/CPPImplicitConstructor.java | 12 +- .../dom/parser/cpp/CPPImplicitFunction.java | 8 +- .../dom/parser/cpp/CPPImplicitMethod.java | 20 +- .../dom/parser/cpp/CPPImplicitTypedef.java | 34 +- .../core/dom/parser/cpp/CPPLabel.java | 6 +- .../cpp/CPPLambdaExpressionParameter.java | 14 +- .../core/dom/parser/cpp/CPPMethod.java | 16 +- .../dom/parser/cpp/CPPMethodInstance.java | 6 +- .../parser/cpp/CPPMethodSpecialization.java | 10 +- .../dom/parser/cpp/CPPMethodTemplate.java | 12 +- .../cpp/CPPMethodTemplateSpecialization.java | 2 +- .../core/dom/parser/cpp/CPPNamespace.java | 18 +- .../dom/parser/cpp/CPPNamespaceAlias.java | 4 +- .../dom/parser/cpp/CPPNamespaceScope.java | 26 +- .../core/dom/parser/cpp/CPPNodeFactory.java | 4 +- .../core/dom/parser/cpp/CPPParameter.java | 20 +- .../dom/parser/cpp/CPPParameterPackType.java | 14 +- .../cpp/CPPParameterSpecialization.java | 6 +- .../parser/cpp/CPPPointerToMemberType.java | 14 +- .../core/dom/parser/cpp/CPPPointerType.java | 18 +- .../core/dom/parser/cpp/CPPQualifierType.java | 14 +- .../core/dom/parser/cpp/CPPReferenceType.java | 22 +- .../core/dom/parser/cpp/CPPScope.java | 2 +- .../core/dom/parser/cpp/CPPScopeMapper.java | 18 +- .../dom/parser/cpp/CPPSpecialization.java | 12 +- .../dom/parser/cpp/CPPTemplateDefinition.java | 38 +- .../cpp/CPPTemplateNonTypeArgument.java | 2 +- .../cpp/CPPTemplateNonTypeParameter.java | 14 +- .../dom/parser/cpp/CPPTemplateParameter.java | 34 +- .../parser/cpp/CPPTemplateParameterMap.java | 14 +- .../core/dom/parser/cpp/CPPTemplateScope.java | 2 +- .../cpp/CPPTemplateTemplateParameter.java | 10 +- .../CPPTemplateTemplateParameterScope.java | 4 +- .../parser/cpp/CPPTemplateTypeParameter.java | 6 +- .../core/dom/parser/cpp/CPPTypedef.java | 2 +- .../parser/cpp/CPPTypedefSpecialization.java | 4 +- .../cpp/CPPUnaryTypeTransformation.java | 8 +- .../dom/parser/cpp/CPPUnknownBinding.java | 2 +- .../parser/cpp/CPPUnknownClassInstance.java | 22 +- .../core/dom/parser/cpp/CPPUnknownField.java | 2 +- .../core/dom/parser/cpp/CPPUnknownMember.java | 6 +- .../dom/parser/cpp/CPPUnknownMemberClass.java | 14 +- .../core/dom/parser/cpp/CPPUnknownMethod.java | 2 +- .../dom/parser/cpp/CPPUnknownTypeScope.java | 16 +- .../dom/parser/cpp/CPPUsingDeclaration.java | 12 +- .../CPPUsingDeclarationSpecialization.java | 4 +- .../dom/parser/cpp/CPPUsingDirective.java | 2 +- .../core/dom/parser/cpp/CPPVariable.java | 44 +-- .../parser/cpp/CPPVariableSpecialization.java | 10 +- .../dom/parser/cpp/CPPVariableTemplate.java | 4 +- .../core/dom/parser/cpp/ClassTypeHelper.java | 20 +- .../parser/cpp/GNUCPPASTGotoStatement.java | 4 +- .../dom/parser/cpp/GNUCPPSourceParser.java | 84 ++-- .../GPPASTExplicitTemplateInstantiation.java | 2 +- .../core/dom/parser/cpp/GPPASTPointer.java | 2 +- .../dom/parser/cpp/GPPASTPointerToMember.java | 2 +- .../parser/cpp/GPPASTSimpleDeclSpecifier.java | 4 +- .../parser/cpp/IASTAmbiguousCondition.java | 4 +- .../dom/parser/cpp/ICPPASTInternalScope.java | 2 +- .../ICPPASTInternalTemplateDeclaration.java | 6 +- .../cpp/ICPPClassSpecializationScope.java | 2 +- .../parser/cpp/ICPPComputableFunction.java | 2 +- .../parser/cpp/ICPPDeferredClassInstance.java | 4 +- .../core/dom/parser/cpp/ICPPEvaluation.java | 22 +- .../dom/parser/cpp/ICPPEvaluationOwner.java | 2 +- .../core/dom/parser/cpp/ICPPExecution.java | 6 +- .../dom/parser/cpp/ICPPExecutionOwner.java | 2 +- .../core/dom/parser/cpp/ICPPInternalBase.java | 2 +- .../parser/cpp/ICPPInternalClassTemplate.java | 2 +- .../dom/parser/cpp/ICPPInternalFunction.java | 2 +- .../cpp/ICPPInternalNamespaceScope.java | 6 +- .../dom/parser/cpp/ICPPTwoPhaseBinding.java | 16 +- .../dom/parser/cpp/ICPPUnknownBinding.java | 4 +- .../dom/parser/cpp/ICPPUnknownMember.java | 2 +- .../parser/cpp/ICPPUnknownMemberClass.java | 8 +- .../core/dom/parser/cpp/ICPPUnknownType.java | 2 +- .../dom/parser/cpp/InstantiationContext.java | 10 +- .../parser/cpp/NameOrTemplateIDVariants.java | 28 +- .../dom/parser/cpp/OverloadableOperator.java | 138 +++---- .../dom/parser/cpp/TemplateIdStrategy.java | 40 +- .../core/dom/parser/cpp/VariableHelpers.java | 12 +- .../parser/cpp/semantics/AccessContext.java | 8 +- .../cpp/semantics/ActivationRecord.java | 4 +- .../cpp/semantics/AutoTypeResolver.java | 4 +- .../cpp/semantics/BuiltinOperators.java | 62 +-- .../parser/cpp/semantics/CPPEvaluation.java | 6 +- .../semantics/CPPFunctionParameterMap.java | 6 +- .../parser/cpp/semantics/CPPFunctionSet.java | 12 +- .../parser/cpp/semantics/CPPInheritance.java | 14 +- .../parser/cpp/semantics/CPPSemantics.java | 78 ++-- .../parser/cpp/semantics/CPPTemplates.java | 48 +-- .../dom/parser/cpp/semantics/CPPVisitor.java | 8 +- .../dom/parser/cpp/semantics/CVQualifier.java | 10 +- .../dom/parser/cpp/semantics/Conversions.java | 10 +- .../core/dom/parser/cpp/semantics/Cost.java | 52 +-- .../dom/parser/cpp/semantics/EvalBinary.java | 50 +-- .../cpp/semantics/EvalBinaryTypeId.java | 4 +- .../dom/parser/cpp/semantics/EvalBinding.java | 58 +-- .../cpp/semantics/EvalCompositeAccess.java | 36 +- .../EvalCompoundStatementExpression.java | 6 +- .../parser/cpp/semantics/EvalConditional.java | 2 +- .../parser/cpp/semantics/EvalConstructor.java | 116 +++--- .../dom/parser/cpp/semantics/EvalFixed.java | 6 +- .../cpp/semantics/EvalFunctionCall.java | 86 ++--- .../core/dom/parser/cpp/semantics/EvalID.java | 24 +- .../parser/cpp/semantics/EvalInitList.java | 2 +- .../cpp/semantics/EvalMemberAccess.java | 22 +- .../cpp/semantics/EvalParameterPack.java | 12 +- .../dom/parser/cpp/semantics/EvalPointer.java | 30 +- .../parser/cpp/semantics/EvalReference.java | 14 +- .../dom/parser/cpp/semantics/EvalTypeId.java | 44 +-- .../dom/parser/cpp/semantics/EvalUnary.java | 58 +-- .../dom/parser/cpp/semantics/EvalUtil.java | 74 ++-- .../dom/parser/cpp/semantics/ExecBreak.java | 6 +- .../dom/parser/cpp/semantics/ExecCase.java | 14 +- .../cpp/semantics/ExecCompoundStatement.java | 28 +- .../cpp/semantics/ExecConstructorChain.java | 16 +- .../parser/cpp/semantics/ExecContinue.java | 6 +- .../semantics/ExecDeclarationStatement.java | 8 +- .../parser/cpp/semantics/ExecDeclarator.java | 102 ++--- .../dom/parser/cpp/semantics/ExecDefault.java | 6 +- .../core/dom/parser/cpp/semantics/ExecDo.java | 14 +- .../semantics/ExecExpressionStatement.java | 8 +- .../dom/parser/cpp/semantics/ExecFor.java | 40 +- .../core/dom/parser/cpp/semantics/ExecIf.java | 26 +- .../parser/cpp/semantics/ExecIncomplete.java | 6 +- .../cpp/semantics/ExecRangeBasedFor.java | 84 ++-- .../dom/parser/cpp/semantics/ExecReturn.java | 8 +- .../cpp/semantics/ExecSimpleDeclaration.java | 14 +- .../dom/parser/cpp/semantics/ExecSwitch.java | 46 +-- .../dom/parser/cpp/semantics/ExecWhile.java | 24 +- .../parser/cpp/semantics/ExpressionTypes.java | 28 +- .../parser/cpp/semantics/FunctionSetType.java | 2 +- .../cpp/semantics/HeuristicResolver.java | 88 ++--- .../cpp/semantics/InitializerListType.java | 10 +- .../dom/parser/cpp/semantics/LookupData.java | 2 +- .../cpp/semantics/NamespaceTypeCollector.java | 14 +- .../parser/cpp/semantics/SemanticUtil.java | 30 +- .../cpp/semantics/SignatureBuilder.java | 8 +- .../semantics/TemplateArgumentDeduction.java | 162 ++++---- .../semantics/TypeOfDependentExpression.java | 8 +- .../cpp/semantics/TypeOfUnknownMember.java | 10 +- .../dom/parser/cpp/semantics/TypeTraits.java | 56 +-- 417 files changed, 3822 insertions(+), 3822 deletions(-) diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java index 66cb0418a85..19613736369 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java @@ -100,7 +100,7 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole boolean rc = false; int lineBreakPos = line.length()-1; char[] lineChars = line.toCharArray(); - while(lineBreakPos >= 0 && Character.isWhitespace(lineChars[lineBreakPos])) { + while (lineBreakPos >= 0 && Character.isWhitespace(lineChars[lineBreakPos])) { lineBreakPos--; } if (lineBreakPos >= 0) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousBinaryVsCastExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousBinaryVsCastExpression.java index 31a85814b0e..eb9b2ba6620 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousBinaryVsCastExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousBinaryVsCastExpression.java @@ -38,12 +38,12 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod fBinaryExpression= binaryExpression; fCastExpression= castExpression; } - + @Override public final IASTExpression copy() { throw new UnsupportedOperationException(); } - + @Override public final IASTExpression copy(CopyStyle style) { throw new UnsupportedOperationException(); @@ -53,7 +53,7 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod public final void addExpression(IASTExpression e) { throw new UnsupportedOperationException(); } - + @Override public final IASTNode[] getNodes() { return getExpressions(); @@ -77,14 +77,14 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod owner.replace(nodeToReplace, fBinaryExpression); nodeToReplace= fBinaryExpression; fBinaryExpression.accept(visitor); - + // find nested names final NameCollector nameCollector= new NameCollector(); fCastExpression.getTypeId().accept(nameCollector); final IASTName[] names= nameCollector.getNames(); - // resolve names + // resolve names boolean hasIssue= false; for (IASTName name : names) { try { @@ -101,7 +101,7 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod if (hasIssue) { return nodeToReplace; } - + final IASTExpression left = fBinaryExpression.getOperand1(); final IASTExpression right = fBinaryExpression.getOperand2(); left.setParent(null); @@ -154,25 +154,25 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod if (r == null) { return middle; } - r.setOperand1(middle); + r.setOperand1(middle); setStart(r, middle); middle= r; r= (IASTBinaryExpression) r.getParent(); - } else if (l instanceof IASTCastExpression) { + } else if (l instanceof IASTCastExpression) { // cast binds stronger than binary operator - ((IASTCastExpression) l).setOperand(middle); + ((IASTCastExpression) l).setOperand(middle); setEnd(l, middle); middle= l; // middle becomes cast-expr, can be put into r (a binary-expr) - l= (IASTExpression) l.getParent(); + l= (IASTExpression) l.getParent(); } else if (l instanceof IASTUnaryExpression) { // // unary operator binds stronger than binary operator - ((IASTUnaryExpression) l).setOperand(middle); + ((IASTUnaryExpression) l).setOperand(middle); setEnd(l, middle); middle= l; // middle becomes unary-expr, can be put into r (a binary-expr) - l= (IASTExpression) l.getParent(); + l= (IASTExpression) l.getParent(); } else { if (r== null || getPrecendence((IASTBinaryExpression) l) >= getPrecendence(r)) { - ((IASTBinaryExpression)l).setOperand2(middle); + ((IASTBinaryExpression) l).setOperand2(middle); setEnd(l, middle); middle= l; // middle becomes binary, can be put into r because precedence is greater or equal. l= (IASTExpression) l.getParent(); @@ -187,19 +187,19 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod } private int getPrecendence(IASTBinaryExpression r) { - switch(r.getOperator()) { + switch (r.getOperator()) { case IASTBinaryExpression.op_ellipses: case IASTBinaryExpression.op_assign: case IASTBinaryExpression.op_binaryAndAssign: case IASTBinaryExpression.op_binaryOrAssign: case IASTBinaryExpression.op_binaryXorAssign: case IASTBinaryExpression.op_divideAssign: - case IASTBinaryExpression.op_minusAssign: - case IASTBinaryExpression.op_moduloAssign: + case IASTBinaryExpression.op_minusAssign: + case IASTBinaryExpression.op_moduloAssign: case IASTBinaryExpression.op_multiplyAssign: - case IASTBinaryExpression.op_plusAssign: - case IASTBinaryExpression.op_shiftLeftAssign: - case IASTBinaryExpression.op_shiftRightAssign: + case IASTBinaryExpression.op_plusAssign: + case IASTBinaryExpression.op_shiftLeftAssign: + case IASTBinaryExpression.op_shiftRightAssign: return 0; case IASTBinaryExpression.op_logicalOr: return 1; @@ -231,8 +231,8 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod case IASTBinaryExpression.op_divide: case IASTBinaryExpression.op_modulo: return 10; - case IASTBinaryExpression.op_pmarrow: - case IASTBinaryExpression.op_pmdot: + case IASTBinaryExpression.op_pmarrow: + case IASTBinaryExpression.op_pmdot: return 11; } assert false; @@ -240,14 +240,14 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod } private IASTUnaryExpression findTrailingBracketedPrimaryExpression(IASTExpression expr) { - while(true) { + while (true) { if (expr instanceof IASTBinaryExpression) { - expr= ((IASTBinaryExpression) expr).getOperand2(); + expr= ((IASTBinaryExpression) expr).getOperand2(); } else if (expr instanceof IASTCastExpression) { - expr= ((IASTCastExpression)expr).getOperand(); + expr= ((IASTCastExpression) expr).getOperand(); } else if (expr instanceof IASTUnaryExpression) { IASTUnaryExpression u= (IASTUnaryExpression) expr; - if (u.getOperator() == IASTUnaryExpression.op_bracketedPrimary) + if (u.getOperator() == IASTUnaryExpression.op_bracketedPrimary) return u; expr= u.getOperand(); } else { @@ -255,10 +255,10 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod } } } - + private IASTExpression findLeadingCastExpression(IASTExpression expr) { while (expr instanceof IASTBinaryExpression) { - expr= ((IASTBinaryExpression) expr).getOperand1(); + expr= ((IASTBinaryExpression) expr).getOperand1(); } return expr; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousCastVsFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousCastVsFunctionCallExpression.java index cecd32e9a7f..f421077a609 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousCastVsFunctionCallExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousCastVsFunctionCallExpression.java @@ -31,7 +31,7 @@ import org.eclipse.cdt.core.dom.ast.IProblemBinding; public abstract class ASTAmbiguousCastVsFunctionCallExpression extends ASTAmbiguousNode implements IASTAmbiguousExpression { private final IASTCastExpression fCastExpression; private final IASTFunctionCallExpression fFunctionCallExpression; - + /** * The operand of the cast expression must start with an expression in parenthesis (which could be read as the parameter * list of the function call). @@ -42,7 +42,7 @@ public abstract class ASTAmbiguousCastVsFunctionCallExpression extends ASTAmbigu fCastExpression= castExpression; fFunctionCallExpression= functionCall; } - + @Override public final IASTNode[] getNodes() { return getExpressions(); @@ -52,7 +52,7 @@ public abstract class ASTAmbiguousCastVsFunctionCallExpression extends ASTAmbigu public final IASTExpression copy() { throw new UnsupportedOperationException(); } - + @Override public final IASTExpression copy(CopyStyle style) { throw new UnsupportedOperationException(); @@ -62,7 +62,7 @@ public abstract class ASTAmbiguousCastVsFunctionCallExpression extends ASTAmbigu public void addExpression(IASTExpression e) { throw new UnsupportedOperationException(); } - + @Override public IASTExpression[] getExpressions() { return new IASTExpression[] {fCastExpression, fFunctionCallExpression}; @@ -84,13 +84,13 @@ public abstract class ASTAmbiguousCastVsFunctionCallExpression extends ASTAmbigu if (primaryWithParenthesis == null) return nodeToReplace; - + // find nested names final NameCollector nameCollector= new NameCollector(); fCastExpression.getTypeId().accept(nameCollector); final IASTName[] names= nameCollector.getNames(); - // resolve names + // resolve names boolean hasIssue= false; for (IASTName name : names) { try { @@ -104,7 +104,7 @@ public abstract class ASTAmbiguousCastVsFunctionCallExpression extends ASTAmbigu break; } } - if (!hasIssue) + if (!hasIssue) return nodeToReplace; final IASTExpression operand = primaryWithParenthesis.getOperand(); @@ -117,7 +117,7 @@ public abstract class ASTAmbiguousCastVsFunctionCallExpression extends ASTAmbigu fFunctionCallExpression.setArguments(IASTExpression.EMPTY_EXPRESSION_ARRAY); } setRange(fFunctionCallExpression, fCastExpression, primaryWithParenthesis); - + IASTExpression result= fFunctionCallExpression; IASTExpression postFix= fCastExpression.getOperand(); if (postFix != primaryWithParenthesis) { @@ -155,7 +155,7 @@ public abstract class ASTAmbiguousCastVsFunctionCallExpression extends ASTAmbigu } } } - + owner.replace(nodeToReplace, result); // Resolve ambiguities in the function-call expression fFunctionCallExpression.getFunctionNameExpression().accept(visitor); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousNode.java index 29d4c5d8bee..059b8cc16dd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousNode.java @@ -54,23 +54,23 @@ public abstract class ASTAmbiguousNode extends ASTNode { return names; } } - + private IASTNode fResolution; /** * Return the alternative nodes for this ambiguity. */ public abstract IASTNode[] getNodes(); - + @Override public final boolean accept(ASTVisitor visitor) { if (visitor.shouldVisitAmbiguousNodes && visitor.visit(this) == ASTVisitor.PROCESS_ABORT) return false; - + // Alternatives are not visited on purpose. return true; } - + protected void beforeResolution() { } @@ -83,7 +83,7 @@ public abstract class ASTAmbiguousNode extends ASTNode { public IASTNode resolveAmbiguity(ASTVisitor resolver) { return fResolution= doResolveAmbiguity(resolver); } - + protected IASTNode doResolveAmbiguity(ASTVisitor resolver) { beforeResolution(); final IASTAmbiguityParent owner= (IASTAmbiguityParent) getParent(); @@ -91,14 +91,14 @@ public abstract class ASTAmbiguousNode extends ASTNode { final IASTNode[] alternatives= getNodes(); IASTNode bestAlternative= null; - + int minIssues = Integer.MAX_VALUE; for (IASTNode alternative : alternatives) { // Setup the ast to use the alternative owner.replace(nodeToReplace, alternative); beforeAlternative(alternative); - + // Handle nested ambiguities alternative= resolveNestedAmbiguities(alternative, resolver); nodeToReplace= alternative; @@ -107,13 +107,13 @@ public abstract class ASTAmbiguousNode extends ASTNode { final NameCollector nameCollector= new NameCollector(); alternative.accept(nameCollector); final IASTName[] names= nameCollector.getNames(); - + // Resolve names and count issues int issues= 0; for (IASTName name : names) { try { - // Avoid resolution of parameters (can always be resolved), - // it can triggers resolution of declaration it belongs to, + // Avoid resolution of parameters (can always be resolved), + // it can triggers resolution of declaration it belongs to, // while the declarator is still ambiguous. Could be solved by introducing an // intermediate binding for parameters, similar to template parameters. if (name.getPropertyInParent() == IASTDeclarator.DECLARATOR_NAME) { @@ -127,7 +127,7 @@ public abstract class ASTAmbiguousNode extends ASTNode { IBinding b= name.resolvePreBinding(); if (b instanceof IProblemBinding) { issues++; - } + } } catch (Exception t) { issues++; } @@ -143,7 +143,7 @@ public abstract class ASTAmbiguousNode extends ASTNode { } } } - + // Switch back to the best alternative, if necessary. if (nodeToReplace != bestAlternative) { owner.replace(nodeToReplace, bestAlternative); @@ -151,7 +151,7 @@ public abstract class ASTAmbiguousNode extends ASTNode { afterResolution(resolver, bestAlternative); return bestAlternative; } - + protected IASTNode resolveNestedAmbiguities(IASTNode alternative, ASTVisitor resolver) { alternative.accept(resolver); if (alternative instanceof ASTAmbiguousNode) @@ -178,7 +178,7 @@ public abstract class ASTAmbiguousNode extends ASTNode { logAmbiguousNodeError(); return EvalFixed.INCOMPLETE; } - + public final ICPPExecution getExecution() { logAmbiguousNodeError(); return null; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAttributeOwner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAttributeOwner.java index 31f74b993f5..f0eb38b3491 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAttributeOwner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAttributeOwner.java @@ -33,7 +33,7 @@ public abstract class ASTAttributeOwner extends ASTNode implements IASTAttribute IASTAttribute[] attributes = IASTAttribute.EMPTY_ATTRIBUTE_ARRAY; for (IASTAttributeSpecifier attributeSpecifier : getAttributeSpecifiers()) { if (attributeSpecifier instanceof IASTAttributeList) { - attributes = ArrayUtil.addAll(attributes, + attributes = ArrayUtil.addAll(attributes, ((IASTAttributeList) attributeSpecifier).getAttributes()); } } @@ -101,10 +101,10 @@ public abstract class ASTAttributeOwner extends ASTNode implements IASTAttribute } return true; } - + /* * Having this here allows CPPASTAttributeOwner to implement IASTAmbiguityParent - * without needing to access the field attributeSpecifiers. + * without needing to access the field attributeSpecifiers. */ protected void replace(IASTNode child, IASTNode other) { if (child instanceof IASTAlignmentSpecifier && other instanceof IASTAlignmentSpecifier) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTCopyLocation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTCopyLocation.java index 46b8141eb5f..6821463f554 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTCopyLocation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTCopyLocation.java @@ -1,13 +1,13 @@ /******************************************************************************* - * Copyright (c) 2011 Institute for Software, HSR Hochschule fuer Technik + * Copyright (c) 2011 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Institute for Software (IFS)- initial API and implementation + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Institute for Software (IFS)- initial API and implementation ******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEnumerator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEnumerator.java index 862634556b1..489c05e6cec 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEnumerator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEnumerator.java @@ -8,7 +8,7 @@ * Contributors: * Markus Schorn - initial API and implementation * Sergey Prigogin (Google) - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.cdt.core.dom.ast.ASTVisitor; @@ -104,7 +104,7 @@ public abstract class ASTEnumerator extends ASTNode implements IASTEnumerator, I public int getRoleForName(IASTName n) { if (n == name) return r_definition; - + return r_reference; } @@ -125,7 +125,7 @@ public abstract class ASTEnumerator extends ASTNode implements IASTEnumerator, I if (enumeration.startValueComputation()) { // Prevent infinite recursion. computeEnumValues(enumeration); } - } + } if (integralValue == null) { integralValue= IntegralValue.UNKNOWN; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEqualsInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEqualsInitializer.java index 70f1d94a11b..d7e77378704 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEqualsInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEqualsInitializer.java @@ -23,7 +23,7 @@ import org.eclipse.cdt.core.dom.ast.IASTNode; public abstract class ASTEqualsInitializer extends ASTNode implements IASTEqualsInitializer, IASTAmbiguityParent { private IASTInitializerClause fArgument; - + public ASTEqualsInitializer() { } @@ -55,10 +55,10 @@ public abstract class ASTEqualsInitializer extends ASTNode default: break; } } - + if (fArgument != null && !fArgument.accept(action)) return false; - + if (action.shouldVisitInitializers && action.leave(this) == ASTVisitor.PROCESS_ABORT) return false; @@ -78,7 +78,7 @@ public abstract class ASTEqualsInitializer extends ASTNode public IASTExpression getExpression() { if (fArgument instanceof IASTExpression) return (IASTExpression) fArgument; - + return null; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTInternal.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTInternal.java index 42460ee736a..29845b5d6d5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTInternal.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTInternal.java @@ -83,13 +83,13 @@ public class ASTInternal { public static void addBinding(IScope scope, IBinding binding) { if (scope instanceof IASTInternalScope) { ((IASTInternalScope) scope).addBinding(binding); - } + } } public static void addName(IScope scope, IASTName name) { if (scope instanceof IASTInternalScope) { ((IASTInternalScope) scope).addName(name); - } + } } public static boolean isStatic(IFunction func, boolean resolveAll) { @@ -113,7 +113,7 @@ public class ASTInternal { IASTNode result = getDeclaredInSourceFileOnly(binding, requireDefinition); if (result == null) return null; - + if (requireDefinition && glob != null) { try { if (glob.hasDeclaration()) @@ -121,7 +121,7 @@ public class ASTInternal { } catch (CoreException e) { } } - + IASTTranslationUnit tu= result.getTranslationUnit(); if (tu != null) { if (tu.getIndexFileSet().containsNonLocalDeclaration(binding, forFragment)) @@ -193,11 +193,11 @@ public class ASTInternal { private static IASTNode resolveConflict(IASTNode n1, IASTNode n2) { if (n1 == null) return n2; - + IASTFileLocation loc1= n1.getFileLocation(); if (loc1 == null) return n2; - + IASTFileLocation loc2= n2.getFileLocation(); if (loc2 != null && loc1.getContextInclusionStatement() != loc2.getContextInclusionStatement()) return null; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java index 389f0ceb6e7..3ce08a54461 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java @@ -405,7 +405,7 @@ public abstract class ASTNode implements IASTNode { /** * Helper method for use in {{@link #accept(ASTVisitor)} methods. - * + * * @param action the visitor to accept * @param nodes the array of nodes accepting the visitor * @return continue on ({@code true}) or quit ({@code false}) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSearch.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSearch.java index f09d570f002..cd534152eb0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSearch.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSearch.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.cdt.core.dom.ast.ASTGenericVisitor; @@ -30,7 +30,7 @@ public class ASTNodeSearch extends ASTGenericVisitor { fNode= node; fParent= node.getParent(); } - + public IASTNode findLeftSibling() { if (fParent == null) return null; @@ -55,8 +55,8 @@ public class ASTNodeSearch extends ASTGenericVisitor { protected int genericVisit(IASTNode node) { if (node == fParent) return PROCESS_CONTINUE; - - switch(fMode) { + + switch (fMode) { case LEFT: if (node == fNode) return PROCESS_ABORT; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSpecification.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSpecification.java index bd450f3b244..3fdbd731ce8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSpecification.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSpecification.java @@ -174,7 +174,7 @@ public class ASTNodeSpecification { } final int endOffset= offset + length; - switch(fRelation) { + switch (fRelation) { case EXACT_MATCH: return isParent(fBestNode, cand); case FIRST_CONTAINED: @@ -202,7 +202,7 @@ public class ASTNodeSpecification { } private boolean isParent(IASTNode cand1, IASTNode cand2) { - while(cand2 != null) { + while (cand2 != null) { if (cand2 == cand1) { return true; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTPreprocessorSelectionResult.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTPreprocessorSelectionResult.java index 509334bbd3b..be52fa37f42 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTPreprocessorSelectionResult.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTPreprocessorSelectionResult.java @@ -20,16 +20,16 @@ import org.eclipse.cdt.core.dom.ast.IASTNode; public class ASTPreprocessorSelectionResult { IASTNode selectedNode = null; int globalOffset = 0; - + public ASTPreprocessorSelectionResult(IASTNode node, int offset) { this.selectedNode = node; this.globalOffset = offset; } - + public IASTNode getSelectedNode() { return selectedNode; } - + public void setSelectedNode(IASTNode selectedNode) { this.selectedNode = selectedNode; } @@ -37,10 +37,10 @@ public class ASTPreprocessorSelectionResult { public int getGlobalOffset() { return globalOffset; } - + public void setGlobalOffset(int globalOffset) { this.globalOffset = globalOffset; } - + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java index 3444e4c28d5..d6ba7ce8f01 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java @@ -55,9 +55,9 @@ public class ASTProblem extends ASTNode implements IASTProblem { errorMessages.put(Integer.valueOf(PREPROCESSOR_MACRO_PASTING_ERROR), ParserMessages.getString("ScannerProblemFactory.error.preproc.macroPasting")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(PREPROCESSOR_MISSING_RPAREN_PARMLIST), - ParserMessages.getString("ScannerProblemFactory.error.preproc.missingRParen")); //$NON-NLS-1$ + ParserMessages.getString("ScannerProblemFactory.error.preproc.missingRParen")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(PREPROCESSOR_INVALID_VA_ARGS), - ParserMessages.getString("ScannerProblemFactory.error.preproc.invalidVaArgs")); //$NON-NLS-1$ + ParserMessages.getString("ScannerProblemFactory.error.preproc.invalidVaArgs")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(SCANNER_INVALID_ESCAPECHAR), ParserMessages.getString("ScannerProblemFactory.error.scanner.invalidEscapeChar")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(SCANNER_UNBOUNDED_STRING), @@ -73,7 +73,7 @@ public class ASTProblem extends ASTNode implements IASTProblem { errorMessages.put(Integer.valueOf(SCANNER_BAD_DECIMAL_FORMAT), ParserMessages.getString("ScannerProblemFactory.error.scanner.badDecimalFormat")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(SCANNER_ASSIGNMENT_NOT_ALLOWED), - ParserMessages.getString("ScannerProblemFactory.error.scanner.assignmentNotAllowed")); //$NON-NLS-1$ + ParserMessages.getString("ScannerProblemFactory.error.scanner.assignmentNotAllowed")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(SCANNER_DIVIDE_BY_ZERO), ParserMessages.getString("ScannerProblemFactory.error.scanner.divideByZero")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(SCANNER_MISSING_R_PAREN), @@ -83,7 +83,7 @@ public class ASTProblem extends ASTNode implements IASTProblem { errorMessages.put(Integer.valueOf(SCANNER_ILLEGAL_IDENTIFIER), ParserMessages.getString("ScannerProblemFactory.error.scanner.illegalIdentifier")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(SCANNER_BAD_CONDITIONAL_EXPRESSION), - ParserMessages.getString("ScannerProblemFactory.error.scanner.badConditionalExpression")); //$NON-NLS-1$ + ParserMessages.getString("ScannerProblemFactory.error.scanner.badConditionalExpression")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(SCANNER_UNEXPECTED_EOF), ParserMessages.getString("ScannerProblemFactory.error.scanner.unexpectedEOF")); //$NON-NLS-1$ errorMessages.put(Integer.valueOf(SCANNER_BAD_CHARACTER), @@ -126,7 +126,7 @@ public class ASTProblem extends ASTNode implements IASTProblem { public ASTProblem copy() { return copy(CopyStyle.withoutLocations); } - + @Override public ASTProblem copy(CopyStyle style) { ASTProblem copy = new ASTProblem(id, arg == null ? null : arg.clone(), isError); @@ -142,7 +142,7 @@ public class ASTProblem extends ASTNode implements IASTProblem { public boolean isError() { return isError; } - + @Override public boolean isWarning() { return !isError; @@ -168,7 +168,7 @@ public class ASTProblem extends ASTNode implements IASTProblem { } return msg; } - + @Override public String getMessage() { return getMessage(id, arg == null ? null : new String(arg)); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTokenList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTokenList.java index bd4fb91b903..106a1ab76fd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTokenList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTokenList.java @@ -78,10 +78,10 @@ public class ASTTokenList extends ASTNode implements IASTTokenList { break; if (!token.accept(action)) return false; } - + if (action.shouldVisitTokens && action.leave(this) == ASTVisitor.PROCESS_ABORT) return false; - + return true; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java index aca6d37be1d..01cef0af768 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java @@ -9,7 +9,7 @@ * Markus Schorn - initial API and implementation * Sergey Prigogin (Google) * Thomas Corbat (IFS) - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import java.util.Arrays; @@ -89,7 +89,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat public final IASTTranslationUnit getTranslationUnit() { return this; } - + @Override public final void addDeclaration(IASTDeclaration d) { if (d != null) { @@ -133,7 +133,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat } } } - + @Override public final IName[] getDeclarations(IBinding binding) { IName[] names= getDeclarationsInAST(binding); @@ -148,11 +148,11 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat return names; } - + protected final IASTName[] getMacroDefinitionsInAST(IMacroBinding binding) { if (fLocationResolver == null) return IASTName.EMPTY_NAME_ARRAY; - + IASTName[] declarations = fLocationResolver.getDeclarations(binding); int j = 0; for (int i = 0; i < declarations.length; i++) { @@ -185,21 +185,21 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat } return names; } - + @Override public final IASTPreprocessorMacroDefinition[] getMacroDefinitions() { if (fLocationResolver == null) return EMPTY_PREPROCESSOR_MACRODEF_ARRAY; return fLocationResolver.getMacroDefinitions(); } - + @Override public IASTPreprocessorMacroExpansion[] getMacroExpansions() { if (fLocationResolver == null) return IASTPreprocessorMacroExpansion.EMPTY_ARRAY; return fLocationResolver.getMacroExpansions(getFileLocation()); } - + @Override public final IASTPreprocessorMacroDefinition[] getBuiltinMacroDefinitions() { if (fLocationResolver == null) @@ -264,7 +264,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat for (IASTDeclaration decl : decls) { if (!decl.accept(action)) return false; } - + if (action.shouldVisitTranslationUnit && action.leave(this) == ASTVisitor.PROCESS_ABORT) return false; @@ -296,7 +296,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat public final IIndex getIndex() { return fIndex; } - + @Override public final void setIndex(IIndex index) { this.fIndex = index; @@ -310,11 +310,11 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat public final INodeFactory getASTNodeFactory() { return fNodeFactory; } - + public final void setASTNodeFactory(INodeFactory nodeFactory) { this.fNodeFactory = nodeFactory; } - + @Override public final IASTComment[] getComments() { if (fLocationResolver != null) { @@ -347,7 +347,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat public final void setIsHeaderUnit(boolean headerUnit) { fIsHeader= headerUnit; } - + public boolean isForContentAssist() { return fForContentAssist; } @@ -374,13 +374,13 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat fIndexFileSet.add(indexFile); } } - } - + } + @Override public final IIndexFileSet getIndexFileSet() { return fIndexFileSet; } - + @Override public void parsingFile(InternalFileContentProvider provider, InternalFileContent fc) { if (fASTFileSet != null) { @@ -396,8 +396,8 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat } } } - } - + } + @Override public final IIndexFileSet getASTFileSet() { return fASTFileSet; @@ -407,7 +407,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat public final IASTNode selectNodeForLocation(String path, int realOffset, int realLength) { return getNodeSelector(path).findNode(realOffset, realLength); } - + @Override public final IASTNodeSelector getNodeSelector(String filePath) { return new ASTNodeSelector(this, fLocationResolver, filePath); @@ -441,14 +441,14 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat target.fForContentAssist = fForContentAssist; target.fOriginatingTranslationUnit = fOriginatingTranslationUnit; target.fNodesOmitted = fNodesOmitted; - + for (IASTDeclaration declaration : getDeclarations()) { copy.addDeclaration(declaration == null ? null : declaration.copy(style)); } return super.copy(copy, style); } - + @Override public final void freeze() { accept(new ASTGenericVisitor(true) { @@ -480,12 +480,12 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat if (sigMacros != null) fSignificantMacros= sigMacros; } - + @Override public boolean hasPragmaOnceSemantics() { return fPragmaOnceSemantics; } - + @Override public void setPragmaOnceSemantics(boolean value) { assertNotFrozen(); @@ -493,7 +493,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat } /** - * Starts exclusive access + * Starts exclusive access * @throws InterruptedException */ public void beginExclusiveAccess() throws InterruptedException { @@ -523,7 +523,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat } /** - * If ambiguity resolution is in progress, and processing of 'node' has been deferred, + * If ambiguity resolution is in progress, and processing of 'node' has been deferred, * process it now. Has no effect if ambiguity resolution is not in progress. */ public void resolvePendingAmbiguities(IASTNode node) {} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java index defef44196a..9ed48830fb3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java @@ -256,7 +256,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { backtrack.initialize(offset, (length < 0) ? 0 : length); throw backtrack; } - + protected INodeFactory getNodeFactory() { return nodeFactory; } @@ -1165,7 +1165,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { protected abstract IASTExpression unaryExpression(CastExprCtx ctx, ITemplateIdStrategy strat) throws BacktrackException, EndOfFileException; protected abstract IASTExpression primaryExpression(CastExprCtx ctx, ITemplateIdStrategy strat) throws BacktrackException, EndOfFileException; protected abstract IASTTypeId typeId(DeclarationOptions option) throws EndOfFileException, BacktrackException; - + // Methods for parsing a type-id and an expression with an optional trailing ellipsis. // The optional trailing ellipsis can only appear in C++ code, and only the C++ parser // allows it, but being able to invoke this from here allows reusing more productions @@ -1649,7 +1649,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { // try second variant, if possible if (dtorMark2 == null) throw e; - + backup(dtorMark2); dtor2= initDeclarator(declspec2, option); return result.set(declspec2, dtor2, dtorMark2); @@ -1796,9 +1796,9 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { final int compoundOffset= LA(1).getOffset(); final int endOffset= skipOverCompoundStatement(false).getEndOffset(); IASTCompoundStatement cs = nodeFactory.newCompoundStatement(); //createCompoundStatement(); - ((ASTNode)cs).setOffsetAndLength(compoundOffset, endOffset - compoundOffset); + ((ASTNode) cs).setOffsetAndLength(compoundOffset, endOffset - compoundOffset); - IASTFunctionDefinition funcDefinition = nodeFactory.newFunctionDefinition(declSpec, (IASTFunctionDeclarator)fdtor, cs); + IASTFunctionDefinition funcDefinition = nodeFactory.newFunctionDefinition(declSpec, (IASTFunctionDeclarator) fdtor, cs); ((ASTNode) funcDefinition).setOffsetAndLength(offset, endOffset - offset); return funcDefinition; @@ -1978,9 +1978,9 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { */ protected static boolean isImplicitInt(IASTDeclaration declaration) { if (declaration instanceof IASTSimpleDeclaration) { - IASTDeclSpecifier declSpec = ((IASTSimpleDeclaration)declaration).getDeclSpecifier(); + IASTDeclSpecifier declSpec = ((IASTSimpleDeclaration) declaration).getDeclSpecifier(); if (declSpec instanceof IASTSimpleDeclSpecifier && - ((IASTSimpleDeclSpecifier)declSpec).getType() == IASTSimpleDeclSpecifier.t_unspecified) { + ((IASTSimpleDeclSpecifier) declSpec).getType() == IASTSimpleDeclSpecifier.t_unspecified) { return true; } } @@ -2466,17 +2466,17 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { * @param endType the type of the token to stop before * @return a token sequence, possibly empty but never {@code null} */ - protected IASTTokenList balancedTokenSeq(int offset, int endType) + protected IASTTokenList balancedTokenSeq(int offset, int endType) throws EndOfFileException, BacktrackException { IASTTokenList result = nodeFactory.newTokenList(); IToken t; while ((t = LA(1)).getType() != endType) { t = consume(); - + if (t.getType() == IToken.tCOMPLETION || t.getType() == IToken.tEOC) { break; } - + result.addToken(createASTToken(t)); IASTToken token; @@ -2716,15 +2716,15 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { protected abstract IASTAlignmentSpecifier createAmbiguousAlignmentSpecifier(IASTAlignmentSpecifier expression, IASTAlignmentSpecifier typeId); - + protected IASTAlignmentSpecifier alignmentSpecifier() throws BacktrackException, EndOfFileException { int startOffset = consume(IToken.t_alignas, IToken.t__Alignas).getOffset(); - + consume(IToken.tLPAREN); - + IASTTypeId typeId = null; IASTExpression expression = null; - + // Try parsing a type-id. IToken beginning = mark(); IToken typeIdEnd = null; @@ -2733,7 +2733,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { typeIdEnd = mark(); } catch (BacktrackException e) { } - + // Back up and try parsing an expression. backup(beginning); try { @@ -2744,7 +2744,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { throw e; } } - + IASTAlignmentSpecifier result; if (typeId == null) { // No type id - use the expression. @@ -2771,7 +2771,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { backup(typeIdEnd); result = nodeFactory.newAlignmentSpecifier(typeId); } - + int endOffset = consume(IToken.tRPAREN).getEndOffset(); setRange(result, startOffset, endOffset); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ArithmeticConversion.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ArithmeticConversion.java index 45f9ec70162..26728ebdc3c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ArithmeticConversion.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ArithmeticConversion.java @@ -8,7 +8,7 @@ * Contributors: * Markus Schorn - initial API and implementation * Nathan Ridge - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.TDEF; @@ -28,26 +28,26 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil; */ public abstract class ArithmeticConversion { private static final int DOMAIN_FLAGS = IBasicType.IS_IMAGINARY | IBasicType.IS_COMPLEX; - + private enum Domain { - eReal(0), - eImaginary(IBasicType.IS_IMAGINARY), + eReal(0), + eImaginary(IBasicType.IS_IMAGINARY), eComplex(IBasicType.IS_COMPLEX); - + private final int fModifier; private Domain(int modifier) { fModifier= modifier; } - + int getModifier() { return fModifier; } } private enum Rank {eInt, eLong, eLongLong} - + protected abstract IBasicType createBasicType(IBasicType.Kind kind, int modifiers); - + /** * Performs an arithmetic conversion as described in section 6.3.1.8 of the C99 standard, * or 5.0.9 of C++ standard @@ -78,19 +78,19 @@ public abstract class ArithmeticConversion { case IASTBinaryExpression.op_shiftLeft: case IASTBinaryExpression.op_shiftRight: return promote(op1, getDomain(op1)); - + default: return null; } } - + public final IType promoteType(IType type) { if (!isIntegralOrUnscopedEnum(type)) return null; - + return promote(type, getDomain(type)); } - + private boolean isArithmeticOrUnscopedEnum(IType op1) { if (op1 instanceof IBasicType) { final Kind kind = ((IBasicType) op1).getKind(); @@ -114,10 +114,10 @@ public abstract class ArithmeticConversion { private boolean isIntegralOrUnscopedEnum(IType op1) { if (op1 instanceof IEnumeration) return true; - + if (op1 instanceof IBasicType) { Kind kind= ((IBasicType) op1).getKind(); - switch(kind) { + switch (kind) { case eBoolean: case eChar: case eChar16: @@ -126,7 +126,7 @@ public abstract class ArithmeticConversion { case eInt128: case eWChar: return true; - + case eDouble: case eFloat: case eFloat128: @@ -144,7 +144,7 @@ public abstract class ArithmeticConversion { private final IType convert(IType type1, IType type2) { Domain domain= getDomain(type1, type2); - + // If either type is a long double, return that type if (isLongDouble(type1)) { return adjustDomain((IBasicType) type1, domain); @@ -152,7 +152,7 @@ public abstract class ArithmeticConversion { if (isLongDouble(type2)) { return adjustDomain((IBasicType) type2, domain); } - + // Else if either type is a double return that type if (isDouble(type1)) { return adjustDomain((IBasicType) type1, domain); @@ -160,7 +160,7 @@ public abstract class ArithmeticConversion { if (isDouble(type2)) { return adjustDomain((IBasicType) type2, domain); } - + // Else if either type is a float return that type if (isFloat(type1)) { return adjustDomain((IBasicType) type1, domain); @@ -168,19 +168,19 @@ public abstract class ArithmeticConversion { if (isFloat(type2)) { return adjustDomain((IBasicType) type2, domain); } - + // We're dealing with integer types so perform integer promotion IBasicType btype1 = promote(type1, domain); IBasicType btype2 = promote(type2, domain); - + if (btype1.isSameType(btype2)) { return btype1; } - + if (btype1.isUnsigned() == btype2.isUnsigned()) { return getIntegerRank(btype1).ordinal() >= getIntegerRank(btype2).ordinal() ? btype1 : btype2; - } - + } + IBasicType unsignedType, signedType; if (btype1.isUnsigned()) { unsignedType= btype1; @@ -192,32 +192,32 @@ public abstract class ArithmeticConversion { final Rank signedRank= getIntegerRank(signedType); final Rank unsignedRank= getIntegerRank(unsignedType); - + // same rank -> use unsigned if (unsignedRank.ordinal() >= signedRank.ordinal()) { return unsignedType; } - + // The signed has the higher rank. if (signedRank.ordinal() > unsignedRank.ordinal()) { return signedType; } - + return createBasicType(signedType.getKind(), changeModifier(signedType.getModifiers(), IBasicType.IS_SIGNED, IBasicType.IS_UNSIGNED)); } - + private IBasicType promote(IType type, Domain domain) { if (type instanceof IEnumeration) { IType fixedType= null; if (type instanceof ICPPEnumeration) { fixedType= ((ICPPEnumeration) type).getFixedType(); } - if (fixedType == null) + if (fixedType == null) return createBasicType(Kind.eInt, domain.getModifier() | getEnumIntTypeModifiers((IEnumeration) type)); type= fixedType; - } - + } + if (type instanceof IBasicType) { final IBasicType bt = (IBasicType) type; final Kind kind = bt.getKind(); @@ -251,7 +251,7 @@ public abstract class ArithmeticConversion { case eNullPtr: assert false; } - } + } return createBasicType(Kind.eInt, domain.getModifier()); } @@ -278,10 +278,10 @@ public abstract class ArithmeticConversion { Domain myDomain= getDomain(t); if (myDomain == d) return t; - + return createBasicType(t.getKind(), changeModifier(t.getModifiers(), DOMAIN_FLAGS, d.getModifier())); } - + private int changeModifier(int modifiers, int remove, int add) { return (modifiers & ~remove) | add; } @@ -321,7 +321,7 @@ public abstract class ArithmeticConversion { } return false; } - + public static int getEnumIntTypeModifiers(IEnumeration enumeration) { final long minValue = enumeration.getMinValue(); final long maxValue = enumeration.getMaxValue(); @@ -333,7 +333,7 @@ public abstract class ArithmeticConversion { } else if (minValue >= Long.MIN_VALUE && maxValue <= Long.MAX_VALUE) { return IBasicType.IS_LONG; } else { - // This branch is unreachable due to limitations of Java long type. + // This branch is unreachable due to limitations of Java long type. return IBasicType.IS_UNSIGNED | IBasicType.IS_LONG; } } @@ -354,7 +354,7 @@ public abstract class ArithmeticConversion { } if (n < 0) return false; - + if (basicTarget.isShort()) { return n < (Short.MAX_VALUE + 1L) * 2; } @@ -380,30 +380,30 @@ public abstract class ArithmeticConversion { case eFloat: float f= n; return (long) f == n; - + case eDouble: double d= n; return (long) d == n; - + default: return false; } } /** - * Makes a best-effort guess at the sizeof() of an integral type. + * Makes a best-effort guess at the sizeof() of an integral type. */ private static long getApproximateSize(IBasicType type) { switch (type.getKind()) { case eChar: return 1; case eWChar: return 2; - case eInt: - // Note: we return 6 for long so that both long -> int - // and long long -> long conversions are reported + case eInt: + // Note: we return 6 for long so that both long -> int + // and long long -> long conversions are reported // as narrowing, to be on the safe side. - return type.isShort() ? 2 + return type.isShort() ? 2 : type.isLong() ? 6 - : type.isLongLong() ? 8 + : type.isLongLong() ? 8 : 4; case eBoolean: return 1; case eChar16: return 2; @@ -434,7 +434,7 @@ public abstract class ArithmeticConversion { return false; // Otherwise, go by the size and signedness of the type. - SizeAndAlignment sourceSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(source, point); + SizeAndAlignment sourceSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(source, point); SizeAndAlignment targetSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(target, point); long sizeofSource = sourceSizeAndAlignment == null ? getApproximateSize(source) : sourceSizeAndAlignment.size; long sizeofTarget = targetSizeAndAlignment == null ? getApproximateSize(target) : targetSizeAndAlignment.size; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/BacktrackException.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/BacktrackException.java index aac191b59e3..5c28988da0b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/BacktrackException.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/BacktrackException.java @@ -23,11 +23,11 @@ public class BacktrackException extends Exception { private IASTProblem problem; private IASTNode nodeBeforeProblem; // a node has been created in spite of the problem. - private int offset, length; - - public BacktrackException() { + private int offset, length; + + public BacktrackException() { } - + public BacktrackException(BacktrackException e) { problem= e.problem; nodeBeforeProblem= e.nodeBeforeProblem; @@ -47,7 +47,7 @@ public class BacktrackException extends Exception { } /** - * + * */ private void reset() { nodeBeforeProblem= null; @@ -61,12 +61,12 @@ public class BacktrackException extends Exception { public final IASTProblem getProblem() { return problem; } - + public final IASTNode getNodeBeforeProblem() { return nodeBeforeProblem; } - public void initialize(int start, int l ) { + public void initialize(int start, int l) { reset(); offset = start; length = l; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java index 5755a1c05dc..1e25a41e847 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -39,65 +39,65 @@ public class CStringValue implements IValue { map.put('v', '\013'); escapeSequences = Collections.unmodifiableMap(map); } - + private final char[] fFixedValue; - + private String fParsedValue; private CStringValue(char[] fixedValue) { fFixedValue = fixedValue; } - + public static IValue create(char[] fixedValue) { return new CStringValue(fixedValue); } - + public String cStringValue() { if (fParsedValue == null) { fParsedValue = parseString(); } return fParsedValue; } - + private int indexOfStartQuote() { final int len = fFixedValue.length; int i = 0; - while(i < len && fFixedValue[i] != '"') { + while (i < len && fFixedValue[i] != '"') { ++i; } - if(i >= len) { + if (i >= len) { return -1; } else { return i; } } - + private int indexOfEndQuote() { int i = fFixedValue.length - 1; - while(i >= 0 && fFixedValue[i] != '"') { + while (i >= 0 && fFixedValue[i] != '"') { --i; } - if(i < 0) { + if (i < 0) { return -1; } else { return i; } } - + private boolean isRawStringLiteral() { - for(int i = 0; i < indexOfStartQuote(); ++i) { - if(fFixedValue[i] == 'R') { + for (int i = 0; i < indexOfStartQuote(); ++i) { + if (fFixedValue[i] == 'R') { return true; } } return false; } - + private int getDelimiterLength() { - if(isRawStringLiteral()) { + if (isRawStringLiteral()) { int i = indexOfStartQuote(); int len = 0; - while(i < fFixedValue.length && fFixedValue[i] != '(') { + while (i < fFixedValue.length && fFixedValue[i] != '(') { ++i; ++len; } @@ -105,29 +105,29 @@ public class CStringValue implements IValue { } return 0; } - + private int getStart() { return indexOfStartQuote() + getDelimiterLength() + 1; } - + private int getEnd() { return indexOfEndQuote() - getDelimiterLength() - 1; } - + private String parseString() { // TODO: Reuse code between this and CPPASTLiteralExpression.computeStringLiteralSize(). boolean isRaw = isRawStringLiteral(); int end = getEnd(); - + StringBuilder builder = new StringBuilder(); - for(int i = getStart(); i <= end; ++i) { - if(!isRaw && fFixedValue[i] == '\\' && i < end) { + for (int i = getStart(); i <= end; ++i) { + if (!isRaw && fFixedValue[i] == '\\' && i < end) { ++i; - + //C-Strings are null-terminated. Therefore, a '\0' character //denotes the end of the string, even if the literal contains //more characters after that - if(fFixedValue[i] == '0') { + if (fFixedValue[i] == '0') { break; } else { i = parseEscapeSequence(i, builder); @@ -138,16 +138,16 @@ public class CStringValue implements IValue { } return builder.toString(); } - + private int parseEscapeSequence(int i, StringBuilder builder) { char c = fFixedValue[i]; Character escapeSequence = escapeSequences.get(c); - if(escapeSequence != null) { + if (escapeSequence != null) { builder.append(escapeSequence); - } else if(c == 'u' && i + 4 <= getEnd()) { + } else if (c == 'u' && i + 4 <= getEnd()) { StringBuilder hexStr = new StringBuilder(); ++i; - for(int end = i + 4; i < end; ++i) { + for (int end = i + 4; i < end; ++i) { hexStr.append(fFixedValue[i]); } int codePoint = Integer.parseInt(hexStr.toString(), 16); @@ -155,12 +155,12 @@ public class CStringValue implements IValue { } return i; } - + @Override public Long numericalValue() { return null; } - + @Override public Number numberValue() { return null; @@ -176,13 +176,13 @@ public class CStringValue implements IValue { public ICPPEvaluation getSubValue(int index) { String str = cStringValue(); Character c = null; - if(index >= 0 && index < str.length()) { + if (index >= 0 && index < str.length()) { c = str.charAt(index); - } else if(index == str.length()) { + } else if (index == str.length()) { c = '\0'; } - - if(c != null) { + + if (c != null) { IValue val = IntegralValue.create(c); return new EvalFixed(CPPBasicType.CHAR, ValueCategory.PRVALUE, val); } @@ -203,12 +203,12 @@ public class CStringValue implements IValue { public char[] getSignature() { return fFixedValue; } - + @Override public int hashCode() { return CharArrayUtils.hash(getSignature()); } - + @Override public boolean equals(Object obj) { if (!(obj instanceof CStringValue)) { @@ -247,7 +247,7 @@ public class CStringValue implements IValue { buf.putShort(ITypeMarshalBuffer.C_STRING_VALUE); buf.putCharArray(fFixedValue); } - + public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException { return new CStringValue(buf.getCharArray()); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java index 0154444e7ef..297614f7475 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import java.util.ArrayList; @@ -32,10 +32,10 @@ class ChildCollector extends ASTGenericVisitor { fNode.accept(this); if (fNodes == null) return IASTNode.EMPTY_NODE_ARRAY; - + return fNodes.toArray(new IASTNode[fNodes.size()]); } - + @Override protected int genericVisit(IASTNode child) { if (fNodes == null) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CompositeValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CompositeValue.java index 531bbdc35e7..5e05f421942 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CompositeValue.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CompositeValue.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -48,7 +48,7 @@ public class CompositeValue implements IValue { public Number numberValue() { return null; } - + @Override public ICPPEvaluation getEvaluation() { return evaluation; @@ -56,7 +56,7 @@ public class CompositeValue implements IValue { @Override public char[] getSignature() { - if(evaluation != null) { + if (evaluation != null) { return evaluation.getSignature(); } return new char[]{}; @@ -152,15 +152,15 @@ public class CompositeValue implements IValue { } // The set of class types for which composite value creation is in progress on each thread. - // Used to guard against infinite recursion due to a class (invalidly) aggregating itself. - private static final ThreadLocal> fCreateInProgress = + // Used to guard against infinite recursion due to a class (invalidly) aggregating itself. + private static final ThreadLocal> fCreateInProgress = new ThreadLocal>() { @Override protected Set initialValue() { return new HashSet<>(); } }; - + /** * Creates a value representing an instance of a class type, with the values of the fields * determined by the default member initializers only. Constructors are not considered @@ -174,16 +174,16 @@ public class CompositeValue implements IValue { try { ActivationRecord record = new ActivationRecord(); ICPPEvaluation[] values = new ICPPEvaluation[ClassTypeHelper.getFields(classType, null).length]; - + // recursively create all the base class member variables ICPPBase[] bases = ClassTypeHelper.getBases(classType, null); - for(ICPPBase base : bases) { + for (ICPPBase base : bases) { IBinding baseClass = base.getBaseClass(); - if(baseClass instanceof ICPPClassType) { + if (baseClass instanceof ICPPClassType) { ICPPClassType baseClassType = (ICPPClassType) baseClass; ICPPField[] baseFields = ClassTypeHelper.getDeclaredFields(baseClassType, null); IValue compValue = CompositeValue.create(baseClassType); - for(ICPPField baseField : baseFields) { + for (ICPPField baseField : baseFields) { int fieldPos = CPPASTFieldReference.getFieldPosition(baseField); record.update(baseField, compValue.getSubValue(fieldPos)); // TODO(nathanridge): This won't work with multiple inheritance, since 'fieldPos' @@ -193,12 +193,12 @@ public class CompositeValue implements IValue { } } } - + ICPPField[] fields = ClassTypeHelper.getDeclaredFields(classType, null); for (ICPPField field : fields) { final ICPPEvaluation value = EvalUtil.getVariableValue(field, record); int fieldPos = CPPASTFieldReference.getFieldPosition(field); - record.update(field, value); + record.update(field, value); values[fieldPos] = value; } return new CompositeValue(null, values); @@ -221,24 +221,24 @@ public class CompositeValue implements IValue { public String toString() { StringBuilder builder = new StringBuilder(); builder.append("["); //$NON-NLS-1$ - for(int i = 0; i < values.length; i++) { - if(values[i] != null) { + for (int i = 0; i < values.length; i++) { + if (values[i] != null) { builder.append(values[i].toString()); } else { builder.append(""); //$NON-NLS-1$ } - if(i != values.length-1) { + if (i != values.length-1) { builder.append(", "); //$NON-NLS-1$ } } builder.append("]"); //$NON-NLS-1$ return builder.toString(); } - + @Override public IValue clone() { ICPPEvaluation[] newValues = new ICPPEvaluation[values.length]; - for(int i = 0; i < newValues.length; i++) { + for (int i = 0; i < newValues.length; i++) { ICPPEvaluation eval = values[i]; IValue newValue = eval.getValue(null).clone(); newValues[i] = new EvalFixed(eval.getType(null), eval.getValueCategory(null), newValue); @@ -251,17 +251,17 @@ public class CompositeValue implements IValue { buf.putShort(ITypeMarshalBuffer.COMPOSITE_VALUE); buf.marshalEvaluation(evaluation, true); buf.putInt(values.length); - for(ICPPEvaluation value : values) { + for (ICPPEvaluation value : values) { buf.marshalEvaluation(value, true); } } - + public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException { - ICPPEvaluation evaluation = (ICPPEvaluation)buf.unmarshalEvaluation(); + ICPPEvaluation evaluation = (ICPPEvaluation) buf.unmarshalEvaluation(); int len = buf.getInt(); ICPPEvaluation values[] = new ICPPEvaluation[len]; - for(int i = 0; i < len; i++) { - values[i] = (ICPPEvaluation)buf.unmarshalEvaluation(); + for (int i = 0; i < len; i++) { + values[i] = (ICPPEvaluation) buf.unmarshalEvaluation(); } return new CompositeValue(evaluation, values); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DeclarationOptions.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DeclarationOptions.java index 8152e891f1a..3408a09ae4e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DeclarationOptions.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DeclarationOptions.java @@ -7,10 +7,10 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; -/** +/** * Configures the parsing of a declaration in various contexts. */ public class DeclarationOptions { @@ -31,7 +31,7 @@ public class DeclarationOptions { final public static int SINGLE_DTOR= 0x4000; final public static int ALLOW_FUNCTION_DEFINITION= 0x8000; - public static final DeclarationOptions + public static final DeclarationOptions GLOBAL= new DeclarationOptions(ALLOW_EMPTY_SPECIFIER | ALLOW_OPAQUE_ENUM | ALLOW_FUNCTION_DEFINITION), FUNCTION_STYLE_ASM= new DeclarationOptions(ALLOW_EMPTY_SPECIFIER | NO_INITIALIZER | ALLOW_ABSTRACT | ALLOW_FUNCTION_DEFINITION), C_MEMBER= new DeclarationOptions(ALLOW_BITFIELD | ALLOW_ABSTRACT), @@ -62,7 +62,7 @@ public class DeclarationOptions { final public boolean fAllowOpaqueEnum; final public boolean fSingleDtor; final public boolean fAllowFunctionDefinition; - + public DeclarationOptions(int options) { fAllowEmptySpecifier= (options & ALLOW_EMPTY_SPECIFIER) != 0; fRequireAbstract= (options & REQUIRE_ABSTRACT) != 0; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FindNodeForOffsetAction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FindNodeForOffsetAction.java index d007f33a149..e8804e6e79c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FindNodeForOffsetAction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FindNodeForOffsetAction.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.cdt.core.dom.ast.ASTGenericVisitor; @@ -32,9 +32,9 @@ public class FindNodeForOffsetAction extends ASTGenericVisitor { shouldVisitNames = true; shouldVisitDeclarations= true; includeInactiveNodes= true; - + // only visit implicit names if asked - shouldVisitImplicitNames = + shouldVisitImplicitNames = shouldVisitImplicitNameAlternates = nodeSpec.requiresClass(IASTImplicitName.class); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java index 2a4780dc7b9..5a114a0e510 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -17,77 +17,77 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed; import org.eclipse.core.runtime.CoreException; -public class FloatingPointValue implements IValue { +public class FloatingPointValue implements IValue { private final char[] fFixedValue; private FloatingPointValue(char[] fixedValue) { fFixedValue = fixedValue; } - + public static FloatingPointValue create(char[] fixedValue) { return new FloatingPointValue(fixedValue); } - + public static FloatingPointValue create(double value) { return new FloatingPointValue(toCharArray(value)); } - + @Override public Long numericalValue() { return null; // not a Long } - + @Override public Number numberValue() { return parseDouble(fFixedValue); } - + private static Double parseDouble(char[] value) { double result = 0.0; int i = 0; int len = value.length; - - while(i < len && value[i] >= '0' && value[i] <= '9') { + + while (i < len && value[i] >= '0' && value[i] <= '9') { int digit = value[i] - '0'; result = result * 10 + digit; ++i; } - - if(i < len && value[i] == '.') { + + if (i < len && value[i] == '.') { ++i; } - + double div = 10.0; - while(i < len && value[i] >= '0' && value[i] <= '9') { + while (i < len && value[i] >= '0' && value[i] <= '9') { int digit = value[i] - '0'; result += digit / div; div *= 10.0; ++i; } - - if(i < len && (value[i] == 'e' || value[i] == 'E')) { + + if (i < len && (value[i] == 'e' || value[i] == 'E')) { ++i; } - + boolean exponentIsPositive = true; - if(i < len && (value[i] == '+' || value[i] == '-')) { + if (i < len && (value[i] == '+' || value[i] == '-')) { exponentIsPositive = (value[i] == '+'); ++i; } - + int exponent = 0; - while(i < len && value[i] >= '0' && value[i] <= '9') { + while (i < len && value[i] >= '0' && value[i] <= '9') { int digit = value[i] - '0'; exponent = exponent * 10 + digit; ++i; } - - if(i < len && (value[i] == 'l' || value[i] == 'L' || value[i] == 'f' || value[i] == 'F')) { + + if (i < len && (value[i] == 'l' || value[i] == 'L' || value[i] == 'f' || value[i] == 'F')) { ++i; } - - if(i == len) { - if(!exponentIsPositive) { + + if (i == len) { + if (!exponentIsPositive) { exponent *= -1; } return result * Math.pow(10, exponent); @@ -102,7 +102,7 @@ public class FloatingPointValue implements IValue { @Override public ICPPEvaluation getSubValue(int index) { - if(index == 0) { + if (index == 0) { return getEvaluation(); } return EvalFixed.INCOMPLETE; @@ -122,12 +122,12 @@ public class FloatingPointValue implements IValue { public char[] getSignature() { return fFixedValue; } - + @Override public int hashCode() { return CharArrayUtils.hash(getSignature()); } - + @Override public boolean equals(Object obj) { if (!(obj instanceof FloatingPointValue)) { @@ -160,7 +160,7 @@ public class FloatingPointValue implements IValue { buf.append(value); return CharArrayUtils.extractChars(buf); } - + @Override public String toString() { return new String(getSignature()); @@ -177,7 +177,7 @@ public class FloatingPointValue implements IValue { buf.putShort(ITypeMarshalBuffer.FLOATING_POINT_VALUE); buf.putCharArray(fFixedValue); } - + public static IValue unmarshal(short firstBytes, ITypeMarshalBuffer buf) throws CoreException { return new FloatingPointValue(buf.getCharArray()); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousDeclarator.java index fa6f9cb031c..331138f74d5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousDeclarator.java @@ -19,8 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclarator; */ public interface IASTAmbiguousDeclarator extends IASTDeclarator { - public static final ASTNodeProperty SUBDECLARATOR = new ASTNodeProperty( "IASTAmbiguousDeclarator.SUBDECLARATOR"); //$NON-NLS-1$ - + public static final ASTNodeProperty SUBDECLARATOR = new ASTNodeProperty("IASTAmbiguousDeclarator.SUBDECLARATOR"); //$NON-NLS-1$ + /** * Add an alternative to this ambiguous declarator. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousExpression.java index 413612ca5d3..072b2100a42 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousExpression.java @@ -15,7 +15,7 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression; public interface IASTAmbiguousExpression extends IASTExpression { - public static final ASTNodeProperty SUBEXPRESSION = new ASTNodeProperty( "IASTAmbiguousExpression.SUBEXPRESSION"); //$NON-NLS-1$ - public void addExpression( IASTExpression e ); + public static final ASTNodeProperty SUBEXPRESSION = new ASTNodeProperty("IASTAmbiguousExpression.SUBEXPRESSION"); //$NON-NLS-1$ + public void addExpression(IASTExpression e); public IASTExpression [] getExpressions(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousParameterDeclaration.java index 5b012f729a1..dc3ddab76c4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousParameterDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousParameterDeclaration.java @@ -19,8 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration; */ public interface IASTAmbiguousParameterDeclaration extends IASTParameterDeclaration { - public static final ASTNodeProperty SUBDECLARATION = new ASTNodeProperty( "IASTAmbiguousParameterDeclaration.SUBDECLARATION"); //$NON-NLS-1$ - + public static final ASTNodeProperty SUBDECLARATION = new ASTNodeProperty("IASTAmbiguousParameterDeclaration.SUBDECLARATION"); //$NON-NLS-1$ + /** * Add an alternative to this ambiguous parameter declaration. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousSimpleDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousSimpleDeclaration.java index 4b59b50b0f3..e2c597e92ab 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousSimpleDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousSimpleDeclaration.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalEnumerationSpecifier.java index df2bf5e32e1..a92199ebae1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalEnumerationSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalEnumerationSpecifier.java @@ -8,7 +8,7 @@ * Contributors: * Markus Schorn - initial API and implementation * Sergey Prigogin (Google) - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier; @@ -32,7 +32,7 @@ public interface IASTInternalEnumerationSpecifier extends IASTEnumerationSpecifi * Returns {@code true} if the value computation has started but hasn't finished yet. */ boolean isValueComputationInProgress(); - + /** * @since 5.1 */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalNameOwner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalNameOwner.java index 42b25d1a1ec..1fcf9d86937 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalNameOwner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalNameOwner.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.cdt.core.dom.ast.IASTName; @@ -18,10 +18,10 @@ import org.eclipse.cdt.core.dom.ast.IASTNameOwner; */ public interface IASTInternalNameOwner extends IASTNameOwner { /** - * Get the role for the name. If the name needs to be resolved to determine that and + * Get the role for the name. If the name needs to be resolved to determine that and * allowResolution is set to false, then {@link IASTNameOwner#r_unclear} - * is returned. - * + * is returned. + * * @param n a name to determine the role of. * @param allowResolution whether or not resolving the name is allowed. * @return r_definition, r_declaration, r_reference or r_unclear. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalScope.java index 7823a90ecc5..e8ff4c19d51 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalScope.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.cdt.core.dom.ast.IASTName; @@ -15,7 +15,7 @@ import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IScope; -/** +/** * Interface for methods on scopes that are internal to the AST. */ public interface IASTInternalScope extends IScope { @@ -23,7 +23,7 @@ public interface IASTInternalScope extends IScope { * Returns the physical IASTNode that this scope was created for */ public IASTNode getPhysicalNode(); - + /** * Adds an IBinding to the scope. It is primarily used by the parser to add * implicit IBindings to the scope (such as GCC built-in functions). @@ -34,14 +34,14 @@ public interface IASTInternalScope extends IScope { * Adds an IASTName to be cached in this scope */ public void addName(IASTName name); - + /** * Can be called during ambiguity resolution to populate a scope without considering * the ambiguous branches. The rest of the names has to be cached one by one after * the ambiguities have been resolved. */ public void populateCache(); - + /** * Can be called during ambiguity resolution to remove the names within the given * node from the cache. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IRecursionResolvingBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IRecursionResolvingBinding.java index a0d484185d6..bab94b82e94 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IRecursionResolvingBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IRecursionResolvingBinding.java @@ -7,7 +7,7 @@ * * Contributors: * Nathan Ridge - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.cdt.core.dom.ast.IProblemBinding; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableEvaluation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableEvaluation.java index 96565101a58..ee53de2e5f3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableEvaluation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableEvaluation.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.core.runtime.CoreException; @@ -18,7 +18,7 @@ import org.eclipse.core.runtime.CoreException; public interface ISerializableEvaluation { /** * Marshals an ICPPEvaluation object for storage in the index. - * + * * @param buffer The buffer that will hold the marshalled ICPPEvaluation object. * @param includeValue Specifies whether nested IValue objects should be marshalled as well. * */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableExecution.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableExecution.java index 80db9e83926..14277d26271 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableExecution.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableExecution.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -16,7 +16,7 @@ import org.eclipse.core.runtime.CoreException; public interface ISerializableExecution { /** * Marshals an ICPPExecution object for storage in the index. - * + * * @param buffer The buffer that will hold the marshalled ICPPExecution object. * @param includeValue Specifies whether nested IValue objects should be marshalled as well. * */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableType.java index 9156f4b9520..55264bcb7b0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableType.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.core.runtime.CoreException; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java index a8d982bd13b..704275157ce 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java @@ -23,7 +23,7 @@ import org.eclipse.core.runtime.CoreException; * Buffer for marshalling and unmarshalling types. */ public interface ITypeMarshalBuffer { - final static byte + final static byte BASIC_TYPE = 0x01, POINTER_TYPE = 0x02, ARRAY_TYPE = 0x03, @@ -42,9 +42,9 @@ public interface ITypeMarshalBuffer { UNKNOWN_MEMBER_TYPE = 0x10, INITIALIZER_LIST_TYPE = 0x11, DEFERRED_FUNCTION = 0x12; - // Can add more types up to 0x1C, after that it will collide with TypeMarshalBuffer.UNSTORABLE_TYPE. - - final static byte + // Can add more types up to 0x1C, after that it will collide with TypeMarshalBuffer.UNSTORABLE_TYPE. + + final static byte INTEGRAL_VALUE = 0x01, FLOATING_POINT_VALUE = 0x02, C_STRING_VALUE = 0x03, @@ -73,7 +73,7 @@ public interface ITypeMarshalBuffer { EVAL_POINTER = 0x13, EVAL_COMPOSITE_ACCESS = 0x14; // Can add more evaluations up to 0x1C, after that it will collide with TypeMarshalBuffer.UNSTORABLE_TYPE. - + final static byte EXEC_COMPOUND_STATEMENT = 0x01, EXEC_BREAK = 0x02, @@ -105,7 +105,7 @@ public interface ITypeMarshalBuffer { final static short FLAG7 = 0x0800; final static short FLAG8 = 0x1000; final static short FLAG9 = 0x2000; - + final static short FIRST_FLAG = FLAG1; final static short SECOND_LAST_FLAG = FLAG8; final static short LAST_FLAG = FLAG9; @@ -122,10 +122,10 @@ public interface ITypeMarshalBuffer { int getFixedInt() throws CoreException; /** - * Reads a 16-bit integer stored in the variable length base-128 encoding. + * Reads a 16-bit integer stored in the variable length base-128 encoding. */ public short getShort() throws CoreException; - + /** * Reads a 32-bit integer stored in the variable length base-128 encoding. */ @@ -152,13 +152,13 @@ public interface ITypeMarshalBuffer { * @param value the value to write */ public void putShort(short value); - + /** * Writes a 32-bit integer in the variable length base-128 encoding. Each byte, except the last * byte, has the most significant bit set – this indicates that there are further bytes to come. * The lower 7 bits of each byte are used to store the two-complement representation of * the number in groups of 7 bits, least significant group first. - * + * *

Here is number of bytes depending on the encoded value: *

 	 * Value                   Number of bytes
@@ -179,7 +179,7 @@ public interface ITypeMarshalBuffer {
 	 * byte, has the most significant bit set – this indicates that there are further bytes to come.
 	 * The lower 7 bits of each byte are used to store the two-complement representation of
 	 * the number in groups of 7 bits, least significant group first.
-	 * 
+	 *
 	 * 

Here is number of bytes depending on the encoded value: *

 	 * Value                   Number of bytes
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java
index b35bf5a1298..c94d8e41a99 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java
@@ -34,10 +34,10 @@ import org.eclipse.core.runtime.CoreException;
  */
 public class IntegralValue implements IValue {
 	public static final int MAX_RECURSION_DEPTH = 25;
-	
+
 	// IntegralValue.THIS represents the this pointer inside a member function / constructor.
 	public static final IntegralValue THIS = new IntegralValue("this".toCharArray(), null); //$NON-NLS-1$
-	
+
 	// IntegralValue.UNKNOWN indicates general inability to determine a value. It doesn't have to be an error,
 	// it could be that evaluation ran into a performance limit, or that we can't model this kind of
 	// value (such as a pointer to a function).
@@ -47,14 +47,14 @@ public class IntegralValue implements IValue {
 			throw new UnsupportedOperationException();
 		}
 	};
-	
+
 	// IntegralValue.ERROR indicates that an error, such as a substitution failure, occurred during evaluation.
 	public static final IntegralValue ERROR= new IntegralValue("".toCharArray(), null); //$NON-NLS-1$
 
 	public static final IntegralValue NOT_INITIALIZED= new IntegralValue("<__>".toCharArray(), null); //$NON-NLS-1$
 
 	private static final char UNIQUE_CHAR = '_';
-	
+
 	private final static IntegralValue[] TYPICAL= {
 			new IntegralValue(new char[] {'0'}, null),
 			new IntegralValue(new char[] {'1'}, null),
@@ -81,7 +81,7 @@ public class IntegralValue implements IValue {
 	public Long numericalValue() {
 		return (Long) numberValue();  // IntegralValue.numberValue() always returns a Long
 	}
-	
+
 	@Override
 	public Number numberValue() {
 		return fFixedValue == null ? null : parseLong(fFixedValue);
@@ -116,7 +116,7 @@ public class IntegralValue implements IValue {
 	public void marshal(ITypeMarshalBuffer buf) throws CoreException {
 		if (UNKNOWN == this) {
 			buf.putShort((short) (ITypeMarshalBuffer.INTEGRAL_VALUE | ITypeMarshalBuffer.FLAG1));
-		} else if(THIS == this) {
+		} else if (THIS == this) {
 			buf.putShort((short) (ITypeMarshalBuffer.INTEGRAL_VALUE | ITypeMarshalBuffer.FLAG5));
 		} else {
 			Number num= numberValue();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java
index 3d85b4359d9..688893a15f6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser;
 
 import org.eclipse.cdt.core.dom.ast.IASTNode;
@@ -35,13 +35,13 @@ public abstract class NodeFactory implements INodeFactory {
 		ASTNode e= (ASTNode) endNode;
 		a.setLength(e.getOffset() + e.getLength() - a.getOffset());
 	}
-	
+
 	@Deprecated
 	@Override
 	public org.eclipse.cdt.core.dom.ast.gnu.IGCCASTAttributeSpecifier newGCCAttributeSpecifier() {
 		return new GCCASTAttributeList();
 	}
-	
+
 	@Override
 	public IGCCASTAttributeList newGCCAttributeList() {
 		return new GCCASTAttributeList();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ParserLogServiceWrapper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ParserLogServiceWrapper.java
index 1b71b019ce7..9be074d33e4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ParserLogServiceWrapper.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ParserLogServiceWrapper.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser;
 
 import org.eclipse.cdt.core.parser.AbstractParserLogService;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemBinding.java
index 7188e3b6b4f..e3c772f7726 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemBinding.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemBinding.java
@@ -328,7 +328,7 @@ public class ProblemBinding extends PlatformObject implements IProblemBinding, I
     public IValue getInitialValue() {
 		return null;
 	}
-    
+
     public ICPPEvaluation getInitializerEvaluation() {
     	return EvalFixed.INCOMPLETE;
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemFunctionType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemFunctionType.java
index cd9ab013c04..c9bab562820 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemFunctionType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemFunctionType.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser;
 
 import org.eclipse.cdt.core.dom.ast.IPointerType;
@@ -27,13 +27,13 @@ public class ProblemFunctionType extends ProblemType implements ICPPFunctionType
 	public ProblemFunctionType(int id) {
 		super(id);
 	}
-	
+
 	@Override
 	public void marshal(ITypeMarshalBuffer buffer) throws CoreException {
 		buffer.putShort((short) (ITypeMarshalBuffer.PROBLEM_TYPE | ITypeMarshalBuffer.FLAG1));
 		buffer.putInt(getID());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		return new ProblemFunctionType(buffer.getInt());
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemType.java
index 8bc26cc6f65..be4bd529fa5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemType.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser;
 
 import org.eclipse.cdt.core.dom.ast.IProblemType;
@@ -24,13 +24,13 @@ public class ProblemType implements IProblemType, ISerializableType {
 	public static final IType UNKNOWN_FOR_EXPRESSION = new ProblemType(TYPE_UNKNOWN_FOR_EXPRESSION);
 	public static final IType ENUMERATION_EXPECTED = new ProblemType(TYPE_ENUMERATION_EXPECTED);
 	public static final IType RECURSION_IN_LOOKUP = new ProblemType(BINDING_RECURSION_IN_LOOKUP);
-	
+
 	private final int fID;
 
 	public ProblemType(int id) {
 		fID= id;
 	}
-	
+
 	@Override
 	public int getID() {
 		return fID;
@@ -60,11 +60,11 @@ public class ProblemType implements IProblemType, ISerializableType {
 		buffer.putShort(ITypeMarshalBuffer.PROBLEM_TYPE);
 		buffer.putInt(getID());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		if ((firstBytes & ITypeMarshalBuffer.FLAG1) != 0)
 			return ProblemFunctionType.unmarshal(firstBytes, buffer);
-		
+
 		return new ProblemType(buffer.getInt());
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java
index 191f78b15a0..854c5506449 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java
@@ -86,39 +86,39 @@ public class ValueFactory {
 		}
 		return IntegralValue.UNKNOWN;
 	}
-	
+
 	public static IValue evaluateUnaryExpression(final int unaryOp, final IValue value) {
 		IValue val = applyUnaryOperator(unaryOp, value);
 		if (isInvalidValue(val))
 			return IntegralValue.UNKNOWN;
-		return val; 
+		return val;
 	}
-	
+
 	public static IValue evaluateBinaryExpression(final int op, final IValue v1, final IValue v2) {
-		if(v1 instanceof FloatingPointValue && v2 instanceof FloatingPointValue) {
-			FloatingPointValue fv1 = (FloatingPointValue)v1;
-			FloatingPointValue fv2 = (FloatingPointValue)v2;
+		if (v1 instanceof FloatingPointValue && v2 instanceof FloatingPointValue) {
+			FloatingPointValue fv1 = (FloatingPointValue) v1;
+			FloatingPointValue fv2 = (FloatingPointValue) v2;
 			return applyBinaryOperator(op, fv1.numberValue().doubleValue(), fv2.numberValue().doubleValue());
-		} else if(v1 instanceof FloatingPointValue && v2 instanceof IntegralValue) {
-			FloatingPointValue fv1 = (FloatingPointValue)v1;
-			IntegralValue iv2 = (IntegralValue)v2;
+		} else if (v1 instanceof FloatingPointValue && v2 instanceof IntegralValue) {
+			FloatingPointValue fv1 = (FloatingPointValue) v1;
+			IntegralValue iv2 = (IntegralValue) v2;
 			return applyBinaryOperator(op, fv1.numberValue().doubleValue(), iv2.numberValue().doubleValue());
-		} else if(v1 instanceof IntegralValue && v2 instanceof FloatingPointValue) {
-			IntegralValue iv1 = (IntegralValue)v1;
-			FloatingPointValue fv2 = (FloatingPointValue)v2;
+		} else if (v1 instanceof IntegralValue && v2 instanceof FloatingPointValue) {
+			IntegralValue iv1 = (IntegralValue) v1;
+			FloatingPointValue fv2 = (FloatingPointValue) v2;
 			return applyBinaryOperator(op, iv1.numberValue().doubleValue(), fv2.numberValue().doubleValue());
-		} else if(v1 instanceof IntegralValue && v2 instanceof IntegralValue) {
-			IntegralValue iv1 = (IntegralValue)v1;
-			IntegralValue iv2 = (IntegralValue)v2;
-			return applyBinaryOperator(op, iv1.numberValue().longValue(), iv2.numberValue().longValue());	
+		} else if (v1 instanceof IntegralValue && v2 instanceof IntegralValue) {
+			IntegralValue iv1 = (IntegralValue) v1;
+			IntegralValue iv2 = (IntegralValue) v2;
+			return applyBinaryOperator(op, iv1.numberValue().longValue(), iv2.numberValue().longValue());
 		}
 		return IntegralValue.UNKNOWN;
 	}
-	
+
 	private static IValue applyBinaryOperator(final int op, final double v1, final double v2) {
 		Double doubleValue = null;
 		Long longValue = null;
-		
+
 		switch (op) {
 		case IASTBinaryExpression.op_multiply:
 			doubleValue = v1 * v2;
@@ -159,16 +159,16 @@ public class ValueFactory {
 			longValue = v1 != v2 ? 1l : 0l;
 			break;
 		}
-		
-		if(doubleValue != null) {
+
+		if (doubleValue != null) {
 			return FloatingPointValue.create(doubleValue);
-		} else if(longValue != null) {
+		} else if (longValue != null) {
 			return IntegralValue.create(longValue);
 		} else {
 			return IntegralValue.UNKNOWN;
 		}
 	}
-	
+
 	private static IntegralValue applyBinaryOperator(final int op, final long v1, final long v2) {
 		Long value = null;
 		switch (op) {
@@ -237,8 +237,8 @@ public class ValueFactory {
         	value = Math.min(v1, v2);
         	break;
 		}
-		
-		if(value != null) {
+
+		if (value != null) {
 			return IntegralValue.create(value);
 		} else {
 			return IntegralValue.UNKNOWN;
@@ -259,7 +259,7 @@ public class ValueFactory {
 			return IntegralValue.UNKNOWN;
 		return val;
 	}
-	
+
 	/**
 	 * Computes the canonical representation of the value of the expression.
 	 */
@@ -325,7 +325,7 @@ public class ValueFactory {
 				return CStringValue.create(litEx.getValue());
 			}
 		}
-			
+
 		if (exp instanceof IASTTypeIdExpression) {
 			IASTTypeIdExpression typeIdExp = (IASTTypeIdExpression) exp;
 			ASTTranslationUnit ast = (ASTTranslationUnit) exp.getTranslationUnit();
@@ -371,11 +371,11 @@ public class ValueFactory {
 			value= ((IEnumerator) b).getValue();
 		}
 		if (isInvalidValue(value)) {
-			return IntegralValue.UNKNOWN;	
+			return IntegralValue.UNKNOWN;
 		}
 		return value;
 	}
-	
+
 	private static IValue applyUnaryTypeIdOperator(int operator, IType type, IASTNode point) {
 		switch (operator) {
 			case op_sizeof:
@@ -433,7 +433,7 @@ public class ValueFactory {
 		}
 		return IntegralValue.UNKNOWN;
 	}
-	
+
 	private static IValue getAlignment(IType type, IASTNode point) {
 		SizeAndAlignment sizeAndAlignment = SizeofCalculator.getSizeAndAlignment(type, point);
 		if (sizeAndAlignment == null)
@@ -447,7 +447,7 @@ public class ValueFactory {
 			 return IntegralValue.UNKNOWN;
 		return IntegralValue.create(sizeAndAlignment.size);
 	}
-	
+
 	private static IValue evaluateUnaryExpression(IASTUnaryExpression exp) {
 		final int unaryOp= exp.getOperator();
 
@@ -480,21 +480,21 @@ public class ValueFactory {
 	}
 
 	private static IValue applyUnaryOperator(final int unaryOp, final IValue value) {
-		if(isInvalidValue(value) || value.numberValue() == null) {
+		if (isInvalidValue(value) || value.numberValue() == null) {
 			return IntegralValue.UNKNOWN;
 		}
-		
-		if(!(value instanceof IntegralValue) && !(value instanceof FloatingPointValue)) {
+
+		if (!(value instanceof IntegralValue) && !(value instanceof FloatingPointValue)) {
 			return IntegralValue.UNKNOWN;
 		}
-		
+
 		switch (unaryOp) {
 		case IASTUnaryExpression.op_bracketedPrimary:
 		case IASTUnaryExpression.op_plus:
 			return value;
 		case IASTUnaryExpression.op_prefixIncr:
 		case IASTUnaryExpression.op_postFixIncr:
-			if(value instanceof IntegralValue) {
+			if (value instanceof IntegralValue) {
 				return IntegralValue.create(value.numberValue().longValue() + 1);
 			} else {
 				FloatingPointValue fpv = (FloatingPointValue) value;
@@ -502,27 +502,27 @@ public class ValueFactory {
 			}
 		case IASTUnaryExpression.op_prefixDecr:
 		case IASTUnaryExpression.op_postFixDecr:
-			if(value instanceof IntegralValue) {
+			if (value instanceof IntegralValue) {
 				return IntegralValue.create(value.numberValue().longValue() - 1);
 			} else {
 				FloatingPointValue fpv = (FloatingPointValue) value;
 				return FloatingPointValue.create(fpv.numberValue().doubleValue() - 1);
 			}
 		case IASTUnaryExpression.op_minus:
-			if(value instanceof IntegralValue) {
+			if (value instanceof IntegralValue) {
 				return IntegralValue.create(-value.numberValue().longValue());
 			} else {
 				FloatingPointValue fpv = (FloatingPointValue) value;
 				return FloatingPointValue.create(-fpv.numberValue().doubleValue());
 			}
 		case IASTUnaryExpression.op_tilde:
-			if(value instanceof IntegralValue) {
+			if (value instanceof IntegralValue) {
 				return IntegralValue.create(~value.numberValue().longValue());
 			} else {
 				return IntegralValue.UNKNOWN;
 			}
 		case IASTUnaryExpression.op_not:
-			if(value instanceof IntegralValue) {
+			if (value instanceof IntegralValue) {
 				Long num = value.numberValue().longValue();
 				return IntegralValue.create(num == 0 ? 1 : 0);
 			} else {
@@ -536,7 +536,7 @@ public class ValueFactory {
 
 	private static IValue evaluateBinaryExpression(IASTBinaryExpression exp) {
 		final int op= exp.getOperator();
-		
+
 		// Optimization: if the operator is == or != and the AST nodes
 		// themselves are equal, we know the answer without having to
 		// do any evaluation.
@@ -546,7 +546,7 @@ public class ValueFactory {
 		if (op == IASTBinaryExpression.op_notequals && exp.getOperand1().equals(exp.getOperand2())) {
 			return IntegralValue.create(false);
 		}
-		
+
 		final IValue o1= evaluate(exp.getOperand1());
 		if (isInvalidValue(o1))
 			return o1;
@@ -557,7 +557,7 @@ public class ValueFactory {
 			return null;  // the value will be computed using the evaluation
 		return evaluateBinaryExpression(op, o1, o2);
 	}
-	
+
 	private static IValue applyBinaryTypeIdOperator(IASTBinaryTypeIdExpression.Operator operator,
 			IType type1, IType type2, IASTNode point) {
 		switch (operator) {
@@ -575,11 +575,11 @@ public class ValueFactory {
 		}
 		return IntegralValue.UNKNOWN;
 	}
-	
+
 	private static boolean isInvalidValue(IValue value) {
 		return value == null || value == IntegralValue.UNKNOWN || value == IntegralValue.ERROR;
 	}
-	
+
 	private static boolean isDeferredValue(IValue value) {
 		return value instanceof IntegralValue && ((IntegralValue) value).numberValue() == null;
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java
index 67e91f651f7..fd0782ce1db 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser;
 
 import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
@@ -62,7 +62,7 @@ import org.eclipse.cdt.internal.core.pdom.dom.PDOMName;
 public abstract class VariableReadWriteFlags {
 	protected static final int READ = PDOMName.READ_ACCESS;
 	protected static final int WRITE = PDOMName.WRITE_ACCESS;
-	
+
 	protected int rwAnyNode(IASTNode node, int indirection) {
 		final IASTNode parent = node.getParent();
 		if (parent instanceof IASTExpression) {
@@ -103,7 +103,7 @@ public abstract class VariableReadWriteFlags {
 		if (grand instanceof IASTEqualsInitializer) {
 			IASTNode grandGrand= grand.getParent();
 			if (grandGrand instanceof IASTDeclarator) {
-				IBinding binding= ((IASTDeclarator) grandGrand).getName().resolveBinding();  
+				IBinding binding= ((IASTDeclarator) grandGrand).getName().resolveBinding();
 				if (binding instanceof IVariable) {
 					IType type= ((IVariable) binding).getType();
 					if (type instanceof IArrayType) {
@@ -120,7 +120,7 @@ public abstract class VariableReadWriteFlags {
 			return rwAnyNode(expr, indirection);
 		}
 		if (expr instanceof IASTBinaryExpression) {
-			return rwInBinaryExpression(node, (IASTBinaryExpression) expr, indirection);			
+			return rwInBinaryExpression(node, (IASTBinaryExpression) expr, indirection);
 		}
 		if (expr instanceof IASTFieldReference) {
 			return rwInFieldReference(node, (IASTFieldReference) expr, indirection);
@@ -129,7 +129,7 @@ public abstract class VariableReadWriteFlags {
 			return rwAnyNode(expr, indirection);
 		}
 		if (expr instanceof IASTUnaryExpression) {
-			return rwInUnaryExpression(node, (IASTUnaryExpression) expr, indirection);			
+			return rwInUnaryExpression(node, (IASTUnaryExpression) expr, indirection);
 		}
 		if (expr instanceof IASTArraySubscriptExpression) {
 			if (indirection > 0 && node.getPropertyInParent() == IASTArraySubscriptExpression.ARRAY) {
@@ -158,7 +158,7 @@ public abstract class VariableReadWriteFlags {
 			return rwArgumentForFunctionCall((IASTFunctionCallExpression) expr, node, indirection);
 		}
 		if (expr instanceof IASTProblemExpression) {
-			return READ | WRITE;			
+			return READ | WRITE;
 		}
 		if (expr instanceof IASTTypeIdExpression) {
 			return 0;
@@ -200,7 +200,7 @@ public abstract class VariableReadWriteFlags {
 							IASTImplicitName name = implicitNames[0];
 							IBinding binding = name.resolveBinding();
 							if (binding instanceof IFunction) {
-								return rwArgumentForFunctionCall(((IFunction) binding).getType(), i, 
+								return rwArgumentForFunctionCall(((IFunction) binding).getType(), i,
 										args[i], indirection);
 							}
 						}
@@ -220,8 +220,8 @@ public abstract class VariableReadWriteFlags {
 		}
 		return null;
 	}
-	
-	protected int rwArgumentForFunctionCall(IFunctionType type, int parameterIdx, 
+
+	protected int rwArgumentForFunctionCall(IFunctionType type, int parameterIdx,
 			IASTInitializerClause argument, int indirection) {
 		IType[] ptypes= type.getParameterTypes();
 		IType parameterType = null;
@@ -232,7 +232,7 @@ public abstract class VariableReadWriteFlags {
 			// equal to the argument type.
 			parameterType = getArgumentType(argument);
 		}
-		
+
 		if (parameterType != null) {
 			return rwAssignmentToType(parameterType, indirection);
 		}
@@ -240,7 +240,7 @@ public abstract class VariableReadWriteFlags {
 	}
 
 	protected abstract int rwAssignmentToType(IType type, int indirection);
-	
+
 	protected int rwInStatement(IASTStatement stmt, IASTNode node, int indirection) {
 		if (stmt instanceof IASTCaseStatement) {
 			if (node.getPropertyInParent() == IASTCaseStatement.EXPRESSION) {
@@ -293,10 +293,10 @@ public abstract class VariableReadWriteFlags {
 	}
 
 	protected int rwInUnaryExpression(IASTNode node, IASTUnaryExpression expr, int indirection) {
-		switch(expr.getOperator()) {
+		switch (expr.getOperator()) {
 		case IASTUnaryExpression.op_bracketedPrimary:
 			return rwAnyNode(expr, indirection);
-		
+
 		case IASTUnaryExpression.op_amper:
 			return rwAnyNode(expr, indirection + 1);
 
@@ -305,13 +305,13 @@ public abstract class VariableReadWriteFlags {
 				return rwAnyNode(expr, indirection - 1);
 			}
 			return READ;
-			
+
 		case IASTUnaryExpression.op_postFixDecr:
 		case IASTUnaryExpression.op_postFixIncr:
 		case IASTUnaryExpression.op_prefixDecr:
 		case IASTUnaryExpression.op_prefixIncr:
 			return READ | WRITE;
-		
+
 		case IASTUnaryExpression.op_minus:
 		case IASTUnaryExpression.op_not:
 		case IASTUnaryExpression.op_plus:
@@ -327,13 +327,13 @@ public abstract class VariableReadWriteFlags {
 	}
 
 	protected int rwInBinaryExpression(IASTNode node, IASTBinaryExpression expr, int indirection) {
-		switch(expr.getOperator()) {
+		switch (expr.getOperator()) {
 		case IASTBinaryExpression.op_assign:
 			if (node.getPropertyInParent() == IASTBinaryExpression.OPERAND_ONE) {
 				return WRITE;
 			}
 			return rwAssignmentToType(expr.getOperand1().getExpressionType(), indirection);
-			
+
 		case IASTBinaryExpression.op_binaryAndAssign:
 		case IASTBinaryExpression.op_binaryOrAssign:
 		case IASTBinaryExpression.op_binaryXorAssign:
@@ -348,7 +348,7 @@ public abstract class VariableReadWriteFlags {
 				return READ | WRITE;
 			}
 			return READ;
-			
+
 		case IASTBinaryExpression.op_binaryAnd:
 		case IASTBinaryExpression.op_binaryOr:
 		case IASTBinaryExpression.op_binaryXor:
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTASMDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTASMDeclaration.java
index cf75adec7c0..69570dc7cf4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTASMDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTASMDeclaration.java
@@ -33,7 +33,7 @@ public class CASTASMDeclaration extends ASTNode implements IASTASMDeclaration {
 	public CASTASMDeclaration copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTASMDeclaration copy(CopyStyle style) {
 		CASTASMDeclaration copy = new CASTASMDeclaration();
@@ -43,8 +43,8 @@ public class CASTASMDeclaration extends ASTNode implements IASTASMDeclaration {
 
 	@Override
 	public String getAssembly() {
-        if( assembly == null ) return ""; //$NON-NLS-1$
-        return new String( assembly );
+        if (assembly == null) return ""; //$NON-NLS-1$
+        return new String(assembly);
     }
 
     @Override
@@ -54,17 +54,17 @@ public class CASTASMDeclaration extends ASTNode implements IASTASMDeclaration {
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitDeclarations ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitDeclarations) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
 
-        if( action.shouldVisitDeclarations ){
-		    switch( action.leave( this ) ){
+        if (action.shouldVisitDeclarations) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAlignmentSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAlignmentSpecifier.java
index 94ccdb9b15d..7dfa5d6cd68 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAlignmentSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAlignmentSpecifier.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Nathan Ridge - Initial API and implementation
  *******************************************************************************/
@@ -20,19 +20,19 @@ public class CASTAlignmentSpecifier extends ASTNode implements IASTAlignmentSpec
 	// Precisely one of these is null.
 	private IASTExpression fExpression;
 	private IASTTypeId fTypeId;
-	
+
 	CASTAlignmentSpecifier(IASTExpression expression) {
 		fExpression = expression;
 		fExpression.setParent(this);
 		fExpression.setPropertyInParent(ALIGNMENT_EXPRESSION);
 	}
-	
+
 	CASTAlignmentSpecifier(IASTTypeId typeId) {
 		fTypeId = typeId;
 		fTypeId.setParent(this);
 		fTypeId.setPropertyInParent(ALIGNMENT_TYPEID);
 	}
-	
+
 	@Override
 	public IASTExpression getExpression() {
 		return fExpression;
@@ -58,7 +58,7 @@ public class CASTAlignmentSpecifier extends ASTNode implements IASTAlignmentSpec
 		}
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public boolean accept(ASTVisitor visitor) {
 		if (fExpression != null) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguityResolver.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguityResolver.java
index ca8c37bb033..9bca168bb23 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguityResolver.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguityResolver.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *    Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
 import org.eclipse.cdt.core.dom.ast.ASTVisitor;
@@ -34,22 +34,22 @@ public final class CASTAmbiguityResolver extends ASTVisitor {
 	@Override
 	public int visit(ASTAmbiguousNode astAmbiguousNode) {
 		IASTNode node= astAmbiguousNode.resolveAmbiguity(this);
-		if (node instanceof IASTDeclarator || node instanceof IASTParameterDeclaration 
+		if (node instanceof IASTDeclarator || node instanceof IASTParameterDeclaration
 				|| node instanceof IASTDeclaration) {
-			while(node != null) {
+			while (node != null) {
 				if (node instanceof IASTDeclaration || node instanceof IASTParameterDeclaration) {
 					repopulateScope(node);
 					break;
 				}
 				if (node instanceof IASTExpression) {
 					break;
-				} 
+				}
 				node= node.getParent();
 			}
-		} 
+		}
 		return PROCESS_SKIP;
 	}
-	
+
 	private void repopulateScope(IASTNode node) {
 		IScope scope= CVisitor.getContainingScope(node);
 		if (scope instanceof CScope) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousAlignmentSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousAlignmentSpecifier.java
index 938523275e6..84c133b2969 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousAlignmentSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousAlignmentSpecifier.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Nathan Ridge - Initial API and implementation
  *******************************************************************************/
@@ -19,12 +19,12 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode;
 public class CASTAmbiguousAlignmentSpecifier extends ASTAmbiguousNode implements IASTAlignmentSpecifier {
 	IASTAlignmentSpecifier fExpression;
 	IASTAlignmentSpecifier fTypeId;
-	
+
 	CASTAmbiguousAlignmentSpecifier(IASTAlignmentSpecifier expression, IASTAlignmentSpecifier typeId) {
 		fExpression = expression;
 		fTypeId = typeId;
 	}
-	
+
 	@Override
 	public IASTExpression getExpression() {
 		return fExpression.getExpression();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousDeclarator.java
index c7ba18c1b73..0dd43dbed98 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousDeclarator.java
@@ -35,7 +35,7 @@ import org.eclipse.core.runtime.Assert;
 public class CASTAmbiguousDeclarator extends ASTAmbiguousNode implements IASTAmbiguousDeclarator {
     private IASTDeclarator[] dtors = new IASTDeclarator[2];
     private int dtorPos= -1;
-    
+
     public CASTAmbiguousDeclarator(IASTDeclarator... decls) {
 		for (IASTDeclarator d : decls) {
 			if (d != null) {
@@ -43,7 +43,7 @@ public class CASTAmbiguousDeclarator extends ASTAmbiguousNode implements IASTAmb
 			}
 		}
 	}
-    
+
 	@Override
 	protected void beforeResolution() {
 		// populate containing scope, so that it will not be affected by the alternative branches.
@@ -65,7 +65,7 @@ public class CASTAmbiguousDeclarator extends ASTAmbiguousNode implements IASTAmb
 
     @Override
 	public IASTDeclarator[] getDeclarators() {
-    	dtors = ArrayUtil.trimAt(IASTDeclarator.class, dtors, dtorPos); 
+    	dtors = ArrayUtil.trimAt(IASTDeclarator.class, dtors, dtorPos);
         return dtors;
     }
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousExpression.java
index 83142583a3e..0351149196e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousExpression.java
@@ -22,9 +22,9 @@ public class CASTAmbiguousExpression extends ASTAmbiguousNode implements IASTAmb
     private IASTExpression [] expressions = new IASTExpression[2];
     private int expressionsPos=-1;
 
-    
+
     public CASTAmbiguousExpression(IASTExpression... expressions) {
-		for(IASTExpression e : expressions)
+		for (IASTExpression e : expressions)
 			addExpression(e);
 	}
 
@@ -32,7 +32,7 @@ public class CASTAmbiguousExpression extends ASTAmbiguousNode implements IASTAmb
 	public void addExpression(IASTExpression e) {
         assertNotFrozen();
     	if (e != null) {
-    		expressions = ArrayUtil.appendAt( IASTExpression.class, expressions, ++expressionsPos, e );
+    		expressions = ArrayUtil.appendAt(IASTExpression.class, expressions, ++expressionsPos, e);
     		e.setParent(this);
 			e.setPropertyInParent(SUBEXPRESSION);
     	}
@@ -40,7 +40,7 @@ public class CASTAmbiguousExpression extends ASTAmbiguousNode implements IASTAmb
 
     @Override
 	public IASTExpression[] getExpressions() {
-    	expressions = ArrayUtil.trimAt( IASTExpression.class, expressions, expressionsPos ); 
+    	expressions = ArrayUtil.trimAt(IASTExpression.class, expressions, expressionsPos);
         return expressions;
     }
 
@@ -53,7 +53,7 @@ public class CASTAmbiguousExpression extends ASTAmbiguousNode implements IASTAmb
 	public IASTExpression copy() {
 		throw new UnsupportedOperationException();
 	}
-    
+
 	@Override
 	public IASTExpression copy(CopyStyle style) {
 		throw new UnsupportedOperationException();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousParameterDeclaration.java
index 7e51c9f0676..bbfa37183c3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousParameterDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousParameterDeclaration.java
@@ -32,9 +32,9 @@ public class CASTAmbiguousParameterDeclaration extends ASTAmbiguousNode implemen
     private IASTParameterDeclaration[] paramDecls = new IASTParameterDeclaration[2];
     private int declPos=-1;
 
-    
+
     public CASTAmbiguousParameterDeclaration(IASTParameterDeclaration... decls) {
-		for(IASTParameterDeclaration d : decls)
+		for (IASTParameterDeclaration d : decls)
 			addParameterDeclaration(d);
 	}
 
@@ -59,7 +59,7 @@ public class CASTAmbiguousParameterDeclaration extends ASTAmbiguousNode implemen
 
     @Override
 	public IASTParameterDeclaration[] getParameterDeclarations() {
-    	paramDecls = ArrayUtil.trimAt(IASTParameterDeclaration.class, paramDecls, declPos ); 
+    	paramDecls = ArrayUtil.trimAt(IASTParameterDeclaration.class, paramDecls, declPos);
         return paramDecls;
     }
 
@@ -94,7 +94,7 @@ public class CASTAmbiguousParameterDeclaration extends ASTAmbiguousNode implemen
 	public IASTParameterDeclaration copy() {
 		throw new UnsupportedOperationException();
 	}
-	
+
 	@Override
 	public IASTParameterDeclaration copy(CopyStyle style) {
 		throw new UnsupportedOperationException();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousSimpleDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousSimpleDeclaration.java
index 647af5e7717..3e7a934f28c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousSimpleDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousSimpleDeclaration.java
@@ -39,7 +39,7 @@ public class CASTAmbiguousSimpleDeclaration extends ASTAmbiguousNode implements
     private IASTSimpleDeclaration fSimpleDecl;
     private IASTDeclSpecifier fAltDeclSpec;
     private IASTDeclarator fAltDtor;
-    
+
     public CASTAmbiguousSimpleDeclaration(IASTSimpleDeclaration decl, IASTDeclSpecifier declSpec, IASTDeclarator dtor) {
     	fSimpleDecl= decl;
     	fAltDeclSpec= declSpec;
@@ -120,14 +120,14 @@ public class CASTAmbiguousSimpleDeclaration extends ASTAmbiguousNode implements
 		owner.replace(nodeToReplace, fSimpleDecl);
 		IASTDeclSpecifier declSpec= fSimpleDecl.getDeclSpecifier();
 		declSpec.accept(resolver);
-		
+
 
 		// Find nested names.
 		final NameCollector nameCollector= new NameCollector();
 		declSpec.accept(nameCollector);
 		final IASTName[] names= nameCollector.getNames();
 
-		// Resolve names. 
+		// Resolve names.
 		boolean hasIssue= false;
 		for (IASTName name : names) {
 			try {
@@ -147,7 +147,7 @@ public class CASTAmbiguousSimpleDeclaration extends ASTAmbiguousNode implements
 			parent.replace(declSpec, fAltDeclSpec);
 			parent.replace(fSimpleDecl.getDeclarators()[0], fAltDtor);
 		}
-			
+
 		// Resolve further nested ambiguities.
 		fSimpleDecl.accept(resolver);
 		return fSimpleDecl;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousStatement.java
index d57cd471bfe..24190d7414e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousStatement.java
@@ -32,15 +32,15 @@ public class CASTAmbiguousStatement extends ASTAmbiguousNode implements IASTAmbi
     private int stmtsPos= -1;
 	private IScope fScope;
 	private IASTDeclaration fDeclaration;
-    
+
     public CASTAmbiguousStatement(IASTStatement... statements) {
 		for (IASTStatement s : statements)
 			addStatement(s);
 	}
-    
+
 	@Override
 	protected void beforeResolution() {
-		// Populate containing scope, so that it will not be affected by the alternative 
+		// Populate containing scope, so that it will not be affected by the alternative
 		// branches.
 		fScope= CVisitor.getContainingScope(this);
 		if (fScope instanceof ICPPASTInternalScope) {
@@ -58,7 +58,7 @@ public class CASTAmbiguousStatement extends ASTAmbiguousNode implements IASTAmbi
 			}
 		}
 	}
-	
+
 	private void cleanupScope() {
 		if (fScope instanceof IASTInternalScope && fDeclaration != null) {
 			((IASTInternalScope) fScope).removeNestedFromCache(fDeclaration);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDeclarator.java
index 056ea340be5..d37d932e69b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDeclarator.java
@@ -36,7 +36,7 @@ public class CASTArrayDeclarator extends CASTDeclarator implements IASTArrayDecl
 	public CASTArrayDeclarator(IASTName name) {
 		super(name);
 	}
-	
+
 	@Override
 	public CASTArrayDeclarator copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -66,7 +66,7 @@ public class CASTArrayDeclarator extends CASTDeclarator implements IASTArrayDecl
     		arrayModifier.setParent(this);
 			arrayModifier.setPropertyInParent(ARRAY_MODIFIER);
             arrayMods = ArrayUtil.appendAt(IASTArrayModifier.class, arrayMods,
-            		++arrayModsPos, arrayModifier);    		
+            		++arrayModsPos, arrayModifier);
     	}
     }
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDesignator.java
index b3bbe9b8b7b..ab671f34b64 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDesignator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDesignator.java
@@ -43,7 +43,7 @@ public class CASTArrayDesignator extends ASTNode implements ICASTArrayDesignator
 				new CASTArrayDesignator(expression == null ? null : expression.copy(style));
 		return copy(copy, style);
 	}
-	
+
     @Override
 	public IASTExpression getSubscriptExpression() {
         return expression;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayModifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayModifier.java
index dbf2b04249b..7944a8c6a7b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayModifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayModifier.java
@@ -30,7 +30,7 @@ public class CASTArrayModifier extends ASTAttributeOwner implements ICASTArrayMo
     private boolean isStatic;
     private boolean isConst;
     private boolean isVarSized;
-    
+
     public CASTArrayModifier() {
 	}
 
@@ -53,7 +53,7 @@ public class CASTArrayModifier extends ASTAttributeOwner implements ICASTArrayMo
 		copy.isVarSized = isVarSized;
 		return copy(copy, style);
 	}
-	
+
     @Override
 	public IASTExpression getConstantExpression() {
         return exp;
@@ -63,12 +63,12 @@ public class CASTArrayModifier extends ASTAttributeOwner implements ICASTArrayMo
 	public void setConstantExpression(IASTExpression expression) {
         assertNotFrozen();
         this.exp = expression;
-        if(expression != null) {
+        if (expression != null) {
         	expression.setParent(this);
         	expression.setPropertyInParent(CONSTANT_EXPRESSION);
         }
     }
-	
+
 	@Override
 	public boolean isConst() {
         return isConst;
@@ -126,8 +126,8 @@ public class CASTArrayModifier extends ASTAttributeOwner implements ICASTArrayMo
 
     @Override
 	public boolean accept(ASTVisitor action) {
-    	if( action.shouldVisitArrayModifiers ){
-    		switch( action.visit( this ) ){
+    	if (action.shouldVisitArrayModifiers) {
+    		switch (action.visit(this)) {
     		case ASTVisitor.PROCESS_ABORT : return false;
     		case ASTVisitor.PROCESS_SKIP  : return true;
     		default : break;
@@ -147,10 +147,10 @@ public class CASTArrayModifier extends ASTAttributeOwner implements ICASTArrayMo
 
     @Override
 	public void replace(IASTNode child, IASTNode other) {
-        if( child == exp )
+        if (child == exp)
         {
-            other.setPropertyInParent( child.getPropertyInParent() );
-            other.setParent( child.getParent() );
+            other.setPropertyInParent(child.getPropertyInParent());
+            other.setParent(child.getParent());
             exp = (IASTExpression) other;
         }
     }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayRangeDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayRangeDesignator.java
index 8a75d49fafc..4cce8d8c8db 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayRangeDesignator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayRangeDesignator.java
@@ -47,7 +47,7 @@ public class CASTArrayRangeDesignator extends ASTNode
 		copy.setRangeCeiling(ceiling == null ? null : ceiling.copy(style));
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTExpression getRangeFloor() {
         return this.floor;
@@ -65,7 +65,7 @@ public class CASTArrayRangeDesignator extends ASTNode
 
     @Override
 	public IASTExpression getRangeCeiling() {
-        return ceiling;        
+        return ceiling;
     }
 
     @Override
@@ -97,7 +97,7 @@ public class CASTArrayRangeDesignator extends ASTNode
 
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
         if (child == floor) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArraySubscriptExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArraySubscriptExpression.java
index 192cf4105ea..7fbeb7978ba 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArraySubscriptExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArraySubscriptExpression.java
@@ -43,7 +43,7 @@ public class CASTArraySubscriptExpression extends ASTNode implements
 	public CASTArraySubscriptExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTArraySubscriptExpression copy(CopyStyle style) {
 		CASTArraySubscriptExpression copy = new CASTArraySubscriptExpression();
@@ -61,7 +61,7 @@ public class CASTArraySubscriptExpression extends ASTNode implements
 	public void setArrayExpression(IASTExpression expression) {
         assertNotFrozen();
         array = expression;
-        if(expression != null) {
+        if (expression != null) {
         	expression.setParent(this);
         	expression.setPropertyInParent(ARRAY);
         }
@@ -76,7 +76,7 @@ public class CASTArraySubscriptExpression extends ASTNode implements
 	public void setSubscriptExpression(IASTExpression expression) {
         assertNotFrozen();
         this.subscript = expression;
-        if(expression != null) {
+        if (expression != null) {
         	expression.setParent(this);
         	expression.setPropertyInParent(SUBSCRIPT);
         }
@@ -105,7 +105,7 @@ public class CASTArraySubscriptExpression extends ASTNode implements
 	            default: break;
 	        }
 		}
-        
+
         if (array != null && !array.accept(action)) return false;
         if (subscript != null && !subscript.accept(action)) return false;
 
@@ -118,7 +118,7 @@ public class CASTArraySubscriptExpression extends ASTNode implements
 		}
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
         if (child == array) {
@@ -132,15 +132,15 @@ public class CASTArraySubscriptExpression extends ASTNode implements
             subscript = (IASTExpression) other;
         }
     }
-    
+
     @Override
 	public IType getExpressionType() {
 		IType t = getArrayExpression().getExpressionType();
 		t = CVisitor.unwrapTypedefs(t);
 		if (t instanceof IPointerType)
-			return ((IPointerType)t).getType();
+			return ((IPointerType) t).getType();
 		else if (t instanceof IArrayType)
-			return ((IArrayType)t).getType();
+			return ((IArrayType) t).getType();
 		return t;
     }
 
@@ -148,7 +148,7 @@ public class CASTArraySubscriptExpression extends ASTNode implements
 	public boolean isLValue() {
 		return true;
 	}
-	
+
 	@Override
 	public final ValueCategory getValueCategory() {
 		return ValueCategory.LVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAttribute.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAttribute.java
index a4188ffb58a..365219d6d4f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAttribute.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAttribute.java
@@ -17,11 +17,11 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTAttribute;
  * C-specific attribute.
  */
 public class CASTAttribute extends ASTAttribute {
-	
+
 	public CASTAttribute(char[] name, IASTToken argumentClause) {
 		super(name, argumentClause);
 	}
-	
+
 	@Override
 	public CASTAttribute copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -31,7 +31,7 @@ public class CASTAttribute extends ASTAttribute {
 	public CASTAttribute copy(CopyStyle style) {
 		IASTToken argumentClause = getArgumentClause();
 		if (argumentClause != null)
-			argumentClause = argumentClause.copy(style); 
+			argumentClause = argumentClause.copy(style);
 		return copy(new CASTAttribute(getName(), argumentClause), style);
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBaseDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBaseDeclSpecifier.java
index 5d29317ad7d..62ce1aef62d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBaseDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBaseDeclSpecifier.java
@@ -4,7 +4,7 @@
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
  *  http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  *  Contributors:
  *  IBM Rational Software - Initial API and implementation
  *******************************************************************************/
@@ -21,7 +21,7 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
 /**
  * @author jcamelon
  */
-public abstract class CASTBaseDeclSpecifier extends ASTNode 
+public abstract class CASTBaseDeclSpecifier extends ASTNode
 		implements ICASTDeclSpecifier, IASTAmbiguityParent {
 
     protected int storageClass;
@@ -29,9 +29,9 @@ public abstract class CASTBaseDeclSpecifier extends ASTNode
     protected boolean isVolatile;
     protected boolean isRestrict;
     protected boolean isInline;
-    protected IASTAlignmentSpecifier[] alignmentSpecifiers = 
+    protected IASTAlignmentSpecifier[] alignmentSpecifiers =
     		IASTAlignmentSpecifier.EMPTY_ALIGNMENT_SPECIFIER_ARRAY;
-    
+
 	@Override
 	public boolean isRestrict() {
         return isRestrict;
@@ -56,12 +56,12 @@ public abstract class CASTBaseDeclSpecifier extends ASTNode
 	public boolean isInline() {
         return isInline;
     }
-    
+
     @Override
     public IASTAlignmentSpecifier[] getAlignmentSpecifiers() {
     	return alignmentSpecifiers;
     }
-    
+
     @Override
 	public void setStorageClass(int storageClass) {
         assertNotFrozen();
@@ -73,25 +73,25 @@ public abstract class CASTBaseDeclSpecifier extends ASTNode
         assertNotFrozen();
         this.isConst = value;
     }
-    
+
     @Override
 	public void setVolatile(boolean value) {
         assertNotFrozen();
         this.isVolatile = value;
     }
-    
+
     @Override
 	public void setRestrict(boolean value) {
         assertNotFrozen();
         this.isRestrict = value;
     }
-    
+
     @Override
 	public void setInline(boolean value) {
         assertNotFrozen();
         this.isInline = value;
     }
-    
+
     @Override
     public void setAlignmentSpecifiers(IASTAlignmentSpecifier[] alignmentSpecifiers) {
     	assertNotFrozen();
@@ -101,7 +101,7 @@ public abstract class CASTBaseDeclSpecifier extends ASTNode
     	}
     	this.alignmentSpecifiers = alignmentSpecifiers;
     }
-    
+
     protected  T copy(T copy, CopyStyle style) {
     	copy.storageClass = storageClass;
     	copy.isConst = isConst;
@@ -115,7 +115,7 @@ public abstract class CASTBaseDeclSpecifier extends ASTNode
     	}
 		return super.copy(copy, style);
     }
-    
+
     protected boolean visitAlignmentSpecifiers(ASTVisitor visitor) {
     	for (IASTAlignmentSpecifier specifier : alignmentSpecifiers) {
     		if (!specifier.accept(visitor)) {
@@ -124,7 +124,7 @@ public abstract class CASTBaseDeclSpecifier extends ASTNode
     	}
     	return true;
     }
-    
+
     @Override
     public void replace(IASTNode child, IASTNode other) {
     	if (child instanceof IASTAlignmentSpecifier && other instanceof IASTAlignmentSpecifier) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBinaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBinaryExpression.java
index d80f0b4b34a..8438c9d288b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBinaryExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBinaryExpression.java
@@ -45,7 +45,7 @@ public class CASTBinaryExpression extends ASTNode
 		setOperand1(operand1);
 		setOperand2(operand2);
 	}
-	
+
 	@Override
 	public CASTBinaryExpression copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -114,7 +114,7 @@ public class CASTBinaryExpression extends ASTNode
     	if (operand1 instanceof IASTBinaryExpression || operand2 instanceof IASTBinaryExpression) {
     		return acceptWithoutRecursion(this, action);
     	}
-    	
+
         if (action.shouldVisitExpressions) {
 		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -122,13 +122,13 @@ public class CASTBinaryExpression extends ASTNode
 	            default: break;
 	        }
 		}
-        
-		if (operand1 != null && !operand1.accept(action)) 
+
+		if (operand1 != null && !operand1.accept(action))
 			return false;
-		if (operand2 != null && !operand2.accept(action)) 
+		if (operand2 != null && !operand2.accept(action))
 			return false;
-        
-		if (action.shouldVisitExpressions && action.leave(this) == ASTVisitor.PROCESS_ABORT) 
+
+		if (action.shouldVisitExpressions && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
 
 		return true;
@@ -143,7 +143,7 @@ public class CASTBinaryExpression extends ASTNode
 			fExpression = expr;
 		}
 	}
-	
+
 	public static boolean acceptWithoutRecursion(IASTBinaryExpression bexpr, ASTVisitor action) {
 		N stack= new N(bexpr);
 		while (stack != null) {
@@ -151,9 +151,9 @@ public class CASTBinaryExpression extends ASTNode
 			if (stack.fState == 0) {
 				if (action.shouldVisitExpressions) {
 					switch (action.visit(expr)) {
-					case ASTVisitor.PROCESS_ABORT: 
+					case ASTVisitor.PROCESS_ABORT:
 						return false;
-					case ASTVisitor.PROCESS_SKIP: 
+					case ASTVisitor.PROCESS_SKIP:
 						stack= stack.fNext;
 						continue;
 					}
@@ -166,33 +166,33 @@ public class CASTBinaryExpression extends ASTNode
 					stack= n;
 					continue;
 				}
-				if (op1 != null && !op1.accept(action)) 
+				if (op1 != null && !op1.accept(action))
 					return false;
 			}
 			if (stack.fState == 1) {
 				stack.fState= 2;
-		        
+
 				IASTExpression op2 = expr.getOperand2();
 				if (op2 instanceof IASTBinaryExpression) {
 					N n= new N((IASTBinaryExpression) op2);
 					n.fNext= stack;
 					stack= n;
 					continue;
-				} 
-				if (op2 != null && !op2.accept(action)) 
+				}
+				if (op2 != null && !op2.accept(action))
 					return false;
 			}
-			
-			if (action.shouldVisitExpressions && action.leave(expr) == ASTVisitor.PROCESS_ABORT) 
+
+			if (action.shouldVisitExpressions && action.leave(expr) == ASTVisitor.PROCESS_ABORT)
 				return false;
-		
+
 			stack= stack.fNext;
 		}
-		
+
 		return true;
 	}
 
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
         if (child == operand1) {
@@ -206,7 +206,7 @@ public class CASTBinaryExpression extends ASTNode
             operand2 = (IASTExpression) other;
         }
     }
-    
+
     @Override
 	public IType getExpressionType() {
         final int op = getOperator();
@@ -258,7 +258,7 @@ public class CASTBinaryExpression extends ASTNode
 				(type.isRestrict() ? CPointerType.IS_RESTRICT : 0) |
 				(type.isVolatile() ? CPointerType.IS_VOLATILE : 0));
 	}
-    
+
 	@Override
 	public boolean isLValue() {
 		switch (getOperator()) {
@@ -277,7 +277,7 @@ public class CASTBinaryExpression extends ASTNode
 		}
 		return false;
 	}
-	
+
 	@Override
 	public final ValueCategory getValueCategory() {
 		return isLValue() ? ValueCategory.LVALUE : ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBreakStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBreakStatement.java
index 4c900f89e55..a740fe7532e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBreakStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBreakStatement.java
@@ -39,10 +39,10 @@ public class CASTBreakStatement extends ASTAttributeOwner implements IASTBreakSt
         		default: break;
         	}
         }
-        
+
         return true;
     }
-    
+
     @Override
 	public CASTBreakStatement copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCaseStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCaseStatement.java
index 3d5281fd2f4..258f940f9d5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCaseStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCaseStatement.java
@@ -31,7 +31,7 @@ public class CASTCaseStatement extends ASTAttributeOwner implements IASTCaseStat
 	public CASTCaseStatement(IASTExpression expression) {
 		setExpression(expression);
 	}
-	
+
 	@Override
 	public CASTCaseStatement copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -74,8 +74,8 @@ public class CASTCaseStatement extends ASTAttributeOwner implements IASTCaseStat
         		case ASTVisitor.PROCESS_SKIP: return true;
         		default: break;
         	}
-        }      
-        
+        }
+
         return true;
     }
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCastExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCastExpression.java
index ffda28046e9..0f6eaa0ac4e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCastExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCastExpression.java
@@ -37,7 +37,7 @@ public class CASTCastExpression extends ASTNode implements IASTCastExpression, I
 		setOperand(operand);
 		setTypeId(typeId);
 	}
-	
+
 	@Override
 	public CASTCastExpression copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -77,7 +77,7 @@ public class CASTCastExpression extends ASTNode implements IASTCastExpression, I
 			expression.setPropertyInParent(OPERAND);
 		}
     }
-    
+
 	@Override
 	public void setTypeId(IASTTypeId typeId) {
         assertNotFrozen();
@@ -94,40 +94,40 @@ public class CASTCastExpression extends ASTNode implements IASTCastExpression, I
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitExpressions ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitExpressions) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
-        
-        if( typeId != null ) if( !typeId.accept( action ) ) return false;
+
+        if (typeId != null) if (!typeId.accept(action)) return false;
         IASTExpression operand = getOperand();
-        if( operand != null ) if( !operand.accept( action ) ) return false;
-        
-        if( action.shouldVisitExpressions ){
-		    switch( action.leave( this ) ){
+        if (operand != null) if (!operand.accept(action)) return false;
+
+        if (action.shouldVisitExpressions) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
-        
-        
+
+
         return true;
     }
-    
+
 	@Override
 	public void replace(IASTNode child, IASTNode other) {
 		if (child == operand) {
 			other.setPropertyInParent(child.getPropertyInParent());
 			other.setParent(child.getParent());
 			operand = (IASTExpression) other;
-		} 
+		}
 	}
-    
+
 	@Override
 	public IType getExpressionType() {
         IASTTypeId id= getTypeId();
@@ -138,7 +138,7 @@ public class CASTCastExpression extends ASTNode implements IASTCastExpression, I
 	public boolean isLValue() {
 		return false;
 	}
-	
+
 	@Override
 	public final ValueCategory getValueCategory() {
 		return ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java
index 264e1e6743e..edd8a5fb82c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java
@@ -32,7 +32,7 @@ public class CASTCompositeTypeSpecifier extends CASTBaseDeclSpecifier implements
     private IASTDeclaration[] fAllDeclarations;
     private int fDeclarationsPos = -1;
     private IScope fScope;
-    
+
     public CASTCompositeTypeSpecifier() {
 	}
 
@@ -40,12 +40,12 @@ public class CASTCompositeTypeSpecifier extends CASTBaseDeclSpecifier implements
 		this.fKey = key;
 		setName(name);
 	}
-    
+
 	@Override
 	public CASTCompositeTypeSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTCompositeTypeSpecifier copy(CopyStyle style) {
 		CASTCompositeTypeSpecifier copy = new CASTCompositeTypeSpecifier();
@@ -60,7 +60,7 @@ public class CASTCompositeTypeSpecifier extends CASTBaseDeclSpecifier implements
 		}
 		return super.copy(copy, style);
 	}
-	
+
     @Override
 	public int getKey() {
         return fKey;
@@ -76,7 +76,7 @@ public class CASTCompositeTypeSpecifier extends CASTBaseDeclSpecifier implements
 	public IASTName getName() {
         return fName;
     }
-    
+
     @Override
 	public void setName(IASTName name) {
         assertNotFrozen();
@@ -118,7 +118,7 @@ public class CASTCompositeTypeSpecifier extends CASTBaseDeclSpecifier implements
 			fActiveDeclarations= null;
     	}
     }
-    
+
     @Override
 	public void addDeclaration(IASTDeclaration declaration) {
     	addMemberDeclaration(declaration);
@@ -132,7 +132,7 @@ public class CASTCompositeTypeSpecifier extends CASTBaseDeclSpecifier implements
     }
 
     @Override
-	public boolean accept(ASTVisitor action){
+	public boolean accept(ASTVisitor action) {
 		if (action.shouldVisitDeclSpecifiers) {
 			switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -146,7 +146,7 @@ public class CASTCompositeTypeSpecifier extends CASTBaseDeclSpecifier implements
 
 		if (fName != null && !fName.accept(action))
 			return false;
-           
+
 		IASTDeclaration[] decls= getDeclarations(action.includeInactiveNodes);
 		for (int i = 0; i < decls.length; i++) {
 			if (!decls[i].accept(action))
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java
index ae737cecda8..1c03b600355 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     IBM Rational Software - Initial API and implementation
  *     Yuan Zhang / Beth Tibbitts (IBM Research)
- *     Sergey Prigogin (Google) 
+ *     Sergey Prigogin (Google)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
@@ -33,7 +33,7 @@ public class CASTCompoundStatement extends ASTAttributeOwner implements IASTComp
 	public CASTCompoundStatement copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-    
+
 	@Override
 	public CASTCompoundStatement copy(CopyStyle style) {
 		CASTCompoundStatement copy = new CASTCompoundStatement();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatementExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatementExpression.java
index d86a2c19634..decfdf00193 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatementExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatementExpression.java
@@ -35,7 +35,7 @@ public class CASTCompoundStatementExpression extends ASTNode implements IGNUASTC
 	public CASTCompoundStatementExpression(IASTCompoundStatement statement) {
 		setCompoundStatement(statement);
 	}
-	
+
 	@Override
 	public CASTCompoundStatementExpression copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -64,18 +64,18 @@ public class CASTCompoundStatementExpression extends ASTNode implements IGNUASTC
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitExpressions ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitExpressions) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
-     
-        if( statement != null ) if( !statement.accept( action ) ) return false;
-        if( action.shouldVisitExpressions ){
-        	switch( action.leave( this ) ){
+
+        if (statement != null) if (!statement.accept(action)) return false;
+        if (action.shouldVisitExpressions) {
+        	switch (action.leave(this)) {
         		case ASTVisitor.PROCESS_ABORT : return false;
         		case ASTVisitor.PROCESS_SKIP  : return true;
         		default : break;
@@ -83,7 +83,7 @@ public class CASTCompoundStatementExpression extends ASTNode implements IGNUASTC
         }
         return true;
     }
-    
+
     @Override
 	public IType getExpressionType() {
 		IASTCompoundStatement compound = getCompoundStatement();
@@ -91,7 +91,7 @@ public class CASTCompoundStatementExpression extends ASTNode implements IGNUASTC
 		if (statements.length > 0) {
 			IASTStatement st = statements[statements.length - 1];
 			if (st instanceof IASTExpressionStatement)
-				return ((IASTExpressionStatement)st).getExpression().getExpressionType();
+				return ((IASTExpressionStatement) st).getExpression().getExpressionType();
 		}
 		return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION);
 	}
@@ -103,11 +103,11 @@ public class CASTCompoundStatementExpression extends ASTNode implements IGNUASTC
 		if (statements.length > 0) {
 			IASTStatement st = statements[statements.length - 1];
 			if (st instanceof IASTExpressionStatement)
-				return ((IASTExpressionStatement)st).getExpression().isLValue();
+				return ((IASTExpressionStatement) st).getExpression().isLValue();
 		}
 		return false;
 	}
-	
+
 	@Override
 	public final ValueCategory getValueCategory() {
 		return isLValue() ? ValueCategory.LVALUE : ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTConditionalExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTConditionalExpression.java
index 2f2aa3e4256..b76ceb58be4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTConditionalExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTConditionalExpression.java
@@ -39,13 +39,13 @@ public class CASTConditionalExpression extends ASTNode implements
     public CASTConditionalExpression() {
 	}
 
-	public CASTConditionalExpression(IASTExpression condition, 
+	public CASTConditionalExpression(IASTExpression condition,
 			IASTExpression positive, IASTExpression negative) {
 		setLogicalConditionExpression(condition);
 		setPositiveResultExpression(positive);
 		setNegativeResultExpression(negative);
 	}
-	
+
 	@Override
 	public CASTConditionalExpression copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -106,20 +106,20 @@ public class CASTConditionalExpression extends ASTNode implements
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitExpressions ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitExpressions) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
-        
-        if( condition != null ) if( !condition.accept( action ) ) return false;
-        if( positive != null ) if( !positive.accept( action ) ) return false;
-        if( negative != null ) if( !negative.accept( action ) ) return false;
-        if( action.shouldVisitExpressions ){
-        	switch( action.leave( this ) ){
+
+        if (condition != null) if (!condition.accept(action)) return false;
+        if (positive != null) if (!positive.accept(action)) return false;
+        if (negative != null) if (!negative.accept(action)) return false;
+        if (action.shouldVisitExpressions) {
+        	switch (action.leave(this)) {
         		case ASTVisitor.PROCESS_ABORT : return false;
         		case ASTVisitor.PROCESS_SKIP  : return true;
         		default : break;
@@ -127,29 +127,29 @@ public class CASTConditionalExpression extends ASTNode implements
         }
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
-        if( child == condition )
+        if (child == condition)
         {
-            other.setPropertyInParent( child.getPropertyInParent() );
-            other.setParent( child.getParent() );
+            other.setPropertyInParent(child.getPropertyInParent());
+            other.setParent(child.getParent());
             condition = (IASTExpression) other;
         }
-        if( child == positive)
+        if (child == positive)
         {
-            other.setPropertyInParent( child.getPropertyInParent() );
-            other.setParent( child.getParent() );
+            other.setPropertyInParent(child.getPropertyInParent());
+            other.setParent(child.getParent());
             positive= (IASTExpression) other;
         }
-        if( child == negative)
+        if (child == negative)
         {
-            other.setPropertyInParent( child.getPropertyInParent() );
-            other.setParent( child.getParent() );
+            other.setPropertyInParent(child.getPropertyInParent());
+            other.setParent(child.getParent());
             negative= (IASTExpression) other;
         }
     }
-    
+
     @Override
 	public IType getExpressionType() {
 		IASTExpression positiveExpression = getPositiveResultExpression();
@@ -161,15 +161,15 @@ public class CASTConditionalExpression extends ASTNode implements
 		IType originalNegativeType = getNegativeResultExpression().getExpressionType();
 		IType positiveType = CVisitor.unwrapTypedefs(originalPositiveType);
 		IType negativeType = CVisitor.unwrapTypedefs(originalNegativeType);
-		IType resultType = computeResultType(positiveExpression, negativeExpression, 
+		IType resultType = computeResultType(positiveExpression, negativeExpression,
 				                             positiveType, negativeType);
 		if (resultType == null) {
 			return ProblemType.UNKNOWN_FOR_EXPRESSION;
 		}
 		return ExpressionTypes.restoreTypedefs(resultType, originalPositiveType, originalPositiveType);
 	}
-    
-    
+
+
 	private IType computeResultType(IASTExpression positiveExpression, IASTExpression negativeExpression,
 			                        IType positiveType, IType negativeType) {
 		// [6.5.15] p5: If both the second and third operands have arithmetic type, the result type
@@ -181,12 +181,12 @@ public class CASTConditionalExpression extends ASTNode implements
 			 && ((IBasicType) negativeType).getKind() == IBasicType.Kind.eVoid) {
 				return CBasicType.VOID;
 			}
-			
+
 			// It doesn't really matter which operator we use here, so we'll use op_plus.
-			return CArithmeticConversion.convertCOperandTypes(IASTBinaryExpression.op_plus, 
+			return CArithmeticConversion.convertCOperandTypes(IASTBinaryExpression.op_plus,
 					positiveType, negativeType);
 		}
-		
+
 		// If both the operands have structure or union type, the result has that type.
 		if (positiveType instanceof ICompositeType && negativeType instanceof ICompositeType) {
 			// Both operands must have the same structure or union type as per p3.
@@ -194,14 +194,14 @@ public class CASTConditionalExpression extends ASTNode implements
 				return positiveType;
 			}
 		}
-		
-		// [6.5.15] p6: If both the second and third operands are pointers or one is a null pointer 
+
+		// [6.5.15] p6: If both the second and third operands are pointers or one is a null pointer
 		// constant and the other is a pointer, the result type is a pointer to a type qualified with
-		// all the type qualifiers of the types referenced by both operands. Furthermore, if both 
-		// operands are pointers to compatible types or to differently qualified versions of compatible 
-		// types, the result type is a pointer to an appropriately qualified version of the composite 
-		// type; if one operand is a null pointer constant, the result has the type of the other operand; 
-		// otherwise, one operand is a pointer to void or a qualified version of void, in which case the 
+		// all the type qualifiers of the types referenced by both operands. Furthermore, if both
+		// operands are pointers to compatible types or to differently qualified versions of compatible
+		// types, the result type is a pointer to an appropriately qualified version of the composite
+		// type; if one operand is a null pointer constant, the result has the type of the other operand;
+		// otherwise, one operand is a pointer to void or a qualified version of void, in which case the
 		// result type is a pointer to an appropriately qualified version of void.
 		if (CVisitor.isNullPointerConstant(positiveExpression) && negativeType instanceof IPointerType) {
 			return negativeType;
@@ -222,7 +222,7 @@ public class CASTConditionalExpression extends ASTNode implements
 			return new CPointerType(
 					ExpressionTypes.restoreCV(resultPointee, positivePointeeCV, negativePointeeCV), 0);
 		}
-		
+
 		return null;
 	}
 
@@ -230,7 +230,7 @@ public class CASTConditionalExpression extends ASTNode implements
 	public boolean isLValue() {
 		return false;
 	}
-	
+
 	@Override
 	public final ValueCategory getValueCategory() {
 		return ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTContinueStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTContinueStatement.java
index 98553100737..5a6061caeec 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTContinueStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTContinueStatement.java
@@ -41,7 +41,7 @@ public class CASTContinueStatement extends ASTAttributeOwner implements IASTCont
         }
         return true;
     }
-    
+
     @Override
 	public CASTContinueStatement copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarator.java
index 9966a15ab09..2a956a56c18 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarator.java
@@ -46,12 +46,12 @@ public class CASTDeclarator extends ASTAttributeOwner implements IASTDeclarator,
     public CASTDeclarator(IASTName name) {
 		setName(name);
 	}
-    
+
 	public CASTDeclarator(IASTName name, IASTInitializer initializer) {
 		setInitializer(initializer);
 		setName(name);
 	}
-	
+
 	@Override
 	public CASTDeclarator copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -61,7 +61,7 @@ public class CASTDeclarator extends ASTAttributeOwner implements IASTDeclarator,
 	public CASTDeclarator copy(CopyStyle style) {
 		return copy(new CASTDeclarator(), style);
 	}
-	
+
 	protected  T copy(T copy, CopyStyle style) {
 		copy.setName(name == null ? null : name.copy(style));
 		copy.setInitializer(initializer == null ? null : initializer.copy(style));
@@ -143,7 +143,7 @@ public class CASTDeclarator extends ASTAttributeOwner implements IASTDeclarator,
 	            default: break;
 	        }
 		}
-        
+
         for (int i = 0; i <= pointerOpsPos; i++) {
             if (!pointerOps[i].accept(action))
             	return false;
@@ -167,7 +167,7 @@ public class CASTDeclarator extends ASTAttributeOwner implements IASTDeclarator,
         if (nestedDeclarator != null && !nestedDeclarator.accept(action)) {
         	return false;
         }
-        
+
         if (!postAccept(action))
 			return false;
 
@@ -176,14 +176,14 @@ public class CASTDeclarator extends ASTAttributeOwner implements IASTDeclarator,
 		}
 		return true;
     }
-    
+
     protected boolean postAccept(ASTVisitor action) {
         if (initializer != null && !initializer.accept(action))
         	return false;
-        
+
 		return true;
     }
-	
+
 	@Override
 	public int getRoleForName(IASTName n) {
 		if (n == this.name) {
@@ -194,14 +194,14 @@ public class CASTDeclarator extends ASTAttributeOwner implements IASTDeclarator,
                     return r_definition;
                 if (getParent instanceof IASTSimpleDeclaration) {
 					IASTSimpleDeclaration sd = (IASTSimpleDeclaration) getParent;
-	                int storage = sd.getDeclSpecifier().getStorageClass(); 
+	                int storage = sd.getDeclSpecifier().getStorageClass();
 					if (getInitializer() != null || storage == IASTDeclSpecifier.sc_typedef)
 	                    return r_definition;
-					
+
 					if (storage == IASTDeclSpecifier.sc_extern || storage == IASTDeclSpecifier.sc_static) {
 	                    return r_declaration;
 	                }
-					
+
 					return fnDtor ? r_declaration : r_definition;
                 }
             }
@@ -228,7 +228,7 @@ public class CASTDeclarator extends ASTAttributeOwner implements IASTDeclarator,
 				if (t instanceof IASTTypeId)
 					return r_reference;
 			}
-			
+
 	        if (getParent instanceof IASTParameterDeclaration)
 	            return (n.toCharArray().length > 0) ? r_definition : r_declaration;
 		}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDoStatement.java
index 8138c8d5925..1445c1ab76b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDoStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDoStatement.java
@@ -39,7 +39,7 @@ public class CASTDoStatement extends ASTAttributeOwner implements IASTDoStatemen
 	public CASTDoStatement copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTDoStatement copy(CopyStyle style) {
 		CASTDoStatement copy = new CASTDoStatement();
@@ -52,7 +52,7 @@ public class CASTDoStatement extends ASTAttributeOwner implements IASTDoStatemen
 	public IASTStatement getBody() {
         return body;
     }
- 
+
     @Override
 	public void setBody(IASTStatement body) {
         assertNotFrozen();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTElaboratedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTElaboratedTypeSpecifier.java
index fe3a7db1550..378ad9dc11f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTElaboratedTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTElaboratedTypeSpecifier.java
@@ -47,7 +47,7 @@ public class CASTElaboratedTypeSpecifier extends CASTBaseDeclSpecifier implement
 	public CASTElaboratedTypeSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTElaboratedTypeSpecifier copy(CopyStyle style) {
 		CASTElaboratedTypeSpecifier copy = new CASTElaboratedTypeSpecifier(kind,
@@ -82,9 +82,9 @@ public class CASTElaboratedTypeSpecifier extends CASTBaseDeclSpecifier implement
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitDeclSpecifiers ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitDeclSpecifiers) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
@@ -93,9 +93,9 @@ public class CASTElaboratedTypeSpecifier extends CASTBaseDeclSpecifier implement
         if (!visitAlignmentSpecifiers(action)) {
         	return false;
         }
-        if( name != null ) if( !name.accept( action ) ) return false;
-        if( action.shouldVisitDeclSpecifiers ){
-		    switch( action.leave( this ) ){
+        if (name != null) if (!name.accept(action)) return false;
+        if (action.shouldVisitDeclSpecifiers) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
@@ -105,24 +105,24 @@ public class CASTElaboratedTypeSpecifier extends CASTBaseDeclSpecifier implement
     }
 
 	@Override
-	public int getRoleForName(IASTName n ) {
-		if( n != name ) return r_unclear;
-		
+	public int getRoleForName(IASTName n) {
+		if (n != name) return r_unclear;
+
 		IASTNode parent = getParent();
-		if( !( parent instanceof IASTDeclaration ) )
+		if (!(parent instanceof IASTDeclaration))
 			return r_reference;
-		
-		if( parent instanceof IASTSimpleDeclaration ){
-			IASTDeclarator [] dtors = ((IASTSimpleDeclaration)parent).getDeclarators(); 
-			if( dtors.length == 0 )
+
+		if (parent instanceof IASTSimpleDeclaration) {
+			IASTDeclarator [] dtors = ((IASTSimpleDeclaration) parent).getDeclarators();
+			if (dtors.length == 0)
 				return r_declaration;
 		}
-		
+
 		//can't tell, resolve the binding
 		IBinding binding = name.resolveBinding();
-		if( binding instanceof ICInternalBinding ){
-			IASTNode node = ((ICInternalBinding)binding).getPhysicalNode();
-			if( node == name ) 
+		if (binding instanceof ICInternalBinding) {
+			IASTNode node = ((ICInternalBinding) binding).getPhysicalNode();
+			if (node == name)
 				return r_declaration;
 		}
 		return r_reference;
@@ -138,11 +138,11 @@ public class CASTElaboratedTypeSpecifier extends CASTBaseDeclSpecifier implement
 				ICompositeType ct= (ICompositeType) b;
 				switch (ct.getKey()) {
 				case ICompositeType.k_struct:
-					if (getKind() != k_struct) 
+					if (getKind() != k_struct)
 						b= null;
 					break;
 				case ICompositeType.k_union:
-					if (getKind() != k_union) 
+					if (getKind() != k_union)
 						b= null;
 					break;
 				}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerationSpecifier.java
index ad6b551f523..0bb1cf0ebd4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerationSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerationSpecifier.java
@@ -22,7 +22,7 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTInternalEnumerationSpecifier
 /**
  * AST node for enumeration specifiers.
  */
-public class CASTEnumerationSpecifier extends CASTBaseDeclSpecifier 
+public class CASTEnumerationSpecifier extends CASTBaseDeclSpecifier
 		implements IASTInternalEnumerationSpecifier, ICASTEnumerationSpecifier {
     private IASTName fName;
 	private Boolean fValuesComputed;
@@ -40,7 +40,7 @@ public class CASTEnumerationSpecifier extends CASTBaseDeclSpecifier
 	public CASTEnumerationSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTEnumerationSpecifier copy(CopyStyle style) {
 		CASTEnumerationSpecifier copy = new CASTEnumerationSpecifier();
@@ -54,12 +54,12 @@ public class CASTEnumerationSpecifier extends CASTBaseDeclSpecifier
 		}
 		return super.copy(copy, style);
 	}
-	
+
 	@Override
 	public boolean startValueComputation() {
 		if (fValuesComputed != null)
 			return false;
-		
+
 		fValuesComputed= Boolean.FALSE;
 		return true;
 	}
@@ -85,7 +85,7 @@ public class CASTEnumerationSpecifier extends CASTBaseDeclSpecifier
     }
 
     @Override
-	public IASTEnumerator[] getEnumerators() {        
+	public IASTEnumerator[] getEnumerators() {
         fEnumerators = ArrayUtil.trim(fEnumerators, fNumEnumerators);
         return fEnumerators;
     }
@@ -108,7 +108,7 @@ public class CASTEnumerationSpecifier extends CASTBaseDeclSpecifier
     @Override
 	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitDeclSpecifiers) {
-		    switch(action.visit(this)) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
 	            case ASTVisitor.PROCESS_SKIP: return true;
 	            default: break;
@@ -125,7 +125,7 @@ public class CASTEnumerationSpecifier extends CASTBaseDeclSpecifier
             	return false;
         }
         if (action.shouldVisitDeclSpecifiers) {
-		    switch(action.leave(this)) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
 	            case ASTVisitor.PROCESS_SKIP: return true;
 	            default: break;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerator.java
index 1b596216df0..62107a0c18a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerator.java
@@ -18,7 +18,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTEnumerator;
  * C-specific enumerator
  */
 public class CASTEnumerator extends ASTEnumerator {
-	
+
     public CASTEnumerator() {
     	super();
 	}
@@ -26,7 +26,7 @@ public class CASTEnumerator extends ASTEnumerator {
 	public CASTEnumerator(IASTName name, IASTExpression value) {
 		super(name, value);
 	}
-	
+
 	@Override
 	public CASTEnumerator copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionList.java
index 6b9b58a8e09..2853bb379b0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionList.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionList.java
@@ -37,23 +37,23 @@ public class CASTExpressionList extends ASTNode implements IASTExpressionList,
 	@Override
 	public CASTExpressionList copy(CopyStyle style) {
 		CASTExpressionList copy = new CASTExpressionList();
-		for(IASTExpression expr : getExpressions())
+		for (IASTExpression expr : getExpressions())
 			copy.addExpression(expr == null ? null : expr.copy(style));
 		return copy(copy, style);
 	}
-	
+
     @Override
 	public IASTExpression[] getExpressions() {
         if (expressions == null)
             return IASTExpression.EMPTY_EXPRESSION_ARRAY;
-        return ArrayUtil.trim( IASTExpression.class, expressions );
+        return ArrayUtil.trim(IASTExpression.class, expressions);
     }
 
     @Override
 	public void addExpression(IASTExpression expression) {
         assertNotFrozen();
-        expressions = ArrayUtil.append( IASTExpression.class, expressions, expression );
-        if(expression != null) {
+        expressions = ArrayUtil.append(IASTExpression.class, expressions, expression);
+        if (expression != null) {
         	expression.setParent(this);
     		expression.setPropertyInParent(NESTED_EXPRESSION);
 		}
@@ -94,7 +94,7 @@ public class CASTExpressionList extends ASTNode implements IASTExpressionList,
 
     @Override
 	public void replace(IASTNode child, IASTNode other) {
-        if( expressions == null ) return;
+        if (expressions == null) return;
         for (int i = 0; i < expressions.length; ++i) {
             if (child == expressions[i]) {
                 other.setPropertyInParent(child.getPropertyInParent());
@@ -103,7 +103,7 @@ public class CASTExpressionList extends ASTNode implements IASTExpressionList,
             }
         }
     }
-    
+
     @Override
 	public IType getExpressionType() {
     	for (int i = expressions.length-1; i >= 0; i--) {
@@ -123,7 +123,7 @@ public class CASTExpressionList extends ASTNode implements IASTExpressionList,
 		}
     	return false;
 	}
-	
+
 	@Override
 	public final ValueCategory getValueCategory() {
 		return isLValue() ? ValueCategory.LVALUE : ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionStatement.java
index 58e9c945b84..30447725320 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionStatement.java
@@ -44,7 +44,7 @@ public class CASTExpressionStatement extends ASTAttributeOwner
 		copy.setExpression(expression == null ? null : expression.copy(style));
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTExpression getExpression() {
         return expression;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDeclarator.java
index 76c3ed668cd..fc8b84b51c2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDeclarator.java
@@ -36,7 +36,7 @@ public class CASTFieldDeclarator extends CASTDeclarator implements IASTFieldDecl
 	public CASTFieldDeclarator copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTFieldDeclarator copy(CopyStyle style) {
 		CASTFieldDeclarator copy = new CASTFieldDeclarator();
@@ -63,15 +63,15 @@ public class CASTFieldDeclarator extends CASTDeclarator implements IASTFieldDecl
 	protected boolean postAccept(ASTVisitor action) {
 		if (bitFieldSize != null && !bitFieldSize.accept(action))
 			return false;
-		
+
 		return super.postAccept(action);
 	}
 
     @Override
 	public void replace(IASTNode child, IASTNode other) {
-        if( child == bitFieldSize) {
-            other.setPropertyInParent( child.getPropertyInParent() );
-            other.setParent( child.getParent() );
+        if (child == bitFieldSize) {
+            other.setPropertyInParent(child.getPropertyInParent());
+            other.setParent(child.getParent());
             bitFieldSize = (IASTExpression) other;
         } else {
         	super.replace(child, other);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDesignator.java
index 73aa1664bbd..a83091274c9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDesignator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDesignator.java
@@ -31,7 +31,7 @@ public class CASTFieldDesignator extends ASTNode implements ICASTFieldDesignator
 	public CASTFieldDesignator(IASTName name) {
 		setName(name);
 	}
-	
+
 	@Override
 	public CASTFieldDesignator copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -59,7 +59,7 @@ public class CASTFieldDesignator extends ASTNode implements ICASTFieldDesignator
     }
 
     @Override
-	public boolean accept( ASTVisitor action) {
+	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitDesignators) {
 			switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -71,10 +71,10 @@ public class CASTFieldDesignator extends ASTNode implements ICASTFieldDesignator
 			return false;
 		if (action.shouldVisitDesignators && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
-		
+
         return true;
     }
-    
+
 	@Override
 	public IBinding[] findBindings(IASTName n, boolean isPrefix) {
 		return CVisitor.findBindingsForContentAssist(n, isPrefix);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldReference.java
index 48a699a425d..8e17f478680 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldReference.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldReference.java
@@ -38,7 +38,7 @@ public class CASTFieldReference extends ASTNode
 
     public CASTFieldReference() {
 	}
-    
+
 	public CASTFieldReference(IASTName name, IASTExpression owner) {
 		this(name, owner, false);
 	}
@@ -48,7 +48,7 @@ public class CASTFieldReference extends ASTNode
 		setFieldName(name);
 		this.ptr = ptr;
 	}
-	
+
 	@Override
 	public CASTFieldReference copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -113,7 +113,7 @@ public class CASTFieldReference extends ASTNode
 	            default: break;
 	        }
 		}
-      
+
         if (owner != null && !owner.accept(action)) return false;
         if (name != null && !name.accept(action)) return false;
 
@@ -142,12 +142,12 @@ public class CASTFieldReference extends ASTNode
             owner = (IASTExpression) other;
         }
     }
-    
+
     @Override
 	public IType getExpressionType() {
         IBinding binding = getFieldName().resolveBinding();
 		if (binding instanceof IVariable) {
-			return ((IVariable)binding).getType();
+			return ((IVariable) binding).getType();
 		}
     	return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION);
     }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTForStatement.java
index dc030bb1882..ccf597251ab 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTForStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTForStatement.java
@@ -53,7 +53,7 @@ public class CASTForStatement extends ASTAttributeOwner implements IASTForStatem
 		CASTForStatement copy = new CASTForStatement();
 		return copy(copy, style);
 	}
-	
+
 	protected  T copy(T copy, CopyStyle style) {
 		copy.setInitializerStatement(init == null ? null : init.copy(style));
 		copy.setConditionExpression(condition == null ? null : condition.copy(style));
@@ -62,7 +62,7 @@ public class CASTForStatement extends ASTAttributeOwner implements IASTForStatem
 		copy.setBody(body == null ? null : body.copy(style));
 		return super.copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTExpression getConditionExpression() {
         return condition;
@@ -92,7 +92,7 @@ public class CASTForStatement extends ASTAttributeOwner implements IASTForStatem
 			iterator.setPropertyInParent(ITERATION);
 		}
     }
-    
+
     @Override
 	public IASTStatement getInitializerStatement() {
         return init;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionCallExpression.java
index 027b0a95221..5a99989c3a1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionCallExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionCallExpression.java
@@ -33,7 +33,7 @@ public class CASTFunctionCallExpression extends ASTNode
     private IASTExpression functionName;
     private IASTInitializerClause[] fArguments;
 
-    
+
     public CASTFunctionCallExpression() {
     	setArguments(null);
 	}
@@ -47,7 +47,7 @@ public class CASTFunctionCallExpression extends ASTNode
 	public CASTFunctionCallExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTFunctionCallExpression copy(CopyStyle style) {
 		IASTInitializerClause[] args = null;
@@ -106,9 +106,9 @@ public class CASTFunctionCallExpression extends ASTNode
 	            default: break;
 	        }
 		}
-      
+
 		if (functionName != null && !functionName.accept(action))
-			return false;        
+			return false;
 
 		for (IASTInitializerClause arg : fArguments) {
 			if (!arg.accept(action))
@@ -151,7 +151,7 @@ public class CASTFunctionCallExpression extends ASTNode
 	public boolean isLValue() {
 		return false;
 	}
-	
+
 	@Override
 	public final ValueCategory getValueCategory() {
 		return ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionDefinition.java
index ff9606a9109..238d4ab048d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionDefinition.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionDefinition.java
@@ -33,7 +33,7 @@ public class CASTFunctionDefinition extends ASTNode implements IASTFunctionDefin
     private IASTFunctionDeclarator declarator;
     private IASTStatement bodyStatement;
     private ICFunctionScope scope;
-    
+
     public CASTFunctionDefinition() {
 	}
 
@@ -53,17 +53,17 @@ public class CASTFunctionDefinition extends ASTNode implements IASTFunctionDefin
 	public CASTFunctionDefinition copy(CopyStyle style) {
 		CASTFunctionDefinition copy = new CASTFunctionDefinition();
 		copy.setDeclSpecifier(declSpecifier == null ? null : declSpecifier.copy(style));
-		
+
 		if (declarator != null) {
 			IASTDeclarator outer = ASTQueries.findOutermostDeclarator(declarator);
 			outer = outer.copy(style);
 			copy.setDeclarator((IASTFunctionDeclarator) ASTQueries.findTypeRelevantDeclarator(outer));
-		}	
-		
+		}
+
 		copy.setBody(bodyStatement == null ? null : bodyStatement.copy(style));
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTDeclSpecifier getDeclSpecifier() {
         return declSpecifier;
@@ -126,12 +126,12 @@ public class CASTFunctionDefinition extends ASTNode implements IASTFunctionDefin
 	            default: break;
 	        }
 		}
-        
+
         if (declSpecifier != null && !declSpecifier.accept(action)) return false;
         final IASTDeclarator outerDtor= ASTQueries.findOutermostDeclarator(declarator);
         if (outerDtor != null && !outerDtor.accept(action)) return false;
         if (bodyStatement != null && !bodyStatement.accept(action)) return false;
-      
+
         if (action.shouldVisitDeclarations) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTGotoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTGotoStatement.java
index af6fc7d5465..798cf60d392 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTGotoStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTGotoStatement.java
@@ -40,7 +40,7 @@ public class CASTGotoStatement extends ASTAttributeOwner implements IASTGotoStat
 		CASTGotoStatement copy = new CASTGotoStatement(name == null ? null : name.copy(style));
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTName getName() {
         return this.name;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIdExpression.java
index 4b3c08cff9f..7f58df8f0e3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIdExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIdExpression.java
@@ -47,7 +47,7 @@ public class CASTIdExpression extends ASTNode implements IASTIdExpression, IASTC
 	public CASTIdExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTIdExpression copy(CopyStyle style) {
 		CASTIdExpression copy = new CASTIdExpression(name == null ? null : name.copy(style));
@@ -78,7 +78,7 @@ public class CASTIdExpression extends ASTNode implements IASTIdExpression, IASTC
 	            default: break;
 	        }
 		}
-      
+
         if (name != null && !name.accept(action)) return false;
 
         if (action.shouldVisitExpressions) {
@@ -96,13 +96,13 @@ public class CASTIdExpression extends ASTNode implements IASTIdExpression, IASTC
 		if (n == name) return r_reference;
 		return r_unclear;
 	}
-	
+
 	@Override
 	public IType getExpressionType() {
 		IBinding binding = getName().resolveBinding();
 		if (binding instanceof IVariable) {
 			return ((IVariable) binding).getType();
-		} 
+		}
 		if (binding instanceof IFunction) {
 			return ((IFunction) binding).getType();
 		}
@@ -114,12 +114,12 @@ public class CASTIdExpression extends ASTNode implements IASTIdExpression, IASTC
 		}
 		return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION);
 	}
-	
+
 	@Override
 	public boolean isLValue() {
 		return true;
 	}
-	
+
 	@Override
 	public final ValueCategory getValueCategory() {
 		return ValueCategory.LVALUE;
@@ -134,7 +134,7 @@ public class CASTIdExpression extends ASTNode implements IASTIdExpression, IASTC
 				bindings[i]= null;
 			}
 		}
-		
+
 		return ArrayUtil.removeNulls(IBinding.class, bindings);
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIfStatement.java
index 2926821e2c6..edac73b3f4c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIfStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIfStatement.java
@@ -28,10 +28,10 @@ public class CASTIfStatement extends ASTAttributeOwner implements IASTIfStatemen
     private IASTExpression condition;
     private IASTStatement thenClause;
     private IASTStatement elseClause;
-    
+
     public CASTIfStatement() {
 	}
-    
+
 	public CASTIfStatement(IASTExpression condition, IASTStatement thenClause) {
 		setConditionExpression(condition);
 		setThenClause(thenClause);
@@ -55,7 +55,7 @@ public class CASTIfStatement extends ASTAttributeOwner implements IASTIfStatemen
 		copy.setElseClause(elseClause == null ? null : elseClause.copy(style));
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTExpression getConditionExpression() {
         return condition;
@@ -118,7 +118,7 @@ public class CASTIfStatement extends ASTAttributeOwner implements IASTIfStatemen
     		if (action.shouldVisitStatements) {
     			switch (action.visit(stmt)) {
     			case ASTVisitor.PROCESS_ABORT: return false;
-    			case ASTVisitor.PROCESS_SKIP: 	
+    			case ASTVisitor.PROCESS_SKIP:
     				stmt= null;
     				break loop;
     			default: break;
@@ -169,7 +169,7 @@ public class CASTIfStatement extends ASTAttributeOwner implements IASTIfStatemen
         if (elseClause == child) {
             other.setParent(child.getParent());
             other.setPropertyInParent(child.getPropertyInParent());
-            elseClause = (IASTStatement) other;            
+            elseClause = (IASTStatement) other;
         }
         if (child == condition) {
             other.setPropertyInParent(child.getPropertyInParent());
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTInitializerList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTInitializerList.java
index 8b6c53a3923..aca8a8f3248 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTInitializerList.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTInitializerList.java
@@ -35,7 +35,7 @@ public class CASTInitializerList extends ASTNode implements IASTInitializerList,
 	public CASTInitializerList copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTInitializerList copy(CopyStyle style) {
 		CASTInitializerList copy = new CASTInitializerList();
@@ -45,7 +45,7 @@ public class CASTInitializerList extends ASTNode implements IASTInitializerList,
 		copy.actualSize = getSize();
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public int getSize() {
 		return actualSize;
@@ -65,10 +65,10 @@ public class CASTInitializerList extends ASTNode implements IASTInitializerList,
 		IASTInitializerClause[] clauses= getClauses();
 		if (clauses.length == 0)
 			return IASTInitializer.EMPTY_INITIALIZER_ARRAY;
-		
+
 		IASTInitializer[] inits= new IASTInitializer[clauses.length];
 		for (int i = 0; i < inits.length; i++) {
-			IASTInitializerClause clause= clauses[i]; 
+			IASTInitializerClause clause= clauses[i];
 			if (clause instanceof IASTInitializer) {
 				inits[i]= (IASTInitializer) clause;
 			} else if (clause instanceof IASTExpression) {
@@ -104,7 +104,7 @@ public class CASTInitializerList extends ASTNode implements IASTInitializerList,
         	addClause(null);
         }
     }
-    
+
     @Override
 	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitInitializers) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTKnRFunctionDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTKnRFunctionDeclarator.java
index cb9ef04648f..026b5ea3e8f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTKnRFunctionDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTKnRFunctionDeclarator.java
@@ -70,8 +70,8 @@ public class CASTKnRFunctionDeclarator extends CASTDeclarator implements ICASTKn
 	public void setParameterNames(IASTName[] names) {
         assertNotFrozen();
 		parameterNames = names;
-		if(names != null) {
-			for(IASTName name : names) {
+		if (names != null) {
+			for (IASTName name : names) {
 				if (name != null) {
 					name.setParent(this);
 					name.setPropertyInParent(PARAMETER_NAME);
@@ -89,14 +89,14 @@ public class CASTKnRFunctionDeclarator extends CASTDeclarator implements ICASTKn
 	public void setParameterDeclarations(IASTDeclaration[] decls) {
         assertNotFrozen();
 		parameterDeclarations = decls;
-		if(decls != null) {
-			for(IASTDeclaration decl : decls) {
+		if (decls != null) {
+			for (IASTDeclaration decl : decls) {
 				if (decl != null) {
 					decl.setParent(this);
 					decl.setPropertyInParent(FUNCTION_PARAMETER);
 				}
 			}
-		}	
+		}
 	}
 
 	@Override
@@ -120,7 +120,7 @@ public class CASTKnRFunctionDeclarator extends CASTDeclarator implements ICASTKn
 
 		return super.postAccept(action);
 	}
-	
+
 	@Override
 	public IASTDeclarator getDeclaratorForParameterName(IASTName name) {
 		boolean found= false;
@@ -130,7 +130,7 @@ public class CASTKnRFunctionDeclarator extends CASTDeclarator implements ICASTKn
 		}
 		if (!found)
 			return null;
-		
+
 		for (int i= 0; i < parameterDeclarations.length; i++) {
 			if (parameterDeclarations[i] instanceof IASTSimpleDeclaration) {
 				IASTDeclarator[] decltors = ((IASTSimpleDeclaration) parameterDeclarations[i]).getDeclarators();
@@ -140,10 +140,10 @@ public class CASTKnRFunctionDeclarator extends CASTDeclarator implements ICASTKn
 				}
 			}
 		}
-		
+
 		return null;
 	}
-	
+
 	@Override
 	public int getRoleForName(IASTName name) {
 		IASTName [] n = getParameterNames();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLabelStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLabelStatement.java
index 1b4985686c8..f278791d260 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLabelStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLabelStatement.java
@@ -26,7 +26,7 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
 public class CASTLabelStatement extends ASTAttributeOwner implements IASTLabelStatement, IASTAmbiguityParent {
     private IASTName name;
     private IASTStatement nestedStatement;
-    
+
     public CASTLabelStatement() {
 	}
 
@@ -34,7 +34,7 @@ public class CASTLabelStatement extends ASTAttributeOwner implements IASTLabelSt
 		setName(name);
 		setNestedStatement(nestedStatement);
 	}
-	
+
 	@Override
 	public CASTLabelStatement copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -93,7 +93,7 @@ public class CASTLabelStatement extends ASTAttributeOwner implements IASTLabelSt
 			return r_declaration;
 		return r_unclear;
 	}
-    
+
     @Override
 	public IASTStatement getNestedStatement() {
         return nestedStatement;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLiteralExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLiteralExpression.java
index ad9dbc64595..67cf91ed2c4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLiteralExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLiteralExpression.java
@@ -36,7 +36,7 @@ public class CASTLiteralExpression extends ASTNode implements IASTLiteralExpress
 		this.kind = kind;
 		this.value = value;
 	}
-	
+
 	@Override
 	public CASTLiteralExpression copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -69,7 +69,7 @@ public class CASTLiteralExpression extends ASTNode implements IASTLiteralExpress
         assertNotFrozen();
     	this.value= value;
     }
-    
+
     @Override
 	public String toString() {
         return new String(value);
@@ -90,7 +90,7 @@ public class CASTLiteralExpression extends ASTNode implements IASTLiteralExpress
 	            case ASTVisitor.PROCESS_SKIP: return true;
 	            default: break;
 	        }
-		}      
+		}
         return true;
     }
 
@@ -110,7 +110,7 @@ public class CASTLiteralExpression extends ASTNode implements IASTLiteralExpress
 		}
 		return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION);
 	}
-	
+
 	@Override
 	public boolean isLValue() {
 		return getKind() == IASTLiteralExpression.lk_string_literal;
@@ -143,7 +143,7 @@ public class CASTLiteralExpression extends ASTNode implements IASTLiteralExpress
 	private IType classifyTypeOfIntLiteral() {
 		int makelong= 0;
 		boolean unsigned= false;
-	
+
 		final char[] lit= getValue();
 		for (int i= lit.length - 1; i >= 0; i--) {
 			final char c= lit[i];
@@ -165,17 +165,17 @@ public class CASTLiteralExpression extends ASTNode implements IASTLiteralExpress
 		int flags= 0;
 		if (unsigned) {
 			flags |= IBasicType.IS_UNSIGNED;
-		} 
-		
+		}
+
 		if (makelong > 1) {
 			flags |= IBasicType.IS_LONG_LONG;
 		} else if (makelong == 1) {
 			flags |= IBasicType.IS_LONG;
-		} 
+		}
 		return new CBasicType(IBasicType.Kind.eInt, flags, this);
 	}
-	
-	
+
+
     /**
      * @deprecated, use {@link #setValue(char[])}, instead.
      */
@@ -185,7 +185,7 @@ public class CASTLiteralExpression extends ASTNode implements IASTLiteralExpress
         assertNotFrozen();
         this.value = value.toCharArray();
     }
-    
+
     /**
      * @deprecated use {@link #CASTLiteralExpression(int, char[])}, instead.
      */
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTName.java
index fa70b191849..04e9fe4e44b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTName.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTName.java
@@ -37,7 +37,7 @@ public class CASTName extends ASTNode implements IASTName, IASTCompletionContext
     private static final String EMPTY_STRING = ""; //$NON-NLS-1$
 
     private IBinding binding;
-    
+
     public CASTName(char[] name) {
         this.name = name;
     }
@@ -50,7 +50,7 @@ public class CASTName extends ASTNode implements IASTName, IASTCompletionContext
 	public CASTName copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-    
+
 	@Override
 	public CASTName copy(CopyStyle style) {
 		CASTName copy = new CASTName(name == null ? null : name.clone());
@@ -65,7 +65,7 @@ public class CASTName extends ASTNode implements IASTName, IASTCompletionContext
 
         return binding;
     }
-    
+
     @Override
 	public IBinding resolvePreBinding() {
     	return resolveBinding();
@@ -75,7 +75,7 @@ public class CASTName extends ASTNode implements IASTName, IASTCompletionContext
 	public IBinding getBinding() {
         return binding;
     }
-    
+
     @Override
 	public IBinding getPreBinding() {
         return binding;
@@ -117,7 +117,7 @@ public class CASTName extends ASTNode implements IASTName, IASTCompletionContext
 	public char[] getSimpleID() {
 		return name;
 	}
-	
+
 	@Override
 	public char[] getLookupKey() {
 		return name;
@@ -135,7 +135,7 @@ public class CASTName extends ASTNode implements IASTName, IASTCompletionContext
                 break;
             }
         }
-        
+
         if (action.shouldVisitNames) {
             switch (action.leave(this)) {
             case ASTVisitor.PROCESS_ABORT:
@@ -235,8 +235,8 @@ public class CASTName extends ASTNode implements IASTName, IASTCompletionContext
 		for (int i = 0; i < bindings.length; i++) {
 			if (bindings[i] instanceof ICompositeType) {
 				ICompositeType type = (ICompositeType) bindings[i];
-				
-				switch (type.getKey()) { 
+
+				switch (type.getKey()) {
 				case ICompositeType.k_struct:
 					if (kind != IASTElaboratedTypeSpecifier.k_struct) {
 						bindings[i] = null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTNullStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTNullStatement.java
index a4363d42811..9a1d232aac8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTNullStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTNullStatement.java
@@ -41,7 +41,7 @@ public class CASTNullStatement extends ASTAttributeOwner implements IASTNullStat
 		}
         return true;
     }
-    
+
     @Override
 	public CASTNullStatement copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTParameterDeclaration.java
index 833dc565e04..4f189918528 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTParameterDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTParameterDeclaration.java
@@ -24,7 +24,7 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
  * @author jcamelon
  */
 public class CASTParameterDeclaration extends ASTNode implements IASTParameterDeclaration, IASTAmbiguityParent {
-	
+
     private IASTDeclSpecifier declSpec;
     private IASTDeclarator declarator;
 
@@ -48,7 +48,7 @@ public class CASTParameterDeclaration extends ASTNode implements IASTParameterDe
 		copy.setDeclarator(declarator == null ? null : declarator.copy(style));
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTDeclSpecifier getDeclSpecifier() {
         return declSpec;
@@ -80,19 +80,19 @@ public class CASTParameterDeclaration extends ASTNode implements IASTParameterDe
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitParameterDeclarations ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitParameterDeclarations) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
-        
-        if( declSpec != null ) if( !declSpec.accept( action ) ) return false;
-        if( declarator != null ) if( !declarator.accept( action ) ) return false;    
-        if( action.shouldVisitParameterDeclarations ){
-		    switch( action.leave( this ) ){
+
+        if (declSpec != null) if (!declSpec.accept(action)) return false;
+        if (declarator != null) if (!declarator.accept(action)) return false;
+        if (action.shouldVisitParameterDeclarations) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTPointer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTPointer.java
index daa49c4c09e..ea7c6bb5649 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTPointer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTPointer.java
@@ -35,7 +35,7 @@ public class CASTPointer extends ASTAttributeOwner implements ICASTPointer {
 		copy.isConst = isConst;
 		return copy(copy, style);
 	}
-    
+
 	@Override
 	public boolean isRestrict() {
         return isRestrict;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemDeclaration.java
index 33d86a4db4e..37dd3059c38 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemDeclaration.java
@@ -39,7 +39,7 @@ public class CASTProblemDeclaration extends CASTProblemOwner implements IASTProb
 		CASTProblemDeclaration copy = new CASTProblemDeclaration();
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitDeclarations) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemExpression.java
index 50f723b93ab..1316e9ff931 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemExpression.java
@@ -39,7 +39,7 @@ public class CASTProblemExpression extends CASTProblemOwner implements IASTProbl
 		CASTProblemExpression copy = new CASTProblemExpression();
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitExpressions) {
@@ -61,7 +61,7 @@ public class CASTProblemExpression extends CASTProblemOwner implements IASTProbl
 		}
         return true;
     }
-    
+
     @Override
 	public IType getExpressionType() {
 		return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION);
@@ -71,7 +71,7 @@ public class CASTProblemExpression extends CASTProblemOwner implements IASTProbl
 	public boolean isLValue() {
 		return false;
 	}
-	
+
 	@Override
 	public ValueCategory getValueCategory() {
 		return ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemOwner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemOwner.java
index 7f98dc116b8..7a0a0b47668 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemOwner.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemOwner.java
@@ -33,12 +33,12 @@ abstract class CASTProblemOwner extends ASTNode implements IASTProblemHolder {
 		copy.setProblem(problem == null ? null : problem.copy(style));
 		return super.copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTProblem getProblem() {
         return problem;
     }
-    
+
     @Override
 	public void setProblem(IASTProblem p) {
         assertNotFrozen();
@@ -48,9 +48,9 @@ abstract class CASTProblemOwner extends ASTNode implements IASTProblemHolder {
 			p.setPropertyInParent(PROBLEM);
 		}
     }
-    
+
 	@Override
-	public boolean accept(ASTVisitor action){
+	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitProblems) {
 		    switch (action.visit(getProblem())) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemStatement.java
index 1cd8b355099..0dbcc819731 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemStatement.java
@@ -42,7 +42,7 @@ public class CASTProblemStatement extends CASTProblemOwner implements IASTProble
 		CASTProblemStatement copy = new CASTProblemStatement();
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitStatements) {
@@ -54,7 +54,7 @@ public class CASTProblemStatement extends CASTProblemOwner implements IASTProble
 		}
 
         super.accept(action);	// visits the problem
-        
+
         if (action.shouldVisitStatements) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTReturnStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTReturnStatement.java
index 54c85c01829..78b3cab2d76 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTReturnStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTReturnStatement.java
@@ -30,7 +30,7 @@ public class CASTReturnStatement extends ASTAttributeOwner implements IASTReturn
 	public CASTReturnStatement(IASTExpression retValue) {
 		setReturnValue(retValue);
 	}
-	
+
 	@Override
 	public CASTReturnStatement copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclSpecifier.java
index edaae42e59a..24b0dd5fb2f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclSpecifier.java
@@ -33,7 +33,7 @@ public class CASTSimpleDeclSpecifier extends CASTBaseDeclSpecifier implements IC
 	public CASTSimpleDeclSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-    
+
 	@Override
 	public CASTSimpleDeclSpecifier copy(CopyStyle style) {
 		CASTSimpleDeclSpecifier copy = new CASTSimpleDeclSpecifier();
@@ -54,7 +54,7 @@ public class CASTSimpleDeclSpecifier extends CASTBaseDeclSpecifier implements IC
 			copy.setDeclTypeExpression(fDeclTypeExpression.copy(style));
     	return super.copy(copy, style);
     }
-    
+
     @Override
 	public int getType() {
         return simpleType;
@@ -79,18 +79,18 @@ public class CASTSimpleDeclSpecifier extends CASTBaseDeclSpecifier implements IC
 	public boolean isLong() {
         return isLong;
     }
-    
+
     @Override
 	public void setType(int type) {
         assertNotFrozen();
         simpleType = type;
     }
-    
+
     @Override
 	public void setType(Kind kind) {
     	setType(getType(kind));
     }
-    
+
     private int getType(Kind kind) {
     	switch (kind) {
     	case eBoolean:
@@ -126,25 +126,25 @@ public class CASTSimpleDeclSpecifier extends CASTBaseDeclSpecifier implements IC
     	}
     	return t_unspecified;
     }
-    
+
     @Override
 	public void setShort(boolean value) {
         assertNotFrozen();
         isShort = value;
     }
-    
+
     @Override
 	public void setLong(boolean value) {
         assertNotFrozen();
         isLong = value;
     }
-    
+
     @Override
 	public void setUnsigned(boolean value) {
         assertNotFrozen();
         isUnsigned = value;
     }
-    
+
     @Override
 	public void setSigned(boolean value) {
         assertNotFrozen();
@@ -163,24 +163,24 @@ public class CASTSimpleDeclSpecifier extends CASTBaseDeclSpecifier implements IC
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitDeclSpecifiers ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitDeclSpecifiers) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
-        
+
         if (!visitAlignmentSpecifiers(action)) {
         	return false;
         }
 
         if (fDeclTypeExpression != null && !fDeclTypeExpression.accept(action))
 			return false;
-        
-        if( action.shouldVisitDeclSpecifiers ){
-		    switch( action.leave( this ) ){
+
+        if (action.shouldVisitDeclSpecifiers) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
@@ -208,7 +208,7 @@ public class CASTSimpleDeclSpecifier extends CASTBaseDeclSpecifier implements IC
 	@Override
 	public void setImaginary(boolean value) {
         assertNotFrozen();
-		this.imaginary = value;		
+		this.imaginary = value;
 	}
 
 	@Override
@@ -225,7 +225,7 @@ public class CASTSimpleDeclSpecifier extends CASTBaseDeclSpecifier implements IC
         	expression.setParent(this);
         }
 	}
-	
+
 	@Override
 	public void replace(IASTNode child, IASTNode other) {
 		if (child == fDeclTypeExpression) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclaration.java
index e3236a328b0..2ea49b63695 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclaration.java
@@ -51,7 +51,7 @@ public class CASTSimpleDeclaration extends ASTAttributeOwner implements IASTSimp
 		}
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTDeclSpecifier getDeclSpecifier() {
         return declSpecifier;
@@ -64,17 +64,17 @@ public class CASTSimpleDeclaration extends ASTAttributeOwner implements IASTSimp
         declarators = ArrayUtil.trimAt(IASTDeclarator.class, declarators, declaratorsPos);
         return declarators;
     }
-    
+
     @Override
 	public void addDeclarator(IASTDeclarator d) {
         assertNotFrozen();
     	if (d != null) {
     		d.setParent(this);
 			d.setPropertyInParent(DECLARATOR);
-    		declarators = ArrayUtil.appendAt(IASTDeclarator.class, declarators, ++declaratorsPos, d);    		
+    		declarators = ArrayUtil.appendAt(IASTDeclarator.class, declarators, ++declaratorsPos, d);
     	}
     }
-    
+
     @Override
 	public void setDeclSpecifier(IASTDeclSpecifier declSpecifier) {
         assertNotFrozen();
@@ -84,7 +84,7 @@ public class CASTSimpleDeclaration extends ASTAttributeOwner implements IASTSimp
 			declSpecifier.setPropertyInParent(DECL_SPECIFIER);
 		}
     }
-    
+
     @Override
 	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitDeclarations) {
@@ -103,7 +103,7 @@ public class CASTSimpleDeclaration extends ASTAttributeOwner implements IASTSimp
             if (!dtors[i].accept(action))
             	return false;
         }
-        
+
         if (action.shouldVisitDeclarations) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -113,7 +113,7 @@ public class CASTSimpleDeclaration extends ASTAttributeOwner implements IASTSimp
 		}
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
     	if (declSpecifier == child) {
@@ -124,7 +124,7 @@ public class CASTSimpleDeclaration extends ASTAttributeOwner implements IASTSimp
     		IASTDeclarator[] declarators = getDeclarators();
     		for (int i = 0; i < declarators.length; i++) {
     			if (declarators[i] == child) {
-    				declarators[i] = (IASTDeclarator)other;
+    				declarators[i] = (IASTDeclarator) other;
     				other.setParent(child.getParent());
     				other.setPropertyInParent(child.getPropertyInParent());
     				break;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSwitchStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSwitchStatement.java
index b84f6418cf6..9500e9caa6d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSwitchStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSwitchStatement.java
@@ -35,7 +35,7 @@ public class CASTSwitchStatement extends ASTAttributeOwner
 		setControllerExpression(controller);
 		setBody(body);
 	}
-	
+
 	@Override
 	public CASTSwitchStatement copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTranslationUnit.java
index 08da101fa82..7f510904e9e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTranslationUnit.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTranslationUnit.java
@@ -40,12 +40,12 @@ public class CASTTranslationUnit extends ASTTranslationUnit implements IASTAmbig
 	public CASTTranslationUnit() {
 		fStructMapper= new CStructMapper(this);
 	}
-	
+
 	@Override
 	public CASTTranslationUnit copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTTranslationUnit copy(CopyStyle style) {
 		CASTTranslationUnit copy = new CASTTranslationUnit();
@@ -68,7 +68,7 @@ public class CASTTranslationUnit extends ASTTranslationUnit implements IASTAmbig
 	}
 
     @Override
-	public IASTName[] getDefinitionsInAST(IBinding binding) {   
+	public IASTName[] getDefinitionsInAST(IBinding binding) {
 		if (binding instanceof IMacroBinding) {
 			return getMacroDefinitionsInAST((IMacroBinding) binding);
         }
@@ -80,7 +80,7 @@ public class CASTTranslationUnit extends ASTTranslationUnit implements IASTAmbig
     	// nulls can be anywhere, don't use trim()
     	return ArrayUtil.removeNulls(IASTName.class, names);
     }
-    
+
 	@Override
 	public IASTName[] getReferences(IBinding binding) {
         if (binding instanceof IMacroBinding)
@@ -101,7 +101,7 @@ public class CASTTranslationUnit extends ASTTranslationUnit implements IASTAmbig
 
 	@Override
 	public void resolveAmbiguities() {
-		accept(new CASTAmbiguityResolver()); 
+		accept(new CASTAmbiguityResolver());
 	}
 
 	@Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeId.java
index 1d4474f208d..7515a4590dc 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeId.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeId.java
@@ -31,7 +31,7 @@ public class CASTTypeId extends ASTNode implements IASTTypeId {
 		setDeclSpecifier(declSpecifier);
 		setAbstractDeclarator(declarator);
 	}
-	
+
 	@Override
 	public CASTTypeId copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -84,7 +84,7 @@ public class CASTTypeId extends ASTNode implements IASTTypeId {
 	            default: break;
 	        }
 		}
-        
+
         if (declSpecifier != null && !declSpecifier.accept(action)) return false;
         if (declarator != null && !declarator.accept(action)) return false;
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdExpression.java
index f4f5ea3ff3b..84db7e8ceec 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdExpression.java
@@ -33,7 +33,7 @@ public class CASTTypeIdExpression extends ASTNode implements IASTTypeIdExpressio
 		this.op = op;
 		setTypeId(typeId);
 	}
-	
+
 	@Override
 	public CASTTypeIdExpression copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -73,19 +73,19 @@ public class CASTTypeIdExpression extends ASTNode implements IASTTypeIdExpressio
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitExpressions ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitExpressions) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
-      
-        if( typeId != null ) if( !typeId.accept( action ) ) return false;
 
-        if( action.shouldVisitExpressions ){
-		    switch( action.leave( this ) ){
+        if (typeId != null) if (!typeId.accept(action)) return false;
+
+        if (action.shouldVisitExpressions) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
@@ -93,7 +93,7 @@ public class CASTTypeIdExpression extends ASTNode implements IASTTypeIdExpressio
 		}
         return true;
     }
-    
+
     @Override
 	public IType getExpressionType() {
     	if (getOperator() == op_sizeof) {
@@ -106,7 +106,7 @@ public class CASTTypeIdExpression extends ASTNode implements IASTTypeIdExpressio
 	public boolean isLValue() {
 		return false;
 	}
-	
+
 	@Override
 	public ValueCategory getValueCategory() {
 		return ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdInitializerExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdInitializerExpression.java
index a50af448471..509fcf78b08 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdInitializerExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdInitializerExpression.java
@@ -74,7 +74,7 @@ public class CASTTypeIdInitializerExpression extends ASTNode implements ICASTTyp
 	            default: break;
 	        }
 		}
-        
+
         if (fTypeId != null && !fTypeId.accept(action)) return false;
         if (fInitializer != null && !fInitializer.accept(action)) return false;
 
@@ -92,7 +92,7 @@ public class CASTTypeIdInitializerExpression extends ASTNode implements ICASTTyp
 	public final boolean isLValue() {
 		return false;
 	}
-	
+
 	@Override
 	public ValueCategory getValueCategory() {
 		return ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypedefNameSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypedefNameSpecifier.java
index 811c3bd0557..40427482f93 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypedefNameSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypedefNameSpecifier.java
@@ -39,7 +39,7 @@ public class CASTTypedefNameSpecifier extends CASTBaseDeclSpecifier
 	public CASTTypedefNameSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTTypedefNameSpecifier copy(CopyStyle style) {
 		CASTTypedefNameSpecifier copy =
@@ -51,7 +51,7 @@ public class CASTTypedefNameSpecifier extends CASTBaseDeclSpecifier
 	public IASTName getName() {
         return name;
     }
-   
+
     @Override
 	public void setName(IASTName name) {
         assertNotFrozen();
@@ -102,7 +102,7 @@ public class CASTTypedefNameSpecifier extends CASTBaseDeclSpecifier
 				bindings[i]= null;
 			}
 		}
-		
+
 		return ArrayUtil.removeNulls(IBinding.class, bindings);
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTUnaryExpression.java
index 50c50111dcf..f15596cfc31 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTUnaryExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTUnaryExpression.java
@@ -32,7 +32,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
 public class CASTUnaryExpression extends ASTNode implements IASTUnaryExpression, IASTAmbiguityParent {
     private int operator;
     private IASTExpression operand;
-    
+
     public CASTUnaryExpression() {
 	}
 
@@ -45,7 +45,7 @@ public class CASTUnaryExpression extends ASTNode implements IASTUnaryExpression,
 	public CASTUnaryExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTUnaryExpression copy(CopyStyle style) {
 		CASTUnaryExpression copy =
@@ -88,7 +88,7 @@ public class CASTUnaryExpression extends ASTNode implements IASTUnaryExpression,
 	            default: break;
 	        }
 		}
-      
+
         if (operand != null && !operand.accept(action)) return false;
 
         if (action.shouldVisitExpressions) {
@@ -100,7 +100,7 @@ public class CASTUnaryExpression extends ASTNode implements IASTUnaryExpression,
 		}
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
         if (child == operand) {
@@ -109,7 +109,7 @@ public class CASTUnaryExpression extends ASTNode implements IASTUnaryExpression,
             operand = (IASTExpression) other;
         }
     }
-    
+
 	@Override
 	public IType getExpressionType() {
 		int op = getOperator();
@@ -151,7 +151,7 @@ public class CASTUnaryExpression extends ASTNode implements IASTUnaryExpression,
 			return false;
 		}
 	}
-	
+
 	@Override
 	public final ValueCategory getValueCategory() {
 		return isLValue() ? ValueCategory.LVALUE : ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTWhileStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTWhileStatement.java
index 5165aa7d350..19f83ee7188 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTWhileStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTWhileStatement.java
@@ -40,7 +40,7 @@ public class CASTWhileStatement extends ASTAttributeOwner
 	public CASTWhileStatement copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CASTWhileStatement copy(CopyStyle style) {
 		CASTWhileStatement copy = new CASTWhileStatement();
@@ -78,7 +78,7 @@ public class CASTWhileStatement extends ASTAttributeOwner
 			body.setPropertyInParent(BODY);
 		}
     }
-    
+
     @Override
 	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitStatements) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArithmeticConversion.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArithmeticConversion.java
index 7e0ed61a7a2..f16bb7231c4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArithmeticConversion.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArithmeticConversion.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *    Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
 import org.eclipse.cdt.core.dom.ast.IBasicType;
@@ -17,7 +17,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ArithmeticConversion;
 
 public class CArithmeticConversion extends ArithmeticConversion {
 	private static CArithmeticConversion sInstance= new CArithmeticConversion();
-	
+
 	public static IType convertCOperandTypes(int operator, IType t1, IType t2) {
 		return sInstance.convertOperandTypes(operator, t1, t2);
 	}
@@ -27,7 +27,7 @@ public class CArithmeticConversion extends ArithmeticConversion {
 	}
 
 	private CArithmeticConversion() {}
-	
+
 	@Override
 	protected IBasicType createBasicType(Kind kind, int modifiers) {
 		return new CBasicType(kind, modifiers);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArrayType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArrayType.java
index 7550b418eec..2b89b19ba15 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArrayType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArrayType.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Devin Steffler (IBM Corporation) - initial API and implementation
  *     Sergey Prigogin (Google)
@@ -36,7 +36,7 @@ public class CArrayType implements ICArrayType, ITypeContainer, ISerializableTyp
     private boolean isRestrict;
     private boolean isStatic;
 	private boolean isVariableSized;
-	
+
 	public CArrayType(IType type) {
 		this.type = type;
 	}
@@ -48,7 +48,7 @@ public class CArrayType implements ICArrayType, ITypeContainer, ISerializableTyp
 		this.isRestrict= isRestrict;
 		this.value= size;
 	}
-	
+
 	public void setIsStatic(boolean val) {
 		isStatic= val;
 	}
@@ -74,7 +74,7 @@ public class CArrayType implements ICArrayType, ITypeContainer, ISerializableTyp
         }
     	return false;
     }
-    
+
 	private boolean hasSameSize(IArrayType rhs) {
 		IValue s1 = getSize();
 		IValue s2 = rhs.getSize();
@@ -89,12 +89,12 @@ public class CArrayType implements ICArrayType, ITypeContainer, ISerializableTyp
 	public IType getType() {
 		return type;
 	}
-	
+
 	@Override
 	public void setType(IType t) {
 	    this.type = t;
 	}
-	
+
 	public void setModifier(ICASTArrayModifier mod) {
 		isConst= mod.isConst();
 		isVolatile= mod.isVolatile();
@@ -133,7 +133,7 @@ public class CArrayType implements ICArrayType, ITypeContainer, ISerializableTyp
 	public IValue getSize() {
     	if (value != IntegralValue.NOT_INITIALIZED)
     		return value;
-    	
+
     	if (sizeExpression == null)
     		return value= null;
 
@@ -181,7 +181,7 @@ public class CArrayType implements ICArrayType, ITypeContainer, ISerializableTyp
 				nval= num.longValue();
 				if (nval >= 0) {
 					firstBytes |= ITypeMarshalBuffer.FLAG7;
-				} 
+				}
 			}
 		}
 		buffer.putShort(firstBytes);
@@ -200,16 +200,16 @@ public class CArrayType implements ICArrayType, ITypeContainer, ISerializableTyp
 		} else if ((firstBytes & ITypeMarshalBuffer.FLAG6) != 0) {
 			value = buffer.unmarshalValue();
 		}
-		IType nested= buffer.unmarshalType();		
-		CArrayType result= new CArrayType(nested, 
-				(firstBytes & ITypeMarshalBuffer.FLAG1) != 0, 
-				(firstBytes & ITypeMarshalBuffer.FLAG2) != 0, 
+		IType nested= buffer.unmarshalType();
+		CArrayType result= new CArrayType(nested,
+				(firstBytes & ITypeMarshalBuffer.FLAG1) != 0,
+				(firstBytes & ITypeMarshalBuffer.FLAG2) != 0,
 				(firstBytes & ITypeMarshalBuffer.FLAG3) != 0, value);
 		result.setIsStatic((firstBytes & ITypeMarshalBuffer.FLAG4) != 0);
 		result.setIsVariableLength((firstBytes & ITypeMarshalBuffer.FLAG5) != 0);
 		return result;
 	}
-	
+
 	@Override
 	@Deprecated
     public IASTExpression getArraySizeExpression() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBasicType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBasicType.java
index f57f2d7cfc4..0e0a41b64e6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBasicType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBasicType.java
@@ -4,9 +4,9 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
- *     Devin Steffler (IBM Rational Software) - Initial API and implementation 
+ *     Devin Steffler (IBM Rational Software) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
@@ -25,11 +25,11 @@ import org.eclipse.core.runtime.CoreException;
 public class CBasicType implements ICBasicType, ISerializableType {
 	public static final CBasicType VOID = new CBasicType(Kind.eVoid, 0, null);
 	public static final CBasicType INT = new CBasicType(Kind.eInt, 0, null);
-	
+
 	private final Kind fKind;
 	private int fModifiers;
 	private IASTExpression value;
-	
+
 	public CBasicType(Kind kind, int modifiers, IASTExpression value) {
 		if (kind == Kind.eUnspecified) {
 			if ((modifiers & (IS_COMPLEX | IS_IMAGINARY)) != 0) {
@@ -47,11 +47,11 @@ public class CBasicType implements ICBasicType, ISerializableType {
 	public CBasicType(Kind kind, int modifiers) {
 		this(kind, modifiers, null);
 	}
-	
+
 	public CBasicType(ICASTSimpleDeclSpecifier sds) {
 		this (getKind(sds), getQualifiers(sds), null);
 	}
-	
+
 	private static int getQualifiers(ICASTSimpleDeclSpecifier sds) {
 		return (sds.isLong() ? IS_LONG  : 0) |
 				(sds.isShort() ? IS_SHORT : 0) |
@@ -61,7 +61,7 @@ public class CBasicType implements ICBasicType, ISerializableType {
 				(sds.isComplex() ? IS_COMPLEX : 0) |
 				(sds.isImaginary() ? IS_IMAGINARY : 0);
 	}
-	
+
 	private static Kind getKind(ICASTSimpleDeclSpecifier sds) {
 		// Note: when adding a new kind, marshal() and unnmarshal() may need to be revised.
 		switch (sds.getType()) {
@@ -96,7 +96,7 @@ public class CBasicType implements ICBasicType, ISerializableType {
 	public Kind getKind() {
 		return fKind;
 	}
-	
+
 	@Override
 	public int getModifiers() {
 		return fModifiers;
@@ -133,15 +133,15 @@ public class CBasicType implements ICBasicType, ISerializableType {
 			return true;
 		if (obj instanceof ITypedef)
 			return obj.isSameType(this);
-	    
+
 		if (!(obj instanceof ICBasicType))
 			return false;
-		
-		ICBasicType cObj = (ICBasicType)obj;
-		
+
+		ICBasicType cObj = (ICBasicType) obj;
+
 		if (fKind != cObj.getKind())
 			return false;
-		
+
 		if (fKind == Kind.eInt) {
 			// Signed int and int are equivalent
 			return (fModifiers & ~IS_SIGNED) == (cObj.getModifiers() & ~IS_SIGNED);
@@ -149,7 +149,7 @@ public class CBasicType implements ICBasicType, ISerializableType {
 			return (fModifiers == cObj.getModifiers());
 		}
 	}
-	
+
     @Override
 	public Object clone() {
         IType t = null;
@@ -166,7 +166,7 @@ public class CBasicType implements ICBasicType, ISerializableType {
 	public IASTExpression getValue() {
 		return value;
 	}
-	
+
 	@Override
 	public boolean isComplex() {
 		return (fModifiers & IS_COMPLEX) != 0;
@@ -187,16 +187,16 @@ public class CBasicType implements ICBasicType, ISerializableType {
 		} else {
 			buffer.putShort((short) (ITypeMarshalBuffer.BASIC_TYPE | shiftedKind | ITypeMarshalBuffer.LAST_FLAG));
 			buffer.putByte((byte) modifiers);
-		} 
+		}
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		final boolean haveModifiers= (firstBytes & ITypeMarshalBuffer.LAST_FLAG) != 0;
 		int modifiers= 0;
 		int kind= (firstBytes & (ITypeMarshalBuffer.LAST_FLAG-1))/ITypeMarshalBuffer.FIRST_FLAG;
 		if (haveModifiers) {
 			modifiers= buffer.getByte();
-		} 
+		}
 		return new CBasicType(Kind.values()[kind], modifiers);
 	}
 
@@ -232,7 +232,7 @@ public class CBasicType implements ICBasicType, ISerializableType {
 		}
 		return t_unspecified;
 	}
-	
+
 	@Override
 	public String toString() {
 		return ASTTypeUtil.getType(this);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinParameter.java
index b158a541d9a..8af98011410 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinParameter.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *    Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
 import org.eclipse.cdt.core.dom.ILinkage;
@@ -23,7 +23,7 @@ import org.eclipse.cdt.internal.core.dom.Linkage;
 import org.eclipse.core.runtime.PlatformObject;
 
 public class CBuiltinParameter extends PlatformObject implements IParameter {
-	
+
 	public static IParameter[] createParameterList(IFunctionType ft) {
 		if (ft == null) {
 			return IParameter.EMPTY_PARAMETER_ARRAY;
@@ -38,11 +38,11 @@ public class CBuiltinParameter extends PlatformObject implements IParameter {
 	}
 
 	private IType type= null;
-	
+
 	public CBuiltinParameter(IType type) {
 		this.type = type;
 	}
-	
+
 	@Override
 	public IType getType() {
 		return type;
@@ -87,7 +87,7 @@ public class CBuiltinParameter extends PlatformObject implements IParameter {
 	public ILinkage getLinkage() {
 		return Linkage.C_LINKAGE;
 	}
-	
+
 	@Override
 	public IBinding getOwner() {
 		return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinVariable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinVariable.java
index e7eebbfed0b..06c8f119fe8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinVariable.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinVariable.java
@@ -18,21 +18,21 @@ import org.eclipse.cdt.core.dom.ast.IType;
 /**
  * Used to represent built-in variables that exist on the translation
  * unit but are not actually part of the physical AST created by CDT.
- * 
+ *
  * An example is the built-in variable __func__.
  */
 public class CBuiltinVariable extends CVariable {
     private IType type=null;
     private char[] name=null;
     private IScope scope=null;
-    
+
     public CBuiltinVariable(IType type, char[] name, IScope scope) {
         super(null);
         this.type = type;
         this.name = name;
         this.scope = scope;
     }
-    
+
     @Override
 	public IType getType() {
         return type;
@@ -42,17 +42,17 @@ public class CBuiltinVariable extends CVariable {
 	public String getName() {
         return String.valueOf(name);
     }
-    
+
     @Override
 	public char[] getNameCharArray() {
         return name;
     }
-    
+
     @Override
 	public IScope getScope() {
         return scope;
     }
-            
+
     /**
      * returns null
      */
@@ -60,7 +60,7 @@ public class CBuiltinVariable extends CVariable {
 	public IASTNode[] getDeclarations() {
         return null;
     }
-    
+
     /**
      * returns null
      */
@@ -68,7 +68,7 @@ public class CBuiltinVariable extends CVariable {
 	public IASTNode getDefinition() {
         return null;
     }
-        
+
 
 	@Override
 	public IBinding getOwner() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CCompositeTypeScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CCompositeTypeScope.java
index 76445da8287..2f4e811714b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CCompositeTypeScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CCompositeTypeScope.java
@@ -45,7 +45,7 @@ public class CCompositeTypeScope extends CScope implements ICCompositeTypeScope
 	public IBinding[] find(String name) {
         CollectNamesAction action = new CollectNamesAction(name.toCharArray());
         getPhysicalNode().accept(action);
-        
+
         IASTName[] names = action.getNames();
         IBinding[] result = null;
         for (IASTName astName : names) {
@@ -57,7 +57,7 @@ public class CCompositeTypeScope extends CScope implements ICCompositeTypeScope
             } catch (DOMException e) {
             }
         }
-            
+
         return ArrayUtil.trim(IBinding.class, result);
     }
 
@@ -70,7 +70,7 @@ public class CCompositeTypeScope extends CScope implements ICCompositeTypeScope
 
 		return new CStructure.CStructureProblem(compSpec.getName(), ISemanticProblem.BINDING_NO_CLASS, compSpec.getName().toCharArray());
 	}
-	
+
 	@Override
 	protected void doPopulateCache() {
 		ICASTCompositeTypeSpecifier compSpec = (ICASTCompositeTypeSpecifier) getPhysicalNode();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumeration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumeration.java
index 3100f43b489..36badfadba7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumeration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumeration.java
@@ -49,14 +49,14 @@ public class CEnumeration extends PlatformObject implements IEnumeration, ICInte
             definition = enumeration;
         enumeration.setBinding(this);
 	}
-	
+
 	public void addDeclaration(IASTName decl) {
 		if (!decl.isActive())
 			return;
-    	
+
         if (decl.getPropertyInParent() != IASTElaboratedTypeSpecifier.TYPE_NAME)
             return;
-            
+
         decl.setBinding(this);
         if (declarations == null) {
             declarations = new IASTName[] { decl };
@@ -73,26 +73,26 @@ public class CEnumeration extends PlatformObject implements IEnumeration, ICInte
         tmp[declarations.length] = decl;
         declarations = tmp;
     }
-    
+
     @Override
 	public IASTNode getPhysicalNode() {
         if (definition != null)
             return definition;
-        
+
         return declarations[0];
     }
-    
+
 	private void checkForDefinition() {
 		IASTDeclSpecifier spec = CVisitor.findDefinition((ICASTElaboratedTypeSpecifier) declarations[0].getParent());
 		if (spec != null && spec instanceof ICASTEnumerationSpecifier) {
 		    ICASTEnumerationSpecifier enumSpec = (ICASTEnumerationSpecifier) spec;
-		    
+
 			enumSpec.getName().setBinding(this);
 			definition = enumSpec.getName();
 		}
 		return;
 	}
-	
+
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
      */
@@ -100,14 +100,14 @@ public class CEnumeration extends PlatformObject implements IEnumeration, ICInte
 	public String getName() {
         if (definition != null)
             return definition.toString();
-        
+
         return declarations[0].toString();
     }
     @Override
 	public char[] getNameCharArray() {
         if (definition != null)
             return definition.toCharArray();
-        
+
         return declarations[0].toCharArray();
     }
 
@@ -140,11 +140,11 @@ public class CEnumeration extends PlatformObject implements IEnumeration, ICInte
             if (definition == null)
                 return new IEnumerator[] { new CEnumerator.CEnumeratorProblem(declarations[0], IProblemBinding.SEMANTIC_DEFINITION_NOT_FOUND, declarations[0].toCharArray()) };
         }
-        
+
         IASTEnumerationSpecifier enumSpec = (IASTEnumerationSpecifier) definition.getParent();
         IASTEnumerationSpecifier.IASTEnumerator[] enums = enumSpec.getEnumerators();
         IEnumerator[] bindings = new IEnumerator[enums.length];
-        
+
         for (int i = 0; i < enums.length; i++) {
             bindings[i] = (IEnumerator) enums[i].getName().resolveBinding();
         }
@@ -168,7 +168,7 @@ public class CEnumeration extends PlatformObject implements IEnumeration, ICInte
 
         return false;
     }
-    
+
 	@Override
 	public ILinkage getLinkage() {
 		return Linkage.C_LINKAGE;
@@ -183,7 +183,7 @@ public class CEnumeration extends PlatformObject implements IEnumeration, ICInte
 	public IASTNode getDefinition() {
 		return definition;
 	}
-	
+
 	@Override
 	public IBinding getOwner() {
 		IASTNode node= definition;
@@ -198,7 +198,7 @@ public class CEnumeration extends PlatformObject implements IEnumeration, ICInte
 	public String toString() {
 		return getName();
 	}
-	
+
 	@Override
 	public long getMinValue() {
 		if (fMinValue != null)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumerator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumerator.java
index 7626a524755..a5abefcabe6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumerator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumerator.java
@@ -47,7 +47,7 @@ public class CEnumerator extends PlatformObject implements IEnumerator {
 		this.enumeratorName = enumtor.getName();
 		enumeratorName.setBinding(this);
 	}
-    
+
     public IASTNode getPhysicalNode() {
         return enumeratorName;
     }
@@ -96,9 +96,9 @@ public class CEnumerator extends PlatformObject implements IEnumerator {
 	@Override
 	public IValue getValue() {
 		IASTNode parent= enumeratorName.getParent();
-		if (parent instanceof ASTEnumerator) 
+		if (parent instanceof ASTEnumerator)
 			return ((ASTEnumerator) parent).getIntegralValue();
-		
+
 		return IntegralValue.UNKNOWN;
 	}
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CExternalFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CExternalFunction.java
index 5105375f525..089975f1e41 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CExternalFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CExternalFunction.java
@@ -29,7 +29,7 @@ public class CExternalFunction extends CFunction implements ICExternalBinding {
 
 	private IASTName name;
     private IASTTranslationUnit tu;
-    
+
     public CExternalFunction(IASTTranslationUnit tu, IASTName name) {
     	super(null);
         this.name = name;
@@ -48,7 +48,7 @@ public class CExternalFunction extends CFunction implements ICExternalBinding {
 		}
 		return type;
 	}
-    
+
     @Override
 	public IParameter[] getParameters() {
     	return IParameter.EMPTY_PARAMETER_ARRAY;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CField.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CField.java
index 43176a00431..ec1909d7781 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CField.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CField.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    Andrew Niefer (IBM Rational Software) - Initial API and implementation 
+ *    Andrew Niefer (IBM Rational Software) - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunction.java
index 265df070b1a..66f5668cb76 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunction.java
@@ -266,7 +266,7 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
     	IASTParameterDeclaration temp = null;
     	if (definition != null) {
     	    if (definition instanceof IASTStandardFunctionDeclarator) {
-    	    	IASTParameterDeclaration[] parameters = ((IASTStandardFunctionDeclarator)definition).getParameters();
+    	    	IASTParameterDeclaration[] parameters = ((IASTStandardFunctionDeclarator) definition).getParameters();
     	    	if (parameters.length > idx) {
 	    	        temp = parameters[idx];
 	    	        ASTQueries.findInnermostDeclarator(temp.getDeclarator()).getName().setBinding(binding);
@@ -354,9 +354,9 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
 
 	            IASTDeclSpecifier declSpec = null;
 	            if (parent instanceof IASTSimpleDeclaration) {
-	                declSpec = ((IASTSimpleDeclaration)parent).getDeclSpecifier();
+	                declSpec = ((IASTSimpleDeclaration) parent).getDeclSpecifier();
 	            } else if (parent instanceof IASTFunctionDefinition)
-	                declSpec = ((IASTFunctionDefinition)parent).getDeclSpecifier();
+	                declSpec = ((IASTFunctionDefinition) parent).getDeclSpecifier();
 
 	            if (declSpec != null && declSpec.getStorageClass() == storage) {
 	            	return true;
@@ -417,9 +417,9 @@ public class CFunction extends PlatformObject implements IFunction, ICInternalFu
 
 	            IASTDeclSpecifier declSpec = null;
 	            if (parent instanceof IASTSimpleDeclaration) {
-	                declSpec = ((IASTSimpleDeclaration)parent).getDeclSpecifier();
+	                declSpec = ((IASTSimpleDeclaration) parent).getDeclSpecifier();
 	            } else if (parent instanceof IASTFunctionDefinition) {
-	                declSpec = ((IASTFunctionDefinition)parent).getDeclSpecifier();
+	                declSpec = ((IASTFunctionDefinition) parent).getDeclSpecifier();
 	            }
 
 	            if (declSpec != null && declSpec.isInline())
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionScope.java
index f03a9e64d71..07e62c0026e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionScope.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    Andrew Niefer (IBM Rational Software) - Initial API and implementation 
+ *    Andrew Niefer (IBM Rational Software) - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
@@ -23,7 +23,7 @@ public class CFunctionScope extends CScope implements ICFunctionScope {
 	public CFunctionScope(IASTFunctionDefinition function) {
 	    super(function, EScopeKind.eLocal);
 	}
-	
+
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.dom.ast.c.ICFunctionScope#getBinding(char[])
      */
@@ -32,11 +32,11 @@ public class CFunctionScope extends CScope implements ICFunctionScope {
         return super.getBinding(NAMESPACE_TYPE_OTHER, name);
     }
 
-    
+
 	@Override
 	public IScope getBodyScope() {
 	    IASTNode node = getPhysicalNode();
-	    IASTStatement statement = ((IASTFunctionDefinition)node).getBody();
+	    IASTStatement statement = ((IASTFunctionDefinition) node).getBody();
 	    if (statement instanceof IASTCompoundStatement) {
 	        return ((IASTCompoundStatement) statement).getScope();
 	    }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionType.java
index d9ac04508a8..dc530dcf50b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionType.java
@@ -23,11 +23,11 @@ public class CFunctionType implements IFunctionType, ISerializableType {
     private final IType[] parameters;
     private final IType returnType;
     private final boolean takesVarargs;
-    
+
     public CFunctionType(IType returnType, IType[] parameters) {
     	this(returnType, parameters, false);
     }
-    
+
     public CFunctionType(IType returnType, IType[] parameters, boolean takesVarargs) {
         this.returnType = returnType;
         this.parameters = parameters;
@@ -93,13 +93,13 @@ public class CFunctionType implements IFunctionType, ISerializableType {
 			buffer.putShort(firstBytes);
 			buffer.putInt(len);
 		}
-		
+
 		buffer.marshalType(returnType);
 		for (int i = 0; i < len; i++) {
 			buffer.marshalType(parameters[i]);
 		}
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		int len;
 		if (((firstBytes & ITypeMarshalBuffer.LAST_FLAG) != 0)) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitFunction.java
index 187211ffa25..4a53eaf65e1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitFunction.java
@@ -17,9 +17,9 @@ import org.eclipse.cdt.core.dom.ast.IScope;
 /**
  * The CImplicitFunction is used to represent implicit functions that exist on the translation
  * unit but are not actually part of the physical AST created by CDT.
- * 
+ *
  * An example is GCC built-in functions.
- * 
+ *
  * @author dsteffle
  */
 public class CImplicitFunction extends CExternalFunction {
@@ -28,7 +28,7 @@ public class CImplicitFunction extends CExternalFunction {
     private IScope scope=null;
     private boolean takesVarArgs=false;
     private char[] name=null;
-    
+
     public CImplicitFunction(char[] name, IScope scope, IFunctionType type, IParameter[] parms, boolean takesVarArgs) {
         super(null, null);
         this.name=name;
@@ -37,36 +37,36 @@ public class CImplicitFunction extends CExternalFunction {
         this.parms=parms;
         this.takesVarArgs=takesVarArgs;
     }
-    
+
 
     @Override
 	public IParameter[] getParameters() {
         return parms;
     }
-    
+
     @Override
 	public IFunctionType getType() {
         return type;
     }
-    
+
     @Override
 	public boolean takesVarArgs() {
         return takesVarArgs;
     }
-    
+
     @Override
 	public String getName() {
         return String.valueOf(name);
     }
-    
+
     @Override
 	public char[] getNameCharArray() {
         return name;
     }
-    
+
     @Override
 	public IScope getScope() {
         return scope;
     }
-    
+
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitTypedef.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitTypedef.java
index 25f7fb4a0ec..cfaff123cf8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitTypedef.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitTypedef.java
@@ -17,76 +17,76 @@ import org.eclipse.cdt.core.dom.ast.IType;
 /**
  * The CImplicitTypedef is used to represent implicit typedefs that exist on the translation
  * unit but are not actually part of the physical AST created by CDT.
- * 
+ *
  * An example is the GCC built-in typedef:  typedef char * __builtin_va_list;
- *  
+ *
  * @author dsteffle
  */
 public class CImplicitTypedef extends CTypedef {
     private IType type=null;
     private char[] name=null;
     private IScope scope=null;
-    
+
     public CImplicitTypedef(IType type, char[] name, IScope scope) {
         super(null);
         this.type = type;
         this.name = name;
         this.scope = scope;
     }
-    
+
     @Override
 	public IType getType() {
         return type;
     }
-    
+
     @Override
 	public String getName() {
         return String.valueOf(name);
     }
-    
+
     @Override
 	public char[] getNameCharArray() {
         return name;
     }
-    
+
     @Override
 	public IScope getScope() {
         return scope;
     }
-    
+
     /* (non-Javadoc)
      * @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
      */
 //    public boolean isSameType(IType t) {
-//        if( t == this )
+//        if (t == this)
 //            return true;
-//        if( t instanceof ITypedef )
+//        if (t instanceof ITypedef)
 //            try {
 //                IType temp = getType();
-//                if( temp != null )
-//                    return temp.isSameType( ((ITypedef)t).getType());
+//                if (temp != null)
+//                    return temp.isSameType(((ITypedef) t).getType());
 //                return false;
-//            } catch ( DOMException e ) {
+//            } catch (DOMException e) {
 //                return false;
 //            }
-//            
+//
 //            IType temp;
 //            temp = getType();
-//            if( temp != null )
-//                return temp.isSameType( t );
+//            if (temp != null)
+//                return temp.isSameType(t);
 //            return false;
 //    }
-    
+
     /*
      * (non-Javadoc)
      * @see java.lang.Object#clone()
      */
-//    public Object clone(){
+//    public Object clone() {
 //        IType t = null;
 //        t = (IType) super.clone();
 //        return t;
 //    }
-    
+
     @Override
 	public IASTNode getPhysicalNode() {
         return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CKnRParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CKnRParameter.java
index e014e1360a3..fa967fd588f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CKnRParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CKnRParameter.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    IBM Rational Software - Initial API and implementation 
+ *    IBM Rational Software - Initial API and implementation
  *    Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
@@ -38,7 +38,7 @@ public class CKnRParameter extends PlatformObject implements IParameter {
 		this.declaration = declaration;
 		this.name = name;
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.core.dom.ast.IVariable#getType()
 	 */
@@ -46,12 +46,12 @@ public class CKnRParameter extends PlatformObject implements IParameter {
 	public IType getType() {
 		IASTDeclSpecifier declSpec = null;
 		if (declaration instanceof IASTSimpleDeclaration)
-			declSpec = ((IASTSimpleDeclaration)declaration).getDeclSpecifier();
-			
-		if( declSpec != null && declSpec instanceof ICASTTypedefNameSpecifier ){
+			declSpec = ((IASTSimpleDeclaration) declaration).getDeclSpecifier();
+
+		if (declSpec != null && declSpec instanceof ICASTTypedefNameSpecifier) {
 			ICASTTypedefNameSpecifier nameSpec = (ICASTTypedefNameSpecifier) declSpec;
 			return (IType) nameSpec.getName().resolveBinding();
-		} else if( declSpec != null && declSpec instanceof IASTElaboratedTypeSpecifier ){
+		} else if (declSpec != null && declSpec instanceof IASTElaboratedTypeSpecifier) {
 			IASTElaboratedTypeSpecifier elabTypeSpec = (IASTElaboratedTypeSpecifier) declSpec;
 			return (IType) elabTypeSpec.getName().resolveBinding();
 		}
@@ -80,7 +80,7 @@ public class CKnRParameter extends PlatformObject implements IParameter {
 	 */
 	@Override
 	public IScope getScope() {
-		return CVisitor.getContainingScope( declaration );
+		return CVisitor.getContainingScope(declaration);
 	}
 
 	/* (non-Javadoc)
@@ -111,8 +111,8 @@ public class CKnRParameter extends PlatformObject implements IParameter {
      */
     @Override
 	public boolean isAuto() {
-        if( declaration instanceof IASTSimpleDeclaration )
-            return ((IASTSimpleDeclaration)declaration).getDeclSpecifier().getStorageClass() == IASTDeclSpecifier.sc_auto;
+        if (declaration instanceof IASTSimpleDeclaration)
+            return ((IASTSimpleDeclaration) declaration).getDeclSpecifier().getStorageClass() == IASTDeclSpecifier.sc_auto;
         return false;
     }
 
@@ -121,16 +121,16 @@ public class CKnRParameter extends PlatformObject implements IParameter {
      */
     @Override
 	public boolean isRegister() {
-        if( declaration instanceof IASTSimpleDeclaration )
-            return ((IASTSimpleDeclaration)declaration).getDeclSpecifier().getStorageClass() == IASTDeclSpecifier.sc_register;
+        if (declaration instanceof IASTSimpleDeclaration)
+            return ((IASTSimpleDeclaration) declaration).getDeclSpecifier().getStorageClass() == IASTDeclSpecifier.sc_register;
         return false;
     }
-    
+
 	@Override
 	public ILinkage getLinkage() {
 		return Linkage.C_LINKAGE;
 	}
-	
+
 	@Override
 	public IBinding getOwner() {
 		return CVisitor.findEnclosingFunction(declaration);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CNodeFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CNodeFactory.java
index e14f1ebf1ea..bfb27578ae8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CNodeFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CNodeFactory.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Mike Kucera (IBM Corporation) - initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -92,16 +92,16 @@ import org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor;
 
 /**
  * Abstract factory implementation that creates AST nodes for C99.
- * These can be overridden in subclasses to change the 
+ * These can be overridden in subclasses to change the
  * implementations of the nodes.
  */
 public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 	private static final CNodeFactory DEFAULT_INSTANCE = new CNodeFactory();
-	
+
 	public static CNodeFactory getDefault() {
 		return DEFAULT_INSTANCE;
 	}
-	
+
 	@Override
 	public IASTAlignmentSpecifier newAlignmentSpecifier(IASTExpression expression) {
 		return new CASTAlignmentSpecifier(expression);
@@ -116,32 +116,32 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 	public IASTArrayDeclarator newArrayDeclarator(IASTName name) {
 		return new CASTArrayDeclarator(name);
 	}
-	
+
 	@Override
 	public ICASTArrayDesignator newArrayDesignator(IASTExpression exp) {
 		return new CASTArrayDesignator(exp);
 	}
-	
+
 	@Override
 	public ICASTArrayModifier newArrayModifier(IASTExpression expr) {
 		return new CASTArrayModifier(expr);
 	}
-	
+
 	@Override
 	public IGCCASTArrayRangeDesignator newArrayRangeDesignatorGCC(IASTExpression floor, IASTExpression ceiling) {
 		return new CASTArrayRangeDesignator(floor, ceiling);
 	}
-	
+
 	@Override
 	public IASTArraySubscriptExpression newArraySubscriptExpression(IASTExpression arrayExpr, IASTExpression subscript) {
 		return new CASTArraySubscriptExpression(arrayExpr, subscript);
 	}
-	
+
 	@Override
 	public IASTASMDeclaration newASMDeclaration(String assembly) {
 		return new CASTASMDeclaration(assembly);
 	}
-	
+
 	@Override
 	public IASTAttribute newAttribute(char[] name, IASTToken argumentClause) {
 		return new CASTAttribute(name, argumentClause);
@@ -150,19 +150,19 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 	public IASTBinaryExpression newBinaryExpression(int op, IASTExpression expr1, IASTExpression expr2) {
 		return new CASTBinaryExpression(op, expr1, expr2);
 	}
-	
+
 	@Override
 	public IASTBreakStatement newBreakStatement() {
 		return new CASTBreakStatement();
 	}
-	
+
 	@Override
 	public IASTCaseStatement newCaseStatement(IASTExpression expression) {
 		return new CASTCaseStatement(expression);
 	}
-		
+
 	/**
-	 * @param operator  
+	 * @param operator
 	 */
 	@Override
 	public IASTCastExpression newCastExpression(int operator, IASTTypeId typeId, IASTExpression operand) {
@@ -173,37 +173,37 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 	public ICASTCompositeTypeSpecifier newCompositeTypeSpecifier(int key, IASTName name) {
 		return new CASTCompositeTypeSpecifier(key, name);
 	}
-	
+
 	@Override
 	public IASTCompoundStatement newCompoundStatement() {
 		return new CASTCompoundStatement();
 	}
-	
+
 	@Override
 	public IASTConditionalExpression newConditionalExpession(IASTExpression condition, IASTExpression positive, IASTExpression negative) {
 		return new CASTConditionalExpression(condition, positive, negative);
 	}
-	
+
 	@Override
 	public IASTContinueStatement newContinueStatement() {
 		return new CASTContinueStatement();
 	}
-	
+
 	@Override
 	public IASTDeclarationStatement newDeclarationStatement(IASTDeclaration declaration) {
 		return new CASTDeclarationStatement(declaration);
 	}
-	
+
 	@Override
 	public IASTDeclarator newDeclarator(IASTName name) {
 		return new CASTDeclarator(name);
 	}
-	
+
 	@Override
 	public IASTDefaultStatement newDefaultStatement() {
 		return new CASTDefaultStatement();
 	}
-	
+
 	@Override
 	@Deprecated
 	public ICASTDesignatedInitializer newDesignatedInitializer(IASTInitializer operandInitializer) {
@@ -211,42 +211,42 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 		result.setOperandInitializer(operandInitializer);
 		return result;
 	}
-	
+
 	@Override
 	public ICASTDesignatedInitializer newDesignatedInitializer(IASTInitializerClause clause) {
 		return new CASTDesignatedInitializer(clause);
 	}
-	
+
 	@Override
 	public IASTDoStatement newDoStatement(IASTStatement body, IASTExpression condition) {
 		return new CASTDoStatement(body, condition);
 	}
-	
+
 	@Override
 	public ICASTElaboratedTypeSpecifier newElaboratedTypeSpecifier(int kind, IASTName name) {
 		return new CASTElaboratedTypeSpecifier(kind, name);
 	}
-	
+
 	@Override
 	public ICASTEnumerationSpecifier newEnumerationSpecifier(IASTName name) {
 		return new CASTEnumerationSpecifier(name);
 	}
-	
+
 	@Override
 	public IASTEnumerator newEnumerator(IASTName name, IASTExpression value) {
 		return new CASTEnumerator(name, value);
 	}
-	
+
 	@Override
 	public IASTEqualsInitializer newEqualsInitializer(IASTInitializerClause initClause) {
 		return new CASTEqualsInitializer(initClause);
 	}
-	
+
 	@Override
 	public IASTExpressionList newExpressionList() {
 		return new CASTExpressionList();
 	}
-	
+
 	@Override
 	public IASTExpressionStatement newExpressionStatement(IASTExpression expr) {
 		return new CASTExpressionStatement(expr);
@@ -266,13 +266,13 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 	public IASTFieldReference newFieldReference(IASTName name, IASTExpression owner) {
 		return new CASTFieldReference(name, owner);
 	}
-	
+
 	@Override
 	public IASTForStatement newForStatement(IASTStatement init, IASTExpression condition,
 			IASTExpression iterationExpression, IASTStatement body) {
 		return new CASTForStatement(init, condition, iterationExpression, body);
 	}
-	
+
 	@Override
 	@Deprecated
 	public IASTFunctionCallExpression newFunctionCallExpression(IASTExpression idExpr, IASTExpression argList) {
@@ -286,17 +286,17 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
         }
 		return result;
 	}
-	
+
 	@Override
 	public IASTFunctionCallExpression newFunctionCallExpression(IASTExpression idExpr, IASTInitializerClause[] arguments) {
 		return new CASTFunctionCallExpression(idExpr, arguments);
 	}
-	
+
 	@Override
 	public IASTStandardFunctionDeclarator newFunctionDeclarator(IASTName name) {
 		return new CASTFunctionDeclarator(name);
 	}
-	
+
 	@Override
 	public IASTFunctionDefinition newFunctionDefinition(IASTDeclSpecifier declSpecifier,
 			IASTFunctionDeclarator declarator, IASTStatement bodyStatement) {
@@ -307,58 +307,58 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 	public IGNUASTCompoundStatementExpression newGNUCompoundStatementExpression(IASTCompoundStatement compoundStatement) {
 		return new CASTCompoundStatementExpression(compoundStatement);
 	}
-	
+
 	@Override
 	public IASTGotoStatement newGotoStatement(IASTName name) {
 		return new CASTGotoStatement(name);
 	}
-	
+
 	@Override
 	public IASTStatement newGotoStatement(IASTExpression expression) {
 		return new GNUCASTGotoStatement(expression);
 	}
-	
+
 	@Override
 	public IASTIdExpression newIdExpression(IASTName name) {
 		return new CASTIdExpression(name);
 	}
-	
+
 	@Override
 	public IASTIfStatement newIfStatement(IASTExpression expr, IASTStatement thenStat, IASTStatement elseClause) {
 		return new CASTIfStatement(expr, thenStat, elseClause);
 	}
-	
+
 	@Override
 	@Deprecated
 	public  org.eclipse.cdt.core.dom.ast.IASTInitializerExpression newInitializerExpression(IASTExpression expression) {
 		return new CASTInitializerExpression(expression);
 	}
-	
+
 	@Override
 	public IASTInitializerList newInitializerList() {
 		return new CASTInitializerList();
 	}
-	
+
 	@Override
 	public ICASTKnRFunctionDeclarator newKnRFunctionDeclarator(IASTName[] parameterNames, IASTDeclaration[] parameterDeclarations) {
 		return new CASTKnRFunctionDeclarator(parameterNames, parameterDeclarations);
 	}
-	
+
 	@Override
 	public IASTLabelStatement newLabelStatement(IASTName name, IASTStatement nestedStatement) {
 		return new CASTLabelStatement(name, nestedStatement);
 	}
-	
+
 	@Override
 	public IASTLiteralExpression newLiteralExpression(int kind, String rep) {
 		return new CASTLiteralExpression(kind, rep.toCharArray());
 	}
-	
+
 	@Override
 	public IASTName newName() {
 		return new CASTName();
 	}
-	
+
 	@Override
 	public IASTName newName(char[] name) {
 		return new CASTName(name);
@@ -373,58 +373,58 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 	public IASTNullStatement newNullStatement() {
 		return new CASTNullStatement();
 	}
-	
+
 	@Override
 	public IASTParameterDeclaration newParameterDeclaration(IASTDeclSpecifier declSpec, IASTDeclarator declarator) {
 		return new CASTParameterDeclaration(declSpec, declarator);
 	}
-	
+
 	@Override
 	public ICASTPointer newPointer() {
 		return new CASTPointer();
 	}
-	
+
 	@Override
 	public IASTProblem newProblem(int id, char[] arg, boolean error) {
 		return new CASTProblem(id, arg, error);
 	}
-	
+
 	@Override
 	public IASTProblemDeclaration newProblemDeclaration(IASTProblem problem) {
 		return new CASTProblemDeclaration(problem);
 	}
-	
+
 	@Override
 	public IASTProblemExpression newProblemExpression(IASTProblem problem) {
 		return new CASTProblemExpression(problem);
 	}
-	
+
 	@Override
 	public IASTProblemStatement newProblemStatement(IASTProblem problem) {
 		return new CASTProblemStatement(problem);
 	}
-	
+
 	@Override
 	public IASTReturnStatement newReturnStatement(IASTExpression retValue) {
 		return new CASTReturnStatement(retValue);
 	}
-	
+
 	@Override
 	public IASTSimpleDeclaration newSimpleDeclaration(IASTDeclSpecifier declSpecifier) {
 		return new CASTSimpleDeclaration(declSpecifier);
 	}
-	
+
 	@Override
 	public ICASTSimpleDeclSpecifier newSimpleDeclSpecifier() {
 		return new CASTSimpleDeclSpecifier();
 	}
-	
+
 	@Override
-	@Deprecated 
+	@Deprecated
 	public org.eclipse.cdt.core.dom.ast.gnu.c.IGCCASTSimpleDeclSpecifier newSimpleDeclSpecifierGCC(IASTExpression typeofExpression) {
 		return new GCCASTSimpleDeclSpecifier(typeofExpression);
 	}
-	
+
 	@Override
 	public IASTSwitchStatement newSwitchStatement(IASTExpression controller, IASTStatement body) {
 		return new CASTSwitchStatement(controller, body);
@@ -443,7 +443,7 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 	@Override
 	public IASTTranslationUnit newTranslationUnit(IScanner scanner) {
 		CASTTranslationUnit tu = new CASTTranslationUnit();
-		
+
 		if (scanner != null) {
 			tu.setLocationResolver(scanner.getLocationResolver());
 			if (scanner instanceof CPreprocessor) {
@@ -483,4 +483,4 @@ public class CNodeFactory extends NodeFactory implements ICNodeFactory {
 	public IASTWhileStatement newWhileStatement(IASTExpression condition, IASTStatement body) {
 		return new CASTWhileStatement(condition, body);
 	}
-} 
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CPointerType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CPointerType.java
index 5d8b60a81bc..9945c965a80 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CPointerType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CPointerType.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     Devin Steffler (IBM Rational Software) - Initial API and implementation 
+ *     Devin Steffler (IBM Rational Software) - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
@@ -21,21 +21,21 @@ import org.eclipse.core.runtime.CoreException;
 
 public class CPointerType implements ICPointerType, ITypeContainer, ISerializableType {
 	static public final CPointerType VOID_POINTER = new CPointerType(CBasicType.VOID, 0);
-	
+
 	static public final int IS_CONST    = 1;
 	static public final int IS_RESTRICT = 1 << 1;
 	static public final int IS_VOLATILE = 1 << 2;
-	
+
 	IType nextType = null;
 	private int qualifiers = 0;
-	
+
 	public CPointerType() {}
-	
+
 	public CPointerType(IType next, int qualifiers) {
 		this.nextType = next;
 		this.qualifiers = qualifiers;
 	}
-	
+
 	@Override
 	public boolean isSameType(IType obj) {
 	    if (obj == this)
@@ -48,12 +48,12 @@ public class CPointerType implements ICPointerType, ITypeContainer, ISerializabl
             if (isConst() != pt.isConst()) return false;
 			if (isRestrict() != pt.isRestrict()) return false;
 			if (isVolatile() != pt.isVolatile()) return false;
-         
+
 			return pt.getType().isSameType(nextType);
         }
     	return false;
 	}
-	
+
 	@Override
 	public boolean isRestrict() {
 		return (qualifiers & IS_RESTRICT) != 0;
@@ -63,7 +63,7 @@ public class CPointerType implements ICPointerType, ITypeContainer, ISerializabl
 	public IType getType() {
 		return nextType;
 	}
-	
+
 	@Override
 	public void setType(IType type) {
 		nextType = type;
@@ -78,7 +78,7 @@ public class CPointerType implements ICPointerType, ITypeContainer, ISerializabl
 	public boolean isVolatile() {
 		return (qualifiers & IS_VOLATILE) != 0;
 	}
-		
+
     @Override
 	public Object clone() {
         IType t = null;
@@ -103,7 +103,7 @@ public class CPointerType implements ICPointerType, ITypeContainer, ISerializabl
 		buffer.putShort(firstBytes);
 		buffer.marshalType(getType());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		IType nested= buffer.unmarshalType();
 		return new CPointerType(nested, firstBytes/ITypeMarshalBuffer.FLAG1);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CQualifierType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CQualifierType.java
index e175fd9a04e..41be9dbf0c1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CQualifierType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CQualifierType.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    Devin Steffler (IBM Rational Software) - Initial API and implementation 
+ *    Devin Steffler (IBM Rational Software) - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
@@ -34,34 +34,34 @@ public class CQualifierType implements ICQualifierType, ITypeContainer, ISeriali
 		this.isVolatile = declSpec.isVolatile();
 		this.isRestrict = declSpec.isRestrict();
 	}
-	
+
 	public CQualifierType(IType type, boolean isConst, boolean isVolatile, boolean isRestrict) {
 		this.type = type;
 		this.isConst = isConst;
 		this.isVolatile = isVolatile;
 		this.isRestrict = isRestrict;
 	}
-	
+
 	@Override
 	public boolean isSameType(IType obj) {
 	    if (obj == this)
 	        return true;
 	    if (obj instanceof ITypedef)
 	        return obj.isSameType(this);
-	    
+
 	    if (obj instanceof ICQualifierType) {
 	        ICQualifierType qt = (ICQualifierType) obj;
             if (isConst() != qt.isConst()) return false;
 			if (isRestrict() != qt.isRestrict()) return false;
 			if (isVolatile() != qt.isVolatile()) return false;
-         
+
 			if (type == null)
 				return false;
 			return type.isSameType(qt.getType());
         }
     	return false;
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.core.dom.ast.IQualifierType#isConst()
 	 */
@@ -83,9 +83,9 @@ public class CQualifierType implements ICQualifierType, ITypeContainer, ISeriali
 	 */
 	@Override
 	public boolean isRestrict() {
-		return isRestrict; 
+		return isRestrict;
 	}
-	
+
 	@Override
 	public IType getType() {
 		return type;
@@ -95,7 +95,7 @@ public class CQualifierType implements ICQualifierType, ITypeContainer, ISeriali
 	public void setType(IType t) {
 	    type = t;
 	}
-	
+
     @Override
 	public Object clone() {
         IType t = null;
@@ -116,7 +116,7 @@ public class CQualifierType implements ICQualifierType, ITypeContainer, ISeriali
 		buffer.putShort(firstBytes);
 		buffer.marshalType(getType());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		IType nested= buffer.unmarshalType();
 		return new CQualifierType(nested, (firstBytes & ITypeMarshalBuffer.FLAG1) != 0,
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java
index 59429512131..faa972f7b85 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java
@@ -81,7 +81,7 @@ public class CScope implements ICScope, IASTInternalScope {
 	public static final int NAMESPACE_TYPE_TAG = 0;
 	public static final int NAMESPACE_TYPE_OTHER = 1;
 	public static final int NAMESPACE_TYPE_BOTH = 2;
-	
+
 	private static final IndexFilter[] INDEX_FILTERS = {
 		new IndexFilter() {	// namespace type tag
 			@Override
@@ -108,18 +108,18 @@ public class CScope implements ICScope, IASTInternalScope {
 		// namespace type both
 		IndexFilter.C_DECLARED_OR_IMPLICIT
 	};
-	
+
     private IASTNode physicalNode;
     private boolean isCached;
-    
+
     private final CharArrayObjectMap mapsToNameOrBinding[] = { CharArrayObjectMap.EMPTY_MAP, CharArrayObjectMap.EMPTY_MAP };
 	private final EScopeKind kind;
-    
+
 	public CScope(IASTNode physical, EScopeKind eKind) {
         physicalNode = physical;
         kind= eKind;
     }
-    
+
 	@Override
 	public EScopeKind getKind() {
 		return kind;
@@ -133,7 +133,7 @@ public class CScope implements ICScope, IASTInternalScope {
     protected static class CollectNamesAction extends ASTVisitor {
         private final char[] name;
         private IASTName[] result;
-        
+
         CollectNamesAction(char[] n) {
             name = n;
             shouldVisitNames = true;
@@ -146,10 +146,10 @@ public class CScope implements ICScope, IASTInternalScope {
                 prop == IASTCompositeTypeSpecifier.TYPE_NAME ||
                 prop == IASTDeclarator.DECLARATOR_NAME) {
                 if (CharArrayUtils.equals(n.toCharArray(), name))
-                    result = ArrayUtil.append(IASTName.class, result, n);    
+                    result = ArrayUtil.append(IASTName.class, result, n);
             }
-            
-            return PROCESS_CONTINUE; 
+
+            return PROCESS_CONTINUE;
         }
 
         @Override
@@ -163,7 +163,7 @@ public class CScope implements ICScope, IASTInternalScope {
             return ArrayUtil.trim(IASTName.class, result);
         }
     }
-    
+
 	@Override
 	public IBinding[] find(String name, IASTTranslationUnit tu) {
 		return find(name);
@@ -178,8 +178,8 @@ public class CScope implements ICScope, IASTInternalScope {
     	Object o= mapsToNameOrBinding[namespaceType].get(name);
     	if (o instanceof IBinding)
     		return (IBinding) o;
-    	
-    	if (o instanceof IASTName) 
+
+    	if (o instanceof IASTName)
     		return ((IASTName) o).resolveBinding();
 
     	if (o instanceof IASTName[]) {
@@ -234,7 +234,7 @@ public class CScope implements ICScope, IASTInternalScope {
             prop == CVisitor.STRING_LOOKUP_TAGS_PROPERTY) {
             return NAMESPACE_TYPE_TAG;
         }
-        
+
         return NAMESPACE_TYPE_OTHER;
     }
 
@@ -242,7 +242,7 @@ public class CScope implements ICScope, IASTInternalScope {
 	public final IBinding getBinding(IASTName name, boolean resolve) {
     	return getBinding(name, resolve, IIndexFileSet.EMPTY);
     }
-    
+
 	@Override
 	public final IBinding[] getBindings(IASTName name, boolean resolve, boolean prefix) {
 		return getBindings(new ScopeLookupData(name, resolve, prefix));
@@ -254,14 +254,14 @@ public class CScope implements ICScope, IASTInternalScope {
 	    if (c.length == 0) {
 	        return null;
 	    }
-	    
+
 	    populateCache();
 		final int type = getNamespaceType(name);
 		Object o = mapsToNameOrBinding[type].get(name.toCharArray());
-	    
+
 		if (o instanceof IBinding)
 			return (IBinding) o;
-	
+
 	    if (o instanceof IASTName) {
 	    	IBinding b= extractBinding((IASTName) o, resolve, name);
 	    	if (b != null)
@@ -275,7 +275,7 @@ public class CScope implements ICScope, IASTInternalScope {
 					return b;
 			}
 	    }
-	    
+
     	IBinding result= null;
     	if (resolve && physicalNode instanceof IASTTranslationUnit) {
     		final IASTTranslationUnit tu = (IASTTranslationUnit) physicalNode;
@@ -312,7 +312,7 @@ public class CScope implements ICScope, IASTInternalScope {
     	if (getKind() != EScopeKind.eGlobal)
     		return false;
     	final ASTNodeProperty propertyInParent = name.getPropertyInParent();
-		if (propertyInParent==IASTNamedTypeSpecifier.NAME || 
+		if (propertyInParent==IASTNamedTypeSpecifier.NAME ||
 				propertyInParent == IASTElaboratedTypeSpecifier.TYPE_NAME) {
     		return false;
     	}
@@ -329,7 +329,7 @@ public class CScope implements ICScope, IASTInternalScope {
     	}
     	return true;
     }
-    
+
 	/**
 	 * @deprecated Use {@link #getBindings(ScopeLookupData)} instead
 	 */
@@ -380,7 +380,7 @@ public class CScope implements ICScope, IASTInternalScope {
 		}
        	obj = ArrayUtil.trim(Object.class, obj);
        	IBinding[] result = null;
-        
+
 		for (Object element : obj) {
 			if (element instanceof IBinding) {
 				result = ArrayUtil.append(IBinding.class, result, (IBinding) element);
@@ -407,7 +407,7 @@ public class CScope implements ICScope, IASTInternalScope {
 
         return ArrayUtil.trim(IBinding.class, result);
     }
-    
+
     /**
      * Index results from global scope, differ from ast results from translation unit scope. This routine
      * is intended to fix results from the index to be consistent with ast scope behavior.
@@ -418,19 +418,19 @@ public class CScope implements ICScope, IASTInternalScope {
     private IBinding processIndexResults(IASTName name, IBinding[] bindings) {
     	if (bindings.length != 1)
     		return null;
-    	
+
     	return bindings[0];
     }
-        
+
     @Override
 	public void populateCache() {
     	if (isCached)
     		return;
-    	
+
     	doPopulateCache();
     	isCached= true;
     }
-    
+
 	@Override
 	public void removeNestedFromCache(IASTNode container) {
 		if (mapsToNameOrBinding != null) {
@@ -438,7 +438,7 @@ public class CScope implements ICScope, IASTInternalScope {
 			removeFromMap(mapsToNameOrBinding[1], container);
 		}
 	}
-	
+
 	private void removeFromMap(CharArrayObjectMap map, IASTNode container) {
 		for (int i = 0; i < map.size(); i++) {
 			Object o= map.getAt(i);
@@ -535,21 +535,21 @@ public class CScope implements ICScope, IASTInternalScope {
 			}
 		}
 	}
-    
+
 	public void collectNames(IASTNode node) {
 	    if (node instanceof IASTDeclaration) {
 	        collectNames((IASTDeclaration) node);
 	    } else if (node instanceof IASTParameterDeclaration) {
 	        collectNames((IASTParameterDeclaration) node);
 	    } else if (node instanceof IASTDeclarationStatement) {
-			collectNames(((IASTDeclarationStatement)node).getDeclaration());
-		} 
+			collectNames(((IASTDeclarationStatement) node).getDeclaration());
+		}
 	}
 
 	private void collectNames(IASTParameterDeclaration paramDecl) {
-	    if (paramDecl == null || paramDecl instanceof IASTAmbiguousParameterDeclaration) 
+	    if (paramDecl == null || paramDecl instanceof IASTAmbiguousParameterDeclaration)
 	    	return;
-	    
+
 		collectNames(paramDecl.getDeclarator());
 		collectNames(paramDecl.getDeclSpecifier(), false);
 	}
@@ -567,11 +567,11 @@ public class CScope implements ICScope, IASTInternalScope {
 		if (innermost != null)
 			ASTInternal.addName(this, innermost.getName());
 	}
-	
+
 	private void collectNames(IASTDeclaration declaration) {
 		if (declaration instanceof IASTAmbiguousSimpleDeclaration)
 			return;
-		
+
 		if (declaration instanceof IASTSimpleDeclaration) {
 			IASTSimpleDeclaration simpleDeclaration = (IASTSimpleDeclaration) declaration;
 			IASTDeclarator[] declarators = simpleDeclaration.getDeclarators();
@@ -582,7 +582,7 @@ public class CScope implements ICScope, IASTInternalScope {
 		} else if (declaration instanceof IASTFunctionDefinition) {
 			IASTFunctionDefinition functionDef = (IASTFunctionDefinition) declaration;
 			collectNames(functionDef.getDeclarator());
-			collectNames(functionDef.getDeclSpecifier(), false); 
+			collectNames(functionDef.getDeclSpecifier(), false);
 		}
 	}
 
@@ -590,18 +590,18 @@ public class CScope implements ICScope, IASTInternalScope {
 		IASTName tempName = null;
 		if (declSpec instanceof ICASTElaboratedTypeSpecifier) {
 			if (forceElabSpec || physicalNode instanceof IASTTranslationUnit) {
-				tempName = ((ICASTElaboratedTypeSpecifier)declSpec).getName();
+				tempName = ((ICASTElaboratedTypeSpecifier) declSpec).getName();
 				ASTInternal.addName(this, tempName);
 			}
 		} else if (declSpec instanceof ICASTCompositeTypeSpecifier) {
-			tempName = ((ICASTCompositeTypeSpecifier)declSpec).getName();
+			tempName = ((ICASTCompositeTypeSpecifier) declSpec).getName();
 			ASTInternal.addName(this,  tempName);
 
 			// Also have to check for any nested structs.
-			IASTDeclaration[] nested = ((ICASTCompositeTypeSpecifier)declSpec).getMembers();
+			IASTDeclaration[] nested = ((ICASTCompositeTypeSpecifier) declSpec).getMembers();
 			for (IASTDeclaration element : nested) {
 				if (element instanceof IASTSimpleDeclaration) {
-					IASTDeclSpecifier d = ((IASTSimpleDeclaration)element).getDeclSpecifier();
+					IASTDeclSpecifier d = ((IASTSimpleDeclaration) element).getDeclSpecifier();
 					if (d instanceof ICASTCompositeTypeSpecifier || d instanceof IASTEnumerationSpecifier) {
 						collectNames(d, false);
 					}
@@ -647,7 +647,7 @@ public class CScope implements ICScope, IASTInternalScope {
 
 	/**
 	 * In case there was an ambiguity the cache has to be populated for a second time.
-	 * However, we do not clear any names in order not to loose bindings. 
+	 * However, we do not clear any names in order not to loose bindings.
 	 */
 	public void markAsUncached() {
 		isCached= false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java
index 037818dbd83..5672138e02b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *    Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
 import org.eclipse.cdt.core.dom.ast.ASTVisitor;
@@ -50,7 +50,7 @@ public class CStructMapper {
 
 	private final IASTTranslationUnit fTranslationUnit;
 	protected CharArrayMap fStructs;
-	
+
 	public CStructMapper(IASTTranslationUnit tu) {
 		fTranslationUnit= tu;
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructure.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructure.java
index 8eb40aca7b5..9aaffcc43d9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructure.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructure.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     IBM Rational Software - Initial API and implementation
- *     Markus Schorn (Wind River Systems) 
+ *     Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
@@ -318,6 +318,6 @@ public class CStructure extends PlatformObject implements ICompositeType, ICInte
 	 */
 	@Override
 	public String toString() {
-		return getName(); 
+		return getName();
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CTypedef.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CTypedef.java
index 5af9f67b76d..fa8448cacd3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CTypedef.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CTypedef.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Rational Software - Initial API and implementation 
+ *     IBM Rational Software - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
@@ -28,13 +28,13 @@ import org.eclipse.core.runtime.PlatformObject;
  * Represents a typedef.
  */
 public class CTypedef extends PlatformObject implements ITypedef, ITypeContainer, ICInternalBinding {
-	private final IASTName name; 
+	private final IASTName name;
 	private IType type = null;
-	
+
 	public CTypedef(IASTName name) {
 		this.name = name;
 	}
-	
+
     @Override
 	public IASTNode getPhysicalNode() {
         return name;
@@ -43,10 +43,10 @@ public class CTypedef extends PlatformObject implements ITypedef, ITypeContainer
 	@Override
 	public IType getType() {
 		if (type == null && name.getParent() instanceof IASTDeclarator)
-			type = CVisitor.createType((IASTDeclarator)name.getParent());
+			type = CVisitor.createType((IASTDeclarator) name.getParent());
 		return type;
 	}
-	
+
 	@Override
 	public void setType(IType t) {
 	    type = t;
@@ -86,16 +86,16 @@ public class CTypedef extends PlatformObject implements ITypedef, ITypeContainer
 	    if (t instanceof ITypedef) {
 			IType temp = getType();
 			if (temp != null)
-			    return temp.isSameType(((ITypedef)t).getType());
+			    return temp.isSameType(((ITypedef) t).getType());
 			return false;
 		}
-	        
+
 	    IType temp = getType();
 	    if (temp != null)
 	        return temp.isSameType(t);
 	    return false;
     }
-    
+
 	@Override
 	public ILinkage getLinkage() {
 		return Linkage.C_LINKAGE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariable.java
index 04e46a43d22..d4a35c735c5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariable.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariable.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     IBM Rational Software - Initial API and implementation
- *     Markus Schorn (Wind River Systems) 
+ *     Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
@@ -43,7 +43,7 @@ import org.eclipse.core.runtime.PlatformObject;
 public class CVariable extends PlatformObject implements ICInternalBinding, IVariable {
 	private IASTName[] declarations = null;
 	private IType type = null;
-	
+
 	/**
 	 * The set of CVariable objects for which initial value computation is in progress on each thread.
 	 * This is used to guard against recursion during initial value computation.
@@ -52,7 +52,7 @@ public class CVariable extends PlatformObject implements ICInternalBinding, IVar
 		@Override
 		protected Set initialValue() {
 			return new HashSet<>();
-		}	
+		}
 	};
 
 	public CVariable(IASTName name) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariableReadWriteFlags.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariableReadWriteFlags.java
index 557ccd11252..4c50f56f48a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariableReadWriteFlags.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariableReadWriteFlags.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
 import org.eclipse.cdt.core.dom.ast.IASTEqualsInitializer;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java
index 457db61227a..4320aae23d9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     Andrew Niefer (IBM Rational Software) - Initial API and implementation 
+ *     Andrew Niefer (IBM Rational Software) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
  *     Bryan Wilkinson (QNX)
  *     Andrew Ferguson (Symbian)
@@ -127,7 +127,7 @@ public class CVisitor extends ASTQueries {
 			shouldVisitStatements = true;
 			shouldVisitTypeIds = true;
 		}
-		
+
 		private static final int DEFAULT_CHILDREN_LIST_SIZE = 8;
 		private IASTProblem[] problems = null;
 		int numFound = 0;
@@ -135,7 +135,7 @@ public class CVisitor extends ASTQueries {
 		public CollectProblemsAction() {
 			problems = new IASTProblem[DEFAULT_CHILDREN_LIST_SIZE];
 		}
-		
+
 		private void addProblem(IASTProblem problem) {
 			if (problems.length == numFound) { // if the found array is full, then double the array
 	            IASTProblem[] old = problems;
@@ -145,25 +145,25 @@ public class CVisitor extends ASTQueries {
 	        }
 			problems[numFound++] = problem;
 		}
-		
+
 	    private IASTProblem[] removeNullFromProblems() {
 	    	if (problems[problems.length - 1] != null) { // if the last element in the list is not null then return the list
-				return problems;			
+				return problems;
 			} else if (problems[0] == null) { // if the first element in the list is null, then return empty list
 				return new IASTProblem[0];
 			}
-			
+
 			IASTProblem[] results = new IASTProblem[numFound];
 			for (int i=0; inull, e.g. for parameter names in function-prototypes.
 	 */
@@ -946,10 +946,10 @@ public class CVisitor extends ASTQueries {
 				IASTNode parent = node.getParent();
 				if (parent instanceof IASTForStatement) {
 				    return ((IASTForStatement) parent).getScope();
-				} 
+				}
 		    } else if (node instanceof IASTParameterDeclaration) {
 				IASTNode parent = node.getParent();
-				if (parent instanceof IASTStandardFunctionDeclarator) {					
+				if (parent instanceof IASTStandardFunctionDeclarator) {
 					IASTStandardFunctionDeclarator dtor = (IASTStandardFunctionDeclarator) parent;
 					if (ASTQueries.findTypeRelevantDeclarator(dtor) == dtor) {
 						parent= ASTQueries.findOutermostDeclarator(dtor);
@@ -979,12 +979,12 @@ public class CVisitor extends ASTQueries {
 				    return scope;
 		    	}
 		    }
-		    
+
 		    node = node.getParent();
 		}
 	    return null;
 	}
-	
+
 	public static IScope getContainingScope(IASTStatement statement) {
 		IASTNode parent = statement.getParent();
 		IScope scope = null;
@@ -1002,7 +1002,7 @@ public class CVisitor extends ASTQueries {
 		} else {
 			return getContainingScope(parent);
 		}
-		
+
 		if (statement instanceof IASTGotoStatement) {
 		    // labels have function scope
 		    while (scope != null && !(scope instanceof ICFunctionScope)) {
@@ -1014,10 +1014,10 @@ public class CVisitor extends ASTQueries {
                 }
 		    }
 		}
-		
+
 		return scope;
 	}
-	
+
 	private static IASTNode getContainingBlockItem(IASTNode node) {
 		for (IASTNode parent = node.getParent(); parent != null; parent = parent.getParent()) {
 			if (parent instanceof IASTDeclaration) {
@@ -1026,7 +1026,7 @@ public class CVisitor extends ASTQueries {
 					return p;
 				return parent;
 			}
-			if (parent instanceof IASTCompoundStatement || // parent is something that can contain a declaration 
+			if (parent instanceof IASTCompoundStatement || // parent is something that can contain a declaration
 					parent instanceof IASTTranslationUnit   ||
 					parent instanceof IASTForStatement  ||
 					parent instanceof IASTFunctionDeclarator) {
@@ -1036,14 +1036,14 @@ public class CVisitor extends ASTQueries {
 		}
 		return null;
 	}
-	
+
 	/**
 	 * Lookup for a name starting from the given scope.
 	 */
 	protected static IBinding lookup(IScope scope, IASTName name) {
 		if (scope == null)
 			return null;
-		
+
 		IIndexFileSet fileSet= IIndexFileSet.EMPTY;
 		IASTTranslationUnit tu= name.getTranslationUnit();
 		if (tu == null && scope instanceof IASTInternalScope) {
@@ -1055,7 +1055,7 @@ public class CVisitor extends ASTQueries {
 				fileSet= fs;
 			}
 		}
-		
+
 		while (scope != null) {
 			if (!(scope instanceof ICCompositeTypeScope)) {
 				IBinding binding = scope.getBinding(name, true, fileSet);
@@ -1068,10 +1068,10 @@ public class CVisitor extends ASTQueries {
 				scope= null;
 			}
 		}
-		
+
 		return externalBinding(tu, name);
 	}
-	
+
 	/**
 	 * if (bits & PREFIX_LOOKUP) then returns IBinding[]
 	 * otherwise returns IBinding
@@ -1079,7 +1079,7 @@ public class CVisitor extends ASTQueries {
 	protected static IBinding[] lookupPrefix(IScope scope, IASTName name) throws DOMException{
 		if (scope == null)
 			return null;
-		
+
 		IBinding[] result = null;
 		CharArraySet handled= new CharArraySet(1);
 		while (scope != null) {
@@ -1100,7 +1100,7 @@ public class CVisitor extends ASTQueries {
 			}
 			scope= scope.getParent();
 		}
-		
+
 		return ArrayUtil.trim(IBinding.class, result);
 	}
 
@@ -1121,7 +1121,7 @@ public class CVisitor extends ASTQueries {
 	    }
 	    return external;
 	}
-	
+
 	protected static IASTDeclarator findDefinition(IASTDeclarator declarator, int beginAtLoc) {
 	    return (IASTDeclarator) findDefinition(declarator, declarator.getName().toCharArray(), beginAtLoc);
 	}
@@ -1152,12 +1152,12 @@ public class CVisitor extends ASTQueries {
 				    begun = true;
 					continue;
 				}
-				
+
 				if (begun) {
 					if (node instanceof IASTDeclarationStatement) {
 						node = ((IASTDeclarationStatement) node).getDeclaration();
 					}
-					
+
 					if (node instanceof IASTFunctionDefinition && decl instanceof IASTFunctionDeclarator) {
 						IASTFunctionDeclarator dtor = ((IASTFunctionDefinition) node).getDeclarator();
 						IASTName name = ASTQueries.findInnermostDeclarator(dtor).getName();
@@ -1168,7 +1168,7 @@ public class CVisitor extends ASTQueries {
 						IASTSimpleDeclaration simpleDecl = (IASTSimpleDeclaration) node;
 						IASTDeclSpecifier declSpec = simpleDecl.getDeclSpecifier();
 						IASTName name = null;
-						
+
 						if (declSpec instanceof ICASTCompositeTypeSpecifier) {
 						    name = ((ICASTCompositeTypeSpecifier) declSpec).getName();
 						} else if (declSpec instanceof ICASTEnumerationSpecifier) {
@@ -1193,22 +1193,22 @@ public class CVisitor extends ASTQueries {
 		}
 		return null;
 	}
-	
+
 	/**
 	 * Create an IType for an IASTDeclarator.
-	 * 
+	 *
 	 * @param declarator the IASTDeclarator whose IType will be created
 	 * @return the IType of the IASTDeclarator parameter
 	 */
 	public static IType createType(IASTDeclarator declarator) {
 	    IASTDeclSpecifier declSpec = null;
-		
+
 		IASTNode node = declarator.getParent();
 		while (node instanceof IASTDeclarator) {
 			declarator = (IASTDeclarator) node;
 			node = node.getParent();
 		}
-		
+
 		if (node instanceof IASTSimpleDeclaration) {
 			declSpec = ((IASTSimpleDeclaration) node).getDeclSpecifier();
 		} else if (node instanceof IASTParameterDeclaration) {
@@ -1218,9 +1218,9 @@ public class CVisitor extends ASTQueries {
 		} else if (node instanceof IASTTypeId) {
 		    declSpec = ((IASTTypeId) node).getDeclSpecifier();
 		}
-	
-		boolean isParameter = (node instanceof IASTParameterDeclaration || node.getParent() instanceof ICASTKnRFunctionDeclarator); 
-		
+
+		boolean isParameter = (node instanceof IASTParameterDeclaration || node.getParent() instanceof ICASTKnRFunctionDeclarator);
+
 		IType type = createType((ICASTDeclSpecifier) declSpec);
 		type = createType(type, declarator);
 
@@ -1230,7 +1230,7 @@ public class CVisitor extends ASTQueries {
         	while (paramType instanceof ITypedef) {
         		paramType = ((ITypedef) paramType).getType();
         	}
-        	        	
+
             //C99: 6.7.5.3-7 a declaration of a parameter as "array of type" shall be adjusted to "qualified pointer to type", where the
     		//type qualifiers (if any) are those specified within the[and] of the array type derivation
             if (paramType instanceof IArrayType) { // the index does not yet return ICArrayTypes
@@ -1248,29 +1248,29 @@ public class CVisitor extends ASTQueries {
 	            type = new CPointerType(paramType, 0);
 	        }
         }
-        
+
 		return type;
 	}
 	private static IType createType(IASTTypeId typeId) {
 		return createType(typeId.getAbstractDeclarator());
 	}
-	
+
 	public static IType createType(IType baseType, IASTDeclarator declarator) {
 	    if (declarator instanceof IASTFunctionDeclarator)
 	        return createType(baseType, (IASTFunctionDeclarator) declarator);
-		
+
 		IType type = baseType;
 		type = applyAttributes(type, declarator);
 		type = setupPointerChain(declarator.getPointerOperators(), type);
 		type = setupArrayChain(declarator, type);
-		
+
 	    IASTDeclarator nested = declarator.getNestedDeclarator();
 	    if (nested != null) {
 	    	return createType(type, nested);
 	    }
 	    return type;
 	}
-	
+
 	private static IType applyAttributes(IType type, IASTDeclarator declarator) {
 		if (type instanceof IBasicType) {
 			IBasicType basicType = (IBasicType) type;
@@ -1317,11 +1317,11 @@ public class CVisitor extends ASTQueries {
 	public static IType createType(IType returnType, IASTFunctionDeclarator declarator) {
 	    IType[] pTypes = getParmTypes(declarator);
 	    returnType = setupPointerChain(declarator.getPointerOperators(), returnType);
-	    
+
 	    boolean takesVarargs = declarator instanceof IASTStandardFunctionDeclarator &&
 	    		((IASTStandardFunctionDeclarator) declarator).takesVarArgs();
 	    IType type = new CFunctionType(returnType, pTypes, takesVarargs);
-	    
+
 	    IASTDeclarator nested = declarator.getNestedDeclarator();
 	    if (nested != null) {
 	    	return createType(type, nested);
@@ -1333,8 +1333,8 @@ public class CVisitor extends ASTQueries {
 	 * This is used to create a base IType corresponding to an IASTDeclarator and
 	 * the IASTDeclSpecifier.  This method doesn't have any recursive behavior and is used as
 	 * the foundation of the ITypes being created. The parameter isParm is used to specify whether
-	 * the declarator is a parameter or not.  
-	 * 
+	 * the declarator is a parameter or not.
+	 *
 	 * @param declSpec the IASTDeclSpecifier used to determine if the base type is a CQualifierType
 	 * 		or not
 	 * @return the base IType
@@ -1346,7 +1346,7 @@ public class CVisitor extends ASTQueries {
 			if (exp != null)
 				return exp.getExpressionType();
 			return new CBasicType(sds);
-		} 
+		}
 		IBinding binding = null;
 		IASTName name = null;
 		if (declSpec instanceof ICASTTypedefNameSpecifier) {
@@ -1354,20 +1354,20 @@ public class CVisitor extends ASTQueries {
 		} else if (declSpec instanceof IASTElaboratedTypeSpecifier) {
 			name = ((IASTElaboratedTypeSpecifier) declSpec).getName();
 		} else if (declSpec instanceof IASTCompositeTypeSpecifier) {
-			name = ((IASTCompositeTypeSpecifier) declSpec).getName();		
+			name = ((IASTCompositeTypeSpecifier) declSpec).getName();
 		} else if (declSpec instanceof IASTEnumerationSpecifier) {
 			name = ((IASTEnumerationSpecifier) declSpec).getName();
 		} else {
 			throw new IllegalArgumentException();
 		}
-		
+
 		if (name == null)
 			return new ProblemType(ISemanticProblem.TYPE_NO_NAME);
-		
+
 		binding = name.resolveBinding();
 		if (binding instanceof IType && !(binding instanceof IProblemBinding))
 		    return (IType) binding;
-		
+
 		return new ProblemType(ISemanticProblem.TYPE_UNRESOLVED_NAME);
 	}
 
@@ -1375,13 +1375,13 @@ public class CVisitor extends ASTQueries {
 	    if (declSpec.isConst() || declSpec.isVolatile() || declSpec.isRestrict()) {
 			return new CQualifierType(declSpec);
 		}
-	    
+
 	    return createBaseType(declSpec);
 	}
 
 	/**
 	 * Returns an IType[] corresponding to the parameter types of the IASTFunctionDeclarator parameter.
-	 * 
+	 *
 	 * @param decltor the IASTFunctionDeclarator to create an IType[] for its parameters
 	 * @return IType[] corresponding to the IASTFunctionDeclarator parameters
 	 */
@@ -1389,7 +1389,7 @@ public class CVisitor extends ASTQueries {
 		if (decltor instanceof IASTStandardFunctionDeclarator) {
 			IASTParameterDeclaration parms[] = ((IASTStandardFunctionDeclarator) decltor).getParameters();
 			IType parmTypes[] = new IType[parms.length];
-			
+
 		    for (int i = 0; i < parms.length; i++) {
 		    	parmTypes[i] = createType(parms[i].getDeclarator());
 		    }
@@ -1400,7 +1400,7 @@ public class CVisitor extends ASTQueries {
 		} else if (decltor instanceof ICASTKnRFunctionDeclarator) {
 			IASTName parms[] = ((ICASTKnRFunctionDeclarator) decltor).getParameterNames();
 			IType parmTypes[] = new IType[parms.length];
-			
+
 		    for (int i = 0; i < parms.length; i++) {
 		        IASTDeclarator dtor = getKnRParameterDeclarator((ICASTKnRFunctionDeclarator) decltor, parms[i]);
                 if (dtor != null)
@@ -1411,32 +1411,32 @@ public class CVisitor extends ASTQueries {
 			throw new IllegalArgumentException();
 		}
 	}
-	
+
     protected static IASTDeclarator getKnRParameterDeclarator(ICASTKnRFunctionDeclarator fKnRDtor, IASTName name) {
         IASTDeclaration[] decls = fKnRDtor.getParameterDeclarations();
         char[] n = name.toCharArray();
         for (int i = 0; i < decls.length; i++) {
             if (!(decls[i] instanceof IASTSimpleDeclaration))
                 continue;
-            
+
             IASTDeclarator[] dtors = ((IASTSimpleDeclaration) decls[i]).getDeclarators();
             for (IASTDeclarator dtor : dtors) {
                 if (CharArrayUtils.equals(dtor.getName().toCharArray(), n)) {
-                    return dtor; 
+                    return dtor;
                 }
             }
         }
         return null;
     }
-	
+
 	/**
 	 * Traverse through an array of IASTArrayModifier[] corresponding to the IASTDeclarator decl parameter.
-	 * For each IASTArrayModifier in the array, create a corresponding CArrayType object and 
+	 * For each IASTArrayModifier in the array, create a corresponding CArrayType object and
 	 * link it in a chain.  The returned IType is the start of the CArrayType chain that represents
 	 * the types of the IASTArrayModifier objects in the declarator.
-	 * 
+	 *
 	 * @param decl the IASTDeclarator containing the IASTArrayModifier[] array to create a CArrayType chain for
-	 * @param lastType the IType that the end of the CArrayType chain points to 
+	 * @param lastType the IType that the end of the CArrayType chain points to
 	 * @return the starting CArrayType at the beginning of the CArrayType chain
 	 */
 	private static IType setupArrayChain(IASTDeclarator decl, IType lastType) {
@@ -1450,30 +1450,30 @@ public class CVisitor extends ASTQueries {
 				lastType= arrayType;
 			}
 		}
-		
+
 		return lastType;
 	}
 
 	/**
-	 * Traverse through an array of IASTPointerOperator[] pointers and set up a pointer chain 
+	 * Traverse through an array of IASTPointerOperator[] pointers and set up a pointer chain
 	 * corresponding to the types of the IASTPointerOperator[].
-	 * 
+	 *
 	 * @param ptrs an array of IASTPointerOperator[] used to setup the pointer chain
 	 * @param lastType the IType that the end of the CPointerType chain points to
 	 * @return the starting CPointerType at the beginning of the CPointerType chain
 	 */
 	private static IType setupPointerChain(IASTPointerOperator[] ptrs, IType lastType) {
 		CPointerType pointerType = null;
-		
+
 		if (ptrs != null && ptrs.length > 0) {
 			pointerType = new CPointerType();
-											
+
 			if (ptrs.length == 1) {
 				pointerType.setType(lastType);
 				pointerType.setQualifiers(
 						(((ICASTPointer) ptrs[0]).isConst() ? CPointerType.IS_CONST : 0) |
 						(((ICASTPointer) ptrs[0]).isRestrict() ? CPointerType.IS_RESTRICT : 0) |
-						(((ICASTPointer) ptrs[0]).isVolatile() ? CPointerType.IS_VOLATILE : 0));				
+						(((ICASTPointer) ptrs[0]).isVolatile() ? CPointerType.IS_VOLATILE : 0));
 			} else {
 				CPointerType tempType = new CPointerType();
 				pointerType.setType(tempType);
@@ -1489,27 +1489,27 @@ public class CVisitor extends ASTQueries {
 							(((ICASTPointer) ptrs[i]).isRestrict() ? CPointerType.IS_RESTRICT : 0) |
 							(((ICASTPointer) ptrs[i]).isVolatile() ? CPointerType.IS_VOLATILE : 0));
 					tempType = (CPointerType) tempType.getType();
-				}					
+				}
 				tempType.setType(lastType);
 				tempType.setQualifiers(
 						(((ICASTPointer) ptrs[i]).isConst() ? CPointerType.IS_CONST : 0) |
 						(((ICASTPointer) ptrs[i]).isRestrict() ? CPointerType.IS_RESTRICT : 0) |
 						(((ICASTPointer) ptrs[i]).isVolatile() ? CPointerType.IS_VOLATILE : 0));
 			}
-			
+
 			return pointerType;
 		}
-		
+
 		return lastType;
 	}
-	
+
 	public static IASTProblem[] getProblems(IASTTranslationUnit tu) {
 		CollectProblemsAction action = new CollectProblemsAction();
 		tu.accept(action);
-		
+
 		return action.getProblems();
 	}
-	
+
 	public static IASTName[] getDeclarations(IASTTranslationUnit tu, IBinding binding) {
 		CollectDeclarationsAction action = new CollectDeclarationsAction(binding);
 		tu.accept(action);
@@ -1525,9 +1525,9 @@ public class CVisitor extends ASTQueries {
 
     public static IBinding[] findBindingsForContentAssist(IASTName name, boolean isPrefix) {
         ASTNodeProperty prop = name.getPropertyInParent();
-        
-        IBinding[] result = null; 
-        
+
+        IBinding[] result = null;
+
         if (prop == IASTFieldReference.FIELD_NAME) {
             result = (IBinding[]) findBinding((IASTFieldReference) name.getParent(), isPrefix);
         } else if (prop == ICASTFieldDesignator.FIELD_NAME) {
@@ -1545,7 +1545,7 @@ public class CVisitor extends ASTQueries {
         }
         return ArrayUtil.trim(IBinding.class, result);
     }
-    
+
 	private static IBinding[] findBindingForContentAssist(ICASTFieldDesignator fd, boolean isPrefix) {
 		IASTNode blockItem = getContainingBlockItem(fd);
 
@@ -1569,7 +1569,7 @@ public class CVisitor extends ASTQueries {
 			}
 			if (struct instanceof IType) {
 				IType t= unwrapTypedefs((IType) struct);
-			
+
 				if (t instanceof ICompositeType) {
 					return findFieldsByPrefix((ICompositeType) t, fd.getName().toCharArray());
 				}
@@ -1578,21 +1578,21 @@ public class CVisitor extends ASTQueries {
 
 		return null;
 	}
-	
+
 	public static IBinding[] findBindings(IScope scope, String name) {
         CASTName astName = new CASTName(name.toCharArray());
-	    
+
 	    // normal names
 	    astName.setPropertyInParent(STRING_LOOKUP_PROPERTY);
 	    Object o1 = lookup(scope, astName);
-        
+
 	    IBinding[] b1 = null;
 	    if (o1 instanceof IBinding) {
 	    	b1 = new IBinding[] { (IBinding) o1 };
 	    } else {
 	    	b1 = (IBinding[]) o1;
 	    }
-	    
+
 	    // structure names
         astName.setPropertyInParent(STRING_LOOKUP_TAGS_PROPERTY);
         Object o2 = lookup(scope, astName);
@@ -1603,7 +1603,7 @@ public class CVisitor extends ASTQueries {
 	    } else {
 	    	b2 = (IBinding[]) o2;
 	    }
-        
+
         // label names
         List b3 = new ArrayList<>();
         do {
@@ -1626,31 +1626,31 @@ public class CVisitor extends ASTQueries {
 				scope= null;
 			}
         } while (scope != null);
-        
+
         int c = (b1 == null ? 0 : b1.length) + (b2 == null ? 0 : b2.length) + b3.size();
 
         IBinding[] result = new IBinding[c];
-        
+
         if (b1 != null)
         	ArrayUtil.addAll(IBinding.class, result, b1);
-        
+
         if (b2 != null)
         	ArrayUtil.addAll(IBinding.class, result, b2);
-       
+
         ArrayUtil.addAll(IBinding.class, result, b3.toArray(new IBinding[b3.size()]));
-        
+
         return result;
     }
-    
+
 	static public boolean declaredBefore(IASTNode nodeA, IASTNode nodeB) {
 	    if (nodeB == null) return true;
 	    if (nodeB.getPropertyInParent() == STRING_LOOKUP_PROPERTY) return true;
 	    if (nodeB.getPropertyInParent() == STRING_LOOKUP_TAGS_PROPERTY) return true;
-	    
+
 	    if (nodeA instanceof ASTNode) {
 	    	ASTNode nd= (ASTNode) nodeA;
 	        int pointOfDecl = 0;
-	        
+
             ASTNodeProperty prop = nd.getPropertyInParent();
             // point of declaration for a name is immediately after its complete declarator and before its initializer
             if (prop == IASTDeclarator.DECLARATOR_NAME || nd instanceof IASTDeclarator) {
@@ -1662,7 +1662,7 @@ public class CVisitor extends ASTQueries {
                     pointOfDecl = ((ASTNode) init).getOffset() - 1;
                 else
                     pointOfDecl = ((ASTNode) dtor).getOffset() + ((ASTNode) dtor).getLength();
-            } 
+            }
             // point of declaration for an enumerator is immediately after it enumerator-definition
             else if (prop == IASTEnumerator.ENUMERATOR_NAME) {
                 IASTEnumerator enumtor = (IASTEnumerator) nd.getParent();
@@ -1675,11 +1675,11 @@ public class CVisitor extends ASTQueries {
             } else {
                 pointOfDecl = nd.getOffset() + nd.getLength();
             }
-            
+
             return pointOfDecl < ((ASTNode) nodeB).getOffset();
 	    }
-	    
-	    return true; 
+
+	    return true;
 	}
 
 	/**
@@ -1692,16 +1692,16 @@ public class CVisitor extends ASTQueries {
 		while (!(node instanceof IASTDeclaration)) {
 			if (node == null)
 				return null;
-			
+
 			node= node.getParent();
 		}
-				
+
 		// search for enclosing binding
 		IASTName name= null;
 		node= node.getParent();
 		for (; node != null; node= node.getParent()) {
 			if (node instanceof IASTFunctionDefinition) {
-				if (!allowFunction) 
+				if (!allowFunction)
 					continue;
 
 				IASTDeclarator dtor= findInnermostDeclarator(((IASTFunctionDefinition) node).getDeclarator());
@@ -1709,15 +1709,15 @@ public class CVisitor extends ASTQueries {
 					name= dtor.getName();
 				}
 				break;
-			} 
+			}
 			if (node instanceof IASTCompositeTypeSpecifier) {
 				name= ((IASTCompositeTypeSpecifier) node).getName();
 				break;
 			}
 		}
-		if (name == null) 
+		if (name == null)
 			return null;
-		
+
 		return name.resolveBinding();
 	}
 
@@ -1727,23 +1727,23 @@ public class CVisitor extends ASTQueries {
     public static boolean isNullPointerConstant(IASTExpression expression) {
     	// [6.3.2.3] p3: An integer constant expression with the value 0, or such an expression cast
     	// to void*, is called a null pointer constant.
-    	
+
     	// Unwrap extra parentheses.
-    	if (expression instanceof IASTUnaryExpression) { 
+    	if (expression instanceof IASTUnaryExpression) {
     		IASTUnaryExpression unaryExpression = (IASTUnaryExpression) expression;
     	    if (unaryExpression.getOperator() == IASTUnaryExpression.op_bracketedPrimary) {
     	    	return isNullPointerConstant(unaryExpression.getOperand());
     	    }
 	    }
-    	
+
     	if (expression instanceof IASTCastExpression) {
     		IASTCastExpression castExpression = (IASTCastExpression) expression;
 			IType castType = createType(castExpression.getTypeId());
     		if (castType.isSameType(CPointerType.VOID_POINTER)) {
     			return isNullPointerConstant(castExpression.getOperand());
     		}
-    	} 
-    	
+    	}
+
 		IType expressionType = expression.getExpressionType();
 		if (expressionType instanceof IBasicType) {
 			IValue value = ValueFactory.create(expression);
@@ -1751,7 +1751,7 @@ public class CVisitor extends ASTQueries {
 				return value.numberValue().longValue() == 0;
 			}
 		}
-		
+
 		return false;
     }
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GCCASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GCCASTSimpleDeclSpecifier.java
index ba0ab4191b6..f95e7fa3ba3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GCCASTSimpleDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GCCASTSimpleDeclSpecifier.java
@@ -22,7 +22,7 @@ public class GCCASTSimpleDeclSpecifier extends CASTSimpleDeclSpecifier implement
 
 	public GCCASTSimpleDeclSpecifier() {
 	}
-	
+
 	public GCCASTSimpleDeclSpecifier(IASTExpression typeofExpression) {
 		setTypeofExpression(typeofExpression);
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCASTGotoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCASTGotoStatement.java
index 29dd0d282b6..66d20af93e8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCASTGotoStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCASTGotoStatement.java
@@ -18,13 +18,13 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTAttributeOwner;
 
 /**
  * GNU C goto statement.
- * 
+ *
  * 
  * foo:
  *   void *labelPtr = &&foo;
  *   goto *labelPtr; // this is the statement
  * 
- * 
+ *
  * @since 5.8
  */
 public class GNUCASTGotoStatement extends ASTAttributeOwner implements IGNUASTGotoStatement {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java
index eb7c3e21789..a1f9abe9d3f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java
@@ -121,15 +121,15 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
             IParserLogService logService, ICParserExtensionConfiguration config) {
     	this(scanner, parserMode, logService, config, null);
     }
-    
+
     public GNUCSourceParser(IScanner scanner, ParserMode parserMode,
             IParserLogService logService, ICParserExtensionConfiguration config,
             IIndex index) {
         super(scanner, logService, parserMode, CNodeFactory.getDefault(),
-        		config.supportStatementsInExpressions(), 
+        		config.supportStatementsInExpressions(),
         		config.supportTypeofUnaryExpressions(),
         		config.supportAlignOfUnaryExpression(),
-        		config.supportKnRC(), 
+        		config.supportKnRC(),
         		config.supportAttributeSpecifiers(),
                 config.supportDeclspecSpecifiers(),
                 config.getBuiltinBindingsProvider());
@@ -139,7 +139,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         supportFunctionStyleAsm= config.supportFunctionStyleAssembler();
         this.index= index;
     }
-    
+
     @Override
     protected ICNodeFactory getNodeFactory() {
     	return (ICNodeFactory) super.getNodeFactory();
@@ -160,7 +160,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         final int offset = LA(1).getOffset();
         if (LT(1) != IToken.tLBRACE)
             return expression(ExprKind.eAssignment);
-        
+
         // it's an aggregate initializer
         consume(IToken.tLBRACE);
         IASTInitializerList result = getNodeFactory().newInitializerList();
@@ -209,7 +209,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         	boolean canContinue= LT(1) == IToken.tCOMMA;
         	if (canContinue)
         		consume();
-        	
+
         	switch (LT(1)) {
         	case IToken.tRBRACE:
         		int lastOffset = consume().getEndOffset();
@@ -220,7 +220,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         		setRange(result, offset, LA(1).getOffset());
         		return result;
         	}
-        	
+
         	if (!canContinue || LA(1).getOffset() == checkOffset) {
         		throwBacktrack(offset, LA(1).getEndOffset() - offset);
         	}
@@ -244,7 +244,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                         designatorList = new ArrayList<>(DEFAULT_DESIGNATOR_LIST_SIZE);
                     designatorList.add(fieldDesignator);
                     break;
-                    
+
             	case IToken.tLBRACKET:
                     offset = consume().getOffset();
                     IASTExpression constantExpression = expression();
@@ -266,13 +266,13 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                         designatorList.add(designator);
                     }
                     break;
-                    
+
                 default:
                 	return designatorList;
                 }
             }
-        } 
-        
+        }
+
 		// fix for 84176: if reach identifier and it's not a designator then return empty designator list
 		if (supportGCCStyleDesignators && lt1 == IToken.tIDENTIFIER && LT(2) == IToken.tCOLON) {
 			int offset= LA(1).getOffset();
@@ -282,10 +282,10 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 			setRange(designator, offset, lastOffset);
 			return Collections.singletonList(designator);
 		}
-		
+
         return null;
     }
-    
+
 	@Override
 	protected IASTDeclaration declaration(final DeclarationOptions declOption) throws EndOfFileException, BacktrackException {
         switch (LT(1)) {
@@ -307,7 +307,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 	private IASTDeclaration simpleDeclaration(final DeclarationOptions declOption) throws BacktrackException, EndOfFileException {
         if (LT(1) == IToken.tLBRACE)
             throwBacktrack(LA(1));
-        
+
         final int firstOffset= LA(1).getOffset();
         int endOffset= firstOffset;
         boolean insertSemi= false;
@@ -338,7 +338,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         	}
         	throw e;
         }
-        
+
         IASTDeclarator[] declarators= IASTDeclarator.EMPTY_DECLARATOR_ARRAY;
         if (dtor != null) {
         	declarators= new IASTDeclarator[]{dtor};
@@ -352,11 +352,11 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         			markBeforDtor= null;
         			dtor= addInitializer(e, declOption);
         		}
-        		declarators= ArrayUtil.append( IASTDeclarator.class, declarators, dtor);
+        		declarators= ArrayUtil.append(IASTDeclarator.class, declarators, dtor);
         	}
-        	declarators= ArrayUtil.removeNulls( IASTDeclarator.class, declarators );
+        	declarators= ArrayUtil.removeNulls(IASTDeclarator.class, declarators);
         }
-        
+
         final int lt1= LTcatchEOF(1);
         switch (lt1) {
         case IToken.tEOC:
@@ -404,13 +404,13 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         IASTSimpleDeclaration simpleDeclaration = getNodeFactory().newSimpleDeclaration(declSpec);
         for (IASTDeclarator declarator : declarators)
             simpleDeclaration.addDeclarator(declarator);
-        
+
     	setRange(simpleDeclaration, firstOffset, endOffset);
 		if (altDeclSpec != null && altDtor != null) {
 			simpleDeclaration = new CASTAmbiguousSimpleDeclaration(simpleDeclaration, altDeclSpec, altDtor);
 			setRange(simpleDeclaration, firstOffset, endOffset);
 		}
-        
+
         if (insertSemi) {
     		IASTProblem problem= createProblem(IProblem.MISSING_SEMICOLON, endOffset-1, 1);
     		throwBacktrack(problem, simpleDeclaration);
@@ -429,7 +429,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 			throwBacktrack(firstOffset, LA(1).getEndOffset() - firstOffset);
 
 		IASTFunctionDefinition funcDefinition = getNodeFactory().newFunctionDefinition(declSpec, (IASTFunctionDeclarator) fdtor, null);
-		
+
 		try {
 			IASTStatement s= handleFunctionBody();
 			funcDefinition.setBody(s);
@@ -456,14 +456,14 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 		// add built-in names to the scope
 		if (builtinBindingsProvider != null) {
 			IScope tuScope = translationUnit.getScope();
-			
+
 			IBinding[] bindings = builtinBindingsProvider.getBuiltinBindings(tuScope);
 			for (IBinding binding : bindings) {
 				ASTInternal.addBinding(tuScope, binding);
 			}
 		}
 	}
-	
+
 	@Override
 	protected IASTExpression expression() throws BacktrackException, EndOfFileException {
 		return expression(ExprKind.eExpression);
@@ -483,28 +483,28 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 		IASTExpression lastExpression= castExpression(CastExprCtx.eDirectlyInBExpr, null);
 		loop: while (true) {
 			lt1= LT(1);
-			switch(lt1) {
+			switch (lt1) {
 	        case IToken.tQUESTION:
 				conditionCount++;
 				//  ?  : 
 				// Precedence: 25 is lower than precedence of logical or; 0 is lower than precedence of expression
-				lastOperator= new BinaryOperator(lastOperator, lastExpression, lt1, 25, 0);  
+				lastOperator= new BinaryOperator(lastOperator, lastExpression, lt1, 25, 0);
 				if (LT(2) == IToken.tCOLON) {
 					// Gnu extension: The expression after '?' can be omitted.
 					consume();				// Consume operator
 					lastExpression= null; 	// Next cast expression is just null
 					continue;
-				} 
+				}
 				allowAssignment= true;  // assignment expressions will be subsumed by the conditional expression
 				break;
-				
+
 			case IToken.tCOLON:
-				if (--conditionCount < 0) 
+				if (--conditionCount < 0)
 					break loop;
-				
+
 				//  ?  : 
-				// Precedence: 0 is lower than precedence of expression; 15 is lower than precedence of assignment; 
-	        	lastOperator= new BinaryOperator(lastOperator, lastExpression, lt1, 0, 15);  
+				// Precedence: 0 is lower than precedence of expression; 15 is lower than precedence of assignment;
+	        	lastOperator= new BinaryOperator(lastOperator, lastExpression, lt1, 0, 15);
 				allowAssignment= true;  // assignment expressions will be subsumed by the conditional expression
 	        	break;
 
@@ -529,11 +529,11 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 				if (!allowAssignment && conditionCount == 0)
 					break loop;
 	        	// Assignments group right to left
-	        	lastOperator= new BinaryOperator(lastOperator, lastExpression, lt1, 21, 20); 
+	        	lastOperator= new BinaryOperator(lastOperator, lastExpression, lt1, 21, 20);
 	        	break;
-	        	
+
 	        case IToken.tOR:
-	        	lastOperator= new BinaryOperator(lastOperator, lastExpression, lt1, 30, 31); 
+	        	lastOperator= new BinaryOperator(lastOperator, lastExpression, lt1, 30, 31);
 	        	break;
 	        case IToken.tAND:
 	        	lastOperator= new BinaryOperator(lastOperator, lastExpression, lt1, 40, 41);
@@ -575,18 +575,18 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
             default:
             	break loop;
 			}
-	         
+
 			consume(); 											// consume operator
 			lastExpression= castExpression(CastExprCtx.eDirectlyInBExpr, null); 	// next cast expression
 		}
-		
+
     	// Check for incomplete conditional expression
     	if (lt1 != IToken.tEOC && conditionCount > 0)
     		throwBacktrack(LA(1));
-    	
+
     	return buildExpression(lastOperator, lastExpression);
 	}
-    
+
     @Override
 	protected IASTExpression buildBinaryExpression(int operator, IASTExpression expr1, IASTInitializerClause expr2, int lastOffset) {
         IASTBinaryExpression result = getNodeFactory().newBinaryExpression(operator, expr1, (IASTExpression) expr2);
@@ -594,7 +594,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         ((ASTNode) result).setOffsetAndLength(o, lastOffset - o);
         return result;
     }
-    
+
     @Override
 	protected IASTExpression unaryExpression(CastExprCtx ctx, ITemplateIdStrategy strat) throws EndOfFileException, BacktrackException {
         switch (LT(1)) {
@@ -617,11 +617,11 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         case IToken.tDECR:
             return unaryExpression(IASTUnaryExpression.op_prefixDecr, ctx, strat);
         case IToken.t_sizeof:
-        	return parseTypeidInParenthesisOrUnaryExpression(false, consume().getOffset(), 
+        	return parseTypeidInParenthesisOrUnaryExpression(false, consume().getOffset(),
         			IASTTypeIdExpression.op_sizeof, IASTUnaryExpression.op_sizeof, ctx, strat);
         case IToken.t__Alignof:
         case IGCCToken.t___alignof__:
-        	return parseTypeidInParenthesisOrUnaryExpression(false, consume().getOffset(), 
+        	return parseTypeidInParenthesisOrUnaryExpression(false, consume().getOffset(),
         			IASTTypeIdExpression.op_alignof, IASTUnaryExpression.op_alignOf, ctx, strat);
         default:
             return postfixExpression(ctx, strat);
@@ -632,8 +632,8 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         IASTExpression firstExpression = null;
         switch (LT(1)) {
         case IToken.tLPAREN:
-            // ( type-name ) { initializer-list }
-            // ( type-name ) { initializer-list , }
+            // (type-name) { initializer-list }
+            // (type-name) { initializer-list , }
         	IToken m = mark();
         	try {
         		int offset = consume().getOffset();
@@ -643,14 +643,14 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         			IASTInitializer i = (IASTInitializerList) initClause();
         			firstExpression= getNodeFactory().newTypeIdInitializerExpression(t, i);
         			setRange(firstExpression, offset, calculateEndOffset(i));
-        			break;        
+        			break;
         		}
         	} catch (BacktrackException bt) {
         	}
-        	backup(m); 
+        	backup(m);
         	firstExpression= primaryExpression(ctx, strat);
         	break;
-        	
+
         default:
             firstExpression = primaryExpression(ctx, strat);
         	break;
@@ -674,7 +674,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 				default:
 					throw backtrack;
 				}
-				
+
                 IASTArraySubscriptExpression s = getNodeFactory().newArraySubscriptExpression(firstExpression, secondExpression);
                 ((ASTNode) s).setOffsetAndLength(((ASTNode) firstExpression).getOffset(),
                 		last - ((ASTNode) firstExpression).getOffset());
@@ -694,22 +694,22 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                 	} else if (lt1 == IToken.tEOC) {
                 		endOffset= LA(1).getEndOffset();
                 		break;
-                	} 
+                	}
                 	if (isFirst) {
                 		isFirst= false;
                 	} else {
                 		consume(IToken.tCOMMA);
                 	}
-                	
+
                 	IASTExpression expr= expression(ExprKind.eAssignment);
                 	if (argList == null) {
                 		argList= new ArrayList<>();
                 	}
                 	argList.add(expr);
                 }
-                
+
 				final IASTExpression[] args;
-				if (argList == null) { 
+				if (argList == null) {
 					args= IASTExpression.EMPTY_EXPRESSION_ARRAY;
 				} else {
 					args= argList.toArray(new IASTExpression[argList.size()]);
@@ -734,7 +734,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                 IToken dot = consume();
                 IASTName name = identifier();
                 if (name == null)
-                	throwBacktrack(((ASTNode) firstExpression).getOffset(), 
+                	throwBacktrack(((ASTNode) firstExpression).getOffset(),
                 			((ASTNode) firstExpression).getLength() + dot.getLength());
                 IASTFieldReference result = getNodeFactory().newFieldReference(name, firstExpression);
                 result.setIsPointerDereference(false);
@@ -748,7 +748,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                 IToken arrow = consume();
                 name = identifier();
                 if (name == null)
-                	throwBacktrack(((ASTNode) firstExpression).getOffset(), 
+                	throwBacktrack(((ASTNode) firstExpression).getOffset(),
                 			((ASTNode) firstExpression).getLength() + arrow.getLength());
                 result = getNodeFactory().newFieldReference(name, firstExpression);
                 result.setIsPointerDereference(true);
@@ -857,10 +857,10 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 
     /**
      * Parse a Pointer Operator.
-     * 
+     *
      * ptrOperator : "*" (cvQualifier)* | "&" | ::? nestedNameSpecifier "*"
      * (cvQualifier)*
-     * 
+     *
      * @throws BacktrackException to request a backtrack
      */
     protected void consumePointerOperators(List pointerOps)
@@ -912,7 +912,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
     }
 
 
-	private final static int INLINE=0x1, CONST=0x2, RESTRICT=0x4, VOLATILE=0x8, 
+	private final static int INLINE=0x1, CONST=0x2, RESTRICT=0x4, VOLATILE=0x8,
 	    SHORT=0x10,	UNSIGNED= 0x20, SIGNED=0x40, COMPLEX=0x80, IMAGINARY=0x100;
 
     @Override
@@ -930,7 +930,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
     		IASTName identifier= null;
     		IASTExpression typeofExpression= null;
     		IASTProblem problem= null;
-        
+
     		boolean encounteredRawType= false;
     		boolean encounteredTypename= false;
 
@@ -1106,7 +1106,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
     			case IToken.tIDENTIFIER:
     			case IToken.tCOMPLETION:
     			case IToken.tEOC:
-    				if (encounteredTypename || encounteredRawType) 
+    				if (encounteredTypename || encounteredRawType)
     					break declSpecifiers;
 
     				if ((endOffset != offset || declOption.fAllowEmptySpecifier) && LT(1) != IToken.tCOMPLETION) {
@@ -1169,7 +1169,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 
     				simpleType= IASTSimpleDeclSpecifier.t_typeof;
     				consume(IGCCToken.t_typeof);
-    				typeofExpression = parseTypeidInParenthesisOrUnaryExpression(false, LA(1).getOffset(), 
+    				typeofExpression = parseTypeidInParenthesisOrUnaryExpression(false, LA(1).getOffset(),
     						IASTTypeIdExpression.op_typeof, -1, CastExprCtx.eNotInBExpr, null);
 
     				encounteredTypename= true;
@@ -1184,7 +1184,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
     				}
     				break declSpecifiers;
     			}
-            
+
     			if (encounteredRawType && encounteredTypename)
     				throwBacktrack(LA(1));
     		}
@@ -1195,7 +1195,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
     				throwBacktrack(LA(1));
     			}
     		}
-        
+
     		if (result != null) {
     			configureDeclSpec(result, storageClass, options);
     			if ((options & RESTRICT) != 0) {
@@ -1210,7 +1210,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
     			setRange(result, offset, endOffset);
     			if (problem != null)
     				throwBacktrack(problem, result);
-    		} else if (identifier != null) { 
+    		} else if (identifier != null) {
     			result= buildNamedTypeSpecifier(identifier, storageClass, options, offset, endOffset);
     		} else {
     			result= buildSimpleDeclSpec(storageClass, simpleType, options, isLong, typeofExpression, offset, endOffset);
@@ -1245,7 +1245,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 	private ICASTSimpleDeclSpecifier buildSimpleDeclSpec(int storageClass, int simpleType,
 			int options, int isLong, IASTExpression typeofExpression, int offset, int endOffset) {
 		ICASTSimpleDeclSpecifier declSpec= getNodeFactory().newSimpleDeclSpecifier();
-		
+
     	configureDeclSpec(declSpec, storageClass, options);
 		declSpec.setType(simpleType);
 		declSpec.setLong(isLong == 1);
@@ -1274,17 +1274,17 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 
     /**
      * Parse a class/struct/union definition.
-     * 
+     *
      * classSpecifier : classKey name (baseClause)? "{" (memberSpecification)*
      * "}"
-     * 
+     *
      * @throws BacktrackException to request a backtrack
      */
     protected ICASTCompositeTypeSpecifier structOrUnionSpecifier() throws BacktrackException, EndOfFileException {
         int classKind = 0;
         IToken mark= mark();
         final int offset= mark.getOffset();
-        
+
         // class key
         switch (LT(1)) {
         case IToken.t_struct:
@@ -1302,16 +1302,16 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 
         // if __attribute__ or __declspec occurs after struct/union/class and before the identifier
         __attribute_decl_seq(supportAttributeSpecifiers, supportDeclspecSpecifiers);
-        
+
         // class name
         IASTName name = null;
         if (LT(1) == IToken.tIDENTIFIER) {
             name = identifier();
         }
 
-        // if __attribute__ or __declspec occurs after struct/union/class identifier and before the { or ;        
+        // if __attribute__ or __declspec occurs after struct/union/class identifier and before the { or ;
         __attribute_decl_seq(supportAttributeSpecifiers, supportDeclspecSpecifiers);
-        
+
         if (LT(1) != IToken.tLBRACE) {
             IToken errorPoint = LA(1);
             backup(mark);
@@ -1345,7 +1345,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
             backup(t);
             throwBacktrack(t.getOffset(), t.getLength());
         }
-        
+
         // if __attribute__ or __declspec occurs after struct/union/class and before the identifier
         __attribute_decl_seq(supportAttributeSpecifiers, supportDeclspecSpecifiers);
 
@@ -1356,7 +1356,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
     }
 
     @Override
-	protected IASTDeclarator initDeclarator(IASTDeclSpecifier declspec, final DeclarationOptions option) 
+	protected IASTDeclarator initDeclarator(IASTDeclSpecifier declspec, final DeclarationOptions option)
     		throws EndOfFileException, BacktrackException, FoundAggregateInitializer {
         IASTDeclarator d = declarator(declspec, option);
 
@@ -1366,10 +1366,10 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 				throwBacktrack(LA(1));
 			}
 		}
-		
-        if (lt1 == IToken.tASSIGN && LT(2) == IToken.tLBRACE) 
+
+        if (lt1 == IToken.tASSIGN && LT(2) == IToken.tLBRACE)
         	throw new FoundAggregateInitializer(declspec, d);
-       
+
         IASTInitializer i = optionalInitializer(d, option);
         if (i != null) {
             d.setInitializer(i);
@@ -1377,7 +1377,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         }
         return d;
     }
-    
+
     protected IASTDeclarator declarator(IASTDeclSpecifier declSpec, DeclarationOptions option) throws EndOfFileException, BacktrackException {
         final int startingOffset = LA(1).getOffset();
         int endOffset = startingOffset;
@@ -1387,11 +1387,11 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         if (!pointerOps.isEmpty()) {
         	endOffset = calculateEndOffset(pointerOps.get(pointerOps.size() - 1));
         }
-            
+
         // Accept __attribute__ or __declspec between pointer operators and declarator.
         List attributes =
         		__attribute_decl_seq(supportAttributeSpecifiers, supportDeclspecSpecifiers);
-        
+
         // Look for identifier or nested declarator
         final int lt1= LT(1);
         if (lt1 == IToken.tIDENTIFIER) {
@@ -1402,18 +1402,18 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         	endOffset= calculateEndOffset(declaratorName);
         	return declarator(pointerOps, attributes, declaratorName, null, startingOffset,
         			endOffset, option);
-        } 
-        
+        }
+
         if (lt1 == IToken.tLPAREN) {
         	IASTDeclarator cand1= null;
         	IToken cand1End= null;
-        	// try an abstract function declarator 
+        	// try an abstract function declarator
         	if (option.fAllowAbstract) {
         		final IToken mark= mark();
         		try {
         			cand1= declarator(pointerOps, attributes, getNodeFactory().newName(), null,
         					startingOffset, endOffset, option);
-            		if (option.fRequireAbstract) 
+            		if (option.fRequireAbstract)
             			return cand1;
 
             		cand1End= LA(1);
@@ -1426,7 +1426,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         		consume();
         		if (LT(1) == IToken.tRPAREN)
         			throwBacktrack(LA(1));
-        		
+
         		final IASTDeclarator nested= declarator(declSpec, option);
         		endOffset= consume(IToken.tRPAREN).getEndOffset();
         		final IASTDeclarator cand2= declarator(pointerOps, attributes, null, nested,
@@ -1440,9 +1440,9 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                     return result;
         		}
         		// use the longer variant
-        		if (cand1End.getOffset() < cand2End.getOffset()) 
+        		if (cand1End.getOffset() < cand2End.getOffset())
         			return cand2;
-        		
+
         	} catch (BacktrackException e) {
         		if (cand1 == null)
         			throw e;
@@ -1450,7 +1450,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
     		backup(cand1End);
     		return cand1;
         }
-        
+
         // try abstract declarator
         if (!option.fAllowAbstract) {
         	throwBacktrack(LA(1));
@@ -1458,10 +1458,10 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         return declarator(pointerOps, attributes, getNodeFactory().newName(), null, startingOffset,
         		endOffset, option);
     }
-        
+
 	private IASTDeclarator declarator(final List pointerOps,
 			List attributes, final IASTName declaratorName,
-			final IASTDeclarator nestedDeclarator, final int startingOffset, int endOffset, 
+			final IASTDeclarator nestedDeclarator, final int startingOffset, int endOffset,
 			final DeclarationOptions option) throws EndOfFileException, BacktrackException {
         IASTDeclarator result= null;
         int lt1;
@@ -1469,24 +1469,24 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         	lt1= LTcatchEOF(1);
         	switch (lt1) {
         	case IToken.tLPAREN:
-        		result= functionDeclarator(isAbstract(declaratorName, nestedDeclarator) 
+        		result= functionDeclarator(isAbstract(declaratorName, nestedDeclarator)
         				? DeclarationOptions.PARAMETER : DeclarationOptions.C_PARAMETER_NON_ABSTRACT);
         		setDeclaratorID(result, declaratorName, nestedDeclarator);
         		break loop;
-        		
+
         	case IToken.tLBRACKET:
         		result= arrayDeclarator();
         		setDeclaratorID(result, declaratorName, nestedDeclarator);
         		break loop;
-        		
+
         	case IToken.tCOLON:
         		if (!option.fAllowBitField)
         			throwBacktrack(LA(1));
-        		
+
         		result= bitFieldDeclarator();
         		setDeclaratorID(result, declaratorName, nestedDeclarator);
         		break loop;
-        		
+
         	case IGCCToken.t__attribute__: // if __attribute__ is after a declarator
         		if (!supportAttributeSpecifiers)
         			throwBacktrack(LA(1));
@@ -1545,7 +1545,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 	}
 
 	private void setDeclaratorID(IASTDeclarator declarator, IASTName declaratorName, IASTDeclarator nestedDeclarator) {
-		if (nestedDeclarator != null) { 
+		if (nestedDeclarator != null) {
 			declarator.setNestedDeclarator(nestedDeclarator);
 			declarator.setName(getNodeFactory().newName());
 		} else {
@@ -1556,7 +1556,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 	private IASTDeclarator functionDeclarator(DeclarationOptions paramOption) throws EndOfFileException, BacktrackException {
 		IToken last = consume(IToken.tLPAREN);
 		int startOffset= last.getOffset();
-		
+
 		// check for K&R C parameters (0 means it's not K&R C)
 		if (fPreventKnrCheck == 0 && supportKnRC) {
 			fPreventKnrCheck++;
@@ -1610,7 +1610,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 						}
 					}
 
-					parmDeclarations = ArrayUtil.removeNulls( IASTDeclaration.class, parmDeclarations );
+					parmDeclarations = ArrayUtil.removeNulls(IASTDeclaration.class, parmDeclarations);
 		            ICASTKnRFunctionDeclarator functionDecltor = getNodeFactory().newKnRFunctionDeclarator(parmNames, parmDeclarations);
 		            ((ASTNode) functionDecltor).setOffsetAndLength(startOffset, endOffset-startOffset);
 		            return functionDecltor;
@@ -1624,7 +1624,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 		boolean encounteredVarArgs= false;
 		List parameters= null;
 		int endOffset= last.getEndOffset();
-		
+
 		paramLoop: while (true) {
 			switch (LT(1)) {
 			case IToken.tRPAREN:
@@ -1642,7 +1642,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 			default:
 				if (seenParameter)
 					throwBacktrack(startOffset, endOffset - startOffset);
-			
+
 				IASTParameterDeclaration pd = parameterDeclaration(paramOption);
 				endOffset = calculateEndOffset(pd);
 				if (parameters == null)
@@ -1664,9 +1664,9 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 	}
 
 	private IASTSimpleDeclaration checkKnrParameterDeclaration(IASTDeclaration decl, final IASTName[] parmNames) {
-		if (!(decl instanceof IASTSimpleDeclaration)) 
+		if (!(decl instanceof IASTSimpleDeclaration))
 			return null;
-		
+
 		IASTSimpleDeclaration declaration= ((IASTSimpleDeclaration) decl);
 		IASTDeclarator[] decltors = declaration.getDeclarators();
 		for (IASTDeclarator decltor : decltors) {
@@ -1693,35 +1693,35 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 		consumeArrayModifiers(arrayMods);
 		if (arrayMods.isEmpty())
 			throwBacktrack(LA(1));
-		
+
 		final int endOffset = calculateEndOffset(arrayMods.get(arrayMods.size() - 1));
 		final IASTArrayDeclarator d = getNodeFactory().newArrayDeclarator(null);
 		for (IASTArrayModifier m : arrayMods) {
             d.addArrayModifier(m);
         }
-		
+
 		((ASTNode) d).setOffsetAndLength(start, endOffset-start);
 		return d;
 	}
-	
-	
+
+
 	/**
 	 * Parses for a bit field declarator starting with the colon
 	 */
 	private IASTFieldDeclarator bitFieldDeclarator() throws EndOfFileException, BacktrackException {
 		int start= consume(IToken.tCOLON).getOffset();
-		
+
 		final IASTExpression bitField = constantExpression();
 		final int endOffset = calculateEndOffset(bitField);
-		
+
         IASTFieldDeclarator d = getNodeFactory().newFieldDeclarator(null, bitField);
         d.setBitFieldSize(bitField);
 
         ((ASTNode) d).setOffsetAndLength(start, endOffset-start);
 		return d;
 	}
-	
-	
+
+
     @Override
 	protected IASTName identifier() throws EndOfFileException, BacktrackException {
     	final IToken t= LA(1);
@@ -1732,7 +1732,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
             n = getNodeFactory().newName(t.getCharImage());
             setRange(n, t.getOffset(), t.getEndOffset());
             break;
-            
+
     	case IToken.tCOMPLETION:
     	case IToken.tEOC:
     		consume();
@@ -1740,11 +1740,11 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
             setRange(n, t.getOffset(), t.getEndOffset());
             createCompletionNode(t).addName(n);
     		return n;
-    		
+
     	default:
     		throw backtrack;
     	}
-    	
+
         return n;
     }
 
@@ -1829,7 +1829,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         IASTDeclarator declarator = null;
         IASTDeclSpecifier altDeclSpec = null;
         IASTDeclarator altDeclarator = null;
-        
+
         try {
         	fPreventKnrCheck++;
         	Decl decl= declSpecifierSequence_initDeclarator(option, false);
@@ -1939,7 +1939,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                     previousWasIdentifier = true;
                     parmCount++;
                 } else if (LT(1) == IToken.tRPAREN) {
-                	if (!previousWasIdentifier) { 
+                	if (!previousWasIdentifier) {
                 		// if the first token encountered is tRPAREN then it's not K&R C
                 		// the first token when counting K&R C parms is always an identifier
                 		backup(mark);
@@ -1971,12 +1971,12 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 				} catch (BacktrackException e) {
 					backup(mark);
 					return 0;
-				}            	
-            	
+				}
+
                	final IToken t = LA(1);
                	if (t.getType() == IToken.tEOC)
                		break;
-               	
+
                	final int next = t.hashCode();
                	if (next == previous) { // infinite loop detected
                		break;
@@ -2028,7 +2028,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
 	protected IASTAmbiguousExpression createAmbiguousExpression() {
         return new CASTAmbiguousExpression();
     }
-    
+
 	@Override
 	protected IASTAmbiguousExpression createAmbiguousBinaryVsCastExpression(IASTBinaryExpression binary, IASTCastExpression castExpr) {
 		return new CASTAmbiguousBinaryVsCastExpression(binary, castExpr);
@@ -2055,14 +2055,14 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
             	if (if_statement != null) {
             		if_statement.setElseClause(new_if);
             	}
-            	return result != null ? result : new_if; 
+            	return result != null ? result : new_if;
             }
             consume(IToken.tRPAREN);
-    
+
             IASTStatement thenClause = statement();
             IASTIfStatement new_if_statement = getNodeFactory().newIfStatement(null, null, null);
             ((ASTNode) new_if_statement).setOffset(so);
-            if( condition != null ) // shouldn't be possible but failure in condition() makes it so
+            if (condition != null) // shouldn't be possible but failure in condition() makes it so
             {
                 new_if_statement.setConditionExpression(condition);
             }
@@ -2075,7 +2075,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                 consume();
                 if (LT(1) == IToken.t_if) {
                     // an else if, don't recurse, just loop and do another if
-    
+
                     if (if_statement != null) {
                         if_statement.setElseClause(new_if_statement);
                         ((ASTNode) if_statement).setLength(calculateEndOffset(new_if_statement)
@@ -2085,7 +2085,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                         result = if_statement;
                     if (result == null)
                         result = new_if_statement;
-    
+
                     if_statement = new_if_statement;
                     continue if_loop;
                 }
@@ -2101,7 +2101,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                     if_statement = new_if_statement;
                 }
             } else {
-            	if( thenClause != null )
+            	if (thenClause != null)
                     ((ASTNode) new_if_statement).setLength(calculateEndOffset(thenClause) - start);
                 if (if_statement != null) {
                     if_statement.setElseClause(new_if_statement);
@@ -2111,12 +2111,12 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
                     result = if_statement;
                 if (result == null)
                     result = new_if_statement;
-    
+
                 if_statement = new_if_statement;
             }
             break if_loop;
         }
-    
+
         reconcileLengths(result);
         return result;
     }
@@ -2183,7 +2183,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
         default:
             throw backtrack;
         }
-        
+
         IASTForStatement for_statement = getNodeFactory().newForStatement(init, for_condition, iterationExpression, null);
         if (LT(1) != IToken.tEOC) {
         	IASTStatement for_body = statement();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalBinding.java
index 06adeb95f7a..f07bc3ecac8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalBinding.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalBinding.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    Andrew Niefer (IBM Rational Software) - Initial API and implementation 
+ *    Andrew Niefer (IBM Rational Software) - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.c;
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalFunction.java
index 16bf67de009..f44beaef040 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalFunction.java
@@ -24,7 +24,7 @@ public interface ICInternalFunction extends ICInternalBinding {
 
 	/**
 	 * Returns whether there is a static declaration for this function.
-	 * 
+	 *
 	 * @param resolveAll
 	 *            checks for names that are not yet resolved to this binding.
 	 */
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTASMDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTASMDeclaration.java
index b757ff42c98..bcf35d4367f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTASMDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTASMDeclaration.java
@@ -31,7 +31,7 @@ public class CPPASTASMDeclaration extends ASTNode implements IASTASMDeclaration
 	public CPPASTASMDeclaration copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTASMDeclaration copy(CopyStyle style) {
 		CPPASTASMDeclaration copy = new CPPASTASMDeclaration();
@@ -41,9 +41,9 @@ public class CPPASTASMDeclaration extends ASTNode implements IASTASMDeclaration
 
 	@Override
 	public String getAssembly() {
-        if( assembly == null ) 
+        if (assembly == null)
         	return ""; //$NON-NLS-1$
-        return new String( assembly );
+        return new String(assembly);
     }
 
     @Override
@@ -53,16 +53,16 @@ public class CPPASTASMDeclaration extends ASTNode implements IASTASMDeclaration
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitDeclarations ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitDeclarations) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
-        if( action.shouldVisitDeclarations ){
-		    switch( action.leave( this ) ){
+        if (action.shouldVisitDeclarations) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAliasDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAliasDeclaration.java
index c019aa916be..9cf3b2c2972 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAliasDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAliasDeclaration.java
@@ -20,7 +20,7 @@ public class CPPASTAliasDeclaration extends CPPASTAttributeOwner implements ICPP
 	private IASTName aliasName;
 	private ICPPASTTypeId mappingTypeId;
 
-	public CPPASTAliasDeclaration(IASTName aliasName, ICPPASTTypeId mappingTypeId){
+	public CPPASTAliasDeclaration(IASTName aliasName, ICPPASTTypeId mappingTypeId) {
 		setAlias(aliasName);
 		setMappingTypeId(mappingTypeId);
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAlignmentSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAlignmentSpecifier.java
index a2b0ed91c0a..6064ad73817 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAlignmentSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAlignmentSpecifier.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Nathan Ridge - Initial API and implementation
  *******************************************************************************/
@@ -24,19 +24,19 @@ public class CPPASTAlignmentSpecifier extends ASTNode implements ICPPASTAlignmen
 	// Precisely one of these is null.
 	private IASTExpression fExpression;
 	private IASTTypeId fTypeId;
-	
+
 	CPPASTAlignmentSpecifier(IASTExpression expression) {
 		fExpression = expression;
 		fExpression.setParent(this);
 		fExpression.setPropertyInParent(ALIGNMENT_EXPRESSION);
 	}
-	
+
 	CPPASTAlignmentSpecifier(IASTTypeId typeId) {
 		fTypeId = typeId;
 		fTypeId.setParent(this);
 		fTypeId.setPropertyInParent(ALIGNMENT_TYPEID);
 	}
-	
+
 	@Override
 	public IASTExpression getExpression() {
 		return fExpression;
@@ -62,7 +62,7 @@ public class CPPASTAlignmentSpecifier extends ASTNode implements ICPPASTAlignmen
 		}
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public boolean accept(ASTVisitor visitor) {
 		if (fExpression != null) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguityResolver.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguityResolver.java
index 013748d4cc8..bb3cacde619 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguityResolver.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguityResolver.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import java.util.ArrayDeque;
@@ -51,7 +51,7 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
 	/*
 	 * The current nesting level of class definitions.
 	 * Used to handle processing of method bodies, which are deferred
-	 * until the end of the outermost class definition. 
+	 * until the end of the outermost class definition.
 	 */
 	private int fClassNestingLevel= 0;
 	private HashSet fRepopulate= new HashSet<>();
@@ -60,7 +60,7 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
 	 * Currently used only for method bodies.
 	 */
 	private Deque fDeferredNodes = new ArrayDeque<>();
-	
+
 	/*
 	 * Used by visit(IASTDeclaration) to determine whether it should
 	 * process a function declaration now instead of deferring it
@@ -103,7 +103,7 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
 				}
 				if (node instanceof IASTExpression) {
 					break;
-				} 
+				}
 				node= node.getParent();
 			}
 		} else if (node instanceof IASTDeclaration) {
@@ -145,15 +145,15 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
 	}
 
 	private boolean shouldProcessNow(IASTFunctionDefinition func) {
-		return !fProcessNow.isEmpty() && fProcessNow.peek() == func; 
+		return !fProcessNow.isEmpty() && fProcessNow.peek() == func;
 	}
-	
+
 	@Override
 	public int visit(IASTDeclaration decl) {
 		if (decl instanceof IASTFunctionDefinition && !shouldProcessNow((IASTFunctionDefinition) decl)) {
 			final IASTFunctionDefinition fdef= (IASTFunctionDefinition) decl;
 
-			// Visit the declarator first, it may contain ambiguous template arguments needed 
+			// Visit the declarator first, it may contain ambiguous template arguments needed
 			// for associating the template declarations.
 			ICPPASTFunctionDeclarator fdecl = (ICPPASTFunctionDeclarator) fdef.getDeclarator();
 			fSkipInitializers++; // Initializers may refer to class members declared later.
@@ -166,8 +166,8 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
 				trailingReturnType.accept(this);
 			}
 			if (fClassNestingLevel > 0) {
-				// If this is a method defined inline inside a class declaration, defer visiting 
-				// the remaining parts of the method (notably the body) until the end of the 
+				// If this is a method defined inline inside a class declaration, defer visiting
+				// the remaining parts of the method (notably the body) until the end of the
 				// class declaration has been reached.
 				fDeferredNodes.add(decl);
 			} else {
@@ -179,7 +179,7 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
 				fProcessNow.pop();
 			}
 			return PROCESS_SKIP;
-		} 
+		}
 		return PROCESS_CONTINUE;
 	}
 
@@ -200,7 +200,7 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
 			} else if (declspec instanceof ICPPASTElaboratedTypeSpecifier
 					&& sdecl.getDeclarators().length == 0) {
 				ASTNodeProperty prop = declaration.getPropertyInParent();
-				if (prop == ICPPASTTemplateDeclaration.OWNED_DECLARATION 
+				if (prop == ICPPASTTemplateDeclaration.OWNED_DECLARATION
 						|| prop == ICPPASTTemplateSpecialization.OWNED_DECLARATION) {
 					ICPPASTElaboratedTypeSpecifier elab= (ICPPASTElaboratedTypeSpecifier) declspec;
 					if (!elab.isFriend()) {
@@ -226,7 +226,7 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
 
 	@Override
 	public int leave(IASTTranslationUnit tu) {
-		// As deferred method bodies are processed at the end of outermost 
+		// As deferred method bodies are processed at the end of outermost
 		// class definitions, there should be none left when the end of
 		// the translation unit is reached.
 		assert fDeferredNodes.isEmpty();
@@ -249,13 +249,13 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
 	}
 
 	/**
-	 * If 'node' has been deferred for later processing, process it now. 
+	 * If 'node' has been deferred for later processing, process it now.
 	 */
 	public void resolvePendingAmbiguities(IASTNode node) {
 		for (IASTNode deferredNode : fDeferredNodes) {
 			if (deferredNode == node) {
 				// Temporarily set the class nesting level to 0,
-				// to prevent the node just being deferred again. 
+				// to prevent the node just being deferred again.
 				int classNestingLevel = fClassNestingLevel;
 				fClassNestingLevel = 0;
 				try {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousAlignmentSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousAlignmentSpecifier.java
index 63b0eb955fc..ea3fd8ccc7f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousAlignmentSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousAlignmentSpecifier.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Nathan Ridge - Initial API and implementation
  *******************************************************************************/
@@ -21,12 +21,12 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode;
 public class CPPASTAmbiguousAlignmentSpecifier extends ASTAmbiguousNode implements ICPPASTAlignmentSpecifier {
 	IASTAlignmentSpecifier fExpression;
 	IASTAlignmentSpecifier fTypeId;
-	
+
 	CPPASTAmbiguousAlignmentSpecifier(IASTAlignmentSpecifier expression, IASTAlignmentSpecifier typeId) {
 		fExpression = expression;
 		fTypeId = typeId;
 	}
-	
+
 	@Override
 	public IASTExpression getExpression() {
 		return fExpression.getExpression();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousCondition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousCondition.java
index 0a714884401..058d6b2b465 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousCondition.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousCondition.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
@@ -28,7 +28,7 @@ public class CPPASTAmbiguousCondition extends ASTAmbiguousNode implements IASTAm
 	public CPPASTAmbiguousCondition(IASTExpression expression, IASTSimpleDeclaration declaration) {
 		fExpression= expression;
 		fDeclaration= declaration;
-		
+
 		expression.setParent(this);
 		expression.setPropertyInParent(SUBCONDITION);
 		declaration.setParent(this);
@@ -39,7 +39,7 @@ public class CPPASTAmbiguousCondition extends ASTAmbiguousNode implements IASTAm
 	public IASTNode[] getNodes() {
 		return new IASTNode[] {fExpression, fDeclaration};
 	}
-	
+
 	@Override
 	protected void beforeResolution() {
 		// populate containing scope, so that it will not be affected by the alternative branches.
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousDeclarator.java
index de29004aaa7..d918b6ab499 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousDeclarator.java
@@ -38,7 +38,7 @@ public class CPPASTAmbiguousDeclarator extends ASTAmbiguousNode
     private IASTDeclarator[] dtors = new IASTDeclarator[2];
     private int dtorPos= -1;
 	private IASTInitializer fInitializer;
-    
+
     public CPPASTAmbiguousDeclarator(IASTDeclarator... decls) {
 		for (IASTDeclarator d : decls) {
 			if (d != null) {
@@ -55,7 +55,7 @@ public class CPPASTAmbiguousDeclarator extends ASTAmbiguousNode
 			((ICPPASTInternalScope) scope).populateCache();
 		}
 	}
-	
+
     @Override
 	protected void afterResolution(ASTVisitor resolver, IASTNode best) {
     	// if we have an initializer it needs to be added to the chosen alternative.
@@ -75,7 +75,7 @@ public class CPPASTAmbiguousDeclarator extends ASTAmbiguousNode
 	public IASTDeclarator copy(CopyStyle style) {
 		throw new UnsupportedOperationException();
 	}
-    
+
 	@Override
 	public void addDeclarator(IASTDeclarator d) {
         assertNotFrozen();
@@ -88,7 +88,7 @@ public class CPPASTAmbiguousDeclarator extends ASTAmbiguousNode
 
     @Override
 	public IASTDeclarator[] getDeclarators() {
-    	dtors = ArrayUtil.trimAt(IASTDeclarator.class, dtors, dtorPos); 
+    	dtors = ArrayUtil.trimAt(IASTDeclarator.class, dtors, dtorPos);
         return dtors;
     }
 
@@ -116,7 +116,7 @@ public class CPPASTAmbiguousDeclarator extends ASTAmbiguousNode
 	public IASTPointerOperator[] getPointerOperators() {
 		return dtors[0].getPointerOperators();
 	}
-	
+
 	@Override
 	public void addPointerOperator(IASTPointerOperator operator) {
         assertNotFrozen();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousExpression.java
index 5039e96c23b..fb42e2895d3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousExpression.java
@@ -24,18 +24,18 @@ public class CPPASTAmbiguousExpression extends ASTAmbiguousNode
 		implements IASTAmbiguousExpression, ICPPASTExpression {
     private IASTExpression[] exp = new IASTExpression[2];
     private int expPos;
-    
+
     public CPPASTAmbiguousExpression(IASTExpression... expressions) {
 		for (IASTExpression e : expressions) {
 			addExpression(e);
 		}
 	}
-    
+
     @Override
 	public IASTExpression copy() {
 		throw new UnsupportedOperationException();
 	}
-    
+
 	@Override
 	public IASTExpression copy(CopyStyle style) {
 		throw new UnsupportedOperationException();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousParameterDeclaration.java
index af1b5f8a184..f94931e64be 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousParameterDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousParameterDeclaration.java
@@ -46,17 +46,17 @@ public class CPPASTAmbiguousParameterDeclaration extends ASTAmbiguousNode
 	public void addParameterDeclaration(IASTParameterDeclaration d) {
 		assert false;
     }
-	
+
     @Override
 	protected final IASTNode doResolveAmbiguity(ASTVisitor resolver) {
 		final IASTAmbiguityParent owner= (IASTAmbiguityParent) getParent();
-		
+
 		// Setup the ast to use the alternative
 		owner.replace(this, fParameterDecl);
 		fParameterDecl.accept(resolver);
-		
+
 		IType t= CPPVisitor.createType(fParameterDecl, true);
-		if (!(t instanceof ICPPParameterPackType) || 
+		if (!(t instanceof ICPPParameterPackType) ||
 				!CPPTemplates.containsParameterPack(((ICPPParameterPackType) t).getType())) {
 			final ICPPASTDeclarator dtor = fParameterDecl.getDeclarator();
 			dtor.setDeclaresParameterPack(false);
@@ -70,8 +70,8 @@ public class CPPASTAmbiguousParameterDeclaration extends ASTAmbiguousNode
 		IASTPointerOperator[] ptrOps= dtor.getPointerOperators();
 		final ASTNode asNode = (ASTNode) dtor;
 		if (ptrOps.length > 0) {
-			final ASTNode first = (ASTNode)ptrOps[0];
-			final ASTNode last = (ASTNode)ptrOps[ptrOps.length - 1];
+			final ASTNode first = (ASTNode) ptrOps[0];
+			final ASTNode last = (ASTNode) ptrOps[ptrOps.length - 1];
 			asNode.setOffsetAndLength(first.getOffset(), last.getOffset() + last.getLength());
 		} else {
 			asNode.setOffsetAndLength(0, 0);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousSimpleDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousSimpleDeclaration.java
index 783b8f3b6d6..0b9b780f3e9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousSimpleDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousSimpleDeclaration.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - Initial API and implementation
- *     Sergey Prigogin (Google) 
+ *     Sergey Prigogin (Google)
  *     Thomas Corbat (IFS)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -41,7 +41,7 @@ public class CPPASTAmbiguousSimpleDeclaration extends ASTAmbiguousNode implement
     private IASTSimpleDeclaration fSimpleDecl;
     private IASTDeclSpecifier fAltDeclSpec;
     private IASTDeclarator fAltDtor;
-    
+
     public CPPASTAmbiguousSimpleDeclaration(IASTSimpleDeclaration decl, IASTDeclSpecifier declSpec, IASTDeclarator dtor) {
     	fSimpleDecl= decl;
     	fAltDeclSpec= declSpec;
@@ -91,7 +91,7 @@ public class CPPASTAmbiguousSimpleDeclaration extends ASTAmbiguousNode implement
 	public void setDeclSpecifier(IASTDeclSpecifier declSpec) {
 		fSimpleDecl.setDeclSpecifier(declSpec);
 	}
-	
+
 	@Override
 	protected final IASTNode doResolveAmbiguity(ASTVisitor resolver) {
 		final IASTAmbiguityParent owner= (IASTAmbiguityParent) getParent();
@@ -127,7 +127,7 @@ public class CPPASTAmbiguousSimpleDeclaration extends ASTAmbiguousNode implement
 			parent.replace(fSimpleDecl.getDeclSpecifier(), fAltDeclSpec);
 			parent.replace(dtor, fAltDtor);
 		}
-			
+
 		// Resolve further nested ambiguities.
 		fSimpleDecl.accept(resolver);
 		return fSimpleDecl;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousStatement.java
index 63905bf0c9c..31d0aea28c8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousStatement.java
@@ -32,7 +32,7 @@ public class CPPASTAmbiguousStatement extends ASTAmbiguousNode implements IASTAm
     private int stmtsPos= -1;
 	private IScope fScope;
 	private IASTDeclaration fDeclaration;
-    
+
     public CPPASTAmbiguousStatement(IASTStatement... statements) {
 		for (IASTStatement s : statements) {
 			addStatement(s);
@@ -41,14 +41,14 @@ public class CPPASTAmbiguousStatement extends ASTAmbiguousNode implements IASTAm
 
 	@Override
 	protected void beforeResolution() {
-		// Populate containing scope, so that it will not be affected by the alternative 
+		// Populate containing scope, so that it will not be affected by the alternative
 		// branches.
 		fScope= CPPVisitor.getContainingScope(this);
 		if (fScope instanceof ICPPASTInternalScope) {
 			((ICPPASTInternalScope) fScope).populateCache();
 		}
 	}
-	
+
 	@Override
 	protected void beforeAlternative(IASTNode alternative) {
 		cleanupScope();
@@ -59,7 +59,7 @@ public class CPPASTAmbiguousStatement extends ASTAmbiguousNode implements IASTAm
 			}
 		}
 	}
-	
+
 	private void cleanupScope() {
 		if (fScope instanceof ICPPASTInternalScope && fDeclaration != null) {
 			((ICPPASTInternalScope) fScope).removeNestedFromCache(fDeclaration);
@@ -77,7 +77,7 @@ public class CPPASTAmbiguousStatement extends ASTAmbiguousNode implements IASTAm
 	public IASTStatement copy() {
     	throw new UnsupportedOperationException();
     }
-    
+
 	@Override
 	public IASTStatement copy(CopyStyle style) {
 		throw new UnsupportedOperationException();
@@ -98,7 +98,7 @@ public class CPPASTAmbiguousStatement extends ASTAmbiguousNode implements IASTAm
         stmts = ArrayUtil.trimAt(IASTStatement.class, stmts, stmtsPos);
     	return stmts;
     }
-    
+
     @Override
 	public IASTNode[] getNodes() {
         return getStatements();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java
index acea22ce3c1..424930979d1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java
@@ -50,11 +50,11 @@ public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements
 			}
 		}
 	}
-	
+
 	@Override
 	protected void beforeAlternative(IASTNode node) {
-		// If the expression is an id-expression, the name may be shared 
-		// between the alternatives (see bug 316704), so make sure its parent 
+		// If the expression is an id-expression, the name may be shared
+		// between the alternatives (see bug 316704), so make sure its parent
 		// is set correctly.
 		if (node instanceof IASTTypeId) {
 			IASTDeclSpecifier declSpec = ((IASTTypeId) node).getDeclSpecifier();
@@ -75,7 +75,7 @@ public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements
 				name.setBinding(null);
 				id.setName(name);
 			}
-		} 
+		}
 	}
 
 	@Override
@@ -105,7 +105,7 @@ public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements
 		ICPPASTAmbiguousTemplateArgument ambiguityNode = new CPPASTAmbiguousTemplateArgument(copyNodes);
 		return ambiguityNode;
 	}
-	
+
 	@Override
 	public IASTNode[] getNodes() {
 		return fNodes.toArray(new IASTNode[fNodes.size()]);
@@ -116,7 +116,7 @@ public class CPPASTAmbiguousTemplateArgument extends ASTAmbiguousNode implements
         assertNotFrozen();
 		addNode(typeId);
 	}
-	
+
 	@Override
 	public void addExpression(IASTExpression expression) {
 		assertNotFrozen();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArrayModifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArrayModifier.java
index 7b3bd40cfe3..632c3bdff64 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArrayModifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArrayModifier.java
@@ -39,7 +39,7 @@ public class CPPASTArrayModifier extends CPPASTAttributeOwner implements IASTArr
 	public CPPASTArrayModifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTArrayModifier copy(CopyStyle style) {
 		CPPASTArrayModifier copy = new CPPASTArrayModifier(exp == null ? null : exp.copy(style));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java
index 249bd500c5c..24326ae4b62 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java
@@ -12,7 +12,7 @@
  *     Sergey Prigogin (Google)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
- 
+
 import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE;
 
 import org.eclipse.cdt.core.dom.ast.ASTVisitor;
@@ -37,7 +37,7 @@ public class CPPASTArraySubscriptExpression extends ASTNode
     private ICPPASTInitializerClause subscriptExp;
     private ICPPEvaluation evaluation;
     private IASTImplicitName[] implicitNames;
-    
+
     public CPPASTArraySubscriptExpression() {
 	}
 
@@ -45,12 +45,12 @@ public class CPPASTArraySubscriptExpression extends ASTNode
 		setArrayExpression(arrayExpression);
 		setArgument(operand);
 	}
-	
+
 	@Override
 	public CPPASTArraySubscriptExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTArraySubscriptExpression copy(CopyStyle style) {
 		CPPASTArraySubscriptExpression copy = new CPPASTArraySubscriptExpression();
@@ -73,7 +73,7 @@ public class CPPASTArraySubscriptExpression extends ASTNode
 			expression.setParent(this);
 			expression.setPropertyInParent(ARRAY);
 		}
-        arrayExpression = (ICPPASTExpression) expression;        
+        arrayExpression = (ICPPASTExpression) expression;
     }
 
     @Override
@@ -113,7 +113,7 @@ public class CPPASTArraySubscriptExpression extends ASTNode
 			ICPPFunction overload = getOverload();
 			if (overload == null || overload instanceof CPPImplicitFunction)
 				return implicitNames = IASTImplicitName.EMPTY_NAME_ARRAY;
-			
+
 			// create separate implicit names for the two brackets
 			CPPASTImplicitName n1 = new CPPASTImplicitName(OverloadableOperator.BRACKET, this);
 			n1.setBinding(overload);
@@ -123,13 +123,13 @@ public class CPPASTArraySubscriptExpression extends ASTNode
 			n2.setBinding(overload);
 			n2.computeOperatorOffsets(subscriptExp, true);
 			n2.setAlternate(true);
-			
+
 			implicitNames = new IASTImplicitName[] { n1, n2 };
 		}
-		
+
 		return implicitNames;
 	}
-    
+
 	private ICPPFunction getOverload() {
 		ICPPEvaluation eval = getEvaluation();
 		if (eval instanceof EvalBinary)
@@ -148,18 +148,18 @@ public class CPPASTArraySubscriptExpression extends ASTNode
 		}
         if (arrayExpression != null && !arrayExpression.accept(action))
         	return false;
-        
+
         IASTImplicitName[] implicits = action.shouldVisitImplicitNames ? getImplicitNames() : null;
-        
+
         if (implicits != null && implicits.length > 0 && !implicits[0].accept(action))
         	return false;
-        
+
         if (subscriptExp != null && !subscriptExp.accept(action))
         	return false;
-        
+
         if (implicits != null && implicits.length > 0 && !implicits[1].accept(action))
         	return false;
-        
+
         if (action.shouldVisitExpressions) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -183,24 +183,24 @@ public class CPPASTArraySubscriptExpression extends ASTNode
             arrayExpression  = (ICPPASTExpression) other;
         }
     }
-    
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
-		if (evaluation == null) 
+		if (evaluation == null)
 			evaluation= computeEvaluation();
-		
+
 		return evaluation;
 	}
-	
+
 	private ICPPEvaluation computeEvaluation() {
 		if (arrayExpression == null || subscriptExp == null)
 			return EvalFixed.INCOMPLETE;
-		return new EvalBinary(EvalBinary.op_arrayAccess, 
-							 ((ICPPEvaluationOwner)arrayExpression).getEvaluation(), 
-							 ((ICPPEvaluationOwner)subscriptExp).getEvaluation(), 
+		return new EvalBinary(EvalBinary.op_arrayAccess,
+							 ((ICPPEvaluationOwner) arrayExpression).getEvaluation(),
+							 ((ICPPEvaluationOwner) subscriptExp).getEvaluation(),
 							 this);
 	}
-    
+
     @Override
 	public IType getExpressionType() {
     	return getEvaluation().getType(this);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttribute.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttribute.java
index c914e217528..269a21ef6cb 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttribute.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttribute.java
@@ -27,7 +27,7 @@ public class CPPASTAttribute extends ASTAttribute implements ICPPASTAttribute {
 		this.scope = scope;
 		this.packExpansion =  packExpansion;
 	}
-	
+
 	@Override
 	public CPPASTAttribute copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -37,7 +37,7 @@ public class CPPASTAttribute extends ASTAttribute implements ICPPASTAttribute {
 	public CPPASTAttribute copy(CopyStyle style) {
 		IASTToken argumentClause = getArgumentClause();
 		if (argumentClause != null)
-			argumentClause = argumentClause.copy(style); 
+			argumentClause = argumentClause.copy(style);
 		return copy(new CPPASTAttribute(getName(), getScope(), argumentClause, hasPackExpansion()), style);
 	}
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttributeOwner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttributeOwner.java
index 798e33aa73a..0402307e52f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttributeOwner.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttributeOwner.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.IASTNode;
@@ -14,7 +14,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTAttributeOwner;
 
 /**
  * C++ attribute owners.
- * 
+ *
  * These implement IASTAmbiguityParent because in C++ an attribute-specifier
  * can be an alignment-specifier, and an alignment-specifier can be an
  * ambiguous node.
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseDeclSpecifier.java
index 5bcbc248b50..99e4e0a7e83 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseDeclSpecifier.java
@@ -29,7 +29,7 @@ public abstract class CPPASTBaseDeclSpecifier extends CPPASTAttributeOwner imple
     private boolean isVolatile;
     private int sc;
     private boolean virtual;
-    
+
     @Override
 	public boolean isFriend() {
         return friend;
@@ -139,18 +139,18 @@ public abstract class CPPASTBaseDeclSpecifier extends CPPASTAttributeOwner imple
         assertNotFrozen();
         this.explicit = value;
     }
-    
+
     @Deprecated
     @Override
     public IASTAlignmentSpecifier[] getAlignmentSpecifiers() {
     	return null;
     }
-    
+
     @Deprecated
     @Override
     public void setAlignmentSpecifiers(IASTAlignmentSpecifier[] alignmentSpecifiers) {
     }
-    
+
 	protected  T copy(T copy, CopyStyle style) {
 		CPPASTBaseDeclSpecifier target = copy;
     	target.explicit = explicit;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseSpecifier.java
index acf317ddb47..af48ef96f3e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseSpecifier.java
@@ -38,10 +38,10 @@ public class CPPASTBaseSpecifier extends ASTNode implements ICPPASTBaseSpecifier
     private int visibility;
     private ICPPASTNameSpecifier nameSpecifier;
 	private boolean fIsPackExpansion;
-    
+
     public CPPASTBaseSpecifier() {
 	}
-    
+
     public CPPASTBaseSpecifier(ICPPASTNameSpecifier nameSpecifier) {
 		setNameSpecifier(nameSpecifier);
 	}
@@ -65,7 +65,7 @@ public class CPPASTBaseSpecifier extends ASTNode implements ICPPASTBaseSpecifier
 		copy.fIsPackExpansion= fIsPackExpansion;
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public boolean isVirtual() {
         return isVirtual;
@@ -103,7 +103,7 @@ public class CPPASTBaseSpecifier extends ASTNode implements ICPPASTBaseSpecifier
 	public void setName(IASTName name) {
     	setNameSpecifier((ICPPASTName) name);
     }
-    
+
 	@Override
 	public ICPPASTNameSpecifier getNameSpecifier() {
 		return nameSpecifier;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java
index 56c9cdf45a0..54a761b2c5d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java
@@ -279,9 +279,9 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
 	private ICPPEvaluation computeEvaluation() {
 		if (fOperand1 == null || fOperand2 == null)
 			return EvalFixed.INCOMPLETE;
-		
-		ICPPEvaluation eval1 = ((ICPPEvaluationOwner)fOperand1).getEvaluation();
-		ICPPEvaluation eval2 = ((ICPPEvaluationOwner)fOperand2).getEvaluation();
+
+		ICPPEvaluation eval1 = ((ICPPEvaluationOwner) fOperand1).getEvaluation();
+		ICPPEvaluation eval2 = ((ICPPEvaluationOwner) fOperand2).getEvaluation();
 		return new EvalBinary(fOperator, eval1, eval2, this);
 	}
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java
index e3291a6237b..f453b73c6d0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     John Camelon (IBM) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -30,7 +30,7 @@ public class CPPASTBinaryTypeIdExpression extends ASTNode implements ICPPASTExpr
     private IASTTypeId fOperand1;
     private IASTTypeId fOperand2;
     private ICPPEvaluation fEvaluation;
-    
+
     public CPPASTBinaryTypeIdExpression() {
 	}
 
@@ -44,10 +44,10 @@ public class CPPASTBinaryTypeIdExpression extends ASTNode implements ICPPASTExpr
 	public CPPASTBinaryTypeIdExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTBinaryTypeIdExpression copy(CopyStyle style) {
-		CPPASTBinaryTypeIdExpression copy = new CPPASTBinaryTypeIdExpression(fOperator, 
+		CPPASTBinaryTypeIdExpression copy = new CPPASTBinaryTypeIdExpression(fOperator,
 				fOperand1 == null ? null : fOperand1.copy(style),
 				fOperand2 == null ? null : fOperand2.copy(style));
 		return copy(copy, style);
@@ -71,7 +71,7 @@ public class CPPASTBinaryTypeIdExpression extends ASTNode implements ICPPASTExpr
        	if (typeId != null) {
        		typeId.setParent(this);
        		typeId.setPropertyInParent(OPERAND1);
-       	} 
+       	}
     }
 
     @Override
@@ -81,7 +81,7 @@ public class CPPASTBinaryTypeIdExpression extends ASTNode implements ICPPASTExpr
        	if (typeId != null) {
        		typeId.setParent(this);
        		typeId.setPropertyInParent(OPERAND2);
-       	} 
+       	}
     }
 
     @Override
@@ -103,18 +103,18 @@ public class CPPASTBinaryTypeIdExpression extends ASTNode implements ICPPASTExpr
 	            default: break;
 	        }
 		}
-      
-        if (fOperand1 != null && !fOperand1.accept(action)) 
+
+        if (fOperand1 != null && !fOperand1.accept(action))
         	return false;
-        if (fOperand2 != null && !fOperand2.accept(action)) 
+        if (fOperand2 != null && !fOperand2.accept(action))
         	return false;
-        
-        if (action.shouldVisitExpressions && action.leave(this) ==  ASTVisitor.PROCESS_ABORT) 
+
+        if (action.shouldVisitExpressions && action.leave(this) ==  ASTVisitor.PROCESS_ABORT)
         	return false;
 
         return true;
     }
-    
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
 		if (fEvaluation == null) {
@@ -137,7 +137,7 @@ public class CPPASTBinaryTypeIdExpression extends ASTNode implements ICPPASTExpr
 	public IType getExpressionType() {
 		return getEvaluation().getType(this);
 	}
-	
+
 	@Override
 	public boolean isLValue() {
 		return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCapture.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCapture.java
index 28fbad63347..ea495c2c055 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCapture.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCapture.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.ASTVisitor;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java
index 8e5d4e63654..c12b8715db6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java
@@ -29,7 +29,7 @@ public class CPPASTCaseStatement extends CPPASTAttributeOwner implements IASTCas
 	public CPPASTCaseStatement(IASTExpression expression) {
 		setExpression(expression);
 	}
-	
+
 	@Override
 	public CPPASTCaseStatement copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -60,7 +60,7 @@ public class CPPASTCaseStatement extends CPPASTAttributeOwner implements IASTCas
     @Override
 	public boolean accept(ASTVisitor action) {
         if (action.shouldVisitStatements) {
-		    switch(action.visit(this)) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
@@ -69,14 +69,14 @@ public class CPPASTCaseStatement extends CPPASTAttributeOwner implements IASTCas
 
         if (!acceptByAttributeSpecifiers(action)) return false;
         if (expression != null && !expression.accept(action)) return false;
-        
+
         if (action.shouldVisitStatements) {
-        	switch(action.leave(this)) {
+        	switch (action.leave(this)) {
         		case ASTVisitor.PROCESS_ABORT : return false;
         		case ASTVisitor.PROCESS_SKIP  : return true;
         		default : break;
         	}
-        }  
+        }
         return true;
     }
 
@@ -90,10 +90,10 @@ public class CPPASTCaseStatement extends CPPASTAttributeOwner implements IASTCas
         }
         super.replace(child, other);
     }
-	
+
 	@Override
 	public ICPPExecution getExecution() {
-		ICPPEvaluationOwner caseExpr = (ICPPEvaluationOwner)getExpression();
+		ICPPEvaluationOwner caseExpr = (ICPPEvaluationOwner) getExpression();
 		ICPPEvaluation caseExprEval = caseExpr.getEvaluation();
 		return new ExecCase(caseExprEval);
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java
index 1b631469581..cf4807b0388 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java
@@ -42,18 +42,18 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
 
     public CPPASTCastExpression() {
 	}
-    
+
     public CPPASTCastExpression(int operator, IASTTypeId typeId, IASTExpression operand) {
 		fOperator = operator;
 		setOperand(operand);
 		setTypeId(typeId);
 	}
-    
+
 	@Override
 	public CPPASTCastExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-    
+
 	@Override
 	public CPPASTCastExpression copy(CopyStyle style) {
 		CPPASTCastExpression copy = new CPPASTCastExpression();
@@ -78,7 +78,7 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
 	public IASTTypeId getTypeId() {
         return fTypeId;
     }
-    
+
 	@Override
 	public int getOperator() {
         return fOperator;
@@ -104,7 +104,7 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
 			expression.setPropertyInParent(OPERAND);
 		}
     }
- 
+
 	@Override
 	public IASTImplicitDestructorName[] getImplicitDestructorNames() {
 		if (fImplicitDestructorNames == null) {
@@ -123,11 +123,11 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
 	            default: break;
 	        }
 		}
-        
+
         if (fTypeId != null && !fTypeId.accept(action)) return false;
         IASTExpression op = getOperand();
         if (op != null && !op.accept(action)) return false;
-        
+
         if (action.shouldVisitImplicitDestructorNames && !acceptByNodes(getImplicitDestructorNames(), action))
         	return false;
 
@@ -149,25 +149,25 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
             fOperand  = (ICPPASTExpression) other;
         }
     }
-    
-    
+
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
-		if (fEvaluation == null) 
+		if (fEvaluation == null)
 			fEvaluation= computeEvaluation();
-		
+
 		return fEvaluation;
 	}
-	
+
 	private ICPPEvaluation computeEvaluation() {
 		if (fOperand == null)
 			return EvalFixed.INCOMPLETE;
-		
+
 		IType type= CPPVisitor.createType(getTypeId());
 		if (type == null || type instanceof IProblemType)
 			return EvalFixed.INCOMPLETE;
-		
-		return new EvalTypeId(type, this, false, ((ICPPEvaluationOwner)fOperand).getEvaluation());
+
+		return new EvalTypeId(type, this, false, ((ICPPEvaluationOwner) fOperand).getEvaluation());
 	}
 
     @Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCatchHandler.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCatchHandler.java
index 089efaa4e90..9dc40e72485 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCatchHandler.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCatchHandler.java
@@ -30,7 +30,7 @@ public class CPPASTCatchHandler extends CPPASTAttributeOwner implements ICPPASTC
     private IASTDeclaration fDeclaration;
 	private IScope fScope;
 	private IASTImplicitDestructorName[] fImplicitDestructorNames;
-    
+
     public CPPASTCatchHandler() {
 	}
 
@@ -38,7 +38,7 @@ public class CPPASTCatchHandler extends CPPASTAttributeOwner implements ICPPASTC
 		setCatchBody(body);
 		setDeclaration(declaration);
 	}
-	
+
 	@Override
 	public CPPASTCatchHandler copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTClassVirtSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTClassVirtSpecifier.java
index 3bdc4827a88..730dd3cec53 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTClassVirtSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTClassVirtSpecifier.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Nathan Ridge - Initial API and implementation
  *******************************************************************************/
@@ -16,7 +16,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
 
 public class CPPASTClassVirtSpecifier extends ASTNode implements ICPPASTClassVirtSpecifier {
 	// Not much point storing the kind while there is only one.
-	
+
 	@Override
 	public SpecifierKind getKind() {
 		return SpecifierKind.Final;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompositeTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompositeTypeSpecifier.java
index 132743b714f..a022efb6104 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompositeTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompositeTypeSpecifier.java
@@ -53,12 +53,12 @@ public class CPPASTCompositeTypeSpecifier extends CPPASTBaseDeclSpecifier
 		}
 		fAmbiguitiesResolved= true;
 	}
-	
+
 	@Override
 	public CPPASTCompositeTypeSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTCompositeTypeSpecifier copy(CopyStyle style) {
 		CPPASTCompositeTypeSpecifier copy =
@@ -140,7 +140,7 @@ public class CPPASTCompositeTypeSpecifier extends CPPASTBaseDeclSpecifier
 	public void addMemberDeclaration(IASTDeclaration decl) {
 		if (decl == null)
 			return;
-		
+
 		// ignore inactive visibility labels
 		if (decl instanceof ICPPASTVisibilityLabel && !decl.isActive())
 			return;
@@ -152,7 +152,7 @@ public class CPPASTCompositeTypeSpecifier extends CPPASTBaseDeclSpecifier
 				++fDeclarationsPos, decl);
 		fActiveDeclarations= null;
 	}
-    
+
     @Override
 	public final void addDeclaration(IASTDeclaration decl) {
     	addMemberDeclaration(decl);
@@ -168,7 +168,7 @@ public class CPPASTCompositeTypeSpecifier extends CPPASTBaseDeclSpecifier
 		}
 		return fScope;
 	}
-    	
+
     @Override
 	public boolean accept(ASTVisitor action) {
 		if (action.shouldVisitDeclSpecifiers) {
@@ -181,13 +181,13 @@ public class CPPASTCompositeTypeSpecifier extends CPPASTBaseDeclSpecifier
 
 		if (!acceptByAttributeSpecifiers(action))
 			return false;
-		
+
 		if (fName != null && !fName.accept(action))
 			return false;
 
 		if (virtSpecifier != null && !virtSpecifier.accept(action))
 			return false;
-		
+
 		ICPPASTBaseSpecifier[] bases = getBaseSpecifiers();
 		for (int i = 0; i < bases.length; i++) {
 			if (!bases[i].accept(action))
@@ -199,13 +199,13 @@ public class CPPASTCompositeTypeSpecifier extends CPPASTBaseDeclSpecifier
 			if (!decls[i].accept(action))
 				return false;
 		}
-		
-		if (action.shouldVisitDeclSpecifiers && action.leave(this) == ASTVisitor.PROCESS_ABORT) 
+
+		if (action.shouldVisitDeclSpecifiers && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
 
 		return true;
 	}
-	
+
 	@Override
 	public int getRoleForName(IASTName name) {
 		if (name == this.fName)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatement.java
index 44ede731045..82b79db2208 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatement.java
@@ -108,7 +108,7 @@ public class CPPASTCompoundStatement extends CPPASTAttributeOwner implements ICP
         }
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
         for (int i = 0; i < statements.length; ++i) {
@@ -121,7 +121,7 @@ public class CPPASTCompoundStatement extends CPPASTAttributeOwner implements ICP
         }
         super.replace(child, other);
     }
-    
+
     @Override
 	public ICPPExecution getExecution() {
     	return new ExecCompoundStatement(this.statements);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java
index 31ef2253352..826e74953f6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java
@@ -35,10 +35,10 @@ public class CPPASTCompoundStatementExpression extends ASTNode
     private IASTCompoundStatement fStatement;
     private ICPPEvaluation fEval;
 	private IASTImplicitDestructorName[] fImplicitDestructorNames;
-    
+
     public CPPASTCompoundStatementExpression() {
 	}
-    
+
 	public CPPASTCompoundStatementExpression(IASTCompoundStatement statement) {
 		setCompoundStatement(statement);
 	}
@@ -78,8 +78,8 @@ public class CPPASTCompoundStatementExpression extends ASTNode
 				if (statements.length > 0) {
 					IASTStatement st = statements[statements.length - 1];
 					if (st instanceof IASTExpressionStatement) {
-						IASTExpressionStatement exprStmt = (IASTExpressionStatement)st;
-						ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner)exprStmt.getExpression();
+						IASTExpressionStatement exprStmt = (IASTExpressionStatement) st;
+						ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) exprStmt.getExpression();
 						fEval= new EvalCompoundStatementExpression(evalOwner.getEvaluation(), this);
 					}
 				}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java
index 7e3b93f90f8..d7b7faf3792 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     John Camelon (IBM) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -35,10 +35,10 @@ public class CPPASTConditionalExpression extends ASTNode
     private ICPPASTExpression fNegative;
     private ICPPEvaluation fEval;
 	private IASTImplicitDestructorName[] fImplicitDestructorNames;
-    
+
     public CPPASTConditionalExpression() {
 	}
-    
+
 	public CPPASTConditionalExpression(IASTExpression condition, IASTExpression postive, IASTExpression negative) {
     	setLogicalConditionExpression(condition);
     	setPositiveResultExpression(postive);
@@ -49,7 +49,7 @@ public class CPPASTConditionalExpression extends ASTNode
 	public CPPASTConditionalExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTConditionalExpression copy(CopyStyle style) {
 		CPPASTConditionalExpression copy = new CPPASTConditionalExpression();
@@ -122,7 +122,7 @@ public class CPPASTConditionalExpression extends ASTNode
 	            default: break;
 	        }
 		}
-        
+
 		if (fCondition != null && !fCondition.accept(action))
 			return false;
 		if (fPositive != null && !fPositive.accept(action))
@@ -132,7 +132,7 @@ public class CPPASTConditionalExpression extends ASTNode
 
 		if (action.shouldVisitImplicitDestructorNames && !acceptByNodes(getImplicitDestructorNames(), action))
         	return false;
-        
+
 		if (action.shouldVisitExpressions && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
 
@@ -179,21 +179,21 @@ public class CPPASTConditionalExpression extends ASTNode
 			if (fCondition == null || fNegative == null) {
 				fEval= EvalFixed.INCOMPLETE;
 			} else {
-				final ICPPEvaluation condEval = ((ICPPEvaluationOwner)fCondition).getEvaluation();
-				final ICPPEvaluation posEval = fPositive == null ? null : ((ICPPEvaluationOwner)fPositive).getEvaluation();
-				final ICPPEvaluation negEval = ((ICPPEvaluationOwner)fNegative).getEvaluation();
+				final ICPPEvaluation condEval = ((ICPPEvaluationOwner) fCondition).getEvaluation();
+				final ICPPEvaluation posEval = fPositive == null ? null : ((ICPPEvaluationOwner) fPositive).getEvaluation();
+				final ICPPEvaluation negEval = ((ICPPEvaluationOwner) fNegative).getEvaluation();
 				fEval= new EvalConditional(condEval, posEval, negEval,
 						isThrowExpression(fPositive), isThrowExpression(fNegative), this);
 			}
 		}
 		return fEval;
 	}
-	
+
     @Override
 	public IType getExpressionType() {
     	return getEvaluation().getType(this);
     }
-    
+
 	@Override
 	public ValueCategory getValueCategory() {
     	return getEvaluation().getValueCategory(this);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java
index 1793a72c122..05051b01652 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java
@@ -48,7 +48,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
 public class CPPASTConstructorChainInitializer extends ASTNode implements
         ICPPASTConstructorChainInitializer, IASTImplicitNameOwner, ICPPASTCompletionContext {
     private IASTName name;
-	private IASTImplicitName[] implicitNames; 
+	private IASTImplicitName[] implicitNames;
     private IASTInitializer initializer;
 	private boolean fIsPackExpansion;
 
@@ -153,9 +153,9 @@ public class CPPASTConstructorChainInitializer extends ASTNode implements
 					bindings[j] = binding;
 				j++;
 			} else if (binding instanceof ICPPConstructor || binding instanceof ICPPClassType) {
-				if (baseClasses == null) 
+				if (baseClasses == null)
 					baseClasses = getBaseClasses(n);
-				
+
 				if (baseClasses.containsKey(binding.getNameCharArray())) {
 					if (i != j)
 						bindings[j] = binding;
@@ -230,7 +230,7 @@ public class CPPASTConstructorChainInitializer extends ASTNode implements
         } else if (expression instanceof IASTInitializer) {
         	setInitializer((IASTInitializer) expression);
         } else {
-        	
+
         	ctorInit.setExpression(expression);
         	ctorInit.setOffsetAndLength((ASTNode) expression);
         	setInitializer(ctorInit);
@@ -255,9 +255,9 @@ public class CPPASTConstructorChainInitializer extends ASTNode implements
 			}
     	}
 
-    	return implicitNames;  
+    	return implicitNames;
 	}
-	
+
 	@Override
 	public IBinding[] findBindings(IASTName n, boolean isPrefix) {
 		return findBindings(n, isPrefix, null);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTContinueStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTContinueStatement.java
index 6b258042425..f03d60bf5cd 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTContinueStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTContinueStatement.java
@@ -40,7 +40,7 @@ public class CPPASTContinueStatement extends CPPASTAttributeOwner implements IAS
 		}
         return true;
     }
-    
+
     @Override
 	public CPPASTContinueStatement copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConversionName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConversionName.java
index b4e395e100e..477d711cb94 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConversionName.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConversionName.java
@@ -28,19 +28,19 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
 public class CPPASTConversionName extends CPPASTNameBase implements ICPPASTConversionName {
 	private IASTTypeId typeId;
 	private char[] fName;
-	
+
 	public CPPASTConversionName() {
 	}
-	
+
 	public CPPASTConversionName(IASTTypeId typeId) {
 		setTypeId(typeId);
 	}
-	
+
 	@Override
 	public CPPASTConversionName copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTConversionName copy(CopyStyle style) {
 		CPPASTConversionName copy = new CPPASTConversionName();
@@ -62,7 +62,7 @@ public class CPPASTConversionName extends CPPASTNameBase implements ICPPASTConve
 			typeId.setPropertyInParent(TYPE_ID);
 		}
 	}
-	
+
 	@Override
 	public boolean accept(ASTVisitor action) {
 		if (action.shouldVisitNames) {
@@ -74,7 +74,7 @@ public class CPPASTConversionName extends CPPASTNameBase implements ICPPASTConve
 			default:
 				break;
 			}
-		}		
+		}
 
 		if (typeId != null && !typeId.accept(action))
 			return false;
@@ -129,7 +129,7 @@ public class CPPASTConversionName extends CPPASTNameBase implements ICPPASTConve
 	public char[] getSimpleID() {
 		return toCharArray();
 	}
-	
+
 	@Override
 	public char[] getLookupKey() {
 		return Keywords.cOPERATOR;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarationStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarationStatement.java
index c9eb6c186ee..3ee5b64df76 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarationStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarationStatement.java
@@ -28,7 +28,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecDeclarationSta
 public class CPPASTDeclarationStatement extends ASTNode
 		implements IASTDeclarationStatement, IASTAmbiguityParent, ICPPExecutionOwner {
     private IASTDeclaration declaration;
-    
+
     public CPPASTDeclarationStatement() {
 	}
 
@@ -40,7 +40,7 @@ public class CPPASTDeclarationStatement extends ASTNode
 	public CPPASTDeclarationStatement copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTDeclarationStatement copy(CopyStyle style) {
 		CPPASTDeclarationStatement copy = new CPPASTDeclarationStatement();
@@ -120,8 +120,8 @@ public class CPPASTDeclarationStatement extends ASTNode
 
 	@Override
 	public ICPPExecution getExecution() {
-		if(declaration instanceof ICPPExecutionOwner) {
-			ICPPExecutionOwner execOwner = (ICPPExecutionOwner)declaration;
+		if (declaration instanceof ICPPExecutionOwner) {
+			ICPPExecutionOwner execOwner = (ICPPExecutionOwner) declaration;
 			return new ExecDeclarationStatement(execOwner.getExecution());
 		}
 		return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarator.java
index 56fd5c7654f..18d20bd8bee 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarator.java
@@ -46,15 +46,15 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecIncomplete;
 /**
  * C++ specific declarator.
  */
-public class CPPASTDeclarator extends CPPASTAttributeOwner implements ICPPASTDeclarator, 
+public class CPPASTDeclarator extends CPPASTAttributeOwner implements ICPPASTDeclarator,
 		IASTImplicitNameOwner, ICPPExecutionOwner {
     private IASTInitializer initializer;
     private IASTName name;
-	private IASTImplicitName[] implicitNames; 
+	private IASTImplicitName[] implicitNames;
     private IASTDeclarator nested;
     private IASTPointerOperator[] pointerOps;
     private boolean isPackExpansion;
-   
+
     public CPPASTDeclarator() {
 	}
 
@@ -294,7 +294,7 @@ public class CPPASTDeclarator extends CPPASTAttributeOwner implements ICPPASTDec
 			}
     	}
 
-    	return implicitNames;  
+    	return implicitNames;
 	}
 
 	@Override
@@ -307,16 +307,16 @@ public class CPPASTDeclarator extends CPPASTAttributeOwner implements ICPPASTDec
 		}
 		super.replace(child, other);
 	}
-	
+
 	@Override
 	public ICPPExecution getExecution() {
-		final ICPPBinding binding = (ICPPBinding)getName().resolveBinding();
+		final ICPPBinding binding = (ICPPBinding) getName().resolveBinding();
 		ICPPEvaluation initializerEval = null;
-		if(binding instanceof CPPVariable) {
-			CPPVariable variable = (CPPVariable)binding;
+		if (binding instanceof CPPVariable) {
+			CPPVariable variable = (CPPVariable) binding;
 			initializerEval = variable.getInitializerEvaluation();
 		}
-		if(initializerEval == EvalFixed.INCOMPLETE) {
+		if (initializerEval == EvalFixed.INCOMPLETE) {
 			return ExecIncomplete.INSTANCE;
 		}
 		return new ExecDeclarator(binding, initializerEval);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java
index b47625fccdd..6a150cbd9f8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java
@@ -29,17 +29,17 @@ public class CPPASTDecltypeSpecifier extends ASTNode
 		implements ICPPASTDecltypeSpecifier, IASTAmbiguityParent {
 	private ICPPASTExpression fDecltypeExpression;
 	private char[] fSignature;
-	
+
 	public CPPASTDecltypeSpecifier(ICPPASTExpression decltypeExpression) {
 		fDecltypeExpression = decltypeExpression;
 		fDecltypeExpression.setParent(this);
 	}
-	
+
 	@Override
 	public ICPPASTExpression getDecltypeExpression() {
 		return fDecltypeExpression;
 	}
-	
+
 	@Override
 	public CPPASTDecltypeSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -57,7 +57,7 @@ public class CPPASTDecltypeSpecifier extends ASTNode
 			StringBuilder buffer = new StringBuilder();
 			buffer.append(Keywords.cDECLTYPE);
 			buffer.append(Keywords.cpLPAREN);
-			buffer.append(((ICPPEvaluationOwner)fDecltypeExpression).getEvaluation().getSignature());
+			buffer.append(((ICPPEvaluationOwner) fDecltypeExpression).getEvaluation().getSignature());
 			buffer.append(Keywords.cpRPAREN);
 			final int len = buffer.length();
 			fSignature = new char[len];
@@ -75,7 +75,7 @@ public class CPPASTDecltypeSpecifier extends ASTNode
 			default: break;
 			}
 		}
-		
+
 		if (!fDecltypeExpression.accept(visitor))
 			return false;
 
@@ -86,7 +86,7 @@ public class CPPASTDecltypeSpecifier extends ASTNode
 			default: break;
 			}
 		}
-		
+
 		return true;
 	}
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDefaultStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDefaultStatement.java
index f984556242f..b923062319a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDefaultStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDefaultStatement.java
@@ -40,7 +40,7 @@ public class CPPASTDefaultStatement extends CPPASTAttributeOwner implements IAST
 		}
         return true;
     }
-    
+
     @Override
 	public CPPASTDefaultStatement copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java
index 1f7f714f09d..6467d55596d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java
@@ -35,7 +35,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
 
 public class CPPASTDeleteExpression extends ASTNode implements ICPPASTDeleteExpression, IASTAmbiguityParent, ICPPEvaluationOwner {
     private static final ICPPEvaluation EVALUATION = new EvalFixed(CPPSemantics.VOID_TYPE, PRVALUE, IntegralValue.UNKNOWN);
-	
+
     private IASTExpression operand;
     private boolean isGlobal;
     private boolean isVectored;
@@ -49,16 +49,16 @@ public class CPPASTDeleteExpression extends ASTNode implements ICPPASTDeleteExpr
 	public CPPASTDeleteExpression(IASTExpression operand) {
 		setOperand(operand);
 	}
-	
+
 	public CPPASTDeleteExpression(CPPASTDeleteExpression from) {
 		setOperand(from.operand);
 	}
-	
+
 	@Override
 	public CPPASTDeleteExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTDeleteExpression copy(CopyStyle style) {
 		CPPASTDeleteExpression copy =
@@ -112,7 +112,7 @@ public class CPPASTDeleteExpression extends ASTNode implements ICPPASTDeleteExpr
 	public IASTImplicitName[] getImplicitNames() {
     	if (implicitNames == null) {
 	    	List names = new ArrayList<>();
-	    	
+
 	    	if (!isVectored) {
 		    	ICPPFunction destructor = CPPSemantics.findImplicitlyCalledDestructor(this);
 		    	if (destructor != null) {
@@ -122,7 +122,7 @@ public class CPPASTDeleteExpression extends ASTNode implements ICPPASTDeleteExpr
 		    		names.add(destructorName);
 		    	}
 	    	}
-	    	
+
 	    	if (!isGlobal) {
 		    	ICPPFunction deleteOperator = CPPSemantics.findOverloadedOperator(this);
 		    	if (deleteOperator != null && !(deleteOperator instanceof CPPImplicitFunction)) {
@@ -133,15 +133,15 @@ public class CPPASTDeleteExpression extends ASTNode implements ICPPASTDeleteExpr
 		    		names.add(deleteName);
 		    	}
 	    	}
-	    	
+
 	    	if (names.isEmpty()) {
 	    		implicitNames = IASTImplicitName.EMPTY_NAME_ARRAY;
 	    	} else {
 	    		implicitNames = names.toArray(new IASTImplicitName[names.size()]);
 	    	}
     	}
-    	
-    	return implicitNames;    	
+
+    	return implicitNames;
 	}
 
 	@Override
@@ -201,7 +201,7 @@ public class CPPASTDeleteExpression extends ASTNode implements ICPPASTDeleteExpr
 	public ValueCategory getValueCategory() {
 		return PRVALUE;
 	}
-	
+
 	@Override
 	public void replace(IASTNode child, IASTNode other) {
 		if (child == operand) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java
index 2fdd659bfeb..d4455674fd0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java
@@ -83,7 +83,7 @@ public class CPPASTDesignatedInitializer extends ASTNode
 
 	@Override
 	public ICPPEvaluation getEvaluation() {
-		return ((ICPPEvaluationOwner)rhs).getEvaluation();
+		return ((ICPPEvaluationOwner) rhs).getEvaluation();
 	}
 
 	@Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java
index 66dba60031d..3f65bbb5bc9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java
@@ -38,7 +38,7 @@ public class CPPASTDoStatement extends CPPASTAttributeOwner implements IASTDoSta
 	public CPPASTDoStatement copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTDoStatement copy(CopyStyle style) {
 		CPPASTDoStatement copy = new CPPASTDoStatement();
@@ -100,7 +100,7 @@ public class CPPASTDoStatement extends CPPASTAttributeOwner implements IASTDoSta
 		}
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
         if (body == child) {
@@ -120,7 +120,7 @@ public class CPPASTDoStatement extends CPPASTAttributeOwner implements IASTDoSta
 
 	@Override
 	public ICPPExecution getExecution() {
-		ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner)getCondition();
+		ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner) getCondition();
 		ICPPEvaluation conditionEval = conditionExpr.getEvaluation();
 		ICPPExecution bodyExec = EvalUtil.getExecutionFromStatement(getBody());
 		return new ExecDo(conditionEval, bodyExec);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTElaboratedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTElaboratedTypeSpecifier.java
index 75c1de2852f..8f84bea214f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTElaboratedTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTElaboratedTypeSpecifier.java
@@ -30,7 +30,7 @@ public class CPPASTElaboratedTypeSpecifier extends CPPASTBaseDeclSpecifier
         implements ICPPASTElaboratedTypeSpecifier, IASTInternalNameOwner {
     private int kind;
     private IASTName name;
-    
+
     public CPPASTElaboratedTypeSpecifier() {
 	}
 
@@ -43,7 +43,7 @@ public class CPPASTElaboratedTypeSpecifier extends CPPASTBaseDeclSpecifier
 	public CPPASTElaboratedTypeSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTElaboratedTypeSpecifier copy(CopyStyle style) {
 		CPPASTElaboratedTypeSpecifier copy =
@@ -105,28 +105,28 @@ public class CPPASTElaboratedTypeSpecifier extends CPPASTBaseDeclSpecifier
 	public int getRoleForName(IASTName n) {
 		return getRoleForName(n, true);
 	}
-	
+
 	@Override
 	public int getRoleForName(IASTName n, boolean allowResolution) {
 		if (n != name) return r_unclear;
-		
+
 		IASTNode parent = getParent();
 		if (parent instanceof IASTSimpleDeclaration) {
-			IASTDeclarator[] dtors = ((IASTSimpleDeclaration)parent).getDeclarators(); 
+			IASTDeclarator[] dtors = ((IASTSimpleDeclaration) parent).getDeclarators();
 			if (dtors.length == 0)
 				return r_declaration;
 		}
-		
+
 		// 7.1.5.3.2: check for simple form  , then it may be a declaration
 		final int kind= getKind();
 		if (kind == k_class || kind == k_union || kind == k_struct) {
-			if (name instanceof ICPPASTQualifiedName == false 
+			if (name instanceof ICPPASTQualifiedName == false
 					&& name instanceof ICPPASTTemplateId == false) {
 				IBinding binding = allowResolution ? name.resolveBinding() : name.getBinding();
 				if (binding != null) {
 					if (binding instanceof ICPPInternalBinding) {
-						IASTNode[] decls = ((ICPPInternalBinding)binding).getDeclarations();
-						if (ArrayUtil.contains(decls, name)) 
+						IASTNode[] decls = ((ICPPInternalBinding) binding).getDeclarations();
+						if (ArrayUtil.contains(decls, name))
 							return r_declaration;
 					}
 					return r_reference;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java
index efd58192a52..13016c30926 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java
@@ -45,12 +45,12 @@ public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
 		setName(name);
 		setBaseType(baseType);
 	}
-	
+
 	@Override
 	public CPPASTEnumerationSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTEnumerationSpecifier copy(CopyStyle style) {
 		CPPASTEnumerationSpecifier copy = new CPPASTEnumerationSpecifier(fIsScoped,
@@ -62,12 +62,12 @@ public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
 		}
 		return super.copy(copy, style);
 	}
-	
+
 	@Override
 	public boolean startValueComputation() {
 		if (fValuesComputed != null)
 			return false;
-		
+
 		fValuesComputed= Boolean.FALSE;
 		return true;
 	}
@@ -127,7 +127,7 @@ public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
 		}
 		if (fName != null && !fName.accept(action))
 			return false;
-		
+
 		if (fBaseType != null && !fBaseType.accept(action)) {
 			return false;
 		}
@@ -139,7 +139,7 @@ public class CPPASTEnumerationSpecifier extends CPPASTBaseDeclSpecifier
 			if (!e.accept(action))
 				return false;
 		}
-				
+
 		if (action.shouldVisitDeclSpecifiers && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerator.java
index 0eee0c53ec3..c6a40f5f501 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerator.java
@@ -19,7 +19,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTEnumerator;
  * C++-specific enumerator.
  */
 public class CPPASTEnumerator extends ASTEnumerator {
-	
+
     public CPPASTEnumerator() {
     	super();
 	}
@@ -27,7 +27,7 @@ public class CPPASTEnumerator extends ASTEnumerator {
 	public CPPASTEnumerator(IASTName name, IASTExpression value) {
 		super(name, value);
 	}
-	
+
 	@Override
 	public CPPASTEnumerator copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExplicitTemplateInstantiation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExplicitTemplateInstantiation.java
index 58de037f913..80c455b29f0 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExplicitTemplateInstantiation.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExplicitTemplateInstantiation.java
@@ -27,7 +27,7 @@ public class CPPASTExplicitTemplateInstantiation extends ASTNode implements
     private IASTDeclaration declaration;
     private int modifier;
 
-    
+
     public CPPASTExplicitTemplateInstantiation() {
 	}
 
@@ -39,7 +39,7 @@ public class CPPASTExplicitTemplateInstantiation extends ASTNode implements
 	public CPPASTExplicitTemplateInstantiation copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTExplicitTemplateInstantiation copy(CopyStyle style) {
 		CPPASTExplicitTemplateInstantiation copy = new CPPASTExplicitTemplateInstantiation();
@@ -63,7 +63,7 @@ public class CPPASTExplicitTemplateInstantiation extends ASTNode implements
 		}
     }
 
-    
+
     @Override
 	public int getModifier() {
 		return modifier;
@@ -76,19 +76,19 @@ public class CPPASTExplicitTemplateInstantiation extends ASTNode implements
 	}
 
 	@Override
-	public boolean accept( ASTVisitor action ){
-        if( action.shouldVisitDeclarations ){
-		    switch( action.visit( this ) ){
+	public boolean accept(ASTVisitor action) {
+        if (action.shouldVisitDeclarations) {
+		    switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
 	        }
 		}
-        
-        if( declaration != null ) if( !declaration.accept( action ) ) return false;
-        
-        if( action.shouldVisitDeclarations ){
-		    switch( action.leave( this ) ){
+
+        if (declaration != null) if (!declaration.accept(action)) return false;
+
+        if (action.shouldVisitDeclarations) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	            default : break;
@@ -100,10 +100,10 @@ public class CPPASTExplicitTemplateInstantiation extends ASTNode implements
 
     @Override
 	public void replace(IASTNode child, IASTNode other) {
-        if( declaration == child )
+        if (declaration == child)
         {
-            other.setParent( child.getParent() );
-            other.setPropertyInParent( child.getPropertyInParent() );
+            other.setParent(child.getParent());
+            other.setPropertyInParent(child.getPropertyInParent());
             declaration = (IASTDeclaration) other;
         }
     }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java
index e991b21a3ae..4aca712f354 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java
@@ -32,9 +32,9 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
 
 public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionList, IASTAmbiguityParent, ICPPEvaluationOwner {
     private IASTExpression[] expressions = new IASTExpression[2];
-    
+
 	/**
-	 * Caution: may contain nulls. 
+	 * Caution: may contain nulls.
 	 * @see #computeImplicitNames
 	 */
 	private IASTImplicitName[] fImplicitNames;
@@ -56,7 +56,7 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
 		}
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTExpression[] getExpressions() {
         if (expressions == null) return IASTExpression.EMPTY_EXPRESSION_ARRAY;
@@ -82,12 +82,12 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
 	            default: break;
 	        }
 		}
-      
+
         IASTExpression[] exps = getExpressions();
         IASTImplicitName[] implicits = action.shouldVisitImplicitNames ? computeImplicitNames() : null;
 
         for (int i = 0, n = exps.length; i < n; i++) {
-        	if (!exps[i].accept(action)) { 
+        	if (!exps[i].accept(action)) {
         		return false;
         	}
         	if (i < n - 1 && implicits != null && implicits[i] != null) {
@@ -99,14 +99,14 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
 
         if (action.shouldVisitImplicitDestructorNames && !acceptByNodes(getImplicitDestructorNames(), action))
         	return false;
-        
+
         if (action.shouldVisitExpressions) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
 	            case ASTVisitor.PROCESS_SKIP: return true;
 	            default: break;
 	        }
-		} 
+		}
         return true;
     }
 
@@ -120,9 +120,9 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
 			IASTExpression[] exprs = getExpressions(); // has to be at least two
 			if (exprs.length < 2)
 				return fImplicitNames = IASTImplicitName.EMPTY_NAME_ARRAY;
-			
+
 			fImplicitNames = new IASTImplicitName[exprs.length - 1];
-			
+
 			ICPPFunction[] overloads = getOverloads();
 			for (int i = 0; i < overloads.length; i++) {
 				ICPPFunction overload = overloads[i];
@@ -134,7 +134,7 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
 				}
 			}
 		}
-		
+
 		return fImplicitNames;
 	}
 
@@ -171,20 +171,20 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
             }
         }
     }
-    
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
-		if (fEvaluation == null) 
+		if (fEvaluation == null)
 			fEvaluation= computeEvaluation();
-		
+
 		return fEvaluation;
 	}
-	
+
 	private ICPPEvaluation computeEvaluation() {
 		final IASTExpression[] exprs = getExpressions();
 		if (exprs.length < 2)
 			return EvalFixed.INCOMPLETE;
-		
+
 		ICPPEvaluation[] evals= new ICPPEvaluation[exprs.length];
 		for (int i = 0; i < evals.length; i++) {
 			evals[i]= ((ICPPEvaluationOwner) exprs[i]).getEvaluation();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java
index af053f48919..8a63b50a6ec 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java
@@ -22,7 +22,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecExpressionStat
  */
 public class CPPASTExpressionStatement extends CPPASTAttributeOwner implements IASTExpressionStatement, ICPPExecutionOwner {
     private IASTExpression expression;
-    
+
     public CPPASTExpressionStatement() {
 	}
 
@@ -41,7 +41,7 @@ public class CPPASTExpressionStatement extends CPPASTAttributeOwner implements I
 		copy.setExpression(expression == null ? null : expression.copy(style));
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTExpression getExpression() {
         return expression;
@@ -93,7 +93,7 @@ public class CPPASTExpressionStatement extends CPPASTAttributeOwner implements I
 
 	@Override
 	public ICPPExecution getExecution() {
-		ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner)getExpression();
+		ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) getExpression();
 		ICPPEvaluation exprEval = evalOwner.getEvaluation();
 		return new ExecExpressionStatement(exprEval);
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldDeclarator.java
index 0929d254e72..4768abc0131 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldDeclarator.java
@@ -22,10 +22,10 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFieldDeclarator;
  */
 public class CPPASTFieldDeclarator extends CPPASTDeclarator implements ICPPASTFieldDeclarator {
     private IASTExpression bitField;
- 
+
     public CPPASTFieldDeclarator() {
 	}
-    
+
     public CPPASTFieldDeclarator(IASTName name) {
 		super(name);
 	}
@@ -46,7 +46,7 @@ public class CPPASTFieldDeclarator extends CPPASTDeclarator implements ICPPASTFi
 		copy.setBitFieldSize(bitField == null ? null : bitField.copy(style));
 		return copy(copy, style);
 	}
-	 
+
 	@Override
 	public IASTExpression getBitFieldSize() {
         return bitField;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java
index 8b3732a15e6..abc62e673f4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java
@@ -145,7 +145,7 @@ public class CPPASTFieldReference extends ASTNode
     	if (fImplicitNames == null) {
     		if (!fIsDeref)
     			return fImplicitNames = IASTImplicitName.EMPTY_NAME_ARRAY;
-			
+
     		// Collect the function bindings
 			List functionBindings = new ArrayList<>();
 			EvalMemberAccess.getFieldOwnerType(fOwner.getExpressionType(), fIsDeref, this, functionBindings, false);
@@ -250,7 +250,7 @@ public class CPPASTFieldReference extends ASTNode
 				j++;
 				}
 			}
-		
+
 
 		if (j < bindings.length)
 			return Arrays.copyOfRange(bindings, 0, j);
@@ -281,7 +281,7 @@ public class CPPASTFieldReference extends ASTNode
 	}
 
 	private ICPPEvaluation createEvaluation() {
-		ICPPEvaluation ownerEval = ((ICPPEvaluationOwner)fOwner).getEvaluation();
+		ICPPEvaluation ownerEval = ((ICPPEvaluationOwner) fOwner).getEvaluation();
 		if (!ownerEval.isTypeDependent()) {
 			IType ownerType= EvalMemberAccess.getFieldOwnerType(ownerEval.getType(this), fIsDeref, this, null, false);
 			if (ownerType != null) {
@@ -316,24 +316,24 @@ public class CPPASTFieldReference extends ASTNode
 			} catch (DOMException e) {
 				return EvalFixed.INCOMPLETE;
 			}
-		}		
+		}
 		return new EvalID(ownerEval, qualifier, fName.getSimpleID(), false, true, fIsDeref, args, this);
 	}
-	
+
 	public static int getFieldPosition(ICPPField field) {
 		final ICPPClassType ownerType = field.getClassOwner();
 		final ICPPClassType[] baseClasses = ClassTypeHelper.getAllBases(ownerType, null);
 		int baseFields = 0;
-		for(ICPPClassType baseClass : baseClasses) {
+		for (ICPPClassType baseClass : baseClasses) {
 			baseFields += ClassTypeHelper.getDeclaredFields(baseClass, null).length;
 		}
 		return baseFields + field.getFieldPosition();
 	}
-	
+
 	public static int getFieldPosition(IBinding binding, IType ownerType) {
 		final IType nestedType = SemanticUtil.getNestedType(ownerType, ALLCVQ);
-		if(nestedType instanceof ICPPClassType && binding instanceof ICPPField) {
-			final ICPPField field = (ICPPField)binding;
+		if (nestedType instanceof ICPPClassType && binding instanceof ICPPField) {
+			final ICPPField field = (ICPPField) binding;
 			return getFieldPosition(field);
 		}
 		return -1;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java
index 839d32b7506..d59ad761a04 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java
@@ -229,11 +229,11 @@ public class CPPASTForStatement extends CPPASTAttributeOwner implements ICPPASTF
 	@Override
 	public ICPPExecution getExecution() {
 		ICPPExecution initializerExec = EvalUtil.getExecutionFromStatement(getInitializerStatement());
-		ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner)getConditionExpression();
-		ICPPExecutionOwner conditionDecl = (ICPPExecutionOwner)getConditionDeclaration();
+		ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner) getConditionExpression();
+		ICPPExecutionOwner conditionDecl = (ICPPExecutionOwner) getConditionDeclaration();
 		ICPPEvaluation conditionExprEval = conditionExpr != null ? conditionExpr.getEvaluation() : null;
-		ExecSimpleDeclaration conditionDeclExec = conditionDecl != null ? (ExecSimpleDeclaration)conditionDecl.getExecution() : null;
-		ICPPEvaluationOwner iterationExpr = (ICPPEvaluationOwner)getIterationExpression();
+		ExecSimpleDeclaration conditionDeclExec = conditionDecl != null ? (ExecSimpleDeclaration) conditionDecl.getExecution() : null;
+		ICPPEvaluationOwner iterationExpr = (ICPPEvaluationOwner) getIterationExpression();
 		ICPPEvaluation iterationEval = iterationExpr != null ? iterationExpr.getEvaluation() : null;
 		ICPPExecution bodyExec = EvalUtil.getExecutionFromStatement(getBody());
 		return new ExecFor(initializerExec, conditionExprEval, conditionDeclExec, iterationEval, bodyExec);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java
index d8b8060ccc6..910bd47e052 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java
@@ -56,7 +56,7 @@ public class CPPASTFunctionCallExpression extends ASTNode
     private IASTImplicitName[] fImplicitNames;
 	private ICPPEvaluation fEvaluation;
 	private IASTImplicitDestructorName[] fImplicitDestructorNames;
-    
+
     public CPPASTFunctionCallExpression() {
     	setArguments(null);
 	}
@@ -85,7 +85,7 @@ public class CPPASTFunctionCallExpression extends ASTNode
 		copy.setFunctionNameExpression(fFunctionName == null ? null : fFunctionName.copy(style));
 		return copy(copy, style);
 	}
-	
+
     @Override
 	public IASTExpression getFunctionNameExpression() {
         return fFunctionName;
@@ -100,7 +100,7 @@ public class CPPASTFunctionCallExpression extends ASTNode
 			expression.setPropertyInParent(FUNCTION_NAME);
 		}
     }
-	
+
 	@Override
 	public IASTInitializerClause[] getArguments() {
         return fArguments;
@@ -126,20 +126,20 @@ public class CPPASTFunctionCallExpression extends ASTNode
     		ICPPFunction overload = getOverload();
 			if (overload == null)
 				return fImplicitNames = IASTImplicitName.EMPTY_NAME_ARRAY;
-			
+
 			if (getEvaluation() instanceof EvalTypeId) {
 				CPPASTImplicitName n1 = new CPPASTImplicitName(overload.getNameCharArray(), this);
 				n1.setOffsetAndLength((ASTNode) fFunctionName);
 				n1.setBinding(overload);
 				return fImplicitNames= new IASTImplicitName[] {n1};
 			}
-			
+
 			if (overload instanceof CPPImplicitFunction) {
 				if (!(overload instanceof ICPPMethod) || ((ICPPMethod) overload).isImplicit()) {
 					return fImplicitNames = IASTImplicitName.EMPTY_NAME_ARRAY;
 				}
 			}
-			
+
 			// Create separate implicit names for the two brackets
 			CPPASTImplicitName n1 = new CPPASTImplicitName(OverloadableOperator.PAREN, this);
 			n1.setBinding(overload);
@@ -147,19 +147,19 @@ public class CPPASTFunctionCallExpression extends ASTNode
 			CPPASTImplicitName n2 = new CPPASTImplicitName(OverloadableOperator.PAREN, this);
 			n2.setBinding(overload);
 			n2.setAlternate(true);
-			
+
 			if (fArguments.length == 0) {
 				int idEndOffset = ((ASTNode) fFunctionName).getOffset() + ((ASTNode) fFunctionName).getLength();
 				try {
 					IToken lparen = fFunctionName.getTrailingSyntax();
 					IToken rparen = lparen.getNext();
-					
+
 					if (lparen.getType() == IToken.tLPAREN) {
 						n1.setOffsetAndLength(idEndOffset + lparen.getOffset(), 1);
 					} else {
 						n1.setOffsetAndLength(idEndOffset + lparen.getEndOffset(), 0);
 					}
-						
+
 					if (rparen.getType() == IToken.tRPAREN) {
 						n2.setOffsetAndLength(idEndOffset + rparen.getOffset(), 1);
 					} else {
@@ -173,12 +173,12 @@ public class CPPASTFunctionCallExpression extends ASTNode
 				n1.computeOperatorOffsets(fFunctionName, true);
 				n2.computeOperatorOffsets(fArguments[fArguments.length - 1], true);
 			}
-			
+
 			fImplicitNames = new IASTImplicitName[] { n1, n2 };
     	}
     	return fImplicitNames;
     }
-    
+
 	@Override
 	public IASTImplicitDestructorName[] getImplicitDestructorNames() {
 		if (fImplicitDestructorNames == null) {
@@ -197,15 +197,15 @@ public class CPPASTFunctionCallExpression extends ASTNode
 	            default: break;
 	        }
 		}
-      
+
 		if (fFunctionName != null && !fFunctionName.accept(action))
-			return false;        
-        
+			return false;
+
         IASTImplicitName[] implicits = action.shouldVisitImplicitNames ? getImplicitNames() : null;
-        
+
 		if (implicits != null && implicits.length > 0 && !implicits[0].accept(action))
 			return false;
-        
+
 		for (IASTInitializerClause arg : fArguments) {
 			if (!arg.accept(action))
 				return false;
@@ -213,13 +213,13 @@ public class CPPASTFunctionCallExpression extends ASTNode
 
 		if (implicits != null && implicits.length > 1 && !implicits[1].accept(action))
 			return false;
-        
+
         if (action.shouldVisitImplicitDestructorNames && !acceptByNodes(getImplicitDestructorNames(), action))
         	return false;
 
 		if (action.shouldVisitExpressions && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
-		
+
         return true;
     }
 
@@ -238,13 +238,13 @@ public class CPPASTFunctionCallExpression extends ASTNode
 			}
 		}
 	}
-    
+
 	@Override
 	public ICPPFunction getOverload() {
 		ICPPEvaluation eval = getEvaluation();
 		if (eval instanceof EvalFunctionCall)
 			return ((EvalFunctionCall) eval).getOverload(this);
-		
+
 		if (eval instanceof EvalTypeId) {
 			if (!eval.isTypeDependent()) {
 				IType t= getNestedType(((EvalTypeId) eval).getInputType(), TDEF | CVTYPE | REF);
@@ -263,37 +263,37 @@ public class CPPASTFunctionCallExpression extends ASTNode
 		}
 		return null;
     }
-    
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
-		if (fEvaluation == null) 
+		if (fEvaluation == null)
 			fEvaluation= computeEvaluation();
-		
+
 		return fEvaluation;
 	}
-	
+
 	private ICPPEvaluation computeEvaluation() {
 		if (fFunctionName == null || fArguments == null)
 			return EvalFixed.INCOMPLETE;
-		
+
 		ICPPEvaluation conversion= checkForExplicitTypeConversion();
 		if (conversion != null)
 			return conversion;
-		
+
 		ICPPEvaluation[] args= new ICPPEvaluation[fArguments.length + 1];
-		args[0]= ((ICPPEvaluationOwner)fFunctionName).getEvaluation();
+		args[0]= ((ICPPEvaluationOwner) fFunctionName).getEvaluation();
 		for (int i = 1; i < args.length; i++) {
 			args[i]= ((ICPPEvaluationOwner) fArguments[i - 1]).getEvaluation();
 		}
 		ICPPEvaluation fieldOwnerEval = null;
 		if (fFunctionName instanceof ICPPASTFieldReference) {
-			ICPPASTFieldReference fieldRef = (ICPPASTFieldReference)fFunctionName;
-			ICPPEvaluationOwner fieldOwner = (ICPPEvaluationOwner)fieldRef.getFieldOwner();
+			ICPPASTFieldReference fieldRef = (ICPPASTFieldReference) fFunctionName;
+			ICPPEvaluationOwner fieldOwner = (ICPPEvaluationOwner) fieldRef.getFieldOwner();
 			fieldOwnerEval = fieldOwner.getEvaluation();
 		}
 		return new EvalFunctionCall(args, fieldOwnerEval, this);
 	}
-	
+
 	private ICPPEvaluation checkForExplicitTypeConversion() {
 		if (fFunctionName instanceof IASTIdExpression) {
 			final IASTName name = ((IASTIdExpression) fFunctionName).getName();
@@ -303,13 +303,13 @@ public class CPPASTFunctionCallExpression extends ASTNode
 				for (int i = 0; i < args.length; i++) {
 					args[i]= ((ICPPEvaluationOwner) fArguments[i]).getEvaluation();
 				}
-				
+
 				return new EvalTypeId((IType) b, this, false, args);
 			}
 		}
 		return null;
 	}
-    
+
     @Override
 	public IType getExpressionType() {
     	return getEvaluation().getType(this);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java
index 289991902c0..0aa2b78e943 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java
@@ -38,23 +38,23 @@ public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPAS
     private ICPPASTExpression noexceptExpression;
     private IASTTypeId trailingReturnType;
     private ICPPASTVirtSpecifier[] virtSpecifiers = NO_VIRT_SPECIFIERS;
-    
+
     private boolean varArgs;
     private boolean pureVirtual;
     private boolean isVolatile;
     private boolean isConst;
     private boolean isMutable;
     private RefQualifier refQualifier;
-    
+
     private ICPPFunctionScope scope;
-    
+
     public CPPASTFunctionDeclarator() {
 	}
 
 	public CPPASTFunctionDeclarator(IASTName name) {
 		super(name);
 	}
-	
+
 	@Override
 	public CPPASTFunctionDeclarator copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -91,9 +91,9 @@ public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPAS
 
 	@Override
 	public ICPPASTParameterDeclaration[] getParameters() {
-        if (parameters == null) 
+        if (parameters == null)
         	return ICPPASTParameterDeclaration.EMPTY_CPPPARAMETERDECLARATION_ARRAY;
-        
+
         return parameters= ArrayUtil.trim(parameters);
     }
 
@@ -155,7 +155,7 @@ public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPAS
 	public IASTTypeId[] getExceptionSpecification() {
         return typeIds= ArrayUtil.trim(typeIds);
     }
-    
+
     @Override
 	public void setEmptyExceptionSpecification() {
         assertNotFrozen();
@@ -252,7 +252,7 @@ public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPAS
 	public ICPPFunctionScope getFunctionScope() {
         if (scope != null)
             return scope;
-        
+
         // introduce a scope for function declarations and definitions, only.
         IASTNode node= getParent();
         while (!(node instanceof IASTDeclaration)) {
@@ -262,13 +262,13 @@ public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPAS
         }
         if (node instanceof IASTParameterDeclaration)
         	return null;
-        
+
         if (ASTQueries.findTypeRelevantDeclarator(this) == this) {
             scope = new CPPFunctionScope(this);
         }
         return scope;
     }
-    
+
     @Override
 	protected boolean postAccept(ASTVisitor action) {
 		IASTParameterDeclaration[] params = getParameters();
@@ -288,10 +288,10 @@ public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPAS
 			if (!noexceptExpression.accept(action))
 				return false;
 		}
-		
-		if (trailingReturnType != null && !trailingReturnType.accept(action)) 
+
+		if (trailingReturnType != null && !trailingReturnType.accept(action))
 			return false;
-		
+
 		ICPPASTVirtSpecifier[] virtSpecifiers = getVirtSpecifiers();
 		for (ICPPASTVirtSpecifier virtSpecifier : virtSpecifiers) {
 			if (!virtSpecifier.accept(action)) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDefinition.java
index 3bedfec7f90..6e477f9bdf2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDefinition.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDefinition.java
@@ -61,7 +61,7 @@ public class CPPASTFunctionDefinition extends CPPASTAttributeOwner
 		setDeclarator(declarator);
 		setBody(bodyStatement);
 	}
-	
+
 	@Override
 	public CPPASTFunctionDefinition copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -132,7 +132,7 @@ public class CPPASTFunctionDefinition extends CPPASTAttributeOwner
         if (statement != null) {
 			statement.setParent(this);
 			statement.setPropertyInParent(FUNCTION_BODY);
-		} 
+		}
     }
 
 	@Override
@@ -147,9 +147,9 @@ public class CPPASTFunctionDefinition extends CPPASTAttributeOwner
 
 	@Override
 	public ICPPASTConstructorChainInitializer[] getMemberInitializers() {
-        if (memInits == null) 
+        if (memInits == null)
         	return ICPPASTConstructorChainInitializer.EMPTY_CONSTRUCTORCHAININITIALIZER_ARRAY;
-        
+
         return memInits= ArrayUtil.trimAt(
         		ICPPASTConstructorChainInitializer.class, memInits, memInitPos);
 	}
@@ -209,7 +209,7 @@ public class CPPASTFunctionDefinition extends CPPASTAttributeOwner
 			if (!memInit.accept(action))
 				return false;
 		}
-		
+
 		if (action.shouldVisitImplicitNames) {
 			for (IASTImplicitName implicitName : getImplicitNames()) {
 				if (!implicitName.accept(action)) {
@@ -224,7 +224,7 @@ public class CPPASTFunctionDefinition extends CPPASTAttributeOwner
 		if (!acceptCatchHandlers(action))
 			return false;
 
-		if (action.shouldVisitDeclarations && action.leave(this) == ASTVisitor.PROCESS_ABORT) 
+		if (action.shouldVisitDeclarations && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
 
 		return true;
@@ -256,7 +256,7 @@ public class CPPASTFunctionDefinition extends CPPASTAttributeOwner
 			IBinding function = functionName.resolveBinding();
 			if (function instanceof ICPPConstructor) {
 				ICPPClassType classOwner = ((ICPPConstructor) function).getClassOwner();
-				
+
 				// Determine the bases of 'classOwner' that need to be initialized by this constructor.
 				Set basesThatNeedInitialization = new HashSet<>();
 				for (ICPPBase base : ClassTypeHelper.getBases(classOwner, this)) {
@@ -268,7 +268,7 @@ public class CPPASTFunctionDefinition extends CPPASTAttributeOwner
 				for (ICPPClassType virtualBase : ClassTypeHelper.getVirtualBases(classOwner, this)) {
 					basesThatNeedInitialization.add(virtualBase);
 				}
-				
+
 				// Go through the bases determined above, and see which ones aren't initialized
 				// explicitly in the mem-initializer list.
 				for (ICPPClassType base : basesThatNeedInitialization) {
@@ -291,7 +291,7 @@ public class CPPASTFunctionDefinition extends CPPASTAttributeOwner
 		}
 		return implicitNames;
 	}
-	
+
 	// Returns whether the base type 'base' is explicitly initialized by one of the mem-initializers
 	// of this constructor.
 	private boolean isInitializedExplicitly(ICPPClassType base) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java
index bb0485c2abd..fe30d12ed5e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.ASTVisitor;
@@ -26,7 +26,7 @@ import org.eclipse.cdt.core.parser.util.ArrayUtil;
 public class CPPASTFunctionWithTryBlock extends CPPASTFunctionDefinition implements ICPPASTFunctionWithTryBlock {
     private ICPPASTCatchHandler[] catchHandlers;
     private int catchHandlersPos= -1;
-    
+
     public CPPASTFunctionWithTryBlock() {
 	}
 
@@ -34,7 +34,7 @@ public class CPPASTFunctionWithTryBlock extends CPPASTFunctionDefinition impleme
 			IASTFunctionDeclarator declarator, IASTStatement bodyStatement) {
 		super(declSpecifier, declarator, bodyStatement);
 	}
-	
+
 	@Override
 	public CPPASTFunctionWithTryBlock copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -82,7 +82,7 @@ public class CPPASTFunctionWithTryBlock extends CPPASTFunctionDefinition impleme
 	protected boolean acceptCatchHandlers(ASTVisitor action) {
     	final ICPPASTCatchHandler[] handlers = getCatchHandlers();
         for (int i= 0; i < handlers.length; i++) {
-            if (!handlers[i].accept(action)) 
+            if (!handlers[i].accept(action))
             	return false;
         }
         return true;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTGotoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTGotoStatement.java
index 9dddb99d500..1e44b041d58 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTGotoStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTGotoStatement.java
@@ -20,7 +20,7 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
  */
 public class CPPASTGotoStatement extends CPPASTAttributeOwner implements IASTGotoStatement {
 	private IASTName name;
-	
+
     public CPPASTGotoStatement() {
 	}
 
@@ -32,7 +32,7 @@ public class CPPASTGotoStatement extends CPPASTAttributeOwner implements IASTGot
 	public CPPASTGotoStatement copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTGotoStatement copy(CopyStyle style) {
 		CPPASTGotoStatement copy = new CPPASTGotoStatement(name == null ? null : name.copy(style));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java
index bd674c2e8d7..e3982757f6c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java
@@ -33,7 +33,7 @@ public class CPPASTIfStatement extends CPPASTAttributeOwner implements ICPPASTIf
     private IASTStatement elseClause;
     private IASTDeclaration condDecl;
     private IScope scope;
-    
+
     public CPPASTIfStatement() {
 	}
 
@@ -42,13 +42,13 @@ public class CPPASTIfStatement extends CPPASTAttributeOwner implements ICPPASTIf
 		setThenClause(thenClause);
 		setElseClause(elseClause);
 	}
-    
+
     public CPPASTIfStatement(IASTExpression condition, IASTStatement thenClause, IASTStatement elseClause) {
 		setConditionExpression(condition);
 		setThenClause(thenClause);
 		setElseClause(elseClause);
 	}
-    
+
     @Override
 	public CPPASTIfStatement copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -63,7 +63,7 @@ public class CPPASTIfStatement extends CPPASTAttributeOwner implements ICPPASTIf
 		copy.setElseClause(elseClause == null ? null : elseClause.copy(style));
 		return copy(copy, style);
 	}
-    
+
 	@Override
 	public IASTExpression getConditionExpression() {
         return condition;
@@ -107,7 +107,7 @@ public class CPPASTIfStatement extends CPPASTAttributeOwner implements ICPPASTIf
         if (elseClause != null) {
 			elseClause.setParent(this);
 			elseClause.setPropertyInParent(ELSE);
-		} 
+		}
     }
 
 	private static class N {
@@ -127,7 +127,7 @@ public class CPPASTIfStatement extends CPPASTAttributeOwner implements ICPPASTIf
     		if (action.shouldVisitStatements) {
     			switch (action.visit(stmt)) {
     			case ASTVisitor.PROCESS_ABORT: return false;
-    			case ASTVisitor.PROCESS_SKIP: 	
+    			case ASTVisitor.PROCESS_SKIP:
     				stmt= null;
     				break loop;
     			default: break;
@@ -171,7 +171,7 @@ public class CPPASTIfStatement extends CPPASTAttributeOwner implements ICPPASTIf
     	}
         return true;
     }
-    
+
 	@Override
 	public void replace(IASTNode child, IASTNode other) {
 		if (thenClause == child) {
@@ -210,20 +210,20 @@ public class CPPASTIfStatement extends CPPASTAttributeOwner implements ICPPASTIf
 			condition= null;
 		}
     }
-    
+
 	@Override
 	public IScope getScope() {
 		if (scope == null)
             scope = new CPPBlockScope(this);
-        return scope;	
+        return scope;
     }
-	
+
 	@Override
 	public ICPPExecution getExecution() {
-		ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner)getConditionExpression();
-		ICPPExecutionOwner conditionDecl = (ICPPExecutionOwner)getConditionDeclaration();
+		ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner) getConditionExpression();
+		ICPPExecutionOwner conditionDecl = (ICPPExecutionOwner) getConditionDeclaration();
 		ICPPEvaluation conditionExprEval = conditionExpr != null ? conditionExpr.getEvaluation() : null;
-		ExecSimpleDeclaration conditionDeclExec = conditionDecl != null ? (ExecSimpleDeclaration)conditionDecl.getExecution() : null;
+		ExecSimpleDeclaration conditionDeclExec = conditionDecl != null ? (ExecSimpleDeclaration) conditionDecl.getExecution() : null;
 		ICPPExecution thenClauseExec = EvalUtil.getExecutionFromStatement(getThenClause());
 		ICPPExecution elseClauseExec = getElseClause() != null ? EvalUtil.getExecutionFromStatement(getElseClause()) : null;
 		return new ExecIf(conditionExprEval, conditionDeclExec, thenClauseExec, elseClauseExec);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java
index 5ef4080ecd0..3c70a78f0e5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java
@@ -34,7 +34,7 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer
     private int actualSize;
 	private boolean fIsPackExpansion;
 	private ICPPEvaluation fEvaluation;
-    
+
 	@Override
 	public CPPASTInitializerList copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -55,7 +55,7 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer
 	public int getSize() {
 		return actualSize;
 	}
-	
+
 	@Override
 	public ICPPASTInitializerClause[] getClauses() {
 		if (initializers == null)
@@ -70,10 +70,10 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer
 		IASTInitializerClause[] clauses= getClauses();
 		if (clauses.length == 0)
 			return IASTInitializer.EMPTY_INITIALIZER_ARRAY;
-		
+
 		IASTInitializer[] inits= new IASTInitializer[clauses.length];
 		for (int i = 0; i < inits.length; i++) {
-			IASTInitializerClause clause= clauses[i]; 
+			IASTInitializerClause clause= clauses[i];
 			if (clause instanceof IASTInitializer) {
 				inits[i]= (IASTInitializer) clause;
 			} else if (clause instanceof IASTExpression) {
@@ -85,7 +85,7 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer
 		}
 		return inits;
 	}
-    
+
 	@Override
 	public void addClause(IASTInitializerClause d) {
         assertNotFrozen();
@@ -109,9 +109,9 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer
         	addClause(null);
         }
     }
-        
+
     @Override
-	public boolean accept( ASTVisitor action ){
+	public boolean accept(ASTVisitor action) {
 		if (action.shouldVisitInitializers) {
 			switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -124,7 +124,7 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer
 			if (!clause.accept(action))
 				return false;
 		}
-        
+
 		if (action.shouldVisitInitializers && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
 
@@ -141,7 +141,7 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer
 		assertNotFrozen();
 		fIsPackExpansion= val;
 	}
-	
+
 	@Override
 	public void replace(IASTNode child, IASTNode other) {
 		if (initializers != null) {
@@ -154,7 +154,7 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer
 			}
 		}
 	}
-	
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
 		if (fEvaluation == null)
@@ -166,7 +166,7 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer
 		final ICPPASTInitializerClause[] clauses = getClauses();
 		ICPPEvaluation[] evals= new ICPPEvaluation[clauses.length];
 		for (int i = 0; i < evals.length; i++) {
-			ICPPEvaluationOwner clause = (ICPPEvaluationOwner)clauses[i];
+			ICPPEvaluationOwner clause = (ICPPEvaluationOwner) clauses[i];
 			evals[i]= clause.getEvaluation();
 		}
 		return new EvalInitList(evals, this);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java
index 90760d10403..694d3626f3d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java
@@ -23,7 +23,7 @@ import org.eclipse.cdt.core.dom.ast.IASTStatement;
 public class CPPASTLabelStatement extends CPPASTAttributeOwner implements IASTLabelStatement {
     private IASTName name;
     private IASTStatement nestedStatement;
-    
+
     public CPPASTLabelStatement() {
 	}
 
@@ -31,7 +31,7 @@ public class CPPASTLabelStatement extends CPPASTAttributeOwner implements IASTLa
 		setName(name);
 		setNestedStatement(nestedStatement);
 	}
-	
+
 	@Override
 	public CPPASTLabelStatement copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -73,7 +73,7 @@ public class CPPASTLabelStatement extends CPPASTAttributeOwner implements IASTLa
         if (!acceptByAttributeSpecifiers(action)) return false;
         if (name != null && !name.accept(action)) return false;
         if (nestedStatement != null && !nestedStatement.accept(action)) return false;
-        
+
         if (action.shouldVisitStatements) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java
index f02f1316579..34fd12e4228 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.PRVALUE;
@@ -31,13 +31,13 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
  */
 public class CPPASTLambdaExpression extends ASTNode implements ICPPASTLambdaExpression, ICPPEvaluationOwner {
 	private static final ICPPASTCapture[] NO_CAPTURES = {};
-	
+
 	private CaptureDefault fCaptureDefault;
 	private ICPPASTCapture[] fCaptures;
 	private ICPPASTFunctionDeclarator fDeclarator;
 
 	private IASTCompoundStatement fBody;
-	
+
 	private IASTImplicitName fClosureTypeName;
 	private IASTImplicitName fImplicitFunctionCallName;
 
@@ -92,7 +92,7 @@ public class CPPASTLambdaExpression extends ASTNode implements ICPPASTLambdaExpr
 		if (fImplicitFunctionCallName == null) {
     		final CPPClosureType closureType = getExpressionType();
 			ICPPFunction callOperator= closureType.getFunctionCallOperator();
-			
+
 			CPPASTImplicitName name = new CPPASTImplicitName(closureType.getNameCharArray(), this);
 			name.setBinding(callOperator);
 			name.setIsDefinition(true);
@@ -100,7 +100,7 @@ public class CPPASTLambdaExpression extends ASTNode implements ICPPASTLambdaExpr
 			if (fBody instanceof ASTNode) {
 				ASTNode bodyNode= (ASTNode) fBody;
 				name.setOffsetAndLength(bodyNode.getOffset(), 1);
-			}		
+			}
 			fImplicitFunctionCallName= name;
     	}
 		return fImplicitFunctionCallName;
@@ -137,16 +137,16 @@ public class CPPASTLambdaExpression extends ASTNode implements ICPPASTLambdaExpr
 		}
 		if (fDeclarator != null && !fDeclarator.accept(visitor))
 			return false;
-		
+
 		if (visitor.shouldVisitImplicitNames && !getFunctionCallOperatorName().accept(visitor))
 			return false;
-		
+
 		if (fBody != null && !fBody.accept(visitor))
 			return false;
 
 		if (visitor.shouldVisitExpressions && visitor.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
-		
+
         return true;
     }
 
@@ -212,7 +212,7 @@ public class CPPASTLambdaExpression extends ASTNode implements ICPPASTLambdaExpr
 		}
 		return fEvaluation;
 	}
-	
+
 	@Override
 	public CPPClosureType getExpressionType() {
 		return (CPPClosureType) getEvaluation().getType(this);
@@ -222,7 +222,7 @@ public class CPPASTLambdaExpression extends ASTNode implements ICPPASTLambdaExpr
 	public boolean isLValue() {
 		return false;
 	}
-	
+
 	@Override
 	public ValueCategory getValueCategory() {
 		return ValueCategory.PRVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLinkageSpecification.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLinkageSpecification.java
index 8ce0f5e761f..6ed26c046ab 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLinkageSpecification.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLinkageSpecification.java
@@ -28,19 +28,19 @@ public class CPPASTLinkageSpecification extends ASTNode
 	private IASTDeclaration[] fAllDeclarations;
 	private IASTDeclaration[] fActiveDeclarations;
     private int fLastDeclaration = -1;
-    
+
     public CPPASTLinkageSpecification() {
 	}
 
 	public CPPASTLinkageSpecification(String literal) {
 		this.fLiteral = literal;
 	}
-	
+
 	@Override
 	public CPPASTLinkageSpecification copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTLinkageSpecification copy(CopyStyle style) {
 		CPPASTLinkageSpecification copy = new CPPASTLinkageSpecification(fLiteral);
@@ -100,7 +100,7 @@ public class CPPASTLinkageSpecification extends ASTNode
 	            default: break;
 	        }
 		}
-        
+
 		IASTDeclaration[] decls = getDeclarations(action.includeInactiveNodes);
 		for (IASTDeclaration decl : decls) {
 			if (!decl.accept(action)) return false;
@@ -108,7 +108,7 @@ public class CPPASTLinkageSpecification extends ASTNode
 
 		if (action.shouldVisitDeclarations && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
-        
+
         return true;
     }
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java
index 930e324f386..991ff83b383 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     John Camelon (IBM) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -56,14 +56,14 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 
 	public static final CPPASTLiteralExpression INT_ZERO =
 			new CPPASTLiteralExpression(lk_integer_constant, new char[] {'0'});
-	
+
     private int fKind;
     private char[] fValue = CharArrayUtils.EMPTY;
     private int fStringLiteralSize = -1;  // Accounting for escape sequences and the null terminator.
     private char[] fSuffix = CharArrayUtils.EMPTY;
     private boolean fIsCompilerSuffix = true;
 	private ICPPEvaluation fEvaluation;
-	
+
 	private IBinding fUserDefinedLiteralOperator;
 	private IASTImplicitName[] fImplicitNames;
 
@@ -74,7 +74,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 		this.fKind = kind;
 		this.fValue = value;
 	}
-	
+
 	public CPPASTLiteralExpression(int kind, char[] value, char[] suffix, boolean isCompilerSuffix) {
 		this(kind, value);
 		this.setSuffix(suffix);
@@ -84,7 +84,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 	public CPPASTLiteralExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTLiteralExpression copy(CopyStyle style) {
 		CPPASTLiteralExpression copy = new CPPASTLiteralExpression(fKind,
@@ -116,7 +116,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
         assertNotFrozen();
     	this.fValue= value;
     }
-    
+
     public char[] getSuffix() {
 		return fSuffix;
 	}
@@ -124,11 +124,11 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 	public void setSuffix(char[] suffix) {
 		this.fSuffix = suffix;
 	}
-	
+
 	public void calculateSuffix() {
 		this.calculateSuffix(CharArrayUtils.EMPTY);
 	}
-	
+
 	/**
 	 * Returns the suffix of a user-defined literal integer or float
 	 * @param compilerSuffixes
@@ -148,7 +148,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 					setSuffix(CharArrayUtils.subarray(fValue, udOffset, -1));
 					for (int i = 0; i < fSuffix.length; i++) {
 						switch (fSuffix[i]) {
-						case 'l': case 'L': 
+						case 'l': case 'L':
 						case 'u': case 'U':
 						case 'f': case 'F':
 							continue;
@@ -165,7 +165,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 					}
 				}
 				break;
-			case lk_string_literal: 
+			case lk_string_literal:
 				{
 					final int offset = CharArrayUtils.lastIndexOf('"', fValue, CharArrayUtils.indexOf('"', fValue) + 1);
 					if (offset > 0) {
@@ -176,7 +176,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 					}
 				}
 				break;
-			case lk_char_constant: 
+			case lk_char_constant:
 				{
 					final int offset = CharArrayUtils.lastIndexOf('\'', fValue, CharArrayUtils.indexOf('\'', fValue) + 1);
 					if (offset > 0) {
@@ -192,7 +192,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 			// pass
 		}
 	}
-	
+
 	@Override
 	public String toString() {
         return new String(fValue);
@@ -212,38 +212,38 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 	            default: break;
 	        }
 		}
-        
+
         if (action.shouldVisitImplicitNames) {
         	for (IASTImplicitName name : getImplicitNames()) {
         		if (!name.accept(action)) return false;
         	}
         }
-        
+
         if (action.shouldVisitExpressions) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
 	            case ASTVisitor.PROCESS_SKIP: return true;
 	            default: break;
 	        }
-		}  
+		}
         return true;
     }
-    
+
     private int computeStringLiteralSize() {
     	int start = 0, end = fValue.length - 1 - getSuffix().length;
     	boolean isRaw = false;
-    	
+
     	// Skip past a prefix affecting the character type.
     	if (fValue[0] == 'L' || fValue[0] == 'u' || fValue[0] == 'U') {
     		++start;
     	}
-    	
+
     	// If there is an 'R' prefix, skip past it but take note of it.
     	if (fValue[start] == 'R') {
     		++start;
     		isRaw = true;
     	}
-    	
+
     	// Now we should have a quote-enclosed string. Skip past the quotes.
     	if (!(fValue[start] == '"' && fValue[end] == '"')) {
     		// Unexpected!
@@ -251,26 +251,26 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
     	}
     	++start;
     	--end;
-    	
+
     	// If we have a raw string, skip past the raw prefix.
     	if (isRaw) {
     		while (fValue[start] != '(' && start <= end) {
     			++start;
     			--end;
     		}
-    		
+
     		// Now we should have a parenthesis-enclosed string.
     		if (!(fValue[start] == '(' && fValue[end] == ')')) {
     			// Unexpected!
     			return 0;
     		}
-    		
+
     		// Since the string is raw, we don't need to process
     		// escape sequences, so the size is just the number
     		// of remaining characters, plus 1 for the null terminator.
     		return (end - start + 1) + 1;
     	}
-    	
+
     	// Otherwise, we have a non-raw string and we need to
     	// process escape sequences.
     	int length = 0;
@@ -286,32 +286,32 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 			}
     		// TODO: Handle fancier things like octal literals.
     	}
-    	
+
     	// + 1 for null terminator.
     	return length + 1;
     }
-    
+
 	private IValue getStringLiteralSize() {
 		if (fStringLiteralSize == -1) {
 			fStringLiteralSize = computeStringLiteralSize();
 		}
 		return IntegralValue.create(fStringLiteralSize);
 	}
-	
+
 	private IType getStringType() {
 		if (fSuffix.length > 0) {
 			return getUserDefinedLiteralOperatorType();
 		}
-		
+
 		IType type = new CPPBasicType(getBasicCharKind(), 0, this);
 		type = new CPPQualifierType(type, true, false);
 		return new CPPArrayType(type, getStringLiteralSize());
 	}
-	
+
 	private IType getCharType() {
 		return fSuffix.length > 0 ? getUserDefinedLiteralOperatorType() : new CPPBasicType(getBasicCharKind(), 0, this);
     }
-	
+
 	private IBinding getUserDefinedLiteralOperator() {
 		if (!fIsCompilerSuffix && fUserDefinedLiteralOperator == null) {
 			try {
@@ -319,29 +319,29 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 			} catch (DOMException e) {
 			}
 			if (fUserDefinedLiteralOperator == null) {
-				fUserDefinedLiteralOperator = new ProblemBinding(this, ISemanticProblem.BINDING_NOT_FOUND, 
+				fUserDefinedLiteralOperator = new ProblemBinding(this, ISemanticProblem.BINDING_NOT_FOUND,
 						fSuffix);
 			}
 		}
 		return fUserDefinedLiteralOperator;
 	}
-	
+
 	// 13.5.8
 	private IType getUserDefinedLiteralOperatorType() {
 		IType ret = new ProblemType(ISemanticProblem.TYPE_UNRESOLVED_NAME);
-		
+
 		IBinding func = getUserDefinedLiteralOperator();
 		if (func != null && func instanceof ICPPFunction) {
 			ret = ((ICPPFunction) func).getType().getReturnType();
 		}
-		
+
 		return ret;
 	}
-	
+
 	public char[] getOperatorName() {
 		return CharArrayUtils.concat("operator \"\"".toCharArray(), fSuffix); //$NON-NLS-1$
 	}
-	
+
 	public Kind getBasicCharKind() {
 		switch (fValue[0]) {
     	case 'L':
@@ -354,7 +354,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
     		return Kind.eChar;
     	}
 	}
-    
+
 	private IType classifyTypeOfFloatLiteral() {
 		final char[] lit= fSuffix;
 		final int len= lit.length;
@@ -382,7 +382,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 		boolean unsigned= false;
 		final char[] lit= fSuffix;
 		int flags= 0;
-		
+
 		if (fIsCompilerSuffix) {
 			for (int i= lit.length - 1; i >= 0; i--) {
 				final char c= lit[i];
@@ -400,26 +400,26 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 					break;
 				}
 			}
-	
+
 			if (unsigned) {
 				flags |= IBasicType.IS_UNSIGNED;
 			}
-			
+
 			if (makelong > 1) {
 				flags |= IBasicType.IS_LONG_LONG;
 			} else if (makelong == 1) {
 				flags |= IBasicType.IS_LONG;
-			} 
+			}
 		} else if (lit.length > 0) {
 			return getUserDefinedLiteralOperatorType();
 		}
 		return new CPPBasicType(Kind.eInt, flags, this);
 	}
-	
+
 	private int integerLiteral() {
 		int i = 0;
 		char c = fValue[i++];
-		
+
 		if (c == '0' && i < fValue.length) {
 			// Probably octal/hex/binary
 			c = fValue[i];
@@ -451,9 +451,9 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 					c = fValue[++i];
 				}
 			}
-			
+
 			/*
-			 * A floating-point constant could also have a leading zero 
+			 * A floating-point constant could also have a leading zero
 			 */
 			return handleDecimalOrExponent(c, i);
 		} else if (Character.isDigit(c)) {
@@ -472,10 +472,10 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 			// Shouldn't get here
 			assert false;
 		}
-		
+
 		return i;
 	}
-	
+
 	/*
 	 * Consumes a decimal point or exponent, if present.
 	 */
@@ -487,7 +487,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 		}
 		return i;
 	}
-	
+
 	/*
 	 * Called with the expectation that fValue[i] == '.'
 	 */
@@ -496,38 +496,38 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 		while (Character.isDigit(c) && i < fValue.length) {
 			c = fValue[++i];
 		}
-		
+
 		if ((c | 0x20) == 'e') {
 			return exponentPart(i);
 		}
-		
+
 		return i;
 	}
-	
+
 	/*
 	 * Called with the expectation that c == 'e'
 	 */
 	private int exponentPart(int i) {
 		char c = fValue[++i];
-		
+
 		// optional '+' or '-'
 		if (c == '+' || c == '-') {
 			c = fValue[++i];
 		}
-		
+
 		while (Character.isDigit(c) && i < fValue.length) {
 			c = fValue[++i];
 		}
 		// If there were no digits following the 'e' then we have
 		// D.De or .De which is a UDL on a double
-		
+
 		return i--;
 	}
-	
+
 	// GCC's binary constant notation
 	private int probablyBinary(int i) {
 		char c = fValue[++i];
-		
+
 		if (c == '1' || c == '0') {
 			while (c == '1' || c == '0' && i < fValue.length) {
 				c = fValue[i++];
@@ -548,7 +548,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 		}
 		return i;
 	}
-	
+
 	private int probablyHex(int i) {
 		/* hexadecimal-literal
 		 *   0x hexadecimal-digit
@@ -569,10 +569,10 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 		} else {
 			return i - 1;
 		}
-		
+
 		return i;
 	}
-	
+
 	// Assumes fValue[i] == '.'
 	private int hexFloatAfterDecimal(int i) {
 		// 0xHHH.
@@ -581,7 +581,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 			while (isHexDigit(c) && i < fValue.length) {
 				c = fValue[++i];
 			}
-			
+
 			if ((c | 0x20) == 'p') {
 				return hexFloatExponent(i);
 			} else {
@@ -590,21 +590,21 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 				return -1;
 			}
 		}
-		
+
 		// Probably shouldn't be able to get here
 		// we have 0xHHH.
 		return -1;
 	}
-	
+
 	// Assumes image[i] == 'p'
 	private int hexFloatExponent(int i) {
 		// 0xHH.HH[pP][-+]?DDDD
 		char c = fValue[++i];
-		
+
 		if (c == '-' || c == '+') {
 			c = fValue[++i];
 		}
-		
+
 		if (Character.isDigit(c)) {
 			while (Character.isDigit(c) && i < fValue.length) {
 				c = fValue[++i];
@@ -614,12 +614,12 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 		}
 		return i;
 	}
-	
+
 	private boolean isHexDigit(char c) {
 		c |= 0x20;
 		return ((c <= 'f' && c >= 'a') || (c <= '9' && c >= '0'));
 	}
-	
+
 	private boolean isOctal(final char c) {
 		return c >= '0' && c <= '7';
 	}
@@ -641,20 +641,20 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 	public CPPASTLiteralExpression(int kind, String value) {
 		this(kind, value.toCharArray());
 	}
-	
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
 		if (fEvaluation == null)
 			fEvaluation= createEvaluation();
 		return fEvaluation;
 	}
-	
+
 	private ICPPEvaluation createLiteralEvaluation() {
     	switch (fKind) {
 		case lk_this: {
 			IScope scope = CPPVisitor.getContainingScope(this);
 			IType type= CPPVisitor.getImpliedObjectType(scope);
-			if (type == null) 
+			if (type == null)
 				return EvalFixed.INCOMPLETE;
 			return new EvalFixed(new CPPPointerType(type), PRVALUE, IntegralValue.THIS);
 		}
@@ -675,32 +675,32 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
     	}
     	return EvalFixed.INCOMPLETE;
 	}
-	
+
 	private ICPPEvaluation createEvaluation() {
 		ICPPEvaluation literalEval = createLiteralEvaluation();
-		
+
 		IBinding udlOperator = getUserDefinedLiteralOperator();
-		if(udlOperator != null && literalEval != EvalFixed.INCOMPLETE) {
-			if(udlOperator instanceof ICPPFunction) {
-				ICPPFunction udlOpFunction = (ICPPFunction)udlOperator;
+		if (udlOperator != null && literalEval != EvalFixed.INCOMPLETE) {
+			if (udlOperator instanceof ICPPFunction) {
+				ICPPFunction udlOpFunction = (ICPPFunction) udlOperator;
 				EvalBinding op = new EvalBinding(udlOpFunction, udlOpFunction.getType(), this);
 				ICPPEvaluation[] args = null;
-				
+
 				ICPPParameter params[] = udlOpFunction.getParameters();
 				int paramCount = params.length;
-				if(paramCount == 0) {
+				if (paramCount == 0) {
 					// TODO: Support literal operator templates.
 					args = new ICPPEvaluation[]{op};
-				} else if(paramCount == 1) {
+				} else if (paramCount == 1) {
 					//this means that we need to fall back to the raw literal operator
-					if(params[0].getType() instanceof IPointerType) {
+					if (params[0].getType() instanceof IPointerType) {
 						char numValue[] = getValue();
 						int numLen = numValue.length;
 						char strValue[] = new char[numLen + 2];
 						strValue[0] = '"';
 						strValue[numLen + 1] = '"';
 						System.arraycopy(numValue, 0, strValue, 1, numLen);
-						
+
 						IType type = new CPPBasicType(Kind.eChar, 0, this);
 						type = new CPPQualifierType(type, true, false);
 						type = new CPPArrayType(type, IntegralValue.create(numLen+1));
@@ -709,7 +709,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 					} else {
 						args = new ICPPEvaluation[]{op, literalEval};
 					}
-				} else if(paramCount == 2) {
+				} else if (paramCount == 2) {
 					IValue sizeValue = IntegralValue.create(computeStringLiteralSize() - 1);
 					EvalFixed literalSizeEval = new EvalFixed(CPPBasicType.INT, PRVALUE, sizeValue);
 					args = new ICPPEvaluation[]{op, literalEval, literalSizeEval};
@@ -717,26 +717,26 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 				return new EvalFunctionCall(args, null, this);
 			}
 		}
-		
+
 		//has a user-defined literal suffix but didn't find a udl operator function => error
-		if(getSuffix().length > 0 && (getKind() == lk_string_literal || !fIsCompilerSuffix)) {
+		if (getSuffix().length > 0 && (getKind() == lk_string_literal || !fIsCompilerSuffix)) {
 			return EvalFixed.INCOMPLETE;
 		}
-		
+
 		return literalEval;
 	}
 
 	private IValue createCharValue() {
 		try {
 			final char[] image= getValue();
-			if (image.length > 1 && image[0] == 'L') 
+			if (image.length > 1 && image[0] == 'L')
 				return IntegralValue.create(ExpressionEvaluator.getChar(image, 2));
 			return IntegralValue.create(ExpressionEvaluator.getChar(image, 1));
 		} catch (EvalException e) {
 			return IntegralValue.UNKNOWN;
 		}
 	}
-	
+
 	private IValue createIntValue() {
 		try {
 			return IntegralValue.create(ExpressionEvaluator.getNumber(getValue()));
@@ -749,7 +749,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
 	public IType getExpressionType() {
 		return getEvaluation().getType(this);
 	}
-	
+
 	@Override
 	public boolean isLValue() {
 		return getValueCategory() == LVALUE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNameBase.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNameBase.java
index 99190d0f02f..834b25700f7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNameBase.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNameBase.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import java.util.regex.Pattern;
@@ -49,22 +49,22 @@ public abstract class CPPASTNameBase extends ASTNode implements ICPPASTName {
 			Assert.isTrue(sAllowRecursionBindings, getMessage());
 		}
 	}
-	
+
 	private RecursionResolvingBinding createRecursionResolvingBinding() {
 		// We create a recursion resolving binding when the resolution depth
 		// exceeds MAX_RESOLUTION_DEPTH. If the resolution depth exceeds
 		// MAX_RESOLUTION_DEPTH + 1, it means that attempting to create the
 		// recursion resolving binding has led us back to trying to resolve
-		// the binding for this name again, so the recursion isn't broken. 
-		// This can happen because the constructor of RecursionResolvingBinding 
-		// calls ProblemBinding.getMessage(), which can try to do name 
+		// the binding for this name again, so the recursion isn't broken.
+		// This can happen because the constructor of RecursionResolvingBinding
+		// calls ProblemBinding.getMessage(), which can try to do name
 		// resolution to build an argument string if one wasn't provided in the
 		// ProblemBinding constructor. To break the recursion in a case
 		// like, this we provide the argument string "(unknown)" instead.
 		char[] args = (fResolutionDepth > MAX_RESOLUTION_DEPTH + 1) ? "(unknown)".toCharArray() : null;  //$NON-NLS-1$
 		return new RecursionResolvingBinding(this, args);
 	}
-	
+
 	private IBinding fBinding;
 	private byte fResolutionDepth;
 	private boolean fIsFinal;
@@ -74,7 +74,7 @@ public abstract class CPPASTNameBase extends ASTNode implements ICPPASTName {
 			setBinding(createRecursionResolvingBinding());
 		}
 	}
-	
+
 	/**
 	 * Called to perform the binding resolution. Subclasses may return lazy bindings that
 	 * will not be exposed within public API.
@@ -96,7 +96,7 @@ public abstract class CPPASTNameBase extends ASTNode implements ICPPASTName {
     	}
     	return fBinding;
 	}
-	
+
     @Override
 	public IBinding resolveBinding() {
     	if (fBinding == null) {
@@ -117,7 +117,7 @@ public abstract class CPPASTNameBase extends ASTNode implements ICPPASTName {
     	}
     	if (!fIsFinal)
     		resolveFinalBinding(this);
-    	
+
     	return fBinding;
     }
 
@@ -141,10 +141,10 @@ public abstract class CPPASTNameBase extends ASTNode implements ICPPASTName {
     	final IBinding cand= fBinding;
         if (cand == null)
         	return null;
-        
+
         if (!fIsFinal)
         	resolveFinalBinding(this);
-        
+
         return fBinding;
     }
 
@@ -159,13 +159,13 @@ public abstract class CPPASTNameBase extends ASTNode implements ICPPASTName {
     	}
 		fIsFinal= true;
 	}
-	
+
 	@Override
 	public void setBinding(IBinding binding) {
 		fBinding= binding;
 		fResolutionDepth= 0;
 	}
-	
+
 	@Override
 	public IASTName getLastName() {
 		return this;
@@ -185,12 +185,12 @@ public abstract class CPPASTNameBase extends ASTNode implements ICPPASTName {
 		}
 		return false;
 	}
-	
+
 	@Override
 	public final String toString() {
 		return new String(toCharArray());
 	}
-	
+
 	@Override
 	public IASTCompletionContext getCompletionContext() {
         IASTNode node = getParent();
@@ -200,7 +200,7 @@ public abstract class CPPASTNameBase extends ASTNode implements ICPPASTName {
     		}
     		node = node.getParent();
     	}
-    	
+
     	return null;
 	}
 
@@ -241,7 +241,7 @@ public abstract class CPPASTNameBase extends ASTNode implements ICPPASTName {
         }
         return false;
     }
-    
+
     @Override
 	public boolean isDefinition() {
         IASTNode parent = getParent();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java
index 24e2a76092b..310bde8672e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java
@@ -29,7 +29,7 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier
 		implements ICPPASTNamedTypeSpecifier, ICPPASTCompletionContext {
     private boolean typename;
     private IASTName name;
-    
+
     public CPPASTNamedTypeSpecifier() {
 	}
 
@@ -49,7 +49,7 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier
 		copy.typename = typename;
 		return super.copy(copy, style);
 	}
-	
+
 	@Override
 	public boolean isTypename() {
         return typename;
@@ -91,7 +91,7 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier
 
         if (name != null && !name.accept(action))
         	return false;
-        
+
         if (action.shouldVisitDeclSpecifiers) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT:
@@ -104,7 +104,7 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier
 		}
         return true;
     }
-	
+
 	@Override
 	public int getRoleForName(IASTName n) {
 		if (n == name)
@@ -134,7 +134,7 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier
 			return Arrays.copyOfRange(bindings, 0, j);
 		return bindings;
 	}
-	
+
 	@Override
 	public IBinding[] findBindings(IASTName n, boolean isPrefix) {
 		return findBindings(n, isPrefix, null);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java
index 70b17ee6897..2ae1f4bc71e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java
@@ -21,7 +21,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
 public class CPPASTNamespaceAlias extends ASTNode implements ICPPASTNamespaceAlias {
     private IASTName alias;
     private IASTName qualifiedName;
-    
+
 	public CPPASTNamespaceAlias(IASTName alias, IASTName qualifiedName) {
 		setAlias(alias);
 		setMappingName(qualifiedName);
@@ -39,7 +39,7 @@ public class CPPASTNamespaceAlias extends ASTNode implements ICPPASTNamespaceAli
 				qualifiedName == null ? null : qualifiedName.copy(style));
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public IASTName getAlias() {
         return alias;
@@ -79,10 +79,10 @@ public class CPPASTNamespaceAlias extends ASTNode implements ICPPASTNamespaceAli
 	            default: break;
 	        }
 		}
-        
+
         if (alias != null && !alias.accept(action)) return false;
         if (qualifiedName != null && !qualifiedName.accept(action)) return false;
-        
+
         if (action.shouldVisitDeclarations) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceDefinition.java
index 82cf8d276a7..92ac1a80778 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceDefinition.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceDefinition.java
@@ -43,7 +43,7 @@ public class CPPASTNamespaceDefinition extends CPPASTAttributeOwner implements I
 	public CPPASTNamespaceDefinition copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTNamespaceDefinition copy(CopyStyle style) {
 		CPPASTNamespaceDefinition copy =
@@ -69,7 +69,7 @@ public class CPPASTNamespaceDefinition extends CPPASTAttributeOwner implements I
 			name.setPropertyInParent(NAMESPACE_NAME);
 		}
     }
-    
+
 	@Override
 	public void setIsInline(boolean isInline) {
 		assertNotFrozen();
@@ -124,7 +124,7 @@ public class CPPASTNamespaceDefinition extends CPPASTAttributeOwner implements I
 	            default: break;
 	        }
 		}
-        
+
 		if (fName != null && !fName.accept(action))
 			return false;
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java
index 6ca7310f85d..3d2972c2118 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java
@@ -21,7 +21,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed;
 public class CPPASTNaryTypeIdExpression extends ASTNode implements ICPPASTNaryTypeIdExpression, ICPPEvaluationOwner {
 	private Operator fOperator;
 	private ICPPASTTypeId[] fOperands;
-	
+
 	public CPPASTNaryTypeIdExpression(Operator operator, ICPPASTTypeId[] operands) {
 		fOperator = operator;
 		fOperands = operands;
@@ -30,7 +30,7 @@ public class CPPASTNaryTypeIdExpression extends ASTNode implements ICPPASTNaryTy
 			operand.setPropertyInParent(OPERAND);
 		}
 	}
-	
+
 	@Override
 	public ICPPASTNaryTypeIdExpression copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -45,7 +45,7 @@ public class CPPASTNaryTypeIdExpression extends ASTNode implements ICPPASTNaryTy
 		CPPASTNaryTypeIdExpression copy = new CPPASTNaryTypeIdExpression(fOperator, operands);
 		return copy(copy, style);
 	}
-	
+
 	@Override
 	public Operator getOperator() {
 		return fOperator;
@@ -55,7 +55,7 @@ public class CPPASTNaryTypeIdExpression extends ASTNode implements ICPPASTNaryTy
 	public ICPPASTTypeId[] getOperands() {
 		return fOperands;
 	}
-	
+
 	@Override
 	public boolean accept(ASTVisitor action) {
 		if (action.shouldVisitExpressions) {
@@ -65,20 +65,20 @@ public class CPPASTNaryTypeIdExpression extends ASTNode implements ICPPASTNaryTy
 				default: break;
 			}
 		}
-		
+
 		for (ICPPASTTypeId operand : fOperands) {
 			if (!operand.accept(action)) {
 				return false;
 			}
 		}
-		
+
 		if (action.shouldVisitExpressions && action.leave(this) == ASTVisitor.PROCESS_ABORT) {
 			return false;
 		}
-		
+
 		return true;
 	}
-	
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
 		// TODO: Implement. This will need a new evaluation type, EvalNaryTypeId.
@@ -104,6 +104,6 @@ public class CPPASTNaryTypeIdExpression extends ASTNode implements ICPPASTNaryTy
 	@Override
 	public IASTImplicitDestructorName[] getImplicitDestructorNames() {
 		// N-ary type-id expressions don't call destructors.
-		return IASTImplicitDestructorName.EMPTY_NAME_ARRAY;  
+		return IASTImplicitDestructorName.EMPTY_NAME_ARRAY;
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java
index 412d80b1f34..1ff55e56671 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java
@@ -54,12 +54,12 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
     private IASTInitializer fInitializer;
     private boolean fIsGlobal;
     private boolean fIsNewTypeId;
-	
+
     private IASTExpression[] fCachedArraySizes;
 	private ICPPEvaluation fEvaluation;
     private IASTImplicitName[] fImplicitNames;
 	private IASTImplicitDestructorName[] fImplicitDestructorNames;
-    
+
     public CPPASTNewExpression() {
 	}
 
@@ -106,7 +106,7 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
 	public IASTInitializerClause[] getPlacementArguments() {
     	return fPlacement;
     }
-    
+
     @Override
 	public void setPlacementArguments(IASTInitializerClause[] args) {
         assertNotFrozen();
@@ -159,7 +159,7 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
         assertNotFrozen();
         fIsNewTypeId = value;
     }
-    
+
     /**
      * @see org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner#getImplicitNames()
      */
@@ -197,8 +197,8 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
 				}
 			}
     	}
-    	
-    	return fImplicitNames;  
+
+    	return fImplicitNames;
     }
 
 	@Override
@@ -236,13 +236,13 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
 	            default: break;
 	        }
 		}
-        
-        if (action.shouldVisitImplicitNames) { 
+
+        if (action.shouldVisitImplicitNames) {
         	for (IASTImplicitName name : getImplicitNames()) {
         		if (!name.accept(action)) return false;
         	}
         }
-        
+
 		if (fPlacement != null) {
 			for (IASTInitializerClause arg : fPlacement) {
 				if (!arg.accept(action))
@@ -253,8 +253,8 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
 			return false;
 
 		if (fInitializer != null && !fInitializer.accept(action))
-			return false;       
-        
+			return false;
+
         if (action.shouldVisitImplicitDestructorNames && !acceptByNodes(getImplicitDestructorNames(), action))
         	return false;
 
@@ -280,7 +280,7 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
 			}
 		}
 	}
-    
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
 		if (fEvaluation == null) {
@@ -300,7 +300,7 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
 		}
 		return fEvaluation;
 	}
-	
+
     @Override
 	public IType getExpressionType() {
     	return getEvaluation().getType(this);
@@ -310,7 +310,7 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
 	public boolean isLValue() {
 		return false;
 	}
-	
+
 	@Override
 	public ValueCategory getValueCategory() {
 		return PRVALUE;
@@ -350,13 +350,13 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
     		IASTArrayDeclarator adtor= new CPPASTArrayDeclarator(dtor.getName());
     		IASTPointerOperator[] ptrOps= dtor.getPointerOperators();
     		for (IASTPointerOperator ptr : ptrOps) {
-        		adtor.addPointerOperator(ptr);				
+        		adtor.addPointerOperator(ptr);
 			}
     		fTypeId.setAbstractDeclarator(adtor);
     		dtor= adtor;
     	}
     	IASTArrayModifier mod= new CPPASTArrayModifier(expression);
-    	((ASTNode) mod).setOffsetAndLength((ASTNode)expression);
+    	((ASTNode) mod).setOffsetAndLength((ASTNode) expression);
     	((IASTArrayDeclarator) dtor).addArrayModifier(mod);
     }
 
@@ -370,7 +370,7 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
     			return (IASTExpression) fPlacement[0];
     		return null;
     	}
-    		
+
     	CASTExpressionList result= new CASTExpressionList();
     	for (IASTInitializerClause arg : fPlacement) {
     		if (arg instanceof IASTExpression) {
@@ -381,7 +381,7 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
     	result.setPropertyInParent(NEW_PLACEMENT);
         return result;
     }
-	
+
 	@Override
 	@Deprecated
     public void setNewPlacement(IASTExpression expression) {
@@ -394,7 +394,7 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
         	setPlacementArguments(new IASTExpression[] {expression});
         }
     }
-    
+
 	@Override
 	@Deprecated
     public IASTExpression getNewInitializer() {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTOperatorName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTOperatorName.java
index 616aac2da09..0efa1c184aa 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTOperatorName.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTOperatorName.java
@@ -13,7 +13,7 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp;
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTOperatorName;
 
 public class CPPASTOperatorName extends CPPASTName implements ICPPASTOperatorName {
-	
+
 	public CPPASTOperatorName() {
 		super();
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java
index 3cec2e6e76f..c1095de0c7d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java
@@ -9,7 +9,7 @@
  *     Markus Schorn - initial API and implementation
  *     Natan Ridge
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.ASTVisitor;
@@ -36,7 +36,7 @@ public class CPPASTPackExpansionExpression extends ASTNode implements ICPPASTPac
 	@Override
 	public void setPattern(IASTExpression pattern) {
 		assertNotFrozen();
-		
+
 		fPattern= pattern;
 		if (pattern != null) {
 			pattern.setParent(this);
@@ -48,7 +48,7 @@ public class CPPASTPackExpansionExpression extends ASTNode implements ICPPASTPac
 	public IASTExpression getPattern() {
 		return fPattern;
 	}
-	
+
 	@Override
 	public CPPASTPackExpansionExpression copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -67,7 +67,7 @@ public class CPPASTPackExpansionExpression extends ASTNode implements ICPPASTPac
 		}
 		return fEvaluation;
 	}
-	
+
 	@Override
 	public IType getExpressionType() {
 		return getEvaluation().getType(this);
@@ -77,7 +77,7 @@ public class CPPASTPackExpansionExpression extends ASTNode implements ICPPASTPac
 	public boolean isLValue() {
 		return fPattern.isLValue();
 	}
-	
+
 	@Override
 	public ValueCategory getValueCategory() {
 		return fPattern.getValueCategory();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTParameterDeclaration.java
index 823625a6ef6..9f66bbc9951 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTParameterDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTParameterDeclaration.java
@@ -28,7 +28,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
 public class CPPASTParameterDeclaration extends ASTNode implements ICPPASTParameterDeclaration, IASTAmbiguityParent {
     private IASTDeclSpecifier fDeclSpec;
     private ICPPASTDeclarator fDeclarator;
-    
+
     public CPPASTParameterDeclaration() {
 	}
 
@@ -36,7 +36,7 @@ public class CPPASTParameterDeclaration extends ASTNode implements ICPPASTParame
 		setDeclSpecifier(declSpec);
 		setDeclarator(declarator);
 	}
-	
+
 	@Override
 	public boolean isParameterPack() {
 		return fDeclarator != null && CPPVisitor.findInnermostDeclarator(fDeclarator).declaresParameterPack();
@@ -96,12 +96,12 @@ public class CPPASTParameterDeclaration extends ASTNode implements ICPPASTParame
 	            default: break;
 	        }
 		}
-        
+
 		if (fDeclSpec != null && !fDeclSpec.accept(action))
 			return false;
 		if (fDeclarator != null && !fDeclarator.accept(action))
 			return false;
-        
+
 		if (action.shouldVisitParameterDeclarations &&
 				action.leave((IASTParameterDeclaration) this) == ASTVisitor.PROCESS_ABORT) {
 			return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointer.java
index f5408a9e1ae..fab6ba94774 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointer.java
@@ -25,12 +25,12 @@ public class CPPASTPointer extends CPPASTAttributeOwner implements IASTPointer {
 
     public CPPASTPointer() {
     }
-    
+
     @Override
 	public CPPASTPointer copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-    
+
 	@Override
 	public CPPASTPointer copy(CopyStyle style) {
 		CPPASTPointer copy = new CPPASTPointer();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointerToMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointerToMember.java
index cf2c80f8288..c8cd2ab1639 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointerToMember.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointerToMember.java
@@ -30,7 +30,7 @@ public class CPPASTPointerToMember extends CPPASTPointer implements ICPPASTPoint
 	public CPPASTPointerToMember copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTPointerToMember copy(CopyStyle style) {
 		CPPASTPointerToMember copy = new CPPASTPointerToMember(n == null ? null : n.copy(style));
@@ -69,12 +69,12 @@ public class CPPASTPointerToMember extends CPPASTPointer implements ICPPASTPoint
 
 		if (action.shouldVisitPointerOperators && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
-		return true;	    
+		return true;
     }
 
 	@Override
-	public int getRoleForName(IASTName name ) {
-		if( name  == this.n )
+	public int getRoleForName(IASTName name) {
+		if (name  == this.n)
 			return r_reference;
 		return r_unclear;
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblem.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblem.java
index 5536ebcd34c..4deefd5b546 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblem.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblem.java
@@ -19,7 +19,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTProblem;
  * C++-specific implementation allows actions to visit the problem.
  */
 public class CPPASTProblem extends ASTProblem {
-   
+
     public CPPASTProblem(int id, char[] arg, boolean isError) {
     	super(id, arg, isError);
     }
@@ -35,7 +35,7 @@ public class CPPASTProblem extends ASTProblem {
     	CPPASTProblem copy = new CPPASTProblem(getID(), arg == null ? null : arg.clone(), isError());
 		return copy(copy, style);
 	}
-    
+
     @Override
 	public boolean accept(ASTVisitor action) {
     	if (action.shouldVisitProblems) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemStatement.java
index 0c88ae12322..f4bbc466884 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemStatement.java
@@ -23,7 +23,7 @@ import org.eclipse.cdt.core.dom.ast.IASTProblemStatement;
  * @author jcamelon
  */
 public class CPPASTProblemStatement extends CPPASTProblemOwner implements IASTProblemStatement {
-	
+
     public CPPASTProblemStatement() {
 		super();
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemTypeId.java
index 10e1a47c190..6827e5b0afe 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemTypeId.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemTypeId.java
@@ -21,7 +21,7 @@ import org.eclipse.cdt.core.dom.ast.IASTProblemTypeId;
  * @author jcamelon
  */
 public class CPPASTProblemTypeId extends CPPASTProblemOwner implements IASTProblemTypeId {
-	
+
     public CPPASTProblemTypeId() {
 	}
 
@@ -33,7 +33,7 @@ public class CPPASTProblemTypeId extends CPPASTProblemOwner implements IASTProbl
 	public CPPASTProblemTypeId copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTProblemTypeId copy(CopyStyle style) {
 		CPPASTProblemTypeId copy = new CPPASTProblemTypeId();
@@ -48,12 +48,12 @@ public class CPPASTProblemTypeId extends CPPASTProblemOwner implements IASTProbl
             case ASTVisitor.PROCESS_SKIP: return true;
             default: break;
         }
-		    
+
 		// Visit the problem
 		if (!super.accept(action))
 			return false;
-    	
-        if (action.shouldVisitTypeIds && action.leave(this) == ASTVisitor.PROCESS_ABORT) 
+
+        if (action.shouldVisitTypeIds && action.leave(this) == ASTVisitor.PROCESS_ABORT)
         	return false;
     	}
         return true;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java
index 6724301522d..34c729dfab2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java
@@ -55,7 +55,7 @@ import org.eclipse.cdt.internal.core.parser.util.ContentAssistMatcherFactory;
 import org.eclipse.core.runtime.Assert;
 
 /**
- * Qualified name, which can contain any other name (unqualified, operator-name, conversion name, 
+ * Qualified name, which can contain any other name (unqualified, operator-name, conversion name,
  * template id).
  */
 public class CPPASTQualifiedName extends CPPASTNameBase
@@ -77,12 +77,12 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 	@Deprecated
 	public CPPASTQualifiedName() {
 	}
-	
+
 	@Override
 	public CPPASTQualifiedName copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTQualifiedName copy(CopyStyle style) {
 		CPPASTQualifiedName copy =
@@ -112,7 +112,7 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 		// The whole qualified name resolves to the same thing as the last name.
 		return getLastName().getPreBinding();
     }
-    
+
 	@Override
 	public IBinding getBinding() {
 		return getLastName().getBinding();
@@ -129,7 +129,7 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 			addNameSpecifier(fLastName);
 		setLastName((ICPPASTName) name);
 	}
-	
+
 	@Override
 	public void setLastName(ICPPASTName lastName) {
 		assertNotFrozen();
@@ -138,7 +138,7 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 		fLastName.setParent(this);
 		fLastName.setPropertyInParent(SEGMENT_NAME);
 	}
-	
+
 	@Override
 	public void addNameSpecifier(ICPPASTNameSpecifier nameSpecifier) {
 		assertNotFrozen();
@@ -154,11 +154,11 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 	public ICPPASTNameSpecifier[] getQualifier() {
 		if (fQualifierPos < 0)
 			return ICPPASTNameSpecifier.EMPTY_NAME_SPECIFIER_ARRAY;
-		
+
 		fQualifier = ArrayUtil.trimAt(ICPPASTNameSpecifier.class, fQualifier, fQualifierPos);
 		return fQualifier;
 	}
-	
+
 	@Override
 	public ICPPASTNameSpecifier[] getAllSegments() {
 		ICPPASTNameSpecifier[] result = new ICPPASTNameSpecifier[fQualifierPos + (fLastName == null ? 1 : 2)];
@@ -179,12 +179,12 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 	public char[] getSimpleID() {
 		return fLastName.getSimpleID();
 	}
-	
+
 	@Override
 	public char[] getLookupKey() {
 		return fLastName.getLookupKey();
 	}
-	
+
 	@Override
 	public char[] toCharArray() {
 		if (fSignature == null) {
@@ -245,7 +245,7 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 		// don't visit it.
 		if (fLastName != null && fLastName.getLookupKey().length > 0 && !fLastName.accept(action))
 			return false;
-		
+
 		if (action.shouldVisitNames) {
 			switch (action.leave(this)) {
 			case ASTVisitor.PROCESS_ABORT:
@@ -256,10 +256,10 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 				break;
 			}
 		}
-		
+
 		return true;
 	}
-	
+
 	@Override
 	public int getRoleOfName(boolean allowResolution) {
         IASTNode parent = getParent();
@@ -275,36 +275,36 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 	@Override
 	public int getRoleForName(IASTName n) {
 		for (int i=0; i <= fQualifierPos; ++i) {
-			if (fQualifier[i] == n) 
+			if (fQualifier[i] == n)
 				return r_reference;
 		}
 		if (getLastName() == n) {
 			IASTNode p = getParent();
 			if (p instanceof IASTNameOwner) {
-				return ((IASTNameOwner)p).getRoleForName(this);
+				return ((IASTNameOwner) p).getRoleForName(this);
 			}
 		}
 		return r_unclear;
 	}
-	
+
 	@Override
 	public boolean isConversionOrOperator() {
 		final IASTName lastName= getLastName();
 		if (lastName instanceof ICPPASTConversionName || lastName instanceof ICPPASTOperatorName) {
 			return true;
 		}
-		
+
 		// check templateId's name
 		if (lastName instanceof ICPPASTTemplateId) {
-			IASTName tempName = ((ICPPASTTemplateId)lastName).getTemplateName();
+			IASTName tempName = ((ICPPASTTemplateId) lastName).getTemplateName();
 			if (tempName instanceof ICPPASTConversionName || tempName instanceof ICPPASTOperatorName) {
 				return true;
 			}
 		}
-		
+
 		return false;
 	}
-    
+
 	@Override
 	public IBinding[] findBindings(IASTName n, boolean isPrefix, String[] namespaces) {
 		IBinding[] bindings = CPPSemantics.findBindingsForContentAssist(n, isPrefix, namespaces);
@@ -341,7 +341,7 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 
 		return bindings;
 	}
-	
+
 	private boolean canBeFieldAccess(ICPPClassType baseClass) {
 		IASTNode parent= getParent();
 		if (parent instanceof IASTFieldReference) {
@@ -350,7 +350,7 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 		if (parent instanceof IASTIdExpression) {
 			IScope scope= CPPVisitor.getContainingScope(this);
 			try {
-				while(scope != null) {
+				while (scope != null) {
 					if (scope instanceof ICPPClassScope) {
 						ICPPClassType classType = ((ICPPClassScope) scope).getClassType();
 						if (SemanticUtil.calculateInheritanceDepth(classType, baseClass, this) >= 0) {
@@ -402,7 +402,7 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 
 		return filtered;
 	}
-	
+
 	private static boolean nameMatches(char[] potential, char[] name, boolean isPrefix) {
 		if (isPrefix)
 			return ContentAssistMatcherFactory.getInstance().match(name, potential);
@@ -414,7 +414,7 @@ public class CPPASTQualifiedName extends CPPASTNameBase
 		Assert.isLegal(false);
 		return null;
 	}
-	
+
 	@Override
 	public IBinding[] findBindings(IASTName n, boolean isPrefix) {
 		return findBindings(n, isPrefix, null);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java
index 333deb501ac..9418d81f85a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java
@@ -56,7 +56,7 @@ public class CPPASTRangeBasedForStatement extends CPPASTAttributeOwner implement
 	public CPPASTRangeBasedForStatement copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-    
+
 	@Override
 	public CPPASTRangeBasedForStatement copy(CopyStyle style) {
 		CPPASTRangeBasedForStatement copy = new CPPASTRangeBasedForStatement();
@@ -140,14 +140,14 @@ public class CPPASTRangeBasedForStatement extends CPPASTAttributeOwner implement
 						CPPASTImplicitName begin= new CPPASTImplicitName(name.toCharArray(), this);
 						begin.setBinding(name.resolveBinding());
 						begin.setOffsetAndLength(position);
-						
+
 						name = new CPPASTName(CPPVisitor.END);
 						name.setOffset(position.getOffset());
 						fieldRef.setFieldName(name);
 						CPPASTImplicitName end= new CPPASTImplicitName(name.toCharArray(), this);
 						end.setBinding(name.resolveBinding());
 						end.setOffsetAndLength(position);
-						
+
 						fImplicitNames= new IASTImplicitName[] {begin, end};
 					}
 				}
@@ -160,24 +160,24 @@ public class CPPASTRangeBasedForStatement extends CPPASTAttributeOwner implement
 						new IASTInitializerClause[] { forInit.copy() });
 				expr.setParent(this);
 				expr.setPropertyInParent(ICPPASTRangeBasedForStatement.INITIALIZER);
-				
+
 				CPPASTImplicitName begin= new CPPASTImplicitName(name.toCharArray(), this);
 				begin.setBinding(name.resolveBinding());
 				begin.setOffsetAndLength(position);
-				
+
 				name = new CPPASTName(CPPVisitor.END);
 				name.setOffset(position.getOffset());
 				fname.setName(name);
 				CPPASTImplicitName end= new CPPASTImplicitName(name.toCharArray(), this);
 				end.setBinding(name.resolveBinding());
 				end.setOffsetAndLength(position);
-				
+
 				fImplicitNames= new IASTImplicitName[] {begin, end};
 			}
 		}
 		return fImplicitNames;
 	}
-	 
+
 	@Override
 	public IASTImplicitDestructorName[] getImplicitDestructorNames() {
 		if (fImplicitDestructorNames == null) {
@@ -188,7 +188,7 @@ public class CPPASTRangeBasedForStatement extends CPPASTAttributeOwner implement
 	}
 
     @Override
-	public boolean accept( ASTVisitor action ){
+	public boolean accept(ASTVisitor action) {
 		if (action.shouldVisitStatements) {
 			switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -212,7 +212,7 @@ public class CPPASTRangeBasedForStatement extends CPPASTAttributeOwner implement
 
 		if (fBody != null && !fBody.accept(action))
 			return false;
-        
+
         if (action.shouldVisitImplicitDestructorNames && !acceptByNodes(getImplicitDestructorNames(), action))
         	return false;
 
@@ -220,7 +220,7 @@ public class CPPASTRangeBasedForStatement extends CPPASTAttributeOwner implement
 			return false;
 		return true;
     }
-    
+
 	@Override
 	public void replace(IASTNode child, IASTNode other) {
 		if (child == fDeclaration) {
@@ -238,18 +238,18 @@ public class CPPASTRangeBasedForStatement extends CPPASTAttributeOwner implement
 
 	@Override
 	public ICPPExecution getExecution() {
-		ExecSimpleDeclaration declarationExec = (ExecSimpleDeclaration)((ICPPExecutionOwner)fDeclaration).getExecution();
-		ICPPEvaluation initClauseEval = ((ICPPEvaluationOwner)fInitClause).getEvaluation();
+		ExecSimpleDeclaration declarationExec = (ExecSimpleDeclaration)((ICPPExecutionOwner) fDeclaration).getExecution();
+		ICPPEvaluation initClauseEval = ((ICPPEvaluationOwner) fInitClause).getEvaluation();
 		ICPPExecution bodyExec = EvalUtil.getExecutionFromStatement(fBody);
 		IASTImplicitName[] implicitNames = getImplicitNames();
 		ICPPFunction begin = null;
 		ICPPFunction end = null;
-		if(implicitNames.length == 2) {
+		if (implicitNames.length == 2) {
 			IBinding beginBinding = implicitNames[0].resolveBinding();
 			IBinding endBinding = implicitNames[1].resolveBinding();
 			if (beginBinding instanceof ICPPFunction && endBinding instanceof ICPPFunction) {
-				begin = (ICPPFunction)beginBinding;
-				end = (ICPPFunction)endBinding;	
+				begin = (ICPPFunction) beginBinding;
+				end = (ICPPFunction) endBinding;
 			}
 		}
 		return new ExecRangeBasedFor(declarationExec, initClauseEval, begin, end, bodyExec);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReferenceOperator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReferenceOperator.java
index b17969a9482..27a2833e52d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReferenceOperator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReferenceOperator.java
@@ -24,7 +24,7 @@ public class CPPASTReferenceOperator extends CPPASTAttributeOwner implements ICP
 	public CPPASTReferenceOperator(boolean isRValueReference) {
 		fIsRValue= isRValueReference;
 	}
-	
+
 	@Override
 	public boolean isRValueReference() {
 		return fIsRValue;
@@ -34,7 +34,7 @@ public class CPPASTReferenceOperator extends CPPASTAttributeOwner implements ICP
 	public CPPASTReferenceOperator copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTReferenceOperator copy(CopyStyle style) {
 		CPPASTReferenceOperator copy = new CPPASTReferenceOperator(fIsRValue);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java
index 2d8c5eb982c..fd06aa6dfba 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java
@@ -106,8 +106,8 @@ public class CPPASTReturnStatement extends CPPASTAttributeOwner implements IASTR
 
 	@Override
 	public ICPPExecution getExecution() {
-		if(retValue instanceof ICPPEvaluationOwner) {
-			ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner)retValue;
+		if (retValue instanceof ICPPEvaluationOwner) {
+			ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) retValue;
 			return new ExecReturn(evalOwner.getEvaluation());
 		}
 		return ExecIncomplete.INSTANCE;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
index c13c61d6518..19e126a6dd5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
@@ -34,7 +34,7 @@ public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier
 	public CPPASTSimpleDeclSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-    
+
 	@Override
 	public CPPASTSimpleDeclSpecifier copy(CopyStyle style) {
 		return copy(new CPPASTSimpleDeclSpecifier(), style);
@@ -74,9 +74,9 @@ public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier
 	public void setType(Kind kind) {
     	setType(getType(kind));
     }
-    
+
     private int getType(Kind kind) {
-    	switch(kind) {
+    	switch (kind) {
     	case eBoolean:
     		return t_bool;
 		case eChar:
@@ -113,7 +113,7 @@ public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier
     	}
     	return t_unspecified;
     }
-    
+
     @Override
 	public boolean isSigned() {
         return isSigned;
@@ -240,6 +240,6 @@ public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier
 			fDeclTypeExpression= (IASTExpression) other;
 			return;
 		}
-		super.replace(child, other);		
+		super.replace(child, other);
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclaration.java
index d9dd40a1bca..c591e67219e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclaration.java
@@ -39,7 +39,7 @@ public class CPPASTSimpleDeclaration extends CPPASTAttributeOwner implements IAS
 	public CPPASTSimpleDeclaration copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTSimpleDeclaration copy(CopyStyle style) {
 		CPPASTSimpleDeclaration copy = new CPPASTSimpleDeclaration();
@@ -62,7 +62,7 @@ public class CPPASTSimpleDeclaration extends CPPASTAttributeOwner implements IAS
         declarators = ArrayUtil.trimAt(IASTDeclarator.class, declarators, declaratorsPos);
         return declarators;
     }
-    
+
     @Override
 	public void addDeclarator(IASTDeclarator d) {
         assertNotFrozen();
@@ -95,7 +95,7 @@ public class CPPASTSimpleDeclaration extends CPPASTAttributeOwner implements IAS
 	            default: break;
 	        }
 		}
-        
+
         if (!acceptByAttributeSpecifiers(action)) return false;
         if (declSpecifier != null && !declSpecifier.accept(action)) return false;
         IASTDeclarator[] dtors = getDeclarators();
@@ -103,7 +103,7 @@ public class CPPASTSimpleDeclaration extends CPPASTAttributeOwner implements IAS
             if (!dtors[i].accept(action))
             	return false;
         }
-        
+
         if (action.shouldVisitDeclarations) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -113,7 +113,7 @@ public class CPPASTSimpleDeclaration extends CPPASTAttributeOwner implements IAS
 		}
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
 		IASTDeclarator[] declarators = getDeclarators();
@@ -131,8 +131,8 @@ public class CPPASTSimpleDeclaration extends CPPASTAttributeOwner implements IAS
 	@Override
 	public ICPPExecution getExecution() {
 		ICPPExecution[] declaratorExecutions = new ICPPExecution[declarators.length];
-		for(int i = 0; i < declarators.length; ++i) {
-			declaratorExecutions[i] = ((ICPPExecutionOwner)declarators[i]).getExecution();
+		for (int i = 0; i < declarators.length; ++i) {
+			declaratorExecutions[i] = ((ICPPExecutionOwner) declarators[i]).getExecution();
 		}
 		return new ExecSimpleDeclaration(declaratorExecutions);
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java
index 46fcca59007..cf5f755e0e7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     John Camelon (IBM) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -53,7 +53,7 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
 	public CPPASTSimpleTypeConstructorExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTSimpleTypeConstructorExpression copy(CopyStyle style) {
 		CPPASTSimpleTypeConstructorExpression copy = new CPPASTSimpleTypeConstructorExpression();
@@ -91,7 +91,7 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
     		initializer.setPropertyInParent(INITIALIZER);
     	}
     }
-	
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
 		if (fEvaluation == null) {
@@ -111,7 +111,7 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
 	public IType getExpressionType() {
     	return getEvaluation().getType(this);
     }
-    
+
 	@Override
 	public ValueCategory getValueCategory() {
     	return getEvaluation().getValueCategory(this);
@@ -121,7 +121,7 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
 	public boolean isLValue() {
 		return false;
 	}
-	
+
 	@Override
 	public IASTImplicitDestructorName[] getImplicitDestructorNames() {
 		if (fImplicitDestructorNames == null) {
@@ -143,7 +143,7 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
 
 		if (fDeclSpec != null && !fDeclSpec.accept(action))
 			return false;
-		
+
 		if (action.shouldVisitImplicitNames) {
 			for (IASTImplicitName implicitName : getImplicitNames()) {
 				if (!implicitName.accept(action)) {
@@ -154,7 +154,7 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
 
 		if (fInitializer != null && !fInitializer.accept(action))
 			return false;
-        
+
         if (action.shouldVisitImplicitDestructorNames && !acceptByNodes(getImplicitDestructorNames(), action))
         	return false;
 
@@ -175,7 +175,7 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
     	if (type instanceof ICPPBasicType) {
     		ICPPBasicType bt= (ICPPBasicType) type;
     		Kind kind = bt.getKind();
-    		switch(kind) {
+    		switch (kind) {
 			case eBoolean:
 				return t_bool;
 			case eChar:
@@ -204,12 +204,12 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
     	}
 		return t_unspecified;
     }
-    
+
 	@Deprecated
     @Override
     public void setSimpleType(int value) {
 		CPPASTSimpleDeclSpecifier declspec = new CPPASTSimpleDeclSpecifier();
-    	switch(value) {
+    	switch (value) {
     	case t_bool:
     		declspec.setType(Kind.eBoolean);
     		break;
@@ -253,7 +253,7 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
     	}
     	setDeclSpecifier(declspec);
     }
-    
+
 	@Deprecated
     @Override
     public IASTExpression getInitialValue() {
@@ -262,7 +262,7 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode
     	}
     	return null;
     }
-    
+
 	@Deprecated
     @Override
     public void setInitialValue(IASTExpression expression) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeTemplateParameter.java
index c2a54a3b4aa..43fc19edfe1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeTemplateParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeTemplateParameter.java
@@ -35,12 +35,12 @@ public class CPPASTSimpleTypeTemplateParameter extends ASTNode implements ICPPAS
 		setName(name);
 		setDefaultType(typeId);
 	}
-	
+
 	@Override
 	public CPPASTSimpleTypeTemplateParameter copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTSimpleTypeTemplateParameter copy(CopyStyle style) {
 		CPPASTSimpleTypeTemplateParameter copy = new CPPASTSimpleTypeTemplateParameter();
@@ -102,7 +102,7 @@ public class CPPASTSimpleTypeTemplateParameter extends ASTNode implements ICPPAS
 			typeId.setPropertyInParent(DEFAULT_TYPE);
 		}
     }
-    
+
     @Override
 	public boolean accept(ASTVisitor action) {
     	if (action.shouldVisitTemplateParameters) {
@@ -112,12 +112,12 @@ public class CPPASTSimpleTypeTemplateParameter extends ASTNode implements ICPPAS
 	            default : break;
 	        }
 		}
-        
+
 		if (fName != null && !fName.accept(action))
 			return false;
 		if (fTypeId != null && !fTypeId.accept(action))
 			return false;
-        
+
 		if (action.shouldVisitTemplateParameters && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTStaticAssertionDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTStaticAssertionDeclaration.java
index 0dc33e44161..030c0030b34 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTStaticAssertionDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTStaticAssertionDeclaration.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *    Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.ASTVisitor;
@@ -35,7 +35,7 @@ public class CPPASTStaticAssertionDeclaration extends ASTNode implements ICPPAST
         	message.setPropertyInParent(MESSAGE);
 		}
 	}
-	
+
 	@Override
 	public IASTExpression getCondition() {
 		return fCondition;
@@ -51,7 +51,7 @@ public class CPPASTStaticAssertionDeclaration extends ASTNode implements ICPPAST
 	public CPPASTStaticAssertionDeclaration copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTStaticAssertionDeclaration copy(CopyStyle style) {
 		final IASTExpression condCopy = fCondition == null ? null : fCondition.copy(style);
@@ -62,24 +62,24 @@ public class CPPASTStaticAssertionDeclaration extends ASTNode implements ICPPAST
 	}
 
     @Override
-	public boolean accept( ASTVisitor action ){
+	public boolean accept(ASTVisitor action) {
 		if (action.shouldVisitDeclarations) {
 			switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
 	            case ASTVisitor.PROCESS_SKIP  : return true;
 	        }
 		}
-        
+
 		if (fCondition != null && !fCondition.accept(action))
 			return false;
 		if (fMessage != null && !fMessage.accept(action))
 			return false;
-		
+
 		if (action.shouldVisitDeclarations && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
     	if (child == fCondition) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java
index 94ccf75be6e..a2b8e3ba1a1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java
@@ -32,7 +32,7 @@ public class CPPASTSwitchStatement extends CPPASTAttributeOwner implements ICPPA
     private IASTExpression controllerExpression;
     private IASTDeclaration controllerDeclaration;
     private IASTStatement body;
-    
+
     public CPPASTSwitchStatement() {
 	}
 
@@ -40,12 +40,12 @@ public class CPPASTSwitchStatement extends CPPASTAttributeOwner implements ICPPA
 		setControllerDeclaration(controller);
 		setBody(body);
 	}
-    
+
     public CPPASTSwitchStatement(IASTExpression controller, IASTStatement body) {
 		setControllerExpression(controller);
 		setBody(body);
 	}
-    
+
     @Override
 	public CPPASTSwitchStatement copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -82,7 +82,7 @@ public class CPPASTSwitchStatement extends CPPASTAttributeOwner implements ICPPA
 	public IASTStatement getBody() {
         return body;
     }
-    
+
     @Override
 	public void setBody(IASTStatement body) {
         assertNotFrozen();
@@ -107,7 +107,7 @@ public class CPPASTSwitchStatement extends CPPASTAttributeOwner implements ICPPA
         if (controllerExpression != null && !controllerExpression.accept(action)) return false;
         if (controllerDeclaration != null && !controllerDeclaration.accept(action)) return false;
         if (body != null && !body.accept(action)) return false;
-        
+
         if (action.shouldVisitStatements) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -117,7 +117,7 @@ public class CPPASTSwitchStatement extends CPPASTAttributeOwner implements ICPPA
 		}
         return true;
     }
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
 		if (body == child) {
@@ -156,25 +156,25 @@ public class CPPASTSwitchStatement extends CPPASTAttributeOwner implements ICPPA
 	public IScope getScope() {
 		if (scope == null)
             scope = new CPPBlockScope(this);
-        return scope;	
+        return scope;
     }
 
 	@Override
 	public ICPPExecution getExecution() {
-		ICPPEvaluationOwner controllerExpr = (ICPPEvaluationOwner)getControllerExpression();
-		ICPPExecutionOwner controllerDecl = (ICPPExecutionOwner)getControllerDeclaration();
+		ICPPEvaluationOwner controllerExpr = (ICPPEvaluationOwner) getControllerExpression();
+		ICPPExecutionOwner controllerDecl = (ICPPExecutionOwner) getControllerDeclaration();
 		ICPPEvaluation controllerExprEval = controllerExpr != null ? controllerExpr.getEvaluation() : null;
-		ExecSimpleDeclaration controllerDeclExec = controllerDecl != null ? (ExecSimpleDeclaration)controllerDecl.getExecution() : null;
+		ExecSimpleDeclaration controllerDeclExec = controllerDecl != null ? (ExecSimpleDeclaration) controllerDecl.getExecution() : null;
 		IASTStatement[] bodyStmts = null;
-		if(body instanceof ICPPASTCompoundStatement) {
-			ICPPASTCompoundStatement compoundStmt = (ICPPASTCompoundStatement)body;
+		if (body instanceof ICPPASTCompoundStatement) {
+			ICPPASTCompoundStatement compoundStmt = (ICPPASTCompoundStatement) body;
 			bodyStmts = compoundStmt.getStatements();
 		} else {
 			bodyStmts = new IASTStatement[]{body};
 		}
-		
+
 		ICPPExecution[] bodyStmtExecutions = new ICPPExecution[bodyStmts.length];
-		for(int i = 0; i < bodyStmts.length; i++) {
+		for (int i = 0; i < bodyStmts.length; i++) {
 			bodyStmtExecutions[i] = EvalUtil.getExecutionFromStatement(bodyStmts[i]);
 		}
 		return new ExecSwitch(controllerExprEval, controllerDeclExec, bodyStmtExecutions);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateDeclaration.java
index baa2a67b4da..669655fab59 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateDeclaration.java
@@ -33,7 +33,7 @@ public class CPPASTTemplateDeclaration extends ASTNode
     private ICPPTemplateScope templateScope;
     private ICPPASTTemplateParameter[] parameters;
     private int parametersPos= -1;
-    
+
     public CPPASTTemplateDeclaration() {
 	}
 
@@ -45,7 +45,7 @@ public class CPPASTTemplateDeclaration extends ASTNode
 	public CPPASTTemplateDeclaration copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTTemplateDeclaration copy(CopyStyle style) {
 		CPPASTTemplateDeclaration copy = new CPPASTTemplateDeclaration();
@@ -114,14 +114,14 @@ public class CPPASTTemplateDeclaration extends ASTNode
 	            default: break;
 	        }
 		}
-        
+
         ICPPASTTemplateParameter[] params = getTemplateParameters();
         for (int i = 0; i < params.length; i++) {
             if (!params[i].accept(action)) return false;
         }
-        
+
         if (declaration != null && !declaration.accept(action)) return false;
-        
+
         if (action.shouldVisitDeclarations) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -138,7 +138,7 @@ public class CPPASTTemplateDeclaration extends ASTNode
 			templateScope = new CPPTemplateScope(this);
 		return templateScope;
 	}
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
         if (declaration == child) {
@@ -161,7 +161,7 @@ public class CPPASTTemplateDeclaration extends ASTNode
 	public boolean isAssociatedWithLastName() {
 		if (isAssociatedWithLastName == -1)
 			CPPTemplates.associateTemplateDeclarations(this);
-			
+
 		assert isAssociatedWithLastName != -1;
 		return isAssociatedWithLastName != 0;
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateIDAmbiguity.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateIDAmbiguity.java
index 091b8fe198e..9e6fa6e3acf 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateIDAmbiguity.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateIDAmbiguity.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import java.util.ArrayList;
@@ -60,8 +60,8 @@ public class CPPASTTemplateIDAmbiguity extends ASTAmbiguousNode
 	protected final IASTNode doResolveAmbiguity(ASTVisitor resolver) {
 		final IASTAmbiguityParent owner= (IASTAmbiguityParent) getParent();
 		IASTNode nodeToReplace= this;
-		
-		// Try all variants and under the ones with correct template-ids select the one with 
+
+		// Try all variants and under the ones with correct template-ids select the one with
 		// the most template-ids.
 		int minOffset= -1;
 		for (BranchPoint v= fVariants; v != null; v= v.getNext()) {
@@ -86,7 +86,7 @@ public class CPPASTTemplateIDAmbiguity extends ASTAmbiguousNode
 					}
 				}
 			}
-			
+
 			// Adjust the operator sequence.
 			if (selected != null) {
 				minOffset= selected.getRightOffset();
@@ -97,14 +97,14 @@ public class CPPASTTemplateIDAmbiguity extends ASTAmbiguousNode
 				}
 			}
 		}
-		
+
 		// Important: Before building the expression remove it from the owner
 		owner.replace(nodeToReplace, this);
-		
+
 		// Create the expression and replace it
 		IASTExpression expr = fParser.buildExpression(fEndOperator.getNext(), fEndOperator.getExpression());
 		owner.replace(this, expr);
-		
+
 		// Resolve further ambiguities within the new expression.
 		expr.accept(resolver);
 		return expr;
@@ -121,11 +121,11 @@ public class CPPASTTemplateIDAmbiguity extends ASTAmbiguousNode
 				// are hard to clear.
 				IBinding b= templateName.resolvePreBinding();
 				if (b instanceof IProblemBinding) {
-					if (!containsFunctionTemplate(((IProblemBinding) b).getCandidateBindings())) 
+					if (!containsFunctionTemplate(((IProblemBinding) b).getCandidateBindings()))
 						return -1;
 					count++;
 				} else if (b instanceof ICPPSpecialization || b instanceof ICPPTemplateDefinition
-						|| b instanceof ICPPAliasTemplateInstance || b instanceof ICPPConstructor 
+						|| b instanceof ICPPAliasTemplateInstance || b instanceof ICPPConstructor
 						|| (b instanceof IFunction && b instanceof ICPPUnknownBinding)) {
 					count++;
 				} else {
@@ -135,10 +135,10 @@ public class CPPASTTemplateIDAmbiguity extends ASTAmbiguousNode
 		}
 		return count;
 	}
-	
+
 	private boolean containsFunctionTemplate(IBinding[] candidateBindings) {
 		for (IBinding cand : candidateBindings) {
-			if (cand instanceof ICPPFunctionTemplate || 
+			if (cand instanceof ICPPFunctionTemplate ||
 					(cand instanceof ICPPFunction && cand instanceof ICPPSpecialization)) {
 				return true;
 			}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateId.java
index 30940348d43..be4ca1ca8b6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateId.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateId.java
@@ -35,8 +35,8 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
 import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
 
 /**
- * Template ID consist of an unqualified name (or operator or conversion name) 
- * and an array of template arguments. 
+ * Template ID consist of an unqualified name (or operator or conversion name)
+ * and an array of template arguments.
  */
 public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateId, IASTAmbiguityParent {
 	private IASTName templateName;
@@ -53,7 +53,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
 	public CPPASTTemplateId copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTTemplateId copy(CopyStyle style) {
 		CPPASTTemplateId copy =
@@ -73,7 +73,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
 	public char[] getLookupKey() {
 		return templateName.getLookupKey();
 	}
-	
+
 	@Override
 	public IASTName getTemplateName() {
         return templateName;
@@ -89,7 +89,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
 			name.setPropertyInParent(TEMPLATE_NAME);
 		}
     }
-    
+
     private void internalAddTemplateArgument(IASTNode node) {
 		assertNotFrozen();
 	    templateArguments = ArrayUtil.append(templateArguments, node);
@@ -108,7 +108,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
 	public void addTemplateArgument(IASTExpression expression) {
     	internalAddTemplateArgument(expression);
     }
-    
+
     @Override
 	public void addTemplateArgument(ICPPASTAmbiguousTemplateArgument ata) {
     	internalAddTemplateArgument(ata);
@@ -127,7 +127,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
     @Override
 	public char[] toCharArray() {
     	assert sAllowNameComputation;
-    	
+
     	StringBuilder buf= new StringBuilder();
     	buf.append(getTemplateName().toCharArray());
     	buf.append('<');
@@ -150,7 +150,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
     				buf.append(arg.getRawSignature());
     				cleanupWhitespace= true;
     			}
-    		} else if (arg instanceof IASTTypeId){
+    		} else if (arg instanceof IASTTypeId) {
     			IType type= CPPVisitor.createType((IASTTypeId) arg);
     			if (type instanceof ISemanticProblem) {
     				buf.append(arg.getRawSignature());
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateSpecialization.java
index cc5927b80ae..64bd5b3118c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateSpecialization.java
@@ -32,14 +32,14 @@ public class CPPASTTemplateSpecialization extends ASTNode implements
 	private short nestingLevel= -1;
 	private byte isAssociatedWithLastName= -1;
 
-    
+
     public CPPASTTemplateSpecialization() {
 	}
 
 	public CPPASTTemplateSpecialization(IASTDeclaration declaration) {
 		setDeclaration(declaration);
 	}
-	
+
 	@Override
 	public CPPASTTemplateSpecialization copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -76,9 +76,9 @@ public class CPPASTTemplateSpecialization extends ASTNode implements
 	            default: break;
 	        }
 		}
-        
+
         if (declaration != null && !declaration.accept(action)) return false;
-        
+
         if (action.shouldVisitDeclarations) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -121,7 +121,7 @@ public class CPPASTTemplateSpecialization extends ASTNode implements
 			templateScope = new CPPTemplateScope(this);
 		return templateScope;
 	}
-    
+
     @Override
 	public void replace(IASTNode child, IASTNode other) {
         if (declaration == child) {
@@ -130,7 +130,7 @@ public class CPPASTTemplateSpecialization extends ASTNode implements
             declaration = (IASTDeclaration) other;
         }
     }
-    
+
 	@Override
 	public short getNestingLevel() {
 		if (nestingLevel == -1) {
@@ -144,11 +144,11 @@ public class CPPASTTemplateSpecialization extends ASTNode implements
 	public boolean isAssociatedWithLastName() {
 		if (isAssociatedWithLastName == -1)
 			CPPTemplates.associateTemplateDeclarations(this);
-			
+
 		assert isAssociatedWithLastName != -1;
 		return isAssociatedWithLastName != 0;
 	}
-	
+
 	@Override
 	public void setAssociatedWithLastName(boolean value) {
 		isAssociatedWithLastName= value ? (byte) 1 : (byte) 0;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplatedTypeTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplatedTypeTemplateParameter.java
index bbbba0c8692..5741604b23e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplatedTypeTemplateParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplatedTypeTemplateParameter.java
@@ -41,7 +41,7 @@ public class CPPASTTemplatedTypeTemplateParameter extends ASTNode implements
 		setName(name);
 		setDefaultValue(defaultValue);
 	}
-	
+
 	@Override
 	public CPPASTTemplatedTypeTemplateParameter copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -83,7 +83,7 @@ public class CPPASTTemplatedTypeTemplateParameter extends ASTNode implements
 		}
 	}
 
-	
+
     @Override
 	public void setIsParameterPack(boolean val) {
     	assertNotFrozen();
@@ -126,7 +126,7 @@ public class CPPASTTemplatedTypeTemplateParameter extends ASTNode implements
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
+	public boolean accept(ASTVisitor action) {
     	if (action.shouldVisitTemplateParameters) {
 			switch (action.visit(this)) {
 	            case ASTVisitor.PROCESS_ABORT : return false;
@@ -134,7 +134,7 @@ public class CPPASTTemplatedTypeTemplateParameter extends ASTNode implements
 	            default : break;
 	        }
 		}
-        
+
         ICPPASTTemplateParameter [] ps = getTemplateParameters();
 		for (int i = 0; i < ps.length; i++) {
 			if (!ps[i].accept(action))
@@ -144,7 +144,7 @@ public class CPPASTTemplatedTypeTemplateParameter extends ASTNode implements
 			return false;
 		if (fDefaultValue != null && !fDefaultValue.accept(action))
 			return false;
-        
+
 		if (action.shouldVisitTemplateParameters && action.leave(this) == ASTVisitor.PROCESS_ABORT)
 			return false;
 
@@ -153,17 +153,17 @@ public class CPPASTTemplatedTypeTemplateParameter extends ASTNode implements
 
 	@Override
 	public int getRoleForName(IASTName n) {
-		if( n == fName )
+		if (n == fName)
 			return r_declaration;
 		return r_unclear;
 	}
 
     @Override
 	public void replace(IASTNode child, IASTNode other) {
-        if( child == fDefaultValue )
+        if (child == fDefaultValue)
         {
-            other.setPropertyInParent( child.getPropertyInParent() );
-            other.setParent( child.getParent() );
+            other.setPropertyInParent(child.getPropertyInParent());
+            other.setParent(child.getParent());
             fDefaultValue  = (IASTExpression) other;
         }
     }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java
index d0162013eb3..064f0f0fcf4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java
@@ -49,18 +49,18 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
     private ICPPNamespace fBinding;
 	private final CPPScopeMapper fScopeMapper= new CPPScopeMapper(this);
 	private CPPASTAmbiguityResolver fAmbiguityResolver;
-	
+
 	// Caches
 	private Map fFinalOverriderMapCache = new HashMap<>();
-	
+
 	public CPPASTTranslationUnit() {
 	}
-	
+
 	@Override
 	public CPPASTTranslationUnit copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTTranslationUnit copy(CopyStyle style) {
 		CPPASTTranslationUnit copy = new CPPASTTranslationUnit();
@@ -75,7 +75,7 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
         }
         return fScope;
     }
-	
+
 	private void addBuiltinOperators(CPPScope theScope) {
         // void
         IType cpp_void = new CPPBasicType(Kind.eVoid, 0);
@@ -93,12 +93,12 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
         newTheParms[0] = new CPPBuiltinParameter(newParms[0]);
         temp = new CPPImplicitFunction(OverloadableOperator.NEW.toCharArray(), theScope, newFunctionType, newTheParms, false, false);
         theScope.addBinding(temp);
-		
+
 		// void* operator new[](std::size_t);
 		temp = null;
         temp = new CPPImplicitFunction(OverloadableOperator.NEW_ARRAY.toCharArray(), theScope, newFunctionType, newTheParms, false, false);
         theScope.addBinding(temp);
-		
+
 		// void operator delete(void*);
         temp = null;
         IType[] deleteParms = new IType[1];
@@ -109,14 +109,14 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
         temp = new CPPImplicitFunction(OverloadableOperator.DELETE.toCharArray(), theScope,
         		deleteFunctionType, deleteTheParms, false, false);
         theScope.addBinding(temp);
-		
+
 		// void operator delete[](void*);
 		temp = null;
         temp = new CPPImplicitFunction(OverloadableOperator.DELETE_ARRAY.toCharArray(), theScope,
         		deleteFunctionType, deleteTheParms, false, false);
         theScope.addBinding(temp);
 	}
-	
+
     @Override
 	public IASTName[] getDeclarationsInAST(IBinding binding) {
         if (binding instanceof IMacroBinding) {
@@ -146,14 +146,14 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
         }
         return CPPVisitor.getReferences(this, binding);
     }
-    
+
     @Override
 	public ICPPNamespace getGlobalNamespace() {
         if (fBinding == null)
             fBinding = new CPPNamespace(this);
         return fBinding;
     }
-	
+
     @Override @Deprecated
 	public IBinding resolveBinding() {
         return getGlobalNamespace();
@@ -173,7 +173,7 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
 	public void skippedFile(int offset, InternalFileContent fileContent) {
 		super.skippedFile(offset, fileContent);
 		fScopeMapper.registerAdditionalDirectives(offset, fileContent.getUsingDirectives());
-	}	
+	}
 
 	@Override
 	public IScope mapToASTScope(IScope scope) {
@@ -205,22 +205,22 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST
 	@Override
 	public void resolveAmbiguities() {
 		fAmbiguityResolver = new CPPASTAmbiguityResolver();
-		accept(fAmbiguityResolver); 
+		accept(fAmbiguityResolver);
 		fAmbiguityResolver = null;
 	}
-	
+
 	@Override
 	protected IType createType(IASTTypeId typeid) {
 		return CPPVisitor.createType(typeid);
 	}
-	
+
 	@Override
 	public void resolvePendingAmbiguities(IASTNode node) {
 		if (fAmbiguityResolver != null) {
 			fAmbiguityResolver.resolvePendingAmbiguities(node);
 		}
 	}
-	
+
 	public Map getFinalOverriderMapCache() {
 		return fFinalOverriderMapCache;
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeId.java
index 7b618408529..2ac4e9714cd 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeId.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeId.java
@@ -24,7 +24,7 @@ public class CPPASTTypeId extends ASTNode implements ICPPASTTypeId {
     private IASTDeclSpecifier declSpec;
     private IASTDeclarator absDecl;
     private boolean isPackExpansion;
-    
+
     public CPPASTTypeId() {
 	}
 
@@ -32,12 +32,12 @@ public class CPPASTTypeId extends ASTNode implements ICPPASTTypeId {
 		setDeclSpecifier(declSpec);
 		setAbstractDeclarator(absDecl);
 	}
-	
+
 	@Override
 	public CPPASTTypeId copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTTypeId copy(CopyStyle style) {
 		CPPASTTypeId copy = new CPPASTTypeId();
@@ -96,7 +96,7 @@ public class CPPASTTypeId extends ASTNode implements ICPPASTTypeId {
 	            default: break;
 	        }
 		}
-        
+
         if (declSpec != null && !declSpec.accept(action)) return false;
         if (absDecl != null && !absDecl.accept(action)) return false;
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java
index 36a8e3a1b03..4bbc7555ec3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java
@@ -81,7 +81,7 @@ public class CPPASTTypeIdInitializerExpression extends ASTNode
 		if (fImplicitDestructorNames == null) {
 			fImplicitDestructorNames = DestructorCallCollector.getTemporariesDestructorCalls(this);
 		}
-	
+
 		return fImplicitDestructorNames;
 	}
 
@@ -94,7 +94,7 @@ public class CPPASTTypeIdInitializerExpression extends ASTNode
 	            default: break;
 	        }
 		}
-        
+
         if (fTypeId != null && !fTypeId.accept(action)) return false;
         if (fInitializer != null && !fInitializer.accept(action)) return false;
 
@@ -131,9 +131,9 @@ public class CPPASTTypeIdInitializerExpression extends ASTNode
 
 	@Override
 	public ICPPEvaluation getEvaluation() {
-		if (fEvaluation == null) 
+		if (fEvaluation == null)
 			fEvaluation= computeEvaluation();
-		
+
 		return fEvaluation;
 	}
 
@@ -141,11 +141,11 @@ public class CPPASTTypeIdInitializerExpression extends ASTNode
 		final IASTInitializer initializer = getInitializer();
 		if (!(initializer instanceof ICPPASTInitializerClause))
 			return EvalFixed.INCOMPLETE;
-		
+
 		IType type= CPPVisitor.createType(getTypeId());
 		if (type == null || type instanceof IProblemType)
 			return EvalFixed.INCOMPLETE;
-		
+
 		return new EvalTypeId(type, this, false, ((ICPPEvaluationOwner) initializer).getEvaluation());
 	}
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeTransformationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeTransformationSpecifier.java
index 89acf3228fd..030eb4965b6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeTransformationSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeTransformationSpecifier.java
@@ -22,14 +22,14 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPUnaryTypeTransformation.Operator;
 public class CPPASTTypeTransformationSpecifier extends CPPASTBaseDeclSpecifier implements ICPPASTTypeTransformationSpecifier {
 	private Operator fOperator;
 	private ICPPASTTypeId fOperand;
-	
+
 	public CPPASTTypeTransformationSpecifier(Operator operator, ICPPASTTypeId operand) {
 		fOperator = operator;
 		fOperand = operand;
 		fOperand.setParent(this);
 		fOperand.setPropertyInParent(OPERAND);
 	}
-	
+
 	@Override
 	public ICPPASTDeclSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
@@ -61,9 +61,9 @@ public class CPPASTTypeTransformationSpecifier extends CPPASTBaseDeclSpecifier i
 			}
 		}
 
-        if (!fOperand.accept(action)) 
+        if (!fOperand.accept(action))
         	return false;
-        
+
         if (action.shouldVisitDeclSpecifiers) {
 		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
@@ -71,7 +71,7 @@ public class CPPASTTypeTransformationSpecifier extends CPPASTBaseDeclSpecifier i
 	            default: break;
 	        }
 		}
-        
+
         return true;
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypenameExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypenameExpression.java
index 736fb134af0..11bf6b66344 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypenameExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypenameExpression.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     John Camelon (IBM) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -34,7 +34,7 @@ public class CPPASTTypenameExpression extends CPPASTSimpleTypeConstructorExpress
 	public CPPASTTypenameExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTTypenameExpression copy(CopyStyle style) {
 		super.copy(style);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java
index 3c5c78033cb..046d7643d69 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java
@@ -60,7 +60,7 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
 	public CPPASTUnaryExpression copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTUnaryExpression copy(CopyStyle style) {
 		CPPASTUnaryExpression copy =
@@ -112,10 +112,10 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
 				fImplicitNames = new IASTImplicitName[] { operatorName };
 			}
 		}
-		
+
 		return fImplicitNames;
 	}
-	
+
 	@Override
 	public IASTImplicitDestructorName[] getImplicitDestructorNames() {
 		if (fImplicitDestructorNames == null) {
@@ -134,7 +134,7 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
 	            default: break;
 	        }
 		}
- 
+
         final boolean isPostfix = isPostfixOperator();
 
         if (!isPostfix && action.shouldVisitImplicitNames) {
@@ -183,7 +183,7 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
 			return ((EvalUnary) eval).getOverload(this);
 		return null;
     }
-    
+
 	@Override
 	public ICPPEvaluation getEvaluation() {
 		if (fEvaluation == null) {
@@ -191,18 +191,18 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
 		}
 		return fEvaluation;
 	}
-	
+
 	private ICPPEvaluation computeEvaluation() {
 		if (fOperand == null)
 			return EvalFixed.INCOMPLETE;
 
-		final ICPPEvaluation nestedEval = ((ICPPEvaluationOwner)fOperand).getEvaluation();
-		if (fOperator == op_bracketedPrimary) 
+		final ICPPEvaluation nestedEval = ((ICPPEvaluationOwner) fOperand).getEvaluation();
+		if (fOperator == op_bracketedPrimary)
 			return nestedEval;
 
 		if (nestedEval.isFunctionSet() && fOperator == op_amper) {
 			return nestedEval;
-		} 
+		}
 
 		IBinding addressOfQualifiedNameBinding= null;
     	if (fOperator == op_amper && fOperand instanceof IASTIdExpression) {
@@ -215,7 +215,7 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
 		}
     	return new EvalUnary(fOperator, nestedEval, addressOfQualifiedNameBinding, this);
 	}
-    
+
     @Override
 	public IType getExpressionType() {
 		IType type= getEvaluation().getType(this);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDeclaration.java
index a078fc39fba..ae51f09b34b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDeclaration.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     John Camelon (IBM) - Initial API and implementation
  *     Bryan Wilkinson (QNX)
@@ -32,14 +32,14 @@ public class CPPASTUsingDeclaration extends CPPASTAttributeOwner
 	}
 
 	public CPPASTUsingDeclaration(IASTName name) {
-		setName(name);	
+		setName(name);
 	}
 
 	@Override
 	public CPPASTUsingDeclaration copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTUsingDeclaration copy(CopyStyle style) {
 		CPPASTUsingDeclaration copy =
@@ -83,12 +83,12 @@ public class CPPASTUsingDeclaration extends CPPASTAttributeOwner
 	            default: break;
 	        }
 		}
-        
+
         if (!acceptByAttributeSpecifiers(action)) return false;
         if (name != null && !name.accept(action)) return false;
-        
+
         if (action.shouldVisitDeclarations) {
-		    switch(action.leave(this)) {
+		    switch (action.leave(this)) {
 	            case ASTVisitor.PROCESS_ABORT: return false;
 	            case ASTVisitor.PROCESS_SKIP: return true;
 	            default: break;
@@ -103,11 +103,11 @@ public class CPPASTUsingDeclaration extends CPPASTAttributeOwner
 			return r_declaration;
 		return r_unclear;
 	}
-	
+
 	@Override
 	public IBinding[] findBindings(IASTName n, boolean isPrefix, String[] namespaces) {
 		IBinding[] bindings = CPPSemantics.findBindingsForContentAssist(n, isPrefix, namespaces);
-		
+
 		int j = 0;
 		for (int i = 0; i < bindings.length; i++) {
 			IBinding binding = bindings[i];
@@ -117,7 +117,7 @@ public class CPPASTUsingDeclaration extends CPPASTAttributeOwner
 				j++;
 			}
 		}
-		
+
 		if (j < bindings.length)
 			return Arrays.copyOfRange(bindings, 0, j);
 		return bindings;
@@ -127,7 +127,7 @@ public class CPPASTUsingDeclaration extends CPPASTAttributeOwner
 	public String toString() {
 		return name.toString();
 	}
-	
+
 	@Override
 	public IBinding[] findBindings(IASTName n, boolean isPrefix) {
 		return findBindings(n, isPrefix, null);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDirective.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDirective.java
index eaed06a7bdb..cc46ddf7491 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDirective.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDirective.java
@@ -38,7 +38,7 @@ public class CPPASTUsingDirective extends CPPASTAttributeOwner
 	public CPPASTUsingDirective copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTUsingDirective copy(CopyStyle style) {
 		CPPASTUsingDirective copy = new CPPASTUsingDirective(name == null ? null : name.copy(style));
@@ -109,7 +109,7 @@ public class CPPASTUsingDirective extends CPPASTAttributeOwner
 			return Arrays.copyOfRange(bindings, 0, j);
 		return bindings;
 	}
-	
+
 	@Override
 	public IBinding[] findBindings(IASTName n, boolean isPrefix) {
 		return findBindings(n, isPrefix, null);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVirtSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVirtSpecifier.java
index f343b1b56c8..d418c23e93d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVirtSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVirtSpecifier.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Nathan Ridge - Initial API and implementation
  *******************************************************************************/
@@ -16,11 +16,11 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
 
 public class CPPASTVirtSpecifier extends ASTNode implements ICPPASTVirtSpecifier {
 	private SpecifierKind fKind;
-	
+
 	public CPPASTVirtSpecifier(SpecifierKind kind) {
 		fKind = kind;
 	}
-	
+
 	@Override
 	public SpecifierKind getKind() {
 		return fKind;
@@ -36,7 +36,7 @@ public class CPPASTVirtSpecifier extends ASTNode implements ICPPASTVirtSpecifier
 		CPPASTVirtSpecifier copy = new CPPASTVirtSpecifier(fKind);
 		return copy(copy, style);
 	}
-	
+
     @Override
 	public boolean accept(ASTVisitor action) {
     	if (action.shouldVisitVirtSpecifiers) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVisibilityLabel.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVisibilityLabel.java
index 1538ec303d2..f56b4b6800e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVisibilityLabel.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVisibilityLabel.java
@@ -28,7 +28,7 @@ public class CPPASTVisibilityLabel extends ASTNode implements ICPPASTVisibilityL
 	public CPPASTVisibilityLabel copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-	
+
 	@Override
 	public CPPASTVisibilityLabel copy(CopyStyle style) {
 		return copy(new CPPASTVisibilityLabel(visibility), style);
@@ -46,7 +46,7 @@ public class CPPASTVisibilityLabel extends ASTNode implements ICPPASTVisibilityL
     }
 
     @Override
-	public boolean accept( ASTVisitor action ){
+	public boolean accept(ASTVisitor action) {
     	if (action.shouldVisitDeclarations) {
             switch (action.visit(this)) {
             case ASTVisitor.PROCESS_ABORT:
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java
index 8fb6faf9704..d889455b9bb 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java
@@ -39,7 +39,7 @@ public class CPPASTWhileStatement extends CPPASTAttributeOwner implements ICPPAS
     	setConditionDeclaration(condition);
 		setBody(body);
 	}
-    
+
     public CPPASTWhileStatement(IASTExpression condition, IASTStatement body) {
 		setCondition(condition);
 		setBody(body);
@@ -49,7 +49,7 @@ public class CPPASTWhileStatement extends CPPASTAttributeOwner implements ICPPAS
 	public CPPASTWhileStatement copy() {
 		return copy(CopyStyle.withoutLocations);
 	}
-    
+
 	@Override
 	public CPPASTWhileStatement copy(CopyStyle style) {
 		CPPASTWhileStatement copy = new CPPASTWhileStatement();
@@ -117,19 +117,19 @@ public class CPPASTWhileStatement extends CPPASTAttributeOwner implements ICPPAS
 		}
 
         if (!acceptByAttributeSpecifiers(action)) return false;
-        if (condition != null && !condition.accept(action)) 
+        if (condition != null && !condition.accept(action))
         	return false;
-        if (condition2 != null && !condition2.accept(action)) 
+        if (condition2 != null && !condition2.accept(action))
         	return false;
-        if (body != null && !body.accept(action)) 
+        if (body != null && !body.accept(action))
         	return false;
-        
+
         if (action.shouldVisitStatements && action.leave(this) == ASTVisitor.PROCESS_ABORT)
         	return false;
 
         return true;
     }
-    
+
 	@Override
 	public void replace(IASTNode child, IASTNode other) {
 		if (body == child) {
@@ -153,15 +153,15 @@ public class CPPASTWhileStatement extends CPPASTAttributeOwner implements ICPPAS
 	public IScope getScope() {
 		if (scope == null)
             scope = new CPPBlockScope(this);
-        return scope;	
+        return scope;
     }
 
 	@Override
 	public ICPPExecution getExecution() {
-		ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner)getCondition();
-		ICPPExecutionOwner conditionDecl = (ICPPExecutionOwner)getConditionDeclaration();
-		ICPPEvaluation conditionExprEval = conditionExpr != null ? conditionExpr.getEvaluation() : null; 
-		ExecSimpleDeclaration conditionDeclExec = conditionDecl != null ? (ExecSimpleDeclaration)conditionDecl.getExecution() : null;
+		ICPPEvaluationOwner conditionExpr = (ICPPEvaluationOwner) getCondition();
+		ICPPExecutionOwner conditionDecl = (ICPPExecutionOwner) getConditionDeclaration();
+		ICPPEvaluation conditionExprEval = conditionExpr != null ? conditionExpr.getEvaluation() : null;
+		ExecSimpleDeclaration conditionDeclExec = conditionDecl != null ? (ExecSimpleDeclaration) conditionDecl.getExecution() : null;
 		ICPPExecution bodyExec = EvalUtil.getExecutionFromStatement(getBody());
 		return new ExecWhile(conditionExprEval, conditionDeclExec, bodyExec);
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplate.java
index 4bb16be6183..9ed449726bc 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012 Institute for Software, HSR Hochschule fuer Technik  
+ * Copyright (c) 2012 Institute for Software, HSR Hochschule fuer Technik
  * Rapperswil, University of applied sciences.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -34,13 +34,13 @@ public class CPPAliasTemplate extends PlatformObject
 	private final IASTName aliasName;
 	private final IType aliasedType;
 	private ICPPTemplateParameter[] templateParameters;
-	
+
 	public CPPAliasTemplate(IASTName aliasName, IType aliasedType) {
 		this.aliasName = aliasName;
 		this.aliasedType = aliasedType;
 		aliasName.setBinding(this);
 	}
-	
+
 	@Override
 	public IType getType() {
 		return aliasedType;
@@ -79,7 +79,7 @@ public class CPPAliasTemplate extends PlatformObject
 		IType aliasedType = getType();
 		return type.isSameType(aliasedType);
 	}
-	
+
     @Override
 	public Object clone() {
         IType t = null;
@@ -125,7 +125,7 @@ public class CPPAliasTemplate extends PlatformObject
 		}
 		return templateParameters;
 	}
-	
+
 	@Override
 	public String toString() {
 		return ASTTypeUtil.getQualifiedName(this) + " -> " + ASTTypeUtil.getType(aliasedType, true); //$NON-NLS-1$
@@ -134,7 +134,7 @@ public class CPPAliasTemplate extends PlatformObject
 	@Override
 	public IBinding resolveTemplateParameter(ICPPTemplateParameter templateParameter) {
 		int pos= templateParameter.getParameterPosition();
-		
+
 		ICPPASTTemplateParameter[] params = CPPTemplates.getTemplateDeclaration(aliasName).getTemplateParameters();
 		if (pos < params.length) {
 			final IASTName oName = CPPTemplates.getTemplateParameterName(params[pos]);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplateInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplateInstance.java
index bcce98c3fb5..0be260c7e6f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplateInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplateInstance.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2016 Institute for Software, HSR Hochschule fuer Technik  
+ * Copyright (c) 2012, 2016 Institute for Software, HSR Hochschule fuer Technik
  * Rapperswil, University of applied sciences.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -43,7 +43,7 @@ public class CPPAliasTemplateInstance extends PlatformObject
 	public ICPPAliasTemplate getTemplateDefinition() {
 		return aliasTemplate;
 	}
-	
+
 	@Override
 	public boolean isSameType(IType other) {
 		if (other == aliasedType)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArithmeticConversion.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArithmeticConversion.java
index 68c3918eaca..8c72f1009c5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArithmeticConversion.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArithmeticConversion.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.IBasicType;
@@ -17,17 +17,17 @@ import org.eclipse.cdt.internal.core.dom.parser.ArithmeticConversion;
 
 public class CPPArithmeticConversion extends ArithmeticConversion {
 	private static CPPArithmeticConversion sInstance= new CPPArithmeticConversion();
-	
+
 	public static IType convertCppOperandTypes(int operator, IType t1, IType t2) {
 		return sInstance.convertOperandTypes(operator, t1, t2);
 	}
-	
+
 	public static IType promoteCppType(IType t) {
 		return sInstance.promoteType(t);
 	}
-	
+
 	private CPPArithmeticConversion() {}
-	
+
 	@Override
 	protected IBasicType createBasicType(Kind kind, int modifiers) {
 		return new CPPBasicType(kind, modifiers);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArrayType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArrayType.java
index e00629da487..8bb97c803b6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArrayType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArrayType.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Andrew Niefer (IBM Corporation) - initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -40,25 +40,25 @@ public class CPPArrayType implements IArrayType, ITypeContainer, ISerializableTy
     	this.sizeExpression = sizeExp;
     	setType(type);
     }
-    
+
     @Override
 	public IType getType() {
         return type;
     }
-    
+
     @Override
 	public final void setType(IType t) {
     	assert t != null;
         this.type = t;
     }
-    
+
     @Override
 	public boolean isSameType(IType obj) {
         if (obj == this)
             return true;
         if (obj instanceof ITypedef)
             return ((ITypedef) obj).isSameType(this);
-        
+
         if (obj instanceof IArrayType) {
             final IArrayType rhs = (IArrayType) obj;
 			IType objType = rhs.getType();
@@ -81,7 +81,7 @@ public class CPPArrayType implements IArrayType, ITypeContainer, ISerializableTy
 	public IValue getSize() {
     	if (value != IntegralValue.NOT_INITIALIZED)
     		return value;
-    	
+
     	if (sizeExpression == null)
     		return value= null;
 
@@ -124,8 +124,8 @@ public class CPPArrayType implements IArrayType, ITypeContainer, ISerializableTy
 			buffer.putShort(firstBytes);
 			buffer.marshalType(getType());
 			return;
-		} 
-		
+		}
+
 		Number num= val.numberValue();
 		if (num != null) {
 			long lnum= num.longValue();
@@ -134,7 +134,7 @@ public class CPPArrayType implements IArrayType, ITypeContainer, ISerializableTy
 				buffer.putLong(lnum);
 				buffer.marshalType(getType());
 				return;
-			} 
+			}
 		}
 		buffer.putShort((short) (firstBytes | ITypeMarshalBuffer.FLAG2));
 		buffer.marshalValue(val);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java
index a891b4c1248..eb90c446b28 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java
@@ -33,11 +33,11 @@ public class CPPBaseClause implements ICPPBase, ICPPInternalBase {
     private final ICPPASTBaseSpecifier base;
 	private IType baseClass;
 	private boolean inheritedConstructorsSource;
-    
+
     public CPPBaseClause(ICPPASTBaseSpecifier base) {
         this.base = base;
     }
-    
+
     @Override
 	public IBinding getBaseClass() {
 		IType type= getBaseClassType();
@@ -69,11 +69,11 @@ public class CPPBaseClause implements ICPPBase, ICPPInternalBase {
 		}
 		return baseClass;
     }
-    
+
     @Override
 	public int getVisibility() {
 		int vis = base.getVisibility();
-		
+
 		if (vis == 0) {
 			ICPPASTCompositeTypeSpecifier compSpec = (ICPPASTCompositeTypeSpecifier) base.getParent();
 			vis = compSpec.getKey() == ICPPClassType.k_class ? ICPPBase.v_private : ICPPBase.v_public;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBasicType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBasicType.java
index 504f0ce2f54..3073e17460a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBasicType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBasicType.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Andrew Niefer (IBM Corporation) - initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -78,11 +78,11 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
 	public CPPBasicType(Kind kind, int qualifiers) {
 		this(kind, qualifiers, null);
 	}
-	
+
 	public CPPBasicType(ICPPASTSimpleDeclSpecifier sds) {
 		this(getKind(sds), getModifiers(sds), null);
 	}
-	
+
 	private static int getModifiers(ICPPASTSimpleDeclSpecifier sds) {
 		return
 			(sds.isLong() ? IBasicType.IS_LONG  : 0) |
@@ -93,7 +93,7 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
 			(sds.isComplex() ? IBasicType.IS_COMPLEX : 0) |
 			(sds.isImaginary() ? IBasicType.IS_IMAGINARY : 0);
 	}
-	
+
 	private static Kind getKind(ICPPASTSimpleDeclSpecifier sds) {
 		return getKind(sds.getType());
 	}
@@ -162,7 +162,7 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
 	public Kind getKind() {
 		return fKind;
 	}
-	
+
 	@Override
 	public boolean isSigned() {
 		return (fModifiers & IS_SIGNED) != 0;
@@ -211,7 +211,7 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
 
 	/**
 	 * Sets the numerical value this type was created for.
-	 * 
+	 *
 	 * @param value the numerical value of {@code null}
 	 */
 	public final void setAssociatedNumericalValue(Long value) {
@@ -236,12 +236,12 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
 	public final int getModifiers() {
 		return fModifiers & ~FROM_STRING_LITERAL;
 	}
-	
+
 	@Override
 	public String toString() {
 		return ASTTypeUtil.getType(this);
 	}
-	
+
 	@Override
 	public void marshal(ITypeMarshalBuffer buffer) throws CoreException {
 		final int kind= getKind().ordinal();
@@ -258,7 +258,7 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
 		if (fAssociatedValue != null)
 			buffer.putLong(getAssociatedNumericalValue());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		final boolean haveModifiers= (firstBytes & ITypeMarshalBuffer.LAST_FLAG) != 0;
 		final boolean haveAssociatedNumericalValue= (firstBytes & ITypeMarshalBuffer.SECOND_LAST_FLAG) != 0;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBlockScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBlockScope.java
index 7ba5b49f8d8..5b9b5dc04db 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBlockScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBlockScope.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     Andrew Niefer (IBM Corporation) - Initial API and implementation 
+ *     Andrew Niefer (IBM Corporation) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -25,12 +25,12 @@ public class CPPBlockScope extends CPPNamespaceScope implements ICPPBlockScope {
 	public CPPBlockScope(IASTNode physicalNode) {
 		super(physicalNode);
 	}
-	
+
 	@Override
 	public EScopeKind getKind() {
 		return EScopeKind.eLocal;
 	}
-	
+
 	@Override
 	public IName getScopeName() {
 	    IASTNode node = getPhysicalNode();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinParameter.java
index 34db3118d7d..08e577e8bb3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinParameter.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ILinkage;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinVariable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinVariable.java
index 4dce03738c2..399ef18966e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinVariable.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinVariable.java
@@ -18,21 +18,21 @@ import org.eclipse.cdt.core.dom.ast.IType;
 /**
  * Used to represent built-in variables that exist on the translation
  * unit but are not actually part of the physical AST created by CDT.
- * 
+ *
  * An example is the built-in variable __func__.
  */
 public class CPPBuiltinVariable extends CPPVariable {
     private IType type=null;
     private char[] name=null;
     private IScope scope=null;
-    
+
     public CPPBuiltinVariable(IType type, char[] name, IScope scope) {
         super(null);
         this.type = type;
         this.name = name;
         this.scope = scope;
     }
-    
+
     @Override
 	public IType getType() {
         return type;
@@ -42,17 +42,17 @@ public class CPPBuiltinVariable extends CPPVariable {
 	public String getName() {
         return String.valueOf(name);
     }
-    
+
     @Override
 	public char[] getNameCharArray() {
         return name;
     }
-    
+
     @Override
 	public IScope getScope() {
         return scope;
     }
-            
+
     /**
      * returns null
      */
@@ -60,7 +60,7 @@ public class CPPBuiltinVariable extends CPPVariable {
 	public IASTNode[] getDeclarations() {
         return null;
     }
-    
+
     /**
      * returns null
      */
@@ -68,7 +68,7 @@ public class CPPBuiltinVariable extends CPPVariable {
 	public IASTNode getDefinition() {
         return null;
     }
-        
+
     /**
      * does nothing
      */
@@ -76,7 +76,7 @@ public class CPPBuiltinVariable extends CPPVariable {
 	public void addDefinition(IASTNode node) {
         // do nothing
     }
-    
+
     /**
      * does nothing
      */
@@ -84,24 +84,24 @@ public class CPPBuiltinVariable extends CPPVariable {
 	public void addDeclaration(IASTNode node) {
         // do nothing
     }
-        
+
     @Override
 	public String[] getQualifiedName() {
         String[] temp = new String[1];
         temp[0] = String.valueOf(name);
-        
+
         return temp;
     }
-    
+
 
     @Override
 	public char[][] getQualifiedNameCharArray() {
         char[][] temp = new char[1][];
         temp[0] = name;
-        
+
         return temp;
     }
-    
+
     /**
      * returns true
      */
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java
index 4de2198aca1..b7d8df6d5d5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java
@@ -45,7 +45,7 @@ public class CPPClassInstance extends CPPClassSpecialization implements ICPPTemp
 	public ICPPTemplateDefinition getTemplateDefinition() {
 		return (ICPPTemplateDefinition) getSpecializedBinding();
 	}
-	
+
 	@Override
 	public ICPPTemplateArgument[] getTemplateArguments() {
 		return arguments;
@@ -57,7 +57,7 @@ public class CPPClassInstance extends CPPClassSpecialization implements ICPPTemp
 		checkForDefinition();
 		if (getDefinition() != null)
 			return null;
-		
+
 		return super.getSpecializationScope();
 	}
 
@@ -70,7 +70,7 @@ public class CPPClassInstance extends CPPClassSpecialization implements ICPPTemp
 		final IASTNode[] decls = getDeclarations();
 		if (decls != null && decls.length > 0 && decls[0] != null)
 			return true;
-		
+
 		return false;
 	}
 
@@ -81,7 +81,7 @@ public class CPPClassInstance extends CPPClassSpecialization implements ICPPTemp
 	public String toString() {
 		return getName() + " " + ASTTypeUtil.getArgumentListString(arguments, true); //$NON-NLS-1$
 	}
-	
+
 	@Override
 	public boolean equals(Object obj) {
 		return obj instanceof ICPPClassType && isSameType((ICPPClassType) obj);
@@ -99,7 +99,7 @@ public class CPPClassInstance extends CPPClassSpecialization implements ICPPTemp
 
 	public static boolean isSameClassInstance(ICPPClassSpecialization classInstance, IType type) {
 		assert classInstance instanceof ICPPTemplateInstance;
-		
+
 		// Require a class instance.
 		if (!(type instanceof ICPPClassSpecialization) || !(type instanceof ICPPTemplateInstance) ||
 				type instanceof IProblemBinding) {
@@ -111,7 +111,7 @@ public class CPPClassInstance extends CPPClassSpecialization implements ICPPTemp
 		final ICPPClassType orig2= classSpec2.getSpecializedBinding();
 		if (!orig1.isSameType(orig2))
 			return false;
-		
+
 		return CPPTemplates.haveSameArguments((ICPPTemplateInstance) classInstance, (ICPPTemplateInstance) type);
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java
index 93af498af8d..53e47990dc8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java
@@ -112,7 +112,7 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
 
 		if (!ia.hasUserDeclaredConstructor()) {
 			// Default constructor: A(void)
-			ICPPMethod m = new CPPImplicitConstructor(this, className, EMPTY_CPPPARAMETER_ARRAY, 
+			ICPPMethod m = new CPPImplicitConstructor(this, className, EMPTY_CPPPARAMETER_ARRAY,
 					compTypeSpec);
 			implicits[i++] = m;
 			addBinding(m);
@@ -148,7 +148,7 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
 	}
 
 	/**
-	 * Marks bases that serve as sources of inherited constructors. 
+	 * Marks bases that serve as sources of inherited constructors.
 	 */
 	private void markInheritedConstructorsSourceBases(ICPPASTCompositeTypeSpecifier compositeTypeSpec) {
 		ICPPBase[] bases = ClassTypeHelper.getBases(getClassType(), compositeTypeSpec);
@@ -191,7 +191,7 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
 			if (!(type instanceof ITypedef))
 				break;
 			type = ((ITypedef) type).getType();
-		} 
+		}
 		return false;
 	}
 
@@ -216,7 +216,7 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
 		// Don't add names from inactive code branches.
 		if (!name.isActive())
 			return;
-		
+
 		if (name instanceof ICPPASTQualifiedName) {
 			// Check whether the qualification matches.
 			IBinding b= getClassType();
@@ -225,7 +225,7 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
 			for (int i = qualifier.length; --i >= 0;) {
 				if (b == null)
 					return;
-				
+
 				char[] segmentName;
 				if (qualifier[i] instanceof IASTName) {
 					segmentName = ((IASTName) qualifier[i]).getLookupKey();
@@ -235,10 +235,10 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
 						return;
 					segmentName = segmentBinding.getNameCharArray();
 				}
-				
+
 				if (!CharArrayUtils.equals(segmentName, b.getNameCharArray()))
 					return;
-				
+
 				b= b.getOwner();
 			}
 			if (qname.isFullyQualified() && b != null)
@@ -294,7 +294,7 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
 	public IBinding[] getBindings(ScopeLookupData lookup) {
 	    char[] c = lookup.getLookupKey();
 	    final boolean prefixLookup= lookup.isPrefixLookup();
-	    
+
 	    ICPPASTCompositeTypeSpecifier compType = (ICPPASTCompositeTypeSpecifier) getPhysicalNode();
 	    IASTName compName = compType.getName().getLastName();
 		if (compName instanceof ICPPASTTemplateId) {
@@ -402,12 +402,12 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
 	public static boolean shallReturnConstructors(IASTName name, boolean isPrefixLookup) {
 		if (name == null)
 			return false;
-		
+
 		if (!isPrefixLookup) {
 			return CPPVisitor.isConstructorDeclaration(name)
 				|| CPPVisitor.isLastNameInUsingDeclaration(name);
 		}
-		
+
 		IASTNode node = name.getParent();
 		if (node instanceof ICPPASTTemplateId)
 			return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecializationScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecializationScope.java
index d98c4ba2a00..5fba88908de 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecializationScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecializationScope.java
@@ -26,7 +26,7 @@ public class CPPClassSpecializationScope extends AbstractCPPClassSpecializationS
 	public CPPClassSpecializationScope(ICPPClassSpecialization specialization) {
 		super(specialization);
 	}
-		
+
 	// This scope does not cache its own names
 	@Override
 	public void addName(IASTName name) {}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java
index 3d288feb2ec..ce18ed3f430 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java
@@ -57,10 +57,10 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClass
 	}
 
 	@Override
-	public void checkForDefinition() { 
+	public void checkForDefinition() {
 		// Ambiguity resolution ensures that definitions are resolved.
 	}
-	
+
 	@Override
 	public void addPartialSpecialization(ICPPClassTemplatePartialSpecialization spec) {
 		partialSpecializations = ArrayUtil.append(
@@ -93,7 +93,7 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClass
 				return compSpec.getScope();
 			}
 		}
-		
+
 		// Forward declarations must be backed up from the index.
 		ICPPClassTemplate ib = getIndexBinding();
 		if (ib != null) {
@@ -126,7 +126,7 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClass
 
 		return ICPPASTElaboratedTypeSpecifier.k_class;
 	}
-	
+
 	@Override
 	public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() {
 		if (!addedPartialSpecializationsOfIndex) {
@@ -144,7 +144,7 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClass
 		partialSpecializations = ArrayUtil.trim(ICPPClassTemplatePartialSpecialization.class, partialSpecializations);
 		return partialSpecializations;
 	}
-	
+
 	@Override
 	public boolean isSameType(IType type) {
 		if (type == this)
@@ -153,7 +153,7 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClass
 			return type.isSameType(this);
 		return false;
 	}
-	
+
 	@Override
 	public ICPPBase[] getBases() {
 		if (bases == null) {
@@ -196,7 +196,7 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClass
 	public IBinding[] getFriends() {
 		return ClassTypeHelper.getFriends(this);
 	}
-	
+
 	@Override
 	public ICPPClassType[] getNestedClasses() {
 		return ClassTypeHelper.getNestedClasses(this);
@@ -206,7 +206,7 @@ public class CPPClassTemplate extends CPPTemplateDefinition implements ICPPClass
 	public IField findField(String name) {
 		return ClassTypeHelper.findField(this, name);
 	}
-	
+
 	@Override
 	public Object clone() {
 		try {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecialization.java
index 64e019e6957..ba8a3904478 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecialization.java
@@ -63,7 +63,7 @@ public class CPPClassTemplatePartialSpecialization extends CPPClassTemplate
 			ICPPClassTemplatePartialSpecialization rhs) {
 		ICPPClassType ct1= lhs.getPrimaryClassTemplate();
 		ICPPClassType ct2= rhs.getPrimaryClassTemplate();
-		if(!ct1.isSameType(ct2))
+		if (!ct1.isSameType(ct2))
 			return false;
 
 		ICPPTemplateArgument[] args1= lhs.getTemplateArguments();
@@ -72,7 +72,7 @@ public class CPPClassTemplatePartialSpecialization extends CPPClassTemplate
 			return false;
 
 		for (int i = 0; i < args2.length; i++) {
-			if (!args1[i].isSameValue(args2[i])) 
+			if (!args1[i].isSameValue(args2[i]))
 				return false;
 		}
 		return true;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecializationSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecializationSpecialization.java
index 5649dd232c1..590163b05bb 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecializationSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecializationSpecialization.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
@@ -101,7 +101,7 @@ public class CPPClassTemplatePartialSpecializationSpecialization extends CPPClas
 	public ICPPTemplateArgument[] getTemplateArguments() {
 		return fArguments;
 	}
-	
+
 	@Override
 	public void addPartialSpecialization(ICPPClassTemplatePartialSpecialization spec) {
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassType.java
index f6305534b43..777e0555cd2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassType.java
@@ -50,7 +50,7 @@ import org.eclipse.core.runtime.PlatformObject;
  * Binding for a class type.
  */
 public class CPPClassType extends PlatformObject implements ICPPInternalClassTypeMixinHost {
-	
+
 	public static class CPPClassTypeProblem extends ProblemBinding implements ICPPClassType {
 		public CPPClassTypeProblem(IASTName name, int id) {
 			super(name, id);
@@ -177,14 +177,14 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 		}
 		return null;
 	}
-	
+
 	private ICPPASTElaboratedTypeSpecifier getElaboratedTypeSpecifier() {
 		if (declarations != null) {
 			IASTNode node = declarations[0];
 			while (node instanceof IASTName)
 				node = node.getParent();
 			if (node instanceof ICPPASTElaboratedTypeSpecifier)
-				return (ICPPASTElaboratedTypeSpecifier)node;
+				return (ICPPASTElaboratedTypeSpecifier) node;
 		}
 		return null;
 	}
@@ -203,11 +203,11 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 	public IScope getScope() {
 		IASTName name = definition != null ? definition : declarations[0];
 		name = stripQualifier(name);
-		
+
 		IScope scope = CPPVisitor.getContainingScope(name);
 		if (definition == null && name.getPropertyInParent() != ICPPASTQualifiedName.SEGMENT_NAME) {
 			IASTNode node = declarations[0].getParent().getParent();
-			if (node instanceof IASTSimpleDeclaration && ((IASTSimpleDeclaration) node).getDeclarators().length == 0 
+			if (node instanceof IASTSimpleDeclaration && ((IASTSimpleDeclaration) node).getDeclarators().length == 0
 					&& !getElaboratedTypeSpecifier().isFriend()) {
 				// 3.3.1.5 class-key identifier ;
 			} else {
@@ -252,12 +252,12 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 	@Override
 	public void addDefinition(IASTNode node) {
 		if (node instanceof ICPPASTCompositeTypeSpecifier) {
-			definition = ((ICPPASTCompositeTypeSpecifier)node).getName();
+			definition = ((ICPPASTCompositeTypeSpecifier) node).getName();
 		} else {
 			assert false;
 		}
 	}
-	
+
 	@Override
 	public void addDeclaration(IASTNode node) {
 		if (node instanceof ICPPASTElaboratedTypeSpecifier) {
@@ -269,7 +269,7 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 			}
 
 			// Keep the lowest offset declaration in [0]
-			if (declarations.length > 0 && ((ASTNode)node).getOffset() < ((ASTNode) declarations[0]).getOffset()) {
+			if (declarations.length > 0 && ((ASTNode) node).getOffset() < ((ASTNode) declarations[0]).getOffset()) {
 				declarations = ArrayUtil.prepend(IASTName.class, declarations, name);
 			} else {
 				declarations = ArrayUtil.append(IASTName.class, declarations, name);
@@ -304,7 +304,7 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
 	}
-	
+
 	@Override
 	public boolean isSameType(IType type) {
 		if (type == this)
@@ -313,7 +313,7 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 			return type.isSameType(this);
 		return false;
 	}
-	
+
 	@Override
 	public ICPPBase[] getBases() {
 		if (bases == null) {
@@ -362,7 +362,7 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 	public IBinding[] getFriends() {
 		return ClassTypeHelper.getFriends(this);
 	}
-	
+
 	@Override
 	public ICPPClassType[] getNestedClasses() {
 		return ClassTypeHelper.getNestedClasses(this);
@@ -372,7 +372,7 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 	public IField findField(String name) {
 		return ClassTypeHelper.findField(this, name);
 	}
-	
+
 	@Override
 	public Object clone() {
 		try {
@@ -381,13 +381,13 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 		}
 		return null;
 	}
-	
+
 	/**
 	 * For debugging purposes, only.
 	 */
 	@Override
 	public String toString() {
-		return getName(); 
+		return getName();
 	}
 
 	@Override
@@ -397,13 +397,13 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 		}
 		return CPPVisitor.findDeclarationOwner(declarations[0], true);
 	}
-	
+
 	@Override
 	public boolean isAnonymous() {
-		if (getNameCharArray().length > 0) 
+		if (getNameCharArray().length > 0)
 			return false;
-		
-		ICPPASTCompositeTypeSpecifier spec= getCompositeTypeSpecifier(); 
+
+		ICPPASTCompositeTypeSpecifier spec= getCompositeTypeSpecifier();
 		if (spec != null) {
 			IASTNode node= spec.getParent();
 			if (node instanceof IASTSimpleDeclaration) {
@@ -426,7 +426,7 @@ public class CPPClassType extends PlatformObject implements ICPPInternalClassTyp
 
 	private IASTName stripQualifier(IASTName name) {
 		if (name instanceof ICPPASTQualifiedName) {
-	        name = ((ICPPASTQualifiedName)name).getLastName();
+	        name = ((ICPPASTQualifiedName) name).getLastName();
 	    }
 		return name;
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClosureType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClosureType.java
index d06ae806038..a40e0f83ec8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClosureType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClosureType.java
@@ -71,26 +71,26 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 	}
 
 	private ICPPMethod[] createMethods() {
-		boolean needConversionOperator= 
+		boolean needConversionOperator=
 			fLambdaExpression.getCaptureDefault() == CaptureDefault.UNSPECIFIED &&
 			fLambdaExpression.getCaptures().length == 0;
-		
+
 		final ICPPClassScope scope= getCompositeScope();
 		ICPPMethod[] result= new ICPPMethod[needConversionOperator ? 6 : 5];
 
 		// Deleted default constructor: A()
 		CPPImplicitConstructor ctor=
-				new CPPImplicitConstructor(scope, CharArrayUtils.EMPTY, 
+				new CPPImplicitConstructor(scope, CharArrayUtils.EMPTY,
 						ICPPParameter.EMPTY_CPPPARAMETER_ARRAY, fLambdaExpression);
 		ctor.setDeleted(true);
 		result[0]= ctor;
-		
+
 		// Copy constructor: A(const A &)
 		IType pType = new CPPReferenceType(SemanticUtil.constQualify(this), false);
 		ICPPParameter[] ps = new ICPPParameter[] { new CPPParameter(pType, 0) };
 		ctor = new CPPImplicitConstructor(scope, CharArrayUtils.EMPTY, ps, fLambdaExpression);
 		result[1]= ctor;
-		
+
 		// Deleted copy assignment operator: A& operator = (const A &)
 		IType refType = new CPPReferenceType(this, false);
 		ICPPFunctionType ft= CPPVisitor.createImplicitFunctionType(refType, ps, false, false);
@@ -101,7 +101,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 		ft= CPPVisitor.createImplicitFunctionType(UNSPECIFIED_TYPE, ICPPParameter.EMPTY_CPPPARAMETER_ARRAY, false, false);
 		m = new CPPImplicitMethod(scope, new char[] {'~'}, ft, ICPPParameter.EMPTY_CPPPARAMETER_ARRAY, false);
 		result[3]= m;
-		
+
 		// Function call operator
 		final IType returnType= getReturnType();
 		final IType[] parameterTypes= getParameterTypes();
@@ -116,7 +116,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 			public boolean isImplicit() { return false; }
 		};
 		result[4]= m;
-		
+
 		// Conversion operator
 		if (needConversionOperator) {
 			final CPPFunctionType conversionTarget = new CPPFunctionType(returnType, parameterTypes);
@@ -168,7 +168,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 				}
 			}
 		}
-		return CPPSemantics.VOID_TYPE;		
+		return CPPSemantics.VOID_TYPE;
 	}
 
 	private IType[] getParameterTypes() {
@@ -178,7 +178,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 		}
 		return IType.EMPTY_TYPE_ARRAY;
 	}
-	
+
 	@Override
 	public final String getName() {
 		return ""; //$NON-NLS-1$
@@ -226,7 +226,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
 	}
-	
+
 	@Override
 	public boolean isSameType(IType type) {
 		if (type == this)
@@ -237,7 +237,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 			return false;
 		return fLambdaExpression.getFileLocation().equals(((CPPClosureType) type).fLambdaExpression.getFileLocation());
 	}
-	
+
 	@Override
 	public ICPPBase[] getBases() {
 		return ICPPBase.EMPTY_BASE_ARRAY;
@@ -289,7 +289,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 	public IBinding[] getFriends() {
 		return IBinding.EMPTY_BINDING_ARRAY;
 	}
-	
+
 	@Override
 	public ICPPClassType[] getNestedClasses() {
 		return ICPPClassType.EMPTY_CLASS_ARRAY;
@@ -308,7 +308,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 		}
 		return null;
 	}
-	
+
 	/**
 	 * For debugging purposes, only.
 	 */
@@ -321,12 +321,12 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 	public IBinding getOwner() {
 		return CPPVisitor.findDeclarationOwner(fLambdaExpression, true);
 	}
-	
+
 	@Override
 	public boolean isAnonymous() {
 		return false;
 	}
-	
+
 	@Override
 	public IASTNode getDefinition() {
 		return fLambdaExpression;
@@ -447,7 +447,7 @@ public class CPPClosureType extends PlatformObject implements ICPPClassType, ICP
 		public IBinding[] getBindings(ScopeLookupData lookup) {
 			if (lookup.getLookupName() instanceof ICPPASTTemplateId)
 				return IBinding.EMPTY_BINDING_ARRAY;
-			
+
 			if (lookup.isPrefixLookup())
 				return getPrefixBindings(lookup.getLookupKey());
 			return getBindings(lookup.getLookupKey());
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPCompositeBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPCompositeBinding.java
index e09a300c314..a15ccf7d8f7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPCompositeBinding.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPCompositeBinding.java
@@ -26,7 +26,7 @@ public class CPPCompositeBinding extends PlatformObject implements IBinding {
 	public CPPCompositeBinding(IBinding[] bindingList) {
 		bindings = ArrayUtil.trim(bindingList, true);
 	}
-	
+
 	@Override
 	public String getName() {
 		return bindings[0].getName();
@@ -46,7 +46,7 @@ public class CPPCompositeBinding extends PlatformObject implements IBinding {
 	public IBinding getOwner() {
 		return bindings[0].getOwner();
 	}
-	
+
 	public IASTNode getPhysicalNode() {
 		return null;
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java
index 3d0c28c73ca..16529b6d9dc 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java
@@ -35,7 +35,7 @@ public class CPPConstructor extends CPPMethod implements ICPPConstructor {
 	public CPPConstructor(ICPPASTFunctionDeclarator declarator) {
 		super(declarator);
 	}
-	
+
 	@Override
 	public ICPPExecution getConstructorChainExecution(IASTNode point) {
 		return getConstructorChainExecution(this);
@@ -43,38 +43,38 @@ public class CPPConstructor extends CPPMethod implements ICPPConstructor {
 
 	private static ICPPEvaluation getMemberEvaluation(ICPPField member, ICPPASTConstructorChainInitializer chainInitializer, IASTNode point) {
 		final IASTInitializer initializer = chainInitializer.getInitializer();
-		if(initializer instanceof ICPPEvaluationOwner) {
+		if (initializer instanceof ICPPEvaluationOwner) {
 			return ((ICPPEvaluationOwner) initializer).getEvaluation();
-		} else if(initializer instanceof ICPPASTConstructorInitializer) {
+		} else if (initializer instanceof ICPPASTConstructorInitializer) {
 			ICPPConstructor constructor = (ICPPConstructor)CPPSemantics.findImplicitlyCalledConstructor(chainInitializer);
 			if (constructor == null) {
 				boolean usesBracedInitList = (initializer instanceof ICPPASTInitializerList);
-				return new EvalTypeId(member.getType(), point, usesBracedInitList, 
+				return new EvalTypeId(member.getType(), point, usesBracedInitList,
 						EvalConstructor.extractArguments(initializer));
 			}
 			return new EvalConstructor(member.getType(), constructor, EvalConstructor.extractArguments(initializer), point);
 		}
 		return null;
 	}
-	
+
 	static ICPPExecution computeConstructorChainExecution(IASTNode def) {
 		ICPPASTFunctionDefinition fnDef = getFunctionDefinition(def);
 		if (fnDef != null) {
 			final ICPPASTConstructorChainInitializer[] ccInitializers = fnDef.getMemberInitializers();
 			final Map resultPairs = new HashMap<>();
-			for(ICPPASTConstructorChainInitializer ccInitializer : ccInitializers) {
+			for (ICPPASTConstructorChainInitializer ccInitializer : ccInitializers) {
 				final IBinding member = ccInitializer.getMemberInitializerId().resolveBinding();
-				if(member instanceof ICPPField) {
-					final ICPPField fieldMember = (ICPPField)member;
+				if (member instanceof ICPPField) {
+					final ICPPField fieldMember = (ICPPField) member;
 					final ICPPEvaluation memberEval = getMemberEvaluation(fieldMember, ccInitializer, fnDef);
 					resultPairs.put(fieldMember, memberEval);
-				} else if(member instanceof ICPPConstructor) {
-					final ICPPConstructor ctorMember = (ICPPConstructor)member;
+				} else if (member instanceof ICPPConstructor) {
+					final ICPPConstructor ctorMember = (ICPPConstructor) member;
 					final IASTInitializer initializer = ccInitializer.getInitializer();
-					if (initializer instanceof ICPPASTConstructorInitializer || 
+					if (initializer instanceof ICPPASTConstructorInitializer ||
 					    initializer instanceof ICPPASTInitializerList) {
-						final ICPPClassType baseClassType = (ICPPClassType)ctorMember.getOwner();				
-						EvalConstructor memberEval = new EvalConstructor(baseClassType, ctorMember, 
+						final ICPPClassType baseClassType = (ICPPClassType) ctorMember.getOwner();
+						EvalConstructor memberEval = new EvalConstructor(baseClassType, ctorMember,
 								EvalConstructor.extractArguments(initializer, ctorMember), fnDef);
 						resultPairs.put(ctorMember, memberEval);
 					}
@@ -84,9 +84,9 @@ public class CPPConstructor extends CPPMethod implements ICPPConstructor {
 		}
 		return null;
 	}
-	
+
 	static ICPPExecution getConstructorChainExecution(CPPFunction function) {
-		if(!function.isConstexpr())
+		if (!function.isConstexpr())
 			return null;
 		return computeConstructorChainExecution(function.getDefinition());
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorSpecialization.java
index 0cd51970193..b715b02e467 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorSpecialization.java
@@ -29,20 +29,20 @@ public class CPPConstructorSpecialization extends CPPMethodSpecialization implem
 			ICPPTemplateParameterMap argMap, ICPPFunctionType type, IType[] exceptionSpecs) {
 		super(orig, owner, argMap, type, exceptionSpecs);
 	}
-	
-	static  ICPPExecution 
+
+	static  ICPPExecution
 			getConstructorChainExecution(T functionSpec, IASTNode point) {
 		if (!functionSpec.isConstexpr()) {
 			return null;
 		}
-		
+
 		IASTNode def = functionSpec.getDefinition();
-		if(def != null) {
+		if (def != null) {
 			return CPPConstructor.computeConstructorChainExecution(def);
 		}
 		return CPPTemplates.instantiateConstructorChain(functionSpec, point);
 	}
-	
+
 	@Override
 	public ICPPExecution getConstructorChainExecution(IASTNode point) {
 		return getConstructorChainExecution(this, point);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorTemplate.java
index 14a6f766615..8b8f5187979 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorTemplate.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     Andrew Niefer (IBM Corporation) - Initial API and implementation 
+ *     Andrew Niefer (IBM Corporation) - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
@@ -19,7 +19,7 @@ public class CPPConstructorTemplate extends CPPMethodTemplate implements ICPPCon
 	public CPPConstructorTemplate(IASTName name) {
 		super(name);
 	}
-	
+
 	@Override
 	public ICPPExecution getConstructorChainExecution(IASTNode point) {
 		if (!isConstexpr()) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java
index 3727e4de070..0b88d219420 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java
@@ -57,7 +57,7 @@ public class CPPDeferredClassInstance extends CPPUnknownBinding implements ICPPD
 	public CPPDeferredClassInstance(ICPPClassTemplate template, ICPPTemplateArgument[] arguments) {
 		this(template, arguments, null);
 	}
-	
+
 	@Override
 	public IBinding getOwner() {
 		return fClassTemplate.getOwner();
@@ -83,16 +83,16 @@ public class CPPDeferredClassInstance extends CPPUnknownBinding implements ICPPD
 		if (type == this)
 			return true;
 
-		if (type instanceof ITypedef) 
+		if (type instanceof ITypedef)
 			return type.isSameType(this);
 
 		// allow some fuzziness here.
 		ICPPClassTemplate classTemplate = getClassTemplate();
 		if (type instanceof ICPPDeferredClassInstance) {
 			final ICPPDeferredClassInstance rhs = (ICPPDeferredClassInstance) type;
-			if (!classTemplate.isSameType((IType) rhs.getSpecializedBinding())) 
+			if (!classTemplate.isSameType((IType) rhs.getSpecializedBinding()))
 				return false;
-			
+
 			return CPPTemplates.haveSameArguments(this, rhs);
 		}
 		return false;
@@ -102,7 +102,7 @@ public class CPPDeferredClassInstance extends CPPUnknownBinding implements ICPPD
 	public int getKey() {
     	return getClassTemplate().getKey();
     }
-    
+
     @Override
 	public ICPPBase[] getBases() {
         return ICPPBase.EMPTY_BASE_ARRAY;
@@ -157,17 +157,17 @@ public class CPPDeferredClassInstance extends CPPUnknownBinding implements ICPPD
 	public ICPPClassType[] getNestedClasses() {
 		return ICPPClassType.EMPTY_CLASS_ARRAY;
 	}
-	
+
 	@Override
 	public boolean isAnonymous() {
 		return false;
 	}
-	
+
 	@Override
 	public boolean isFinal() {
 		return false;
 	}
-	
+
 	@Override
 	public ICPPTemplateArgument[] getTemplateArguments() {
 		return fArguments;
@@ -193,17 +193,17 @@ public class CPPDeferredClassInstance extends CPPUnknownBinding implements ICPPD
 	public IBinding getSpecializedBinding() {
 		return getTemplateDefinition();
 	}
-	
+
 	@Override
 	public IScope getScope() throws DOMException {
 		return fClassTemplate.getScope();
 	}
-	
+
 	@Override
 	public ICPPScope asScope() {
 		if (fLookupScope != null)
 			return fLookupScope;
-		
+
 		return super.asScope();
 	}
 
@@ -211,7 +211,7 @@ public class CPPDeferredClassInstance extends CPPUnknownBinding implements ICPPD
 	public String toString() {
 		return ASTTypeUtil.getType(this, true);
 	}
-	
+
 	@Override
 	public void marshal(ITypeMarshalBuffer buffer) throws CoreException {
 		short firstBytes= ITypeMarshalBuffer.DEFERRED_CLASS_INSTANCE;
@@ -222,7 +222,7 @@ public class CPPDeferredClassInstance extends CPPUnknownBinding implements ICPPD
 			buffer.marshalTemplateArgument(arg);
 		}
 	}
-	
+
 	public static ICPPDeferredClassInstance unmarshal(IIndexFragment fragment, short firstBytes,
 			ITypeMarshalBuffer buffer) throws CoreException {
 		IBinding template= buffer.unmarshalBinding();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredConstructor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredConstructor.java
index c11f006413a..695e3a71ef5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredConstructor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredConstructor.java
@@ -9,7 +9,7 @@
  *     Markus Schorn - initial API and implementation
  *     Thomas Corbat (IFS)
  *     Nathan Ridge
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.IASTNode;
@@ -18,7 +18,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
 
 /**
- * Represents a reference to a constructor (instance), which cannot be resolved because 
+ * Represents a reference to a constructor (instance), which cannot be resolved because
  * it depends on a template parameter. A compiler would resolve it during instantiation.
  */
 public class CPPDeferredConstructor extends CPPDeferredFunction implements ICPPConstructor {
@@ -75,7 +75,7 @@ public class CPPDeferredConstructor extends CPPDeferredFunction implements ICPPC
 	public boolean isFinal() {
 		return false;
 	}
-	
+
 	@Override
 	public ICPPExecution getConstructorChainExecution(IASTNode point) {
 		return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunction.java
index 7d01ab314bf..848bb2fbc2d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunction.java
@@ -9,7 +9,7 @@
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
  *     Nathan Ridge
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.IASTNode;
@@ -28,10 +28,10 @@ import org.eclipse.cdt.internal.core.dom.parser.ProblemType;
 import org.eclipse.core.runtime.CoreException;
 
 /**
- * Represents a reference to a (member) function (instance), which cannot be resolved because 
+ * Represents a reference to a (member) function (instance), which cannot be resolved because
  * an argument depends on a template parameter. A compiler would resolve it during instantiation.
  */
-public class CPPDeferredFunction extends CPPUnknownBinding implements ICPPDeferredFunction, 
+public class CPPDeferredFunction extends CPPUnknownBinding implements ICPPDeferredFunction,
 		ICPPComputableFunction, ISerializableType {
 	private static final ICPPFunctionType FUNCTION_TYPE=
 			new CPPFunctionType(ProblemType.UNKNOWN_FOR_EXPRESSION, IType.EMPTY_TYPE_ARRAY);
@@ -47,11 +47,11 @@ public class CPPDeferredFunction extends CPPUnknownBinding implements ICPPDeferr
 	public static ICPPFunction createForCandidates(ICPPFunction... candidates) {
 		if (candidates[0] instanceof ICPPConstructor)
 			return new CPPDeferredConstructor(((ICPPConstructor) candidates[0]).getClassOwner(), candidates);
-		
+
 		final IBinding owner = candidates[0].getOwner();
 		return new CPPDeferredFunction(owner, candidates[0].getNameCharArray(), candidates);
 	}
-	
+
 	/**
 	 * Creates a CPPDeferredFunction given a name. This is for cases where there
 	 * are no candidates that could be passed to {@link #createForCandidates}.
@@ -161,7 +161,7 @@ public class CPPDeferredFunction extends CPPUnknownBinding implements ICPPDeferr
 	public boolean hasParameterPack() {
 		return false;
 	}
-	
+
 	@Override
 	public IBinding getOwner() {
 		return fOwner;
@@ -183,7 +183,7 @@ public class CPPDeferredFunction extends CPPUnknownBinding implements ICPPDeferr
 		if (this instanceof CPPDeferredConstructor) {
 			firstBytes |= ITypeMarshalBuffer.FLAG1;
 		}
-		
+
 		buffer.putShort(firstBytes);
 		buffer.putCharArray(getNameCharArray());
 		buffer.marshalBinding(getOwner());
@@ -196,7 +196,7 @@ public class CPPDeferredFunction extends CPPUnknownBinding implements ICPPDeferr
 			buffer.putInt(0);
 		}
 	}
-	
+
 	public static IBinding unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		char[] name = buffer.getCharArray();
 		IBinding owner = buffer.unmarshalBinding();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumScope.java
index 936d759d7a7..3749f203dcf 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumScope.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *    Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.IName;
@@ -45,7 +45,7 @@ public class CPPEnumScope extends CPPScope implements ICPPEnumScope {
 		IBinding binding = name.resolveBinding();
 		if (binding instanceof ICPPEnumeration)
 			return (ICPPEnumeration) binding;
-		
+
 		return new CPPEnumeration.CPPEnumerationProblem(name, ISemanticProblem.BINDING_NO_CLASS, name.toCharArray());
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumeration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumeration.java
index 1e33b3fa9e9..b16c51b04f3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumeration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumeration.java
@@ -52,7 +52,7 @@ import org.eclipse.core.runtime.PlatformObject;
 public class CPPEnumeration extends PlatformObject implements ICPPEnumeration, ICPPInternalBinding {
 	private static final IASTName NOT_INITIALIZED = CPPASTName.NOT_INITIALIZED;
 	private static final IEnumerator[] EMPTY_ENUMERATORS = {};
-	
+
 	public static class CPPEnumerationProblem extends ProblemBinding implements ICPPEnumeration, ICPPScope {
 		public CPPEnumerationProblem(IASTNode node, int id, char[] arg) {
 			super(node, id, arg);
@@ -127,25 +127,25 @@ public class CPPEnumeration extends PlatformObject implements ICPPEnumeration, I
 			char[] c = name.getLookupKey();
 			final IASTNode parent = name.getParent();
 			if (parent instanceof ICPPASTEnumerationSpecifier &&
-					!((ICPPASTEnumerationSpecifier) parent).isOpaque() && 
+					!((ICPPASTEnumerationSpecifier) parent).isOpaque() &&
 					CharArrayUtils.equals(c, nameArray)) {
 				IBinding binding = name.resolveBinding();
 				if (binding == CPPEnumeration.this && getDefinition() == name) {
 					return PROCESS_ABORT;
 				}
 			}
-			return PROCESS_CONTINUE; 
+			return PROCESS_CONTINUE;
 		}
 
 		@Override
-		public int visit(IASTDeclaration declaration) { 
+		public int visit(IASTDeclaration declaration) {
 			if (declaration instanceof IASTSimpleDeclaration)
 				return PROCESS_CONTINUE;
-			return PROCESS_SKIP; 
+			return PROCESS_SKIP;
 		}
 		@Override
 		public int visit(IASTDeclSpecifier declSpec) {
-			return (declSpec instanceof ICPPASTEnumerationSpecifier) ? PROCESS_CONTINUE : PROCESS_SKIP; 
+			return (declSpec instanceof ICPPASTEnumerationSpecifier) ? PROCESS_CONTINUE : PROCESS_SKIP;
 		}
 		@Override
 		public int visit(IASTDeclarator declarator) {
@@ -222,7 +222,7 @@ public class CPPEnumeration extends PlatformObject implements ICPPEnumeration, I
 			fDeclarations= ArrayUtil.append(fDeclarations, (IASTName) node);
 		}
 	}
-	
+
     @Override
 	public boolean isSameType(IType type) {
         if (type == this)
@@ -231,7 +231,7 @@ public class CPPEnumeration extends PlatformObject implements ICPPEnumeration, I
             return type.isSameType(this);
         return false;
     }
-    
+
 	@Override
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
@@ -246,7 +246,7 @@ public class CPPEnumeration extends PlatformObject implements ICPPEnumeration, I
 	public String toString() {
 		return getName();
 	}
-	
+
 	@Override
 	public long getMinValue() {
 		if (fMinValue != null)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumerator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumerator.java
index 9c076d8c862..87c7433c31a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumerator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumerator.java
@@ -155,7 +155,7 @@ public class CPPEnumerator extends PlatformObject
 		final IASTNode parent= enumName.getParent();
 		if (parent instanceof ASTEnumerator)
 			return ((ASTEnumerator) parent).getIntegralValue();
-		
+
 		return IntegralValue.UNKNOWN;
 	}
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPField.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPField.java
index 8de41d19857..771218c58e2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPField.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPField.java
@@ -103,7 +103,7 @@ public class CPPField extends CPPVariable implements ICPPField {
 	public int getFieldPosition() {
 		return getFieldPosition(getName(), getClassOwner());
 	}
-	
+
 	public static int getFieldPosition(String fieldName, ICPPClassType classOwner) {
 		IField[] fields = ClassTypeHelper.getDeclaredFields(classOwner, null);
 		for (int fieldPos = 0; fieldPos < fields.length; fieldPos++) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java
index 06c69250083..21fd9b6d040 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java
@@ -155,7 +155,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 			declarations = new IASTDeclarator[] { dtor };
 		} else {
 			// Keep the lowest offset declaration in [0]
-			if (((ASTNode)node).getOffset() < ((ASTNode)declarations[0]).getOffset()) {
+			if (((ASTNode) node).getOffset() < ((ASTNode) declarations[0]).getOffset()) {
 				declarations = ArrayUtil.prepend(declarations, dtor);
 			} else {
 				declarations = ArrayUtil.append(declarations, dtor);
@@ -177,7 +177,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
         IASTDeclarator[] dtors = getDeclarations();
         if (dtors != null) {
     		// In case of multiple function declarations we select the one with the most
-    		// default parameter values. 
+    		// default parameter values.
 			int defaultValuePosition = -1;
         	for (IASTDeclarator dtor : dtors) {
         		if (dtor instanceof ICPPASTFunctionDeclarator) {
@@ -308,7 +308,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 				t = getNestedType(t, TDEF);
 				if (t instanceof ICPPFunctionType) {
 					type = (ICPPFunctionType) t;
-				} else if (t instanceof ISemanticProblem){
+				} else if (t instanceof ISemanticProblem) {
 					type= new ProblemFunctionType(((ISemanticProblem) t).getID());
 				} else {
 					// This case is unexpected
@@ -410,7 +410,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 //        IASTDeclSpecifier declSpec = null;
 //        IASTFunctionDeclarator dtor = (IASTFunctionDeclarator) getDefinition();
 //        if (dtor != null) {
-//	        declSpec = ((IASTFunctionDefinition)dtor.getParent()).getDeclSpecifier();
+//	        declSpec = ((IASTFunctionDefinition) dtor.getParent()).getDeclSpecifier();
 //	        if (declSpec.getStorageClass() == IASTDeclSpecifier.sc_static) {
 //	            bits |= 3 << 2;
 //	            return true;
@@ -421,7 +421,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 //        if (dtors != null) {
 //	        for (int i = 0; i < dtors.length; i++) {
 //	            IASTNode parent = dtors[i].getParent();
-//	            declSpec = ((IASTSimpleDeclaration)parent).getDeclSpecifier();
+//	            declSpec = ((IASTSimpleDeclaration) parent).getDeclSpecifier();
 //	            if (declSpec.getStorageClass() == IASTDeclSpecifier.sc_static) {
 //	                bits |= 3 << 2;
 //	                return true;
@@ -512,9 +512,9 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 
 	            IASTDeclSpecifier declSpec = null;
 	            if (parent instanceof IASTSimpleDeclaration) {
-	                declSpec = ((IASTSimpleDeclaration)parent).getDeclSpecifier();
+	                declSpec = ((IASTSimpleDeclaration) parent).getDeclSpecifier();
 	            } else if (parent instanceof IASTFunctionDefinition) {
-	                declSpec = ((IASTFunctionDefinition)parent).getDeclSpecifier();
+	                declSpec = ((IASTFunctionDefinition) parent).getDeclSpecifier();
 	            }
 
 	            if (declSpec != null && declSpec.isInline())
@@ -570,7 +570,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 
 	static boolean isDeletedDefinition(IASTNode def) {
 		ICPPASTFunctionDefinition functionDefinition = getFunctionDefinition(def);
-		if (functionDefinition != null) 
+		if (functionDefinition != null)
 			return functionDefinition.isDeleted();
 		return false;
 	}
@@ -660,7 +660,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 	public boolean hasParameterPack() {
 		return hasParameterPack(getParameters());
 	}
-	
+
 	public static boolean hasParameterPack(ICPPParameter[] pars) {
 		return pars.length > 0 && pars[pars.length - 1].isParameterPack();
 	}
@@ -715,7 +715,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 		}
 		return null;
 	}
-	
+
 	public static ICPPExecution getFunctionBodyExecution(ICPPFunction function, IASTNode point) {
 		if (function instanceof ICPPComputableFunction) {
 			return ((ICPPComputableFunction) function).getFunctionBodyExecution(point);
@@ -725,7 +725,7 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 
 	@Override
 	public ICPPExecution getFunctionBodyExecution(IASTNode point) {
-		if(!isConstexpr())
+		if (!isConstexpr())
 			return null;
 		if (getDefinition() == null) {
 			// Trigger a search for the function definition.
@@ -738,15 +738,15 @@ public class CPPFunction extends PlatformObject implements ICPPFunction, ICPPInt
 		}
 		return computeFunctionBodyExecution(getDefinition());
 	}
-	
+
 	public static ICPPExecution computeFunctionBodyExecution(IASTNode def) {
 		ICPPASTFunctionDefinition fnDef = getFunctionDefinition(def);
 		if (fnDef != null) {
 			// Make sure ambiguity resolution has been performed on the function body, even
 			// if it's a class method and we're still processing the class declaration.
 			((ASTNode) fnDef).resolvePendingAmbiguities();
-			if(fnDef.getBody() instanceof CPPASTCompoundStatement) {
-				CPPASTCompoundStatement body = (CPPASTCompoundStatement)fnDef.getBody();
+			if (fnDef.getBody() instanceof CPPASTCompoundStatement) {
+				CPPASTCompoundStatement body = (CPPASTCompoundStatement) fnDef.getBody();
 				return body.getExecution();
 			}
 		}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionInstance.java
index 8923845bf61..82478132719 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionInstance.java
@@ -66,9 +66,9 @@ public class CPPFunctionInstance extends CPPFunctionSpecialization implements IC
 	 */
 	@Override
 	public String toString() {
-		return getName() + " " + ASTTypeUtil.getArgumentListString(fArguments, true); //$NON-NLS-1$ 
+		return getName() + " " + ASTTypeUtil.getArgumentListString(fArguments, true); //$NON-NLS-1$
 	}
-	
+
     @Override
 	public boolean equals(Object obj) {
     	if ((obj instanceof ICPPTemplateInstance) && (obj instanceof ICPPFunction)) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionScope.java
index 4ad3580f68f..9c10e74482a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionScope.java
@@ -37,14 +37,14 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
  */
 public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
     private CharArrayObjectMap labels = CharArrayObjectMap.emptyMap();
-    
+
 	/**
 	 * @param physicalNode
 	 */
 	public CPPFunctionScope(IASTFunctionDeclarator physicalNode) {
 		super(physicalNode);
 	}
-	
+
 	@Override
 	public EScopeKind getKind() {
 		return EScopeKind.eLocal;
@@ -73,18 +73,18 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
 	    		bindings.add(labels.get(key));
 	    	}
 	    }
-	    
+
 	    IBinding[] additional = super.find(name);
 	    for (IBinding element : additional) {
 	    	bindings.add(element);
 	    }
-	    
+
 	    return bindings.toArray(new IBinding[bindings.size()]);
 	}
-	
+
 	@Override
 	public IScope getParent() {
-	    // We can't just resolve the function and get its parent scope, since there are cases where that 
+	    // We can't just resolve the function and get its parent scope, since there are cases where that
 	    // could loop because resolving functions requires resolving their parameter types.
 	    IASTFunctionDeclarator fdtor = (IASTFunctionDeclarator) getPhysicalNode();
 	    IASTName name = fdtor.getName().getLastName();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionSpecialization.java
index 2d7f2376518..a42f99951b9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionSpecialization.java
@@ -55,7 +55,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
 		fType= type;
 		fExceptionSpecs= exceptionSpecs;
 	}
-	
+
 	private ICPPFunction getFunction() {
 		return (ICPPFunction) getSpecializedBinding();
 	}
@@ -64,7 +64,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
 		assert fParams == null;
 		fParams = params;
 	}
-	
+
 	@Override
 	public ICPPParameter[] getParameters() {
 		return fParams;
@@ -105,7 +105,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
 		}
 		return getFunction().isInline();
 	}
-	
+
 	@Override
 	public boolean isExternC() {
 		if (CPPVisitor.isExternC(getDefinition())) {
@@ -166,7 +166,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
 		IASTNode def = getDefinition();
 		if (def != null)
 			return CPPFunction.isDeletedDefinition(def);
-		
+
 		IBinding f = getSpecializedBinding();
 		if (f instanceof ICPPFunction) {
 			return ((ICPPFunction) f).isDeleted();
@@ -187,7 +187,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
 		ICPPFunction f = (ICPPFunction) getSpecializedBinding();
 		if (f != null)
 			return f.takesVarArgs();
-		
+
 		ICPPASTFunctionDeclarator dtor = (ICPPASTFunctionDeclarator) getDefinition();
         if (dtor != null) {
             return dtor.takesVarArgs();
@@ -210,7 +210,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
     @Override
 	public IBinding resolveParameter(CPPParameter param) {
 		int pos= param.getParameterPosition();
-		
+
     	final IASTNode[] decls= getDeclarations();
 		int tdeclLen= decls == null ? 0 : decls.length;
     	for (int i= -1; i < tdeclLen; i++) {
@@ -219,14 +219,14 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
     			tdecl= (ICPPASTFunctionDeclarator) getDefinition();
     			if (tdecl == null)
     				continue;
-    		} else if (decls != null){
+    		} else if (decls != null) {
     			tdecl= (ICPPASTFunctionDeclarator) decls[i];
     			if (tdecl == null)
     				break;
     		} else {
     			break;
     		}
-    		
+
     		IASTParameterDeclaration[] params = tdecl.getParameters();
     		if (pos < params.length) {
     			final IASTName oName = getParamName(params[pos]);
@@ -235,7 +235,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
     	}
     	return param;
     }
-    
+
     protected void updateFunctionParameterBindings(ICPPASTFunctionDeclarator fdtor) {
 		IASTParameterDeclaration[] updateParams = fdtor.getParameters();
 
@@ -255,7 +255,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
     		} else {
     			break;
     		}
-    		
+
     		IASTParameterDeclaration[] params = tdecl.getParameters();
     		int end= Math.min(params.length, updateParams.length);
     		for (; k < end; k++) {
@@ -280,7 +280,7 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
 		node= ASTQueries.findTypeRelevantDeclarator((IASTDeclarator) node);
 		if (!(node instanceof ICPPASTFunctionDeclarator))
 			return null;
-		
+
 		return (ICPPASTFunctionDeclarator) node;
 	}
 
@@ -350,9 +350,9 @@ public class CPPFunctionSpecialization extends CPPSpecialization implements ICPP
 		if (!isConstexpr()) {
 			return null;
 		}
-		
+
 		IASTNode def = getDefinition();
-		if(def != null) {
+		if (def != null) {
 			return CPPFunction.computeFunctionBodyExecution(def);
 		}
 		return CPPTemplates.instantiateFunctionBody(this, point);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplate.java
index 3b05db3a478..77d7381e610 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplate.java
@@ -66,7 +66,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
 			super.addDefinition(node);
 		}
 	}
-	
+
 	@Override
 	public void addDeclaration(IASTNode node) {
 		if (!(node instanceof IASTName))
@@ -77,20 +77,20 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
 
 		if (fdecl instanceof ICPPASTFunctionDeclarator)
 			updateFunctionParameterBindings((ICPPASTFunctionDeclarator) fdecl);
-		
+
 		super.addDeclaration(node);
 	}
 
 	private ICPPASTFunctionDeclarator getFirstFunctionDtor() {
 		IASTDeclarator dtor= getDeclaratorByName(getDefinition());
-        if (dtor instanceof ICPPASTFunctionDeclarator) 
+        if (dtor instanceof ICPPASTFunctionDeclarator)
         	return (ICPPASTFunctionDeclarator) dtor;
 
         IASTNode[] decls = getDeclarations();
         if (decls != null) {
         	for (IASTNode decl : decls) {
         		dtor= getDeclaratorByName(decl);
-        		if (dtor instanceof ICPPASTFunctionDeclarator) 
+        		if (dtor instanceof ICPPASTFunctionDeclarator)
         			return (ICPPASTFunctionDeclarator) dtor;
         	}
         }
@@ -101,13 +101,13 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
 	public ICPPParameter[] getParameters() {
 		ICPPASTFunctionDeclarator declarator= null;
 		IASTDeclarator dtor= getDeclaratorByName(getDefinition());
-        if (dtor instanceof ICPPASTFunctionDeclarator) 
+        if (dtor instanceof ICPPASTFunctionDeclarator)
         	declarator = (ICPPASTFunctionDeclarator) dtor;
 
         IASTNode[] decls = getDeclarations();
         if (decls != null) {
     		// In case of multiple function declarations we select the one with the most
-    		// default parameter values. 
+    		// default parameter values.
 			int defaultValuePosition = -1;
         	for (IASTNode decl : decls) {
         		dtor= getDeclaratorByName(decl);
@@ -181,7 +181,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
 			IType t = getNestedType(CPPVisitor.createType((IASTDeclarator) parent), TDEF);
 			if (t instanceof ICPPFunctionType) {
 				type = (ICPPFunctionType) t;
-			} else if (t instanceof ISemanticProblem){
+			} else if (t instanceof ISemanticProblem) {
 				type= new ProblemFunctionType(((ISemanticProblem) t).getID());
 			} else {
 				// This case is unexpected.
@@ -200,7 +200,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
                 IASTNode parent = name.getParent();
 	            while (parent != null && !(parent instanceof IASTDeclaration))
 	                parent = parent.getParent();
-	            
+
 	            IASTDeclSpecifier declSpec = getDeclSpecifier((IASTDeclaration) parent);
 	            if (declSpec != null && declSpec.getStorageClass() == storage) {
 	            	return true;
@@ -218,7 +218,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
 	protected ICPPASTDeclSpecifier getDeclSpecifier(IASTDeclaration decl) {
 		if (decl instanceof IASTSimpleDeclaration) {
 		    return (ICPPASTDeclSpecifier) ((IASTSimpleDeclaration) decl).getDeclSpecifier();
-		} 
+		}
 		if (decl instanceof IASTFunctionDefinition) {
 		    return (ICPPASTDeclSpecifier) ((IASTFunctionDefinition) decl).getDeclSpecifier();
 		}
@@ -228,7 +228,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
     @Override
 	public IBinding resolveParameter(CPPParameter param) {
 		int pos= param.getParameterPosition();
-		
+
     	final IASTNode[] decls= getDeclarations();
 		int tdeclLen= decls == null ? 0 : decls.length;
     	for (int i= -1; i < tdeclLen; i++) {
@@ -237,14 +237,14 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
     			tdecl= getDeclaratorByName(getDefinition());
     			if (tdecl == null)
     				continue;
-    		} else if (decls != null){
+    		} else if (decls != null) {
     			tdecl= getDeclaratorByName(decls[i]);
     			if (tdecl == null)
     				break;
     		} else {
     			break;
     		}
-    		
+
     		if (tdecl instanceof ICPPASTFunctionDeclarator) {
     			IASTParameterDeclaration[] params = ((ICPPASTFunctionDeclarator) tdecl).getParameters();
     			if (pos < params.length) {
@@ -255,7 +255,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
     	}
     	return param;
     }
-    
+
     protected void updateFunctionParameterBindings(ICPPASTFunctionDeclarator fdtor) {
 		IASTParameterDeclaration[] updateParams = fdtor.getParameters();
 
@@ -275,7 +275,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
     		} else {
     			break;
     		}
-    		
+
     		if (tdecl instanceof ICPPASTFunctionDeclarator) {
     			IASTParameterDeclaration[] params = ((ICPPASTFunctionDeclarator) tdecl).getParameters();
     			int end= Math.min(params.length, updateParams.length);
@@ -314,9 +314,9 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
                 IASTNode parent = name.getParent();
 				while (parent != null && !(parent instanceof IASTDeclaration))
 					parent = parent.getParent();
-	            
+
 	            IASTDeclSpecifier declSpec = getDeclSpecifier((IASTDeclaration) parent);
-	            
+
 	            if (declSpec != null && declSpec.isInline())
                     return true;
             }
@@ -394,7 +394,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
 	private IASTDeclarator getDeclaratorByName(IASTNode node) {
 		// Skip qualified names and nested declarators.
     	while (node != null) {
-    		node= node.getParent();	
+    		node= node.getParent();
     		if (node instanceof IASTDeclarator) {
     			return ASTQueries.findTypeRelevantDeclarator((IASTDeclarator) node);
     		}
@@ -406,7 +406,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
 	public boolean isStatic(boolean resolveAll) {
     	return hasStorageClass(IASTDeclSpecifier.sc_static);
     }
-    
+
 	@Override
 	public String toString() {
 		StringBuilder result = new StringBuilder();
@@ -427,7 +427,7 @@ public class CPPFunctionTemplate extends CPPTemplateDefinition
 			if (typeIds.equals(IASTTypeId.EMPTY_TYPEID_ARRAY)) {
 				return IType.EMPTY_TYPE_ARRAY;
 			}
-			
+
 			IType[] types = new IType[typeIds.length];
 			for (int i = 0; i < typeIds.length; ++i) {
 				types[i] = CPPVisitor.createType(typeIds[i]);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplateSpecialization.java
index c1a0be272e5..31f9e799892 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplateSpecialization.java
@@ -32,7 +32,7 @@ import org.eclipse.cdt.core.parser.util.ObjectMap;
 public class CPPFunctionTemplateSpecialization extends CPPFunctionSpecialization
 		implements ICPPFunctionTemplate, ICPPInternalTemplate {
 	private ObjectMap instances;
-	
+
 	public CPPFunctionTemplateSpecialization(ICPPFunction original, IBinding owner,
 			ICPPTemplateParameterMap argumentMap, ICPPFunctionType type, IType[] exceptionSpecs) {
 		super(original, owner, argumentMap, type, exceptionSpecs);
@@ -60,7 +60,7 @@ public class CPPFunctionTemplateSpecialization extends CPPFunctionSpecialization
 		}
 		return null;
 	}
-	
+
 	@Override
 	public synchronized ICPPTemplateInstance[] getAllInstances() {
 		if (instances != null) {
@@ -72,7 +72,7 @@ public class CPPFunctionTemplateSpecialization extends CPPFunctionSpecialization
 		}
 		return ICPPTemplateInstance.EMPTY_TEMPLATE_INSTANCE_ARRAY;
 	}
-	
+
 	@Override
 	public IBinding resolveTemplateParameter(ICPPTemplateParameter param) {
 		return param;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionType.java
index d07729c0e8f..720e012717b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionType.java
@@ -34,7 +34,7 @@ public class CPPFunctionType implements ICPPFunctionType, ISerializableType {
 	private final boolean hasRefQualifier;
 	private final boolean isRValueReference;
     private final boolean takesVarargs;
-    
+
     public CPPFunctionType(IType returnType, IType[] types) {
     	this(returnType, types, false, false, false, false, false);
     }
@@ -68,10 +68,10 @@ public class CPPFunctionType implements ICPPFunctionType, ISerializableType {
 			// Constructors & destructors have null return type.
 			if ((returnType == null) ^ (ft.getReturnType() == null))
 			    return false;
-			
+
 			if (returnType != null && !returnType.isSameType(ft.getReturnType()))
 			    return false;
-			
+
 			if (parameters.length == fps.length) {
 				for (int i = 0; i < parameters.length; i++) {
 			        if (parameters[i] == null || !parameters[i].isSameType(fps[i]))
@@ -82,7 +82,7 @@ public class CPPFunctionType implements ICPPFunctionType, ISerializableType {
 						|| !SemanticUtil.isEmptyParameterList(fps)) {
 					return false;
 				}
-			} 
+			}
             return true;
         }
         return false;
@@ -153,16 +153,16 @@ public class CPPFunctionType implements ICPPFunctionType, ISerializableType {
 		if (isVolatile) firstBytes |= ITypeMarshalBuffer.FLAG3;
 		if (hasRefQualifier) firstBytes |= ITypeMarshalBuffer.FLAG4;
 		if (isRValueReference) firstBytes |= ITypeMarshalBuffer.FLAG5;
-		
+
 		buffer.putShort(firstBytes);
 		buffer.putInt(parameters.length);
-		
+
 		buffer.marshalType(returnType);
 		for (int i = 0; i < parameters.length; i++) {
 			buffer.marshalType(parameters[i]);
 		}
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		int len= buffer.getInt();
 		IType rt= buffer.unmarshalType();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitConstructor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitConstructor.java
index 9cfdd219fb9..2218f6fa1cd 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitConstructor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitConstructor.java
@@ -29,7 +29,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.TypeTraits;
 public class CPPImplicitConstructor extends CPPImplicitMethod implements ICPPConstructor {
 
 	IASTNode fPoint;  // point of instantiation, if applicable
-	
+
 	public CPPImplicitConstructor(ICPPClassScope scope, char[] name, ICPPParameter[] params, IASTNode point) {
 		// Note: the value passed for the 'isConstexpr' parameter of the CPPImplicitMethod constructor
 		// is irrelevant, as CPPImplicitConstructor overrides isConstexpr().
@@ -40,19 +40,19 @@ public class CPPImplicitConstructor extends CPPImplicitMethod implements ICPPCon
 	private static ICPPFunctionType createFunctionType(IParameter[] params) {
 		return CPPVisitor.createImplicitFunctionType(UNSPECIFIED_TYPE, params, false, false);
 	}
-	
-	
+
+
 	/*
 	 *	From $12.1 / 5:
 	 *	The implicitly-defined default constructor performs the set of initializations of the class that would
-	 *	be performed by a user-written default constructor for that class with no ctor-initializer (12.6.2) and 
-	 *	an empty compound-statement. […] If that user-written default constructor would satisfy the requirements 
+	 *	be performed by a user-written default constructor for that class with no ctor-initializer (12.6.2) and
+	 *	an empty compound-statement. […] If that user-written default constructor would satisfy the requirements
 	 *	of a constexpr constructor (7.1.5), the implicitly-defined default constructor is constexpr.
 	 *
 	 * Therefore, an implicitly-defined constructor should be considered constexpr if the class type is a literal type.
 	*/
 	@Override
-	public boolean isConstexpr() {		
+	public boolean isConstexpr() {
 		return TypeTraits.isLiteralClass(getClassOwner(), fPoint);
 	}
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitFunction.java
index 1f7102c7565..037c827724b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitFunction.java
@@ -20,7 +20,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
 /**
  * The CPPImplicitFunction is used to represent implicit functions that exist on the translation
  * unit but are not actually part of the physical AST created by CDT.
- * 
+ *
  * An example is GCC built-in functions.
  */
 public class CPPImplicitFunction extends CPPFunction {
@@ -31,7 +31,7 @@ public class CPPImplicitFunction extends CPPFunction {
 	private final boolean takesVarArgs;
 	private boolean isDeleted;
 	private final char[] name;
-	
+
 	public CPPImplicitFunction(char[] name, IScope scope, ICPPFunctionType type,
 			ICPPParameter[] params, boolean isConstexpr, boolean takesVarArgs) {
         super(null);
@@ -47,7 +47,7 @@ public class CPPImplicitFunction extends CPPFunction {
 	public ICPPParameter[] getParameters() {
         return params;
     }
-    
+
     @Override
 	public ICPPFunctionType getType() {
     	return functionType;
@@ -95,5 +95,5 @@ public class CPPImplicitFunction extends CPPFunction {
 
     public void setDeleted(boolean val) {
     	isDeleted= val;
-    }	
+    }
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java
index 7c5eebe788f..09a5842dc5b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java
@@ -42,12 +42,12 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
  * Binding for implicit methods, base class for implicit constructors.
  */
 public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod {
-    
+
     public CPPImplicitMethod(ICPPClassScope scope, char[] name, ICPPFunctionType type, ICPPParameter[] params,
     		boolean isConstexpr) {
 		super(name, scope, type, params, isConstexpr, false);
 	}
-   
+
 	@Override
 	public int getVisibility() {
 		IASTDeclaration decl= getPrimaryDeclaration();
@@ -55,7 +55,7 @@ public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod
 			// 12.1-5, 12.8-10 Implicit constructors and assignment operators are public.
 			return ICPPASTVisibilityLabel.v_public;
 		}
-		
+
 		IASTNode parent= decl.getParent();
 		while (parent instanceof ICPPASTTemplateDeclaration) {
 			decl= (ICPPASTTemplateDeclaration) parent;
@@ -76,17 +76,17 @@ public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod
 				return vis.getVisibility();
 			} else if (cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class) {
 				return ICPPASTVisibilityLabel.v_private;
-			} 
+			}
 		}
         return ICPPASTVisibilityLabel.v_public;
     }
-	
+
 	@Override
 	public ICPPClassType getClassOwner() {
 		ICPPClassScope scope = (ICPPClassScope) getScope();
 		return scope.getClassType();
 	}
-	
+
 	public IASTDeclaration getPrimaryDeclaration() {
 		// First check if we already know it.
 		if (declarations != null) {
@@ -115,7 +115,7 @@ public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod
 		for (IASTDeclaration member : members) {
 			while (member instanceof ICPPASTTemplateDeclaration)
 				member = ((ICPPASTTemplateDeclaration) member).getDeclaration();
-			
+
 			IASTDeclarator[] ds;
 			if (member instanceof IASTSimpleDeclaration) {
 				ds = ((IASTSimpleDeclaration) member).getDeclarators();
@@ -124,7 +124,7 @@ public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod
 			} else {
 				continue;
 			}
-			
+
 			for (IASTDeclarator dtor : ds) {
 				IASTName name = ASTQueries.findInnermostDeclarator(dtor).getName();
 				if (ASTQueries.findTypeRelevantDeclarator(dtor) instanceof ICPPASTFunctionDeclarator
@@ -181,12 +181,12 @@ public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod
 	public boolean isImplicit() {
 		return getPrimaryDeclaration() == null;
 	}
-	
+
     @Override
 	public boolean isExplicit() {
         return false;
     }
-	
+
 	@Override
 	public boolean isPureVirtual() {
 		return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitTypedef.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitTypedef.java
index 4b7a324e5b7..2acd438323d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitTypedef.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitTypedef.java
@@ -19,21 +19,21 @@ import org.eclipse.cdt.core.dom.ast.ITypedef;
 /**
  * The CPPImplicitTypedef is used to represent implicit typedefs that exist on the translation
  * unit but are not actually part of the physical AST created by CDT.
- * 
+ *
  * An example is the GCC built-in typedef:  typedef char * __builtin_va_list;
  */
 public class CPPImplicitTypedef extends CPPTypedef {
     private IType type;
     private char[] name;
     private IScope scope;
-    
+
     public CPPImplicitTypedef(IType type, char[] name, IScope scope) {
         super(null);
         this.type = type;
         this.name = name;
         this.scope = scope;
     }
-    
+
     @Override
 	public IType getType() {
         return type;
@@ -43,17 +43,17 @@ public class CPPImplicitTypedef extends CPPTypedef {
 	public String getName() {
         return String.valueOf(name);
     }
-    
+
     @Override
 	public char[] getNameCharArray() {
         return name;
     }
-    
+
     @Override
 	public IScope getScope() {
         return scope;
     }
-    
+
     @Override
 	public boolean isSameType(IType t) {
 		if (t == this)
@@ -71,14 +71,14 @@ public class CPPImplicitTypedef extends CPPTypedef {
 			return temp.isSameType(t);
 		return false;
 	}
-    
+
     @Override
-	public Object clone(){
+	public Object clone() {
         IType t = null;
         t = (IType) super.clone();
         return t;
     }
-    
+
     /**
      * returns null
      */
@@ -86,7 +86,7 @@ public class CPPImplicitTypedef extends CPPTypedef {
 	public IASTNode[] getDeclarations() {
         return null;
     }
-    
+
     /**
      * returns null
      */
@@ -94,7 +94,7 @@ public class CPPImplicitTypedef extends CPPTypedef {
 	public IASTNode getDefinition() {
         return null;
     }
-        
+
     /**
      * does nothing
      */
@@ -102,7 +102,7 @@ public class CPPImplicitTypedef extends CPPTypedef {
 	public void addDefinition(IASTNode node) {
         // do nothing
     }
-    
+
     /**
      * does nothing
      */
@@ -110,24 +110,24 @@ public class CPPImplicitTypedef extends CPPTypedef {
 	public void addDeclaration(IASTNode node) {
         // do nothing
     }
-    
+
     @Override
 	public String[] getQualifiedName() {
         String[] temp = new String[1];
         temp[0] = String.valueOf(name);
-        
+
         return temp;
     }
-    
+
 
     @Override
 	public char[][] getQualifiedNameCharArray() {
         char[][] temp = new char[1][];
         temp[0] = name;
-        
+
         return temp;
     }
-    
+
     /**
      * returns true
      */
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLabel.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLabel.java
index dae6519df82..6701a8db44a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLabel.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLabel.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     Andrew Niefer (IBM Corporation) - Initial API and implementation 
+ *     Andrew Niefer (IBM Corporation) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -45,7 +45,7 @@ public class CPPLabel extends PlatformObject implements ILabel, ICPPInternalBind
     	IASTNode statement = name.getParent();
         if (statement instanceof IASTLabelStatement)
             return (IASTLabelStatement) statement;
-        
+
         // TODO find label statement
         return null;
     }
@@ -82,7 +82,7 @@ public class CPPLabel extends PlatformObject implements ILabel, ICPPInternalBind
 	public char[][] getQualifiedNameCharArray() {
         return new char[][] { getNameCharArray() };
     }
-    
+
     @Override
 	public boolean isGloballyQualified() {
         return false;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLambdaExpressionParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLambdaExpressionParameter.java
index 9b7a4462789..e93a39cf085 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLambdaExpressionParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLambdaExpressionParameter.java
@@ -33,11 +33,11 @@ import org.eclipse.core.runtime.PlatformObject;
 public class CPPLambdaExpressionParameter extends PlatformObject implements ICPPParameter {
 	private IType fType;
 	private IASTName fDeclaration;
-	
+
 	public CPPLambdaExpressionParameter(IASTName name) {
 		fDeclaration = name;
 	}
-		
+
     @Override
 	public boolean isParameterPack() {
 		return getType() instanceof ICPPParameterPackType;
@@ -114,7 +114,7 @@ public class CPPLambdaExpressionParameter extends PlatformObject implements ICPP
 	public boolean isRegister() {
         return hasStorageClass(IASTDeclSpecifier.sc_register);
     }
-    
+
     private boolean hasStorageClass(int storage) {
     	IASTNode parent = fDeclaration.getParent();
     	while (parent != null && !(parent instanceof IASTParameterDeclaration))
@@ -136,7 +136,7 @@ public class CPPLambdaExpressionParameter extends PlatformObject implements ICPP
 	public IValue getDefaultValue() {
 		return null;
 	}
-	
+
 	@Override
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
@@ -146,19 +146,19 @@ public class CPPLambdaExpressionParameter extends PlatformObject implements ICPP
 	public boolean isExternC() {
 		return false;
 	}
-	
+
 	@Override
 	public String toString() {
 		String name = getName();
 		return name.length() != 0 ? name : ""; //$NON-NLS-1$
 	}
-	
+
 	@Override
 	public IBinding getOwner() {
 		IASTNode node= fDeclaration;
 		while (node != null && !(node instanceof ICPPASTLambdaExpression))
 			node= node.getParent();
-		
+
 		if (node instanceof ICPPASTLambdaExpression) {
 			IType type= ((ICPPASTLambdaExpression) node).getExpressionType();
 			if (type instanceof IBinding) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java
index 5fe50c0d2d2..6995190a8cd 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java
@@ -94,7 +94,7 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
 		if (decl == null) {
 			IScope scope = getScope();
 			if (scope instanceof ICPPClassScope) {
-				ICPPClassType cls = ((ICPPClassScope)scope).getClassType();
+				ICPPClassType cls = ((ICPPClassScope) scope).getClassType();
 				if (cls != null)
 					return (cls.getKey() == ICPPClassType.k_class) ? ICPPASTVisibilityLabel.v_private : ICPPASTVisibilityLabel.v_public;
 			}
@@ -156,9 +156,9 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
 	protected ICPPASTDeclSpecifier getDeclSpec(IASTDeclaration decl) {
 		ICPPASTDeclSpecifier declSpec = null;
 		if (decl instanceof IASTSimpleDeclaration) {
-			declSpec = (ICPPASTDeclSpecifier) ((IASTSimpleDeclaration)decl).getDeclSpecifier();
+			declSpec = (ICPPASTDeclSpecifier) ((IASTSimpleDeclaration) decl).getDeclSpecifier();
 		} else if (decl instanceof IASTFunctionDefinition) {
-			declSpec = (ICPPASTDeclSpecifier) ((IASTFunctionDefinition)decl).getDeclSpecifier();
+			declSpec = (ICPPASTDeclSpecifier) ((IASTFunctionDefinition) decl).getDeclSpecifier();
 		}
 		return declSpec;
 	}
@@ -171,7 +171,7 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
 		if (decl == null)
 			return false;
 
-        IASTDeclSpecifier declSpec = ((IASTSimpleDeclaration)decl).getDeclSpecifier();
+        IASTDeclSpecifier declSpec = ((IASTSimpleDeclaration) decl).getDeclSpecifier();
         return declSpec.isInline();
     }
 
@@ -209,7 +209,7 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
     @Override
 	public boolean isPureVirtual() {
 		ICPPASTFunctionDeclarator declarator = findFunctionDeclarator();
-    	if(declarator != null){
+    	if (declarator != null) {
     		return declarator.isPureVirtual();
     	}
     	return false;
@@ -218,7 +218,7 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
     @Override
     public boolean isFinal() {
     	ICPPASTFunctionDeclarator declarator = findFunctionDeclarator();
-    	if(declarator != null){
+    	if (declarator != null) {
     		return declarator.isFinal();
     	}
     	return false;
@@ -227,13 +227,13 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
     @Override
     public boolean isOverride() {
     	ICPPASTFunctionDeclarator declarator = findFunctionDeclarator();
-    	if(declarator != null){
+    	if (declarator != null) {
     		return declarator.isOverride();
     	}
     	return false;
     }
 
-    private ICPPASTFunctionDeclarator findFunctionDeclarator(){
+    private ICPPASTFunctionDeclarator findFunctionDeclarator() {
     	if (declarations != null) {
 			for (IASTDeclarator dtor : declarations) {
 				if (dtor == null)
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java
index 8b00d0484c2..c5e32b54d8d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java
@@ -38,7 +38,7 @@ public class CPPMethodInstance extends CPPFunctionInstance implements ICPPMethod
 	public ICPPClassType getClassOwner() {
 		return (ICPPClassType) getOwner();
 	}
-	
+
     @Override
 	public boolean isVirtual() {
         return ((ICPPMethod) getTemplateDefinition()).isVirtual();
@@ -48,7 +48,7 @@ public class CPPMethodInstance extends CPPFunctionInstance implements ICPPMethod
 	public boolean isPureVirtual() {
         return ((ICPPMethod) getTemplateDefinition()).isPureVirtual();
 	}
-	
+
 	@Override
 	public boolean isExplicit() {
 		return ((ICPPMethod) getTemplateDefinition()).isExplicit();
@@ -59,7 +59,7 @@ public class CPPMethodInstance extends CPPFunctionInstance implements ICPPMethod
 		char[] name = getNameCharArray();
 		if (name.length > 1 && name[0] == '~')
 			return true;
-		
+
 		return false;
 	}
 
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java
index b14bc0bfdf0..80ac021215a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Andrew Niefer (IBM) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
- *     Sergey Prigogin (Google) 
+ *     Sergey Prigogin (Google)
  *     Thomas Corbat (IFS)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -48,16 +48,16 @@ public class CPPMethodSpecialization extends CPPFunctionSpecialization implement
 		IASTNode definition = getDefinition();
 		if (definition != null) {
 			IASTNode node = definition.getParent();
-			while(node instanceof IASTDeclarator)
+			while (node instanceof IASTDeclarator)
 				node = node.getParent();
-			
+
 			ICPPASTDeclSpecifier declSpec = null;
 			if (node instanceof IASTSimpleDeclaration) {
 				declSpec = (ICPPASTDeclSpecifier) ((IASTSimpleDeclaration) node).getDeclSpecifier();
 			} else if (node instanceof IASTFunctionDefinition) {
 				declSpec = (ICPPASTDeclSpecifier) ((IASTFunctionDefinition) node).getDeclSpecifier();
 			}
-			
+
 			if (declSpec != null) {
 				return declSpec.isVirtual();
 			}
@@ -77,7 +77,7 @@ public class CPPMethodSpecialization extends CPPFunctionSpecialization implement
 	public ICPPClassType getClassOwner() {
 		return (ICPPClassType) getOwner();
 	}
-	
+
 	@Override
 	public boolean isDestructor() {
 		char[] name = getNameCharArray();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java
index c85219c4ee6..320e70c64f4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java
@@ -66,7 +66,7 @@ public class CPPMethodTemplate extends CPPFunctionTemplate implements ICPPMethod
 			if (decl != null && decl.getParent() instanceof ICPPASTCompositeTypeSpecifier)
 				return decl;
 		}
-		
+
 		final char[] myName = getTemplateName().getLookupKey();
 		IScope scope = getScope();
 		if (scope instanceof ICPPTemplateScope) {
@@ -100,7 +100,7 @@ public class CPPMethodTemplate extends CPPFunctionTemplate implements ICPPMethod
 		}
 		return null;
 	}
-	
+
 	@Override
 	public int getVisibility() {
 		IASTDeclaration decl = getPrimaryDeclaration();
@@ -126,10 +126,10 @@ public class CPPMethodTemplate extends CPPFunctionTemplate implements ICPPMethod
 			return vis.getVisibility();
 		} else if (cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class) {
 			return ICPPASTVisibilityLabel.v_private;
-		} 
+		}
 		return ICPPASTVisibilityLabel.v_public;
 	}
-	
+
 	@Override
 	public ICPPClassType getClassOwner() {
 		IScope scope= getScope();
@@ -185,7 +185,7 @@ public class CPPMethodTemplate extends CPPFunctionTemplate implements ICPPMethod
 		char[] name = getNameCharArray();
 		if (name.length > 1 && name[0] == '~')
 			return true;
-		
+
 		return false;
 	}
 
@@ -193,7 +193,7 @@ public class CPPMethodTemplate extends CPPFunctionTemplate implements ICPPMethod
 	public boolean isImplicit() {
 		return false;
 	}
-	
+
 	@Override
 	public boolean isExplicit() {
 		IASTDeclaration decl = getPrimaryDeclaration();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java
index 0eb4494a6f5..541e3331c2e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java
@@ -115,7 +115,7 @@ public class CPPMethodTemplateSpecialization extends CPPFunctionTemplateSpeciali
 
 	/**
 	 * Overridden to emphasize that {@link #fTemplateParameters} does not participate in the equality
-	 * relationship. 
+	 * relationship.
 	 */
 	@SuppressWarnings("javadoc")
 	@Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java
index 9f7f7d15863..b74c7aa24e2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java
@@ -108,7 +108,7 @@ public class CPPNamespace extends PlatformObject implements ICPPNamespace, ICPPI
 	    @Override
 		public int visit(ICPPASTNamespaceDefinition namespace) {
 	    	ICPPASTNamespaceDefinition orig = namespaceDef, candidate = namespace;
-	    	while(candidate != null) {
+	    	while (candidate != null) {
 	    		if (!CharArrayUtils.equals(orig.getName().getLookupKey(), candidate.getName().getLookupKey()))
 	    			return PROCESS_CONTINUE;
 	    		if (orig.getParent() instanceof ICPPASTNamespaceDefinition) {
@@ -151,7 +151,7 @@ public class CPPNamespace extends PlatformObject implements ICPPNamespace, ICPPI
 
 		@Override
 		public int visit(IASTDeclarator declarator) {
-			while(declarator.getNestedDeclarator() != null)
+			while (declarator.getNestedDeclarator() != null)
 				declarator = declarator.getNestedDeclarator();
 
 			IBinding binding = declarator.getName().resolveBinding();
@@ -164,17 +164,17 @@ public class CPPNamespace extends PlatformObject implements ICPPNamespace, ICPPI
 		@Override
 		public int visit(IASTDeclSpecifier declSpec) {
 			if (declSpec instanceof ICPPASTCompositeTypeSpecifier) {
-				IBinding binding = ((ICPPASTCompositeTypeSpecifier)declSpec).getName().resolveBinding();
+				IBinding binding = ((ICPPASTCompositeTypeSpecifier) declSpec).getName().resolveBinding();
 				if (binding != null && !(binding instanceof IProblemBinding))
 					members.put(binding);
 				return PROCESS_SKIP;
 			} else if (declSpec instanceof ICPPASTElaboratedTypeSpecifier) {
 				IASTNode parent = declSpec.getParent();
 				if (parent instanceof IASTSimpleDeclaration) {
-					if (((IASTSimpleDeclaration)parent).getDeclarators().length > 0)
+					if (((IASTSimpleDeclaration) parent).getDeclarators().length > 0)
 						return PROCESS_SKIP;
 
-					IBinding binding = ((ICPPASTElaboratedTypeSpecifier)declSpec).getName().resolveBinding();
+					IBinding binding = ((ICPPASTElaboratedTypeSpecifier) declSpec).getName().resolveBinding();
 					if (binding != null && !(binding instanceof IProblemBinding))
 						members.put(binding);
 					return PROCESS_SKIP;
@@ -194,12 +194,12 @@ public class CPPNamespace extends PlatformObject implements ICPPNamespace, ICPPI
 		@Override
 		public int visit(IASTDeclaration declaration) {
 			if (declaration instanceof ICPPASTUsingDeclaration) {
-				IBinding binding =((ICPPASTUsingDeclaration)declaration).getName().resolveBinding();
+				IBinding binding =((ICPPASTUsingDeclaration) declaration).getName().resolveBinding();
 				if (binding != null && !(binding instanceof IProblemBinding))
 					members.put(binding);
 				return PROCESS_SKIP;
 			} else if (declaration instanceof IASTFunctionDefinition) {
-				return visit(((IASTFunctionDefinition)declaration).getDeclarator());
+				return visit(((IASTFunctionDefinition) declaration).getDeclarator());
 			}
 			return PROCESS_CONTINUE;
 		}
@@ -276,7 +276,7 @@ public class CPPNamespace extends PlatformObject implements ICPPNamespace, ICPPI
 		    return;
 		}
 
-		if (namespaceDefinitions.length > 0 && ((ASTNode)name).getOffset() < ((ASTNode)namespaceDefinitions[0]).getOffset()) {
+		if (namespaceDefinitions.length > 0 && ((ASTNode) name).getOffset() < ((ASTNode) namespaceDefinitions[0]).getOffset()) {
 			namespaceDefinitions = ArrayUtil.prepend(IASTName.class, namespaceDefinitions, name);
 		} else {
 			namespaceDefinitions = ArrayUtil.append(IASTName.class, namespaceDefinitions, name);
@@ -295,7 +295,7 @@ public class CPPNamespace extends PlatformObject implements ICPPNamespace, ICPPI
 			for (IASTName namespaceDefinition : namespaceDefinitions) {
 				IASTNode parent = namespaceDefinition.getParent();
 				if (parent instanceof ICPPASTNamespaceDefinition) {
-					IASTDeclaration[] decls = ((ICPPASTNamespaceDefinition)parent).getDeclarations();
+					IASTDeclaration[] decls = ((ICPPASTNamespaceDefinition) parent).getDeclarations();
 					for (IASTDeclaration decl : decls) {
 						decl.accept(collector);
 					}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceAlias.java
index 84d3535d840..317fffe93f8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceAlias.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceAlias.java
@@ -103,12 +103,12 @@ public class CPPNamespaceAlias extends PlatformObject implements ICPPNamespaceAl
 	public IBinding[] getMemberBindings() {
 		return namespace.getMemberBindings();
 	}
-	
+
 	@Override
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
 	}
-	
+
 	@Override
 	public IBinding getOwner() {
 		return CPPVisitor.findDeclarationOwner(alias, false);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java
index e53ca360bb9..a82e28c6b34 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Andrew Niefer (IBM Corporation) - initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -59,7 +59,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
 	private ICPPNamespaceScope[] fEnclosingNamespaceSet;
 	private List fInlineNamespaceDefinitions;
 	private ICPPInternalNamespaceScope[] fInlineNamespaces;
-	
+
 	public CPPNamespaceScope(IASTNode physicalNode) {
 		super(physicalNode);
 	}
@@ -68,7 +68,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
 	public EScopeKind getKind() {
 		if (getPhysicalNode() instanceof IASTTranslationUnit)
 			return EScopeKind.eGlobal;
-		
+
 		return EScopeKind.eNamespace;
 	}
 
@@ -78,7 +78,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
 		populateCache();
 		return fUsingDirectives.toArray(new ICPPUsingDirective[fUsingDirectives.size()]);
 	}
-	
+
 	private void initUsingDirectives() {
 		if (fUsingDirectives == null) {
 			fUsingDirectives= new ArrayList<>(1);
@@ -159,7 +159,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
     		return;
     	super.addName(name);
     }
-    
+
 	public boolean canDenoteNamespaceMember(ICPPASTQualifiedName name) {
 		IScope scope= this;
 		ICPPASTNameSpecifier[] segments= name.getQualifier();
@@ -212,7 +212,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
 
 		if (((ICPPASTNamespaceDefinition) node).isInline())
 			return true;
-		
+
 		IASTTranslationUnit tu= node.getTranslationUnit();
 		if (tu != null) {
 			final IIndex index= tu.getIndex();
@@ -244,18 +244,18 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
 		}
 		return fEnclosingNamespaceSet;
 	}
-	
+
 	@Override
 	public ICPPInternalNamespaceScope[] getInlineNamespaces() {
 		if (getKind() == EScopeKind.eLocal)
 			return NO_NAMESPACE_SCOPES;
-		
+
 		if (fInlineNamespaces == null) {
 			fInlineNamespaces= computeInlineNamespaces();
 		}
 		return fInlineNamespaces;
 	}
-	
+
 	ICPPInternalNamespaceScope[] computeInlineNamespaces() {
 		populateCache();
 		Set result= null;
@@ -268,13 +268,13 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
 				}
 			}
 		}
-		
+
 		for (ICPPInternalNamespaceScope inline : getIndexInlineNamespaces()) {
 			if (result == null)
 				result = new HashSet<>();
 			result.add(inline);
 		}
-		
+
 		if (result == null) {
 			return NO_NAMESPACE_SCOPES;
 		}
@@ -283,7 +283,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
 
 	private ICPPInternalNamespaceScope[] getIndexInlineNamespaces() {
 		IASTTranslationUnit tu= getPhysicalNode().getTranslationUnit();
-		if (tu instanceof CPPASTTranslationUnit) { 
+		if (tu instanceof CPPASTTranslationUnit) {
 			CPPASTTranslationUnit ast= (CPPASTTranslationUnit) tu;
 			IIndex index= tu.getIndex();
 			if (index != null) {
@@ -339,7 +339,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPInternalNamespace
 				CCorePlugin.log(e);
 			}
 		}
-		
+
 		Set result= new HashSet<>();
 		result.add(nsScope);
 		addInlineNamespaces(nsScope, result);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNodeFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNodeFactory.java
index a3f5e7b2118..3712859eaee 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNodeFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNodeFactory.java
@@ -217,7 +217,7 @@ public class CPPNodeFactory extends NodeFactory implements ICPPNodeFactory {
 	public ICPPASTAttributeSpecifier newAttributeSpecifier() {
 		return new CPPASTAttributeList();
 	}
-	
+
 	@Override
 	public ICPPASTAttributeList newAttributeList() {
 		return new CPPASTAttributeList();
@@ -576,7 +576,7 @@ public class CPPNodeFactory extends NodeFactory implements ICPPNodeFactory {
 	public ICPPASTNaryTypeIdExpression newNaryTypeIdExpression(Operator operator, ICPPASTTypeId[] operands) {
 		return new CPPASTNaryTypeIdExpression(operator, operands);
 	}
-	
+
 	@Override
 	@Deprecated
 	public ICPPASTNewExpression newNewExpression(IASTExpression placement, IASTExpression initializer, IASTTypeId typeId) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameter.java
index 058c3402476..e3d653c0f69 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameter.java
@@ -58,7 +58,7 @@ public class CPPParameter extends PlatformObject implements ICPPParameter, ICPPI
 		this.fDeclarations = new IASTName[] { name };
 		fPosition= pos;
 	}
-	
+
 	public CPPParameter(IType type, int pos) {
 	    this.fType = type;
 	    fPosition= pos;
@@ -94,7 +94,7 @@ public class CPPParameter extends PlatformObject implements ICPPParameter, ICPPI
 			}
 	    }
 	}
-	
+
 	private boolean isDeclaredBefore(ASTNode n1, ASTNode n2) {
 		if (n1.getLength() == 0)
 			return false;
@@ -109,7 +109,7 @@ public class CPPParameter extends PlatformObject implements ICPPParameter, ICPPI
 	            IASTNode node = fDeclarations[i].getParent();
 	            while (!(node instanceof IASTDeclaration))
 	                node = node.getParent();
-	            
+
 	            if (node instanceof IASTFunctionDefinition)
 	                return fDeclarations[i];
 	        }
@@ -203,7 +203,7 @@ public class CPPParameter extends PlatformObject implements ICPPParameter, ICPPI
 	public boolean isRegister() {
         return hasStorageClass(IASTDeclSpecifier.sc_register);
     }
-    
+
     public boolean hasStorageClass(int storage) {
 		IASTNode[] ns = getDeclarations();
 		if (ns == null)
@@ -235,12 +235,12 @@ public class CPPParameter extends PlatformObject implements ICPPParameter, ICPPI
 		}
 		return null;
 	}
-	
+
 	@Override
 	public boolean hasDefaultValue() {
 		return getInitializer() != null;
 	}
-	
+
 	@Override
 	public IValue getDefaultValue() {
 		IASTInitializer init = getInitializer();
@@ -249,7 +249,7 @@ public class CPPParameter extends PlatformObject implements ICPPParameter, ICPPI
 		}
 		return null;
 	}
-	
+
 	@Override
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
@@ -259,13 +259,13 @@ public class CPPParameter extends PlatformObject implements ICPPParameter, ICPPI
 	public boolean isExternC() {
 		return false;
 	}
-	
+
 	@Override
 	public String toString() {
 		String name = getName();
 		return name.length() != 0 ? name : ""; //$NON-NLS-1$
 	}
-	
+
 	@Override
 	public IBinding getOwner() {
 		IASTFunctionDeclarator decl =
@@ -287,7 +287,7 @@ public class CPPParameter extends PlatformObject implements ICPPParameter, ICPPI
 		IBinding current= name.getPreBinding();
 		if (current != this)
 			return current;
-		
+
 		IASTNode node= getPrimaryDeclaration();
 		while (node != null && !(node instanceof IASTFunctionDeclarator)) {
 			node= node.getParent();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterPackType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterPackType.java
index 582a1107e71..4175034c215 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterPackType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterPackType.java
@@ -23,7 +23,7 @@ import org.eclipse.core.runtime.CoreException;
 
 public class CPPParameterPackType implements ICPPParameterPackType, ITypeContainer, ISerializableType {
     private IType fType;
-    
+
     public CPPParameterPackType(IType type) {
     	setType(type);
     }
@@ -32,7 +32,7 @@ public class CPPParameterPackType implements ICPPParameterPackType, ITypeContain
 	public IType getType() {
         return fType;
     }
-    
+
     @Override
 	public void setType(IType t) {
     	assert t != null;
@@ -45,7 +45,7 @@ public class CPPParameterPackType implements ICPPParameterPackType, ITypeContain
             return true;
         if (obj instanceof ITypedef)
             return ((ITypedef) obj).isSameType(this);
-        
+
         if (obj instanceof ICPPParameterPackType) {
             final ICPPParameterPackType rhs = (ICPPParameterPackType) obj;
             IType t1= getType();
@@ -54,7 +54,7 @@ public class CPPParameterPackType implements ICPPParameterPackType, ITypeContain
         }
     	return false;
     }
-    
+
     @Override
 	public Object clone() {
    		try {
@@ -64,7 +64,7 @@ public class CPPParameterPackType implements ICPPParameterPackType, ITypeContain
         	return null;
         }
     }
-    
+
 	@Override
 	public String toString() {
 		return ASTTypeUtil.getType(this);
@@ -76,12 +76,12 @@ public class CPPParameterPackType implements ICPPParameterPackType, ITypeContain
 		buffer.putShort(firstBytes);
 		buffer.marshalType(getType());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		IType nested= buffer.unmarshalType();
 		if (nested == null)
 			return new ProblemBinding(null, IProblemBinding.SEMANTIC_INVALID_TYPE);
-		
+
 		return new CPPParameterPackType(nested);
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterSpecialization.java
index 2c83fdbf2c7..a12b8a7f632 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterSpecialization.java
@@ -25,7 +25,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap;
 public class CPPParameterSpecialization extends CPPSpecialization implements ICPPParameter {
 	private final IType fType;
 	private final IValue fDefaultValue;
-	
+
 	public CPPParameterSpecialization(ICPPParameter orig, IBinding owner, IType type, IValue defaultValue,
 			ICPPTemplateParameterMap tpmap) {
 		super(orig, owner, tpmap);
@@ -33,7 +33,7 @@ public class CPPParameterSpecialization extends CPPSpecialization implements ICP
 		fDefaultValue = defaultValue;
 	}
 
-	private ICPPParameter getParameter(){
+	private ICPPParameter getParameter() {
 		return (ICPPParameter) getSpecializedBinding();
 	}
 
@@ -44,7 +44,7 @@ public class CPPParameterSpecialization extends CPPSpecialization implements ICP
 	public IType getType() {
 		return fType;
 	}
-	
+
 	@Override
 	public boolean isParameterPack() {
 		return fType instanceof ICPPParameterPackType;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerToMemberType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerToMemberType.java
index 971f981e57c..6047a57b625 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerToMemberType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerToMemberType.java
@@ -52,19 +52,19 @@ public class CPPPointerToMemberType extends CPPPointerType implements ICPPPointe
         if (o instanceof ITypedef)
             return o.isSameType(this);
 
-	    if (!(o instanceof ICPPPointerToMemberType)) 
-	        return false;   
+	    if (!(o instanceof ICPPPointerToMemberType))
+	        return false;
 
 	    if (!super.isSameType(o))
 	        return false;
-	    
+
 	    ICPPPointerToMemberType pt = (ICPPPointerToMemberType) o;
 	    IType cls = pt.getMemberOfClass();
 	    if (cls != null)
 	        return cls.isSameType(getMemberOfClass());
 	    return false;
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType#getMemberOfClass()
 	 */
@@ -83,7 +83,7 @@ public class CPPPointerToMemberType extends CPPPointerType implements ICPPPointe
 					ICPPASTNameSpecifier[] qualifier = qname.getQualifier();
 					if (qualifier.length > 0) {
 						nameSpec = qualifier[qualifier.length - 1];
-					} else { 
+					} else {
 						nameSpec = (ICPPASTName) qname.getLastName();
 					}
 				}
@@ -97,7 +97,7 @@ public class CPPPointerToMemberType extends CPPPointerType implements ICPPPointe
 		}
 		return classType;
 	}
-	
+
 	@Override
 	public void marshal(ITypeMarshalBuffer buffer) throws CoreException {
 		short firstBytes= ITypeMarshalBuffer.POINTER_TO_MEMBER_TYPE;
@@ -108,7 +108,7 @@ public class CPPPointerToMemberType extends CPPPointerType implements ICPPPointe
 		buffer.marshalType(getType());
 		buffer.marshalType(getMemberOfClass());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		IType nested= buffer.unmarshalType();
 		IType memberOf= buffer.unmarshalType();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerType.java
index 4cc71289055..29785e8e3c2 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerType.java
@@ -30,7 +30,7 @@ public class CPPPointerType implements IPointerType, ITypeContainer, ISerializab
 	private boolean isConst;
 	private boolean isVolatile;
 	private boolean isRestrict;
-	
+
 	public CPPPointerType(IType type, boolean isConst, boolean isVolatile, boolean isRestrict) {
 		this.isConst = isConst;
 		this.isVolatile = isVolatile;
@@ -41,7 +41,7 @@ public class CPPPointerType implements IPointerType, ITypeContainer, ISerializab
 	public CPPPointerType(IType type, IASTPointer operator) {
 		this(type, operator.isConst(), operator.isVolatile(), operator.isRestrict());
 	}
-	
+
 	public CPPPointerType(IType type) {
 	    this(type, false, false, false);
 	}
@@ -52,16 +52,16 @@ public class CPPPointerType implements IPointerType, ITypeContainer, ISerializab
             return true;
         if (o instanceof ITypedef)
             return o.isSameType(this);
-        
+
         if (!(o instanceof IPointerType))
         	return false;
-        
-	    if (this instanceof ICPPPointerToMemberType != o instanceof ICPPPointerToMemberType) 
+
+	    if (this instanceof ICPPPointerToMemberType != o instanceof ICPPPointerToMemberType)
 	        return false;
-	    
+
 	    if (type == null)
 	        return false;
-	    
+
 	    IPointerType pt = (IPointerType) o;
 	    if (isConst == pt.isConst() && isVolatile == pt.isVolatile() && isRestrict == pt.isRestrict()) {
 			return type.isSameType(pt.getType());
@@ -73,7 +73,7 @@ public class CPPPointerType implements IPointerType, ITypeContainer, ISerializab
 	public IType getType() {
 		return type;
 	}
-	
+
 	@Override
 	public void setType(IType t) {
 		assert t != null;
@@ -116,7 +116,7 @@ public class CPPPointerType implements IPointerType, ITypeContainer, ISerializab
 		final IType nestedType = getType();
 		buffer.marshalType(nestedType);
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		IType nested= buffer.unmarshalType();
 		return new CPPPointerType(nested, (firstBytes & ITypeMarshalBuffer.FLAG1) != 0,
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPQualifierType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPQualifierType.java
index 3621e84061a..13089e1094a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPQualifierType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPQualifierType.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Andrew Niefer (IBM Corporation) - initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -24,13 +24,13 @@ public class CPPQualifierType implements IQualifierType, ITypeContainer, ISerial
     private final boolean isConst;
     private final boolean isVolatile;
     private IType type;
-    
+
     public CPPQualifierType(IType type, boolean isConst, boolean isVolatile) {
         this.isConst = isConst;
         this.isVolatile = isVolatile;
         setType(type);
     }
-    
+
     @Override
 	public boolean isSameType(IType o) {
 		if (o instanceof ITypedef)
@@ -43,7 +43,7 @@ public class CPPQualifierType implements IQualifierType, ITypeContainer, ISerial
 			return type.isSameType(pt.getType());
 		return false;
 	}
-    
+
     @Override
 	public boolean isConst() {
         return isConst;
@@ -58,13 +58,13 @@ public class CPPQualifierType implements IQualifierType, ITypeContainer, ISerial
 	public IType getType() {
         return type;
     }
-    
+
     @Override
 	public void setType(IType t) {
     	assert t != null;
         type = t;
     }
-    
+
     @Override
 	public Object clone() {
         IType t = null;
@@ -89,7 +89,7 @@ public class CPPQualifierType implements IQualifierType, ITypeContainer, ISerial
 		buffer.putShort(firstBytes);
 		buffer.marshalType(getType());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		IType nested= buffer.unmarshalType();
 		return new CPPQualifierType(nested, (firstBytes & ITypeMarshalBuffer.FLAG1) != 0,
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPReferenceType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPReferenceType.java
index 41c6ef05b84..b2055977c05 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPReferenceType.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPReferenceType.java
@@ -23,7 +23,7 @@ import org.eclipse.core.runtime.CoreException;
 public class CPPReferenceType implements ICPPReferenceType, ITypeContainer, ISerializableType {
     private IType fType = null;
     private boolean fIsRValue;
-    
+
     public CPPReferenceType(IType type, boolean isRValue) {
     	fIsRValue= isRValue;
     	setType(type);
@@ -33,7 +33,7 @@ public class CPPReferenceType implements ICPPReferenceType, ITypeContainer, ISer
 	public IType getType() {
         return fType;
     }
-    
+
 	@Override
 	public boolean isRValueReference() {
 		return fIsRValue;
@@ -45,7 +45,7 @@ public class CPPReferenceType implements ICPPReferenceType, ITypeContainer, ISer
     		final ICPPReferenceType rt = (ICPPReferenceType) t;
 			fIsRValue = fIsRValue && rt.isRValueReference();
     		t= rt.getType();
-    	} 
+    	}
     	assert t != null;
     	fType= t;
     }
@@ -55,15 +55,15 @@ public class CPPReferenceType implements ICPPReferenceType, ITypeContainer, ISer
         if (obj == this)
             return true;
         if (obj instanceof ITypedef)
-            return ((ITypedef)obj).isSameType(this);
-        
+            return ((ITypedef) obj).isSameType(this);
+
         if (obj instanceof ICPPReferenceType) {
             final ICPPReferenceType rhs = (ICPPReferenceType) obj;
             IType t1= getType();
             IType t2= rhs.getType();
             boolean rv1= isRValueReference();
             boolean rv2= rhs.isRValueReference();
-            for(;;) {
+            for (;;) {
             	if (t1 instanceof ITypedef) {
             		t1= ((ITypedef) t1).getType();
             	} else if (t1 instanceof ICPPReferenceType) {
@@ -73,7 +73,7 @@ public class CPPReferenceType implements ICPPReferenceType, ITypeContainer, ISer
             		break;
             	}
             }
-            for(;;) {
+            for (;;) {
             	if (t2 instanceof ITypedef) {
             		t2= ((ITypedef) t2).getType();
             	} else if (t2 instanceof ICPPReferenceType) {
@@ -85,12 +85,12 @@ public class CPPReferenceType implements ICPPReferenceType, ITypeContainer, ISer
             }
             if (t1 == null)
             	return false;
-            
+
 			return rv1 == rv2 && t1.isSameType(t2);
         }
     	return false;
     }
-    
+
     @Override
 	public Object clone() {
         IType t = null;
@@ -101,7 +101,7 @@ public class CPPReferenceType implements ICPPReferenceType, ITypeContainer, ISer
         }
         return t;
     }
-    
+
 	@Override
 	public String toString() {
 		return ASTTypeUtil.getType(this);
@@ -116,7 +116,7 @@ public class CPPReferenceType implements ICPPReferenceType, ITypeContainer, ISer
 		buffer.putShort(firstBytes);
 		buffer.marshalType(getType());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		IType nested= buffer.unmarshalType();
 		return new CPPReferenceType(nested, (firstBytes & ITypeMarshalBuffer.FLAG1) != 0);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java
index b13d607cc08..0a63f033508 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java
@@ -262,7 +262,7 @@ abstract public class CPPScope implements ICPPASTInternalScope {
 	    }
 	    return ArrayUtil.trim(result);
 	}
-	
+
 	private boolean isInsideClassScope(IScope scope) {
 		try {
 			return scope instanceof ICPPClassScope
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java
index bfceb587dc0..b709416210a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import java.util.ArrayList;
@@ -172,7 +172,7 @@ public class CPPScopeMapper {
 		public ICPPNamespaceScope[] getEnclosingNamespaceSet() {
 			if (fEnclosingNamespaceSet == null)
 				return fEnclosingNamespaceSet= CPPNamespaceScope.computeEnclosingNamespaceSet(this);
-			
+
 			return fEnclosingNamespaceSet;
 		}
 
@@ -181,7 +181,7 @@ public class CPPScopeMapper {
 			IIndexBinding binding = ((IIndexScope) fScope).getScopeBinding();
 			if (binding instanceof ICPPNamespace && ((ICPPNamespace) binding).isInline())
 				return true;
-			
+
 			return false;
 		}
 
@@ -240,7 +240,7 @@ public class CPPScopeMapper {
 			return fDirective.toString();
 		}
 	}
-	
+
 	/**
 	 * Collector for class definitions.
 	 */
@@ -272,7 +272,7 @@ public class CPPScopeMapper {
 			return PROCESS_CONTINUE;
 		}
 	}
-	
+
 	private final HashMap fMappedScopes= new HashMap<>();
 	private final HashMap fNamespaceWrappers= new HashMap<>();
 	private final Map> fPerName= new HashMap<>();
@@ -381,9 +381,9 @@ public class CPPScopeMapper {
 		} catch (DOMException e) {
 			assert false;	// index scopes don't throw dom-exceptions
 			return null;
-		}	
+		}
 	}
-	
+
 	private ICPPNamespaceScope getCompositeNamespaceScope(ICPPNamespaceScope scope) throws DOMException {
 		if (scope instanceof IIndexScope) {
 			IIndexBinding binding= fTu.getIndex().adaptBinding(((IIndexScope) scope).getScopeBinding());
@@ -393,7 +393,7 @@ public class CPPScopeMapper {
 		}
 		return scope;
 	}
-	
+
 	public ICPPClassType mapToAST(ICPPClassType type, IASTNode point) {
 		if (type instanceof ICPPTemplateInstance) {
 			ICPPTemplateInstance inst= (ICPPTemplateInstance) type;
@@ -408,7 +408,7 @@ public class CPPScopeMapper {
 			}
 			return type;
 		}
-		
+
 		if (fClasses == null) {
 			fClasses= new CharArrayMap<>();
 			fTu.accept(new Visitor());
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSpecialization.java
index aebd3a213bc..86a9607dd45 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSpecialization.java
@@ -39,7 +39,7 @@ public abstract class CPPSpecialization extends PlatformObject implements ICPPSp
 	private final ICPPTemplateParameterMap argumentMap;
 	protected IASTNode definition;
 	private IASTNode[] declarations;
-	
+
 	public CPPSpecialization(IBinding specialized, IBinding owner, ICPPTemplateParameterMap argumentMap) {
 		this.specialized = specialized;
 		this.owner = owner;
@@ -95,7 +95,7 @@ public abstract class CPPSpecialization extends PlatformObject implements ICPPSp
 	public IBinding getOwner() {
 		return owner;
 	}
-	
+
 	@Override
 	public IScope getScope() throws DOMException {
 		if (owner instanceof ICPPClassType) {
@@ -105,11 +105,11 @@ public abstract class CPPSpecialization extends PlatformObject implements ICPPSp
 		} else if (owner instanceof ICPPFunction) {
 			return ((ICPPFunction) owner).getFunctionScope();
 		}
-		if (definition != null) 
+		if (definition != null)
 			return CPPVisitor.getContainingScope(definition);
-		if (declarations != null && declarations.length > 0) 
+		if (declarations != null && declarations.length > 0)
 			return CPPVisitor.getContainingScope(declarations[0]);
-		
+
 		return specialized.getScope();
 	}
 
@@ -139,7 +139,7 @@ public abstract class CPPSpecialization extends PlatformObject implements ICPPSp
 	public ICPPTemplateParameterMap getTemplateParameterMap() {
 		return argumentMap;
 	}
-	
+
 	@Override
 	public String toString() {
 		StringBuilder result = new StringBuilder(getName());
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateDefinition.java
index 5713eae2a35..a9dc18ad23f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateDefinition.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateDefinition.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    Andrew Niefer (IBM Corporation) - Initial API and implementation 
+ *    Andrew Niefer (IBM Corporation) - Initial API and implementation
  *    Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -59,13 +59,13 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 
 	protected IASTName[] declarations;
 	protected IASTName definition;
-	
+
 	private ICPPTemplateParameter[] templateParameters;
 	private ObjectMap instances;
 
 	private ICPPClassTemplate indexBinding;
 	private boolean checkedIndex;
-	
+
 
 	public CPPTemplateDefinition(IASTName name) {
 		if (name != null) {
@@ -89,7 +89,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 			}
 		}
 	}
-	
+
 	@Override
 	public final void addInstance(ICPPTemplateArgument[] arguments, ICPPTemplateInstance instance) {
 		if (instances == null)
@@ -106,7 +106,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 			if (cand != null)
 				return cand;
 		}
-		
+
 		final ICPPClassTemplate ib = getIndexBinding();
 		if (ib instanceof ICPPInstanceCache) {
 			ICPPTemplateInstance cand= ((ICPPInstanceCache) ib).getInstance(arguments);
@@ -120,7 +120,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 		}
 		return null;
 	}
-	
+
 	protected ICPPClassTemplate getIndexBinding() {
 		if (!checkedIndex) {
 			checkedIndex= true;
@@ -131,7 +131,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 					IIndex index= tu.getIndex();
 					if (index != null) {
 						IIndexBinding ib = index.adaptBinding(this);
-						if (ib instanceof ICPPClassTemplate) 
+						if (ib instanceof ICPPClassTemplate)
 							indexBinding= (ICPPClassTemplate) ib;
 					}
 				}
@@ -151,7 +151,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 		}
 		return ICPPTemplateInstance.EMPTY_TEMPLATE_INSTANCE_ARRAY;
 	}
-	
+
 	public IASTName getTemplateName() {
 		if (definition != null)
 			return definition;
@@ -159,7 +159,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 			return declarations[0];
 		return null;
 	}
-	
+
 	@Override
 	public String getName() {
 		return new String(getNameCharArray());
@@ -208,7 +208,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 		}
 		return templateParameters;
 	}
-	
+
 	@Override
 	public void addDefinition(IASTNode node) {
 	    if (node instanceof ICPPASTCompositeTypeSpecifier) {
@@ -245,12 +245,12 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 				declarations = ArrayUtil.append(IASTName.class, declarations, declName);
 			}
 	    }
-	}	
-	
+	}
+
 	@Override
 	public IBinding resolveTemplateParameter(ICPPTemplateParameter templateParameter) {
 		int pos= templateParameter.getParameterPosition();
-		
+
     	int tdeclLen= declarations == null ? 0 : declarations.length;
     	for (int i= -1; i < tdeclLen; i++) {
     		IASTName tdecl;
@@ -263,7 +263,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
     			if (tdecl == null)
     				break;
     		}
-    		
+
     		ICPPASTTemplateParameter[] params = CPPTemplates.getTemplateDeclaration(tdecl).getTemplateParameters();
     		if (pos < params.length) {
     			final IASTName oName = CPPTemplates.getTemplateParameterName(params[pos]);
@@ -277,7 +277,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
     	final ICPPASTTemplateDeclaration templateDeclaration = CPPTemplates.getTemplateDeclaration(name);
     	if (templateDeclaration == null)
     		return;
-    	
+
 		ICPPASTTemplateParameter[] updateParams = templateDeclaration.getTemplateParameters();
     	int k= 0;
     	int tdeclLen= declarations == null ? 0 : declarations.length;
@@ -292,7 +292,7 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
     			if (tdecl == null)
     				break;
     		}
-    		
+
     		ICPPASTTemplateParameter[] params = CPPTemplates.getTemplateDeclaration(tdecl).getTemplateParameters();
     		int end= Math.min(params.length, updateParams.length);
     		for (; k < end; k++) {
@@ -314,18 +314,18 @@ public abstract class CPPTemplateDefinition extends PlatformObject implements IC
 	public IASTNode getDefinition() {
 		return definition;
 	}
-	
+
 	@Override
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
 	}
-	
+
 	@Override
 	public final IBinding getOwner() {
 		IASTName templateName= getTemplateName();
 		if (templateName == null)
 			return null;
-		
+
 		return CPPVisitor.findNameOwner(templateName, false);
 	}
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeArgument.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeArgument.java
index ff641916a5f..f582e7a7d14 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeArgument.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeArgument.java
@@ -38,7 +38,7 @@ public class CPPTemplateNonTypeArgument implements ICPPTemplateArgument {
 		} else {
 			IValue value = evaluation.getValue(point);
 			if (value == IntegralValue.ERROR) {
-				fEvaluation = EvalFixed.INCOMPLETE; 
+				fEvaluation = EvalFixed.INCOMPLETE;
 			} else {
 				fEvaluation= new EvalFixed(evaluation.getType(point),
 						evaluation.getValueCategory(point), value);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeParameter.java
index 49bec05f420..0af8c35569f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeParameter.java
@@ -36,7 +36,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
 public class CPPTemplateNonTypeParameter extends CPPTemplateParameter
 		implements ICPPTemplateNonTypeParameter {
 	private IType type;
-	
+
 	public CPPTemplateNonTypeParameter(IASTName name) {
 		super(name);
 	}
@@ -47,15 +47,15 @@ public class CPPTemplateNonTypeParameter extends CPPTemplateParameter
 		if (def instanceof IASTExpression) {
 			return (IASTExpression) def;
 		}
-		
+
 		return null;
 	}
-	
+
 	public IASTInitializerClause getDefaultClause() {
 		IASTName[] nds = getDeclarations();
 		if (nds == null || nds.length == 0)
 		    return null;
-		
+
 		for (IASTName name : nds) {
 			if (name != null) {
 				IASTNode parent = name.getParent();
@@ -71,7 +71,7 @@ public class CPPTemplateNonTypeParameter extends CPPTemplateParameter
 		}
 		return null;
 	}
-	
+
 	@Override
 	public ICPPTemplateArgument getDefaultValue() {
 		IASTInitializerClause dc= getDefault();
@@ -90,10 +90,10 @@ public class CPPTemplateNonTypeParameter extends CPPTemplateParameter
 				}
 			}
 		}
-		
+
 		if (d == null)
 			return null;
-		
+
 		IValue val= ValueFactory.create(d);
 		IType t= getType();
 		return new CPPTemplateNonTypeArgument(val, t);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameter.java
index 795611abc9f..22f8e060647 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameter.java
@@ -34,11 +34,11 @@ import org.eclipse.core.runtime.PlatformObject;
 /**
  * Base implementation for template parameter bindings in the AST.
  */
-public abstract class CPPTemplateParameter extends PlatformObject 
+public abstract class CPPTemplateParameter extends PlatformObject
 		implements ICPPTemplateParameter, ICPPInternalBinding, ICPPTwoPhaseBinding {
 	private IASTName[] declarations;
 	private final int fParameterID;
-	
+
 	public CPPTemplateParameter(IASTName name) {
 		declarations = new IASTName[] {name};
 		fParameterID= computeParameterID(name);
@@ -88,7 +88,7 @@ public abstract class CPPTemplateParameter extends PlatformObject
         }
         return t;
     }
-	
+
 	@Override
 	public final String getName() {
 		return new String(getNameCharArray());
@@ -100,7 +100,7 @@ public abstract class CPPTemplateParameter extends PlatformObject
 		for (IASTName decl : declarations) {
 			if (decl == null)
 				break;
-			
+
 			final char[] result= decl.getSimpleID();
 			if (result.length > 0)
 				return result;
@@ -126,7 +126,7 @@ public abstract class CPPTemplateParameter extends PlatformObject
 	public IASTName getPrimaryDeclaration () {
 		return declarations[0];
 	}
-	
+
 	private ICPPASTTemplateParameter getASTTemplateParameter() {
 		IASTNode node= declarations[0];
 		while (node != null && !(node instanceof ICPPASTTemplateParameter))
@@ -183,47 +183,47 @@ public abstract class CPPTemplateParameter extends PlatformObject
 	        if (declarations.length > 0 && declarations[0] == node)
 	            return;
 			// Keep the lowest offset declaration in [0].
-			if (declarations.length > 0 && ((ASTNode)node).getOffset() < ((ASTNode)declarations[0]).getOffset()) {
+			if (declarations.length > 0 && ((ASTNode) node).getOffset() < ((ASTNode) declarations[0]).getOffset()) {
 				declarations = ArrayUtil.prepend(IASTName.class, declarations, name);
 			} else {
 				declarations = ArrayUtil.append(IASTName.class, declarations, name);
 			}
 	    }
 	}
-	
+
 	@Override
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
 	}
-	
+
 	@Override
 	public String toString() {
 		return getName();
-	}	
-	
+	}
+
 	@Override
 	public IBinding getOwner() {
 		if (declarations == null || declarations.length == 0)
 			return null;
-		
+
 		IASTNode node= declarations[0];
 		while (!(node instanceof ICPPASTTemplateParameter)) {
 			if (node == null)
 				return null;
-			
+
 			node= node.getParent();
 		}
-		
+
 		return CPPTemplates.getContainingTemplate((ICPPASTTemplateParameter) node);
 	}
-	
+
 	@Override
 	public IBinding resolveFinalBinding(CPPASTNameBase name) {
 		// Check if the binding has been updated.
 		IBinding current= name.getPreBinding();
 		if (current != this)
 			return current;
-		
+
 		ICPPTemplateDefinition template= CPPTemplates.getContainingTemplate(getASTTemplateParameter());
 		if (template instanceof ICPPTemplateParameterOwner) {
 			return ((ICPPTemplateParameterOwner) template).resolveTemplateParameter(this);
@@ -233,10 +233,10 @@ public abstract class CPPTemplateParameter extends PlatformObject
 		if (template == null) {
 			return this;
 		}
-		
+
 		ICPPTemplateParameter[] params = template.getTemplateParameters();
 		final int pos= getParameterPosition();
-		if (pos < params.length) 
+		if (pos < params.length)
 			return params[pos];
 		return new ProblemBinding(getPrimaryDeclaration(), IProblemBinding.SEMANTIC_DEFINITION_NOT_FOUND);
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameterMap.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameterMap.java
index 708820b5fbf..5d4ffa7bae3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameterMap.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameterMap.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
@@ -21,7 +21,7 @@ import org.eclipse.cdt.core.parser.util.ObjectMap;
  */
 public class CPPTemplateParameterMap implements ICPPTemplateParameterMap {
 	public static final CPPTemplateParameterMap EMPTY = new CPPTemplateParameterMap(0);
-	
+
 	private final ObjectMap fMap;
 
 	/**
@@ -48,7 +48,7 @@ public class CPPTemplateParameterMap implements ICPPTemplateParameterMap {
 	public void put(ICPPTemplateParameter param, ICPPTemplateArgument value) {
 		fMap.put(param.getParameterID(), value);
 	}
-	
+
 	/**
 	 * Adds the mapping.
 	 */
@@ -62,7 +62,7 @@ public class CPPTemplateParameterMap implements ICPPTemplateParameterMap {
 	public void put(ICPPTemplateParameter param, ICPPTemplateArgument[] packExpansion) {
 		fMap.put(param.getParameterID(), packExpansion);
 	}
-	
+
 	/**
 	 * Adds the mapping.
 	 */
@@ -142,7 +142,7 @@ public class CPPTemplateParameterMap implements ICPPTemplateParameterMap {
 		final Object object = fMap.get(paramID);
 		if (object instanceof ICPPTemplateArgument[]) {
 			args = (ICPPTemplateArgument[]) object;
-			if (packSize != args.length) 
+			if (packSize != args.length)
 				return false;
 		} else if (object == null) {
 			args= new ICPPTemplateArgument[packSize];
@@ -206,7 +206,7 @@ public class CPPTemplateParameterMap implements ICPPTemplateParameterMap {
 	public Integer[] getAllParameterPositions() {
 		return fMap.keyArray(Integer.class);
 	}
-	
+
 	/**
 	 * For debugging purposes, only.
 	 */
@@ -219,7 +219,7 @@ public class CPPTemplateParameterMap implements ICPPTemplateParameterMap {
 				if (sb.length() > 1) {
 					sb.append(", "); //$NON-NLS-1$
 				}
-				
+
 				final Object obj = fMap.getAt(i);
 				if (obj instanceof ICPPTemplateArgument) {
 					appendArg(sb, key, (ICPPTemplateArgument) obj);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateScope.java
index 10ce0ed8c42..7b9ea264ce5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateScope.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     Andrew Niefer (IBM Corporation) - Initial API and implementation 
+ *     Andrew Niefer (IBM Corporation) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java
index 5550a7751c2..e84aeb81be3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java
@@ -72,7 +72,7 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter
 	    }
 	    return unknownScope;
 	}
-	
+
 	@Override
 	public ICPPTemplateParameter[] getTemplateParameters() {
 		if (templateParameters == null) {
@@ -119,13 +119,13 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter
 		}
 		return null;
 	}
-	
+
 	@Override
 	public ICPPTemplateArgument getDefaultValue() {
 		IType d= getDefault();
 		if (d == null)
 			return null;
-		
+
 		return new CPPTemplateTypeArgument(d);
 	}
 
@@ -233,12 +233,12 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter
 		}
 		return ICPPTemplateInstance.EMPTY_TEMPLATE_INSTANCE_ARRAY;
 	}
-	
+
 	@Override
 	public boolean isAnonymous() {
 		return false;
 	}
-	
+
 	@Override
 	public ICPPDeferredClassInstance asDeferredInstance() {
 		return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameterScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameterScope.java
index 7e2b99000e8..56823840f28 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameterScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameterScope.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.IName;
@@ -27,7 +27,7 @@ public class CPPTemplateTemplateParameterScope extends CPPScope {
 	public EScopeKind getKind() {
 		return EScopeKind.eLocal;
 	}
-	
+
 	@Override
 	public IName getScopeName() {
 		return ((ICPPASTTemplatedTypeTemplateParameter) getPhysicalNode()).getName();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java
index 5c1b34d00de..719085f8140 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java
@@ -71,13 +71,13 @@ public class CPPTemplateTypeParameter extends CPPTemplateParameter implements
 		}
 		return null;
 	}
-	
+
 	@Override
 	public ICPPTemplateArgument getDefaultValue() {
 		IType t= getDefault();
 		if (t == null)
 			return null;
-		
+
 		return new CPPTemplateTypeArgument(t);
 	}
 
@@ -89,7 +89,7 @@ public class CPPTemplateTypeParameter extends CPPTemplateParameter implements
             return type.isSameType(this);
         if (!(type instanceof ICPPTemplateTypeParameter))
         	return false;
-        
+
         return getParameterID() == ((ICPPTemplateParameter) type).getParameterID();
     }
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedef.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedef.java
index ce75ee58b8f..06b53fe873f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedef.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedef.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     Andrew Niefer (IBM Corporation) - Initial API and implementation 
+ *     Andrew Niefer (IBM Corporation) - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedefSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedefSpecialization.java
index 4c3076c4c05..bba5ddd8066 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedefSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedefSpecialization.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Andrew Niefer (IBM Corporation) - initial API and implementation
  *     Markus Schorn (Wind River Systems)
@@ -59,7 +59,7 @@ public class CPPTypedefSpecialization extends CPPSpecialization implements IType
 			    return t.isSameType(((ITypedef) o).getType());
 			return false;
 	    }
-	        
+
         IType t = getType();
 		if (t != null)
 		    return t.isSameType(o);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnaryTypeTransformation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnaryTypeTransformation.java
index afef2ca550e..9c9a9ebdb4b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnaryTypeTransformation.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnaryTypeTransformation.java
@@ -23,12 +23,12 @@ import org.eclipse.core.runtime.CoreException;
 public class CPPUnaryTypeTransformation implements ICPPUnaryTypeTransformation, ISerializableType {
 	Operator fOperator;
 	IType fOperand;
-	
+
 	public CPPUnaryTypeTransformation(Operator operator, IType operand) {
 		fOperator = operator;
 		fOperand = operand;
 	}
-	
+
 	@Override
 	public boolean isSameType(IType other) {
 		if (this == other)
@@ -49,7 +49,7 @@ public class CPPUnaryTypeTransformation implements ICPPUnaryTypeTransformation,
 	public IType getOperand() {
 		return fOperand;
 	}
-	
+
     @Override
 	public CPPUnaryTypeTransformation clone() {
     	return new CPPUnaryTypeTransformation(fOperator, (IType) fOperand.clone());
@@ -61,7 +61,7 @@ public class CPPUnaryTypeTransformation implements ICPPUnaryTypeTransformation,
 		buffer.putByte((byte) getOperator().ordinal());
 		buffer.marshalType(getOperand());
 	}
-	
+
 	public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		int operator = buffer.getByte();
 		if (operator >= Operator.values().length) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java
index cb65690c739..8e47a8230cf 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java
@@ -113,7 +113,7 @@ public abstract class CPPUnknownBinding extends PlatformObject
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
 	}
-	
+
 	@Override
 	public CPPUnknownBinding clone() {
 		try {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClassInstance.java
index 1e3976523ce..9fe7c9c4b1d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClassInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClassInstance.java
@@ -41,19 +41,19 @@ public class CPPUnknownClassInstance extends CPPUnknownMemberClass implements IC
 
 	@Override
 	public String toString() {
-		return getName() + " " + ASTTypeUtil.getArgumentListString(arguments, true); //$NON-NLS-1$ 
+		return getName() + " " + ASTTypeUtil.getArgumentListString(arguments, true); //$NON-NLS-1$
 	}
-	
+
 	@Override
 	public boolean isSameType(IType type) {
-		if (this == type) 
+		if (this == type)
 			return true;
-		
+
 		if (type instanceof ITypedef) {
 			return type.isSameType(this);
 		}
-		
-		if (type instanceof ICPPUnknownMemberClassInstance) { 
+
+		if (type instanceof ICPPUnknownMemberClassInstance) {
 			ICPPUnknownMemberClassInstance rhs= (ICPPUnknownMemberClassInstance) type;
 			if (CharArrayUtils.equals(getNameCharArray(), rhs.getNameCharArray())) {
 				ICPPTemplateArgument[] lhsArgs= getArguments();
@@ -61,12 +61,12 @@ public class CPPUnknownClassInstance extends CPPUnknownMemberClass implements IC
 				if (lhsArgs != rhsArgs) {
 					if (lhsArgs == null || rhsArgs == null)
 						return false;
-				
+
 					if (lhsArgs.length != rhsArgs.length)
 						return false;
-				
+
 					for (int i= 0; i < lhsArgs.length; i++) {
-						if (!lhsArgs[i].isSameValue(rhsArgs[i])) 
+						if (!lhsArgs[i].isSameValue(rhsArgs[i]))
 							return false;
 					}
 				}
@@ -79,7 +79,7 @@ public class CPPUnknownClassInstance extends CPPUnknownMemberClass implements IC
 		}
 		return false;
 	}
-	
+
 	@Override
 	public void marshal(ITypeMarshalBuffer buffer) throws CoreException {
 		short firstBytes= ITypeMarshalBuffer.UNKNOWN_MEMBER_CLASS_INSTANCE;
@@ -91,7 +91,7 @@ public class CPPUnknownClassInstance extends CPPUnknownMemberClass implements IC
 			buffer.marshalTemplateArgument(arg);
 		}
 	}
-	
+
 	public static ICPPUnknownMemberClassInstance unmarshal(IIndexFragment fragment, short firstBytes, ITypeMarshalBuffer buffer) throws CoreException {
 		IType owner= buffer.unmarshalType();
 		char[] name = buffer.getCharArray();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownField.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownField.java
index cfbc3bf4225..18b39ef0cc6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownField.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownField.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.ICompositeType;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMember.java
index 06021f7a37b..cb47bdc96ab 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMember.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMember.java
@@ -46,12 +46,12 @@ public class CPPUnknownMember extends CPPUnknownBinding	implements ICPPUnknownMe
 			return (IBinding) fOwner;
 		return null;
 	}
-	
+
 	@Override
 	public IType getOwnerType() {
 		return fOwner;
 	}
-	
+
 	@Override
 	public void marshal(ITypeMarshalBuffer buffer) throws CoreException {
 		short firstBytes= ITypeMarshalBuffer.UNKNOWN_MEMBER;
@@ -60,7 +60,7 @@ public class CPPUnknownMember extends CPPUnknownBinding	implements ICPPUnknownMe
 		} else if (this instanceof ICPPMethod) {
 			firstBytes |= ITypeMarshalBuffer.FLAG2;
 		}
-		
+
 		buffer.putShort(firstBytes);
 		buffer.marshalType(getOwnerType());
 		buffer.putCharArray(getNameCharArray());
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMemberClass.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMemberClass.java
index 6e79276d771..2b29295e8e9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMemberClass.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMemberClass.java
@@ -80,7 +80,7 @@ public class CPPUnknownMemberClass extends CPPUnknownMember implements ICPPUnkno
     }
 
     @Override
-	public int getKey(){
+	public int getKey() {
         return 0;
     }
 
@@ -91,12 +91,12 @@ public class CPPUnknownMemberClass extends CPPUnknownMember implements ICPPUnkno
 
     @Override
 	public boolean isSameType(IType type) {
-    	if (this == type) 
+    	if (this == type)
     		return true;
-    	
-		if (type instanceof ITypedef) 
+
+		if (type instanceof ITypedef)
 			return type.isSameType(this);
-		
+
 		if (type instanceof ICPPUnknownMemberClass && !(type instanceof ICPPUnknownMemberClassInstance)) {
 			ICPPUnknownMemberClass rhs= (ICPPUnknownMemberClass) type;
 			if (CharArrayUtils.equals(getNameCharArray(), rhs.getNameCharArray())) {
@@ -114,12 +114,12 @@ public class CPPUnknownMemberClass extends CPPUnknownMember implements ICPPUnkno
 	public ICPPClassType[] getNestedClasses() {
 		return ICPPClassType.EMPTY_CLASS_ARRAY;
 	}
-	
+
 	@Override
 	public boolean isAnonymous() {
 		return false;
 	}
-	
+
 	@Override
 	public String toString() {
 		return ASTTypeUtil.getType(this);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMethod.java
index d302fb0f595..897c00935b4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMethod.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMethod.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.IScope;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownTypeScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownTypeScope.java
index 95983955fb0..c9696f4f204 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownTypeScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownTypeScope.java
@@ -42,7 +42,7 @@ public class CPPUnknownTypeScope implements ICPPInternalUnknownScope {
     private final IASTName fName;
 	private final IType fScopeType;
     /**
-     * This field needs to be protected when used in PDOMCPPUnknownScope, 
+     * This field needs to be protected when used in PDOMCPPUnknownScope,
      * don't use it outside of {@link #getOrCreateBinding(IASTName, int)}
      */
     private CharArrayObjectMap map;
@@ -71,7 +71,7 @@ public class CPPUnknownTypeScope implements ICPPInternalUnknownScope {
 	public IType getScopeType() {
     	return fScopeType;
     }
-    
+
     @Override
 	public IScope getParent() throws DOMException {
     	if (fScopeType instanceof IBinding)
@@ -128,13 +128,13 @@ public class CPPUnknownTypeScope implements ICPPInternalUnknownScope {
     				type= ud.isTypename();
     				function= true;
     			}
-    			
+
     			if (!type && parent.getPropertyInParent() == IASTFunctionCallExpression.FUNCTION_NAME) {
     				function= true;
     			}
     		}
     	}
-    	
+
     	int idx= type ? 0 : function ? 1 : 2;
 
     	IBinding result = getOrCreateBinding(name.getSimpleID(), idx);
@@ -156,7 +156,7 @@ public class CPPUnknownTypeScope implements ICPPInternalUnknownScope {
     	if (lookup.isPrefixLookup()) {
 			// If name lookup is performed for the purpose of code completion in a dependent context,
 			// try to give some useful results heuristically.
-			IScope scope = HeuristicResolver.findConcreteScopeForType(fScopeType, 
+			IScope scope = HeuristicResolver.findConcreteScopeForType(fScopeType,
 					lookup.getLookupPoint());
 			if (scope != null) {
 				return scope.getBindings(lookup);
@@ -166,7 +166,7 @@ public class CPPUnknownTypeScope implements ICPPInternalUnknownScope {
     	IASTName lookupName= lookup.getLookupName();
     	if (lookupName != null)
     		return new IBinding[] { getBinding(lookupName, lookup.isResolve(), lookup.getIncludedFiles()) };
-    	
+
     	// When dealing with dependent expressions we always create an unknown class. That is because
     	// unknown objects are not used within the expressions, they are attached to names only.
     	return new IBinding[] { getOrCreateBinding(lookup.getLookupKey(), 0) };
@@ -176,7 +176,7 @@ public class CPPUnknownTypeScope implements ICPPInternalUnknownScope {
 	public String toString() {
 		return fName.toString();
 	}
-	
+
     @Override
 	public void addName(IASTName name) {
     }
@@ -190,7 +190,7 @@ public class CPPUnknownTypeScope implements ICPPInternalUnknownScope {
 			o = new IBinding[3];
 			map.put(name, o);
 		}
-        
+
         IBinding result= o[idx];
         if (result == null) {
     		switch (idx) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclaration.java
index f9abba6cab3..a5ee180b19d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclaration.java
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    Andrew Niefer (IBM Corporation) - Initial API and implementation 
+ *    Andrew Niefer (IBM Corporation) - Initial API and implementation
  *    Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -28,7 +28,7 @@ import org.eclipse.core.runtime.PlatformObject;
 public class CPPUsingDeclaration extends PlatformObject implements ICPPUsingDeclaration, ICPPInternalBinding {
     private IASTName name;
     private IBinding[] delegates;
-    
+
     public CPPUsingDeclaration(IASTName name, IBinding[] bindings) {
     	if (name instanceof ICPPASTQualifiedName) {
     		name = name.getLastName();
@@ -36,7 +36,7 @@ public class CPPUsingDeclaration extends PlatformObject implements ICPPUsingDecl
         this.name = name;
         this.delegates= bindings;
     }
-        
+
     @Override
 	public IBinding[] getDelegates() {
         return delegates;
@@ -56,7 +56,7 @@ public class CPPUsingDeclaration extends PlatformObject implements ICPPUsingDecl
 	public boolean isGloballyQualified() throws DOMException {
         IScope scope = getScope();
         while (scope != null) {
-            if(scope instanceof ICPPBlockScope)
+            if (scope instanceof ICPPBlockScope)
                 return false;
             scope = scope.getParent();
         }
@@ -88,7 +88,7 @@ public class CPPUsingDeclaration extends PlatformObject implements ICPPUsingDecl
         IASTNode n = name.getParent();
         if (n instanceof ICPPASTTemplateId)
             n = n.getParent();
-            
+
         return n;
     }
 
@@ -104,7 +104,7 @@ public class CPPUsingDeclaration extends PlatformObject implements ICPPUsingDecl
 	public ILinkage getLinkage() {
 		return Linkage.CPP_LINKAGE;
 	}
-	
+
 	@Override
 	public IBinding getOwner() {
 		return CPPVisitor.findDeclarationOwner(name, true);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclarationSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclarationSpecialization.java
index f97c252b944..aeafdd17137 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclarationSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclarationSpecialization.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     Markus Schorn (Wind River Systems)
  *******************************************************************************/
@@ -20,7 +20,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDeclaration;
 public class CPPUsingDeclarationSpecialization extends CPPSpecialization implements ICPPUsingDeclaration {
 	private final IBinding[] fDelegates;
 
-    public CPPUsingDeclarationSpecialization(ICPPUsingDeclaration specialized, IBinding owner, 
+    public CPPUsingDeclarationSpecialization(ICPPUsingDeclaration specialized, IBinding owner,
     		ICPPTemplateParameterMap tpmap, IBinding[] delegates) {
         super(specialized, owner, tpmap);
         fDelegates= delegates;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDirective.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDirective.java
index 99ba210be03..8938f3e0411 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDirective.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDirective.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.DOMException;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java
index 02c73b50f1f..707d3d9bb04 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java
@@ -68,7 +68,7 @@ public class CPPVariable extends PlatformObject implements ICPPInternalVariable
 			return new HashSet<>();
 		}
 	};
-	
+
 	public CPPVariable(IASTName name) {
 	    boolean isDef = name != null && name.isDefinition();
 	    if (name instanceof ICPPASTQualifiedName) {
@@ -238,9 +238,9 @@ public class CPPVariable extends PlatformObject implements ICPPInternalVariable
 		try {
 			IValue initialValue = null;
 			final IType nestedType = SemanticUtil.getNestedType(getType(), TDEF | REF | CVTYPE);
-			if(nestedType instanceof ICPPClassType || (initialValue = VariableHelpers.getInitialValue(fDefinition, fDeclarations, getType())) == IntegralValue.UNKNOWN) {
+			if (nestedType instanceof ICPPClassType || (initialValue = VariableHelpers.getInitialValue(fDefinition, fDeclarations, getType())) == IntegralValue.UNKNOWN) {
 				ICPPEvaluation initEval = getInitializerEvaluation();
-				if(initEval == null) {
+				if (initEval == null) {
 					return null;
 				}
 				return IntegralValue.create(initEval);
@@ -250,12 +250,12 @@ public class CPPVariable extends PlatformObject implements ICPPInternalVariable
 			recursionProtectionSet.remove(this);
 		}
 	}
-	
+
 	private IASTDeclarator findDeclarator() {
 		IASTDeclarator declarator = null;
 		if (fDefinition != null) {
 			declarator = VariableHelpers.findDeclarator(fDefinition);
-			if(declarator != null) {
+			if (declarator != null) {
 				return declarator;
 			}
 		}
@@ -264,7 +264,7 @@ public class CPPVariable extends PlatformObject implements ICPPInternalVariable
 				if (decl == null)
 					break;
 				declarator = VariableHelpers.findDeclarator(decl);
-				if(declarator != null) {
+				if (declarator != null) {
 					return declarator;
 				}
 			}
@@ -279,39 +279,39 @@ public class CPPVariable extends PlatformObject implements ICPPInternalVariable
 
 	/**
 	 * Return an evaluation representing the variable's initialization.
-	 * 
+	 *
 	 * If the variable has no initializer, null is returned.
 	 */
 	public ICPPEvaluation getInitializerEvaluation() {
-		ICPPASTDeclarator declarator = (ICPPASTDeclarator)findDeclarator();
-		if(declarator != null) {
+		ICPPASTDeclarator declarator = (ICPPASTDeclarator) findDeclarator();
+		if (declarator != null) {
 			IASTInitializer initializer = declarator.getInitializer();
 			ICPPConstructor constructor = getImplicitlyCalledCtor(declarator);
-			if(constructor != null) {
+			if (constructor != null) {
 				ICPPEvaluation[] arguments = EvalConstructor.extractArguments(initializer, constructor);
 				return new EvalConstructor(getType(), constructor, arguments, declarator);
-			} else if(initializer instanceof IASTEqualsInitializer) {
-				IASTEqualsInitializer equalsInitializer = (IASTEqualsInitializer)initializer;
-				ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner)equalsInitializer.getInitializerClause();
+			} else if (initializer instanceof IASTEqualsInitializer) {
+				IASTEqualsInitializer equalsInitializer = (IASTEqualsInitializer) initializer;
+				ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) equalsInitializer.getInitializerClause();
 				return evalOwner.getEvaluation();
-			} else if(initializer instanceof ICPPASTInitializerList) {
-				ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner)initializer;
+			} else if (initializer instanceof ICPPASTInitializerList) {
+				ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) initializer;
 				return evalOwner.getEvaluation();
-			} else if(initializer instanceof ICPPASTConstructorInitializer) {
-				ICPPASTConstructorInitializer ctorInitializer = (ICPPASTConstructorInitializer)initializer;
-				ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner)ctorInitializer.getArguments()[0];
+			} else if (initializer instanceof ICPPASTConstructorInitializer) {
+				ICPPASTConstructorInitializer ctorInitializer = (ICPPASTConstructorInitializer) initializer;
+				ICPPEvaluationOwner evalOwner = (ICPPEvaluationOwner) ctorInitializer.getArguments()[0];
 				return evalOwner.getEvaluation();
-			} else if(initializer == null) {
+			} else if (initializer == null) {
 				return null;
-			}	
+			}
 		}
 		return EvalFixed.INCOMPLETE;
 	}
 
 	private static ICPPConstructor getImplicitlyCalledCtor(ICPPASTDeclarator declarator) {
 		IBinding ctor = CPPSemantics.findImplicitlyCalledConstructor(declarator);
-		if(ctor != null && !EvalUtil.isCompilerGeneratedCtor(ctor)) {
-			return (ICPPConstructor)ctor;
+		if (ctor != null && !EvalUtil.isCompilerGeneratedCtor(ctor)) {
+			return (ICPPConstructor) ctor;
 		}
 		return null;
 	}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableSpecialization.java
index 3b7cb86b4db..199f866756c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableSpecialization.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik 
+* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik
 * Rapperswil, University of applied sciences and others
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
@@ -17,17 +17,17 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
 public class CPPVariableSpecialization extends CPPSpecialization implements ICPPVariable {
 	private final IType type;
 	private final IValue value;
-	
+
 	public CPPVariableSpecialization(IBinding orig, IBinding owner, ICPPTemplateParameterMap tpmap, IType type, IValue value) {
 		super(orig, owner, tpmap);
 		this.type = type;
 		this.value = value;
 	}
-	
+
 	private ICPPVariable getVariable() {
-		return (ICPPVariable)getSpecializedBinding();
+		return (ICPPVariable) getSpecializedBinding();
 	}
-	
+
 	@Override
 	public IType getType() {
 		return type;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableTemplate.java
index a19c86becb2..b566bf36662 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableTemplate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2015, 2016 Institute for Software, HSR Hochschule fuer Technik 
+ * Copyright (c) 2015, 2016 Institute for Software, HSR Hochschule fuer Technik
  * Rapperswil, University of applied sciences.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -56,7 +56,7 @@ public class CPPVariableTemplate extends CPPTemplateDefinition
 
 	@Override
 	public IValue getInitialValue() {
-		return VariableHelpers.getInitialValue((IASTName)getDefinition(), (IASTName[]) getDeclarations(), getType());
+		return VariableHelpers.getInitialValue((IASTName) getDefinition(), (IASTName[]) getDeclarations(), getType());
 	}
 
 	@Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java
index 95f1d870c83..e833378395d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java
@@ -312,10 +312,10 @@ public class ClassTypeHelper {
 			}
 		}
 	}
-	
+
 	/**
 	 * Returns all (direct or indirect) virtual base classes of {@code classType}.
-	 * 
+	 *
 	 * @param point the point of instantiation for name lookups
 	 */
 	public static ICPPClassType[] getVirtualBases(ICPPClassType classType, IASTNode point) {
@@ -341,7 +341,7 @@ public class ClassTypeHelper {
 						getVirtualBases(baseClass, virtualBases, nonvirtualBases, point);
 					}
 				} else {
-					// A non-virtual base could have virtual bases in its hierarchy. 
+					// A non-virtual base could have virtual bases in its hierarchy.
 					if (nonvirtualBases.add(baseClass)) {
 						getVirtualBases(baseClass, virtualBases, nonvirtualBases, point);
 					}
@@ -349,7 +349,7 @@ public class ClassTypeHelper {
 			}
 		}
 	}
-	
+
 	/**
 	 * Checks inheritance relationship between two classes.
 	 *
@@ -406,7 +406,7 @@ public class ClassTypeHelper {
 	public static ICPPMethod[] getImplicitMethods(ICPPClassType classType, IASTNode point) {
 		return getImplicitMethods(classType.getCompositeScope(), point);
 	}
-	
+
 	public static ICPPMethod[] getImplicitMethods(IScope scope, IASTNode point) {
 		if (scope instanceof ICPPClassSpecializationScope) {
 			return ((ICPPClassSpecializationScope) scope).getImplicitMethods(point);
@@ -741,7 +741,7 @@ public class ClassTypeHelper {
 		for (ICPPBase base : bases) {
 			IBinding b= base.getBaseClass();
 			if (b instanceof ICPPClassType) {
-				findOverridden((ICPPClassType) b, point, mname, methodType, virtualInClass, 
+				findOverridden((ICPPClassType) b, point, mname, methodType, virtualInClass,
 						result, CPPSemantics.MAX_INHERITANCE_DEPTH);
 			}
 		}
@@ -764,7 +764,7 @@ public class ClassTypeHelper {
 		// Prevent recursion due to a hierarchy of unbounded depth, e.g. A deriving from A.
 		if (maxdepth <= 0)
 			return false;
-		
+
 		Boolean visitedBefore= virtualInClass.get(classType);
 		if (visitedBefore != null)
 			return visitedBefore;
@@ -773,7 +773,7 @@ public class ClassTypeHelper {
 		ICPPMethod candidate= null;
 		boolean hasOverridden= false;
 		for (ICPPMethod method : methods) {
-			if (methodName[0] == '~' && method.isDestructor() 
+			if (methodName[0] == '~' && method.isDestructor()
 				|| (CharArrayUtils.equals(methodName, method.getNameCharArray())
 					&& functionTypesAllowOverride(methodType, method.getType()))) {
 				candidate= method;
@@ -788,7 +788,7 @@ public class ClassTypeHelper {
 		for (ICPPBase base : bases) {
 			IBinding b= base.getBaseClass();
 			if (b instanceof ICPPClassType) {
-				if (findOverridden((ICPPClassType) b, point, methodName, methodType, virtualInClass, 
+				if (findOverridden((ICPPClassType) b, point, methodName, methodType, virtualInClass,
 						result, maxdepth - 1)) {
 					hasOverridden= true;
 				}
@@ -1048,7 +1048,7 @@ public class ClassTypeHelper {
 				return ICPPClassType.v_public; // Fallback visibility
 			}
 		}
-		
+
 		// The concept of visibility does not apply to a lambda, which can end
 		// up having a class as its owner if they are used in the initializer
 		// of a field or a member function parameter.
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPASTGotoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPASTGotoStatement.java
index d67fa1f2aa9..5ecea34f1ac 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPASTGotoStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPASTGotoStatement.java
@@ -17,13 +17,13 @@ import org.eclipse.cdt.core.dom.ast.gnu.IGNUASTGotoStatement;
 
 /**
  * GNU C++ goto statement.
- * 
+ *
  * 
  * foo:
  *   void *labelPtr = &&foo;
  *   goto *labelPtr; // this is the statement
  * 
- * 
+ *
  * @since 5.8
  */
 public class GNUCPPASTGotoStatement extends CPPASTAttributeOwner implements IGNUASTGotoStatement {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
index 6f313c16559..663583a7598 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
@@ -514,7 +514,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 			int angleDepth= 1;
 			int limit= 10000;
 
-			while(--limit > 0) {
+			while (--limit > 0) {
 				switch (consume().getType()) {
 				case IToken.tEOC:
 				case IToken.tCOMPLETION:
@@ -879,7 +879,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 			int endQuote = image.lastIndexOf('"');
 			if (startQuote != -1 && endQuote == startQuote + 1) {
 				char[] ident = image.substring(endQuote + 1).toCharArray();
-				
+
 				char[] operatorName = CharArrayUtils.concat(firstToken.getCharImage(), " ".toCharArray()); //$NON-NLS-1$
 				operatorName = CharArrayUtils.concat(operatorName,  strOp.getCharImage());
 				operatorName = CharArrayUtils.concat(operatorName, ident);
@@ -958,7 +958,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 		}
 
 		boolean stopWithNextOperator= false;
-		castExprLoop: for(;;) {
+		castExprLoop: for (;;) {
 			// Typically after a binary operator there cannot be a throw expression
 			boolean allowThrow= false;
 			// Brace initializers are allowed on the right hand side of an expression
@@ -1547,7 +1547,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 		}
 		return false;
 	}
-	
+
 	private boolean isNaryTrait(IToken operatorToken) {
 		switch (operatorToken.getType()) {
 		case IGCCToken.tTT_is_trivially_constructible:
@@ -1567,13 +1567,13 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 		assert false;
 		return null;
 	}
-	
+
 	private ICPPASTNaryTypeIdExpression.Operator getNaryTypeTraitOperator(IToken operatorToken) {
 		switch (operatorToken.getType()) {
 		case IGCCToken.tTT_is_trivially_constructible:
 			return ICPPASTNaryTypeIdExpression.Operator.__is_trivially_constructible;
 		}
-		
+
 		assert false;
 		return null;
 	}
@@ -1628,16 +1628,16 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 	/**
 	 * postfix-expression:
 	 *	[gnu-extension, compound literals in c++]
-	 *	   ( type-name ) { initializer-list }
-	 *	   ( type-name ) { initializer-list , }
+	 *	   (type-name) { initializer-list }
+	 *	   (type-name) { initializer-list , }
 	 *
 	 *	primary-expression
 	 *	postfix-expression [ expression ]
 	 *	postfix-expression [ braced-init-list ]
-	 *	postfix-expression ( expression-list_opt )
-	 *	simple-type-specifier ( expression-list_opt )
+	 *	postfix-expression (expression-list_opt)
+	 *	simple-type-specifier (expression-list_opt)
 	 *	simple-type-specifier braced-init-list
-	 *	typename-specifier ( expression-list_opt )
+	 *	typename-specifier (expression-list_opt)
 	 *	typename-specifier braced-init-list
 	 *	postfix-expression . templateopt id-expression
 	 *	postfix-expression -> templateopt id-expression
@@ -1645,12 +1645,12 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 	 *	postfix-expression -> pseudo-destructor-name
 	 *	postfix-expression ++
 	 *	postfix-expression --
-	 *	dynamic_cast < type-id > ( expression )
-	 *	static_cast < type-id > ( expression )
-	 *	reinterpret_cast < type-id > ( expression )
-	 *	const_cast < type-id > ( expression )
-	 *	typeid ( expression )
-	 *	typeid ( type-id )
+	 *	dynamic_cast < type-id > (expression)
+	 *	static_cast < type-id > (expression)
+	 *	reinterpret_cast < type-id > (expression)
+	 *	const_cast < type-id > (expression)
+	 *	typeid (expression)
+	 *	typeid (type-id)
 	 */
 	private IASTExpression postfixExpression(CastExprCtx ctx, ITemplateIdStrategy strat) throws EndOfFileException, BacktrackException {
 		IASTExpression firstExpression = null;
@@ -1672,26 +1672,26 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 			break;
 
 		case IToken.t_typeid:
-			// 'typeid' ( expression )
-			// 'typeid' ( type-id )
+			// 'typeid' (expression)
+			// 'typeid' (type-id)
 			firstExpression = parseTypeidInParenthesisOrUnaryExpression(true, consume().getOffset(),
 					ICPPASTTypeIdExpression.op_typeid, ICPPASTUnaryExpression.op_typeid, ctx, strat);
 			break;
 
 		case IToken.t_noexcept:
-			// 'noexcept' ( expression )
+			// 'noexcept' (expression)
 			offset= consume().getOffset();  // noexcept
 			consume(IToken.tLPAREN);		// (
 			firstExpression= expression();
 			firstExpression= getNodeFactory().newUnaryExpression(IASTUnaryExpression.op_noexcept, firstExpression);
-			final int endOffset = consume(IToken.tRPAREN).getEndOffset();	// )
+			final int endOffset = consume(IToken.tRPAREN).getEndOffset();	//)
 			setRange(firstExpression, offset, endOffset);
 			break;
 
 		case IToken.tLPAREN:
 			// Gnu-extension: compound literals in c++
-			// ( type-name ) { initializer-list }
-			// ( type-name ) { initializer-list , }
+			// (type-name) { initializer-list }
+			// (type-name) { initializer-list , }
 			IToken m = mark();
 			try {
 				if (canBeCompoundLiteral()) {
@@ -1711,9 +1711,9 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 			firstExpression= primaryExpression(ctx, strat);
 			break;
 
-		// typename-specifier ( expression-list_opt )
+		// typename-specifier (expression-list_opt)
 		// typename-specifier braced-init-list
-		// simple-type-specifier ( expression-list_opt )
+		// simple-type-specifier (expression-list_opt)
 		// simple-type-specifier braced-init-list
 		case IToken.t_typename:
 		case IToken.t_char:
@@ -1771,8 +1771,8 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 				firstExpression= setRange(s, firstExpression, endOffset);
 				break;
 			case IToken.tLPAREN:
-				// postfix-expression ( expression-list_opt )
-				// simple-type-specifier ( expression-list_opt )  // cannot be distinguished
+				// postfix-expression (expression-list_opt)
+				// simple-type-specifier (expression-list_opt)  // cannot be distinguished
 				consume(IToken.tLPAREN);
 				IASTInitializerClause[] initArray;
 				if (LT(1) == IToken.tRPAREN) {
@@ -2194,7 +2194,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 		ICPPASTTypeId aliasedType = typeId(DeclarationOptions.TYPEID);
 
 		final int nextToken = LT(1);
-		if (nextToken != IToken.tSEMI && nextToken != IToken.tEOC){
+		if (nextToken != IToken.tSEMI && nextToken != IToken.tEOC) {
 			throw backtrack;
 		}
 		int endOffset = consume().getEndOffset();
@@ -2231,7 +2231,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 
 	/**
 	 * static_assert-declaration:
-			   static_assert ( constant-expression  ,  string-literal  ) ;
+			   static_assert (constant-expression  ,  string-literal ) ;
 	 */
 	private ICPPASTStaticAssertDeclaration staticAssertDeclaration() throws EndOfFileException, BacktrackException {
 		int offset= consume(IToken.t_static_assert).getOffset();
@@ -2653,7 +2653,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 						consume();
 					ICPPASTAttribute attribute = singleAttribute();
 					attributeList.addAttribute(attribute);
-	
+
 				}
 				consumeOrEOC(IToken.tRBRACKET);
 				int endOffset = consumeOrEOC(IToken.tRBRACKET).getEndOffset();
@@ -2924,7 +2924,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 	 * 	  mem-initializer ...?
 	 * 	  mem-initializer ...?, mem-initializer-list
 	 * mem-initializer:
-	 * 	  mem-initializer-id ( expression-list? )
+	 * 	  mem-initializer-id (expression-list?)
 	 * 	  mem-initializer-id braced-init-list
 	 * mem-initializer-id:
 	 * 	  ::? nested-name-specifier? class-name
@@ -3862,7 +3862,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 	/**
 	 * initializer:
 	 *	brace-or-equal-initializer
-	 *	( expression-list )
+	 *	(expression-list)
 	 *
 	 * brace-or-equal-initializer:
 	 *	= initializer-clause
@@ -3892,7 +3892,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 			return bracedInitList(false, false);
 		}
 
-		// ( expression-list )
+		// (expression-list)
 		if (option.fAllowCtorStyleInitializer && lt1 == IToken.tLPAREN) {
 			return ctorStyleInitializer(false);
 		}
@@ -3913,14 +3913,14 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 	}
 
 	/**
-	 * ( expression-list_opt )
+	 * (expression-list_opt)
 	 */
 	private ICPPASTConstructorInitializer ctorStyleInitializer(boolean optionalExpressionList)
 			throws EndOfFileException, BacktrackException {
 		IASTInitializerClause[] initArray;
 		 int offset = consume(IToken.tLPAREN).getOffset();
 
-		// ( )
+		// ()
 		if (optionalExpressionList && LT(1) == IToken.tRPAREN) {
 			initArray= IASTExpression.EMPTY_EXPRESSION_ARRAY;
 		} else {
@@ -4003,12 +4003,12 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 					for (ICPPASTDesignator d : designators) {
 						desigInitializer.addDesignator(d);
 					}
-	
+
 					if (LT(1) != IToken.tEOC) {
 						// GNU extension: the assign operator is optional.
 						if (LT(1) == IToken.tASSIGN)
 							consume(IToken.tASSIGN);
-	
+
 						ICPPASTInitializerClause clause= initClause(false);
 						desigInitializer.setOperand(clause);
 						adjustLength(desigInitializer, clause);
@@ -4389,7 +4389,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 			DtorStrategy strategy, DeclarationOptions option, List attributes)
 			throws EndOfFileException, BacktrackException {
 		ICPPASTDeclarator result= null;
-		loop: while(true) {
+		loop: while (true) {
 			final int lt1= LTcatchEOF(1);
 			switch (lt1) {
 			case IToken.tLPAREN:
@@ -4482,7 +4482,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 
 		final ICPPASTFunctionDeclarator fc = getNodeFactory().newFunctionDeclarator(null);
 		ICPPASTParameterDeclaration pd= null;
-		paramLoop: while(true) {
+		paramLoop: while (true) {
 			switch (LT(1)) {
 			case IToken.tRPAREN:
 			case IToken.tEOC:
@@ -4610,7 +4610,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 			if (LT(1) == IToken.tLPAREN) {
 				consume();		// (
 				expression = expression();
-				endOffset = consume(IToken.tRPAREN).getEndOffset();	// )
+				endOffset = consume(IToken.tRPAREN).getEndOffset();	//)
 			} else {
 				expression = ICPPASTFunctionDeclarator.NOEXCEPT_DEFAULT;
 			}
@@ -5095,9 +5095,9 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
 
 		IASTWhileStatement while_statement;
 		if (while_condition instanceof IASTExpression)
-			while_statement = getNodeFactory().newWhileStatement((IASTExpression)while_condition, while_body);
+			while_statement = getNodeFactory().newWhileStatement((IASTExpression) while_condition, while_body);
 		else
-			while_statement = getNodeFactory().newWhileStatement((IASTDeclaration)while_condition, while_body);
+			while_statement = getNodeFactory().newWhileStatement((IASTDeclaration) while_condition, while_body);
 
 		((ASTNode) while_statement).setOffsetAndLength(startOffset,
 				(while_body != null ? calculateEndOffset(while_body) : LA(1).getEndOffset()) - startOffset);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTExplicitTemplateInstantiation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTExplicitTemplateInstantiation.java
index 7a6ab60dbe5..51b2498619d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTExplicitTemplateInstantiation.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTExplicitTemplateInstantiation.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointer.java
index 48669badfc1..b18dae1a68a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointer.java
@@ -4,7 +4,7 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointerToMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointerToMember.java
index 795542e6753..12ee06acad1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointerToMember.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointerToMember.java
@@ -4,7 +4,7 @@
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
  *  http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  *  Contributors:
  *  IBM - Initial API and implementation
  *******************************************************************************/
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTSimpleDeclSpecifier.java
index 68c0352cf1c..3e733edd10d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTSimpleDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTSimpleDeclSpecifier.java
@@ -23,12 +23,12 @@ public class GPPASTSimpleDeclSpecifier extends CPPASTSimpleDeclSpecifier
 
     public GPPASTSimpleDeclSpecifier() {
 	}
-    
+
 	public GPPASTSimpleDeclSpecifier(IASTExpression typeofExpression) {
 		super();
 		setDeclTypeExpression(typeofExpression);
 	}
-	
+
 	@Override
 	public GPPASTSimpleDeclSpecifier copy() {
 		return copy(CopyStyle.withoutLocations);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/IASTAmbiguousCondition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/IASTAmbiguousCondition.java
index 2240ad51aff..fb21d38ded7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/IASTAmbiguousCondition.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/IASTAmbiguousCondition.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *    Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
@@ -17,6 +17,6 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
  * Marks ambiguous condition nodes.
  */
 public interface IASTAmbiguousCondition extends IASTExpression {
-    public static final ASTNodeProperty SUBCONDITION = new ASTNodeProperty( "IASTAmbiguousCondition.SUBCONDITION"); //$NON-NLS-1$
+    public static final ASTNodeProperty SUBCONDITION = new ASTNodeProperty("IASTAmbiguousCondition.SUBCONDITION"); //$NON-NLS-1$
 
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalScope.java
index 7e5d3f5b2c6..c316144fce8 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalScope.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPScope;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalTemplateDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalTemplateDeclaration.java
index f87010c3504..dda02de2ccc 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalTemplateDeclaration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalTemplateDeclaration.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
@@ -20,11 +20,11 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
 public interface ICPPASTInternalTemplateDeclaration extends ICPPASTTemplateDeclaration {
 	/**
 	 * Returns whether this template declaration is associated with the last name of
-	 * the possibly qualified name of the enclosing declaration. If this template declaration 
+	 * the possibly qualified name of the enclosing declaration. If this template declaration
 	 * encloses another one, false is returned.
 	 */
 	boolean isAssociatedWithLastName();
-	
+
 	/**
 	 * Returns the nesting level of this template declaration.
 	 * @see ICPPTemplateParameter#getTemplateNestingLevel()
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPClassSpecializationScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPClassSpecializationScope.java
index 55da58c8586..23a33a01e9e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPClassSpecializationScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPClassSpecializationScope.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.IASTNode;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPComputableFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPComputableFunction.java
index f747c637fb5..dac72d82c11 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPComputableFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPComputableFunction.java
@@ -22,7 +22,7 @@ public interface ICPPComputableFunction {
 	 * @param point the point of instantiation for name lookups
 	 */
 	public ICPPEvaluation getReturnExpression(IASTNode point);
-	
+
 	/**
 	 * For a constexpr function returns the ICPPExecution for its body. Otherwise returns
 	 * {@code null}.
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPDeferredClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPDeferredClassInstance.java
index cf86375d1b3..40905a56586 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPDeferredClassInstance.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPDeferredClassInstance.java
@@ -17,14 +17,14 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap;
 
 /**
- * Interface for deferred class template instances. 
+ * Interface for deferred class template instances.
  */
 public interface ICPPDeferredClassInstance extends ICPPUnknownBinding, ICPPUnknownType, ICPPClassType, ICPPTemplateInstance {
 	/**
 	 * Returns the class template for the deferred instantiation.
 	 */
 	ICPPClassTemplate getClassTemplate();
-	
+
 	/**
 	 * Returns the mapping of the template parameters of the primary class template to the
 	 * arguments of this instance.
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluation.java
index 3af95c0665b..f3953fa3693 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluation.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluation.java
@@ -39,17 +39,17 @@ public interface ICPPEvaluation extends ISerializableEvaluation {
 	 * Returns {@code true} if the value of the expression depends on template parameters.
 	 */
 	boolean isValueDependent();
-	
+
 	/**
 	 * Returns {@code true} if the expression is a compile-time constant expression.
-	 * 
+	 *
 	 * @param point the point of instantiation, determines the scope for name lookups
 	 */
 	boolean isConstantExpression(IASTNode point);
 
 	/**
 	 * Returns the type of the expression.
-	 * 
+	 *
 	 * If the expression evaluates to a function set, a {@code FunctionSetType} is returned.
 	 *
 	 * @param point the point of instantiation, determines the scope for name lookups
@@ -95,10 +95,10 @@ public interface ICPPEvaluation extends ISerializableEvaluation {
 		 * IDE to hang.
 		 */
 		public static final int MAX_CONSTEXPR_EVALUATION_STEPS = 1024;
-		
+
 		private int fStepsPerformed;
 		private IASTNode fPoint;
-		
+
 		/**
 		 * Constructs a ConstexprEvaluationContext for a new constexpr evaluation.
 		 * @param point the point of instantiation, determines the scope for name lookups
@@ -124,7 +124,7 @@ public interface ICPPEvaluation extends ISerializableEvaluation {
 		public int getStepsPerformed() {
 			return fStepsPerformed;
 		}
-		
+
 		/**
 		 * Returns the point of instantiation.
 		 */
@@ -132,10 +132,10 @@ public interface ICPPEvaluation extends ISerializableEvaluation {
 			return fPoint;
 		}
 	}
-	
+
 	/**
 	 * Computes the evaluation produced by substituting function parameters by their values.
-	 * 
+	 *
 	 * @param record maps function parameters and local variables to their values
 	 * @param context the context for the current constexpr evaluation
 	 * @return the computed evaluation
@@ -157,14 +157,14 @@ public interface ICPPEvaluation extends ISerializableEvaluation {
 
 	/**
 	 * Checks if the evaluation references a template parameter either directly or though nested
-	 * evaluations. 
+	 * evaluations.
 	 */
 	boolean referencesTemplateParameter();
-	
+
 	/**
 	 * If the evaluation is dependent (or instantiated from a dependent evaluation),
 	 * returns the template definition in which the evaluation occurs.
-	 * Otherwise returns {@code null}. 
+	 * Otherwise returns {@code null}.
 	 */
 	IBinding getTemplateDefinition();
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluationOwner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluationOwner.java
index 4b503e767be..159090ab299 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluationOwner.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluationOwner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik 
+* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik
 * Rapperswil, University of applied sciences and others
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecution.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecution.java
index b326c352d4d..85c4f1838ad 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecution.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik 
+* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik
 * Rapperswil, University of applied sciences and others
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
@@ -23,10 +23,10 @@ public interface ICPPExecution extends ISerializableExecution {
 	 * @return a fully or partially instantiated execution, or the original execution
 	 */
 	ICPPExecution instantiate(InstantiationContext context, int maxDepth);
-	
+
 	/**
 	 * Computes the execution produced by substituting function parameters by their values.
-	 * 
+	 *
 	 * @param record maps function parameters and local variables to their values
 	 * @param context the context for the current constexpr evaluation
 	 * @return the computed execution
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecutionOwner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecutionOwner.java
index 85b5b1b8d08..f6246876e6c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecutionOwner.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecutionOwner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik 
+* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik
 * Rapperswil, University of applied sciences and others
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalBase.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalBase.java
index da801fccc33..aaddabd9faa 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalBase.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalBase.java
@@ -18,7 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
  */
 public interface ICPPInternalBase extends Cloneable {
 	public Object clone();
-	
+
 	/**
 	 * Sets the base class.
 	 */
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalClassTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalClassTemplate.java
index eef7ec92159..7ff2720f0fe 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalClassTemplate.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalClassTemplate.java
@@ -28,7 +28,7 @@ public interface ICPPInternalClassTemplate extends ICPPInternalTemplate {
 
 	/**
 	 * Tries to obtain a default argument for a template parameter from the index.
-	 * @throws DOMException 
+	 * @throws DOMException
 	 */
 	public ICPPTemplateArgument getDefaultArgFromIndex(int paramPos) throws DOMException;
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalFunction.java
index d9fbf9cc80f..ab5703c9a99 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalFunction.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalFunction.java
@@ -22,7 +22,7 @@ public interface ICPPInternalFunction extends ICPPInternalBinding, ICPPComputabl
 	 * Called to resolve the parameter in the second phase.
 	 */
 	public IBinding resolveParameter(CPPParameter parameter);
-	
+
     /**
      * Returns whether there is a static declaration for this function.
      * @param resolveAll checks for names that are not yet resolved to this binding.
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalNamespaceScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalNamespaceScope.java
index 29ca46f4e45..08fb3bbe05d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalNamespaceScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalNamespaceScope.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Markus Schorn - initial API and implementation
  *     Sergey Prigogin (Google)
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
@@ -20,7 +20,7 @@ public interface ICPPInternalNamespaceScope extends ICPPNamespaceScope {
 	public ICPPInternalNamespaceScope[] EMPTY_NAMESPACE_SCOPE_ARRAY = {};
 
 	/**
-	 * Returns the enclosing namespace set (7.3.1-9) 
+	 * Returns the enclosing namespace set (7.3.1-9)
 	 */
 	public ICPPNamespaceScope[] getEnclosingNamespaceSet();
 
@@ -28,7 +28,7 @@ public interface ICPPInternalNamespaceScope extends ICPPNamespaceScope {
 	 * Returns whether this namespace scope is inline.
 	 */
 	public boolean isInlineNamepace();
-	
+
 	/**
 	 * Returns the inline namespace scopes mapped back to the AST.
 	 */
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPTwoPhaseBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPTwoPhaseBinding.java
index 4a005d54fac..5f9e6455625 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPTwoPhaseBinding.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPTwoPhaseBinding.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *    Markus Schorn - initial API and implementation
- *******************************************************************************/ 
+ *******************************************************************************/
 package org.eclipse.cdt.internal.core.dom.parser.cpp;
 
 import org.eclipse.cdt.core.dom.ast.IBinding;
@@ -15,22 +15,22 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
 /**
  * An interface for bindings that are resolvable in two steps. The binding computed
  * by the first step is an intermediate binding that can be replaced in a second
- * step before the binding is exposed via public API. 
- * 

+ * step before the binding is exposed via public API. + *

* The bindings of the two phases may not be equal, but they must implement the * same public interfaces. - *

+ *

* This allows for having multiple bindings for one final binding and deferring * the act of unifying them to a later point in time. */ public interface ICPPTwoPhaseBinding extends IBinding { /** - * Triggers the second step of the resolution where the binding that will be - * exposed via public API has to be computed. If this binding is already final + * Triggers the second step of the resolution where the binding that will be + * exposed via public API has to be computed. If this binding is already final * {@code this} must be returned. - *

Note, that the result of this operation is an instance of - * {@link ICPPTwoPhaseBinding}, however it must resolve to itself using + *

Note, that the result of this operation is an instance of + * {@link ICPPTwoPhaseBinding}, however it must resolve to itself using * {@link #resolveFinalBinding(CPPASTNameBase)}. */ IBinding resolveFinalBinding(CPPASTNameBase astName); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownBinding.java index de522e9b6a0..d46a7a0010e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownBinding.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; import org.eclipse.cdt.core.dom.ast.DOMException; @@ -22,7 +22,7 @@ public interface ICPPUnknownBinding extends ICPPBinding { /** * Returns the scope this binding represents. - * @throws DOMException + * @throws DOMException */ public ICPPScope asScope() throws DOMException; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMember.java index 7cbda027f89..8ae2f77607d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMember.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMember.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; import org.eclipse.cdt.core.dom.ast.IType; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClass.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClass.java index de0490ba2cf..fc043f93c99 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClass.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClass.java @@ -7,15 +7,15 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; /** - * Represents a binding for a type found in a template definition, that can be - * determined only after the template is instantiated. - * + * Represents a binding for a type found in a template definition, that can be + * determined only after the template is instantiated. + * * This interface should be made public. * @since 5.0 */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownType.java index 6f71a09b64a..c6571448645 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownType.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; import org.eclipse.cdt.core.dom.ast.IType; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/InstantiationContext.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/InstantiationContext.java index 478351fc77e..b9871dba33c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/InstantiationContext.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/InstantiationContext.java @@ -33,7 +33,7 @@ public final class InstantiationContext { private final IASTNode point; private boolean expandPack; private boolean packExpanded; - + // During the instantiation of a function body, stores mapping from local variables // (including function parameters) to their instantiated versions. // TODO(nathanridge): Get rid of this, replacing it with something analogous to @@ -135,7 +135,7 @@ public final class InstantiationContext { * {@code null}. */ public final ICPPTypeSpecialization getContextTypeSpecialization() { - return contextSpecialization instanceof ICPPTypeSpecialization ? (ICPPTypeSpecialization)contextSpecialization : null; + return contextSpecialization instanceof ICPPTypeSpecialization ? (ICPPTypeSpecialization) contextSpecialization : null; } /** @@ -230,16 +230,16 @@ public final class InstantiationContext { return (ICPPClassSpecialization) owner; return null; } - + public void putInstantiatedLocal(IBinding local, IBinding instantiatedLocal) { if (fInstantiatedLocals == null) { fInstantiatedLocals = new HashMap<>(); } fInstantiatedLocals.put(local, instantiatedLocal); } - + public IBinding getInstantiatedLocal(IBinding local) { - return fInstantiatedLocals == null ? null : fInstantiatedLocals.get(local); + return fInstantiatedLocals == null ? null : fInstantiatedLocals.get(local); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/NameOrTemplateIDVariants.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/NameOrTemplateIDVariants.java index ce4e01e1417..50b5c90d3cf 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/NameOrTemplateIDVariants.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/NameOrTemplateIDVariants.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; @@ -71,7 +71,7 @@ public class NameOrTemplateIDVariants { fFirstVariant= prev; } } - + /** * A variant for a branch-point is a cast-expression that can be used within a binary expression. */ @@ -113,7 +113,7 @@ public class NameOrTemplateIDVariants { } } - + private BranchPoint fFirst; public boolean isEmpty() { @@ -131,12 +131,12 @@ public class NameOrTemplateIDVariants { if (v.getTargetOperator() == null) { if (offset == v.getRightOffset()) { v.setTargetOperator(lastOperator); - } + } } } } } - + public Variant selectFallback() { // Search for an open variant, with a small right offset and a large left offset for (BranchPoint p = fFirst; p != null; p= p.getNext()) { @@ -145,7 +145,7 @@ public class NameOrTemplateIDVariants { if (v.getTargetOperator() == null) { if (best == null || v.fRightOffset < best.fRightOffset) { best= v; - } + } } } if (best != null) { @@ -176,7 +176,7 @@ public class NameOrTemplateIDVariants { } } } - + private void remove(BranchPoint remove) { final BranchPoint next = remove.getNext(); if (remove == fFirst) { @@ -190,7 +190,7 @@ public class NameOrTemplateIDVariants { break; } prev= n; - } + } } } @@ -212,7 +212,7 @@ public class NameOrTemplateIDVariants { // Search for an open variant, with a small right offset and a large left offset for (BranchPoint p = fFirst; p != null; p= p.getNext()) { for (Variant v= p.getFirstVariant(); v != null; v= v.getNext()) { - if (v.fRightOffset > opOffset) + if (v.fRightOffset > opOffset) return false; } } @@ -223,7 +223,7 @@ public class NameOrTemplateIDVariants { for (BranchPoint p = fFirst; p != null; p= p.getNext()) { if (!isReachable(p, lastOperator)) { remove(p); - } else { + } else { for (Variant v= p.getFirstVariant(); v != null; v= v.getNext()) { if (v.getTargetOperator() == null) { remove(v); @@ -231,14 +231,14 @@ public class NameOrTemplateIDVariants { } } } - } - + } + private boolean isReachable(BranchPoint bp, BinaryOperator endOperator) { BinaryOperator op = bp.getLeftOperator(); if (op == null) return true; - - for(; endOperator != null; endOperator= endOperator.getNext()) { + + for (; endOperator != null; endOperator= endOperator.getNext()) { if (endOperator == op) return true; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/OverloadableOperator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/OverloadableOperator.java index a8f129df474..c14ffb1d9b1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/OverloadableOperator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/OverloadableOperator.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation * Mike Kucera (IBM) @@ -22,70 +22,70 @@ import org.eclipse.cdt.core.parser.IToken; /** * Enumeration of all the overloadable operators in C++. - * + * * Note: toString() has not been overridden, use toCharArray() to get * a character representation of the operator. */ @SuppressWarnings("nls") public enum OverloadableOperator { - GT(">"), - LT("<"), - NOT("!"), - BITCOMPLEMENT("~"), - BITOR("|"), - AMPER("&"), - XOR("^"), - MOD("%"), - DIV("/"), - STAR("*"), - PLUS("+"), - BRACKET("[]"), - PAREN("()"), - ARROW("->"), - ARROWSTAR("->*"), - COMMA(","), - MINUS("-"), - DECR("--"), - INCR("++"), - OR("||"), - AND("&&"), - ASSIGN("="), - GTEQUAL(">="), - LTEQUAL("<="), - NOTEQUAL("!="), - EQUAL("=="), - SHIFTR(">>"), - SHIFTL("<<"), - SHIFTLASSIGN("<<="), - SHIFTRASSIGN(">>="), - BITORASSIGN("|="), - AMPERASSIGN("&="), - XORASSIGN("^="), - MODASSIGN("%="), - DIVASSIGN("/="), - STARASSIGN("*="), - MINUSASSIGN("-="), - PLUSASSIGN("+="), - NEW("new"), - DELETE_ARRAY("delete[]"), - DELETE("delete"), + GT(">"), + LT("<"), + NOT("!"), + BITCOMPLEMENT("~"), + BITOR("|"), + AMPER("&"), + XOR("^"), + MOD("%"), + DIV("/"), + STAR("*"), + PLUS("+"), + BRACKET("[]"), + PAREN("()"), + ARROW("->"), + ARROWSTAR("->*"), + COMMA(","), + MINUS("-"), + DECR("--"), + INCR("++"), + OR("||"), + AND("&&"), + ASSIGN("="), + GTEQUAL(">="), + LTEQUAL("<="), + NOTEQUAL("!="), + EQUAL("=="), + SHIFTR(">>"), + SHIFTL("<<"), + SHIFTLASSIGN("<<="), + SHIFTRASSIGN(">>="), + BITORASSIGN("|="), + AMPERASSIGN("&="), + XORASSIGN("^="), + MODASSIGN("%="), + DIVASSIGN("/="), + STARASSIGN("*="), + MINUSASSIGN("-="), + PLUSASSIGN("+="), + NEW("new"), + DELETE_ARRAY("delete[]"), + DELETE("delete"), NEW_ARRAY("new[]"), - + /** * Cannot be overloaded by the user, however overload resolution needs to be performed. */ CONDITIONAL_OPERATOR("?"); - + private final char[] rep; - + private OverloadableOperator(String rep) { this.rep = ("operator " + rep).toCharArray(); } - + public char[] toCharArray() { return rep; } - + /** * Returns true if the given name equals 'operator new' * or 'operator new[]'. @@ -93,7 +93,7 @@ public enum OverloadableOperator { public static boolean isNew(char[] name) { return Arrays.equals(name, NEW.rep) || Arrays.equals(name, NEW_ARRAY.rep); } - + /** * Returns true if the given name equals 'operator delete' * or 'operator delete[]'. @@ -101,11 +101,11 @@ public enum OverloadableOperator { public static boolean isDelete(char[] name) { return Arrays.equals(name, DELETE.rep) || Arrays.equals(name, DELETE_ARRAY.rep); } - + /** * Returns the OverloadableOperator constant that corresponds to * the given token. Does not work for new[] and delete[] operators. - * + * * @throws NullPointerException if {@code token} is {@code null}. */ public static OverloadableOperator valueOf(IToken token) { @@ -125,7 +125,7 @@ public enum OverloadableOperator { case IToken.tSHIFTRASSIGN: return SHIFTRASSIGN; case IToken.tXOR: return XOR; case IToken.tXORASSIGN: return XORASSIGN; - + // logical operations case IToken.tNOT: return NOT; case IToken.tAND: return AND; @@ -144,32 +144,32 @@ public enum OverloadableOperator { case IToken.tPLUSASSIGN: return PLUSASSIGN; case IToken.tSTAR: return STAR; case IToken.tSTARASSIGN: return STARASSIGN; - + // comparison - case IToken.tEQUAL: return EQUAL; + case IToken.tEQUAL: return EQUAL; case IToken.tNOTEQUAL: return NOTEQUAL; case IToken.tGT: return GT; case IToken.tGTEQUAL: return GTEQUAL; case IToken.tLT: return LT; case IToken.tLTEQUAL: return LTEQUAL; - + // other - case IToken.tASSIGN: return ASSIGN; + case IToken.tASSIGN: return ASSIGN; case IToken.tCOMMA: return COMMA; - + case IToken.tLBRACKET: return BRACKET; case IToken.tRBRACKET: return BRACKET; case IToken.tLPAREN: return PAREN; case IToken.tRPAREN: return PAREN; } - + return null; } /** * Returns the OverloadableOperator constant that corresponds to * the given binary expression. - * + * * @throws NullPointerException if {@code expression} is {@code null}. */ public static OverloadableOperator fromBinaryExpression(int binaryOp) { @@ -185,7 +185,7 @@ public enum OverloadableOperator { case IASTBinaryExpression.op_shiftRightAssign: return SHIFTRASSIGN; case IASTBinaryExpression.op_binaryXor: return XOR; case IASTBinaryExpression.op_binaryXorAssign: return XORASSIGN; - + // logical operations case IASTBinaryExpression.op_logicalAnd: return AND; case IASTBinaryExpression.op_logicalOr: return OR; @@ -201,24 +201,24 @@ public enum OverloadableOperator { case IASTBinaryExpression.op_plusAssign: return PLUSASSIGN; case IASTBinaryExpression.op_multiply: return STAR; case IASTBinaryExpression.op_multiplyAssign: return STARASSIGN; - + // comparison - case IASTBinaryExpression.op_equals: return EQUAL; + case IASTBinaryExpression.op_equals: return EQUAL; case IASTBinaryExpression.op_notequals: return NOTEQUAL; case IASTBinaryExpression.op_greaterThan: return GT; case IASTBinaryExpression.op_greaterEqual: return GTEQUAL; case IASTBinaryExpression.op_lessThan: return LT; case IASTBinaryExpression.op_lessEqual: return LTEQUAL; - + // other - case IASTBinaryExpression.op_assign: return ASSIGN; + case IASTBinaryExpression.op_assign: return ASSIGN; } - + return null; } - + public static OverloadableOperator fromUnaryExpression(int unaryOp) { - switch(unaryOp) { + switch (unaryOp) { case IASTUnaryExpression.op_prefixIncr: return INCR; case IASTUnaryExpression.op_prefixDecr: return DECR; case IASTUnaryExpression.op_plus: return PLUS; @@ -232,11 +232,11 @@ public enum OverloadableOperator { } return null; } - + public static OverloadableOperator fromDeleteExpression(ICPPASTDeleteExpression expression) { return expression.isVectored() ? DELETE_ARRAY : DELETE; } - + public static OverloadableOperator fromNewExpression(ICPPASTNewExpression expression) { return expression.isArrayAllocation() ? NEW_ARRAY : NEW; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/TemplateIdStrategy.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/TemplateIdStrategy.java index 2fdf91f996d..0eec024fe6f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/TemplateIdStrategy.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/TemplateIdStrategy.java @@ -8,7 +8,7 @@ * Contributors: * Markus Schorn - initial API and implementation * Nathan Ridge - added comments and fixed bug 445177 - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; @@ -22,51 +22,51 @@ import org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.ITem /** * This class is used to track alternatives for parsing segments of code that involve '<' tokens. - * + * * The '<' token can be either a less-than operator or part of a template-id. * When parsing, we potentially need to consider both possibilities for each use of '<'. - * + * * An instance of this class is used to track alternative parses in a segment of code that includes one or * more uses of '<' preceded by names. An alternative consists of a choices (template-id or not) for each * name. At a given point in time, the instance has a notion of a current alternative, and a current - * position within that alternative. - * + * position within that alternative. + * * @see also NameOrTemplateIDVariants, which is used together with this class to deal with ambiguities * involving '<' when parsing in an expression context. */ final class TemplateIdStrategy implements ITemplateIdStrategy { - // The current position in the current alternative. + // The current position in the current alternative. // The next call to shallParseAsTemplateID() will return whether in the current alternative, // the name at index (fCurrentBranchPoint + 1) should be parsed as a template-id. private int fCurrentBranchPoint; - + // The current alternative, represented as a bitset with one bit for each name. // A bit corresponding to a name is clear if the name should be parsed as a template-id, and set if // it should not. // For the first alternative, this bitset is null, and this is interpreted as all zeros (i.e. every name // is parsed as a template-id). private BitSet fSimpleIDs; - + // The set of names which are parsed as template-ids in the current alternative. private IASTName[] fTemplateNames; - + public TemplateIdStrategy() { fCurrentBranchPoint= -1; fTemplateNames= IASTName.EMPTY_NAME_ARRAY; } - + /** * Returns whether 'name' should be parsed as a template-id according to the current alternative. * For each alternative, this is expected to be called once for each name in a segment code for which - * this choice is ambiguous. + * this choice is ambiguous. * For the first alternative, these calls are used to initially populate the list of names. * For subsequent alternatives, these calls are expected for the same names in the same order. */ @Override public boolean shallParseAsTemplateID(IASTName name) { fCurrentBranchPoint++; - - // 'fSimpleIDs == null' means we're on the first alternative. + + // 'fSimpleIDs == null' means we're on the first alternative. // On the first alternative, everything is parsed as a template-id. boolean templateID= fSimpleIDs == null || !fSimpleIDs.get(fCurrentBranchPoint); if (templateID) { @@ -87,19 +87,19 @@ final class TemplateIdStrategy implements ITemplateIdStrategy { if (fCurrentBranchPoint < 0) { return false; } - + // Reset the current position, saving the old one, which should point to the last name in the // bitset for which parsing was attempted during the previous alternative. int bp = fCurrentBranchPoint; fCurrentBranchPoint= -1; - + // Reset the list of names that were parsed as template-ids, saving the list for the previous - // alternative. + // alternative. IASTName[] names = getTemplateNames(); // Note that 'names' here contains the list of names for which there is a '0' in the bitset. int nameLen= names.length; fTemplateNames= IASTName.EMPTY_NAME_ARRAY; - + // If the previous alternative was the first, the bitset is still null. Create it. if (fSimpleIDs == null) { fSimpleIDs= new BitSet(); @@ -108,7 +108,7 @@ final class TemplateIdStrategy implements ITemplateIdStrategy { // Advance to the next alternative by finding the right-most '0' in the bitset, and setting it to '1', // and bits to the right of it to '0'. In this way, successive calls to this function will iterate // over all possible alternatives. - // Note that in searching for the right-most '0', we start at 'bp', not the last element of the + // Note that in searching for the right-most '0', we start at 'bp', not the last element of the // bitset. The reason is that if 'bp' is not the last element of the bitset, it means that during the // previous alternative, we failed the parse before getting beyond 'bp'. This means that there is a // problem with one of the choices up to and including 'bp', so there's no point in trying another @@ -129,7 +129,7 @@ final class TemplateIdStrategy implements ITemplateIdStrategy { } bp--; } - + // The bitset was all ones - there are no more alternatives. return false; } @@ -144,5 +144,5 @@ final class TemplateIdStrategy implements ITemplateIdStrategy { public IASTName[] getTemplateNames() { return ArrayUtil.trim(fTemplateNames); - } + } } \ No newline at end of file diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/VariableHelpers.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/VariableHelpers.java index 88eb8383020..6f4924acfe7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/VariableHelpers.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/VariableHelpers.java @@ -185,7 +185,7 @@ public class VariableHelpers { if (member instanceof ICPPASTVisibilityLabel) vis = (ICPPASTVisibilityLabel) member; } - + if (vis != null) { return vis.getVisibility(); } else if (cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class) { @@ -201,7 +201,7 @@ public class VariableHelpers { if (decl != null) { return decl; } - + IASTName[] declarations = (IASTName[]) field.getDeclarations(); if (declarations != null) { for (IASTName name : declarations) { @@ -211,9 +211,9 @@ public class VariableHelpers { } } } - + char[] myName = field.getNameCharArray(); - + ICPPClassScope scope = findClassScope(field); ICPPASTCompositeTypeSpecifier compSpec = (ICPPASTCompositeTypeSpecifier) ASTInternal.getPhysicalNodeOfScope(scope); @@ -231,7 +231,7 @@ public class VariableHelpers { } return null; } - + private static ICPPClassScope findClassScope(ICPPInternalVariable v) { IScope scope; try { @@ -239,7 +239,7 @@ public class VariableHelpers { } catch (DOMException e) { scope = null; } - while (scope != null){ + while (scope != null) { if (scope instanceof ICPPClassScope) { return (ICPPClassScope) scope; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AccessContext.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AccessContext.java index 3a886f5add1..5b51b4cd373 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AccessContext.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AccessContext.java @@ -109,7 +109,7 @@ public class AccessContext { } if (binding instanceof ICPPClassTemplatePartialSpecialization) { // A class template partial specialization inherits the visibility of its primary - // class template. + // class template. binding = ((ICPPClassTemplatePartialSpecialization) binding).getPrimaryClassTemplate(); } if (binding instanceof ICPPAliasTemplateInstance) { @@ -188,14 +188,14 @@ public class AccessContext { } return c.isSameType(target); } - + private boolean isAccessible(IBinding binding, int bindingVisibility, ICPPClassType owner, ICPPClassType derivedClass, int accessLevel, int depth) { if (depth > CPPSemantics.MAX_INHERITANCE_DEPTH) return false; accessLevel = getMemberAccessLevel(derivedClass, accessLevel); - + if (isSameTypeOrSpecialization(owner, derivedClass)) { return isAccessible(bindingVisibility, accessLevel); } @@ -277,7 +277,7 @@ public class AccessContext { private ICPPClassType getFirstCandidateForNamingClass(IASTName name) throws DOMException { LookupData data = new LookupData(name); isUnqualifiedLookup= !data.qualified; - + ICPPScope scope = CPPSemantics.getLookupScope(name); while (scope != null && !(scope instanceof ICPPClassScope)) { if (scope instanceof ICPPInternalUnknownScope) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ActivationRecord.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ActivationRecord.java index 6d22abaeb1b..5a24c174e76 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ActivationRecord.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ActivationRecord.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -55,7 +55,7 @@ public class ActivationRecord { } private int getParameterPosition(IBinding binding) { - if(binding instanceof ICPPParameter) { + if (binding instanceof ICPPParameter) { for (int i = 0; i < params.length; i++) { ICPPParameter param = params[i]; if (param.getName().equals(binding.getName())) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AutoTypeResolver.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AutoTypeResolver.java index 8e316943246..72f88969624 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AutoTypeResolver.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AutoTypeResolver.java @@ -41,12 +41,12 @@ class AutoTypeResolver implements ICPPFunctionTemplate { public AutoTypeResolver(IType paramType) { functionType = new CPPFunctionType(new CPPBasicType(Kind.eVoid, 0), new IType[] { paramType }); } - + @Override public ICPPTemplateParameter[] getTemplateParameters() { return TEMPLATE_PARAMETERS; } - + @Override public ICPPFunctionType getType() { return functionType; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BuiltinOperators.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BuiltinOperators.java index c8b2fa7b013..be417e3e2c7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BuiltinOperators.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BuiltinOperators.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics; import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.ALLCVQ; @@ -64,7 +64,7 @@ class BuiltinOperators { IASTNode point, Object[] globCandidates) { if (operator == null || args == null || args.length == 0) return EMPTY; - + return new BuiltinOperators(operator, args, point, globCandidates).create(); } @@ -89,9 +89,9 @@ class BuiltinOperators { fGlobalCandidates= globCandidates; if (args.length > 0) { IType type= args[0].getType(point); - if (!(type instanceof ISemanticProblem)) + if (!(type instanceof ISemanticProblem)) fType1= type; - + } if (args.length > 1) { IType type= args[1].getType(point); @@ -110,7 +110,7 @@ class BuiltinOperators { case NEW_ARRAY: case PAREN: return EMPTY; - + case INCR: case DECR: opIncOrDec(); @@ -135,7 +135,7 @@ class BuiltinOperators { } else { binaryPromotedArithmetic(true, ReturnType.CONVERT); pointerArithmetic(false, false); - } + } break; case BRACKET: @@ -148,7 +148,7 @@ class BuiltinOperators { } else { binaryPromotedArithmetic(true, ReturnType.CONVERT); pointerArithmetic(false, true); - } + } break; case BITCOMPLEMENT: @@ -174,9 +174,9 @@ class BuiltinOperators { break; case AMPER: - if (fUnary) + if (fUnary) return EMPTY; - + binaryPromotedArithmetic(false, ReturnType.CONVERT); break; @@ -199,7 +199,7 @@ class BuiltinOperators { case PLUSASSIGN: arithmeticAssignement(true, Assignment.WITH_POINTER_OPERATION); break; - + case DIVASSIGN: case STARASSIGN: arithmeticAssignement(true, Assignment.WITH_OPERATION); @@ -218,20 +218,20 @@ class BuiltinOperators { case OR: addFunction(CPPBasicType.BOOLEAN, CPPBasicType.BOOLEAN, CPPBasicType.BOOLEAN); break; - + case NOT: addFunction(CPPBasicType.BOOLEAN, CPPBasicType.BOOLEAN); break; - + case CONDITIONAL_OPERATOR: binaryPromotedArithmetic(true, ReturnType.CONVERT); conditional(); break; } - + if (fResult == null) return EMPTY; - + return fResult.toArray(new ICPPFunction[fResult.size()]); } @@ -266,10 +266,10 @@ class BuiltinOperators { } } } - } + } } } - + // 13.6-6, 13.6-7 private void opDeref() { IType[] types= getClassConversionTypes(FIRST); @@ -315,7 +315,7 @@ class BuiltinOperators { } } } - + // 13.6-11 private void opArrowStar() { List classPointers= null; @@ -335,7 +335,7 @@ class BuiltinOperators { } if (classPointers == null) return; - + types= getClassConversionTypes(SECOND); for (IType type : types) { type= SemanticUtil.getNestedType(type, TDEF | REF); @@ -348,7 +348,7 @@ class BuiltinOperators { } if (memberPointers == null) return; - + for (IPointerType clsPtr : classPointers) { IType cvClass= SemanticUtil.getNestedType(clsPtr.getType(), TDEF); CVQualifier cv1= SemanticUtil.getCVQualifier(cvClass); @@ -372,12 +372,12 @@ class BuiltinOperators { private static enum ReturnType {CONVERT, USE_FIRST, USE_BOOL} private void binaryPromotedArithmetic(boolean fltPt, ReturnType rstrat) { List p1= null, p2= null; - + IType[] types1= getClassConversionTypes(FIRST); IType[] types2= getClassConversionTypes(SECOND); if (types1.length == 0 && types2.length == 0) return; - + for (IType t : types1) { p1 = addPromotedArithmetic(t, fltPt, p1); } @@ -388,7 +388,7 @@ class BuiltinOperators { p2= addPromotedArithmetic(fType2, fltPt, p2); if (p1 == null || p2 == null) return; - + for (IType t1 : p1) { for (IType t2 : p2) { IType rt= null; @@ -446,7 +446,7 @@ class BuiltinOperators { } } } - + types= getClassConversionTypes(SECOND); if (types.length == 0 && !fIsClass[SECOND]) { types= new IType[] {fType2}; @@ -480,14 +480,14 @@ class BuiltinOperators { } } } - + // 13.6-18, 13.6-29, 13.6-20, 13.6-22 private static enum Assignment {WITHOUT_OPERATION, WITH_POINTER_OPERATION, WITH_OPERATION} private void arithmeticAssignement(boolean fltPt, Assignment assign) { IType[] types2= getClassConversionTypes(SECOND); if (types2.length == 0) return; - + IType refType= SemanticUtil.getNestedType(fType1, TDEF); if (refType instanceof ICPPReferenceType) { IType t= SemanticUtil.getNestedType(((ICPPReferenceType) refType).getType(), TDEF); @@ -520,9 +520,9 @@ class BuiltinOperators { } } } - } + } } - + // 13.6-25 private void conditional() { for (int i = FIRST; i <= SECOND; i++) { @@ -531,7 +531,7 @@ class BuiltinOperators { type= SemanticUtil.getNestedType(type, TDEF|REF|CVTYPE); if (isPointer(type) || isScopedEnumeration(type) || isPointerToMember(type)) { addFunction(type, type, type); - } + } } } } @@ -539,7 +539,7 @@ class BuiltinOperators { private void addFunction(IType returnType, IType p1) { addFunction(returnType, new IType[] {p1}); } - + private void addFunction(IType returnType, IType p1, IType p2) { addFunction(returnType, new IType[] {p1, p2}); } @@ -569,7 +569,7 @@ class BuiltinOperators { fResult.add(new CPPImplicitFunction(fOperator.toCharArray(), fFileScope, functionType, parameter, true, false)); } } - + private boolean isEnumeration(IType type) { return type instanceof IEnumeration; } @@ -699,7 +699,7 @@ class BuiltinOperators { } catch (DOMException e) { } } - } + } fClassConversionTypes[idx]= result; } return result; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPEvaluation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPEvaluation.java index e49ac79ad89..deee3912337 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPEvaluation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPEvaluation.java @@ -127,7 +127,7 @@ public abstract class CPPEvaluation implements ICPPEvaluation { } ICPPEvaluation innerEval = value.getEvaluation(); if (innerEval == null) { - if(value instanceof IntegralValue) { + if (value instanceof IntegralValue) { return value.numberValue() != null; } else { return true; @@ -149,14 +149,14 @@ public abstract class CPPEvaluation implements ICPPEvaluation { * @param targetType the type to convert to * @param point point of instantiation for name lookups */ - protected static ICPPEvaluation maybeApplyConversion(ICPPEvaluation argument, IType targetType, + protected static ICPPEvaluation maybeApplyConversion(ICPPEvaluation argument, IType targetType, IASTNode point) { IType type = argument.getType(point); ValueCategory valueCategory = argument.getValueCategory(point); ICPPFunction conversion = null; if (type instanceof ICPPClassType) { try { - Cost cost = Conversions.initializationByConversion(valueCategory, type, (ICPPClassType) type, + Cost cost = Conversions.initializationByConversion(valueCategory, type, (ICPPClassType) type, targetType, false, point); conversion = cost.getUserDefinedConversion(); } catch (DOMException e) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionParameterMap.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionParameterMap.java index 898ddcdef49..d1006f473f3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionParameterMap.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionParameterMap.java @@ -18,7 +18,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; */ public class CPPFunctionParameterMap { public static final CPPFunctionParameterMap EMPTY = new CPPFunctionParameterMap(0); - + private ObjectMap fMap; /** @@ -45,14 +45,14 @@ public class CPPFunctionParameterMap { public void put(int parameterPosition, ICPPEvaluation value) { fMap.put(parameterPosition, value); } - + /** * Adds the mapping. */ public void put(int parameterPosition, ICPPEvaluation[] packExpansion) { fMap.put(parameterPosition, packExpansion); } - + /** * Returns the value for the given parameter. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionSet.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionSet.java index 41d331c8df8..b31f607ea95 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionSet.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionSet.java @@ -24,20 +24,20 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredFunction; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPTwoPhaseBinding; /** - * Used as intermediate binding for names nominating a function without calling it. + * Used as intermediate binding for names nominating a function without calling it. * The actual function can be resolved in certain contexts. */ public class CPPFunctionSet implements ICPPTwoPhaseBinding { private final ICPPFunction[] fBindings; private final IASTName fName; private final ICPPTemplateArgument[] fTemplateArguments; - + public CPPFunctionSet(ICPPFunction[] bindingList, ICPPTemplateArgument[] args, IASTName name) { fBindings = ArrayUtil.removeNulls(bindingList); fTemplateArguments= args; fName= name; } - + @Override public String getName() { return fBindings[0].getName(); @@ -57,7 +57,7 @@ public class CPPFunctionSet implements ICPPTwoPhaseBinding { public IBinding getOwner() { return fBindings[0].getOwner(); } - + public ICPPFunction[] getBindings() { return fBindings; } @@ -75,7 +75,7 @@ public class CPPFunctionSet implements ICPPTwoPhaseBinding { @Override @SuppressWarnings("unchecked") public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { - if (adapter.isAssignableFrom(getClass())) + if (adapter.isAssignableFrom(getClass())) return this; return null; } @@ -93,7 +93,7 @@ public class CPPFunctionSet implements ICPPTwoPhaseBinding { fName.setBinding(selectedFunction); } } - + public void setToUnknown() { if (fName != null) { fName.setBinding(new CPPDeferredFunction(null, fName.toCharArray(), fBindings)); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPInheritance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPInheritance.java index a2e63ebecf4..9a56091d362 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPInheritance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPInheritance.java @@ -94,7 +94,7 @@ public class CPPInheritance { } } } - + /** * Merges the overriders from 'source' into 'target'. * Excludes methods in 'source' which themselves have an overrider in 'target'. @@ -119,7 +119,7 @@ public class CPPInheritance { /** * Returns the final overrider map for a class hierarchy. * Final overrider maps are cached in the AST. - * + * * @param classType the root of the class hierarchy * @param point The point of template instantiation, if applicable. * Also used to access the cache in the AST. @@ -142,15 +142,15 @@ public class CPPInheritance { } return result; } - + /** * If a given virtual method has a unique final overrider in the class hierarchy rooted at the - * given class, returns that final overrider. Otherwise, returns null. + * given class, returns that final overrider. Otherwise, returns null. * @param point The point of template instantiation, if applicable. * Also used to access the final overrider map cache in the AST. */ - public static ICPPMethod getFinalOverrider(ICPPMethod method, ICPPClassType hierarchyRoot, + public static ICPPMethod getFinalOverrider(ICPPMethod method, ICPPClassType hierarchyRoot, IASTNode point) { FinalOverriderMap map = getFinalOverriderMap(hierarchyRoot, point); Map> finalOverriders = map.getMap().get(method); @@ -164,7 +164,7 @@ public class CPPInheritance { } return null; } - + private static class FinalOverriderAnalysis { /** * Computes the final overrider map for a class hierarchy. @@ -256,7 +256,7 @@ public class CPPInheritance { ((ICPPClassType) method.getOwner()).isSameType(classType))) { continue; } - + // For purposes of this computation, every virtual method is // deemed for override itself. result.add(method, subobjectNumber, method); 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 7244f86d85a..abdd2fcdc88 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 @@ -338,7 +338,7 @@ public class CPPSemantics { final IASTName lookupName = data.getLookupName(); if (lookupName == null) return binding; - + // If this is the unqualified name of a function in a function call in a template and some // of the function arguments are dependent, a matching function could be found via // argument-dependent lookup at the point of instantiation. @@ -347,7 +347,7 @@ public class CPPSemantics { binding = CPPDeferredFunction.createForName(lookupName.getSimpleID()); } } - + if (binding instanceof IProblemBinding) return binding; @@ -560,15 +560,15 @@ public class CPPSemantics { } } } - - // If the result is a virtual method called without explicit qualification, and we can determine a - // unique final overrider for it in the hierarchy of the method call's implied object type, replace + + // If the result is a virtual method called without explicit qualification, and we can determine a + // unique final overrider for it in the hierarchy of the method call's implied object type, replace // the method with its final overrider. - if (!(lookupName.getParent() instanceof ICPPASTQualifiedName) && binding instanceof ICPPMethod && + if (!(lookupName.getParent() instanceof ICPPASTQualifiedName) && binding instanceof ICPPMethod && ((ICPPMethod) binding).isVirtual()) { IType impliedObjectType = data.getImpliedObjectType(); if (impliedObjectType instanceof ICPPClassType) { - ICPPMethod finalOverrider = CPPInheritance.getFinalOverrider((ICPPMethod) binding, + ICPPMethod finalOverrider = CPPInheritance.getFinalOverrider((ICPPMethod) binding, (ICPPClassType) impliedObjectType, lookupName); if (finalOverrider != null) { binding = finalOverrider; @@ -625,25 +625,25 @@ public class CPPSemantics { } } Object[] matchingFriendFns = CollectionUtils.filter( - friendFns, + friendFns, new NameMatcherPredicate(data.getLookupKey())).toArray(); mergeResults(data, matchingFriendFns, false); data.qualified = originalQualified; } - + private static class NameMatcherPredicate implements IUnaryPredicate { private char[] fKey; - + public NameMatcherPredicate(char[] key) { fKey = key; } - + @Override public boolean apply(ICPPFunction argument) { return Arrays.equals(argument.getNameCharArray(), fKey); } } - + static IBinding checkDeclSpecifier(IBinding binding, IASTName name, IASTNode decl) { // Check for empty declaration specifiers. if (!isCtorOrConversionOperator(binding)) { @@ -790,7 +790,7 @@ public class CPPSemantics { IBinding owner= ((IBinding) t).getOwner(); if (owner instanceof ICPPClassType) { - getAssociatedScopes((IType) owner, namespaces, friendFns, handled, tu, + getAssociatedScopes((IType) owner, namespaces, friendFns, handled, tu, false /* do not look at base classes of the enclosing class */); } else { getAssociatedNamespaceScopes(getContainingNamespaceScope((IBinding) t, tu), namespaces); @@ -1105,11 +1105,11 @@ public class CPPSemantics { return false; } - private static void lookupInlineNamespaces(LookupData data, ICPPNamespaceScope namespace) + private static void lookupInlineNamespaces(LookupData data, ICPPNamespaceScope namespace) throws DOMException { lookupInlineNamespaces(data, namespace, new HashSet()); } - + private static void lookupInlineNamespaces(LookupData data, ICPPNamespaceScope namespace, Set visited) throws DOMException { if (namespace instanceof ICPPInternalNamespaceScope) { @@ -1117,7 +1117,7 @@ public class CPPSemantics { visited.add(ns); for (ICPPInternalNamespaceScope inline : ns.getInlineNamespaces()) { if (visited.contains(inline)) { - CCorePlugin.log(IStatus.WARNING, + CCorePlugin.log(IStatus.WARNING, "Detected circular reference between inline namespaces"); //$NON-NLS-1$ continue; } @@ -1251,7 +1251,7 @@ public class CPPSemantics { if (expression instanceof ICPPASTLiteralExpression) { final ICPPASTLiteralExpression litExpr = (ICPPASTLiteralExpression) expression; if (litExpr.getKind() == IASTLiteralExpression.lk_this) { - final IType thisType = SemanticUtil.getNestedType(((ICPPEvaluationOwner)litExpr).getEvaluation().getType(litExpr), TDEF | ALLCVQ | PTR | ARRAY | MPTR | REF); + final IType thisType = SemanticUtil.getNestedType(((ICPPEvaluationOwner) litExpr).getEvaluation().getType(litExpr), TDEF | ALLCVQ | PTR | ARRAY | MPTR | REF); if (thisType instanceof ICPPUnknownBinding || thisType instanceof ICPPTemplateDefinition) { result[0]= true; return PROCESS_ABORT; @@ -1332,7 +1332,7 @@ public class CPPSemantics { return !(argument instanceof IRecursionResolvingBinding); } } - + private static IBinding[] expandUsingDeclarationsAndRemoveObjects(final IBinding[] bindings, LookupData data) { if (bindings == null || bindings.length == 0) @@ -1373,7 +1373,7 @@ public class CPPSemantics { // name lookup wants to ultimately resolve to a constructor, it can do so // after the name lookup phase, e.g. in the convertClassToConstructor() // call in postResolution(). - if (d != null && !(data.typesOnly && isObject(d)) && + if (d != null && !(data.typesOnly && isObject(d)) && !(d instanceof ICPPConstructor)) { result.add(d); } @@ -1783,7 +1783,7 @@ public class CPPSemantics { ICPPASTAliasDeclaration aliasDecl = (ICPPASTAliasDeclaration) declaration; IASTName alias = aliasDecl.getAlias(); ASTInternal.addName(scope, alias); - + // The mapping-type-id could declare an enumeration. IASTDeclSpecifier declSpec = aliasDecl.getMappingTypeId().getDeclSpecifier(); if (declSpec instanceof ICPPASTEnumerationSpecifier) { @@ -1815,7 +1815,7 @@ public class CPPSemantics { } } } - + private static void handleEnumeration(ICPPASTEnumerationSpecifier enumSpec, IScope enclosingScope) { // Add unscoped enumerators to the enclosing scope @@ -1968,7 +1968,7 @@ public class CPPSemantics { dtor = (IASTDeclarator) dtor.getParent(); } IASTInitializer init = dtor.getInitializer(); - // [basic.scope.pdecl]/p9: The point of declaration for a template parameter + // [basic.scope.pdecl]/p9: The point of declaration for a template parameter // is immediately after its complete template-parameter. // Note: can't just check "dtor.getParent() instanceof ICPPASTTemplateParameter" // because function parameter declarations implement ICPPASTTemplateParameter too. @@ -2001,7 +2001,7 @@ public class CPPSemantics { pointOfDecl = targetType.getOffset() + targetType.getLength(); } else if (prop == ICPPASTSimpleTypeTemplateParameter.PARAMETER_NAME || prop == ICPPASTTemplatedTypeTemplateParameter.PARAMETER_NAME) { - // [basic.scope.pdecl]/p9: The point of declaration for a template parameter + // [basic.scope.pdecl]/p9: The point of declaration for a template parameter // is immediately after its complete template-parameter. // Type and template template parameters are handled here; // non-type template parameters are handled in the DECLARATOR_NAME @@ -2926,7 +2926,7 @@ public class CPPSemantics { implicitType= SemanticUtil.addQualifiers(owner, ft.isConst(), ft.isVolatile(), false); return new CPPReferenceType(implicitType, ft.isRValueReference()); } - + private static IBinding resolveUserDefinedConversion(LookupData data, ICPPFunction[] fns) { ICPPASTConversionName astName= (ICPPASTConversionName) data.getLookupName(); IType t= CPPVisitor.createType(astName.getTypeId()); @@ -3119,7 +3119,7 @@ public class CPPSemantics { return function; } - + private static boolean isViableUserDefinedLiteralOperator(IBinding binding, int kind) { if (binding == null || binding instanceof ProblemBinding) { return false; @@ -3138,7 +3138,7 @@ public class CPPSemantics { } return false; } - + /** * Given a LiteralExpression with a user-defined literal suffix, * finds the corresponding defined operator. @@ -3168,7 +3168,7 @@ public class CPPSemantics { ICPPFunction[] funcs = new ICPPFunction[bindings.length]; ICPPFunctionTemplate[] tplFunctions = new ICPPFunctionTemplate[bindings.length]; LookupData data = new LookupData(((CPPASTLiteralExpression) exp).getOperatorName(), null, exp); - + int i = 0, j = 0; for (IBinding binding : bindings) { if (binding instanceof ICPPFunction || binding instanceof ICPPFunctionTemplate) { @@ -3178,15 +3178,15 @@ public class CPPSemantics { } } } - + funcs = ArrayUtil.trim(funcs, i); tplFunctions = ArrayUtil.trim(tplFunctions, j); - + if (funcs.length == 0) { // S shall not be empty return new ProblemBinding(data.getLookupName(), exp, IProblemBinding.SEMANTIC_NAME_NOT_FOUND); } - + if (kind == IASTLiteralExpression.lk_integer_constant || kind == IASTLiteralExpression.lk_float_constant) { if (kind == IASTLiteralExpression.lk_integer_constant) { /* @@ -3217,7 +3217,7 @@ public class CPPSemantics { return ret; } } - + /* * 2.14.8.3 (cont.), 2.14.8.4 (cont.) * Otherwise, S shall contain a raw literal operator or a literal @@ -3228,26 +3228,26 @@ public class CPPSemantics { data = new LookupData(((CPPASTLiteralExpression) exp).getOperatorName(), null, exp); data.setFunctionArguments(false, createArgForType(exp, charArray)); ret = resolveFunction(data, funcs, true); - + // char[] stringLiteral = exp.getValue(); // The string literal that was passed to the operator - + // The string literal is passed to the operator as chars: // "literal"_op -> operator "" _op<'l', 'i', 't', 'e', 'r', 'a', 'l'>(); ICPPTemplateArgument args[] = new ICPPTemplateArgument[stringLiteral.length]; for (int k = 0; k < stringLiteral.length; k++) { args[k] = new CPPTemplateNonTypeArgument(new EvalFixed(CPPBasicType.CHAR, PRVALUE, IntegralValue.create(stringLiteral[k])), exp); } - + data = new LookupData(((CPPASTLiteralExpression) exp).getOperatorName(), args, exp); IBinding litTpl = resolveFunction(data, tplFunctions, true); - + // Do we have valid template and non-template bindings? if (ret != null && !(ret instanceof IProblemBinding)) { // Do we have valid template and non-template bindings? if (litTpl instanceof ICPPFunctionInstance) { // Ambiguity? It has two valid options, and the spec says it shouldn't - return new ProblemBinding(data.getLookupName(), exp, IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP, tplFunctions); + return new ProblemBinding(data.getLookupName(), exp, IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP, tplFunctions); } } else { if (litTpl instanceof ICPPFunctionInstance) { @@ -3285,10 +3285,10 @@ public class CPPSemantics { data.setFunctionArguments(false, createArgForType(exp, t)); ret = resolveFunction(data, funcs, true); } - + return ret; } - + static ICPPFunction resolveTargetedFunction(IType targetType, CPPFunctionSet set, IASTNode point) { targetType= getNestedType(targetType, TDEF | REF | CVTYPE | PTR | MPTR); if (!(targetType instanceof ICPPFunctionType)) @@ -3361,7 +3361,7 @@ public class CPPSemantics { public static ICPPFunction findOverloadedOperator(ICPPASTNewExpression expr) { OverloadableOperator op = OverloadableOperator.fromNewExpression(expr); - final ICPPEvaluation evaluation = ((ICPPEvaluationOwner)expr).getEvaluation(); + final ICPPEvaluation evaluation = ((ICPPEvaluationOwner) expr).getEvaluation(); if (evaluation.isTypeDependent()) return null; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java index 36a5f2b2664..a87d406ebf6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java @@ -501,7 +501,7 @@ public class CPPTemplates { } } - private static IBinding deferredInstance(ICPPPartiallySpecializable template, + private static IBinding deferredInstance(ICPPPartiallySpecializable template, ICPPTemplateArgument[] arguments, IASTNode point) throws DOMException { ICPPTemplateInstance instance= getInstance(template, arguments, false); if (instance != null) @@ -517,7 +517,7 @@ public class CPPTemplates { CPPTemplateParameterMap tpMap = createParameterMap(template, arguments, point); InstantiationContext context = new InstantiationContext(tpMap, point); IType type = instantiateType(variableTemplate.getType(), context); - IValue value = instantiateValue(variableTemplate.getInitialValue(), context, + IValue value = instantiateValue(variableTemplate.getInitialValue(), context, IntegralValue.MAX_RECURSION_DEPTH); instance = new CPPVariableInstance(template, template.getOwner(), tpMap, arguments, type, value); } @@ -988,17 +988,17 @@ public class CPPTemplates { } return result; } - + // TODO(nathanridge): Handle this as a case in createSpecialization() public static ICPPVariable createVariableSpecialization(InstantiationContext context, ICPPVariable variable) { - final IType type = variable.getType(); + final IType type = variable.getType(); final IType newType = instantiateType(type, context); final IValue value = variable.getInitialValue(); final IValue newValue = instantiateValue(value, context, IntegralValue.MAX_RECURSION_DEPTH); - if(type == newType && value == newValue) { + if (type == newType && value == newValue) { return variable; } - ICPPVariable newVariable = new CPPVariableSpecialization(variable, context.getContextSpecialization(), + ICPPVariable newVariable = new CPPVariableSpecialization(variable, context.getContextSpecialization(), context.getParameterMap(), newType, newValue); context.putInstantiatedLocal(variable, newVariable); return newVariable; @@ -1007,8 +1007,8 @@ public class CPPTemplates { public static IBinding createSpecialization(ICPPSpecialization owner, IBinding decl, IASTNode point) { IBinding spec = null; final ICPPTemplateParameterMap tpMap= owner.getTemplateParameterMap(); - final ICPPClassSpecialization classOwner = (owner instanceof ICPPClassSpecialization) ? (ICPPClassSpecialization)owner : null; - + final ICPPClassSpecialization classOwner = (owner instanceof ICPPClassSpecialization) ? (ICPPClassSpecialization) owner : null; + // Guard against infinite recursion during template instantiation with a depth limit. int instantiationDepth = fTemplateInstantiationDepth.get(); if (instantiationDepth > TEMPLATE_INSTANTIATION_DEPTH_LIMIT) { @@ -1016,7 +1016,7 @@ public class CPPTemplates { } // Increment the instantiation depth for the duration of this call. fTemplateInstantiationDepth.set(instantiationDepth + 1); - + try { if (decl instanceof ICPPClassTemplatePartialSpecialization && classOwner != null) { try { @@ -1149,7 +1149,7 @@ public class CPPTemplates { return spec; } - private static InstantiationContext createInstantiationContext(ICPPTemplateParameterMap tpMap, + private static InstantiationContext createInstantiationContext(ICPPTemplateParameterMap tpMap, IBinding owner, IASTNode point) { return new InstantiationContext(tpMap, getSpecializationContext(owner), point); } @@ -1735,9 +1735,9 @@ public class CPPTemplates { CPPTemplateParameterMap newMap = instantiateArgumentMap( origInstance.getTemplateParameterMap(), context); IType newType = instantiateType(origInstance.getType(), context); - IValue newValue = instantiateValue(origInstance.getInitialValue(), context, + IValue newValue = instantiateValue(origInstance.getInitialValue(), context, IntegralValue.MAX_RECURSION_DEPTH); - return new CPPVariableInstance(origInstance.getTemplateDefinition(), origInstance.getOwner(), + return new CPPVariableInstance(origInstance.getTemplateDefinition(), origInstance.getOwner(), newMap, newArgs, newType, newValue); } } @@ -1957,7 +1957,7 @@ public class CPPTemplates { } node= innerMostTDecl; - while(node instanceof ICPPASTInternalTemplateDeclaration) { + while (node instanceof ICPPASTInternalTemplateDeclaration) { if (--nestingLevel < 0) nestingLevel= 0; tdecl= (ICPPASTInternalTemplateDeclaration) node; @@ -1987,7 +1987,7 @@ public class CPPTemplates { private static CharArraySet collectTemplateParameterNames(ICPPASTTemplateDeclaration tdecl) { CharArraySet set= new CharArraySet(4); - while(true) { + while (true) { ICPPASTTemplateParameter[] pars = tdecl.getTemplateParameters(); for (ICPPASTTemplateParameter par : pars) { IASTName name= getTemplateParameterName(par); @@ -2100,7 +2100,7 @@ public class CPPTemplates { } private static ICPPASTInternalTemplateDeclaration getDirectlyEnclosingTemplateDeclaration( - ICPPASTInternalTemplateDeclaration tdecl ) { + ICPPASTInternalTemplateDeclaration tdecl) { final IASTNode parent= tdecl.getParent(); if (parent instanceof ICPPASTInternalTemplateDeclaration) return (ICPPASTInternalTemplateDeclaration) parent; @@ -2194,7 +2194,7 @@ public class CPPTemplates { result[i]= new CPPTemplateTypeArgument(CPPVisitor.createType((IASTTypeId) arg)); } else if (arg instanceof ICPPASTExpression) { ICPPASTExpression expr= (ICPPASTExpression) arg; - result[i]= new CPPTemplateNonTypeArgument(((ICPPEvaluationOwner)expr).getEvaluation(), expr); + result[i]= new CPPTemplateNonTypeArgument(((ICPPEvaluationOwner) expr).getEvaluation(), expr); } else if (arg instanceof ICPPASTAmbiguousTemplateArgument) { IProblemBinding problem = new ProblemBinding(id, IProblemBinding.SEMANTIC_INVALID_TEMPLATE_ARGUMENTS); throw new DOMException(problem); @@ -2466,7 +2466,7 @@ public class CPPTemplates { final ICPPFunctionType transFt1 = getFunctionTypeIgnoringParametersWithDefaults(transF1); IType[] pars; IType[] args; - switch(mode) { + switch (mode) { case RETURN_TYPE: pars= new IType[] {ft2.getReturnType()}; args= new IType[] {transFt1.getReturnType()}; @@ -2730,7 +2730,7 @@ public class CPPTemplates { } if (!matchTemplateTemplateParameters(((ICPPTemplateTemplateParameter) pp).getTemplateParameters(), - ((ICPPTemplateTemplateParameter) ap).getTemplateParameters()) ) + ((ICPPTemplateTemplateParameter) ap).getTemplateParameters())) return false; } } @@ -3100,7 +3100,7 @@ public class CPPTemplates { } /** - * Returns the instantiated function body of the given function specialization. + * Returns the instantiated function body of the given function specialization. * @param point The point of instantiation for name lookups */ public static ICPPExecution instantiateFunctionBody(T f, @@ -3117,24 +3117,24 @@ public class CPPTemplates { } return exec; } - + private static void addInstantiatedParameters( InstantiationContext context, T spec) { ICPPFunction specialized = (ICPPFunction) spec.getSpecializedBinding(); ICPPParameter paramSpecs[] = spec.getParameters(); ICPPParameter specializedParams[] = specialized.getParameters(); - for(int i = 0; i < paramSpecs.length; i++) { + for (int i = 0; i < paramSpecs.length; i++) { final ICPPParameter paramSpecialization = paramSpecs[i]; final ICPPParameter specializedParam = specializedParams[i]; context.putInstantiatedLocal(specializedParam, paramSpecialization); - if(specializedParam.isParameterPack()) { + if (specializedParam.isParameterPack()) { break; } } } - + /** - * Returns the instantiated constructor chain of the given constructor specialization. + * Returns the instantiated constructor chain of the given constructor specialization. * @param point The point of instantiation for name lookups */ public static ICPPExecution instantiateConstructorChain( diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java index f9b9d459bc9..68ed9609919 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java @@ -369,7 +369,7 @@ public class CPPVisitor extends ASTQueries { scope= ((ICPPClassType) t).getCompositeScope(); } } else if (pb instanceof ICPPNamespace) { - scope= ((ICPPNamespace)pb).getNamespaceScope(); + scope= ((ICPPNamespace) pb).getNamespaceScope(); } return scope == inScope; @@ -1393,7 +1393,7 @@ public class CPPVisitor extends ASTQueries { name = ((IASTIdExpression) node).getName(); if (isLabelReference(node)) { return resolveLabel(name); - } + } break; } else if (node instanceof ICPPASTFieldReference) { name = ((ICPPASTFieldReference) node).getFieldName(); @@ -2198,7 +2198,7 @@ public class CPPVisitor extends ASTQueries { } } type = decorateType(type, declSpec, declarator); - final ICPPEvaluation evaluation = ((ICPPEvaluationOwner)initClause).getEvaluation(); + final ICPPEvaluation evaluation = ((ICPPEvaluationOwner) initClause).getEvaluation(); initType= evaluation.getType(declarator); valueCat= evaluation.getValueCategory(declarator); if (initType == null || initType instanceof ISemanticProblem) { @@ -2380,7 +2380,7 @@ public class CPPVisitor extends ASTQueries { break; } else if (scope instanceof ICPPClassScope) { // Reached a class scope without a function scope in between. - // Might be in the default member initializer on a field. + // Might be in the default member initializer on a field. IType type = ((ICPPClassScope) scope).getClassType(); if (type instanceof ICPPClassTemplate) { type= (ICPPClassType) ((ICPPClassTemplate) type).asDeferredInstance(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CVQualifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CVQualifier.java index c716f9bddeb..aeeea32c090 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CVQualifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CVQualifier.java @@ -7,14 +7,14 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics; /** * Represents the possible cv-qualification of a type. */ public enum CVQualifier { - CONST_VOLATILE_RESTRICT(1 | 2 | 4), CONST_VOLATILE(1 | 2), CONST_RESTRICT(1 | 4), CONST(1), + CONST_VOLATILE_RESTRICT(1 | 2 | 4), CONST_VOLATILE(1 | 2), CONST_RESTRICT(1 | 4), CONST(1), VOLATILE_RESTRICT(2 | 4), VOLATILE(2), RESTRICT(4), NONE(0); private static final int C = 1; @@ -44,7 +44,7 @@ public enum CVQualifier { } public boolean isMoreQualifiedThan(CVQualifier other) { - return this != other && isAtLeastAsQualifiedAs(other); + return this != other && isAtLeastAsQualifiedAs(other); } public CVQualifier add(CVQualifier cvq) { @@ -73,11 +73,11 @@ public enum CVQualifier { * ordering on cv-qualifiers, so that a type can be said to be more * cv-qualified than another. * @return

    - *
  • 7 if cv1 == const volatile restrict cv2 + *
  • 7 if cv1 == const volatile restrict cv2 *
  • 6 if cv1 == volatile restrict cv2 *
  • 5 if cv1 == const restrict cv2 *
  • 4 if cv1 == restrict cv2 - *
  • 3 if cv1 == const volatile cv2 + *
  • 3 if cv1 == const volatile cv2 *
  • 2 if cv1 == volatile cv2 *
  • 1 if cv1 == const cv2 *
  • EQ 0 if cv1 == cv2 diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Conversions.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Conversions.java index 7e234767e5a..efe3fb8ca0d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Conversions.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Conversions.java @@ -166,8 +166,8 @@ public class Conversions { if (isLValueRef && getCVQualifier(cv1T1) != CVQualifier.CONST) { return Cost.NO_CONVERSION; } - - // If the initializer expression is an xvalue, class prvalue, array prvalue, or function lvalue + + // If the initializer expression is an xvalue, class prvalue, array prvalue, or function lvalue // and 'cv1 T1' is reference-compatible with 'cv2 T2', then the reference is bound to the value // of the initializer expression (or the appropriate base class subobject). if (valueCat == ValueCategory.XVALUE @@ -179,7 +179,7 @@ public class Conversions { return cost; } } - + // If the initializer expression has class type (i.e. T2 is a class type), where T1 is not // reference-related to T2, and can be implicitly converted to an xvalue, class prvalue, // or function lvalue of type 'cv3 T3', where 'cv1 T1' is reference-compatible with 'cv3 T3', @@ -238,7 +238,7 @@ public class Conversions { * Note that there's a difference between returning null and returning Cost.NO_CONVERSION: * in the former case, the caller will continue trying other conversion methods. */ - private static Cost initializationByConversionForDirectReference(final IType cv1T1, final IType cv2T2, final ICPPClassType T2, + private static Cost initializationByConversionForDirectReference(final IType cv1T1, final IType cv2T2, final ICPPClassType T2, boolean needLValue, boolean illFormedIfLValue, Context ctx, IASTNode point) throws DOMException { ICPPMethod[] fcns= SemanticUtil.getConversionOperators(T2, point); @@ -272,7 +272,7 @@ public class Conversions { ambiguousConversionOperator= cmp == 0; operatorCost= cost; operatorCost.setUserDefinedConversion(op); - + if (illFormedIfLValue && isLValueRef) { operatorCost = Cost.NO_CONVERSION; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java index 12260e4863f..4ed56c27e42 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java @@ -28,7 +28,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBasicType; /** * The cost of an implicit conversion sequence. - * + * * See [over.best.ics] 13.3.3.1. */ public class Cost { @@ -36,7 +36,7 @@ public class Cost { NONE, COPY_INIT_OF_CLASS, INIT_BY_CONVERSION, LIST_INIT_OF_CLASS, DIRECT_LIST_INIT_OF_CLASS } public enum Rank { - IDENTITY, PROMOTION, CONVERSION, CONVERSION_PTR_BOOL, + IDENTITY, PROMOTION, CONVERSION, CONVERSION_PTR_BOOL, USER_DEFINED_CONVERSION, ELLIPSIS_CONVERSION, NO_MATCH } enum ReferenceBinding { @@ -95,16 +95,16 @@ public class Cost { private ICPPFunction fUserDefinedConversion; private ReferenceBinding fReferenceBinding; private boolean fCouldNarrow; - + // For a list-initialization sequence, 'target' is not always the original - // target type. Specifically, for an original target type of + // target type. Specifically, for an original target type of // std::initializer_list or array of T, 'target' will be T, but we need // to know the original target as well so we store it here. - // This will be null iff. this is not a list-initialization sequence. + // This will be null iff. this is not a list-initialization sequence. private IType fListInitializationTarget; - + private ICPPFunction fSelectedFunction; // For targeted functions - + public Cost(IType s, IType t, Rank rank) { source = s; target = t; @@ -119,7 +119,7 @@ public class Cost { public final boolean converts() { return fRank != Rank.NO_MATCH; } - + public void setRank(Rank rank) { fRank= rank; } @@ -131,7 +131,7 @@ public class Cost { public void setReferenceBinding(ReferenceBinding binding) { fReferenceBinding= binding; } - + public boolean isAmbiguousUDC() { return fAmbiguousUDC; } @@ -179,12 +179,12 @@ public class Cost { public int compareTo(Cost other) { if (other == null) return -1; - + // cannot compare costs with deferred user defined conversions assert fDeferredUDC == DeferredUDC.NONE && other.fDeferredUDC == DeferredUDC.NONE; // 7.3.3.13 (using declarations in classes): - // for overload resolution the implicit this pointer + // for overload resolution the implicit this pointer // is treated as if it were a pointer to the derived class final boolean ignoreInheritanceDist= fImpliedObject && other.fImpliedObject; Rank rank = fRank; @@ -197,12 +197,12 @@ public class Cost { } int cmp= rank.compareTo(otherRank); - if (cmp != 0) + if (cmp != 0) return cmp; - + // [over.ics.rank] p3.3: // List-initialization sequence L1 is a better conversion sequence than - // list-initialization sequence L2 if + // list-initialization sequence L2 if if (fListInitializationTarget != null && other.fListInitializationTarget != null) { // - L1 converts to std::initializer_list for some X and L2 does not, // or if not that, @@ -213,7 +213,7 @@ public class Cost { } else if (initListType == null && otherInitListType != null) { return 1; } - + // - L1 converts to type "array of N1 T", L2 converts to type "array of // N2 T", and N1 is smaller than N2 if (fListInitializationTarget instanceof IArrayType && other.fListInitializationTarget instanceof IArrayType) { @@ -230,23 +230,23 @@ public class Cost { } } } - + // rank is equal if (rank == Rank.USER_DEFINED_CONVERSION) { // 13.3.3.1.10 if (isAmbiguousUDC() || other.isAmbiguousUDC()) return 0; - + if (fUserDefinedConversion != other.fUserDefinedConversion) { if (fUserDefinedConversion == null || !fUserDefinedConversion.equals(other.fUserDefinedConversion)) return 0; - } + } cmp= fSecondStandardConversionRank.compareTo(other.fSecondStandardConversionRank); if (cmp != 0) return cmp; } - + if (!ignoreInheritanceDist) { cmp= fInheritanceDistance - other.fInheritanceDistance; if (cmp != 0) @@ -265,13 +265,13 @@ public class Cost { int qdiff= fQualificationAdjustments ^ other.fQualificationAdjustments; if (fReferenceBinding == ReferenceBinding.NO_REF || other.fReferenceBinding == ReferenceBinding.NO_REF) qdiff &= ~7; - + if (qdiff != 0) { if ((fQualificationAdjustments & qdiff) == 0) return -1; if ((other.fQualificationAdjustments & qdiff) == 0) return 1; - } + } return 0; } @@ -347,15 +347,15 @@ public class Cost { // From a floating-point type to an integer type return true; } else if (basicSource.getKind() == Kind.eDouble - && (basicTarget.getKind() == Kind.eFloat + && (basicTarget.getKind() == Kind.eFloat || (basicTarget.getKind() == Kind.eDouble && !basicTarget.isLong() && basicSource.isLong()))) { // From long double to double or float, or from double to float constantExprExceptionApplies = true; } else if (BuiltinOperators.isIntegral(basicSource) && BuiltinOperators.isFloatingPoint(basicTarget)) { // From an integer type or unscoped enumeration type to a floating-point type constantExprExceptionApplies = true; - } else if (BuiltinOperators.isIntegral(basicSource) - && BuiltinOperators.isIntegral(basicTarget) + } else if (BuiltinOperators.isIntegral(basicSource) + && BuiltinOperators.isIntegral(basicTarget) && !ArithmeticConversion.fitsIntoType(basicTarget, basicSource, point)) { // From an integer type or unscoped enumeration type to an integer type that // cannot represent all the values of the original type @@ -379,7 +379,7 @@ public class Cost { } /** - * Stores a selected function. Used when resolving targeted functions. + * Stores a selected function. Used when resolving targeted functions. */ public void setSelectedFunction(ICPPFunction function) { fSelectedFunction= function; @@ -392,7 +392,7 @@ public class Cost { public void setImpliedObject() { fImpliedObject= true; } - + public void setListInitializationTarget(IType target) { fListInitializationTarget = target; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinary.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinary.java index 18757a56829..14d2ae02e6b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinary.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinary.java @@ -151,10 +151,10 @@ public class EvalBinary extends CPPDependentEvaluation { } return fType; } - + private ICPPEvaluation createOperatorOverloadEvaluation(ICPPFunction overload, IASTNode point, ICPPEvaluation arg1, ICPPEvaluation arg2) { EvalFunctionCall operatorCall; - if(overload instanceof ICPPMethod) { + if (overload instanceof ICPPMethod) { EvalMemberAccess opAccess = new EvalMemberAccess(arg1.getType(point), ValueCategory.LVALUE, overload, arg1, false, point); ICPPEvaluation[] args = new ICPPEvaluation[]{opAccess, arg2}; operatorCall = new EvalFunctionCall(args, arg1, point); @@ -186,7 +186,7 @@ public class EvalBinary extends CPPDependentEvaluation { return IntegralValue.ERROR; } if (fOverloadCall == null) { - fOverloadCall = createOperatorOverloadEvaluation(overload, point, arg1, arg2); + fOverloadCall = createOperatorOverloadEvaluation(overload, point, arg1, arg2); } return fOverloadCall.getValue(point); } @@ -221,10 +221,10 @@ public class EvalBinary extends CPPDependentEvaluation { } else if (fOperator == op_logicalOr) { return v1; } - + Number num2 = v2.numberValue(); if (num2 != null) { - return ValueFactory.evaluateBinaryExpression(fOperator, v1, v2); + return ValueFactory.evaluateBinaryExpression(fOperator, v1, v2); } } return IntegralValue.create(this); @@ -306,7 +306,7 @@ public class EvalBinary extends CPPDependentEvaluation { private ICPPFunction computeOverload(IASTNode point) { if (isTypeDependent()) return null; - + if (fOperator == op_arrayAccess) { IType type = fArg1.getType(point); type= SemanticUtil.getNestedType(type, TDEF | REF | CVTYPE); @@ -434,49 +434,49 @@ public class EvalBinary extends CPPDependentEvaluation { ICPPEvaluation operatorCall = createOperatorOverloadEvaluation(overload, context.getPoint(), fArg1, fArg2); return operatorCall.computeForFunctionCall(record, context); } - + Pair vp1 = EvalUtil.getValuePair(fArg1, record, context); final ICPPEvaluation updateable1 = vp1.getFirst(); final ICPPEvaluation fixed1 = vp1.getSecond(); Pair vp2 = EvalUtil.getValuePair(fArg2, record, context); final ICPPEvaluation fixed2 = vp2.getSecond(); ICPPEvaluation eval = fixed1 == fArg1 && fixed2 == fArg2 ? this : new EvalBinary(fOperator, fixed1, fixed2, getTemplateDefinition()); - - if(isBinaryOperationWithAssignment(fOperator)) { + + if (isBinaryOperationWithAssignment(fOperator)) { if (isPointerToArray(fixed1) && hasIntType(fixed2, context)) { - EvalPointer evalPointer = (EvalPointer)fixed1; + EvalPointer evalPointer = (EvalPointer) fixed1; int currentPos = evalPointer.getPosition(); int rhs = fixed2.getValue(context.getPoint()).numberValue().intValue(); - - if(fOperator == op_plusAssign) { + + if (fOperator == op_plusAssign) { evalPointer.setPosition(currentPos + rhs); - } else if(fOperator == op_minusAssign) { + } else if (fOperator == op_minusAssign) { evalPointer.setPosition(currentPos - rhs); } else { return EvalFixed.INCOMPLETE; } } else { - int binaryOperator = getBinaryOperatorWithoutAssignment(fOperator); + int binaryOperator = getBinaryOperatorWithoutAssignment(fOperator); EvalBinary binaryOpEval = new EvalBinary(binaryOperator, fixed1, fixed2, getTemplateDefinition()); EvalBinary assignmentEval = new EvalBinary(op_assign, updateable1, binaryOpEval, getTemplateDefinition()); return assignmentEval.computeForFunctionCall(record, context); } - } else if(fOperator == op_assign) { + } else if (fOperator == op_assign) { ICPPEvaluation newValue = null; - if(fixed2 instanceof EvalPointer) { + if (fixed2 instanceof EvalPointer) { newValue = fixed2; } else { newValue = new EvalFixed(fixed2.getType(context.getPoint()), fixed2.getValueCategory(context.getPoint()), fixed2.getValue(context.getPoint())); } - + if (updateable1 instanceof EvalReference && !(updateable1 instanceof EvalPointer)) { - EvalReference evalRef = (EvalReference)updateable1; + EvalReference evalRef = (EvalReference) updateable1; evalRef.update(newValue); } else if (updateable1 instanceof EvalCompositeAccess) { - EvalCompositeAccess evalCompAccess = (EvalCompositeAccess)updateable1; + EvalCompositeAccess evalCompAccess = (EvalCompositeAccess) updateable1; evalCompAccess.update(newValue); } else if (updateable1 instanceof EvalBinding) { - EvalBinding evalBinding = (EvalBinding)updateable1; + EvalBinding evalBinding = (EvalBinding) updateable1; record.update(evalBinding.getBinding(), newValue); } return updateable1; @@ -498,11 +498,11 @@ public class EvalBinary extends CPPDependentEvaluation { IType type = arg2.getType(context.getPoint()); return (type instanceof IBasicType && ((IBasicType) type).getKind() == IBasicType.Kind.eInt); } - + private boolean isArray(ICPPEvaluation eval, ConstexprEvaluationContext context) { return eval.getType(context.getPoint()) instanceof IArrayType; } - + private boolean isPointerToArray(ICPPEvaluation argument) { if (argument instanceof EvalPointer) { EvalPointer evalPointer = (EvalPointer) argument; @@ -526,11 +526,11 @@ public class EvalBinary extends CPPDependentEvaluation { case op_shiftLeftAssign: case op_shiftRightAssign: return true; - default: + default: return false; } } - + private static int getBinaryOperatorWithoutAssignment(int operator) { switch (operator) { case op_binaryAndAssign: @@ -567,7 +567,7 @@ public class EvalBinary extends CPPDependentEvaluation { public boolean referencesTemplateParameter() { return fArg1.referencesTemplateParameter() || fArg2.referencesTemplateParameter(); } - + @Override public String toString() { return fArg1.toString() + " " + fArg2.toString(); //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinaryTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinaryTypeId.java index 0344a91cd59..d8f5f48a45d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinaryTypeId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinaryTypeId.java @@ -41,7 +41,7 @@ public class EvalBinaryTypeId extends CPPDependentEvaluation { private boolean fIsValueDependent; public EvalBinaryTypeId(Operator kind, IType type1, IType type2, IASTNode pointOfDefinition) { - this(kind, type1, type2, findEnclosingTemplate(pointOfDefinition)); + this(kind, type1, type2, findEnclosingTemplate(pointOfDefinition)); } public EvalBinaryTypeId(Operator kind, IType type1, IType type2, IBinding templateDefinition) { @@ -104,7 +104,7 @@ public class EvalBinaryTypeId extends CPPDependentEvaluation { } return fIsValueDependent; } - + @Override public boolean isConstantExpression(IASTNode point) { return true; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinding.java index 4410de4ff91..ca84135435a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinding.java @@ -65,7 +65,7 @@ public class EvalBinding extends CPPDependentEvaluation { /** * The binding represented by this evaluation. For a function parameter binding may be computed * lazily to avoid infinite recursion during unmarshalling of the evaluation. If #fBinding is - * {@code null}, {@link #fParameterOwner} is guaranteed to be not {@code null} and vice versa. + * {@code null}, {@link #fParameterOwner} is guaranteed to be not {@code null} and vice versa. */ private IBinding fBinding; private final boolean fFixedType; @@ -132,10 +132,10 @@ public class EvalBinding extends CPPDependentEvaluation { /** * Finds a given object in an array. - * + * * @param array the array to find the object in * @param obj the object to find - * @return the index of the object in the array, or -1 if the object is not in the array + * @return the index of the object in the array, or -1 if the object is not in the array */ private static int findInArray(Object[] array, Object obj) { for (int i = 0; i < array.length; i++) { @@ -242,7 +242,7 @@ public class EvalBinding extends CPPDependentEvaluation { } return false; } - + @Override public boolean isConstantExpression(IASTNode point) { if (!fCheckedIsConstantExpression) { @@ -251,11 +251,11 @@ public class EvalBinding extends CPPDependentEvaluation { } return fIsConstantExpression; } - + private boolean computeIsConstantExpression(IASTNode point) { return fBinding instanceof IEnumerator || fBinding instanceof ICPPFunction - || (fBinding instanceof IVariable && isConstexprValue(((IVariable) fBinding).getInitialValue(), point)); + || (fBinding instanceof IVariable && isConstexprValue(((IVariable) fBinding).getInitialValue(), point)); } @Override @@ -273,9 +273,9 @@ public class EvalBinding extends CPPDependentEvaluation { } if (binding instanceof ICPPTemplateNonTypeParameter) { IType type= ((ICPPTemplateNonTypeParameter) binding).getType(); - // If the binding is a non-type parameter pack, it must have been - // referenced from inside the expansion pattern of a pack expansion. - // In such a context, the type of the binding is the type of each + // If the binding is a non-type parameter pack, it must have been + // referenced from inside the expansion pattern of a pack expansion. + // In such a context, the type of the binding is the type of each // parameter in the parameter pack, not the type of the pack itself. if (type instanceof ICPPParameterPackType) type = ((ICPPParameterPackType) type).getType(); @@ -328,11 +328,11 @@ public class EvalBinding extends CPPDependentEvaluation { return IntegralValue.create(this); IValue value= null; - - if(fBinding instanceof ICPPVariable) { - ICPPEvaluation valueEval = EvalUtil.getVariableValue((ICPPVariable)fBinding, + + if (fBinding instanceof ICPPVariable) { + ICPPEvaluation valueEval = EvalUtil.getVariableValue((ICPPVariable) fBinding, new ActivationRecord()); - if(valueEval != null) { + if (valueEval != null) { value = valueEval.getValue(point); } } else if (fBinding instanceof IEnumerator) { @@ -392,38 +392,38 @@ public class EvalBinding extends CPPDependentEvaluation { @Override public ICPPEvaluation instantiate(InstantiationContext context, int maxDepth) { IBinding origBinding = getBinding(); - final CPPTemplateParameterMap tpMap = (CPPTemplateParameterMap)context.getParameterMap(); + final CPPTemplateParameterMap tpMap = (CPPTemplateParameterMap) context.getParameterMap(); final int packOffset = context.getPackOffset(); - - IVariable newBinding = tpMap == null ? null : (IVariable)context.getInstantiatedLocal(origBinding); - if(newBinding != null) { - IType origType = ((IVariable)origBinding).getType(); + + IVariable newBinding = tpMap == null ? null : (IVariable) context.getInstantiatedLocal(origBinding); + if (newBinding != null) { + IType origType = ((IVariable) origBinding).getType(); EvalBinding newBindingEval = null; - if(origType instanceof ICPPParameterPackType) { + if (origType instanceof ICPPParameterPackType) { origType = ((ICPPParameterPackType) origType).getType(); IType instantiatedType = CPPTemplates.instantiateType(origType, context); - if(origType != instantiatedType) { + if (origType != instantiatedType) { newBindingEval = new EvalBinding(newBinding, instantiatedType, getTemplateDefinition()); } } - - if(newBindingEval == null) { + + if (newBindingEval == null) { newBindingEval = new EvalBinding(newBinding, newBinding.getType(), getTemplateDefinition()); } - if(context.hasPackOffset()) { + if (context.hasPackOffset()) { return new EvalCompositeAccess(newBindingEval, packOffset); } else { return newBindingEval; } } - + if (origBinding instanceof ICPPTemplateNonTypeParameter) { ICPPTemplateArgument argument = context.getArgument((ICPPTemplateNonTypeParameter) origBinding); if (argument != null && argument.isNonTypeValue()) { return argument.getNonTypeEvaluation(); } } else if (origBinding instanceof ICPPParameter) { - ICPPParameter parameter = (ICPPParameter) origBinding; + ICPPParameter parameter = (ICPPParameter) origBinding; IType origType = parameter.getType(); if (origType instanceof ICPPParameterPackType && context.hasPackOffset()) { origType = ((ICPPParameterPackType) origType).getType(); @@ -443,8 +443,8 @@ public class EvalBinding extends CPPDependentEvaluation { @Override public ICPPEvaluation computeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { ICPPEvaluation eval = record.getVariable(getBinding()); - - if(eval != null) { + + if (eval != null) { return eval; } else { return this; @@ -467,7 +467,7 @@ public class EvalBinding extends CPPDependentEvaluation { ICPPParameterPackType type = (ICPPParameterPackType) ((ICPPParameter) binding).getType(); return CPPTemplates.determinePackSize(type.getType(), tpMap); } - + if (binding instanceof ICPPSpecialization) { binding = ((ICPPSpecialization) binding).getSpecializedBinding(); } @@ -489,7 +489,7 @@ public class EvalBinding extends CPPDependentEvaluation { // represents a template parameter. return fBinding instanceof ICPPTemplateParameter; } - + @Override public String toString() { return getBinding().toString(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompositeAccess.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompositeAccess.java index 67de1ad2b69..b9d91b27da5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompositeAccess.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompositeAccess.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -44,7 +44,7 @@ public class EvalCompositeAccess implements ICPPEvaluation { public void update(ICPPEvaluation newValue) { parent.getValue(null).setSubValue(getElementId(), newValue); } - + @Override public boolean isInitializerList() { return getTargetEvaluation().isInitializerList(); @@ -52,8 +52,8 @@ public class EvalCompositeAccess implements ICPPEvaluation { private ICPPEvaluation getTargetEvaluation() { return getParent().getValue(null).getSubValue(getElementId()); - } - + } + @Override public boolean isFunctionSet() { return getTargetEvaluation().isFunctionSet(); @@ -78,20 +78,20 @@ public class EvalCompositeAccess implements ICPPEvaluation { public IType getType(IASTNode point) { IType type = getParent().getType(point); type = SemanticUtil.getNestedType(type, TDEF | REF | CVTYPE); - - if(type instanceof IArrayType) { - IArrayType arrayType = (IArrayType)type; + + if (type instanceof IArrayType) { + IArrayType arrayType = (IArrayType) type; return arrayType.getType(); - } else if(type instanceof InitializerListType) { - InitializerListType initListType = (InitializerListType)type; + } else if (type instanceof InitializerListType) { + InitializerListType initListType = (InitializerListType) type; return initListType.getEvaluation().getClauses()[getElementId()].getType(point); - } else if(type instanceof ICompositeType) { - ICompositeType compositeType = (ICompositeType)type; + } else if (type instanceof ICompositeType) { + ICompositeType compositeType = (ICompositeType) type; return compositeType.getFields()[getElementId()].getType(); - } else if(type instanceof ParameterPackType) { - ParameterPackType parameterPackType = (ParameterPackType)type; + } else if (type instanceof ParameterPackType) { + ParameterPackType parameterPackType = (ParameterPackType) type; return parameterPackType.getTypes()[getElementId()]; - } else if(type instanceof ICPPBasicType) { + } else if (type instanceof ICPPBasicType) { return type; } return null; @@ -114,7 +114,7 @@ public class EvalCompositeAccess implements ICPPEvaluation { @Override public ICPPEvaluation computeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { - if(getTargetEvaluation() != EvalFixed.INCOMPLETE) { + if (getTargetEvaluation() != EvalFixed.INCOMPLETE) { return getTargetEvaluation().computeForFunctionCall(record, context); } else { ICPPEvaluation evaluatedComposite = parent.computeForFunctionCall(record, context); @@ -149,16 +149,16 @@ public class EvalCompositeAccess implements ICPPEvaluation { public ICPPEvaluation instantiate(InstantiationContext context, int maxDepth) { return getTargetEvaluation().instantiate(context, maxDepth); } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EVAL_COMPOSITE_ACCESS); buffer.marshalEvaluation(parent, includeValue); - buffer.putInt(elementId); + buffer.putInt(elementId); } public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation parent = (ICPPEvaluation)buffer.unmarshalEvaluation(); + ICPPEvaluation parent = (ICPPEvaluation) buffer.unmarshalEvaluation(); int elementId = buffer.getInt(); return new EvalCompositeAccess(parent, elementId); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompoundStatementExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompoundStatementExpression.java index 02e8855a2e3..bea0862a89f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompoundStatementExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompoundStatementExpression.java @@ -68,10 +68,10 @@ public class EvalCompoundStatementExpression extends CPPDependentEvaluation { public boolean isValueDependent() { return fDelegate.isValueDependent(); } - + @Override public boolean isConstantExpression(IASTNode point) { - return fDelegate.isConstantExpression(point); + return fDelegate.isConstantExpression(point); } @Override @@ -113,7 +113,7 @@ public class EvalCompoundStatementExpression extends CPPDependentEvaluation { @Override public ICPPEvaluation computeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { ICPPEvaluation delegate = fDelegate.computeForFunctionCall(record, context.recordStep()); - if(delegate == fDelegate) { + if (delegate == fDelegate) { return this; } else { EvalCompoundStatementExpression evalCompound = new EvalCompoundStatementExpression(delegate, getTemplateDefinition()); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConditional.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConditional.java index d5d61fea67d..ed317476d9e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConditional.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConditional.java @@ -382,7 +382,7 @@ public class EvalConditional extends CPPDependentEvaluation { if (condition == fCondition && positive == fPositive && negative == fNegative) { return this; } - + EvalConditional evalConditional = new EvalConditional(condition, positive, negative, fPositiveThrows, fNegativeThrows, getTemplateDefinition()); return evalConditional; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java index 8b3123ee0e7..217c636adee 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -56,14 +56,14 @@ public class EvalConstructor extends CPPDependentEvaluation { private boolean checkedIsTypeDependent; private boolean isTypeDependent; static private final IASTName tempName = ASTNodeFactoryFactory.getDefaultCPPNodeFactory().newName(); - + public EvalConstructor(IType type, ICPPConstructor constructor, ICPPEvaluation[] arguments, IBinding templateDefinition) { super(templateDefinition); this.type = type; this.constructor = constructor; this.arguments = arguments != null ? arguments : new ICPPEvaluation[0]; } - + public EvalConstructor(IType type, ICPPConstructor constructor, ICPPEvaluation[] arguments, IASTNode pointOfDefinition) { this(type, constructor, arguments, findEnclosingTemplate(pointOfDefinition)); } @@ -128,41 +128,41 @@ public class EvalConstructor extends CPPDependentEvaluation { ICPPEvaluation[] argList = evaluateArguments(arguments, callSiteRecord, context); EvalFixed constructedObject = new EvalFixed(type, ValueCategory.PRVALUE, compositeValue); CPPVariable binding = new CPPVariable(tempName); - + ActivationRecord localRecord = EvalFunctionCall.createActivationRecord( this.constructor.getParameters(), argList, constructedObject, context.getPoint()); localRecord.update(binding, constructedObject); - + ICPPExecution exec = constructor.getConstructorChainExecution(context.getPoint()); - if(exec instanceof ExecConstructorChain) { - ExecConstructorChain memberInitList = (ExecConstructorChain)exec; + if (exec instanceof ExecConstructorChain) { + ExecConstructorChain memberInitList = (ExecConstructorChain) exec; Map ccInitializers = memberInitList.getConstructorChainInitializers(); - for(Entry ccInitializer : ccInitializers.entrySet()) { - if(ccInitializer.getKey() instanceof ICPPConstructor) { - ICPPClassType baseClassType = (ICPPClassType)ccInitializer.getKey().getOwner(); + for (Entry ccInitializer : ccInitializers.entrySet()) { + if (ccInitializer.getKey() instanceof ICPPConstructor) { + ICPPClassType baseClassType = (ICPPClassType) ccInitializer.getKey().getOwner(); final ICPPEvaluation memberEval = ccInitializer.getValue(); ICPPEvaluation memberValue = memberEval.computeForFunctionCall(localRecord, context.recordStep()); - ICPPEvaluation[] baseClassValues = memberValue.getValue(context.getPoint()).getAllSubValues(); - + ICPPEvaluation[] baseClassValues = memberValue.getValue(context.getPoint()).getAllSubValues(); + ICPPField[] baseFields = (ICPPField[])ClassTypeHelper.getFields(baseClassType, context.getPoint()); - for(ICPPField baseField : baseFields) { + for (ICPPField baseField : baseFields) { // TODO: This has the same problem with multiple inheritance as // CompositeValue.create(ICPPClassType). int fieldPos = CPPASTFieldReference.getFieldPosition(baseField); - constructedObject.getValue(context.getPoint()).setSubValue(fieldPos, + constructedObject.getValue(context.getPoint()).setSubValue(fieldPos, baseClassValues[fieldPos]); } - } + } } } - - + + ICPPField[] fields = ClassTypeHelper.getDeclaredFields(classType, context.getPoint()); for (ICPPField field : fields) { final Entry ccInitializer = getInitializerFromMemberInitializerList(field, exec); - + ICPPEvaluation value = null; - if(ccInitializer != null) { + if (ccInitializer != null) { ExecDeclarator declaratorExec = getDeclaratorExecutionFromMemberInitializerList(ccInitializer); value = getFieldValue(declaratorExec, classType, localRecord, context); } else { @@ -171,7 +171,7 @@ public class EvalConstructor extends CPPDependentEvaluation { final int fieldPos = CPPASTFieldReference.getFieldPosition(field); compositeValue.setSubValue(fieldPos, value); } - + // TODO(nathanridge): EvalFunctionCall.computeForFunctionCall() will: // - evaluate the arguments again // - create another ActivationRecord (inside evaluateFunctionBody()) @@ -181,44 +181,44 @@ public class EvalConstructor extends CPPDependentEvaluation { ICPPEvaluation resultingObject = localRecord.getVariable(binding); return resultingObject; } - + private Entry getInitializerFromMemberInitializerList(ICPPField field, ICPPExecution exec) { - if(!(exec instanceof ExecConstructorChain)) { + if (!(exec instanceof ExecConstructorChain)) { return null; } - - final ExecConstructorChain memberInitList = (ExecConstructorChain)exec; - for(Entry ccInitializer : memberInitList.getConstructorChainInitializers().entrySet()) { + + final ExecConstructorChain memberInitList = (ExecConstructorChain) exec; + for (Entry ccInitializer : memberInitList.getConstructorChainInitializers().entrySet()) { final IBinding member = ccInitializer.getKey(); - if(member instanceof ICPPField && member.getName().equals(field.getName())) { + if (member instanceof ICPPField && member.getName().equals(field.getName())) { return ccInitializer; } } return null; } - + private ExecDeclarator getDeclaratorExecutionFromMemberInitializerList(Entry ccInitializer) { - final ICPPBinding member = (ICPPBinding)ccInitializer.getKey(); + final ICPPBinding member = (ICPPBinding) ccInitializer.getKey(); final ICPPEvaluation memberEval = ccInitializer.getValue(); return new ExecDeclarator(member, memberEval); } - + private ICPPEvaluation getFieldValue(ExecDeclarator declaratorExec, ICPPClassType classType, ActivationRecord record, ConstexprEvaluationContext context) { - if(declaratorExec == null) { + if (declaratorExec == null) { return null; } - - if(declaratorExec.executeForFunctionCall(record, context) != ExecIncomplete.INSTANCE) { + + if (declaratorExec.executeForFunctionCall(record, context) != ExecIncomplete.INSTANCE) { final ICPPEvaluation value = record.getVariable(declaratorExec.getDeclaredBinding()); return value; } return null; } - + public static ICPPEvaluation[] extractArguments(IASTInitializer initializer, ICPPConstructor constructor) { ICPPEvaluation[] args = extractArguments(initializer); - if(args.length == 1 && constructor.getParameters().length > 1 && args[0] instanceof EvalInitList) { - EvalInitList evalInitList = (EvalInitList)args[0]; + if (args.length == 1 && constructor.getParameters().length > 1 && args[0] instanceof EvalInitList) { + EvalInitList evalInitList = (EvalInitList) args[0]; args = evalInitList.getClauses(); } return args; @@ -227,25 +227,25 @@ public class EvalConstructor extends CPPDependentEvaluation { public static ICPPEvaluation[] extractArguments(IASTInitializer initializer) { if (initializer == null) { return new ICPPEvaluation[0]; - } else if(initializer instanceof ICPPASTConstructorInitializer) { - ICPPASTConstructorInitializer ctorInitializer = (ICPPASTConstructorInitializer)initializer; + } else if (initializer instanceof ICPPASTConstructorInitializer) { + ICPPASTConstructorInitializer ctorInitializer = (ICPPASTConstructorInitializer) initializer; return evaluateArguments(ctorInitializer.getArguments()); - } else if(initializer instanceof ICPPASTInitializerList) { - ICPPASTInitializerList initList = (ICPPASTInitializerList)initializer; + } else if (initializer instanceof ICPPASTInitializerList) { + ICPPASTInitializerList initList = (ICPPASTInitializerList) initializer; return evaluateArguments(initList.getClauses()); - } else if(initializer instanceof IASTEqualsInitializer) { - IASTEqualsInitializer equalsInitalizer = (IASTEqualsInitializer)initializer; + } else if (initializer instanceof IASTEqualsInitializer) { + IASTEqualsInitializer equalsInitalizer = (IASTEqualsInitializer) initializer; IASTInitializerClause initClause = equalsInitalizer.getInitializerClause(); return evaluateArguments(initClause); } else { throw new RuntimeException("this type of initializer is not supported"); //$NON-NLS-1$ } } - + private static ICPPEvaluation[] evaluateArguments(IASTInitializerClause... clauses) { - ICPPEvaluation[] args = new ICPPEvaluation[clauses.length]; + ICPPEvaluation[] args = new ICPPEvaluation[clauses.length]; for (int i = 0; i < clauses.length; i++) { - ICPPEvaluationOwner clause = (ICPPEvaluationOwner)clauses[i]; + ICPPEvaluationOwner clause = (ICPPEvaluationOwner) clauses[i]; args[i] = clause.getEvaluation(); } return args; @@ -280,8 +280,8 @@ public class EvalConstructor extends CPPDependentEvaluation { } return false; } - - @Override + + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EVAL_CONSTRUCTOR); buffer.marshalType(type); @@ -292,14 +292,14 @@ public class EvalConstructor extends CPPDependentEvaluation { } marshalTemplateDefinition(buffer); } - + public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { IType type = buffer.unmarshalType(); - ICPPConstructor constructor = (ICPPConstructor)buffer.unmarshalBinding(); + ICPPConstructor constructor = (ICPPConstructor) buffer.unmarshalBinding(); int len = buffer.getInt(); ICPPEvaluation[] arguments = new ICPPEvaluation[len]; for (int i = 0; i < arguments.length; i++) { - arguments[i] = (ICPPEvaluation)buffer.unmarshalEvaluation(); + arguments[i] = (ICPPEvaluation) buffer.unmarshalEvaluation(); } IBinding templateDefinition = buffer.unmarshalBinding(); return new EvalConstructor(type, constructor, arguments, templateDefinition); @@ -308,32 +308,32 @@ public class EvalConstructor extends CPPDependentEvaluation { @Override public ICPPEvaluation instantiate(InstantiationContext context, int maxDepth) { IType newType = CPPTemplates.instantiateType(type, context); - + ICPPEvaluation[] newArguments = new ICPPEvaluation[arguments.length]; - for(int i = 0; i < arguments.length; i++) { + for (int i = 0; i < arguments.length; i++) { newArguments[i] = arguments[i].instantiate(context, maxDepth); } - + ICPPConstructor newConstructor; try { newConstructor = (ICPPConstructor)CPPTemplates.instantiateBinding(constructor, context, maxDepth); - if(newConstructor instanceof CPPDeferredFunction) { + if (newConstructor instanceof CPPDeferredFunction) { ICPPFunction[] candidates = ((CPPDeferredFunction) newConstructor).getCandidates(); if (candidates != null) { CPPFunctionSet functionSet = new CPPFunctionSet(candidates, new ICPPTemplateArgument[]{}, null); - EvalFunctionSet evalFunctionSet = new EvalFunctionSet(functionSet, false, false, newType, + EvalFunctionSet evalFunctionSet = new EvalFunctionSet(functionSet, false, false, newType, context.getPoint()); ICPPEvaluation resolved = evalFunctionSet.resolveFunction(newArguments, context.getPoint()); - if(resolved instanceof EvalBinding) { - EvalBinding evalBinding = (EvalBinding)resolved; - newConstructor = (ICPPConstructor)evalBinding.getBinding(); + if (resolved instanceof EvalBinding) { + EvalBinding evalBinding = (EvalBinding) resolved; + newConstructor = (ICPPConstructor) evalBinding.getBinding(); } } } } catch (DOMException e) { newConstructor = constructor; } - + return new EvalConstructor(newType, newConstructor, newArguments, getTemplateDefinition()); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java index cac9cecf54f..ca5d950ed2e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java @@ -38,8 +38,8 @@ public class EvalFixed extends CPPEvaluation { public static final ICPPEvaluation INCOMPLETE = new EvalFixed(ProblemType.UNKNOWN_FOR_EXPRESSION, PRVALUE, IntegralValue.ERROR); - - + + private final IType fType; private final IValue fValue; private final ValueCategory fValueCategory; @@ -225,7 +225,7 @@ public class EvalFixed extends CPPEvaluation { public boolean referencesTemplateParameter() { return false; } - + @Override public String toString() { return fType.toString() + ": " + fValue.toString(); //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionCall.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionCall.java index 936b1c92f5d..84b36c35495 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionCall.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionCall.java @@ -62,7 +62,7 @@ public class EvalFunctionCall extends CPPDependentEvaluation { fArguments = args; fImplicitThis = owner; } - + public EvalFunctionCall(ICPPEvaluation[] args, ICPPEvaluation owner, IASTNode pointOfDefinition) { this(args, owner, findEnclosingTemplate(pointOfDefinition)); } @@ -194,7 +194,7 @@ public class EvalFunctionCall extends CPPDependentEvaluation { for (int i = 0; i < args.length; i++) { args[i] = (ICPPEvaluation) buffer.unmarshalEvaluation(); } - ICPPEvaluation implicitThis = (ICPPEvaluation)buffer.unmarshalEvaluation(); + ICPPEvaluation implicitThis = (ICPPEvaluation) buffer.unmarshalEvaluation(); IBinding templateDefinition = buffer.unmarshalBinding(); return new EvalFunctionCall(args, implicitThis, templateDefinition); } @@ -204,13 +204,13 @@ public class EvalFunctionCall extends CPPDependentEvaluation { ICPPEvaluation[] args = instantiateCommaSeparatedSubexpressions(fArguments, context, maxDepth); if (args == fArguments) return this; - + if (args[0] instanceof EvalFunctionSet && getOverload(context.getPoint()) == null) { // Resolve the function using the parameters of the function call. EvalFunctionSet functionSet = (EvalFunctionSet) args[0]; args[0] = functionSet.resolveFunction(Arrays.copyOfRange(args, 1, args.length), context.getPoint()); } - + ICPPEvaluation newImplicitThis = fImplicitThis != null ? fImplicitThis.instantiate(context, maxDepth) : null; return new EvalFunctionCall(args, newImplicitThis, getTemplateDefinition()); } @@ -227,12 +227,12 @@ public class EvalFunctionCall extends CPPDependentEvaluation { ICPPEvaluation[] args = new ICPPEvaluation[fArguments.length]; System.arraycopy(fArguments, 0, args, 0, fArguments.length); - + ICPPParameter[] parameters = functionBinding.getParameters(); for (int i = 0; i < fArguments.length; i++) { ICPPEvaluation arg = fArguments[i].computeForFunctionCall(record, context.recordStep()); if (i != 0 && isReference(parameters[i-1]) && fArguments[i] instanceof EvalBinding) { - final EvalBinding evalBinding = (EvalBinding)fArguments[i]; + final EvalBinding evalBinding = (EvalBinding) fArguments[i]; IBinding binding = evalBinding.getBinding(); // If the binding being referenced isn't present in the activation record, // we won't be able to evaluate the function call. @@ -240,23 +240,23 @@ public class EvalFunctionCall extends CPPDependentEvaluation { return EvalFixed.INCOMPLETE; } arg = new EvalReference(record, binding, evalBinding.getTemplateDefinition()); - } else if(i != 0 && !isReference(parameters[i-1])) { + } else if (i != 0 && !isReference(parameters[i-1])) { IValue copiedValue = arg.getValue(context.getPoint()).clone(); arg = new EvalFixed(arg.getType(context.getPoint()), arg.getValueCategory(context.getPoint()), copiedValue); } args[i] = arg; } - + ICPPEvaluation owner = null; - if(functionBinding instanceof ICPPMethod) { - if(fImplicitThis instanceof EvalBinding) { - IBinding ownerBinding = ((EvalBinding)fImplicitThis).getBinding(); - if(record.getVariable(ownerBinding) != null) { + if (functionBinding instanceof ICPPMethod) { + if (fImplicitThis instanceof EvalBinding) { + IBinding ownerBinding = ((EvalBinding) fImplicitThis).getBinding(); + if (record.getVariable(ownerBinding) != null) { owner = new EvalReference(record, ownerBinding, fImplicitThis.getTemplateDefinition()); } else { owner = fImplicitThis; } - } else if(fImplicitThis != null) { + } else if (fImplicitThis != null) { owner = fImplicitThis.computeForFunctionCall(record, context); } else { owner = record.getImplicitThis(); @@ -265,12 +265,12 @@ public class EvalFunctionCall extends CPPDependentEvaluation { return new EvalFunctionCall(args, owner, getTemplateDefinition()).evaluateFunctionBody(context.recordStep()); } - + private ICPPEvaluation evaluateFunctionBody(ConstexprEvaluationContext context) { if (isValueDependent()) { return this; } - + // If the arguments are not all constant expressions, there is // no point trying to substitute them into the return expression. if (!areAllConstantExpressions(fArguments, 1, fArguments.length, context.getPoint())) { @@ -284,7 +284,7 @@ public class EvalFunctionCall extends CPPDependentEvaluation { ActivationRecord record = createActivationRecord(function.getParameters(), fArguments, fImplicitThis, context.getPoint()); ICPPExecution bodyExec = CPPFunction.getFunctionBodyExecution(function, context.getPoint()); if (bodyExec == null) { - if (!(function instanceof ICPPTemplateInstance) + if (!(function instanceof ICPPTemplateInstance) || ((ICPPTemplateInstance) function).isExplicitSpecialization()) { return EvalFixed.INCOMPLETE; } @@ -296,25 +296,25 @@ public class EvalFunctionCall extends CPPDependentEvaluation { // TODO(nathanridge): Instead of instantiating the execution below in instantiateFunctionBody(), // have getFunctionBodyExecution() return the instantiated execution already. } - if(bodyExec != null) { + if (bodyExec != null) { bodyExec = bodyExec.executeForFunctionCall(record, context.recordStep()); - + // If the function exited via a return statement, bodyExec.executeForFunctionCall() will have // just returned the ExecReturn, which needs to be executed separately. - if(bodyExec != null) { + if (bodyExec != null) { bodyExec = bodyExec.executeForFunctionCall(record, context.recordStep()); - if(bodyExec instanceof ExecReturn) { + if (bodyExec instanceof ExecReturn) { ExecReturn execReturn = (ExecReturn) bodyExec; - + ICPPEvaluation returnValueEval = execReturn.getReturnValueEvaluation(); // TODO(nathanridge): ExecReturn.executeForFunctionCall() already calls - // computeForFunctionCall() on the return value evaluation. Why do we + // computeForFunctionCall() on the return value evaluation. Why do we // need to do it again, and only if it's an EvalBinding? - if(returnValueEval instanceof EvalBinding) { + if (returnValueEval instanceof EvalBinding) { returnValueEval = returnValueEval.computeForFunctionCall(record, context.recordStep()); } return returnValueEval; - } else if(bodyExec == ExecIncomplete.INSTANCE) { + } else if (bodyExec == ExecIncomplete.INSTANCE) { return EvalFixed.INCOMPLETE; } } @@ -325,21 +325,21 @@ public class EvalFunctionCall extends CPPDependentEvaluation { private ICPPFunction resolveFunctionBinding(IASTNode point) { ICPPFunction function = getOverload(point); if (function == null) { - ICPPEvaluation funcEval = fArguments[0]; + ICPPEvaluation funcEval = fArguments[0]; if (funcEval instanceof EvalFunctionSet) { - EvalFunctionSet funcEvalFunctionSet = (EvalFunctionSet)funcEval; + EvalFunctionSet funcEvalFunctionSet = (EvalFunctionSet) funcEval; funcEval = funcEvalFunctionSet.resolveFunction(Arrays.copyOfRange(fArguments, 1, fArguments.length), point); } - + IBinding binding = null; if (funcEval instanceof EvalBinding) { - EvalBinding funcEvalBinding = (EvalBinding)funcEval; + EvalBinding funcEvalBinding = (EvalBinding) funcEval; binding = funcEvalBinding.getBinding(); } else if (funcEval instanceof EvalMemberAccess) { - EvalMemberAccess funcEvalMemberAccess = (EvalMemberAccess)funcEval; + EvalMemberAccess funcEvalMemberAccess = (EvalMemberAccess) funcEval; binding = funcEvalMemberAccess.getMember(); } - + if (binding instanceof ICPPFunction) { function = (ICPPFunction) binding; } @@ -355,21 +355,21 @@ public class EvalFunctionCall extends CPPDependentEvaluation { public static ActivationRecord createActivationRecord(ICPPParameter[] parameters, ICPPEvaluation[] arguments, ICPPEvaluation implicitThis, IASTNode point) { ActivationRecord record = new ActivationRecord(parameters, implicitThis); - + // We start at arguments[1] because arguments[0] is the function's evaluation. int j = 1; - for(ICPPParameter param : parameters) { + for (ICPPParameter param : parameters) { if (param.isParameterPack() || isSpecializedParameterPack(param)) { // The parameter pack consumes all remaining arguments. int paramPackLen = arguments.length - j; ICPPEvaluation[] values = new ICPPEvaluation[paramPackLen]; IType[] types = new IType[paramPackLen]; - for(int i = 0; i < paramPackLen; i++) { + for (int i = 0; i < paramPackLen; i++) { ICPPEvaluation arg = arguments[j+i]; values[i] = arg; types[i] = arg.getType(null); } - + IValue paramPackValue = new CompositeValue(null, values); IType paramPackType = new ParameterPackType(types); EvalFixed paramPack = new EvalFixed(paramPackType, ValueCategory.PRVALUE, paramPackValue); @@ -391,13 +391,13 @@ public class EvalFunctionCall extends CPPDependentEvaluation { } return record; } - + private static boolean isSpecializedParameterPack(ICPPParameter param) { - if(param instanceof ICPPSpecialization) { - ICPPSpecialization paramSpecialization = (ICPPSpecialization)param; + if (param instanceof ICPPSpecialization) { + ICPPSpecialization paramSpecialization = (ICPPSpecialization) param; IBinding specializedBinding = paramSpecialization.getSpecializedBinding(); - if(specializedBinding instanceof ICPPParameter) { - ICPPParameter specializedParam = (ICPPParameter)specializedBinding; + if (specializedBinding instanceof ICPPParameter) { + ICPPParameter specializedParam = (ICPPParameter) specializedBinding; return specializedParam.isParameterPack(); } } @@ -421,14 +421,14 @@ public class EvalFunctionCall extends CPPDependentEvaluation { } return false; } - + public static class ParameterPackType implements IType { private final IType[] types; - + public ParameterPackType(IType[] types) { this.types = types; } - + public IType[] getTypes() { return types; } @@ -437,7 +437,7 @@ public class EvalFunctionCall extends CPPDependentEvaluation { public boolean isSameType(IType type) { return false; } - + @Override public Object clone() { try { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java index 582535bb506..22c7c44aa08 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java @@ -71,14 +71,14 @@ public class EvalID extends CPPDependentEvaluation { private final ICPPTemplateArgument[] fTemplateArgs; public EvalID(ICPPEvaluation fieldOwner, IBinding nameOwner, char[] simpleID, boolean addressOf, - boolean qualified, boolean isPointerDeref, ICPPTemplateArgument[] templateArgs, + boolean qualified, boolean isPointerDeref, ICPPTemplateArgument[] templateArgs, IASTNode pointOfDefinition) { - this(fieldOwner, nameOwner, simpleID, addressOf, qualified, isPointerDeref, templateArgs, + this(fieldOwner, nameOwner, simpleID, addressOf, qualified, isPointerDeref, templateArgs, findEnclosingTemplate(pointOfDefinition)); } public EvalID(ICPPEvaluation fieldOwner, IBinding nameOwner, char[] simpleID, boolean addressOf, - boolean qualified, boolean isPointerDeref, ICPPTemplateArgument[] templateArgs, + boolean qualified, boolean isPointerDeref, ICPPTemplateArgument[] templateArgs, IBinding templateDefinition) { super(templateDefinition); if (simpleID == null) @@ -114,7 +114,7 @@ public class EvalID extends CPPDependentEvaluation { public boolean isQualified() { return fQualified; } - + public boolean isPointerDeref() { return fIsPointerDeref; } @@ -208,7 +208,7 @@ public class EvalID extends CPPDependentEvaluation { } } IBinding templateDefinition= buffer.unmarshalBinding(); - return new EvalID(fieldOwner, nameOwner, name, addressOf, qualified, isPointerDeref, args, + return new EvalID(fieldOwner, nameOwner, name, addressOf, qualified, isPointerDeref, args, templateDefinition); } @@ -376,7 +376,7 @@ public class EvalID extends CPPDependentEvaluation { if (!CPPTemplates.isDependentType((ICPPClassType) nameOwner)) return EvalFixed.INCOMPLETE; } - + if (fieldOwner != null && !fieldOwner.isTypeDependent()) { IType fieldOwnerType = fieldOwner.getType(context.getPoint()); if (fIsPointerDeref) { @@ -396,7 +396,7 @@ public class EvalID extends CPPDependentEvaluation { } } - return new EvalID(fieldOwner, nameOwner, fName, fAddressOf, fQualified, fIsPointerDeref, templateArgs, + return new EvalID(fieldOwner, nameOwner, fName, fAddressOf, fQualified, fIsPointerDeref, templateArgs, getTemplateDefinition()); } @@ -427,23 +427,23 @@ public class EvalID extends CPPDependentEvaluation { if (binding instanceof ICPPFunction) { ICPPFunction[] functions = new ICPPFunction[bindings.length]; System.arraycopy(bindings, 0, functions, 0, bindings.length); - return new EvalFunctionSet(new CPPFunctionSet(functions, templateArgs, null), fQualified, + return new EvalFunctionSet(new CPPFunctionSet(functions, templateArgs, null), fQualified, fAddressOf, impliedObjectType, getTemplateDefinition()); } if (binding instanceof CPPFunctionSet) { - return new EvalFunctionSet((CPPFunctionSet) binding, fQualified, fAddressOf, + return new EvalFunctionSet((CPPFunctionSet) binding, fQualified, fAddressOf, impliedObjectType, getTemplateDefinition()); } if (binding instanceof IEnumerator) { return new EvalBinding(binding, null, getTemplateDefinition()); - } + } if (binding instanceof ICPPMember) { - if(ownerEval != null) { + if (ownerEval != null) { return new EvalMemberAccess(nameOwner, ownerEval.getValueCategory(point), binding, ownerEval, false, point); } else { return new EvalMemberAccess(nameOwner, ValueCategory.PRVALUE, binding, false, getTemplateDefinition()); } - } + } } return null; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalInitList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalInitList.java index 4281f7a6abb..91358287ede 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalInitList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalInitList.java @@ -99,7 +99,7 @@ public class EvalInitList extends CPPDependentEvaluation { } else { return IntegralValue.UNKNOWN; } - + } @Override diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java index 7701e251e33..d043c11863c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java @@ -63,7 +63,7 @@ public class EvalMemberAccess extends CPPDependentEvaluation { private final IBinding fMember; private final ValueCategory fOwnerValueCategory; private final boolean fIsPointerDeref; - + // An EvalMemberAccess has an owner evaluation if it does not represent // a member access through the "this" pointer. If it does, the owner // evaluation is derived from the activation record (passed to @@ -108,7 +108,7 @@ public class EvalMemberAccess extends CPPDependentEvaluation { public ValueCategory getOwnerValueCategory() { return fOwnerValueCategory; } - + public ICPPEvaluation getOwnerEval() { return fOwnerEval; } @@ -379,7 +379,7 @@ public class EvalMemberAccess extends CPPDependentEvaluation { IType ownerType = buffer.unmarshalType(); IBinding member = buffer.unmarshalBinding(); - ICPPEvaluation ownerEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); + ICPPEvaluation ownerEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); IBinding templateDefinition = buffer.unmarshalBinding(); return new EvalMemberAccess(ownerType, ownerValueCat, member, ownerEval, isDeref, templateDefinition); } @@ -407,17 +407,17 @@ public class EvalMemberAccess extends CPPDependentEvaluation { private boolean isMemberAccessThroughThisPointer() { - if(fOwnerEval == null) { + if (fOwnerEval == null) { return true; - } else if(fOwnerEval instanceof EvalFixed) { - EvalFixed evalFixed = (EvalFixed)fOwnerEval; + } else if (fOwnerEval instanceof EvalFixed) { + EvalFixed evalFixed = (EvalFixed) fOwnerEval; return evalFixed.getValue() == IntegralValue.THIS; } return false; } private ICPPEvaluation getOwnerEval(ActivationRecord record) { - if(isMemberAccessThroughThisPointer()) { + if (isMemberAccessThroughThisPointer()) { return record.getImplicitThis(); } return fOwnerEval; @@ -430,7 +430,7 @@ public class EvalMemberAccess extends CPPDependentEvaluation { EvalBinding evalBinding = new EvalBinding(fMember, fType, getTemplateDefinition()); return evalBinding; } - if(ownerEval == null) { + if (ownerEval == null) { return this; } @@ -440,9 +440,9 @@ public class EvalMemberAccess extends CPPDependentEvaluation { evaluatedOwner = ((EvalPointer) evaluatedOwner).dereference(); } - if(fMember instanceof ICPPField) { + if (fMember instanceof ICPPField) { ICPPField field = (ICPPField) fMember; - if(field.getType() instanceof IArrayType) { + if (field.getType() instanceof IArrayType) { EvalPointer evalPointer = new EvalPointer(record, new EvalCompositeAccess(new EvalCompositeAccess(evaluatedOwner, fieldPos), 0), getTemplateDefinition()); @@ -451,7 +451,7 @@ public class EvalMemberAccess extends CPPDependentEvaluation { } EvalReference evalRef = new EvalReference(record, - new EvalCompositeAccess(evaluatedOwner, fieldPos), + new EvalCompositeAccess(evaluatedOwner, fieldPos), getTemplateDefinition()); return evalRef; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalParameterPack.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalParameterPack.java index e6d16170fa7..da10ccd0ba3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalParameterPack.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalParameterPack.java @@ -31,7 +31,7 @@ import org.eclipse.core.runtime.CoreException; public class EvalParameterPack extends CPPDependentEvaluation { private ICPPEvaluation fExpansionPattern; private IType fType; - + public EvalParameterPack(ICPPEvaluation expansionPattern, IASTNode pointOfDefinition) { this(expansionPattern, findEnclosingTemplate(pointOfDefinition)); } @@ -40,11 +40,11 @@ public class EvalParameterPack extends CPPDependentEvaluation { super(templateDefinition); fExpansionPattern = expansionPattern; } - + public ICPPEvaluation getExpansionPattern() { return fExpansionPattern; } - + @Override public boolean isInitializerList() { return fExpansionPattern.isInitializerList(); @@ -85,7 +85,7 @@ public class EvalParameterPack extends CPPDependentEvaluation { @Override public IValue getValue(IASTNode point) { - return IntegralValue.create(fExpansionPattern); + return IntegralValue.create(fExpansionPattern); } @Override @@ -107,7 +107,7 @@ public class EvalParameterPack extends CPPDependentEvaluation { if (expansionPattern == fExpansionPattern) { return this; } - + EvalParameterPack evalParamPack = new EvalParameterPack(expansionPattern, getTemplateDefinition()); return evalParamPack; } @@ -128,7 +128,7 @@ public class EvalParameterPack extends CPPDependentEvaluation { buffer.marshalEvaluation(fExpansionPattern, includeValue); marshalTemplateDefinition(buffer); } - + public static ISerializableEvaluation unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { ICPPEvaluation expansionPattern = (ICPPEvaluation) buffer.unmarshalEvaluation(); IBinding templateDefinition = buffer.unmarshalBinding(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalPointer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalPointer.java index a84ce15cfeb..77d692cc79c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalPointer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalPointer.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -26,22 +26,22 @@ public class EvalPointer extends EvalReference { public EvalPointer(ActivationRecord record, EvalCompositeAccess referredSubValue, IASTNode point) { this(record, referredSubValue, findEnclosingTemplate(point)); - } - + } + public EvalPointer(ActivationRecord record, EvalCompositeAccess referredSubValue, IBinding templateDefinition) { this(record, referredSubValue, templateDefinition, referredSubValue.getElementId()); } - + public EvalPointer(ActivationRecord record, EvalCompositeAccess referredSubValue, IBinding templateDefinition, int offset) { super(record, referredSubValue, templateDefinition); setPosition(offset); } - + public EvalPointer(ActivationRecord record, IBinding referredBinding, IBinding templateDefinition) { super(record, referredBinding, templateDefinition); setPosition(0); } - + public EvalReference dereference() { if (referredSubValue != null) { final EvalCompositeAccess pointedToValue = new EvalCompositeAccess(referredSubValue.getParent(), getPosition()); @@ -50,17 +50,17 @@ public class EvalPointer extends EvalReference { return new EvalReference(owningRecord,referredBinding, getTemplateDefinition()); } } - + @Override public IType getType(IASTNode point) { IType valueType = getTargetEvaluation().getType(point); return new CPPPointerType(valueType, false, false, false); } - + public int getPosition() { return position; } - + public void setPosition(int position) { this.position = position; invalidatePointerIfPositionOutOfRange(); @@ -70,7 +70,7 @@ public class EvalPointer extends EvalReference { if (isPositionOutOfRange()) { referredSubValue = new EvalCompositeAccess(EvalFixed.INCOMPLETE, 0); referredBinding = null; - } + } } private boolean isPositionOutOfRange() { @@ -80,19 +80,19 @@ public class EvalPointer extends EvalReference { private boolean subValuePositionOutOfrange() { return referredSubValue != null && (position - referredSubValue.getParent().getValue(null).numberOfSubValues() > 0 || position < 0); } - + @Override public IValue getValue(IASTNode point) { // TODO(nathanridge): Why does it make sense to consider a pointer's value to be its offset // into the underlying array? return IntegralValue.create(position); } - + @Override public ICPPEvaluation computeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { return this; } - + public EvalPointer copy() { if (referredSubValue != null) { return new EvalPointer(owningRecord, referredSubValue, getTemplateDefinition(), position); @@ -100,7 +100,7 @@ public class EvalPointer extends EvalReference { return new EvalPointer(owningRecord, referredBinding, getTemplateDefinition()); } } - + public static EvalPointer createFromAddress(EvalReference reference) { if (reference.referredSubValue != null) { return new EvalPointer(reference.owningRecord, reference.referredSubValue, reference.getTemplateDefinition()); @@ -108,7 +108,7 @@ public class EvalPointer extends EvalReference { return new EvalPointer(reference.owningRecord, reference.referredBinding, reference.getTemplateDefinition()); } } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { short firstBytes = ITypeMarshalBuffer.EVAL_POINTER; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalReference.java index ff51f3d8c3b..d94b75f9155 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalReference.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalReference.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -22,7 +22,7 @@ import org.eclipse.core.runtime.CoreException; public class EvalReference extends CPPDependentEvaluation { protected final ActivationRecord owningRecord; - + // The following invariant must be true for instances of this class: // (referredBinding == null) != (referredSubValue == null) protected IBinding referredBinding; @@ -33,18 +33,18 @@ public class EvalReference extends CPPDependentEvaluation { this.owningRecord = owningRecord; this.referredBinding = referredBinding; } - + EvalReference(ActivationRecord owningRecord, IBinding referredBinding, IASTNode point) { this(owningRecord, referredBinding, findEnclosingTemplate(point)); } - + EvalReference(ActivationRecord owningRecord, EvalCompositeAccess referredSubValue, IBinding templateDefinition) { super(templateDefinition); this.owningRecord = owningRecord; this.referredSubValue = referredSubValue; this.referredBinding = null; } - + EvalReference(ActivationRecord owningRecord, EvalCompositeAccess referredSubValue, IASTNode point) { this(owningRecord, referredSubValue, findEnclosingTemplate(point)); } @@ -83,7 +83,7 @@ public class EvalReference extends CPPDependentEvaluation { public IValue getValue(IASTNode point) { return getTargetEvaluation().getValue(null); } - + public ICPPEvaluation getTargetEvaluation() { if (referredSubValue != null) { return referredSubValue; @@ -103,7 +103,7 @@ public class EvalReference extends CPPDependentEvaluation { referredSubValue.update(eval); } } - + public IBinding getReferredBinding() { return referredBinding; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalTypeId.java index ff846f37936..c0fe9c09e09 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalTypeId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalTypeId.java @@ -57,7 +57,7 @@ public class EvalTypeId extends CPPDependentEvaluation { private final IType fInputType; private final ICPPEvaluation[] fArguments; private final boolean fRepresentsNewExpression; - private boolean fUsesBracedInitList; // Whether the constructor call uses { ... } instead of ( ... ). + private boolean fUsesBracedInitList; // Whether the constructor call uses { ... } instead of (...). private IType fOutputType; private ICPPFunction fConstructor = CPPFunction.UNINITIALIZED_FUNCTION; @@ -66,12 +66,12 @@ public class EvalTypeId extends CPPDependentEvaluation { private boolean fCheckedIsConstantExpression; private boolean fIsConstantExpression; - public EvalTypeId(IType type, IASTNode pointOfDefinition, boolean usesBracedInitList, + public EvalTypeId(IType type, IASTNode pointOfDefinition, boolean usesBracedInitList, ICPPEvaluation... arguments) { this(type, findEnclosingTemplate(pointOfDefinition), false, usesBracedInitList, arguments); } - public EvalTypeId(IType type, IBinding templateDefinition, boolean forNewExpression, + public EvalTypeId(IType type, IBinding templateDefinition, boolean forNewExpression, boolean usesBracedInitList, ICPPEvaluation... arguments) { super(templateDefinition); if (arguments == null) @@ -83,12 +83,12 @@ public class EvalTypeId extends CPPDependentEvaluation { fUsesBracedInitList = usesBracedInitList; } - public static EvalTypeId createForNewExpression(IType type, IASTNode pointOfDefinition, + public static EvalTypeId createForNewExpression(IType type, IASTNode pointOfDefinition, boolean usesBracedInitList, ICPPEvaluation... arguments) { return new EvalTypeId(type, findEnclosingTemplate(pointOfDefinition), true, usesBracedInitList, arguments); } - + public IType getInputType() { return fInputType; } @@ -96,11 +96,11 @@ public class EvalTypeId extends CPPDependentEvaluation { public ICPPEvaluation[] getArguments() { return fArguments; } - + public boolean representsNewExpression() { return fRepresentsNewExpression; } - + public boolean usesBracedInitList() { return fUsesBracedInitList; } @@ -141,17 +141,17 @@ public class EvalTypeId extends CPPDependentEvaluation { return IntegralValue.create(this); if (fRepresentsNewExpression) return IntegralValue.UNKNOWN; - + if (fInputType instanceof ICPPClassType) { - ICPPClassType classType = (ICPPClassType)fInputType; + ICPPClassType classType = (ICPPClassType) fInputType; IBinding ctor = getConstructor(null); - if(EvalUtil.isCompilerGeneratedCtor(ctor)) { + if (EvalUtil.isCompilerGeneratedCtor(ctor)) { return CompositeValue.create(classType); } else if (ctor == AGGREGATE_INITIALIZATION) { // TODO(nathanridge): Support aggregate initialization. return IntegralValue.UNKNOWN; } else if (ctor != null) { - EvalConstructor evalCtor = new EvalConstructor(classType, (ICPPConstructor)ctor, + EvalConstructor evalCtor = new EvalConstructor(classType, (ICPPConstructor) ctor, fArguments, getTemplateDefinition()); ICPPEvaluation computedEvalCtor = evalCtor.computeForFunctionCall(new ActivationRecord(), new ConstexprEvaluationContext(point)); return computedEvalCtor.getValue(point); @@ -161,10 +161,10 @@ public class EvalTypeId extends CPPDependentEvaluation { } if (fArguments.length == 0 || isEmptyInitializerList(fArguments)) { if (fInputType instanceof ICPPBasicType) { - switch(((ICPPBasicType) fInputType).getKind()) { + switch (((ICPPBasicType) fInputType).getKind()) { case eInt: case eInt128: - case eDouble: + case eDouble: case eBoolean: case eFloat: case eFloat128: @@ -179,7 +179,7 @@ public class EvalTypeId extends CPPDependentEvaluation { default: return IntegralValue.UNKNOWN; } - + } } if (fArguments.length == 1) { @@ -246,7 +246,7 @@ public class EvalTypeId extends CPPDependentEvaluation { } return true; } - + private ICPPFunction computeConstructor(IASTNode point) { if (isTypeDependent()) return null; @@ -286,7 +286,7 @@ public class EvalTypeId extends CPPDependentEvaluation { } catch (DOMException e) { CCorePlugin.log(e); } - + if (fUsesBracedInitList && allConstructorsAreCompilerGenerated(constructors)) { return AGGREGATE_INITIALIZATION; } @@ -356,7 +356,7 @@ public class EvalTypeId extends CPPDependentEvaluation { IBinding templateDefinition= buffer.unmarshalBinding(); boolean forNewExpression = (firstBytes & ITypeMarshalBuffer.FLAG1) != 0; boolean usesBracedInitList = (firstBytes & ITypeMarshalBuffer.FLAG2) != 0; - EvalTypeId result = new EvalTypeId(type, templateDefinition, forNewExpression, usesBracedInitList, + EvalTypeId result = new EvalTypeId(type, templateDefinition, forNewExpression, usesBracedInitList, args); return result; } @@ -368,7 +368,7 @@ public class EvalTypeId extends CPPDependentEvaluation { if (args == fArguments && type == fInputType) return this; - EvalTypeId result = new EvalTypeId(type, getTemplateDefinition(), fRepresentsNewExpression, + EvalTypeId result = new EvalTypeId(type, getTemplateDefinition(), fRepresentsNewExpression, fUsesBracedInitList, args); if (!result.isTypeDependent()) { @@ -387,14 +387,14 @@ public class EvalTypeId extends CPPDependentEvaluation { } @Override - public ICPPEvaluation computeForFunctionCall(ActivationRecord record, + public ICPPEvaluation computeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { ICPPFunction constructor = getConstructor(null); if (constructor != null && constructor instanceof ICPPConstructor) { - return new EvalConstructor(fInputType, (ICPPConstructor) constructor, fArguments, + return new EvalConstructor(fInputType, (ICPPConstructor) constructor, fArguments, getTemplateDefinition()).computeForFunctionCall(record, context); } - + ICPPEvaluation[] args = fArguments; for (int i = 0; i < fArguments.length; i++) { ICPPEvaluation arg = fArguments[i].computeForFunctionCall(record, context.recordStep()); @@ -410,7 +410,7 @@ public class EvalTypeId extends CPPDependentEvaluation { if (args == fArguments) { return this; } - EvalTypeId evalTypeId = new EvalTypeId(fInputType, getTemplateDefinition(), fRepresentsNewExpression, + EvalTypeId evalTypeId = new EvalTypeId(fInputType, getTemplateDefinition(), fRepresentsNewExpression, fUsesBracedInitList, args); return evalTypeId; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java index 2c31e51a9ce..80f12d716cd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java @@ -391,9 +391,9 @@ public class EvalUnary extends CPPDependentEvaluation { return new EvalUnary(fOperator, argument, binding, getTemplateDefinition()); } - + private ICPPEvaluation createOperatorOverloadEvaluation(ICPPFunction overload, IASTNode point, ICPPEvaluation arg) { - if(overload instanceof ICPPMethod) { + if (overload instanceof ICPPMethod) { EvalMemberAccess opAccess = new EvalMemberAccess(arg.getType(point), ValueCategory.LVALUE, overload, arg, false, point); ICPPEvaluation[] args = new ICPPEvaluation[]{opAccess}; return new EvalFunctionCall(args, arg, point); @@ -403,11 +403,11 @@ public class EvalUnary extends CPPDependentEvaluation { return new EvalFunctionCall(args, null, point); } } - + private static boolean isModifyingOperation(int op) { return op == op_prefixIncr || op == op_prefixDecr || op == op_postFixIncr || op == op_postFixDecr; } - + @Override public ICPPEvaluation computeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { ICPPFunction overload = getOverload(context.getPoint()); @@ -416,53 +416,53 @@ public class EvalUnary extends CPPDependentEvaluation { ICPPEvaluation eval = operatorCall.computeForFunctionCall(record, context); return eval; } - + Pair vp = EvalUtil.getValuePair(fArgument, record, context); final ICPPEvaluation updateable = vp.getFirst(); final ICPPEvaluation fixed = vp.getSecond(); - + ICPPEvaluation evalUnary = fixed == fArgument || fixed == EvalFixed.INCOMPLETE ? this : new EvalUnary(fOperator, fixed, fAddressOfQualifiedNameBinding, getTemplateDefinition()); - if(fOperator == op_star) { - if(fixed instanceof EvalPointer) { - EvalPointer evalPointer = (EvalPointer)fixed; + if (fOperator == op_star) { + if (fixed instanceof EvalPointer) { + EvalPointer evalPointer = (EvalPointer) fixed; return evalPointer.dereference(); } else if (updateable instanceof EvalBinding && isStarOperatorOnArrayName(context)) { - EvalBinding evalBinding = (EvalBinding)updateable; + EvalBinding evalBinding = (EvalBinding) updateable; IBinding binding = evalBinding.getBinding(); ICPPEvaluation value = record.getVariable(binding); EvalCompositeAccess compositeAccess = new EvalCompositeAccess(value, 0); - return new EvalReference(record, compositeAccess, getTemplateDefinition()); + return new EvalReference(record, compositeAccess, getTemplateDefinition()); } return evalUnary; - } else if(fOperator == op_amper) { - if(updateable instanceof EvalBinding) { - EvalBinding evalBinding = (EvalBinding)updateable; + } else if (fOperator == op_amper) { + if (updateable instanceof EvalBinding) { + EvalBinding evalBinding = (EvalBinding) updateable; IBinding binding = evalBinding.getBinding(); return new EvalPointer(record, binding, getTemplateDefinition()); - } else if(updateable instanceof EvalReference) { - EvalReference evalRef = (EvalReference)updateable; + } else if (updateable instanceof EvalReference) { + EvalReference evalRef = (EvalReference) updateable; return EvalPointer.createFromAddress(evalRef); } return evalUnary; - } else if(isModifyingOperation(fOperator)) { - if(fixed instanceof EvalPointer) { - EvalPointer evalPointer = (EvalPointer)fixed; + } else if (isModifyingOperation(fOperator)) { + if (fixed instanceof EvalPointer) { + EvalPointer evalPointer = (EvalPointer) fixed; applyPointerArithmetics(evalPointer); return evalPointer; } else { EvalFixed newValue = new EvalFixed(evalUnary.getType(context.getPoint()), evalUnary.getValueCategory(context.getPoint()), evalUnary.getValue(context.getPoint())); - if(updateable instanceof EvalReference) { - EvalReference evalRef = (EvalReference)updateable; + if (updateable instanceof EvalReference) { + EvalReference evalRef = (EvalReference) updateable; evalRef.update(newValue); - } else if(updateable instanceof EvalCompositeAccess) { - EvalCompositeAccess evalCompAccess = (EvalCompositeAccess)updateable; + } else if (updateable instanceof EvalCompositeAccess) { + EvalCompositeAccess evalCompAccess = (EvalCompositeAccess) updateable; evalCompAccess.update(newValue); - } else if(updateable instanceof EvalBinding) { - EvalBinding evalBinding = (EvalBinding)updateable; + } else if (updateable instanceof EvalBinding) { + EvalBinding evalBinding = (EvalBinding) updateable; IBinding binding = evalBinding.getBinding(); record.update(binding, newValue); } - + if (this.getValueCategory(context.getPoint()) == ValueCategory.LVALUE) { return updateable; } else { @@ -479,8 +479,8 @@ public class EvalUnary extends CPPDependentEvaluation { } private void applyPointerArithmetics(EvalPointer poiner) { - switch(fOperator) { - case op_postFixIncr: + switch (fOperator) { + case op_postFixIncr: case op_prefixIncr: poiner.setPosition(poiner.getPosition() + 1); break; @@ -490,7 +490,7 @@ public class EvalUnary extends CPPDependentEvaluation { break; } } - + @Override public int determinePackSize(ICPPTemplateParameterMap tpMap) { return fArgument.determinePackSize(tpMap); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java index 2c00fdc55b3..6ff75034b5d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -28,44 +28,44 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation.ConstexprEval import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecution; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPExecutionOwner; -public class EvalUtil { +public class EvalUtil { public static IValue getConditionExprValue(ICPPEvaluation conditionExprEval, ActivationRecord record, ConstexprEvaluationContext context) { return conditionExprEval.computeForFunctionCall(record, context.recordStep()).getValue(context.getPoint()); } - + public static IValue getConditionDeclValue(ExecSimpleDeclaration conditionDeclExec, ActivationRecord record, ConstexprEvaluationContext context) { - ICPPBinding declaredBinding = ((ExecDeclarator)conditionDeclExec.getDeclaratorExecutions()[0]).getDeclaredBinding(); + ICPPBinding declaredBinding = ((ExecDeclarator) conditionDeclExec.getDeclaratorExecutions()[0]).getDeclaredBinding(); conditionDeclExec.executeForFunctionCall(record, context.recordStep()); return record.getVariable(declaredBinding).computeForFunctionCall(record, context).getValue(context.getPoint()); } - + public static boolean conditionExprSatisfied(ICPPEvaluation conditionExprEval, ActivationRecord record, ConstexprEvaluationContext context) { Number result = getConditionExprValue(conditionExprEval, record, context).numberValue(); return result != null && result.longValue() != 0; } - + public static boolean conditionDeclSatisfied(ExecSimpleDeclaration conditionDeclExec, ActivationRecord record, ConstexprEvaluationContext context) { - Number result = getConditionDeclValue(conditionDeclExec, record, context).numberValue(); + Number result = getConditionDeclValue(conditionDeclExec, record, context).numberValue(); return result != null && result.longValue() != 0; } - + public static ICPPExecution getExecutionFromStatement(IASTStatement stmt) { - if(stmt instanceof ICPPExecutionOwner) { - ICPPExecutionOwner execOwner = (ICPPExecutionOwner)stmt; + if (stmt instanceof ICPPExecutionOwner) { + ICPPExecutionOwner execOwner = (ICPPExecutionOwner) stmt; return execOwner.getExecution(); } return null; } - + // a return value != null means that there was a return, break or continue in that statement public static ICPPExecution executeStatement(ICPPExecution exec, ActivationRecord record, ConstexprEvaluationContext context) { - if(exec instanceof ExecExpressionStatement - || exec instanceof ExecDeclarationStatement - || exec instanceof ExecCase + if (exec instanceof ExecExpressionStatement + || exec instanceof ExecDeclarationStatement + || exec instanceof ExecCase || exec instanceof ExecDefault) { exec.executeForFunctionCall(record, context.recordStep()); return null; - } else if(exec instanceof ExecCompoundStatement + } else if (exec instanceof ExecCompoundStatement || exec instanceof ExecWhile || exec instanceof ExecFor || exec instanceof ExecRangeBasedFor @@ -74,9 +74,9 @@ public class EvalUtil { || exec instanceof ExecSwitch) { ICPPExecution innerResult = exec.executeForFunctionCall(record, context.recordStep()); - if(innerResult instanceof ExecReturn || innerResult instanceof ExecBreak || innerResult instanceof ExecContinue) { + if (innerResult instanceof ExecReturn || innerResult instanceof ExecBreak || innerResult instanceof ExecContinue) { return innerResult; - } else if(innerResult != null) { + } else if (innerResult != null) { return ExecIncomplete.INSTANCE; } return null; @@ -84,11 +84,11 @@ public class EvalUtil { return exec; } } - + private static boolean isUpdateable(ICPPEvaluation eval) { return eval instanceof EvalBinding || (eval instanceof EvalReference && !(eval instanceof EvalPointer)) || eval instanceof EvalCompositeAccess; } - + /* * Returns a pair of evaluations, each representing the value of 'eval'. * The first, "updateable", is an lvalue (EvalBinding, EvalReference, or EvalCompositeAccess). @@ -97,40 +97,40 @@ public class EvalUtil { */ public static Pair getValuePair(ICPPEvaluation eval, ActivationRecord record, ConstexprEvaluationContext context) { ICPPEvaluation updateable = null; - if(isUpdateable(eval)) { + if (isUpdateable(eval)) { updateable = eval; } ICPPEvaluation fixed = eval.computeForFunctionCall(record, context.recordStep()); - if(isUpdateable(fixed)) { + if (isUpdateable(fixed)) { updateable = fixed; - if(!(fixed instanceof EvalCompositeAccess)) { + if (!(fixed instanceof EvalCompositeAccess)) { fixed = fixed.computeForFunctionCall(record, context); } } return new Pair(updateable, fixed); } - + public static class Pair { private final T1 first; private final T2 second; - + public Pair(T1 first, T2 second) { this.first = first; this.second = second; } - + public T1 getFirst() { return first; } public T2 getSecond() { return second; } } - + public static boolean isCompilerGeneratedCtor(IBinding ctor) { - if(ctor instanceof ICPPSpecialization) { - ICPPSpecialization ctorSpec = (ICPPSpecialization)ctor; + if (ctor instanceof ICPPSpecialization) { + ICPPSpecialization ctorSpec = (ICPPSpecialization) ctor; return isCompilerGeneratedCtor(ctorSpec.getSpecializedBinding()); } return ctor instanceof ICPPConstructor && ((ICPPConstructor) ctor).isImplicit(); } - + /** * Get the initial value of the given variable, evaluated in the context of * the given activation record. @@ -140,24 +140,24 @@ public class EvalUtil { IType nestedType = SemanticUtil.getNestedType(type, TDEF | REF | CVTYPE); IValue initialValue = variable.getInitialValue(); ICPPEvaluation valueEval = null; - - if((initialValue != null && initialValue.getEvaluation() != null) || + + if ((initialValue != null && initialValue.getEvaluation() != null) || (initialValue == null && nestedType instanceof ICPPClassType)) { final ICPPEvaluation initializerEval = initialValue == null ? null : initialValue.getEvaluation(); - if(initializerEval == EvalFixed.INCOMPLETE) { + if (initializerEval == EvalFixed.INCOMPLETE) { return null; } ExecDeclarator declaratorExec = new ExecDeclarator(variable, initializerEval); - + ConstexprEvaluationContext context = new ConstexprEvaluationContext(null); - if(declaratorExec.executeForFunctionCall(record, context) != ExecIncomplete.INSTANCE) { + if (declaratorExec.executeForFunctionCall(record, context) != ExecIncomplete.INSTANCE) { valueEval = record.getVariable(declaratorExec.getDeclaredBinding()); } - } else if(initialValue != null) { + } else if (initialValue != null) { valueEval = new EvalFixed(type, ValueCategory.LVALUE, initialValue); } - - if(valueEval != null && (valueEval == EvalFixed.INCOMPLETE || + + if (valueEval != null && (valueEval == EvalFixed.INCOMPLETE || valueEval.getValue(null) == IntegralValue.UNKNOWN)) { return null; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecBreak.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecBreak.java index b07c60d172f..faf15ab522f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecBreak.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecBreak.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -25,12 +25,12 @@ public class ExecBreak implements ICPPExecution { public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { return this; } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_BREAK); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { return new ExecBreak(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCase.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCase.java index 3de52a5b1ca..60a9e22a229 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCase.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCase.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -19,7 +19,7 @@ import org.eclipse.core.runtime.CoreException; public class ExecCase implements ICPPExecution { private final ICPPEvaluation caseExprEval; - + public ExecCase(ICPPEvaluation caseExprEval) { this.caseExprEval = caseExprEval; } @@ -37,24 +37,24 @@ public class ExecCase implements ICPPExecution { public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { Pair vp = EvalUtil.getValuePair(caseExprEval, record, context); ICPPEvaluation fixed = vp.getSecond(); - if(fixed == caseExprEval) { + if (fixed == caseExprEval) { return this; } return new ExecCase(fixed); } - + public ICPPEvaluation getCaseExpressionEvaluation() { return caseExprEval; } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_CASE); buffer.marshalEvaluation(caseExprEval, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation caseExprEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); + ICPPEvaluation caseExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); return new ExecCase(caseExprEval); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCompoundStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCompoundStatement.java index c52e8a68f1f..93cc77b1f23 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCompoundStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCompoundStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -22,15 +22,15 @@ public class ExecCompoundStatement implements ICPPExecution { private ExecCompoundStatement(ICPPExecution[] executions) { this.executions = executions; } - + public ExecCompoundStatement(IASTStatement[] statements) { this(createExecutionsFromStatements(statements)); } - + private static ICPPExecution[] createExecutionsFromStatements(IASTStatement[] statements) { ICPPExecution[] executions = new ICPPExecution[statements.length]; - for(int i = 0; i < executions.length; i++) { - executions[i] = EvalUtil.getExecutionFromStatement(statements[i]); + for (int i = 0; i < executions.length; i++) { + executions[i] = EvalUtil.getExecutionFromStatement(statements[i]); } return executions; } @@ -38,8 +38,8 @@ public class ExecCompoundStatement implements ICPPExecution { @Override public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { ICPPExecution[] newExecutions = new ICPPExecution[executions.length]; - for(int i = 0; i < executions.length; i++) { - if(executions[i] == null) { + for (int i = 0; i < executions.length; i++) { + if (executions[i] == null) { continue; } newExecutions[i] = executions[i].instantiate(context, maxDepth); @@ -49,15 +49,15 @@ public class ExecCompoundStatement implements ICPPExecution { @Override public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { - for(ICPPExecution execution : executions) { - if(execution == null) { + for (ICPPExecution execution : executions) { + if (execution == null) { continue; } - + ICPPExecution result = EvalUtil.executeStatement(execution, record, context); - if(result != null) { + if (result != null) { return result; - } + } } return null; } @@ -70,12 +70,12 @@ public class ExecCompoundStatement implements ICPPExecution { buffer.marshalExecution(execution, includeValue); } } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int len = buffer.getInt(); ICPPExecution[] executions = new ICPPExecution[len]; for (int i = 0; i < executions.length; i++) { - executions[i] = (ICPPExecution)buffer.unmarshalExecution(); + executions[i] = (ICPPExecution) buffer.unmarshalExecution(); } return new ExecCompoundStatement(executions); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecConstructorChain.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecConstructorChain.java index adbef955b48..79e133c6909 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecConstructorChain.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecConstructorChain.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -23,7 +23,7 @@ import org.eclipse.core.runtime.CoreException; public class ExecConstructorChain implements ICPPExecution { private final Map ccInitializers; - + public ExecConstructorChain(Map ccInitializers) { this.ccInitializers = ccInitializers; } @@ -33,7 +33,7 @@ public class ExecConstructorChain implements ICPPExecution { Map instantiatedInitializers = new HashMap<>(); for (Entry initializer : ccInitializers.entrySet()) { instantiatedInitializers.put( - CPPEvaluation.instantiateBinding(initializer.getKey(), context, maxDepth), + CPPEvaluation.instantiateBinding(initializer.getKey(), context, maxDepth), initializer.getValue().instantiate(context, maxDepth)); } return new ExecConstructorChain(instantiatedInitializers); @@ -43,7 +43,7 @@ public class ExecConstructorChain implements ICPPExecution { public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { return this; } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_CONSTRUCTOR_CHAIN); @@ -53,19 +53,19 @@ public class ExecConstructorChain implements ICPPExecution { buffer.marshalEvaluation(ccInitializer.getValue(), includeValue); } } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int len = buffer.getInt(); Map ccInitializers = new HashMap<>(); for (int i = 0; i < len; i++) { IBinding member = buffer.unmarshalBinding(); - ICPPEvaluation memberEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); + ICPPEvaluation memberEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); ccInitializers.put(member, memberEval); } return new ExecConstructorChain(ccInitializers); } - + public Map getConstructorChainInitializers() { return ccInitializers; - } + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecContinue.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecContinue.java index c4ecc8e0db5..411d6796a70 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecContinue.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecContinue.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -25,12 +25,12 @@ public class ExecContinue implements ICPPExecution { public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { return this; } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_CONTINUE); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { return new ExecContinue(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarationStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarationStatement.java index 7ee5a9f2ea3..58250aa92cf 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarationStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarationStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -39,15 +39,15 @@ public class ExecDeclarationStatement implements ICPPExecution { } return new ExecDeclarationStatement(newDeclarationExec); } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_DECLARATION_STATEMENT); buffer.marshalExecution(declarationExec, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPExecution declarationExec = (ICPPExecution)buffer.unmarshalExecution(); + ICPPExecution declarationExec = (ICPPExecution) buffer.unmarshalExecution(); return new ExecDeclarationStatement(declarationExec); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarator.java index 15dbb0669b6..269d22dde0c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -43,102 +43,102 @@ public class ExecDeclarator implements ICPPExecution { @Override public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { - if(!(declaredBinding instanceof ICPPVariable)) { + if (!(declaredBinding instanceof ICPPVariable)) { return this; } - - ICPPVariable declaredVariable = (ICPPVariable)declaredBinding; + + ICPPVariable declaredVariable = (ICPPVariable) declaredBinding; IType type = declaredVariable.getType(); ICPPEvaluation initialValue = createInitialValue(type, record, context); - if(initialValue == null || initialValue == EvalFixed.INCOMPLETE) { + if (initialValue == null || initialValue == EvalFixed.INCOMPLETE) { return ExecIncomplete.INSTANCE; } - + record.update(declaredBinding, initialValue); return this; } - + public ICPPBinding getDeclaredBinding() { return declaredBinding; } - + private ICPPEvaluation createInitialValue(IType type, ActivationRecord record, ConstexprEvaluationContext context) { - if(initializerEval == null) { + if (initializerEval == null) { return createDefaultInitializedCompositeValue(type); } - + ICPPEvaluation computedInitializerEval = initializerEval.computeForFunctionCall(record, context.recordStep()); //if a compositevalue with only one member is initialized with an initializer list - //it evaluates to a EvalFixed with a Value instead of a CompositeValue because the initializer list - //doesn't know that it is initializing a composite. + //it evaluates to a EvalFixed with a Value instead of a CompositeValue because the initializer list + //doesn't know that it is initializing a composite. IType nestedType = SemanticUtil.getNestedType(type, TDEF | REF | CVTYPE); - if(isClassType(nestedType) && computedInitializerEval instanceof EvalFixed) { + if (isClassType(nestedType) && computedInitializerEval instanceof EvalFixed) { EvalFixed evalFixed = (EvalFixed) computedInitializerEval; IValue val = evalFixed.getValue(); - if(!(val instanceof CompositeValue)) { + if (!(val instanceof CompositeValue)) { CompositeValue compVal = new CompositeValue(initializerEval, new ICPPEvaluation[]{evalFixed}); computedInitializerEval = new EvalFixed(type, computedInitializerEval.getValueCategory(context.getPoint()), compVal); } } - + if (isReferenceType(type)) { return createReferenceValue(record, context, computedInitializerEval); } else if (isPointerType(nestedType) && !isCStringType(nestedType)) { return createPointerValue(record, context, computedInitializerEval); - } else if(isArrayType(nestedType) && !isCStringType(nestedType)) { - IValue value = CompositeValue.create((EvalInitList)computedInitializerEval,(IArrayType) (type)); + } else if (isArrayType(nestedType) && !isCStringType(nestedType)) { + IValue value = CompositeValue.create((EvalInitList) computedInitializerEval,(IArrayType) (type)); return new EvalFixed(type, computedInitializerEval.getValueCategory(context.getPoint()), value); - } else if (isValueInitialization(computedInitializerEval)){ + } else if (isValueInitialization(computedInitializerEval)) { ICPPEvaluation defaultValue = new EvalTypeId(type, context.getPoint(), false, new ICPPEvaluation[]{}); return new EvalFixed(type, defaultValue.getValueCategory(context.getPoint()), defaultValue.getValue(context.getPoint())); } else { return new EvalFixed(type, computedInitializerEval.getValueCategory(context.getPoint()), computedInitializerEval.getValue(context.getPoint())); } } - + private static ICPPEvaluation createDefaultInitializedCompositeValue(IType type) { - if(!isClassType(type)) { + if (!isClassType(type)) { return EvalFixed.INCOMPLETE; } - ICPPClassType classType = (ICPPClassType)type; + ICPPClassType classType = (ICPPClassType) type; // TODO(nathanridge): CompositeValue.create() only consider default member initializers, not // constructors. Should we be considering constructors here as well? IValue compositeValue = CompositeValue.create(classType); EvalFixed initialValue = new EvalFixed(type, ValueCategory.PRVALUE, compositeValue); return initialValue; } - + private ICPPEvaluation createReferenceValue(ActivationRecord record, ConstexprEvaluationContext context, ICPPEvaluation computedInitializerEval) { ICPPEvaluation initValue = initializerEval; - if(!(initValue instanceof EvalBinding)) { + if (!(initValue instanceof EvalBinding)) { initValue = initializerEval.getValue(context.getPoint()).getSubValue(0); } - - if(initValue instanceof EvalBinding) { + + if (initValue instanceof EvalBinding) { return createReferenceFromBinding(record, context, (EvalBinding) initValue); - } else if(initValue instanceof EvalBinary && computedInitializerEval instanceof EvalCompositeAccess) { + } else if (initValue instanceof EvalBinary && computedInitializerEval instanceof EvalCompositeAccess) { return createReferenceFromCompositeAccess(record, context, (EvalCompositeAccess) computedInitializerEval); } else { return EvalFixed.INCOMPLETE; } } - + private ICPPEvaluation createPointerValue(ActivationRecord record, ConstexprEvaluationContext context, ICPPEvaluation computedInitializerEval) { ICPPEvaluation initValue = initializerEval.getValue(context.getPoint()).getSubValue(0); if (isPointerToArray(initValue, context)) { EvalCompositeAccess arrayPointer = new EvalCompositeAccess(computedInitializerEval, 0); return createPointerFromCompositeAccess(record, context, arrayPointer); } else if (computedInitializerEval instanceof EvalPointer) { - EvalPointer pointer = (EvalPointer)computedInitializerEval; + EvalPointer pointer = (EvalPointer) computedInitializerEval; return pointer.copy(); } return EvalFixed.INCOMPLETE; } private static boolean isValueInitialization(ICPPEvaluation eval) { - if(eval instanceof EvalInitList) { - EvalInitList evalInitList = (EvalInitList)eval; + if (eval instanceof EvalInitList) { + EvalInitList evalInitList = (EvalInitList) eval; return evalInitList.getClauses().length == 0; } return false; @@ -151,11 +151,11 @@ public class ExecDeclarator implements ICPPExecution { private static ICPPEvaluation createReferenceFromBinding(ActivationRecord record, ConstexprEvaluationContext context, EvalBinding evalBinding) { return new EvalReference(record, evalBinding.getBinding(), context.getPoint()); } - + private static ICPPEvaluation createReferenceFromCompositeAccess(ActivationRecord record, ConstexprEvaluationContext context, EvalCompositeAccess evalCompAccess) { return new EvalReference(record, evalCompAccess, context.getPoint()); } - + private static ICPPEvaluation createPointerFromCompositeAccess(ActivationRecord record, ConstexprEvaluationContext context, EvalCompositeAccess evalCompAccess) { return new EvalPointer(record, evalCompAccess, context.getPoint()); } @@ -163,57 +163,57 @@ public class ExecDeclarator implements ICPPExecution { private static boolean isReferenceType(IType type) { return type instanceof ICPPReferenceType; } - + private static boolean isPointerType(IType type) { return type instanceof IPointerType; } - + private static boolean isArrayType(IType type) { return type instanceof IArrayType; } - + private static boolean isCStringType(IType type) { IType nestedType = null; - if(type instanceof IArrayType) { - nestedType = ((IArrayType)type).getType(); - } else if(type instanceof IPointerType) { - nestedType = ((IPointerType)type).getType(); + if (type instanceof IArrayType) { + nestedType = ((IArrayType) type).getType(); + } else if (type instanceof IPointerType) { + nestedType = ((IPointerType) type).getType(); } - - if(nestedType != null) { + + if (nestedType != null) { return nestedType.isSameType(new CPPQualifierType(CPPBasicType.CHAR, true, false)); } return false; } - + private static boolean isClassType(IType type) { return type instanceof ICPPClassType; } - + @Override public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { ICPPBinding newDeclaredBinding; - if(declaredBinding instanceof ICPPVariable) { - ICPPVariable declaredVariable = (ICPPVariable)declaredBinding; - newDeclaredBinding = CPPTemplates.createVariableSpecialization(context, declaredVariable); + if (declaredBinding instanceof ICPPVariable) { + ICPPVariable declaredVariable = (ICPPVariable) declaredBinding; + newDeclaredBinding = CPPTemplates.createVariableSpecialization(context, declaredVariable); } else { newDeclaredBinding = (ICPPBinding)CPPTemplates.createSpecialization(context.getContextSpecialization(), declaredBinding, context.getPoint()); } - + ICPPEvaluation newInitializerEval = initializerEval != null ? initializerEval.instantiate(context, maxDepth) : null; return new ExecDeclarator(newDeclaredBinding, newInitializerEval); } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_DECLARATOR); buffer.marshalBinding(declaredBinding); buffer.marshalEvaluation(initializerEval, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPBinding declaredBinding = (ICPPBinding)buffer.unmarshalBinding(); - ICPPEvaluation initializerEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); + ICPPBinding declaredBinding = (ICPPBinding) buffer.unmarshalBinding(); + ICPPEvaluation initializerEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); return new ExecDeclarator(declaredBinding, initializerEval); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDefault.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDefault.java index 82e4eead7d5..173300061c5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDefault.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDefault.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -25,12 +25,12 @@ public class ExecDefault implements ICPPExecution { public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { return this; } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_DEFAULT); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { return new ExecDefault(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDo.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDo.java index 4ec8019bda4..3f220e14291 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDo.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDo.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -33,9 +33,9 @@ public class ExecDo implements ICPPExecution { } ICPPExecution result = EvalUtil.executeStatement(bodyExec, record, context); - if(result instanceof ExecReturn) { + if (result instanceof ExecReturn) { return result; - } else if(result instanceof ExecBreak) { + } else if (result instanceof ExecBreak) { break; } } while (EvalUtil.conditionExprSatisfied(conditionEval, record, context)); @@ -46,7 +46,7 @@ public class ExecDo implements ICPPExecution { public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { ICPPEvaluation newConditionEval = conditionEval.instantiate(context, maxDepth); ICPPExecution newBodyExec = bodyExec.instantiate(context, maxDepth); - if(newConditionEval == conditionEval && newBodyExec == bodyExec) { + if (newConditionEval == conditionEval && newBodyExec == bodyExec) { return this; } return new ExecDo(newConditionEval, newBodyExec); @@ -58,10 +58,10 @@ public class ExecDo implements ICPPExecution { buffer.marshalEvaluation(conditionEval, includeValue); buffer.marshalExecution(bodyExec, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation conditionEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); - ICPPExecution bodyExec = (ICPPExecution)buffer.unmarshalExecution(); + ICPPEvaluation conditionEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPExecution bodyExec = (ICPPExecution) buffer.unmarshalExecution(); return new ExecDo(conditionEval, bodyExec); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecExpressionStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecExpressionStatement.java index 3d9721c4385..396ff7c7a21 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecExpressionStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecExpressionStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -40,15 +40,15 @@ public class ExecExpressionStatement implements ICPPExecution { } return new ExecExpressionStatement(newExprEval); } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_EXPRESSION_STATEMENT); buffer.marshalEvaluation(exprEval, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation exprEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); + ICPPEvaluation exprEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); return new ExecExpressionStatement(exprEval); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecFor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecFor.java index d737b44e5aa..8d9fe973e46 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecFor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecFor.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -33,33 +33,33 @@ public class ExecFor implements ICPPExecution { @Override public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { - for(evaluateInitializationStatement(record, context); conditionSatisfied(record, context); evaluateIterationExpression(record, context)) { + for (evaluateInitializationStatement(record, context); conditionSatisfied(record, context); evaluateIterationExpression(record, context)) { if (context.getStepsPerformed() >= ConstexprEvaluationContext.MAX_CONSTEXPR_EVALUATION_STEPS) { return ExecIncomplete.INSTANCE; } - + ICPPExecution result = EvalUtil.executeStatement(bodyExec, record, context); - if(result instanceof ExecReturn) { + if (result instanceof ExecReturn) { return result; - } else if(result instanceof ExecBreak) { + } else if (result instanceof ExecBreak) { break; - } else if(result instanceof ExecContinue) { + } else if (result instanceof ExecContinue) { continue; } } return null; } - + private void evaluateInitializationStatement(ActivationRecord record, ConstexprEvaluationContext context) { if (initializerExec != null) { EvalUtil.executeStatement(initializerExec, record, context); } } - + private boolean conditionSatisfied(ActivationRecord record, ConstexprEvaluationContext context) { - if(conditionExprEval != null) { + if (conditionExprEval != null) { return EvalUtil.conditionExprSatisfied(conditionExprEval, record, context); - } else if(conditionDeclExec != null) { + } else if (conditionDeclExec != null) { return EvalUtil.conditionDeclSatisfied(conditionDeclExec, record, context); } return true; @@ -75,13 +75,13 @@ public class ExecFor implements ICPPExecution { public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { ICPPExecution newInitializerExec = initializerExec != null ? initializerExec.instantiate(context, maxDepth) : null; ICPPEvaluation newConditionExprEval = conditionExprEval != null ? conditionExprEval.instantiate(context, maxDepth) : null; - ExecSimpleDeclaration newConditionDeclExec = conditionDeclExec != null ? (ExecSimpleDeclaration)conditionDeclExec.instantiate(context, maxDepth) : null; + ExecSimpleDeclaration newConditionDeclExec = conditionDeclExec != null ? (ExecSimpleDeclaration) conditionDeclExec.instantiate(context, maxDepth) : null; ICPPEvaluation newIterationEval = iterationEval != null ? iterationEval.instantiate(context, maxDepth) : null; ICPPExecution newBodyExec = bodyExec.instantiate(context, maxDepth); - if (newInitializerExec == initializerExec && - newConditionExprEval == conditionExprEval && + if (newInitializerExec == initializerExec && + newConditionExprEval == conditionExprEval && newConditionDeclExec == conditionDeclExec && - newIterationEval == iterationEval && + newIterationEval == iterationEval && newBodyExec == bodyExec) { return this; } @@ -97,13 +97,13 @@ public class ExecFor implements ICPPExecution { buffer.marshalEvaluation(iterationEval, includeValue); buffer.marshalExecution(bodyExec, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPExecution initializerExec = (ICPPExecution)buffer.unmarshalExecution(); - ICPPEvaluation conditionExprEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); - ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration)buffer.unmarshalExecution(); - ICPPEvaluation iterationEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); - ICPPExecution bodyExec = (ICPPExecution)buffer.unmarshalExecution(); + ICPPExecution initializerExec = (ICPPExecution) buffer.unmarshalExecution(); + ICPPEvaluation conditionExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution(); + ICPPEvaluation iterationEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPExecution bodyExec = (ICPPExecution) buffer.unmarshalExecution(); return new ExecFor(initializerExec, conditionExprEval, conditionDeclExec, iterationEval, bodyExec); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIf.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIf.java index 089af247fea..b872c81ccc1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIf.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIf.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -21,7 +21,7 @@ public class ExecIf implements ICPPExecution { private final ExecSimpleDeclaration conditionDeclExec; private final ICPPExecution thenClauseExec; private final ICPPExecution elseClauseExec; - + public ExecIf(ICPPEvaluation conditionExprEval, ExecSimpleDeclaration conditionDeclExec, ICPPExecution thenClauseExec, ICPPExecution elseClauseExec) { this.conditionExprEval = conditionExprEval; this.conditionDeclExec = conditionDeclExec; @@ -32,15 +32,15 @@ public class ExecIf implements ICPPExecution { @Override public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { boolean conditionSatisfied = false; - if(conditionExprEval != null) { + if (conditionExprEval != null) { conditionSatisfied = EvalUtil.conditionExprSatisfied(conditionExprEval, record, context); - } else if(conditionDeclExec != null) { + } else if (conditionDeclExec != null) { conditionSatisfied = EvalUtil.conditionDeclSatisfied(conditionDeclExec, record, context); } - - if(conditionSatisfied) { + + if (conditionSatisfied) { return EvalUtil.executeStatement(thenClauseExec, record, context); - } else if(elseClauseExec != null) { + } else if (elseClauseExec != null) { return EvalUtil.executeStatement(elseClauseExec, record, context); } return null; @@ -49,7 +49,7 @@ public class ExecIf implements ICPPExecution { @Override public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { ICPPEvaluation newConditionExprEval = conditionExprEval != null ? conditionExprEval.instantiate(context, maxDepth) : null; - ExecSimpleDeclaration newConditionDeclExec = conditionDeclExec != null ? (ExecSimpleDeclaration)conditionDeclExec.instantiate(context, maxDepth) : null; + ExecSimpleDeclaration newConditionDeclExec = conditionDeclExec != null ? (ExecSimpleDeclaration) conditionDeclExec.instantiate(context, maxDepth) : null; ICPPExecution newThenClauseExec = thenClauseExec.instantiate(context, maxDepth); ICPPExecution newElseClauseExec = elseClauseExec != null ? elseClauseExec.instantiate(context, maxDepth) : null; if (newConditionExprEval == conditionExprEval && newConditionDeclExec == conditionDeclExec && newThenClauseExec == thenClauseExec && newElseClauseExec == elseClauseExec) { @@ -66,12 +66,12 @@ public class ExecIf implements ICPPExecution { buffer.marshalExecution(thenClauseExec, includeValue); buffer.marshalExecution(elseClauseExec, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation conditionExprEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); - ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration)buffer.unmarshalExecution(); - ICPPExecution thenClauseExec = (ICPPExecution)buffer.unmarshalExecution(); - ICPPExecution elseClauseExec = (ICPPExecution)buffer.unmarshalExecution(); + ICPPEvaluation conditionExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution(); + ICPPExecution thenClauseExec = (ICPPExecution) buffer.unmarshalExecution(); + ICPPExecution elseClauseExec = (ICPPExecution) buffer.unmarshalExecution(); return new ExecIf(conditionExprEval, conditionDeclExec, thenClauseExec, elseClauseExec); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIncomplete.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIncomplete.java index 4e316f2627f..7ad18eeb59f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIncomplete.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIncomplete.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -16,9 +16,9 @@ import org.eclipse.core.runtime.CoreException; public class ExecIncomplete implements ICPPExecution { public static ExecIncomplete INSTANCE = new ExecIncomplete(); - + private ExecIncomplete() {} - + @Override public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { return this; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecRangeBasedFor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecRangeBasedFor.java index 67eb6094850..822aaff6734 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecRangeBasedFor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecRangeBasedFor.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -49,40 +49,40 @@ public class ExecRangeBasedFor implements ICPPExecution { private ICPPExecution loopOverArray(IVariable rangeVar, ICPPEvaluation valueRange, ActivationRecord record, ConstexprEvaluationContext context) { ICPPEvaluation[] range = valueRange.getValue(context.getPoint()).getAllSubValues(); - for(int i = 0; i < range.length; i++ ) { + for (int i = 0; i < range.length; i++) { ICPPEvaluation value = new EvalFixed(range[i].getType(context.getPoint()), range[i].getValueCategory(context.getPoint()), range[i].getValue(context.getPoint())); - if(rangeVar.getType() instanceof ICPPReferenceType) { + if (rangeVar.getType() instanceof ICPPReferenceType) { value = new EvalReference(record, new EvalCompositeAccess(valueRange, i), value.getTemplateDefinition()); } record.update(rangeVar, value); ICPPExecution result = EvalUtil.executeStatement(bodyExec, record, context); - if(result instanceof ExecReturn) { + if (result instanceof ExecReturn) { return result; - } else if(result instanceof ExecBreak) { + } else if (result instanceof ExecBreak) { break; - } else if(result instanceof ExecContinue) { + } else if (result instanceof ExecContinue) { continue; } } return null; } - - private ICPPExecution loopOverObject(IVariable rangeVar, ICPPEvaluation rangeEval, boolean rangeIsConst, ICPPClassType classType, ActivationRecord record, ConstexprEvaluationContext context) { - if(begin != null && end != null) { + + private ICPPExecution loopOverObject(IVariable rangeVar, ICPPEvaluation rangeEval, boolean rangeIsConst, ICPPClassType classType, ActivationRecord record, ConstexprEvaluationContext context) { + if (begin != null && end != null) { ICPPEvaluation beginEval = callFunction(classType, begin, rangeEval, record, context); ICPPEvaluation endEval = callFunction(classType, end, rangeEval, record, context); - boolean isRef = rangeVar.getType() instanceof ICPPReferenceType; - - for(; !isEqual(beginEval, endEval, context.getPoint()); beginEval = inc(record, beginEval, context)) { + boolean isRef = rangeVar.getType() instanceof ICPPReferenceType; + + for (; !isEqual(beginEval, endEval, context.getPoint()); beginEval = inc(record, beginEval, context)) { record.update(rangeVar, deref(beginEval, isRef, record, context)); - + ICPPExecution result = EvalUtil.executeStatement(bodyExec, record, context); - if(result instanceof ExecReturn) { + if (result instanceof ExecReturn) { return result; - } else if(result instanceof ExecBreak) { + } else if (result instanceof ExecBreak) { break; - } else if(result instanceof ExecContinue) { + } else if (result instanceof ExecContinue) { continue; } } @@ -90,33 +90,33 @@ public class ExecRangeBasedFor implements ICPPExecution { } return ExecIncomplete.INSTANCE; } - + private static boolean isEqual(ICPPEvaluation a, ICPPEvaluation b, IASTNode point) { Number result = new EvalBinary(IASTBinaryExpression.op_equals, a, b, point).getValue(point).numberValue(); return result != null && result.longValue() != 0; } - + private static ICPPEvaluation deref(ICPPEvaluation ptr, boolean isRef, ActivationRecord record, ConstexprEvaluationContext context) { ICPPEvaluation derefEval = new EvalUnary(ICPPASTUnaryExpression.op_star, ptr, null, context.getPoint()).computeForFunctionCall(record, context); - if(isRef) { + if (isRef) { return derefEval; } else { return new EvalFixed(derefEval.getType(context.getPoint()), derefEval.getValueCategory(context.getPoint()), derefEval.getValue(context.getPoint())); } } - - private static ICPPEvaluation inc(ActivationRecord record, ICPPEvaluation ptr, + + private static ICPPEvaluation inc(ActivationRecord record, ICPPEvaluation ptr, ConstexprEvaluationContext context) { return new EvalUnary(IASTUnaryExpression.op_prefixIncr, ptr, null, context.getPoint()) .computeForFunctionCall(record, context); } - + private static ICPPEvaluation callFunction(ICPPClassType classType, ICPPFunction func, ICPPEvaluation rangeEval, ActivationRecord record, ConstexprEvaluationContext context) { EvalFunctionCall call = null; - if(func instanceof ICPPMethod) { + if (func instanceof ICPPMethod) { EvalMemberAccess memberAccess = new EvalMemberAccess(classType, ValueCategory.LVALUE, func, rangeEval, false, context.getPoint()); ICPPEvaluation[] args = new ICPPEvaluation[]{ memberAccess }; - call = new EvalFunctionCall(args, rangeEval, context.getPoint()); + call = new EvalFunctionCall(args, rangeEval, context.getPoint()); } else { EvalBinding op = new EvalBinding(func, func.getType(), context.getPoint()); ICPPEvaluation[] args = new ICPPEvaluation[]{ op, rangeEval}; @@ -124,23 +124,23 @@ public class ExecRangeBasedFor implements ICPPExecution { } return call.computeForFunctionCall(record, context); } - + @Override public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { if (context.getStepsPerformed() >= ConstexprEvaluationContext.MAX_CONSTEXPR_EVALUATION_STEPS) { return ExecIncomplete.INSTANCE; } - + ICPPEvaluation valueRange = initClauseEval.computeForFunctionCall(record, context.recordStep()); ExecDeclarator declaratorExec = (ExecDeclarator) declarationExec.getDeclaratorExecutions()[0]; - IVariable rangeVar = (IVariable)declaratorExec.getDeclaredBinding(); - + IVariable rangeVar = (IVariable) declaratorExec.getDeclaredBinding(); + boolean rangeIsConst = SemanticUtil.isConst(initClauseEval.getType(context.getPoint())); IType type = SemanticUtil.getNestedType(valueRange.getType(context.getPoint()), ALLCVQ | TDEF | REF); - if(type instanceof IArrayType || type instanceof InitializerListType) { + if (type instanceof IArrayType || type instanceof InitializerListType) { return loopOverArray(rangeVar, valueRange, record, context); - } else if(type instanceof ICPPClassType) { - ICPPClassType classType = (ICPPClassType)type; + } else if (type instanceof ICPPClassType) { + ICPPClassType classType = (ICPPClassType) type; return loopOverObject(rangeVar, initClauseEval, rangeIsConst, classType, record, context); } return ExecIncomplete.INSTANCE; @@ -148,7 +148,7 @@ public class ExecRangeBasedFor implements ICPPExecution { @Override public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { - ExecSimpleDeclaration newDeclarationExec = (ExecSimpleDeclaration)declarationExec.instantiate(context, maxDepth); + ExecSimpleDeclaration newDeclarationExec = (ExecSimpleDeclaration) declarationExec.instantiate(context, maxDepth); ICPPEvaluation newInitClauseEval = initClauseEval.instantiate(context, maxDepth); // TODO: This isn't the correct way to instantiate the 'begin' and 'end' functions, because // if the range type is dependent, ADL may find different functions to call after instantiation. @@ -157,7 +157,7 @@ public class ExecRangeBasedFor implements ICPPExecution { // range as argument. // - Instantiate the EvalFunctionCalls. This will perform the ADL if appropriate. // - Query the instantiated function bindings from the instantiated EvalFunctionCalls. - // Alternatively, we could lower the range-based for loop into a regular for loop as + // Alternatively, we could lower the range-based for loop into a regular for loop as // described in the standard (by constructing the corresponding executions and evaluations), // and the above instantiations will fall out of that automatically. ICPPFunction newBegin = begin != null ? (ICPPFunction)CPPTemplates.createSpecialization( @@ -165,9 +165,9 @@ public class ExecRangeBasedFor implements ICPPExecution { ICPPFunction newEnd = end != null ? (ICPPFunction)CPPTemplates.createSpecialization( context.getContextSpecialization(), end, context.getPoint()) : null; ICPPExecution newBodyExec = bodyExec.instantiate(context, maxDepth); - - if (newDeclarationExec == declarationExec && - newInitClauseEval == initClauseEval && + + if (newDeclarationExec == declarationExec && + newInitClauseEval == initClauseEval && newBegin == begin && newEnd == end && newBodyExec == bodyExec) { @@ -185,13 +185,13 @@ public class ExecRangeBasedFor implements ICPPExecution { buffer.marshalBinding(end); buffer.marshalExecution(bodyExec, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ExecSimpleDeclaration declarationExec = (ExecSimpleDeclaration)buffer.unmarshalExecution(); - ICPPEvaluation initClauseEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); - ICPPFunction begin = (ICPPFunction)buffer.unmarshalBinding(); - ICPPFunction end = (ICPPFunction)buffer.unmarshalBinding(); - ICPPExecution bodyExec = (ICPPExecution)buffer.unmarshalExecution(); + ExecSimpleDeclaration declarationExec = (ExecSimpleDeclaration) buffer.unmarshalExecution(); + ICPPEvaluation initClauseEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ICPPFunction begin = (ICPPFunction) buffer.unmarshalBinding(); + ICPPFunction end = (ICPPFunction) buffer.unmarshalBinding(); + ICPPExecution bodyExec = (ICPPExecution) buffer.unmarshalExecution(); return new ExecRangeBasedFor(declarationExec, initClauseEval, begin, end, bodyExec); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecReturn.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecReturn.java index 8a55f1b0e7d..4f69a3026ff 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecReturn.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecReturn.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -44,15 +44,15 @@ public class ExecReturn implements ICPPExecution { public ICPPEvaluation getReturnValueEvaluation() { return retVal; } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_RETURN); buffer.marshalEvaluation(retVal, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation retVal = (ICPPEvaluation)buffer.unmarshalEvaluation(); + ICPPEvaluation retVal = (ICPPEvaluation) buffer.unmarshalEvaluation(); return new ExecReturn(retVal); } } \ No newline at end of file diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSimpleDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSimpleDeclaration.java index 61af70678e2..09f6b8828a3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSimpleDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSimpleDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -21,7 +21,7 @@ public class ExecSimpleDeclaration implements ICPPExecution { public ExecSimpleDeclaration(ICPPExecution[] declaratorExecutions) { this.declaratorExecutions = declaratorExecutions; } - + public ICPPExecution[] getDeclaratorExecutions() { return declaratorExecutions; } @@ -29,7 +29,7 @@ public class ExecSimpleDeclaration implements ICPPExecution { @Override public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { ICPPExecution[] newDeclaratorExecutions = new ICPPExecution[declaratorExecutions.length]; - for(int i = 0; i < declaratorExecutions.length; i++) { + for (int i = 0; i < declaratorExecutions.length; i++) { newDeclaratorExecutions[i] = declaratorExecutions[i].executeForFunctionCall(record, context); } return new ExecSimpleDeclaration(newDeclaratorExecutions); @@ -38,12 +38,12 @@ public class ExecSimpleDeclaration implements ICPPExecution { @Override public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { ICPPExecution[] newDeclaratorExecutions = new ICPPExecution[declaratorExecutions.length]; - for(int i = 0; i < declaratorExecutions.length; i++) { + for (int i = 0; i < declaratorExecutions.length; i++) { newDeclaratorExecutions[i] = declaratorExecutions[i].instantiate(context, maxDepth); } return new ExecSimpleDeclaration(newDeclaratorExecutions); } - + @Override public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException { buffer.putShort(ITypeMarshalBuffer.EXEC_SIMPLE_DECLARATION); @@ -52,12 +52,12 @@ public class ExecSimpleDeclaration implements ICPPExecution { buffer.marshalExecution(execution, includeValue); } } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { int len = buffer.getInt(); ICPPExecution[] declaratorExecutions = new ICPPExecution[len]; for (int i = 0; i < declaratorExecutions.length; i++) { - declaratorExecutions[i] = (ICPPExecution)buffer.unmarshalExecution(); + declaratorExecutions[i] = (ICPPExecution) buffer.unmarshalExecution(); } return new ExecSimpleDeclaration(declaratorExecutions); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSwitch.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSwitch.java index a5861d49ed2..06c7bb1f362 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSwitch.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSwitch.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -27,42 +27,42 @@ public class ExecSwitch implements ICPPExecution { this.controllerDeclExec = controllerDeclExec; this.bodyStmtExecutions = bodyStmtExecutions; } - + @Override public ICPPExecution executeForFunctionCall(ActivationRecord record, ConstexprEvaluationContext context) { final int caseIndex = getMatchingCaseIndex(record, context); - for(int i = caseIndex; i < bodyStmtExecutions.length; ++i) { + for (int i = caseIndex; i < bodyStmtExecutions.length; ++i) { ICPPExecution stmtExec = bodyStmtExecutions[i]; ICPPExecution result = EvalUtil.executeStatement(stmtExec, record, context); - if(result instanceof ExecReturn || result instanceof ExecContinue) { + if (result instanceof ExecReturn || result instanceof ExecContinue) { return result; - } else if(result instanceof ExecBreak) { + } else if (result instanceof ExecBreak) { break; } } return null; } - + private int getMatchingCaseIndex(ActivationRecord record, ConstexprEvaluationContext context) { IValue controllerValue = null; - if(controllerExprEval != null) { + if (controllerExprEval != null) { controllerValue = EvalUtil.getConditionExprValue(controllerExprEval, record, context); - } else if(controllerDeclExec != null) { - controllerValue = EvalUtil.getConditionDeclValue(controllerDeclExec, record, context); + } else if (controllerDeclExec != null) { + controllerValue = EvalUtil.getConditionDeclValue(controllerDeclExec, record, context); } - - for(int i = 0; i < bodyStmtExecutions.length; ++i) { - if(isSatisfiedCaseStatement(bodyStmtExecutions[i], controllerValue, record, context)) { + + for (int i = 0; i < bodyStmtExecutions.length; ++i) { + if (isSatisfiedCaseStatement(bodyStmtExecutions[i], controllerValue, record, context)) { return i; } } return bodyStmtExecutions.length; } - + private boolean isSatisfiedCaseStatement(ICPPExecution stmtExec, IValue controllerValue, ActivationRecord record, ConstexprEvaluationContext context) { if (stmtExec instanceof ExecCase) { - ExecCase caseStmtExec = (ExecCase)stmtExec; - caseStmtExec = (ExecCase)caseStmtExec.executeForFunctionCall(record, context); + ExecCase caseStmtExec = (ExecCase) stmtExec; + caseStmtExec = (ExecCase) caseStmtExec.executeForFunctionCall(record, context); Number caseVal = caseStmtExec.getCaseExpressionEvaluation().getValue(null).numberValue(); Number controllerVal = controllerValue.numberValue(); return caseVal.equals(controllerVal); @@ -73,18 +73,18 @@ public class ExecSwitch implements ICPPExecution { @Override public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { ICPPEvaluation newControllerExprEval = controllerExprEval != null ? controllerExprEval.instantiate(context, maxDepth) : null; - ExecSimpleDeclaration newControllerDeclExec = controllerDeclExec != null ? (ExecSimpleDeclaration)controllerDeclExec.instantiate(context, maxDepth) : null; + ExecSimpleDeclaration newControllerDeclExec = controllerDeclExec != null ? (ExecSimpleDeclaration) controllerDeclExec.instantiate(context, maxDepth) : null; ICPPExecution[] newBodyStmtExecutions = new ICPPExecution[bodyStmtExecutions.length]; boolean executionsDidChange = false; - for(int i = 0; i < bodyStmtExecutions.length; i++) { + for (int i = 0; i < bodyStmtExecutions.length; i++) { ICPPExecution bodyStmtExec = bodyStmtExecutions[i]; ICPPExecution newBodyStmtExec = bodyStmtExec.instantiate(context, maxDepth); - if(newBodyStmtExec != bodyStmtExec) { + if (newBodyStmtExec != bodyStmtExec) { executionsDidChange = true; } newBodyStmtExecutions[i] = newBodyStmtExec; } - + if (newControllerExprEval == controllerExprEval && newControllerDeclExec == controllerDeclExec && !executionsDidChange) { return this; } @@ -101,14 +101,14 @@ public class ExecSwitch implements ICPPExecution { buffer.marshalExecution(execution, includeValue); } } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation controllerExprEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); - ExecSimpleDeclaration controllerDeclExec = (ExecSimpleDeclaration)buffer.unmarshalExecution(); + ICPPEvaluation controllerExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ExecSimpleDeclaration controllerDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution(); int len = buffer.getInt(); ICPPExecution[] bodyStmtExecutions = new ICPPExecution[len]; for (int i = 0; i < bodyStmtExecutions.length; i++) { - bodyStmtExecutions[i] = (ICPPExecution)buffer.unmarshalExecution(); + bodyStmtExecutions[i] = (ICPPExecution) buffer.unmarshalExecution(); } return new ExecSwitch(controllerExprEval, controllerDeclExec, bodyStmtExecutions); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecWhile.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecWhile.java index 36871f5a9de..7cd2f24b2df 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecWhile.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecWhile.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik +* Copyright (c) 2016 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -35,21 +35,21 @@ public class ExecWhile implements ICPPExecution { } ICPPExecution result = EvalUtil.executeStatement(bodyExec, record, context); - if(result instanceof ExecReturn) { + if (result instanceof ExecReturn) { return result; - } else if(result instanceof ExecBreak) { + } else if (result instanceof ExecBreak) { break; - } else if(result instanceof ExecContinue) { + } else if (result instanceof ExecContinue) { continue; } } return null; } - + private boolean conditionSatisfied(ActivationRecord record, ConstexprEvaluationContext context) { - if(conditionExprEval != null) { + if (conditionExprEval != null) { return EvalUtil.conditionExprSatisfied(conditionExprEval, record, context); - } else if(conditionDeclExec != null) { + } else if (conditionDeclExec != null) { return EvalUtil.conditionDeclSatisfied(conditionDeclExec, record, context); } return false; @@ -58,7 +58,7 @@ public class ExecWhile implements ICPPExecution { @Override public ICPPExecution instantiate(InstantiationContext context, int maxDepth) { ICPPEvaluation newConditionExprEval = conditionExprEval != null ? conditionExprEval.instantiate(context, maxDepth) : null; - ExecSimpleDeclaration newConditionDeclExec = conditionDeclExec != null ? (ExecSimpleDeclaration)conditionDeclExec.instantiate(context, maxDepth) : null; + ExecSimpleDeclaration newConditionDeclExec = conditionDeclExec != null ? (ExecSimpleDeclaration) conditionDeclExec.instantiate(context, maxDepth) : null; ICPPExecution newBodyExec = bodyExec.instantiate(context, maxDepth); if (newConditionExprEval == conditionExprEval && newConditionDeclExec == conditionDeclExec && newBodyExec == bodyExec) { return this; @@ -73,11 +73,11 @@ public class ExecWhile implements ICPPExecution { buffer.marshalExecution(conditionDeclExec, includeValue); buffer.marshalExecution(bodyExec, includeValue); } - + public static ISerializableExecution unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - ICPPEvaluation conditionExprEval = (ICPPEvaluation)buffer.unmarshalEvaluation(); - ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration)buffer.unmarshalExecution(); - ICPPExecution bodyExec = (ICPPExecution)buffer.unmarshalExecution(); + ICPPEvaluation conditionExprEval = (ICPPEvaluation) buffer.unmarshalEvaluation(); + ExecSimpleDeclaration conditionDeclExec = (ExecSimpleDeclaration) buffer.unmarshalExecution(); + ICPPExecution bodyExec = (ICPPExecution) buffer.unmarshalExecution(); return new ExecWhile(conditionExprEval, conditionDeclExec, bodyExec); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExpressionTypes.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExpressionTypes.java index ab2a9070230..bedb86c3d39 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExpressionTypes.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExpressionTypes.java @@ -8,7 +8,7 @@ * Contributors: * Markus Schorn - initial API and implementation * Sergey Prigogin (Google) - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics; import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.*; @@ -29,12 +29,12 @@ import org.eclipse.cdt.internal.core.dom.parser.c.CQualifierType; * Methods for computing the type of an expression. */ public class ExpressionTypes { - + public static IType glvalueType(IType type) { // Reference types are removed. return SemanticUtil.getNestedType(type, COND_TDEF | REF); } - + public static IType prvalueType(IType type) { return Conversions.lvalue_to_rvalue(type, false); } @@ -62,7 +62,7 @@ public class ExpressionTypes { } return ValueCategory.PRVALUE; } - + public static IType typeFromFunctionCall(IType functionType) { IType t= SemanticUtil.getNestedType(functionType, TDEF | REF | CVTYPE); if (t instanceof IPointerType) { @@ -79,7 +79,7 @@ public class ExpressionTypes { final ICPPFunctionType ft = function.getType(); return typeFromReturnType(ft.getReturnType()); } - + public static IType typeFromReturnType(IType type) { IType t= SemanticUtil.getNestedType(type, TDEF); if (t instanceof ICPPReferenceType) { @@ -87,7 +87,7 @@ public class ExpressionTypes { } return prvalueType(type); } - + public static IType restoreTypedefs(IType type, IType originalType) { IType t = SemanticUtil.substituteTypedef(type, originalType); if (t != null) @@ -106,7 +106,7 @@ public class ExpressionTypes { } return type; } - + private static boolean isConst(IType type) { if (type instanceof IQualifierType) { return ((IQualifierType) type).isConst(); @@ -115,7 +115,7 @@ public class ExpressionTypes { } return false; } - + private static boolean isVolatile(IType type) { if (type instanceof IQualifierType) { return ((IQualifierType) type).isVolatile(); @@ -124,25 +124,25 @@ public class ExpressionTypes { } return false; } - + private static IType makeConst(IType type) { if (type instanceof ICQualifierType) { ICQualifierType qualifierType = ((ICQualifierType) type); - return new CQualifierType(qualifierType.getType(), + return new CQualifierType(qualifierType.getType(), true, qualifierType.isVolatile(), qualifierType.isRestrict()); } return new CQualifierType(type, true, false, false); } - + private static IType makeVolatile(IType type) { if (type instanceof ICQualifierType) { ICQualifierType qualifierType = ((ICQualifierType) type); - return new CQualifierType(qualifierType.getType(), + return new CQualifierType(qualifierType.getType(), qualifierType.isConst(), true, qualifierType.isRestrict()); } return new CQualifierType(type, false, true, false); } - + private static IType restoreCV(IType type, IType originalType) { if (isConst(originalType)) { type = makeConst(type); @@ -152,7 +152,7 @@ public class ExpressionTypes { } return type; } - + public static IType restoreCV(IType type, IType originalType1, IType originalType2) { return restoreCV(restoreCV(type, originalType1), originalType2); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/FunctionSetType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/FunctionSetType.java index e797d405a1b..afe9b11e4f5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/FunctionSetType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/FunctionSetType.java @@ -60,7 +60,7 @@ public class FunctionSetType implements IType { public void applySelectedFunction(ICPPFunction selectedFunction) { fFunctionSet.applySelectedFunction(selectedFunction); } - + public CPPFunctionSet getFunctionSet() { return fFunctionSet; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/HeuristicResolver.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/HeuristicResolver.java index a9c58e0875c..040b23aa3d2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/HeuristicResolver.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/HeuristicResolver.java @@ -51,35 +51,35 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownType; * in contexts where the results of ordinary binding resolution (whose * approach to templates is "defer actual resolution until template * arguments become available") are undesirable. - * + * * Usually, this comes up in cases where the user is trying to invoke * certain editor functionality inside a template. - * + * * For example, consider the following code: - * + * * struct Cat { * void meow(); * }; - * + * * template * struct B { * Cat foo(); * }; - * + * * template * void foo(B a) { - * a.foo(). + * a.foo(). * } * * and suppose content assist is invoked after the "a.foo().". * To determine what completions to provide in that context, we try * to determine the type of 'a.foo()', and then look to see what * members are inside that type. - * + * * However, because we're in a template, the type of 'a.foo()' is * a deferred / unknown type (in this case, a TypeOfDependentExpression), * so we don't know what members it has. - * + * * HeuristicResolver maps that unknown type to a concrete type * (in this case, 'Cat') by applying the following heuristic: * whenever name lookup is deferred because the lookup scope is @@ -88,12 +88,12 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownType; * or explicit specialization), and perform the lookup in the * primary template scope. This heuristic gives the right answer * in many cases, including this one. - * - * HeuristicResolver can handle some more complex situations as well, + * + * HeuristicResolver can handle some more complex situations as well, * such as metafunction calls, typedefs, and nested templates. See * CompletionTests.testDependentScopes_bug472818c for a test case * that pushes it to its limit. - * + * * However, due to the nature of its heuristic, it cannot handle * cases where the correct answer requires selecting a specialization * rather than the primary template. Bug 487700 is on file for @@ -116,14 +116,14 @@ public class HeuristicResolver { } return null; } - + /** * Helper function for lookInside(). * Specializes the given bindings in the given context. * * @param point the point of instantiation for name lookups */ - private static IBinding[] specializeBindings(IBinding[] bindings, ICPPClassSpecialization context, + private static IBinding[] specializeBindings(IBinding[] bindings, ICPPClassSpecialization context, IASTNode point) { IBinding[] result = new IBinding[bindings.length]; for (int i = 0; i < bindings.length; ++i) { @@ -131,7 +131,7 @@ public class HeuristicResolver { } return result; } - + /** * An extension of CPPDeferredClassInstance that implements ICPPClassSpecialization, * allowing its members to be specialized via specializeMember(). @@ -154,7 +154,7 @@ public class HeuristicResolver { public IBinding specializeMember(IBinding binding, IASTNode point) { return CPPTemplates.createSpecialization(this, binding, point); } - + @Override public IBinding specializeMember(IBinding binding) { throw new UnsupportedOperationException(); @@ -205,7 +205,7 @@ public class HeuristicResolver { throw new UnsupportedOperationException(); } } - + /** * Represents a lookup of a name in a primary template scope. * The set of such lookups during a heuristic resolution operation is @@ -219,7 +219,7 @@ public class HeuristicResolver { this.scope = scope; this.name = name; } - + @Override public boolean equals(Object other) { if (!(other instanceof HeuristicLookup)) { @@ -229,21 +229,21 @@ public class HeuristicResolver { return scope == otherLookup.scope && CharArrayUtils.equals(name, otherLookup.name); } - + @Override public int hashCode() { return scope.hashCode() * (29 + name.hashCode()); } } - + /** * Helper function for resolveUnknownType() and resolveUnknownBinding(). * Heuristically resolves the given unknown type and performs name lookup inside it. - * + * * If name lookup is performed inside a template scope to approximate lookup * in the scope of a dependent instantiation, the lookup results are * specialized in the context of the dependent instantiation. - * + * * @param ownerType the type to perform name lookup inside * @param isPointerDeref true if 'ownerType' is a pointer type * @param name the name to be looked up @@ -252,7 +252,7 @@ public class HeuristicResolver { * @param point point of instantiation for name lookups * @return results of the name lookup */ - private static IBinding[] lookInside(IType ownerType, boolean isPointerDeref, char[] name, + private static IBinding[] lookInside(IType ownerType, boolean isPointerDeref, char[] name, ICPPTemplateArgument[] templateArgs, Set lookupSet, IASTNode point) { // If this is a pointer dereference, the pointer type might be outside of the dependent type. ownerType = SemanticUtil.getSimplifiedType(ownerType); @@ -260,12 +260,12 @@ public class HeuristicResolver { ownerType = ((IPointerType) ownerType).getType(); isPointerDeref = false; } - + IType lookupType = ownerType; ICPPClassSpecialization specializationContext = null; if (lookupType instanceof ICPPUnknownType) { - // Here we have a loop similar to the one in resolveUnknownType(), but we stop when - // we get a result that's an ICPPClassSpecialization or an ICPPDeferredClassInstance, + // Here we have a loop similar to the one in resolveUnknownType(), but we stop when + // we get a result that's an ICPPClassSpecialization or an ICPPDeferredClassInstance, // so we can use it to specialize the lookup results as appropriate. while (true) { if (lookupType instanceof ICPPClassSpecialization) { @@ -278,7 +278,7 @@ public class HeuristicResolver { lookupType = specializationContext.getSpecializedBinding(); break; } - IType resolvedType = resolveUnknownTypeOnce((ICPPUnknownType) lookupType, lookupSet, + IType resolvedType = resolveUnknownTypeOnce((ICPPUnknownType) lookupType, lookupSet, point); resolvedType = SemanticUtil.getNestedType(resolvedType, SemanticUtil.TDEF | SemanticUtil.REF); if (resolvedType == lookupType || !(resolvedType instanceof ICPPUnknownType)) { @@ -300,7 +300,7 @@ public class HeuristicResolver { } } } - + IScope lookupScope = null; if (lookupType instanceof ICPPClassType) { lookupScope = ((ICPPClassType) lookupType).getCompositeScope(); @@ -327,9 +327,9 @@ public class HeuristicResolver { } return IBinding.EMPTY_BINDING_ARRAY; } - + /** - * Helper function for resolveUnknownType(). + * Helper function for resolveUnknownType(). * Returns the type of a binding. */ private static IType typeForBinding(IBinding binding) { @@ -344,29 +344,29 @@ public class HeuristicResolver { } return null; } - + /** - * Given an unknown type, heuristically tries to find a concrete type + * Given an unknown type, heuristically tries to find a concrete type * (i.e. not an unknown type) corresponding to it. - * + * * Returns null if no heuristic resolution could be performed. - * + * * Multiple rounds of resolution are performed, as the result of a single * round may yield a type which is still dependent. Resolution stops when * a concrete type is found, or the resolution of the last resolution * round is the same as the result of the previous resolution round. * In between each round, typedefs are unwrapped. - * + * * @param point the point of instantiation for lookups */ public static IType resolveUnknownType(ICPPUnknownType type, IASTNode point) { return resolveUnknownType(type, point, SemanticUtil.TDEF); } - + /** * Similar to resolveUnknownType(type, point), but allows specifying * things other than typedefs to unwrap between rounds of resolution - * (e.g. references). + * (e.g. references). */ private static IType resolveUnknownType(ICPPUnknownType type, IASTNode point, int unwrapOptions) { while (true) { @@ -380,11 +380,11 @@ public class HeuristicResolver { return resolvedType; } } - + /** * Helper function for {@link #resolveUnknownType} which does one round of resolution. */ - private static IType resolveUnknownTypeOnce(ICPPUnknownType type, Set lookupSet, + private static IType resolveUnknownTypeOnce(ICPPUnknownType type, Set lookupSet, IASTNode point) { if (type instanceof ICPPDeferredClassInstance) { ICPPDeferredClassInstance deferredInstance = (ICPPDeferredClassInstance) type; @@ -409,7 +409,7 @@ public class HeuristicResolver { ICPPEvaluation fieldOwner = id.getFieldOwner(); if (fieldOwner != null) { IType fieldOwnerType = fieldOwner.getType(point); - IBinding[] candidates = lookInside(fieldOwnerType, id.isPointerDeref(), id.getName(), + IBinding[] candidates = lookInside(fieldOwnerType, id.isPointerDeref(), id.getName(), id.getTemplateArgs(), lookupSet, point); if (candidates.length == 1) { return typeForBinding(candidates[0]); @@ -433,9 +433,9 @@ public class HeuristicResolver { } else if (type instanceof ICPPUnknownMemberClass) { ICPPUnknownMemberClass member = (ICPPUnknownMemberClass) type; IType ownerType = member.getOwnerType(); - IBinding[] candidates = lookInside(ownerType, false, member.getNameCharArray(), null, + IBinding[] candidates = lookInside(ownerType, false, member.getNameCharArray(), null, lookupSet, point); - if (candidates.length == 1) { + if (candidates.length == 1) { if (candidates[0] instanceof IType) { IType result = (IType) candidates[0]; if (type instanceof ICPPUnknownMemberClassInstance) { @@ -444,7 +444,7 @@ public class HeuristicResolver { result = (IType) CPPTemplates.instantiate((ICPPClassTemplate) result, args, point); } else if (result instanceof ICPPAliasTemplate) { result = (IType) CPPTemplates.instantiateAliasTemplate((ICPPAliasTemplate) result, - args, point); + args, point); } else if (result instanceof ICPPAliasTemplateInstance) { // TODO(nathanridge): Remove this branch once we properly represent // specializations of alias templates (which will then implement @@ -459,11 +459,11 @@ public class HeuristicResolver { } return null; } - + /** * Given an unknown binding, heuristically tries to find concrete bindings (i.e. not unknown bindings) * corresponding to it. - * + * * Returns an empty array if no heuristic resolution could be performed. * @param point the point of instantiation for lookups diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/InitializerListType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/InitializerListType.java index 8fc86cd4242..2f2535a8666 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/InitializerListType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/InitializerListType.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics; import org.eclipse.cdt.core.dom.ast.IType; @@ -28,7 +28,7 @@ public class InitializerListType implements IType, ISerializableType { public EvalInitList getEvaluation() { return fInitializerList; } - + @Override public boolean isSameType(IType type) { return false; @@ -43,7 +43,7 @@ public class InitializerListType implements IType, ISerializableType { return null; } } - + @Override public String toString() { return "InitializerListType"; //$NON-NLS-1$ @@ -54,9 +54,9 @@ public class InitializerListType implements IType, ISerializableType { buffer.putShort(ITypeMarshalBuffer.INITIALIZER_LIST_TYPE); buffer.marshalEvaluation(fInitializerList, true); } - + public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { - EvalInitList evalInitList = (EvalInitList)buffer.unmarshalEvaluation(); + EvalInitList evalInitList = (EvalInitList) buffer.unmarshalEvaluation(); return new InitializerListType(evalInitList); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java index a81b8d7eaa9..14d13a2be0c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java @@ -81,7 +81,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluationOwner; * Context data for IASTName lookup */ public class LookupData extends ScopeLookupData { - private static final ICPPTemplateArgument[] UNINITIALIZED_TEMPLATE_ARGUMENTS = {}; + private static final ICPPTemplateArgument[] UNINITIALIZED_TEMPLATE_ARGUMENTS = {}; public Map> usingDirectives= Collections.emptyMap(); /** Used to ensure we don't visit things more than once. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/NamespaceTypeCollector.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/NamespaceTypeCollector.java index dede77e66bc..185907c8345 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/NamespaceTypeCollector.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/NamespaceTypeCollector.java @@ -8,7 +8,7 @@ * Contributors: * Markus Schorn - initial API and implementation * Sergey Prigogin (Google) - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics; import org.eclipse.cdt.core.dom.ast.ASTVisitor; @@ -66,10 +66,10 @@ class NamespaceTypeCollector extends ASTVisitor { } } else if (declSpec instanceof ICPPASTElaboratedTypeSpecifier) { // 3.3.1.5 Point of declaration - if (simpleDeclaration.getDeclarators().length != 0) { + if (simpleDeclaration.getDeclarators().length != 0) { addNonSimpleElabSpec((ICPPASTElaboratedTypeSpecifier) declSpec); } - } + } // Visit nested class definitions and parameter declarations return PROCESS_CONTINUE; } else if (declaration instanceof IASTFunctionDefinition) { @@ -80,20 +80,20 @@ class NamespaceTypeCollector extends ASTVisitor { ASTInternal.addName(fScope, declarator.getName()); } else if (declSpec instanceof ICPPASTElaboratedTypeSpecifier) { addNonSimpleElabSpec((ICPPASTElaboratedTypeSpecifier) declSpec); - } + } // Visit parameter declarations return PROCESS_CONTINUE; - } + } return PROCESS_SKIP; } - + @Override public int visit(IASTParameterDeclaration declaration) { IASTDeclSpecifier declSpec = declaration.getDeclSpecifier(); if (declSpec instanceof ICPPASTElaboratedTypeSpecifier) { addNonSimpleElabSpec((ICPPASTElaboratedTypeSpecifier) declSpec); - } + } return PROCESS_SKIP; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java index b05751d613d..0721cbf63e6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java @@ -413,7 +413,7 @@ public class SemanticUtil { if (newNestedType == null) return type; - // Do not to add unnecessary qualifications (bug 24908). + // Do not to add unnecessary qualifications (bug 24908). if (type instanceof IQualifierType) { IQualifierType qt= (IQualifierType) type; return addQualifiers(newNestedType, qt.isConst(), qt.isVolatile(), false); @@ -690,12 +690,12 @@ public class SemanticUtil { b1= ((ICPPNamespaceAlias) b1).getBinding(); for (int i = 0; b2 instanceof ICPPNamespaceAlias && i < 20; i++) b2= ((ICPPNamespaceAlias) b2).getBinding(); - + if (b1 == null) return b2 == null; if (b2 == null) return false; - + if (!(b1 instanceof ICPPNamespace) || !(b2 instanceof ICPPNamespace)) return false; if (!CharArrayUtils.equals(b1.getNameCharArray(), b2.getNameCharArray())) @@ -757,7 +757,7 @@ public class SemanticUtil { if (base instanceof IType && hashSet.add(base)) { IType tbase= (IType) base; if (tbase.isSameType(baseClass) || - (baseClass instanceof ICPPSpecialization && // Allow some flexibility with templates. + (baseClass instanceof ICPPSpecialization && // Allow some flexibility with templates. ((IType) ((ICPPSpecialization) baseClass).getSpecializedBinding()).isSameType(tbase))) { return 1; } @@ -824,7 +824,7 @@ public class SemanticUtil { } return -1; } - + /** * Returns the value of the initializer of a variable. * @@ -851,21 +851,21 @@ public class SemanticUtil { case 1: clause= list.getClauses()[0]; break; - default: + default: return ((ICPPEvaluationOwner) init).getEvaluation().getValue(init); - + } } if (clause instanceof IASTExpression) { return ValueFactory.create((IASTExpression) clause); } - + if (clause instanceof ICPPASTInitializerList) { return ((ICPPEvaluationOwner) clause).getEvaluation().getValue(clause); } return IntegralValue.UNKNOWN; } - + /** * Returns whether a type is const or a reference to a const type. * @@ -873,21 +873,21 @@ public class SemanticUtil { * @return true if the type is const, otherwise false */ public static boolean isConst(IType type) { - if(type instanceof ICPPReferenceType) { - ICPPReferenceType refType = (ICPPReferenceType)type; + if (type instanceof ICPPReferenceType) { + ICPPReferenceType refType = (ICPPReferenceType) type; return isConst(refType.getType()); - } else if(type instanceof CPPQualifierType) { - CPPQualifierType qualifierType = (CPPQualifierType)type; + } else if (type instanceof CPPQualifierType) { + CPPQualifierType qualifierType = (CPPQualifierType) type; return qualifierType.isConst(); } return false; } - + static IType[] addImplicitParameterType(IType[] types, ICPPMethod m) { IType t= CPPSemantics.getImplicitParameterType(m); return concatTypes(t, types); } - + static IType[] concatTypes(final IType t, IType[] types) { IType[] result= new IType[types.length+1]; result[0]= t; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SignatureBuilder.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SignatureBuilder.java index 1511a0dc3ff..c38912b1ce0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SignatureBuilder.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SignatureBuilder.java @@ -90,7 +90,7 @@ class SignatureBuilder implements ITypeMarshalBuffer { eval.marshal(this, includeValues); } } - + @Override public void marshalExecution(ISerializableExecution exec, boolean includeValue) throws CoreException { if (exec == null) { @@ -136,7 +136,7 @@ class SignatureBuilder implements ITypeMarshalBuffer { appendSeparator(); fBuffer.append(value); } - + @Override public void putInt(int value) { appendSeparator(); @@ -176,7 +176,7 @@ class SignatureBuilder implements ITypeMarshalBuffer { public ISerializableEvaluation unmarshalEvaluation() throws CoreException { throw new UnsupportedOperationException(); } - + @Override public ISerializableExecution unmarshalExecution() throws CoreException { throw new UnsupportedOperationException(); @@ -211,7 +211,7 @@ class SignatureBuilder implements ITypeMarshalBuffer { public short getShort() throws CoreException { throw new UnsupportedOperationException(); } - + @Override public int getInt() throws CoreException { throw new UnsupportedOperationException(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java index bc991231604..5cbe5b334c8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java @@ -9,7 +9,7 @@ * Markus Schorn - initial API and implementation * Sergey Prigogin (Google) * Nathan Ridge - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics; import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE; @@ -93,13 +93,13 @@ public class TemplateArgumentDeduction { ICPPTemplateArgument[] tmplArgs, List fnArgs, List argIsLValue, CPPTemplateParameterMap map, IASTNode point) throws DOMException { final ICPPTemplateParameter[] tmplParams = template.getTemplateParameters(); - + if (tmplArgs != null && !addExplicitArguments(template, tmplParams, tmplArgs, map, point)) return null; - - if (!deduceFromFunctionArgs(template, fnArgs, argIsLValue, map, point)) + + if (!deduceFromFunctionArgs(template, fnArgs, argIsLValue, map, point)) return null; - + return createArguments(map, tmplParams); } @@ -124,34 +124,34 @@ public class TemplateArgumentDeduction { } else if (j < fnParCount) { par= fnPars[j]; if (par instanceof ICPPParameterPackType) { - if (j != fnParCount - 1) + if (j != fnParCount - 1) continue argLoop; // Non-deduced context - + par= fnParPack= ((ICPPParameterPackType) par).getType(); deduct= new TemplateArgumentDeduction(deduct, fnArgs.size() - j); - } + } } else { break; } - + par= CPPTemplates.instantiateType(par, new InstantiationContext(map, point)); if (!SemanticUtil.isValidType(par)) return false; - + if (CPPTemplates.isDependentType(par)) { IType arg = fnArgs.get(j); par= SemanticUtil.getNestedType(par, SemanticUtil.TDEF); // adjustParameterType preserves typedefs - + // C++11: 14.9.2.1-1 if (arg instanceof InitializerListType) { par= SemanticUtil.getNestedType(par, TDEF | REF | CVTYPE); - + // Check if this is a deduced context. IType inner= Conversions.getInitListType(par); if (inner != null) { final EvalInitList eval = ((InitializerListType) arg).getEvaluation(); for (ICPPEvaluation clause : eval.getClauses()) { - if (!deduceFromFunctionArg(inner, clause.getType(point), + if (!deduceFromFunctionArg(inner, clause.getType(point), clause.getValueCategory(point), deduct, point)) return false; } @@ -163,7 +163,7 @@ public class TemplateArgumentDeduction { if (f instanceof ICPPFunctionTemplate) continue argLoop; // Non-deduced context } - + // Do trial deduction CPPTemplateParameterMap success= null; Set handled= new HashSet<>(); @@ -188,15 +188,15 @@ public class TemplateArgumentDeduction { return false; deduct.restoreState(success); } else { - if (!deduceFromFunctionArg(par, arg, argCats.get(j), deduct, point)) + if (!deduceFromFunctionArg(par, arg, argCats.get(j), deduct, point)) return false; } } } - + if (!map.addDeducedArgs(deduct.fDeducedArgs)) return false; - + // 14.8.2.5 - 17 for (ICPPTemplateParameter tpar : tmplPars) { if (tpar instanceof ICPPTemplateNonTypeParameter) { @@ -257,7 +257,7 @@ public class TemplateArgumentDeduction { // deduction. isReferenceTypeParameter= true; final ICPPReferenceType refPar = (ICPPReferenceType) par; - if (refPar.isRValueReference() && refPar.getType() instanceof ICPPTemplateParameter && + if (refPar.isRValueReference() && refPar.getType() instanceof ICPPTemplateParameter && valueCat == LVALUE) { arg= new CPPReferenceType(getSimplifiedType(arg), false); } else { @@ -267,7 +267,7 @@ public class TemplateArgumentDeduction { } else { arg= getArgumentTypeForDeduction(arg, false); } - + // 14.8.2.1-3 CVQualifier cvPar= SemanticUtil.getCVQualifier(par); CVQualifier cvArg= SemanticUtil.getCVQualifier(arg); @@ -300,7 +300,7 @@ public class TemplateArgumentDeduction { ICPPTemplateInstance pInst = (ICPPTemplateInstance) pcheck; ICPPClassTemplate pTemplate= getPrimaryTemplate(pInst); if (pTemplate != null) { - ICPPClassType aInst= findBaseInstance((ICPPClassType) argcheck, pTemplate, point); + ICPPClassType aInst= findBaseInstance((ICPPClassType) argcheck, pTemplate, point); if (aInst != null && aInst != argcheck) { par= pcheck; arg= aInst; @@ -309,15 +309,15 @@ public class TemplateArgumentDeduction { } } } - + return deduct.fromType(par, arg, true, point); } /** * 14.8.2.2 [temp.deduct.funcaddr] - * Deducing template arguments taking the address of a function template - * @param point - * @throws DOMException + * Deducing template arguments taking the address of a function template + * @param point + * @throws DOMException */ static ICPPTemplateArgument[] deduceForAddressOf(ICPPFunctionTemplate template, ICPPTemplateArgument[] tmplArgs, IFunctionType arg, CPPTemplateParameterMap map, IASTNode point) @@ -336,7 +336,7 @@ public class TemplateArgumentDeduction { if (isDependentPar) { TemplateArgumentDeduction deduct= new TemplateArgumentDeduction(tmplParams, map, new CPPTemplateParameterMap(tmplParams.length), 0); - par= SemanticUtil.getNestedType(par, SemanticUtil.TDEF); + par= SemanticUtil.getNestedType(par, SemanticUtil.TDEF); if (arg != null && !deduct.fromType(par, arg, false, point)) return null; if (!map.addDeducedArgs(deduct.fDeducedArgs)) @@ -348,7 +348,7 @@ public class TemplateArgumentDeduction { if (isDependentPar) par= CPPTemplates.instantiateType(par, context); - + if (arg == null || arg.isSameType(par)) { return createArguments(map, tmplParams); } @@ -356,14 +356,14 @@ public class TemplateArgumentDeduction { } /** - * Deduce arguments for a user defined conversion template + * Deduce arguments for a user defined conversion template * 14.8.2.3 */ static ICPPTemplateArgument[] deduceForConversion(ICPPFunctionTemplate template, IType conversionType, CPPTemplateParameterMap map, IASTNode point) throws DOMException { final ICPPTemplateParameter[] tmplParams = template.getTemplateParameters(); final int length = tmplParams.length; - + ICPPTemplateArgument[] result = new ICPPTemplateArgument[length]; IType a= SemanticUtil.getSimplifiedType(conversionType); IType p= template.getType().getReturnType(); @@ -373,7 +373,7 @@ public class TemplateArgumentDeduction { if (!deduct.fromType(p, a, true, point)) { return null; } - + InstantiationContext context = new InstantiationContext(map, point); for (int i = 0; i < length; i++) { if (result[i] == null) { @@ -383,7 +383,7 @@ public class TemplateArgumentDeduction { deducedArg= CPPTemplates.instantiateArgument(tpar.getDefaultValue(), context); if (!CPPTemplates.isValidArgument(deducedArg)) return null; - } + } result[i]= deducedArg; } } @@ -398,7 +398,7 @@ public class TemplateArgumentDeduction { ICPPTemplateArgument[] args, ICPPFunctionType ftype, CPPTemplateParameterMap map, IASTNode point) throws DOMException { final ICPPTemplateParameter[] tmplParams = template.getTemplateParameters(); - + if (!addExplicitArguments(template, tmplParams, args, map, point)) return null; @@ -413,17 +413,17 @@ public class TemplateArgumentDeduction { if (!deduct.fromType(p, a, false, point)) { return null; } - + if (!map.addDeducedArgs(deduct.fDeducedArgs)) return null; if (!verifyDeduction(tmplParams, map, true, point)) return null; - + IType type= CPPTemplates.instantiateType(p, context); if (!ftype.isSameType(type)) return null; - + return createArguments(map, tmplParams); } @@ -446,19 +446,19 @@ public class TemplateArgumentDeduction { par= fnParPack; deduct.incPackOffset(); } else { - if (j >= fnParCount) + if (j >= fnParCount) return -1; - + par= fnPars[j]; if (par instanceof ICPPParameterPackType) { - if (j != fnParCount - 1) + if (j != fnParCount - 1) continue; // non-deduced context - + par= fnParPack= ((ICPPParameterPackType) par).getType(); deduct= new TemplateArgumentDeduction(deduct, fnArgs.length - j); - } - } - + } + } + IType arg = fnArgs[j]; addReferencedTemplateParameters(par, usedTemplateParIds); int cmpSpecialized= deduceForPartialOrdering(par, arg, deduct, point); @@ -511,7 +511,7 @@ public class TemplateArgumentDeduction { } } } - + private static void addReferencedTemplateParameters(IValue v, Set usedTemplatePars) { if (v != null && v.getEvaluation() instanceof EvalBinding) { IBinding binding = ((EvalBinding) v.getEvaluation()).getBinding(); @@ -561,10 +561,10 @@ public class TemplateArgumentDeduction { } par= getNestedType(par, TDEF | REF | ALLCVQ); arg= getNestedType(arg, TDEF | REF | ALLCVQ); - - if (!deduct.fromType(par, arg, false, point)) + + if (!deduct.fromType(par, arg, false, point)) return -1; - + return isMoreCVQualified ? 1 : 0; } @@ -578,9 +578,9 @@ public class TemplateArgumentDeduction { int packOffset= -1; for (int i = 0; i < tmplArgs.length; i++) { if (packOffset < 0 || tmplParam == null) { - if (i >= tmplParams.length) + if (i >= tmplParams.length) return false; - + tmplParam= tmplParams[i]; if (tmplParam.isParameterPack()) { packOffset= i; @@ -590,12 +590,12 @@ public class TemplateArgumentDeduction { tmplArg= CPPTemplates.matchTemplateParameterAndArgument(template, tmplParam, tmplArg, map, point); if (tmplArg == null) return false; - + if (packOffset < 0) { map.put(tmplParam, tmplArg); } } - + if (packOffset >= 0) { final int packSize= tmplArgs.length- packOffset; ICPPTemplateArgument[] pack= new ICPPTemplateArgument[packSize]; @@ -611,15 +611,15 @@ public class TemplateArgumentDeduction { for (ICPPTemplateParameter tpar : tmplParams) { if (tpar.isParameterPack()) { ICPPTemplateArgument[] deducedArgs= map.getPackExpansion(tpar); - if (deducedArgs == null) + if (deducedArgs == null) return null; result.addAll(Arrays.asList(deducedArgs)); } else { ICPPTemplateArgument deducedArg= map.getArgument(tpar); if (deducedArg == null) { return null; - } - + } + result.add(deducedArg); } } @@ -653,24 +653,24 @@ public class TemplateArgumentDeduction { } return null; } - + private static ICPPClassTemplate getPrimaryTemplate(ICPPTemplateInstance inst) throws DOMException { ICPPTemplateDefinition template= inst.getTemplateDefinition(); if (template instanceof ICPPClassTemplatePartialSpecialization) { return ((ICPPClassTemplatePartialSpecialization) template).getPrimaryClassTemplate(); } else if (template instanceof ICPPClassTemplate) { return (ICPPClassTemplate) template; - } + } return null; } - + /** * 14.8.2.1-2 * if P is not a reference type * - If A is an array type, the pointer type produced by the array-to-pointer conversion is used instead * - If A is a function type, the pointer type produced by the function-to-pointer conversion is used instead * - If A is a cv-qualified type, the top level cv-qualifiers are ignored for type deduction - * + * * Also 14.8.2.3-2 where the same logics is used in reverse. */ private static IType getArgumentTypeForDeduction(IType type, boolean parameterIsAReferenceType) { @@ -685,7 +685,7 @@ public class TemplateArgumentDeduction { } else if (type instanceof IFunctionType) { result = new CPPPointerType(type); } else { - result = SemanticUtil.getNestedType(type, TDEF | ALLCVQ ); + result = SemanticUtil.getNestedType(type, TDEF | ALLCVQ); } } return result; @@ -757,7 +757,7 @@ public class TemplateArgumentDeduction { } } } - if (deducedArg == null) + if (deducedArg == null) return false; } } @@ -770,7 +770,7 @@ public class TemplateArgumentDeduction { private Set fTemplateParameterPacks; private int fPackOffset; private final int fPackSize; - + private TemplateArgumentDeduction(ICPPTemplateParameter[] tpars, CPPTemplateParameterMap explicit, CPPTemplateParameterMap result, int packSize) { fExplicitArgs= explicit; @@ -794,7 +794,7 @@ public class TemplateArgumentDeduction { fPackSize= packSize; fPackOffset= packSize > 0 ? 0 : -1; } - + private CPPTemplateParameterMap saveState() { return new CPPTemplateParameterMap(fDeducedArgs); } @@ -813,15 +813,15 @@ public class TemplateArgumentDeduction { */ private boolean fromTemplateArgument(ICPPTemplateArgument p, ICPPTemplateArgument a, IASTNode point) throws DOMException { - if (p.isNonTypeValue() != a.isNonTypeValue()) + if (p.isNonTypeValue() != a.isNonTypeValue()) return false; - + if (p.isNonTypeValue()) { IValue tval= p.getNonTypeValue(); if (IntegralValue.referencesTemplateParameter(tval)) { int parId= IntegralValue.isTemplateParameter(tval); - if (parId >= 0) { + if (parId >= 0) { ICPPTemplateArgument old= fDeducedArgs.getArgument(parId, fPackOffset); if (old == null) { return deduce(parId, a); @@ -833,9 +833,9 @@ public class TemplateArgumentDeduction { } } IValue sval= a.getNonTypeValue(); - return tval.equals(sval); - } - + return tval.equals(sval); + } + return fromType(p.getTypeValue(), a.getOriginalTypeValue(), false, point); } @@ -869,7 +869,7 @@ public class TemplateArgumentDeduction { eval = new EvalUnary(IASTUnaryExpression.op_star, eval, null, eval.getTemplateDefinition()); a = new TypeOfDependentExpression(eval); } else { - if (!(a instanceof IPointerType)) + if (!(a instanceof IPointerType)) return false; final IPointerType ptrA = (IPointerType) a; if (!allowCVQConversion && (ptrP.isConst() != ptrA.isConst() || ptrP.isVolatile() != ptrA.isVolatile())) @@ -897,14 +897,14 @@ public class TemplateArgumentDeduction { if (as != ps) { if (as == null || ps == null) return false; - + int parID= IntegralValue.isTemplateParameter(ps); - if (parID >= 0) { + if (parID >= 0) { ICPPTemplateArgument old= fDeducedArgs.getArgument(parID, fPackOffset); if (old == null) { if (!deduce(parID, new CPPTemplateNonTypeArgument(as, new TypeOfValueDeducedFromArraySize()))) { return false; - } + } } else if (!as.equals(old.getNonTypeValue())) { return false; } @@ -923,7 +923,7 @@ public class TemplateArgumentDeduction { return false; remaining= cvqA.remove(cvqP); } - p = SemanticUtil.getNestedType(p, ALLCVQ); + p = SemanticUtil.getNestedType(p, ALLCVQ); a = SemanticUtil.getNestedType(a, ALLCVQ); if (p instanceof IQualifierType) return false; @@ -965,7 +965,7 @@ public class TemplateArgumentDeduction { if (current != null) { if (current.isNonTypeValue()) return false; - return current.getTypeValue().isSameType(a); + return current.getTypeValue().isSameType(a); } if (a == null) return false; @@ -991,7 +991,7 @@ public class TemplateArgumentDeduction { ICPPClassTemplate aTemplate= getPrimaryTemplate(aInst); if (pTemplate == null || aTemplate == null) return false; - + if (pTemplate instanceof ICPPTemplateTemplateParameter) { final int tparId = ((ICPPTemplateTemplateParameter) pTemplate).getParameterID(); ICPPTemplateArgument current= fDeducedArgs.getArgument(tparId, fPackOffset); @@ -1004,14 +1004,14 @@ public class TemplateArgumentDeduction { } else if (!aTemplate.isSameType(pTemplate)) { return false; } - + // Check for being a non-deduced context. final ICPPTemplateArgument[] pArgs = pInst.getTemplateArguments(); for (int i = 0; i < pArgs.length - 1; i++) { - if (pArgs[i].isPackExpansion()) + if (pArgs[i].isPackExpansion()) return true; // non-deduced context } - + final ICPPTemplateArgument[] aArgs = aInst.getTemplateArguments(); if (pArgs.length != aArgs.length) { if (pArgs.length == 0 || pArgs.length > aArgs.length + 1) @@ -1053,17 +1053,17 @@ public class TemplateArgumentDeduction { private boolean fromFunctionType(ICPPFunctionType ftp, ICPPFunctionType fta, IASTNode point) throws DOMException { - if (ftp.isConst() != fta.isConst() || - ftp.isVolatile() != fta.isVolatile() || + if (ftp.isConst() != fta.isConst() || + ftp.isVolatile() != fta.isVolatile() || ftp.takesVarArgs() != fta.takesVarArgs() || ftp.hasRefQualifier() != fta.hasRefQualifier() || ftp.isRValueReference() != fta.isRValueReference()) { return false; } - - if (!fromType(ftp.getReturnType(), fta.getReturnType(), false, point)) + + if (!fromType(ftp.getReturnType(), fta.getReturnType(), false, point)) return false; - + IType[] pParams = ftp.getParameterTypes(); IType[] aParams = fta.getParameterTypes(); if (pParams.length != aParams.length) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfDependentExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfDependentExpression.java index be298389830..f88cf646e1f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfDependentExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfDependentExpression.java @@ -7,7 +7,7 @@ * * Contributors: * Markus Schorn - initial API and implementation - * Sergey Prigogin (Google) + * Sergey Prigogin (Google) *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics; @@ -33,7 +33,7 @@ public class TypeOfDependentExpression extends CPPUnknownBinding implements ICPP super(null); fEvaluation= evaluation; } - + public ICPPEvaluation getEvaluation() { return fEvaluation; } @@ -43,7 +43,7 @@ public class TypeOfDependentExpression extends CPPUnknownBinding implements ICPP return type instanceof TypeOfDependentExpression && fEvaluation == ((TypeOfDependentExpression) type).fEvaluation; } - + @Override public TypeOfDependentExpression clone() { return (TypeOfDependentExpression) super.clone(); @@ -65,7 +65,7 @@ public class TypeOfDependentExpression extends CPPUnknownBinding implements ICPP buffer.putShort(ITypeMarshalBuffer.DEPENDENT_EXPRESSION_TYPE); buffer.marshalEvaluation(fEvaluation, false); } - + public static IType unmarshal(short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { ISerializableEvaluation eval= buffer.unmarshalEvaluation(); if (eval instanceof ICPPEvaluation) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfUnknownMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfUnknownMember.java index c0048b7c4da..9d595b60d5e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfUnknownMember.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfUnknownMember.java @@ -28,30 +28,30 @@ public class TypeOfUnknownMember implements ICPPUnknownType, ISerializableType { public TypeOfUnknownMember(CPPUnknownMember member) { fMember = member; } - + public CPPUnknownMember getUnknownMember() { return fMember; } - + @Override public boolean isSameType(IType type) { return type instanceof TypeOfUnknownMember && fMember == ((TypeOfUnknownMember) type).fMember; } - + @Override public void marshal(ITypeMarshalBuffer buffer) throws CoreException { buffer.putShort(ITypeMarshalBuffer.UNKNOWN_MEMBER_TYPE); fMember.marshal(buffer); } - + public static IType unmarshal(IIndexFragment fragment, short firstBytes, ITypeMarshalBuffer buffer) throws CoreException { short firstBytesForMember = buffer.getShort(); if ((firstBytesForMember & ITypeMarshalBuffer.KIND_MASK) != ITypeMarshalBuffer.UNKNOWN_MEMBER) throw new CoreException(CCorePlugin.createStatus("Expected an unknown memebr, first bytes=" + firstBytesForMember)); //$NON-NLS-1$ return new TypeOfUnknownMember((CPPUnknownMember) CPPUnknownMember.unmarshal(fragment, firstBytesForMember, buffer)); } - + @Override public Object clone() { try { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeTraits.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeTraits.java index 319420d3a4d..3e5c8f69e9f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeTraits.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeTraits.java @@ -61,21 +61,21 @@ public class TypeTraits { private TypeTraits() {} - - + + public static boolean isDefaultedMethod(ICPPMethod method) { - if(method instanceof ICPPInternalFunction) { - ICPPInternalFunction internalFunc = (ICPPInternalFunction)method; + if (method instanceof ICPPInternalFunction) { + ICPPInternalFunction internalFunc = (ICPPInternalFunction) method; IASTNode definition = internalFunc.getDefinition(); ICPPASTFunctionDefinition functionDefinition = CPPFunction.getFunctionDefinition(definition); - if(functionDefinition != null) { + if (functionDefinition != null) { return functionDefinition.isDefaulted(); } } return false; } - - + + /** * From $3.9 / 10: * A type is a literal type if it is: @@ -85,41 +85,41 @@ public class TypeTraits { * - it is an aggregate type or has at least one constexpr constructor or constructor template that is not a * copy or move constructor, and * - all of its non-static data members and base classes are of non-volatile literal types - * TODO: The last property isn't being checked. + * TODO: The last property isn't being checked. */ public static boolean isLiteralClass(ICPPClassType classType, IASTNode point) { - if(!hasTrivialDestructor(classType, point)) { + if (!hasTrivialDestructor(classType, point)) { return false; } - - if(isAggregateClass(classType, point)) { + + if (isAggregateClass(classType, point)) { return true; } - + ICPPConstructor[] ctors = ClassTypeHelper.getConstructors(classType, point); - for(ICPPConstructor ctor : ctors) { + for (ICPPConstructor ctor : ctors) { MethodKind methodKind = ClassTypeHelper.getMethodKind(classType, ctor); - if(methodKind == MethodKind.COPY_CTOR || methodKind == MethodKind.MOVE_CTOR) { + if (methodKind == MethodKind.COPY_CTOR || methodKind == MethodKind.MOVE_CTOR) { continue; } - + // implicit constructors are automatically constexpr when the class is a literal type - if(ctor instanceof CPPImplicitConstructor || ctor.isConstexpr()) { + if (ctor instanceof CPPImplicitConstructor || ctor.isConstexpr()) { return true; } } - + return false; } - + /** * C++11: 9-6 */ public static boolean isTrivial(ICPPClassType classType, IASTNode point) { return isTrivialImpl(classType, point, true); } - - private static boolean isTrivialImpl(ICPPClassType classType, IASTNode point, + + private static boolean isTrivialImpl(ICPPClassType classType, IASTNode point, boolean checkDefaultConstructors) { for (ICPPMethod method : ClassTypeHelper.getDeclaredMethods(classType, point)) { if (method.isVirtual()) @@ -455,7 +455,7 @@ public class TypeTraits { } return false; } - + public static IType underlyingType(IType type) { if (CPPTemplates.isDependentType(type)) { return new CPPUnaryTypeTransformation(Operator.underlying_type, type); @@ -467,7 +467,7 @@ public class TypeTraits { IType fixedType = enumeration.getFixedType(); if (fixedType != null) return fixedType; - + // [dcl.enum] 7.2-6: // "For an enumeration whose underlying type is not fixed, the // underlying type is an integral type that can represent all @@ -499,10 +499,10 @@ public class TypeTraits { } return types[types.length - 1]; // Assume it fits into the largest type provided. } - + /** * Returns true if 'type' is scalar, as defined in [basic.types] p9: - * + * * "Arithmetic types, enumeration types, pointer types, pointer to member * types, std::nullptr_t, and cv-qualified versions of these types are * collectively called scalar types." @@ -511,10 +511,10 @@ public class TypeTraits { type = SemanticUtil.getNestedType(type, SemanticUtil.ALLCVQ); return type instanceof IBasicType || type instanceof IEnumeration || type instanceof IPointerType; } - + /** * Returns true if 'type' is a trivially copyable class, as defined in [class] p6: - * + * * "A trivially copyable class is a class that: * - has no non-trivial copy constructors, * - has no non-trivial move constructors, @@ -525,10 +525,10 @@ public class TypeTraits { private static boolean isTriviallyCopyableClass(ICPPClassType type, IASTNode point) { return isTrivialImpl(type, point, false); } - + /** * Returns true if 'type' is trivially copyable, as defined in [basic.types] p9: - * + * * "Cv-unqualified scalar types, trivially copyable class types, arrays * of such types, and non-volatile const-qualified versions of these * types are collectively called trivially copyable types."