Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/upc
diff options
context:
space:
mode:
Diffstat (limited to 'upc')
-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.java16
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java16
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java14
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java9
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java11
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java16
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java12
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypeIdSizeofExpression.java14
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java16
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTUnarySizeofExpression.java14
11 files changed, 119 insertions, 33 deletions
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 ecd83cf92da..11aaaff7e47 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -38,11 +38,19 @@ public class UPCASTCompositeTypeSpecifier extends CASTCompositeTypeSpecifier imp
@Override
public UPCASTCompositeTypeSpecifier copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public UPCASTCompositeTypeSpecifier copy(CopyStyle style) {
UPCASTCompositeTypeSpecifier copy = new UPCASTCompositeTypeSpecifier();
- copyCompositeTypeSpecifier(copy);
+ copyCompositeTypeSpecifier(copy, style);
copy.referenceType = referenceType;
copy.sharedQualifier = sharedQualifier;
- copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy(style));
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(this);
+ }
return copy;
}
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 1efbe189a24..66097baee9f 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -38,15 +38,23 @@ public class UPCASTElaboratedTypeSpecifier extends CASTElaboratedTypeSpecifier i
@Override
public UPCASTElaboratedTypeSpecifier copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public UPCASTElaboratedTypeSpecifier copy(CopyStyle style) {
IASTName name = getName();
- UPCASTElaboratedTypeSpecifier copy = new UPCASTElaboratedTypeSpecifier(getKind(), name == null ? null : name.copy());
+ UPCASTElaboratedTypeSpecifier copy = new UPCASTElaboratedTypeSpecifier(getKind(), name == null ? null : name.copy(style));
copy.referenceType = referenceType;
copy.sharedQualifier = sharedQualifier;
- copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy(style));
copy.setOffsetAndLength(this);
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(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 8978f846f1e..1333e4c5634 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -38,14 +38,22 @@ public class UPCASTEnumerationSpecifier extends CASTEnumerationSpecifier impleme
@Override
public UPCASTEnumerationSpecifier copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public UPCASTEnumerationSpecifier copy(CopyStyle style) {
UPCASTEnumerationSpecifier copy = new UPCASTEnumerationSpecifier();
- copyEnumerationSpecifier(copy);
+ copyEnumerationSpecifier(copy, style);
copy.referenceType = referenceType;
copy.sharedQualifier = sharedQualifier;
- copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy(style));
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(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/UPCASTForallStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java
index 51b5e34dcf7..b7344e41c18 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -34,9 +34,17 @@ public class UPCASTForallStatement extends CASTForStatement implements IUPCASTFo
@Override
public UPCASTForallStatement copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public UPCASTForallStatement copy(CopyStyle style) {
UPCASTForallStatement copy = new UPCASTForallStatement();
- copyForStatement(copy);
- copy.setAffinityExpression(affinity == null ? null : affinity.copy());
+ copyForStatement(copy, style);
+ copy.setAffinityExpression(affinity == null ? null : affinity.copy(style));
+ if (style == CopyStyle.withLocations) {
+ copy.setCopyLocation(this);
+ }
return copy;
}
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 08416397b19..fb9329fc84c 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -31,8 +31,15 @@ public class UPCASTKeywordExpression extends ASTNode implements IUPCASTKeywordEx
}
public UPCASTKeywordExpression copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ public UPCASTKeywordExpression copy(CopyStyle style) {
UPCASTKeywordExpression copy = new UPCASTKeywordExpression(keywordKind);
copy.setOffsetAndLength(this);
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(this);
+ }
return copy;
}
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 2b2fbf6a96f..06bee18edeb 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -23,11 +23,18 @@ public class UPCASTLayoutQualifier extends ASTNode implements IUPCASTLayoutQuali
private IASTExpression blockSizeExpression;
public UPCASTLayoutQualifier copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ public UPCASTLayoutQualifier copy(CopyStyle style) {
UPCASTLayoutQualifier copy = new UPCASTLayoutQualifier();
copy.isPure = isPure;
copy.isIndefinite = isIndefinite;
- copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy(style));
copy.setOffsetAndLength(this);
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(this);
+ }
return copy;
}
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 1211c0fa8ee..0d2dff9ba72 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -33,14 +33,22 @@ public class UPCASTSimpleDeclSpecifier extends CASTSimpleDeclSpecifier
@Override
public UPCASTSimpleDeclSpecifier copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public UPCASTSimpleDeclSpecifier copy(CopyStyle style) {
UPCASTSimpleDeclSpecifier copy = new UPCASTSimpleDeclSpecifier();
- copySimpleDeclSpec(copy);
+ copySimpleDeclSpec(copy, style);
copy.referenceType = referenceType;
copy.sharedQualifier = sharedQualifier;
- copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy(style));
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(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/UPCASTSynchronizationStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java
index d0654371d89..cbca37d63bc 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -31,10 +31,17 @@ public class UPCASTSynchronizationStatement extends ASTNode implements IUPCASTSy
}
public UPCASTSynchronizationStatement copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ public UPCASTSynchronizationStatement copy(CopyStyle style) {
UPCASTSynchronizationStatement copy = new UPCASTSynchronizationStatement();
copy.statmentKind = statmentKind;
- copy.setBarrierExpression(barrierExpression == null ? null : barrierExpression.copy());
+ copy.setBarrierExpression(barrierExpression == null ? null : barrierExpression.copy(style));
copy.setOffsetAndLength(this);
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(this);
+ }
return copy;
}
@@ -83,4 +90,5 @@ public class UPCASTSynchronizationStatement extends ASTNode implements IUPCASTSy
return true;
}
+
} \ 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/UPCASTTypeIdSizeofExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypeIdSizeofExpression.java
index b374c2a1c51..a1693f06922 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -35,14 +35,22 @@ public class UPCASTTypeIdSizeofExpression extends CASTTypeIdExpression implement
@Override
public UPCASTTypeIdSizeofExpression copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public UPCASTTypeIdSizeofExpression copy(CopyStyle style) {
UPCASTTypeIdSizeofExpression copy = new UPCASTTypeIdSizeofExpression();
copy.setUPCSizeofOperator(upcSizeofOperator);
IASTTypeId typeId = getTypeId();
- copy.setTypeId(typeId == null ? null : typeId.copy());
+ copy.setTypeId(typeId == null ? null : typeId.copy(style));
copy.setOffsetAndLength(this);
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(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 32df7026e77..3adc1986619 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -38,15 +38,23 @@ public class UPCASTTypedefNameSpecifier extends CASTTypedefNameSpecifier impleme
@Override
public UPCASTTypedefNameSpecifier copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public UPCASTTypedefNameSpecifier copy(CopyStyle style) {
IASTName name = getName();
- UPCASTTypedefNameSpecifier copy = new UPCASTTypedefNameSpecifier(name == null ? null : name.copy());
+ UPCASTTypedefNameSpecifier copy = new UPCASTTypedefNameSpecifier(name == null ? null : name.copy(style));
copyBaseDeclSpec(copy);
copy.referenceType = referenceType;
copy.sharedQualifier = sharedQualifier;
- copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy());
+ copy.setBlockSizeExpression(blockSizeExpression == null ? null : blockSizeExpression.copy(style));
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(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/UPCASTUnarySizeofExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTUnarySizeofExpression.java
index b6ba057c9e5..2685d32a4d7 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation 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
@@ -36,14 +36,22 @@ public class UPCASTUnarySizeofExpression extends CASTUnaryExpression implements
@Override
public UPCASTUnarySizeofExpression copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public UPCASTUnarySizeofExpression copy(CopyStyle style) {
UPCASTUnarySizeofExpression copy = new UPCASTUnarySizeofExpression();
copy.setUPCSizeofOperator(upcSizeofOperator);
IASTExpression operand = getOperand();
- copy.setOperand(operand == null ? null : operand.copy());
+ copy.setOperand(operand == null ? null : operand.copy(style));
copy.setOffsetAndLength(this);
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(this);
+ }
return copy;
}
-
+
public int getUPCSizeofOperator() {
return upcSizeofOperator;
}

Back to the top