Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousBinaryVsCastExpression.java54
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousCastVsFunctionCallExpression.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousNode.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAttributeOwner.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTCopyLocation.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEnumerator.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEqualsInitializer.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTInternal.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSearch.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNodeSpecification.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTPreprocessorSelectionResult.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTokenList.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java50
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java34
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ArithmeticConversion.java90
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/BacktrackException.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CStringValue.java76
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ChildCollector.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/CompositeValue.java44
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/DeclarationOptions.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FindNodeForOffsetAction.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/FloatingPointValue.java58
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousDeclarator.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousExpression.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousParameterDeclaration.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTAmbiguousSimpleDeclaration.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalEnumerationSpecifier.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalNameOwner.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalScope.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IRecursionResolvingBinding.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableEvaluation.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableExecution.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ISerializableType.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IntegralValue.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/NodeFactory.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ParserLogServiceWrapper.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemBinding.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemFunctionType.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ProblemType.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ValueFactory.java88
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/VariableReadWriteFlags.java36
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTASMDeclaration.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAlignmentSpecifier.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguityResolver.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousAlignmentSpecifier.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousDeclarator.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousExpression.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousParameterDeclaration.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousSimpleDeclaration.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousStatement.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDeclarator.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDesignator.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayModifier.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayRangeDesignator.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArraySubscriptExpression.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAttribute.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBaseDeclSpecifier.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBinaryExpression.java44
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBreakStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCaseStatement.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCastExpression.java34
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatementExpression.java24
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTConditionalExpression.java74
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTContinueStatement.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarator.java24
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDoStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTElaboratedTypeSpecifier.java42
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerationSpecifier.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerator.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionList.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionStatement.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDeclarator.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDesignator.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldReference.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTForStatement.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionCallExpression.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionDefinition.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTGotoStatement.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIdExpression.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTIfStatement.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTInitializerList.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTKnRFunctionDeclarator.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLabelStatement.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTLiteralExpression.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTName.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTNullStatement.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTParameterDeclaration.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTPointer.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemDeclaration.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemExpression.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemOwner.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTProblemStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTReturnStatement.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclSpecifier.java36
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSimpleDeclaration.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTSwitchStatement.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTranslationUnit.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeId.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdExpression.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypeIdInitializerExpression.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTTypedefNameSpecifier.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTUnaryExpression.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTWhileStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArithmeticConversion.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CArrayType.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBasicType.java38
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinParameter.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CBuiltinVariable.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CCompositeTypeScope.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumeration.java30
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CEnumerator.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CExternalFunction.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CField.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunction.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionScope.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CFunctionType.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitFunction.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CImplicitTypedef.java38
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CKnRParameter.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CNodeFactory.java118
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CPointerType.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CQualifierType.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CScope.java80
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructMapper.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructure.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CTypedef.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariable.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVariableReadWriteFlags.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java358
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GCCASTSimpleDeclSpecifier.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCASTGotoStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java250
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalBinding.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/ICInternalFunction.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTASMDeclaration.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAliasDeclaration.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAlignmentSpecifier.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguityResolver.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousAlignmentSpecifier.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousCondition.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousDeclarator.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousExpression.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousParameterDeclaration.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousSimpleDeclaration.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousStatement.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAmbiguousTemplateArgument.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArrayModifier.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTArraySubscriptExpression.java44
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttribute.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTAttributeOwner.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseDeclSpecifier.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBaseSpecifier.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryExpression.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTBinaryTypeIdExpression.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCapture.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCaseStatement.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCastExpression.java30
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCatchHandler.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTClassVirtSpecifier.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompositeTypeSpecifier.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTCompoundStatementExpression.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConditionalExpression.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTContinueStatement.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConversionName.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarationStatement.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeclarator.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDecltypeSpecifier.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDefaultStatement.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDeleteExpression.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDesignatedInitializer.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTDoStatement.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTElaboratedTypeSpecifier.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerationSpecifier.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEnumerator.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExplicitTemplateInstantiation.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionList.java30
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTExpressionStatement.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldDeclarator.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFieldReference.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTForStatement.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java64
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDefinition.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTGotoStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLinkageSpecification.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java170
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNameBase.java34
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceDefinition.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNaryTypeIdExpression.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java38
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTOperatorName.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTParameterDeclaration.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointer.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointerToMember.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblem.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemStatement.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemTypeId.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java48
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java30
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReferenceOperator.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclaration.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java24
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeTemplateParameter.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTStaticAssertionDeclaration.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateDeclaration.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateIDAmbiguity.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateId.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateSpecialization.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplatedTypeTemplateParameter.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java32
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeId.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeTransformationSpecifier.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypenameExpression.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDeclaration.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDirective.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVirtSpecifier.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVisibilityLabel.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java24
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplate.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPAliasTemplateInstance.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArithmeticConversion.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPArrayType.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBasicType.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBlockScope.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinParameter.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBuiltinVariable.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassScope.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecializationScope.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplate.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassTemplatePartialSpecializationSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassType.java38
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClosureType.java32
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPCompositeBinding.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructor.java30
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorSpecialization.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPConstructorTemplate.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredConstructor.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunction.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumScope.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumeration.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPEnumerator.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPField.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunction.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionInstance.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionScope.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionSpecialization.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplate.java38
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionTemplateSpecialization.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPFunctionType.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitConstructor.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitFunction.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitMethod.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPImplicitTypedef.java34
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLabel.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPLambdaExpressionParameter.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethod.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodInstance.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodSpecialization.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplate.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPMethodTemplateSpecialization.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespace.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceAlias.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNamespaceScope.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPNodeFactory.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameter.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterPackType.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPParameterSpecialization.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerToMemberType.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPPointerType.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPQualifierType.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPReferenceType.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScope.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPScopeMapper.java18
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSpecialization.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateDefinition.java38
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeArgument.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateNonTypeParameter.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameter.java34
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateParameterMap.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateScope.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameterScope.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedef.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedefSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnaryTypeTransformation.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClassInstance.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownField.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMember.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMemberClass.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMethod.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownTypeScope.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclaration.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDeclarationSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUsingDirective.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariable.java44
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableSpecialization.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVariableTemplate.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ClassTypeHelper.java20
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPASTGotoStatement.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java84
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTExplicitTemplateInstantiation.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointer.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointerToMember.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTSimpleDeclSpecifier.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/IASTAmbiguousCondition.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalScope.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPASTInternalTemplateDeclaration.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPClassSpecializationScope.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPComputableFunction.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPDeferredClassInstance.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluation.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPEvaluationOwner.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecution.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPExecutionOwner.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalBase.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalClassTemplate.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalFunction.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalNamespaceScope.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPTwoPhaseBinding.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownBinding.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMember.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClass.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownType.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/InstantiationContext.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/NameOrTemplateIDVariants.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/OverloadableOperator.java138
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/TemplateIdStrategy.java40
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/VariableHelpers.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AccessContext.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ActivationRecord.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/AutoTypeResolver.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BuiltinOperators.java62
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPEvaluation.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionParameterMap.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionSet.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPInheritance.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java78
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java48
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CVQualifier.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Conversions.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java52
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinary.java50
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinaryTypeId.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalBinding.java58
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompositeAccess.java36
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalCompoundStatementExpression.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConditional.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalConstructor.java116
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFunctionCall.java86
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java24
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalInitList.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java22
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalParameterPack.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalPointer.java30
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalReference.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalTypeId.java44
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java58
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUtil.java74
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecBreak.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCase.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecCompoundStatement.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecConstructorChain.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecContinue.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarationStatement.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDeclarator.java102
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDefault.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecDo.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecExpressionStatement.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecFor.java40
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIf.java26
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecIncomplete.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecRangeBasedFor.java84
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecReturn.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSimpleDeclaration.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecSwitch.java46
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExecWhile.java24
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/ExpressionTypes.java28
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/FunctionSetType.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/HeuristicResolver.java88
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/InitializerListType.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/LookupData.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/NamespaceTypeCollector.java14
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SemanticUtil.java30
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/SignatureBuilder.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java162
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfDependentExpression.java8
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeOfUnknownMember.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TypeTraits.java56
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 66cb0418a8..1961373636 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 31a85814b0..eb9b2ba662 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 cecd32e9a7..f421077a60 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 29d4c5d8be..059b8cc16d 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 31f74b993f..f0eb38b349 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 46b8141eb5..6821463f55 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 862634556b..489c05e6ce 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 70f1d94a11..d7e7737870 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 42460ee736..29845b5d6d 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 389f0ceb6e..3ce08a5446 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 f09d570f00..cd534152eb 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 bd450f3b24..3fdbd731ce 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<T extends IASTNode> {
}
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<T extends IASTNode> {
}
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 509334bbd3..be52fa37f4 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 3444e4c28d..d6ba7ce8f0 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 bd4fb91b90..106a1ab76f 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 aca6d37be1..01cef0af76 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 defef44196..9ed48830fb 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 45f9ec7016..26728ebdc3 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 aac191b59e..5c28988da0 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 5755a1c05d..1e25a41e84 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 0154444e7e..297614f747 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 531bbdc35e..5e05f42194 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<Set<ICPPClassType>> fCreateInProgress =
+ // Used to guard against infinite recursion due to a class (invalidly) aggregating itself.
+ private static final ThreadLocal<Set<ICPPClassType>> fCreateInProgress =
new ThreadLocal<Set<ICPPClassType>>() {
@Override
protected Set<ICPPClassType> 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("<null>"); //$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 8152e891f1..3408a09ae4 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 d007f33a14..e8804e6e79 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 2a4780dc7b..5a114a0e51 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 fa6f9cb031..331138f74d 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 413612ca5d..072b2100a4 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 5b012f729a..dc3ddab76c 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 4b59b50b0f..e2c597e92a 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 df2bf5e32e..a92199ebae 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 42b25d1a1e..1fcf9d8693 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
* <code>allowResolution</code> is set to <code>false</code>, 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 7823a90ecc..e8ff4c19d5 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 a0d484185d..bab94b82e9 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 96565101a5..ee53de2e5f 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 80db9e8392..14277d2627 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 9156f4b952..55264bcb7b 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 a8d982bd13..704275157c 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.
- *
+ *
* <p>Here is number of bytes depending on the encoded value:
* <pre>
* 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.
- *
+ *
* <p>Here is number of bytes depending on the encoded value:
* <pre>
* 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 b35bf5a129..c94d8e41a9 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("<error>".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 3d85b4359d..688893a15f 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 1b71b019ce..9be074d33e 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 7188e3b6b4..e3c772f772 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 cd9ab013c0..c9bab56282 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 8bc26cc6f6..be4bd529fa 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 191f78b15a..854c550644 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 67e91f651f..fd0782ce1d 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 cf75adec7c..69570dc7cf 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 94ccdb9b15..7dfa5d6cd6 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 ca8c37bb03..9bca168bb2 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 938523275e..84c133b296 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 c7ba18c1b7..0dd43dbed9 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 83142583a3..0351149196 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 7e51c9f067..bbfa37183c 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 647af5e771..3e7a934f28 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 d57cd471bf..24190d7414 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 056ea340be..d37d932e69 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 b3bbe9b8b7..ab671f34b6 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 dbf2b04249..7944a8c6a7 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 8a75d49faf..4cce8d8c8d 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 192cf4105e..7fbeb7978b 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 a4188ffb58..365219d6d4 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 5d29317ad7..62ce1aef62 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 extends CASTBaseDeclSpecifier> 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 d80f0b4b34..8438c9d288 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 4c900f89e5..a740fe7532 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 3d5281fd2f..258f940f9d 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 ffda28046e..0f6eaa0ac4 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 264e1e6743..edd8a5fb82 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 ae737cecda..1c03b60035 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 d86a2c1963..decfdf0019 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 2f2aa3e425..b76ceb58be 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 9855310073..5a6061caee 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 9966a15ab0..2a956a56c1 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 extends CASTDeclarator> 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 8138c8d592..1445c1ab76 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 fe3a7db155..378ad9dc11 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 ad6b551f52..0bb1cf0ebd 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 1b596216df..62107a0c18 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 6b9b58a8e0..2853bb379b 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 58e9c945b8..3044772532 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 76c3ed668c..fc8b84b51c 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 73aa1664bb..a83091274c 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 48a699a425..8e17f47868 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 dc030bb188..ccf597251a 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 extends CASTForStatement> 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 027b0a9522..5a99989c3a 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 ff9606a910..238d4ab048 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 af6fc7d546..798cf60d39 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 4b3c08cff9..7f58df8f0e 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 2926821e2c..edac73b3f4 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 8b6c53a392..aca8a8f324 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 cb9ef04648..026b5ea3e8 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 1b4985686c..f278791d26 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 ad9dbc6459..67cf91ed2c 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 fa70b19184..04e9fe4e44 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 a4363d4281..9a1d232aac 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 833dc565e0..4f18991852 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 daa49c4c09..ea7c6bb564 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 33d86a4db4..37dd3059c3 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 50f723b93a..1316e9ff93 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 7f98dc116b..7a0a0b4766 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 1cd8b35509..0dbcc81973 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 54c85c0182..78b3cab2d7 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 edaae42e59..24b0dd5fb2 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 e3236a328b..2ea49b6369 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 b84f6418cf..9500e9caa6 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 08da101fa8..7f510904e9 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 1d4474f208..7515a4590d 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 f4f5ea3ff3..84db7e8cee 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 a50af44847..509fcf78b0 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 811c3bd055..40427482f9 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 50c50111dc..f15596cfc3 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 5165aa7d35..19f83ee718 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 7e0ed61a7a..f16bb7231c 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 7550b418ee..2b89b19ba1 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 f57f2d7cfc..0e0a41b64e 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 b158a541d9..8af9801141 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 e7eebbfed0..06c8f119fe 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 76445da828..2f4e811714 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 3100f43b48..36badfadba 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 7626a52475..a5abefcabe 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 5105375f52..089975f1e4 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 43176a0043..ec1909d778 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 265df070b1..66f5668cb7 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 f03a9e64d7..07e62c0026 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 d9ac04508a..dc530dcf50 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 187211ffa2..4a53eaf65e 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 25f7fb4a0e..cfaff123cf 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 e014e1360a..fa967fd588 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 e14f1ebf1e..bfb27578ae 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 5d8b60a81b..9945c965a8 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 e175fd9a04..41be9dbf0c 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 5942951213..faa972f7b8 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 037818dbd8..5672138e02 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<IASTName> 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 8eb40aca7b..9aaffcc43d 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 5af9f67b76..fa8448cacd 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 04e46a43d2..d4a35c735c 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<CVariable> 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 557ccd1125..4c50f56f48 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 457db61227..4320aae23d 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; i<results.length; i++)
results[i] = problems[i];
-
+
return results;
}
-
+
public IASTProblem[] getProblems() {
return removeNullFromProblems();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processDeclaration(org.eclipse.cdt.core.dom.ast.IASTDeclaration)
*/
@@ -174,7 +174,7 @@ public class CVisitor extends ASTQueries {
return PROCESS_CONTINUE;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processExpression(org.eclipse.cdt.core.dom.ast.IASTExpression)
*/
@@ -185,7 +185,7 @@ public class CVisitor extends ASTQueries {
return PROCESS_CONTINUE;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processStatement(org.eclipse.cdt.core.dom.ast.IASTStatement)
*/
@@ -196,7 +196,7 @@ public class CVisitor extends ASTQueries {
return PROCESS_CONTINUE;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processTypeId(org.eclipse.cdt.core.dom.ast.IASTTypeId)
*/
@@ -216,13 +216,13 @@ public class CVisitor extends ASTQueries {
shouldVisitEnumerators = true;
shouldVisitStatements = true;
}
-
+
private static final int DEFAULT_CHILDREN_LIST_SIZE = 8;
private IASTName[] declsFound = null;
int numFound = 0;
IBinding binding = null;
boolean compositeTypeDeclared = false;
-
+
private void addName(IASTName name) {
if (declsFound.length == numFound) { // if the found array is full, then double the array
IASTName[] old = declsFound;
@@ -232,45 +232,45 @@ public class CVisitor extends ASTQueries {
}
declsFound[numFound++] = name;
}
-
+
private IASTName[] removeNullFromNames() {
if (declsFound[declsFound.length - 1] != null) { // if the last element in the list is not null then return the list
- return declsFound;
+ return declsFound;
} else if (declsFound[0] == null) { // if the first element in the list is null, then return empty list
return new IASTName[0];
}
-
+
IASTName[] results = new IASTName[numFound];
for (int i= 0; i < results.length; i++)
results[i] = declsFound[i];
-
+
return results;
}
-
+
public IASTName[] getDeclarationNames() {
return removeNullFromNames();
}
-
+
public CollectDeclarationsAction(IBinding binding) {
declsFound = new IASTName[DEFAULT_CHILDREN_LIST_SIZE];
this.binding = binding;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processDeclarator(org.eclipse.cdt.core.dom.ast.IASTDeclarator)
*/
@Override
public int visit(IASTDeclarator declarator) {
- //GCC allows declarations in expressions, so we have to continue from the
+ //GCC allows declarations in expressions, so we have to continue from the
//declarator in case there is something in the initializer expression
if (declarator == null || declarator.getName() == null || declarator.getName().toCharArray().length == 0) return PROCESS_CONTINUE;
-
+
//if the binding is something not declared in a declarator, continue
if (binding instanceof ICompositeType)
return PROCESS_CONTINUE;
if (binding instanceof IEnumeration)
return PROCESS_CONTINUE;
-
+
IASTNode parent = declarator.getParent();
while (parent != null && !(parent instanceof IASTDeclaration || parent instanceof IASTParameterDeclaration))
parent = parent.getParent();
@@ -281,20 +281,20 @@ public class CVisitor extends ASTQueries {
addName(declarator.getName());
}
} else if (parent instanceof IASTSimpleDeclaration) {
- // prototype parameter with no identifier isn't a declaration of the K&R C parameter
+ // prototype parameter with no identifier isn't a declaration of the K&R C parameter
// if (binding instanceof CKnRParameter && declarator.getName().toCharArray().length == 0)
// return PROCESS_CONTINUE;
-
+
if ((declarator.getName() != null && declarator.getName().resolveBinding() == binding)) {
addName(declarator.getName());
}
- }
+ }
} else if (parent instanceof IASTParameterDeclaration) {
if (declarator.getName() != null && declarator.getName().resolveBinding() == binding) {
addName(declarator.getName());
}
}
-
+
return PROCESS_CONTINUE;
}
@@ -303,15 +303,15 @@ public class CVisitor extends ASTQueries {
*/
@Override
public int visit(IASTDeclSpecifier declSpec) {
- if (compositeTypeDeclared && declSpec instanceof ICASTTypedefNameSpecifier)
+ if (compositeTypeDeclared && declSpec instanceof ICASTTypedefNameSpecifier)
return PROCESS_CONTINUE;
-
+
//if the binding isn't declared in a decl spec, skip it
if (!(binding instanceof ICompositeType) && !(binding instanceof IEnumeration))
return PROCESS_CONTINUE;
-
+
if (binding instanceof ICompositeType && declSpec instanceof IASTCompositeTypeSpecifier) {
- if (((IASTCompositeTypeSpecifier) declSpec).getName().resolveBinding() == binding) {
+ if (((IASTCompositeTypeSpecifier) declSpec).getName().resolveBinding() == binding) {
compositeTypeDeclared = true;
addName(((IASTCompositeTypeSpecifier) declSpec).getName());
}
@@ -327,15 +327,15 @@ public class CVisitor extends ASTQueries {
return PROCESS_CONTINUE;
}
}
- if (((IASTElaboratedTypeSpecifier) declSpec).getName().resolveBinding() == binding) {
+ if (((IASTElaboratedTypeSpecifier) declSpec).getName().resolveBinding() == binding) {
compositeTypeDeclared = true;
addName(((IASTElaboratedTypeSpecifier) declSpec).getName());
}
}
-
+
return PROCESS_CONTINUE;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processEnumerator(org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator)
*/
@@ -344,17 +344,17 @@ public class CVisitor extends ASTQueries {
if (binding instanceof IEnumerator && enumerator.getName().resolveBinding() == binding) {
addName(enumerator.getName());
}
-
+
return PROCESS_CONTINUE;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processStatement(org.eclipse.cdt.core.dom.ast.IASTStatement)
*/
@Override
public int visit(IASTStatement statement) {
if (statement instanceof IASTLabelStatement && binding instanceof ILabel) {
- if (((IASTLabelStatement) statement).getName().resolveBinding() == binding)
+ if (((IASTLabelStatement) statement).getName().resolveBinding() == binding)
addName(((IASTLabelStatement) statement).getName());
return PROCESS_SKIP;
}
@@ -369,27 +369,27 @@ public class CVisitor extends ASTQueries {
private final IBinding binding;
private int idx = 0;
private int kind;
-
+
private static final int KIND_LABEL = 1;
private static final int KIND_OBJ_FN = 2;
private static final int KIND_TYPE = 3;
-
+
public CollectReferencesAction(IBinding binding) {
this.binding = binding;
this.refs = new IASTName[DEFAULT_LIST_SIZE];
-
+
shouldVisitNames = true;
if (binding instanceof ILabel) {
kind = KIND_LABEL;
- } else if (binding instanceof ICompositeType ||
- binding instanceof ITypedef ||
+ } else if (binding instanceof ICompositeType ||
+ binding instanceof ITypedef ||
binding instanceof IEnumeration) {
kind = KIND_TYPE;
} else {
kind = KIND_OBJ_FN;
}
}
-
+
@Override
public int visit(IASTName name) {
ASTNodeProperty prop = name.getPropertyInParent();
@@ -410,14 +410,14 @@ public class CVisitor extends ASTQueries {
}
return PROCESS_CONTINUE;
case KIND_OBJ_FN:
- if (prop == IASTIdExpression.ID_NAME ||
- prop == IASTFieldReference.FIELD_NAME ||
+ if (prop == IASTIdExpression.ID_NAME ||
+ prop == IASTFieldReference.FIELD_NAME ||
prop == ICASTFieldDesignator.FIELD_NAME) {
break;
}
return PROCESS_CONTINUE;
}
-
+
if (CharArrayUtils.equals(name.toCharArray(), binding.getNameCharArray())) {
if (sameBinding(name.resolveBinding(), binding)) {
if (refs.length == idx) {
@@ -430,7 +430,7 @@ public class CVisitor extends ASTQueries {
}
return PROCESS_CONTINUE;
}
-
+
private boolean sameBinding(IBinding binding1, IBinding binding2) {
if (binding1 == binding2)
return true;
@@ -448,7 +448,7 @@ public class CVisitor extends ASTQueries {
return refs;
}
}
-
+
protected static final ASTNodeProperty STRING_LOOKUP_PROPERTY = new ASTNodeProperty("CVisitor.STRING_LOOKUP_PROPERTY - STRING_LOOKUP"); //$NON-NLS-1$
protected static final ASTNodeProperty STRING_LOOKUP_TAGS_PROPERTY = new ASTNodeProperty("CVisitor.STRING_LOOKUP_TAGS_PROPERTY - STRING_LOOKUP"); //$NON-NLS-1$
private static final String SIZE_T = "size_t"; //$NON-NLS-1$
@@ -456,12 +456,12 @@ public class CVisitor extends ASTQueries {
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
// Definition lookup start location
protected static final int AT_BEGINNING = 1;
- protected static final int AT_NEXT = 2;
+ protected static final int AT_NEXT = 2;
static protected void createBinding(IASTName name) {
IBinding binding = null;
IASTNode parent = name.getParent();
-
+
if (parent instanceof CASTIdExpression) {
binding = resolveBinding(parent);
} else if (parent instanceof ICASTTypedefNameSpecifier) {
@@ -504,17 +504,17 @@ public class CVisitor extends ASTQueries {
((CEnumeration) binding).addDefinition(name);
}
} else {
- return new ProblemBinding(name, IProblemBinding.SEMANTIC_INVALID_OVERLOAD, name.toCharArray());
+ return new ProblemBinding(name, IProblemBinding.SEMANTIC_INVALID_OVERLOAD, name.toCharArray());
}
} else {
binding = new CEnumeration(name);
ASTInternal.addName(scope, name);
- }
- return binding;
+ }
+ return binding;
}
private static IBinding createBinding(IASTEnumerator enumerator) {
- IEnumerator binding = new CEnumerator(enumerator);
+ IEnumerator binding = new CEnumerator(enumerator);
try {
ASTInternal.addName(binding.getScope(), enumerator.getName());
} catch (DOMException e) {
@@ -525,7 +525,7 @@ public class CVisitor extends ASTQueries {
private static IBinding resolveBinding(IASTGotoStatement statement) {
return resolveLabel(statement.getName());
}
-
+
private static IBinding createBinding(IASTLabelStatement statement) {
IASTName name = statement.getName();
IBinding binding = new CLabel(name);
@@ -544,7 +544,7 @@ public class CVisitor extends ASTQueries {
if (parent instanceof IASTDeclaration) {
IBinding binding= null;
IScope insertIntoScope= null;
- if (parent instanceof IASTSimpleDeclaration
+ if (parent instanceof IASTSimpleDeclaration
&& ((IASTSimpleDeclaration) parent).getDeclarators().length == 0) {
IScope scope= getContainingScope(elabTypeSpec);
try {
@@ -579,7 +579,7 @@ public class CVisitor extends ASTQueries {
if (elabTypeSpec.getKind() == IASTElaboratedTypeSpecifier.k_enum) {
binding = new CEnumeration(name);
} else {
- binding = new CStructure(name);
+ binding = new CStructure(name);
}
if (insertIntoScope != null) {
ASTInternal.addName(insertIntoScope, name);
@@ -603,12 +603,12 @@ public class CVisitor extends ASTQueries {
IASTExpression fieldOwner = fieldReference.getFieldOwner();
if (fieldOwner == null)
return null;
-
+
IType type = fieldOwner.getExpressionType();
while (type != null && type instanceof ITypeContainer) {
type = ((ITypeContainer) type).getType();
}
-
+
if (type != null && type instanceof ICompositeType) {
ICompositeType ct = (ICompositeType) type;
if (ct instanceof IIndexBinding) {
@@ -617,7 +617,7 @@ public class CVisitor extends ASTQueries {
if (prefix) {
char[] p = fieldReference.getFieldName().toCharArray();
return findFieldsByPrefix(ct, p);
- }
+ }
return ct.findField(fieldReference.getFieldName().toString());
}
return null;
@@ -634,13 +634,13 @@ public class CVisitor extends ASTQueries {
}
return ArrayUtil.trim(IBinding.class, result);
}
-
+
static IType getPtrDiffType(IASTBinaryExpression expr) {
IScope scope = getContainingScope(expr);
IBinding[] bs = scope.find(PTRDIFF_T, expr.getTranslationUnit());
for (IBinding b : bs) {
if (b instanceof IType) {
- if (!(b instanceof ICInternalBinding) ||
+ if (!(b instanceof ICInternalBinding) ||
CVisitor.declaredBefore(((ICInternalBinding) b).getPhysicalNode(), expr)) {
return (IType) b;
}
@@ -656,7 +656,7 @@ public class CVisitor extends ASTQueries {
IBinding[] bs = tu.getScope().find(SIZE_T, expr.getTranslationUnit());
for (IBinding b : bs) {
if (b instanceof IType) {
- if (!(b instanceof ICInternalBinding) ||
+ if (!(b instanceof ICInternalBinding) ||
CVisitor.declaredBefore(((ICInternalBinding) b).getPhysicalNode(), expr)) {
return (IType) b;
}
@@ -672,7 +672,7 @@ public class CVisitor extends ASTQueries {
}
return type;
}
-
+
static IType unwrapCV(IType type) {
while (type instanceof IQualifierType) {
type = ((IQualifierType) type).getType();
@@ -699,7 +699,7 @@ public class CVisitor extends ASTQueries {
} else {
binding = new ProblemBinding(name, IProblemBinding.SEMANTIC_INVALID_OVERLOAD, name.toCharArray());
}
- } else {
+ } else {
binding = createBinding(declarator);
}
} else { // createBinding for one of the ICASTKnRFunctionDeclarator's parameterNames
@@ -716,9 +716,9 @@ public class CVisitor extends ASTQueries {
private static IBinding createBinding(IASTDeclarator declarator) {
IASTNode parent = ASTQueries.findOutermostDeclarator(declarator).getParent();
- declarator= ASTQueries.findInnermostDeclarator(declarator);
+ declarator= ASTQueries.findInnermostDeclarator(declarator);
IASTDeclarator typeRelevant= ASTQueries.findTypeRelevantDeclarator(declarator);
-
+
IScope scope= getContainingScope(parent);
ASTNodeProperty prop = parent.getPropertyInParent();
if (prop == IASTDeclarationStatement.DECLARATION) {
@@ -727,11 +727,11 @@ public class CVisitor extends ASTQueries {
if (prop != IASTCompoundStatement.NESTED_STATEMENT)
scope = null;
}
-
+
IASTName name = declarator.getName();
-
- IBinding binding = (scope != null) ? scope.getBinding(name, false) : null;
-
+
+ IBinding binding = (scope != null) ? scope.getBinding(name, false) : null;
+
boolean isFunction= false;
if (parent instanceof IASTParameterDeclaration || parent.getPropertyInParent() == ICASTKnRFunctionDeclarator.FUNCTION_PARAMETER) {
IASTDeclarator fdtor = (IASTDeclarator) parent.getParent();
@@ -750,12 +750,12 @@ public class CVisitor extends ASTQueries {
} else if (parent instanceof IASTFunctionDefinition) {
isFunction= true;
} else if (parent instanceof IASTSimpleDeclaration) {
- IASTSimpleDeclaration simpleDecl = (IASTSimpleDeclaration) parent;
+ IASTSimpleDeclaration simpleDecl = (IASTSimpleDeclaration) parent;
if (simpleDecl.getDeclSpecifier().getStorageClass() == IASTDeclSpecifier.sc_typedef) {
binding = new CTypedef(name);
} else {
isFunction= typeRelevant instanceof IASTFunctionDeclarator;
- if (!isFunction) {
+ if (!isFunction) {
IType t1 = createType(declarator), t2 = null;
if (CVisitor.unwrapTypedefs(t1) instanceof IFunctionType) {
isFunction= true;
@@ -808,7 +808,7 @@ public class CVisitor extends ASTQueries {
scope = getContainingScope(compositeTypeSpec);
while (scope instanceof ICCompositeTypeScope)
scope = scope.getParent();
-
+
if (scope != null) {
binding = scope.getBinding(name, false);
if (binding != null && !(binding instanceof IIndexBinding) && name.isActive()) {
@@ -821,7 +821,7 @@ public class CVisitor extends ASTQueries {
}
return new CStructure(name);
}
-
+
protected static IBinding resolveBinding(IASTNode node) {
if (node instanceof IASTFunctionDefinition) {
IASTFunctionDefinition functionDef = (IASTFunctionDefinition) node;
@@ -835,7 +835,7 @@ public class CVisitor extends ASTQueries {
}
IScope scope = getContainingScope(node);
IBinding binding = lookup(scope, ((IASTIdExpression) node).getName());
- if (binding instanceof IType && !(binding instanceof IProblemBinding) ) {
+ if (binding instanceof IType && !(binding instanceof IProblemBinding)) {
return new ProblemBinding(node, IProblemBinding.SEMANTIC_INVALID_TYPE,
binding.getNameCharArray(), new IBinding[] { binding });
}
@@ -879,7 +879,7 @@ public class CVisitor extends ASTQueries {
}
} else if (node instanceof ICASTFieldDesignator) {
IASTNode blockItem = getContainingBlockItem(node);
-
+
if ((blockItem instanceof IASTSimpleDeclaration ||
(blockItem instanceof IASTDeclarationStatement && ((IASTDeclarationStatement) blockItem).getDeclaration() instanceof IASTSimpleDeclaration))) {
IASTSimpleDeclaration simpleDecl = null;
@@ -889,7 +889,7 @@ public class CVisitor extends ASTQueries {
} else if (blockItem instanceof IASTSimpleDeclaration) {
simpleDecl = (IASTSimpleDeclaration) blockItem;
}
-
+
if (simpleDecl != null) {
IBinding struct = null;
if (simpleDecl.getDeclSpecifier() instanceof IASTNamedTypeSpecifier)
@@ -898,7 +898,7 @@ public class CVisitor extends ASTQueries {
struct = ((IASTElaboratedTypeSpecifier) simpleDecl.getDeclSpecifier()).getName().resolveBinding();
else if (simpleDecl.getDeclSpecifier() instanceof IASTCompositeTypeSpecifier)
struct = ((IASTCompositeTypeSpecifier) simpleDecl.getDeclSpecifier()).getName().resolveBinding();
-
+
if (struct instanceof ICompositeType) {
return ((ICompositeType) struct).findField(((ICASTFieldDesignator) node).getName().toString());
} else if (struct instanceof ITypeContainer) {
@@ -916,7 +916,7 @@ public class CVisitor extends ASTQueries {
}
return null;
}
-
+
/**
* May return <code>null</code>, 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<ILabel> 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 ba0ab4191b..f95e7fa3ba 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 29dd0d282b..66d20af93e 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.
- *
+ *
* <code>
* foo:
* void *labelPtr = &&foo;
* goto *labelPtr; // this is the statement
* </code>
- *
+ *
* @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 eb7c3e2178..a1f9abe9d3 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++;
// <logical-or> ? <expression> : <assignment-expression>
// 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;
-
+
// <logical-or> ? <expression> : <assignment-expression>
- // 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<IASTPointerOperator> 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<IASTAttributeSpecifier> 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<IASTPointerOperator> pointerOps,
List<IASTAttributeSpecifier> 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<IASTParameterDeclaration> 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 06adeb95f7..f07bc3ecac 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 16bf67de00..f44beaef04 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 b757ff42c9..bcf35d4367 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 c019aa916b..9cf3b2c297 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 a2b0ed91c0..6064ad7381 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 013748d4cc..bb3cacde61 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<IASTDeclaration> fRepopulate= new HashSet<>();
@@ -60,7 +60,7 @@ final class CPPASTAmbiguityResolver extends ASTVisitor {
* Currently used only for method bodies.
*/
private Deque<IASTNode> 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 63b0eb955f..ea3fd8ccc7 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 0a71488440..058d6b2b46 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 de29004aaa..d918b6ab49 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 5039e96c23..fb42e2895d 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 af1b5f8a18..f94931e64b 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 783b8f3b6d..0b9b780f3e 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 63905bf0c9..31d0aea28c 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 acea22ce3c..424930979d 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 7b3bd40cfe..632c3bdff6 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 249bd500c5..24326ae4b6 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 c914e21752..269a21ef6c 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 798e33aa73..0402307e52 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 5bcbc248b5..99e4e0a7e8 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 extends CPPASTBaseDeclSpecifier> 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 acf317ddb4..af48ef96f3 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 56c9cdf45a..54a761b2c5 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 e3291a6237..f453b73c6d 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 28fbad6334..ea495c2c05 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 8e5d4e6365..c12b8715db 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 1b63146958..cf4807b038 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 089efaa4e9..9dc40e7248 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 3bdc4827a8..730dd3cec5 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 132743b714..a022efb610 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 44ede73104..82b79db220 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 31ef225335..826e74953f 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 7e3b93f90f..d7b7faf379 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 1793a72c12..05051b0165 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 6b25804242..f03d60bf5c 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 b4e395e100..477d711cb9 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 c9eb6c186e..3ee5b64df7 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 56fd5c7654..18d20bd8be 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 b47625fccd..6a150cbd9f 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 f984556242..b923062319 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 1f7f714f09..6467d55596 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<IASTImplicitName> 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 2fdd659bfe..d4455674fd 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 66dba60031..3f65bbb5bc 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 75c1de2852..8f84bea214 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 <class-key> <identifier>, 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 efd58192a5..13016c3092 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 0eee0c53ec..c6a40f5f50 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 58de037f91..80c455b29f 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 e991b21a3a..4aca712f35 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= computeEva