diff options
author | Marc-Andre Laperle | 2011-03-08 05:42:57 +0000 |
---|---|---|
committer | Marc-Andre Laperle | 2011-03-08 05:42:57 +0000 |
commit | d2047f330696c78e5f596e244b77ac1993e85535 (patch) | |
tree | 453ce31d6e0b2f44017bb1073eb9263c9db72706 /xlc | |
parent | 1be6fe3bd0aab62d37aecc0a9bcfb7d56d512140 (diff) | |
download | org.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
Diffstat (limited to 'xlc')
2 files changed, 20 insertions, 4 deletions
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 70f84c53fc4..b2df81bcab5 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 7bd5988fd96..f3036b962af 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; } |