mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56: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:
parent
4e4b2fc233
commit
c0ba9bebfc
3 changed files with 8 additions and 5 deletions
|
@ -197,8 +197,8 @@ public abstract class Parser extends ExpressionParser implements IParser
|
||||||
protected void errorHandling() throws EndOfFileException
|
protected void errorHandling() throws EndOfFileException
|
||||||
{
|
{
|
||||||
failParse();
|
failParse();
|
||||||
|
int depth = ( LT(1) == IToken.tLBRACE ) ? 1 : 0;
|
||||||
consume();
|
consume();
|
||||||
int depth = 0;
|
|
||||||
while (!((LT(1) == IToken.tSEMI && depth == 0)
|
while (!((LT(1) == IToken.tSEMI && depth == 0)
|
||||||
|| (LT(1) == IToken.tRBRACE && depth == 1)))
|
|| (LT(1) == IToken.tRBRACE && depth == 1)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
setFunctionTypeInfoBits(isInline, isFriend, isStatic, symbol);
|
||||||
|
|
||||||
symbol.setHasVariableArgs( hasVariableArguments );
|
symbol.setHasVariableArgs( hasVariableArguments );
|
||||||
|
|
|
@ -366,9 +366,12 @@ public final class TemplateEngine {
|
||||||
return deferred.getArguments();
|
return deferred.getArguments();
|
||||||
}
|
}
|
||||||
ISymbol instantiated = symbol.getInstantiatedSymbol();
|
ISymbol instantiated = symbol.getInstantiatedSymbol();
|
||||||
|
if( instantiated != null ){
|
||||||
ITemplateSymbol template = (ITemplateSymbol) instantiated.getContainingSymbol();
|
ITemplateSymbol template = (ITemplateSymbol) instantiated.getContainingSymbol();
|
||||||
return template.findArgumentsFor( (IContainerSymbol) symbol );
|
return template.findArgumentsFor( (IContainerSymbol) symbol );
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param aSymbol
|
* @param aSymbol
|
||||||
|
|
Loading…
Add table
Reference in a new issue