1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 19:25:38 +02:00

Fixed an NPE.

Change-Id: Ic3aa10acaf7ecd51dbed7f882cd1db93bf490e24
This commit is contained in:
Sergey Prigogin 2016-10-10 18:52:26 -07:00 committed by Gerrit Code Review @ Eclipse.org
parent 77a506b6b8
commit 52eb5f7b02

View file

@ -312,6 +312,9 @@ public class EvalTypeId extends CPPDependentEvaluation {
private ICPPConstructor[] getInitializerListConstructors(ICPPConstructor[] constructors, IASTNode point) {
ICPPConstructor[] result = ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY;
ICPPClassTemplate template = CPPVisitor.get_initializer_list(point);
if (template == null)
return result;
for (ICPPConstructor ctor : constructors) {
if (ctor.getRequiredArgumentCount() <= 1) {
IType[] parameterTypes = ctor.getType().getParameterTypes();