Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJohn Camelon2004-10-04 15:14:16 -0400
committerJohn Camelon2004-10-04 15:14:16 -0400
commit9b1cc11593e8ca2408016ff8e2e761a6fc5b19e1 (patch)
tree0d88c645c0e1b0a7e8f6cce866109046a0433ff0 /core
parentad9cde0b51dc56b572b74a4b93ef3328d7a4b1cd (diff)
downloadorg.eclipse.cdt-9b1cc11593e8ca2408016ff8e2e761a6fc5b19e1.tar.gz
org.eclipse.cdt-9b1cc11593e8ca2408016ff8e2e761a6fc5b19e1.tar.xz
org.eclipse.cdt-9b1cc11593e8ca2408016ff8e2e761a6fc5b19e1.zip
Removed IASTTypeId.getSymbol() as it was exposing an internal interface.
Removed warnings.
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTypeId.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java45
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/UndefinedTemplateSymbol.java6
4 files changed, 14 insertions, 40 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTypeId.java
index 33a178266e7..9f94bb7d1b1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTypeId.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTTypeId.java
@@ -13,7 +13,6 @@ package org.eclipse.cdt.core.parser.ast;
import java.util.Iterator;
import org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate;
-import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
/**
* @author jcamelon
@@ -38,7 +37,6 @@ public interface IASTTypeId extends ISourceElementCallbackDelegate
public String getFullSignature();
public char[] getFullSignatureCharArray();
- public ISymbol getTypeSymbol() throws ASTNotImplementedException;
/**
* @param manager
*/
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java
index 0039a0d1844..b61e133c232 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java
@@ -4651,7 +4651,6 @@ public class Parser implements IParserData, IParser
case IToken.t_typename :
sdw.setTypenamed(true);
consume(IToken.t_typename);
- IToken first = LA(1);
ITokenDuple duple = name(sdw.getScope(), CompletionKind.TYPE_REFERENCE,
KeywordSetKey.EMPTY);
sdw.setTypeName(duple);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java
index c7a024190b9..b22aed04a7b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java
@@ -1133,14 +1133,12 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
private void createConstructorReference( IASTNewExpressionDescriptor descriptor, IASTTypeId typeId, List references ){
ISymbol symbol = null;
- try {
- symbol = typeId.getTypeSymbol();
+
+ symbol = ((ASTTypeId)typeId).getTypeSymbol();
- if( symbol.isType( ITypeInfo.t_type ) )
- symbol = symbol.getTypeSymbol();
- } catch (ASTNotImplementedException e) {
- return;
- }
+ if( symbol.isType( ITypeInfo.t_type ) )
+ symbol = symbol.getTypeSymbol();
+
if( symbol == null || !( symbol instanceof IDerivableContainerSymbol ) )
return;
@@ -1712,15 +1710,8 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
if( ( kind == IASTExpression.Kind.NEW_TYPEID )
|| ( kind == IASTExpression.Kind.NEW_NEWTYPEID ) )
{
- try
- {
- info = typeId.getTypeSymbol().getTypeInfo();
- info.addPtrOperator( new ITypeInfo.PtrOp(ITypeInfo.PtrOp.t_pointer));
- }
- catch (ASTNotImplementedException e)
- {
- // will never happen
- }
+ info = ((ASTTypeId)typeId).getTypeSymbol().getTypeInfo();
+ info.addPtrOperator( new ITypeInfo.PtrOp(ITypeInfo.PtrOp.t_pointer));
result = new ExpressionResult(info);
return result;
}
@@ -1789,12 +1780,8 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|| ( kind == IASTExpression.Kind.POSTFIX_REINTERPRET_CAST )
|| ( kind == IASTExpression.Kind.POSTFIX_CONST_CAST )
){
- try{
- info = TypeInfoProvider.newTypeInfo(typeId.getTypeSymbol().getTypeInfo());
- }catch (ASTNotImplementedException e)
- {
- // will never happen
- }
+
+ info = TypeInfoProvider.newTypeInfo(((ASTTypeId)typeId).getTypeSymbol().getTypeInfo());
result = new ExpressionResult(info);
return result;
}
@@ -1836,14 +1823,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
// typeid
if( kind == IASTExpression.Kind.POSTFIX_TYPEID_TYPEID )
{
- try
- {
- info = typeId.getTypeSymbol().getTypeInfo();
- }
- catch (ASTNotImplementedException e)
- {
- // will not ever happen from within CompleteParseASTFactory
- }
+ info = ((ASTTypeId)typeId).getTypeSymbol().getTypeInfo();
result = new ExpressionResult(info);
return result;
}
@@ -3062,10 +3042,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
provider.beginTypeConstruction();
if( defaultValue != null ){
- try {
- provider.setDefaultObj( defaultValue.getTypeSymbol().getTypeInfo() );
- } catch ( ASTNotImplementedException e1 ) {
- }
+ provider.setDefaultObj( ((ASTTypeId)defaultValue).getTypeSymbol().getTypeInfo() );
}
if( kind == ParamKind.TEMPLATE_LIST ){
ITemplateSymbol template = pst.newTemplateSymbol( identifier );
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/UndefinedTemplateSymbol.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/UndefinedTemplateSymbol.java
index 08e584e8e5c..b9dbec358d9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/UndefinedTemplateSymbol.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/pst/UndefinedTemplateSymbol.java
@@ -709,9 +709,9 @@ public class UndefinedTemplateSymbol extends BasicSymbol implements ITemplateSym
}
return symbol;
}
- else {
- throw new ParserSymbolTableException(ParserSymbolTableException.r_BadTemplateArgument);
- }
+
+ throw new ParserSymbolTableException(ParserSymbolTableException.r_BadTemplateArgument);
+
}
else if (isType(ITypeInfo.t_templateParameter) && argMap.containsKey(this)) {
return ((ITypeInfo)argMap.get(this)).getTypeSymbol();

Back to the top