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

Fixed an NPE.

This commit is contained in:
Sergey Prigogin 2013-08-29 17:17:02 -07:00
parent c9ab9203e6
commit 3edcac7cc7

View file

@ -310,6 +310,7 @@ public class BindingClassifier {
ICPPTemplateParameterMap parameterMap = ((ICPPSpecialization) binding).getTemplateParameterMap();
for (Integer position : parameterMap.getAllParameterPositions()) {
ICPPTemplateArgument argument = parameterMap.getArgument(position);
if (argument != null) {
IType type = argument.getTypeValue();
// Normally we don't need to define parameters of a template specialization that
// were not specified explicitly. __gnu_cxx::hash is an exception from that rule.
@ -319,6 +320,7 @@ public class BindingClassifier {
bindings.add((IBinding) type);
}
}
}
// Get the specialized binding - e.g. get the binding for X if the current binding is
// for the template specialization X<Y>.
binding = ((ICPPSpecialization) binding).getSpecializedBinding();