mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +02:00
Bug 475739 - Follow-up to fix some warnings related to deprecation
Change-Id: I400de3448d615cef6adea5035ed24e66490819d4 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
This commit is contained in:
parent
fe5aea4644
commit
ad2940f594
3 changed files with 28 additions and 9 deletions
|
@ -56,7 +56,8 @@ public interface IASTDeclSpecifier extends IASTNode {
|
|||
|
||||
/**
|
||||
* Get any alignment-specifiers in this decl-specifier sequence.
|
||||
* @deprecated Alignment specifiers are now stored in the attribute specifier sequence.
|
||||
* @deprecated Use ICASTDeclSpecifier.getAlignmentSpecifiers() for C code.
|
||||
* In C++ code, alignment specifiers are now stored in the attribute specifier sequence.
|
||||
* @since 5.10
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -102,7 +103,8 @@ public interface IASTDeclSpecifier extends IASTNode {
|
|||
|
||||
/**
|
||||
* Not allowed on frozen ast.
|
||||
* @deprecated Alignment specifiers are now stored in the attribute specifier sequence.
|
||||
* @deprecated Use ICASTDeclSpecifier.setAlignmentSpecifiers() for C code.
|
||||
* In C++ code, alignment specifiers are now stored in the attribute specifier sequence.
|
||||
* @since 5.10
|
||||
*/
|
||||
@Deprecated
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.c;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTAlignmentSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
|
||||
|
||||
/**
|
||||
|
@ -20,9 +22,21 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICASTDeclSpecifier extends IASTDeclSpecifier {
|
||||
/**
|
||||
* @since 5.12
|
||||
*/
|
||||
public static final ASTNodeProperty ALIGNMENT_SPECIFIER = new ASTNodeProperty(
|
||||
"ICASTDeclSpecifier.ALIGNMENT_SPECIFIER - Alignment specifier"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
@Override
|
||||
public ICASTDeclSpecifier copy();
|
||||
|
||||
@Override
|
||||
public IASTAlignmentSpecifier[] getAlignmentSpecifiers();
|
||||
|
||||
@Override
|
||||
public void setAlignmentSpecifiers(IASTAlignmentSpecifier[] alignmentSpecifiers);
|
||||
}
|
||||
|
|
|
@ -70,8 +70,11 @@ import org.eclipse.cdt.core.dom.ast.IScope;
|
|||
import org.eclipse.cdt.core.dom.ast.c.ICASTArrayDesignator;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTArrayModifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTCompositeTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTDesignatedInitializer;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTDesignator;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTFieldDesignator;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTPointer;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
|
||||
|
@ -920,8 +923,8 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
|
|||
int isLong= 0;
|
||||
|
||||
IToken returnToken= null;
|
||||
IASTDeclSpecifier result= null;
|
||||
IASTDeclSpecifier altResult= null;
|
||||
ICASTDeclSpecifier result= null;
|
||||
ICASTDeclSpecifier altResult= null;
|
||||
IASTAlignmentSpecifier[] alignmentSpecifiers = IASTAlignmentSpecifier.EMPTY_ALIGNMENT_SPECIFIER_ARRAY;
|
||||
try {
|
||||
IASTName identifier= null;
|
||||
|
@ -1131,10 +1134,10 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
|
|||
if (encounteredTypename || encounteredRawType)
|
||||
break declSpecifiers;
|
||||
try {
|
||||
result= enumSpecifier();
|
||||
result= (ICASTEnumerationSpecifier) enumSpecifier();
|
||||
} catch (BacktrackException bt) {
|
||||
if (bt.getNodeBeforeProblem() instanceof IASTDeclSpecifier) {
|
||||
result= (IASTDeclSpecifier) bt.getNodeBeforeProblem();
|
||||
if (bt.getNodeBeforeProblem() instanceof ICASTDeclSpecifier) {
|
||||
result= (ICASTDeclSpecifier) bt.getNodeBeforeProblem();
|
||||
problem = bt.getProblem();
|
||||
break declSpecifiers;
|
||||
} else {
|
||||
|
@ -1323,7 +1326,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
|
|||
return result;
|
||||
}
|
||||
|
||||
protected IASTElaboratedTypeSpecifier elaboratedTypeSpecifier() throws BacktrackException, EndOfFileException {
|
||||
protected ICASTElaboratedTypeSpecifier elaboratedTypeSpecifier() throws BacktrackException, EndOfFileException {
|
||||
// this is an elaborated class specifier
|
||||
IToken t = consume();
|
||||
int eck = 0;
|
||||
|
@ -1347,7 +1350,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
|
|||
__attribute_decl_seq(supportAttributeSpecifiers, supportDeclspecSpecifiers);
|
||||
|
||||
IASTName name = identifier();
|
||||
IASTElaboratedTypeSpecifier result = getNodeFactory().newElaboratedTypeSpecifier(eck, name);
|
||||
ICASTElaboratedTypeSpecifier result = getNodeFactory().newElaboratedTypeSpecifier(eck, name);
|
||||
((ASTNode) result).setOffsetAndLength(t.getOffset(), calculateEndOffset(name) - t.getOffset());
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue