diff options
Diffstat (limited to 'upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTUnarySizeofExpression.java')
-rw-r--r-- | upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTUnarySizeofExpression.java | 14 |
1 files changed, 11 insertions, 3 deletions
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; } |