Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-05-16 20:27:59 +0000
committerSergey Prigogin2012-05-16 20:27:59 +0000
commite55325538485fe691418c4b50c7a4d947239d95c (patch)
treea6dbf1d10d7052ae4d2cf263cd8770000a1a8c91 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
parenta37a37d4c1a8ddfdd70645e36706cf4ca5280d85 (diff)
downloadorg.eclipse.cdt-e55325538485fe691418c4b50c7a4d947239d95c.tar.gz
org.eclipse.cdt-e55325538485fe691418c4b50c7a4d947239d95c.tar.xz
org.eclipse.cdt-e55325538485fe691418c4b50c7a4d947239d95c.zip
Bug 332829. Parsing support for constexpr keyword. Also added few
new C++11 keywords.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java29
1 files changed, 12 insertions, 17 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
index bf020df8804..45804b803d4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java
@@ -37,27 +37,22 @@ public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier
@Override
public CPPASTSimpleDeclSpecifier copy(CopyStyle style) {
- CPPASTSimpleDeclSpecifier copy = new CPPASTSimpleDeclSpecifier();
- copySimpleDeclSpec(copy, style);
- if (style == CopyStyle.withLocations) {
- copy.setCopyLocation(this);
- }
- return copy;
+ return copy(new CPPASTSimpleDeclSpecifier(), style);
}
- protected void copySimpleDeclSpec(CPPASTSimpleDeclSpecifier other, CopyStyle style) {
- copyBaseDeclSpec(other);
- other.type = type;
- other.isSigned = isSigned;
- other.isUnsigned = isUnsigned;
- other.isShort = isShort;
- other.isLong = isLong;
- other.isLonglong= isLonglong;
- other.isComplex= isComplex;
- other.isImaginary= isImaginary;
+ protected <T extends CPPASTSimpleDeclSpecifier> T copy(T copy, CopyStyle style) {
+ copy.type = type;
+ copy.isSigned = isSigned;
+ copy.isUnsigned = isUnsigned;
+ copy.isShort = isShort;
+ copy.isLong = isLong;
+ copy.isLonglong= isLonglong;
+ copy.isComplex= isComplex;
+ copy.isImaginary= isImaginary;
if (fDeclTypeExpression != null) {
- other.setDeclTypeExpression(fDeclTypeExpression.copy(style));
+ copy.setDeclTypeExpression(fDeclTypeExpression.copy(style));
}
+ return super.copy(copy, style);
}
/**

Back to the top