Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanuel Graf2011-03-07 07:26:26 +0000
committerEmanuel Graf2011-03-07 07:26:26 +0000
commit654e12094a5b0b77e8877550922343dc5def49c9 (patch)
tree84adebc25b342e27628c8ee9460f03dfe917e3c2 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEqualsInitializer.java
parentc2b14277a39ee7364881508795d12abcc1bbeb9e (diff)
downloadorg.eclipse.cdt-654e12094a5b0b77e8877550922343dc5def49c9.tar.gz
org.eclipse.cdt-654e12094a5b0b77e8877550922343dc5def49c9.tar.xz
org.eclipse.cdt-654e12094a5b0b77e8877550922343dc5def49c9.zip
Bug 337937: CopyLocation for copied AST-Node
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337937
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEqualsInitializer.java')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEqualsInitializer.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEqualsInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEqualsInitializer.java
index 30ccf032322..7c14d0e8f7a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEqualsInitializer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTEqualsInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * Copyright (c) 2004, 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
@@ -26,9 +26,17 @@ public class CPPASTEqualsInitializer extends ASTEqualsInitializer {
}
public CPPASTEqualsInitializer copy() {
+ return copy(CopyStyle.withoutLocations);
+ }
+
+ public CPPASTEqualsInitializer copy(CopyStyle style) {
IASTInitializerClause arg = getInitializerClause();
- CPPASTEqualsInitializer copy = new CPPASTEqualsInitializer(arg == null ? null : arg.copy());
+ CPPASTEqualsInitializer copy = new CPPASTEqualsInitializer(arg == null ? null
+ : arg.copy(style));
copy.setOffsetAndLength(this);
+ if (style == CopyStyle.withLocations) {
+ copy.setCopyLocation(this);
+ }
return copy;
}
}

Back to the top