1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

fixing bug 62359 [Content Assist] failure on iostream in Linux

- fix problem during errorhandling
- fix operator function names
- fix NPE during template argument deduction
This commit is contained in:
Andrew Niefer 2004-05-25 18:42:30 +00:00
parent 4e4b2fc233
commit c0ba9bebfc
3 changed files with 8 additions and 5 deletions

View file

@ -197,8 +197,8 @@ public abstract class Parser extends ExpressionParser implements IParser
protected void errorHandling() throws EndOfFileException
{
failParse();
consume();
int depth = 0;
int depth = ( LT(1) == IToken.tLBRACE ) ? 1 : 0;
consume();
while (!((LT(1) == IToken.tSEMI && depth == 0)
|| (LT(1) == IToken.tRBRACE && depth == 1)))
{

View file

@ -2056,7 +2056,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
}
}
IParameterizedSymbol symbol = pst.newParameterizedSymbol( name.getFirstToken().getImage(), TypeInfo.t_function );
IParameterizedSymbol symbol = pst.newParameterizedSymbol( name.extractNameFromTemplateId(), TypeInfo.t_function );
setFunctionTypeInfoBits(isInline, isFriend, isStatic, symbol);
symbol.setHasVariableArgs( hasVariableArguments );

View file

@ -366,8 +366,11 @@ public final class TemplateEngine {
return deferred.getArguments();
}
ISymbol instantiated = symbol.getInstantiatedSymbol();
ITemplateSymbol template = (ITemplateSymbol) instantiated.getContainingSymbol();
return template.findArgumentsFor( (IContainerSymbol) symbol );
if( instantiated != null ){
ITemplateSymbol template = (ITemplateSymbol) instantiated.getContainingSymbol();
return template.findArgumentsFor( (IContainerSymbol) symbol );
}
return null;
}
/**