mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 11:55:40 +02:00
Removed IASTTypeId.getSymbol() as it was exposing an internal interface.
Removed warnings.
This commit is contained in:
parent
ad9cde0b51
commit
9b1cc11593
4 changed files with 14 additions and 40 deletions
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.core.parser.ast;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate;
|
import org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate;
|
||||||
import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jcamelon
|
* @author jcamelon
|
||||||
|
@ -38,7 +37,6 @@ public interface IASTTypeId extends ISourceElementCallbackDelegate
|
||||||
|
|
||||||
public String getFullSignature();
|
public String getFullSignature();
|
||||||
public char[] getFullSignatureCharArray();
|
public char[] getFullSignatureCharArray();
|
||||||
public ISymbol getTypeSymbol() throws ASTNotImplementedException;
|
|
||||||
/**
|
/**
|
||||||
* @param manager
|
* @param manager
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4651,7 +4651,6 @@ public class Parser implements IParserData, IParser
|
||||||
case IToken.t_typename :
|
case IToken.t_typename :
|
||||||
sdw.setTypenamed(true);
|
sdw.setTypenamed(true);
|
||||||
consume(IToken.t_typename);
|
consume(IToken.t_typename);
|
||||||
IToken first = LA(1);
|
|
||||||
ITokenDuple duple = name(sdw.getScope(), CompletionKind.TYPE_REFERENCE,
|
ITokenDuple duple = name(sdw.getScope(), CompletionKind.TYPE_REFERENCE,
|
||||||
KeywordSetKey.EMPTY);
|
KeywordSetKey.EMPTY);
|
||||||
sdw.setTypeName(duple);
|
sdw.setTypeName(duple);
|
||||||
|
|
|
@ -1133,14 +1133,12 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
|
|
||||||
private void createConstructorReference( IASTNewExpressionDescriptor descriptor, IASTTypeId typeId, List references ){
|
private void createConstructorReference( IASTNewExpressionDescriptor descriptor, IASTTypeId typeId, List references ){
|
||||||
ISymbol symbol = null;
|
ISymbol symbol = null;
|
||||||
try {
|
|
||||||
symbol = typeId.getTypeSymbol();
|
symbol = ((ASTTypeId)typeId).getTypeSymbol();
|
||||||
|
|
||||||
if( symbol.isType( ITypeInfo.t_type ) )
|
if( symbol.isType( ITypeInfo.t_type ) )
|
||||||
symbol = symbol.getTypeSymbol();
|
symbol = symbol.getTypeSymbol();
|
||||||
} catch (ASTNotImplementedException e) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if( symbol == null || !( symbol instanceof IDerivableContainerSymbol ) )
|
if( symbol == null || !( symbol instanceof IDerivableContainerSymbol ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1712,15 +1710,8 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
if( ( kind == IASTExpression.Kind.NEW_TYPEID )
|
if( ( kind == IASTExpression.Kind.NEW_TYPEID )
|
||||||
|| ( kind == IASTExpression.Kind.NEW_NEWTYPEID ) )
|
|| ( kind == IASTExpression.Kind.NEW_NEWTYPEID ) )
|
||||||
{
|
{
|
||||||
try
|
info = ((ASTTypeId)typeId).getTypeSymbol().getTypeInfo();
|
||||||
{
|
info.addPtrOperator( new ITypeInfo.PtrOp(ITypeInfo.PtrOp.t_pointer));
|
||||||
info = typeId.getTypeSymbol().getTypeInfo();
|
|
||||||
info.addPtrOperator( new ITypeInfo.PtrOp(ITypeInfo.PtrOp.t_pointer));
|
|
||||||
}
|
|
||||||
catch (ASTNotImplementedException e)
|
|
||||||
{
|
|
||||||
// will never happen
|
|
||||||
}
|
|
||||||
result = new ExpressionResult(info);
|
result = new ExpressionResult(info);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1789,12 +1780,8 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
|| ( kind == IASTExpression.Kind.POSTFIX_REINTERPRET_CAST )
|
|| ( kind == IASTExpression.Kind.POSTFIX_REINTERPRET_CAST )
|
||||||
|| ( kind == IASTExpression.Kind.POSTFIX_CONST_CAST )
|
|| ( kind == IASTExpression.Kind.POSTFIX_CONST_CAST )
|
||||||
){
|
){
|
||||||
try{
|
|
||||||
info = TypeInfoProvider.newTypeInfo(typeId.getTypeSymbol().getTypeInfo());
|
info = TypeInfoProvider.newTypeInfo(((ASTTypeId)typeId).getTypeSymbol().getTypeInfo());
|
||||||
}catch (ASTNotImplementedException e)
|
|
||||||
{
|
|
||||||
// will never happen
|
|
||||||
}
|
|
||||||
result = new ExpressionResult(info);
|
result = new ExpressionResult(info);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1836,14 +1823,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
// typeid
|
// typeid
|
||||||
if( kind == IASTExpression.Kind.POSTFIX_TYPEID_TYPEID )
|
if( kind == IASTExpression.Kind.POSTFIX_TYPEID_TYPEID )
|
||||||
{
|
{
|
||||||
try
|
info = ((ASTTypeId)typeId).getTypeSymbol().getTypeInfo();
|
||||||
{
|
|
||||||
info = typeId.getTypeSymbol().getTypeInfo();
|
|
||||||
}
|
|
||||||
catch (ASTNotImplementedException e)
|
|
||||||
{
|
|
||||||
// will not ever happen from within CompleteParseASTFactory
|
|
||||||
}
|
|
||||||
result = new ExpressionResult(info);
|
result = new ExpressionResult(info);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -3062,10 +3042,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
provider.beginTypeConstruction();
|
provider.beginTypeConstruction();
|
||||||
|
|
||||||
if( defaultValue != null ){
|
if( defaultValue != null ){
|
||||||
try {
|
provider.setDefaultObj( ((ASTTypeId)defaultValue).getTypeSymbol().getTypeInfo() );
|
||||||
provider.setDefaultObj( defaultValue.getTypeSymbol().getTypeInfo() );
|
|
||||||
} catch ( ASTNotImplementedException e1 ) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if( kind == ParamKind.TEMPLATE_LIST ){
|
if( kind == ParamKind.TEMPLATE_LIST ){
|
||||||
ITemplateSymbol template = pst.newTemplateSymbol( identifier );
|
ITemplateSymbol template = pst.newTemplateSymbol( identifier );
|
||||||
|
|
|
@ -709,9 +709,9 @@ public class UndefinedTemplateSymbol extends BasicSymbol implements ITemplateSym
|
||||||
}
|
}
|
||||||
return symbol;
|
return symbol;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new ParserSymbolTableException(ParserSymbolTableException.r_BadTemplateArgument);
|
throw new ParserSymbolTableException(ParserSymbolTableException.r_BadTemplateArgument);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (isType(ITypeInfo.t_templateParameter) && argMap.containsKey(this)) {
|
else if (isType(ITypeInfo.t_templateParameter) && argMap.containsKey(this)) {
|
||||||
return ((ITypeInfo)argMap.get(this)).getTypeSymbol();
|
return ((ITypeInfo)argMap.get(this)).getTypeSymbol();
|
||||||
|
|
Loading…
Add table
Reference in a new issue