Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-02-08 23:58:00 -0500
committerSergey Prigogin2012-02-08 23:58:00 -0500
commite128056245491de047d14349f985b727bea1a0f5 (patch)
treec793faa605013238da1c6ef67f1c5b68573b0bbe /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite
parent947882ff2fa4b2b4c0a277f948ab445e8d77b25b (diff)
downloadorg.eclipse.cdt-e128056245491de047d14349f985b727bea1a0f5.tar.gz
org.eclipse.cdt-e128056245491de047d14349f985b727bea1a0f5.tar.xz
org.eclipse.cdt-e128056245491de047d14349f985b727bea1a0f5.zip
Fixed ExtractFunctionRefactoringTest.testOutputParameterWithMethodCall
test.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTLiteralNode.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java7
2 files changed, 5 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTLiteralNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTLiteralNode.java
index 642cdb1d41..f4e3bcbb43 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTLiteralNode.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTLiteralNode.java
@@ -61,7 +61,7 @@ public class ASTLiteralNode implements IASTNode {
@Override
public IASTNodeLocation[] getNodeLocations() {
- return null;
+ return IASTNodeLocation.EMPTY_ARRAY;
}
@Override
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java
index 4718e1e11a..49d25e0451 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/DeclarationGeneratorImpl.java
@@ -23,6 +23,7 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTNode.CopyStyle;
import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTPointer;
import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
@@ -164,7 +165,7 @@ public class DeclarationGeneratorImpl extends DeclarationGenerator {
arrayType = (IArrayType) type;
IASTExpression arraySizeExpression = arrayType.getArraySizeExpression();
arrayDeclarator.addArrayModifier(factory.newArrayModifier(arraySizeExpression == null
- ? null : arraySizeExpression.copy()));
+ ? null : arraySizeExpression.copy(CopyStyle.withLocations)));
type = arrayType.getType();
}
returnedDeclarator = arrayDeclarator;
@@ -291,7 +292,7 @@ public class DeclarationGeneratorImpl extends DeclarationGenerator {
int nbQualifiedNames = fullQualifiedName.getNames().length;
if (nbQualifiedNames > 1) {
for (int i = 0; i < nbQualifiedNames - 1; i++) {
- newQualifiedName.addName(fullQualifiedName.getNames()[i].copy());
+ newQualifiedName.addName(fullQualifiedName.getNames()[i].copy(CopyStyle.withLocations));
}
}
newQualifiedName.addName(tempId);
@@ -309,7 +310,7 @@ public class DeclarationGeneratorImpl extends DeclarationGenerator {
private ICPPASTTemplateId getTemplateId(ICPPTemplateInstance type, IASTName templateName) {
ICPPNodeFactory cppFactory = (ICPPNodeFactory) factory;
- ICPPASTTemplateId tempId = cppFactory.newTemplateId(templateName.copy());
+ ICPPASTTemplateId tempId = cppFactory.newTemplateId(templateName.copy(CopyStyle.withLocations));
for (ICPPTemplateArgument arg : type.getTemplateArguments()) {
IASTDeclSpecifier argDeclSpec = createDeclSpecFromType(arg.isTypeValue() ?
arg.getTypeValue() : arg.getTypeOfNonTypeValue());

Back to the top