1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +02:00

Bug 560636 - Fix exception in findImplicitlyCalledConstructor

Change-Id: I5183737d0125713a5c4515752ba13f83df716ac2
This commit is contained in:
Marco Stornelli 2020-02-29 08:44:13 +01:00
parent 187d88443d
commit f69a613d72

View file

@ -3779,7 +3779,13 @@ public class CPPSemantics {
if (CPPTemplates.isDependentType(sourceType)) {
IType[] tmp = { sourceType };
setTargetedFunctionsToUnknown(tmp);
return CPPDeferredFunction.createForCandidates(type.getConstructors());
ICPPConstructor[] ctors = type.getConstructors();
if (ctors != null && ctors.length > 0) {
return CPPDeferredFunction.createForCandidates(type.getConstructors());
} else {
return new ProblemBinding(typeId, ISemanticProblem.BINDING_NOT_FOUND,
type.getNameCharArray());
}
}
Cost c;
if (calculateInheritanceDepth(sourceType, type) >= 0) {