Skip to main content
summaryrefslogtreecommitdiffstats
path: root/upc
diff options
context:
space:
mode:
authorMike Kucera2008-12-17 10:41:35 -0500
committerMike Kucera2008-12-17 10:41:35 -0500
commita036483c1817b7aadb44c6f3fbbca01ae89ad835 (patch)
treec4e6d54200e939ef80e45953fd44f5796caa08b8 /upc
parentde24d81d292e37940a457897f60432af7d9e0ef5 (diff)
downloadorg.eclipse.cdt-a036483c1817b7aadb44c6f3fbbca01ae89ad835.tar.gz
org.eclipse.cdt-a036483c1817b7aadb44c6f3fbbca01ae89ad835.tar.xz
org.eclipse.cdt-a036483c1817b7aadb44c6f3fbbca01ae89ad835.zip
bug 258345, implementation of IASTNode.copy()
Diffstat (limited to 'upc')
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTCompositeTypeSpecifier.java2
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTDeclSpecifier.java3
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTElaboratedTypeSpecifier.java2
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTEnumerationSpecifier.java2
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTForallStatement.java3
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTKeywordExpression.java2
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTLayoutQualifier.java2
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSimpleDeclSpecifier.java2
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSynchronizationStatement.java3
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypeIdSizeofExpression.java3
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypedefNameSpecifier.java3
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTUnarySizeofExpression.java2
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTCompositeTypeSpecifier.java14
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTElaboratedTypeSpecifier.java11
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java13
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java9
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java6
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java12
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java10
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java8
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypeIdSizeofExpression.java11
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java17
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTUnarySizeofExpression.java11
23 files changed, 140 insertions, 11 deletions
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTCompositeTypeSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTCompositeTypeSpecifier.java
index c6c1976a0a..7b5b17199a 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTCompositeTypeSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTCompositeTypeSpecifier.java
@@ -15,4 +15,6 @@ import org.eclipse.cdt.core.dom.ast.c.ICASTCompositeTypeSpecifier;
public interface IUPCASTCompositeTypeSpecifier extends
IUPCASTDeclSpecifier, ICASTCompositeTypeSpecifier {
+
+ public IUPCASTCompositeTypeSpecifier copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTDeclSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTDeclSpecifier.java
index c49fd6665d..2395cc9811 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTDeclSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTDeclSpecifier.java
@@ -55,4 +55,7 @@ public interface IUPCASTDeclSpecifier extends ICASTDeclSpecifier {
public IASTExpression getBlockSizeExpression();
public void setBlockSizeExpression(IASTExpression expr);
+
+
+ public IUPCASTDeclSpecifier copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTElaboratedTypeSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTElaboratedTypeSpecifier.java
index a4fa878a3a..6ae3954011 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTElaboratedTypeSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTElaboratedTypeSpecifier.java
@@ -15,4 +15,6 @@ import org.eclipse.cdt.core.dom.ast.c.ICASTElaboratedTypeSpecifier;
public interface IUPCASTElaboratedTypeSpecifier extends IUPCASTDeclSpecifier,
ICASTElaboratedTypeSpecifier {
+
+ public IUPCASTElaboratedTypeSpecifier copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTEnumerationSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTEnumerationSpecifier.java
index 86335227ac..7fc6312ffc 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTEnumerationSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTEnumerationSpecifier.java
@@ -15,4 +15,6 @@ import org.eclipse.cdt.core.dom.ast.c.ICASTEnumerationSpecifier;
public interface IUPCASTEnumerationSpecifier extends IUPCASTDeclSpecifier,
ICASTEnumerationSpecifier {
+
+ public IUPCASTEnumerationSpecifier copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTForallStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTForallStatement.java
index 2b10ba6f7b..aed8adb41a 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTForallStatement.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTForallStatement.java
@@ -44,4 +44,7 @@ public interface IUPCASTForallStatement extends IASTForStatement {
public IASTStatement getBody();
public void setBody(IASTStatement statement);
+
+
+ public IUPCASTForallStatement copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTKeywordExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTKeywordExpression.java
index 5ef9c3da33..e9d531995d 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTKeywordExpression.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTKeywordExpression.java
@@ -25,4 +25,6 @@ public interface IUPCASTKeywordExpression extends IASTExpression {
public void setKeywordKind(int kind);
+
+ public IUPCASTKeywordExpression copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTLayoutQualifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTLayoutQualifier.java
index 49a61e49f5..0309506003 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTLayoutQualifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTLayoutQualifier.java
@@ -30,4 +30,6 @@ public interface IUPCASTLayoutQualifier {
public void setBlockSizeExpression(IASTExpression expr);
+
+ public IUPCASTLayoutQualifier copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSimpleDeclSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSimpleDeclSpecifier.java
index c2a347341d..b627b228db 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSimpleDeclSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSimpleDeclSpecifier.java
@@ -15,4 +15,6 @@ import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
public interface IUPCASTSimpleDeclSpecifier extends IUPCASTDeclSpecifier,
ICASTSimpleDeclSpecifier {
+
+ public IUPCASTSimpleDeclSpecifier copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSynchronizationStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSynchronizationStatement.java
index 2c388c991d..91c7eef058 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSynchronizationStatement.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSynchronizationStatement.java
@@ -37,4 +37,7 @@ public interface IUPCASTSynchronizationStatement extends IASTStatement {
public int getStatementKind();
public void setStatementKind(int kind);
+
+
+ public IUPCASTSynchronizationStatement copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypeIdSizeofExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypeIdSizeofExpression.java
index 53d71f43c6..0ab17aced8 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypeIdSizeofExpression.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypeIdSizeofExpression.java
@@ -24,4 +24,7 @@ public interface IUPCASTTypeIdSizeofExpression extends IASTTypeIdExpression {
public int getUPCSizeofOperator();
public void setUPCSizeofOperator(int upcSizeofOperator);
+
+
+ public IUPCASTTypeIdSizeofExpression copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypedefNameSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypedefNameSpecifier.java
index 5c571380b0..4ffc33fa1c 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypedefNameSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypedefNameSpecifier.java
@@ -14,5 +14,8 @@ import org.eclipse.cdt.core.dom.ast.c.ICASTTypedefNameSpecifier;
public interface IUPCASTTypedefNameSpecifier extends IUPCASTDeclSpecifier,
ICASTTypedefNameSpecifier {
+
+
+ public IUPCASTTypedefNameSpecifier copy();
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTUnarySizeofExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTUnarySizeofExpression.java
index 32996f1d21..9a69f9304a 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTUnarySizeofExpression.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTUnarySizeofExpression.java
@@ -25,4 +25,6 @@ public interface IUPCASTUnarySizeofExpression extends IASTUnaryExpression {
public void setUPCSizeofOperator(int upcSizeofOperator);
+
+ public IUPCASTUnarySizeofExpression copy();
} \ No newline at end of file
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTCompositeTypeSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTCompositeTypeSpecifier.java
index bab284dadd..43ba015338 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTCompositeTypeSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTCompositeTypeSpecifier.java
@@ -18,9 +18,7 @@ import org.eclipse.cdt.core.dom.upc.ast.IUPCASTCompositeTypeSpecifier;
import org.eclipse.cdt.internal.core.dom.parser.c.CASTCompositeTypeSpecifier;
@SuppressWarnings("restriction")
-public class UPCASTCompositeTypeSpecifier extends CASTCompositeTypeSpecifier implements
- IUPCASTCompositeTypeSpecifier {
-
+public class UPCASTCompositeTypeSpecifier extends CASTCompositeTypeSpecifier implements IUPCASTCompositeTypeSpecifier {
private int referenceType;
private int sharedQualifier;
@@ -37,6 +35,16 @@ public class UPCASTCompositeTypeSpecifier extends CASTCompositeTypeSpecifier imp
super(key, name);
setBlockSizeExpression(blockSizeExpression);
}
+
+ @Override
+ public UPCASTCompositeTypeSpecifier copy() {
+ UPCASTCompositeTypeSpecifier copy = new UPCASTCompositeTypeSpecifier();
+ copyCompositeTypeSpecifier(copy);
+ copy.referenceType = referenceType;
+ copy.sharedQualifier = sharedQualifier;
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ return copy;
+ }
public IASTExpression getBlockSizeExpression() {
return blockSizeExpression;
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTElaboratedTypeSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTElaboratedTypeSpecifier.java
index 2c1fe06e17..f4a7501af0 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTElaboratedTypeSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTElaboratedTypeSpecifier.java
@@ -36,6 +36,17 @@ public class UPCASTElaboratedTypeSpecifier extends CASTElaboratedTypeSpecifier i
setBlockSizeExpression(blockSizeExpression);
}
+ @Override
+ public UPCASTElaboratedTypeSpecifier copy() {
+ IASTName name = getName();
+ UPCASTElaboratedTypeSpecifier copy = new UPCASTElaboratedTypeSpecifier(getKind(), name == null ? null : name.copy());
+ copy.referenceType = referenceType;
+ copy.sharedQualifier = sharedQualifier;
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ copy.setOffsetAndLength(this);
+ return copy;
+ }
+
public IASTExpression getBlockSizeExpression() {
return blockSizeExpression;
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java
index 1e6893ac4e..d0d9c46dd7 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java
@@ -17,8 +17,7 @@ import org.eclipse.cdt.core.dom.upc.ast.IUPCASTEnumerationSpecifier;
import org.eclipse.cdt.internal.core.dom.parser.c.CASTEnumerationSpecifier;
@SuppressWarnings("restriction")
-public class UPCASTEnumerationSpecifier extends CASTEnumerationSpecifier
- implements IUPCASTEnumerationSpecifier {
+public class UPCASTEnumerationSpecifier extends CASTEnumerationSpecifier implements IUPCASTEnumerationSpecifier {
private int referenceType;
private int sharedQualifier;
@@ -37,6 +36,16 @@ public class UPCASTEnumerationSpecifier extends CASTEnumerationSpecifier
setBlockSizeExpression(blockSizeExpression);
}
+ @Override
+ public UPCASTEnumerationSpecifier copy() {
+ UPCASTEnumerationSpecifier copy = new UPCASTEnumerationSpecifier();
+ copyEnumerationSpecifier(copy);
+ copy.referenceType = referenceType;
+ copy.sharedQualifier = sharedQualifier;
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ return copy;
+ }
+
public IASTExpression getBlockSizeExpression() {
return blockSizeExpression;
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java
index 55e29f9403..5a5d96a3f4 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java
@@ -32,6 +32,15 @@ public class UPCASTForallStatement extends CASTForStatement implements IUPCASTFo
setAffinityExpression(affinity);
}
+ @Override
+ public UPCASTForallStatement copy() {
+ UPCASTForallStatement copy = new UPCASTForallStatement();
+ copyForStatement(copy);
+ copy.setAffinityExpression(affinity == null ? null : affinity.copy());
+ return copy;
+ }
+
+
public boolean isAffinityContinue() {
return affinityContinue;
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java
index 6d8eba73ce..5787c4e3e4 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java
@@ -29,6 +29,12 @@ public class UPCASTKeywordExpression extends ASTNode implements IUPCASTKeywordEx
public UPCASTKeywordExpression(int keywordKind) {
this.keywordKind = keywordKind;
}
+
+ public UPCASTKeywordExpression copy() {
+ UPCASTKeywordExpression copy = new UPCASTKeywordExpression(keywordKind);
+ copy.setOffsetAndLength(this);
+ return copy;
+ }
public int getKeywordKind() {
return keywordKind;
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java
index 66b955eb09..926d93e7e3 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java
@@ -12,14 +12,24 @@ package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTLayoutQualifier;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
-public class UPCASTLayoutQualifier implements IUPCASTLayoutQualifier {
+@SuppressWarnings("restriction")
+public class UPCASTLayoutQualifier extends ASTNode implements IUPCASTLayoutQualifier {
private boolean isPure;
private boolean isIndefinite;
private IASTExpression blockSizeExpression;
+ public UPCASTLayoutQualifier copy() {
+ UPCASTLayoutQualifier copy = new UPCASTLayoutQualifier();
+ copy.isPure = isPure;
+ copy.isIndefinite = isIndefinite;
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ copy.setOffsetAndLength(this);
+ return copy;
+ }
public IASTExpression getBlockSizeExpression() {
return blockSizeExpression;
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java
index cd9e135027..863d96bafb 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java
@@ -31,6 +31,16 @@ public class UPCASTSimpleDeclSpecifier extends CASTSimpleDeclSpecifier
setBlockSizeExpression(blockSizeExpression);
}
+ @Override
+ public UPCASTSimpleDeclSpecifier copy() {
+ UPCASTSimpleDeclSpecifier copy = new UPCASTSimpleDeclSpecifier();
+ copySimpleDeclSpec(copy);
+ copy.referenceType = referenceType;
+ copy.sharedQualifier = sharedQualifier;
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ return copy;
+ }
+
public IASTExpression getBlockSizeExpression() {
return blockSizeExpression;
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java
index 9a898c5edb..5a89642230 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java
@@ -29,6 +29,14 @@ public class UPCASTSynchronizationStatement extends ASTNode implements IUPCASTSy
setBarrierExpression(barrierExpression);
this.statmentKind = statmentKind;
}
+
+ public UPCASTSynchronizationStatement copy() {
+ UPCASTSynchronizationStatement copy = new UPCASTSynchronizationStatement();
+ copy.statmentKind = statmentKind;
+ copy.setBarrierExpression(barrierExpression == null ? null : barrierExpression.copy());
+ copy.setOffsetAndLength(this);
+ return copy;
+ }
public IASTExpression getBarrierExpression() {
return barrierExpression;
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypeIdSizeofExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypeIdSizeofExpression.java
index 1efcafc9a3..b374c2a1c5 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypeIdSizeofExpression.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypeIdSizeofExpression.java
@@ -21,6 +21,7 @@ public class UPCASTTypeIdSizeofExpression extends CASTTypeIdExpression implement
private int upcSizeofOperator;
public UPCASTTypeIdSizeofExpression() {
+ this(null);
}
public UPCASTTypeIdSizeofExpression(IASTTypeId typeId) {
@@ -32,6 +33,16 @@ public class UPCASTTypeIdSizeofExpression extends CASTTypeIdExpression implement
this.upcSizeofOperator = upcSizeofOperator;
}
+ @Override
+ public UPCASTTypeIdSizeofExpression copy() {
+ UPCASTTypeIdSizeofExpression copy = new UPCASTTypeIdSizeofExpression();
+ copy.setUPCSizeofOperator(upcSizeofOperator);
+ IASTTypeId typeId = getTypeId();
+ copy.setTypeId(typeId == null ? null : typeId.copy());
+ copy.setOffsetAndLength(this);
+ return copy;
+ }
+
public int getUPCSizeofOperator() {
return upcSizeofOperator;
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java
index b244e14176..17a954af43 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java
@@ -17,9 +17,7 @@ import org.eclipse.cdt.core.dom.upc.ast.IUPCASTTypedefNameSpecifier;
import org.eclipse.cdt.internal.core.dom.parser.c.CASTTypedefNameSpecifier;
@SuppressWarnings("restriction")
-public class UPCASTTypedefNameSpecifier extends CASTTypedefNameSpecifier
- implements IUPCASTTypedefNameSpecifier {
-
+public class UPCASTTypedefNameSpecifier extends CASTTypedefNameSpecifier implements IUPCASTTypedefNameSpecifier {
private int referenceType;
private int sharedQualifier;
@@ -28,8 +26,6 @@ public class UPCASTTypedefNameSpecifier extends CASTTypedefNameSpecifier
public UPCASTTypedefNameSpecifier() {
}
-
-
public UPCASTTypedefNameSpecifier(IASTName name) {
super(name);
@@ -40,6 +36,17 @@ public class UPCASTTypedefNameSpecifier extends CASTTypedefNameSpecifier
setBlockSizeExpression(blockSizeExpression);
}
+ @Override
+ public UPCASTTypedefNameSpecifier copy() {
+ IASTName name = getName();
+ UPCASTTypedefNameSpecifier copy = new UPCASTTypedefNameSpecifier(name == null ? null : name.copy());
+ copyBaseDeclSpec(copy);
+ copy.referenceType = referenceType;
+ copy.sharedQualifier = sharedQualifier;
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ return copy;
+ }
+
public IASTExpression getBlockSizeExpression() {
return blockSizeExpression;
}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTUnarySizeofExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTUnarySizeofExpression.java
index 5844a586ed..b6ba057c9e 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTUnarySizeofExpression.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTUnarySizeofExpression.java
@@ -22,6 +22,7 @@ public class UPCASTUnarySizeofExpression extends CASTUnaryExpression implements
public UPCASTUnarySizeofExpression() {
+ this(null);
}
public UPCASTUnarySizeofExpression(IASTExpression operand) {
@@ -32,6 +33,16 @@ public class UPCASTUnarySizeofExpression extends CASTUnaryExpression implements
super(IASTUnaryExpression.op_sizeof, operand);
this.upcSizeofOperator = upcSizeofOperator;
}
+
+ @Override
+ public UPCASTUnarySizeofExpression copy() {
+ UPCASTUnarySizeofExpression copy = new UPCASTUnarySizeofExpression();
+ copy.setUPCSizeofOperator(upcSizeofOperator);
+ IASTExpression operand = getOperand();
+ copy.setOperand(operand == null ? null : operand.copy());
+ copy.setOffsetAndLength(this);
+ return copy;
+ }
public int getUPCSizeofOperator() {
return upcSizeofOperator;

Back to the top