Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2011-03-08 00:42:57 -0500
committerMarc-Andre Laperle2011-03-08 00:42:57 -0500
commitd2047f330696c78e5f596e244b77ac1993e85535 (patch)
tree453ce31d6e0b2f44017bb1073eb9263c9db72706
parent1be6fe3bd0aab62d37aecc0a9bcfb7d56d512140 (diff)
downloadorg.eclipse.cdt-d2047f330696c78e5f596e244b77ac1993e85535.tar.gz
org.eclipse.cdt-d2047f330696c78e5f596e244b77ac1993e85535.tar.xz
org.eclipse.cdt-d2047f330696c78e5f596e244b77ac1993e85535.zip
Bug 337937 - CopyLocation for copied AST-Node. Fix UPC and XLC compile errors
-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
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCASTVectorTypeSpecifier.java12
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCPPASTVectorTypeSpecifier.java12
13 files changed, 139 insertions, 37 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 ecd83cf92d..11aaaff7e4 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 1efbe189a2..66097baee9 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 8978f846f1..1333e4c563 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 51b5e34dcf..b7344e41c1 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 08416397b1..fb9329fc84 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 2b2fbf6a96..06bee18ede 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 1211c0fa8e..0d2dff9ba7 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 d0654371d8..cbca37d63b 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 b374c2a1c5..a1693f0692 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 32df7026e7..3adc198661 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 b6ba057c9e..2685d32a4d 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;
}
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCASTVectorTypeSpecifier.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCASTVectorTypeSpecifier.java
index 70f84c53fc..b2df81bcab 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCASTVectorTypeSpecifier.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCASTVectorTypeSpecifier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -25,10 +25,18 @@ public class XlcCASTVectorTypeSpecifier extends CASTSimpleDeclSpecifier implemen
@Override
public XlcCASTVectorTypeSpecifier copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public XlcCASTVectorTypeSpecifier copy(CopyStyle style) {
XlcCASTVectorTypeSpecifier copy = new XlcCASTVectorTypeSpecifier();
- copySimpleDeclSpec(copy);
+ copySimpleDeclSpec(copy, style);
copy.isPixel = isPixel;
copy.isBool = isBool;
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(this);
+ }
return copy;
}
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCPPASTVectorTypeSpecifier.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCPPASTVectorTypeSpecifier.java
index 7bd5988fd9..f3036b962a 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCPPASTVectorTypeSpecifier.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/ast/XlcCPPASTVectorTypeSpecifier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -24,9 +24,17 @@ public class XlcCPPASTVectorTypeSpecifier extends CPPASTSimpleDeclSpecifier impl
@Override
public XlcCPPASTVectorTypeSpecifier copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ @Override
+ public XlcCPPASTVectorTypeSpecifier copy(CopyStyle style) {
XlcCPPASTVectorTypeSpecifier copy = new XlcCPPASTVectorTypeSpecifier();
- copySimpleDeclSpec(copy);
+ copySimpleDeclSpec(copy, style);
copy.isPixel = isPixel;
+ if(style == CopyStyle.withLocations) {
+ copy.setCopyLocation(this);
+ }
return copy;
}

Back to the top