1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +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(); ICPPTemplateParameterMap parameterMap = ((ICPPSpecialization) binding).getTemplateParameterMap();
for (Integer position : parameterMap.getAllParameterPositions()) { for (Integer position : parameterMap.getAllParameterPositions()) {
ICPPTemplateArgument argument = parameterMap.getArgument(position); ICPPTemplateArgument argument = parameterMap.getArgument(position);
if (argument != null) {
IType type = argument.getTypeValue(); IType type = argument.getTypeValue();
// Normally we don't need to define parameters of a template specialization that // 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. // were not specified explicitly. __gnu_cxx::hash is an exception from that rule.
@ -319,6 +320,7 @@ public class BindingClassifier {
bindings.add((IBinding) type); bindings.add((IBinding) type);
} }
} }
}
// Get the specialized binding - e.g. get the binding for X if the current binding is // Get the specialized binding - e.g. get the binding for X if the current binding is
// for the template specialization X<Y>. // for the template specialization X<Y>.
binding = ((ICPPSpecialization) binding).getSpecializedBinding(); binding = ((ICPPSpecialization) binding).getSpecializedBinding();