mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 06:55:23 +02:00
Bug 513105 - Avoid pushing a null lookup point in CPPVisitor.createType()
ArrayDeque doesn't allow null elements. Change-Id: Ib610cfedf02232d30b4fc4e1b4d4d5ba45d7aee3
This commit is contained in:
parent
bb9d1db323
commit
80dc8d9c25
1 changed files with 50 additions and 50 deletions
|
@ -2071,18 +2071,15 @@ public class CPPVisitor extends ASTQueries {
|
|||
|
||||
public static IType createType(IASTDeclarator declarator) {
|
||||
// Resolve placeholders by default.
|
||||
try {
|
||||
CPPSemantics.pushLookupPoint(declarator);
|
||||
return createType(declarator, RESOLVE_PLACEHOLDERS);
|
||||
} finally {
|
||||
CPPSemantics.popLookupPoint();
|
||||
}
|
||||
}
|
||||
|
||||
public static IType createType(IASTDeclarator declarator, int flags) {
|
||||
if (declarator == null)
|
||||
return ProblemType.NO_NAME;
|
||||
|
||||
CPPSemantics.pushLookupPoint(declarator);
|
||||
try {
|
||||
declarator= findOutermostDeclarator(declarator);
|
||||
IASTNode parent = declarator.getParent();
|
||||
|
||||
|
@ -2130,6 +2127,9 @@ public class CPPVisitor extends ASTQueries {
|
|||
type= new CPPParameterPackType(type);
|
||||
}
|
||||
return type;
|
||||
} finally {
|
||||
CPPSemantics.popLookupPoint();
|
||||
}
|
||||
}
|
||||
|
||||
private static IType createAutoParameterType(IASTDeclSpecifier declSpec, IASTDeclarator declarator,
|
||||
|
|
Loading…
Add table
Reference in a new issue