lib/Sema/ConstraintLocator.h
static unsigned numNumericValuesInPathElement(PathElementKind kind) {
    switch (kind) {
#define SIMPLE_LOCATOR_PATH_ELT(Name) case Name :
#include "ConstraintLocatorPathElts.def"
    case GenericParameter:
    case ProtocolRequirement:
    case Witness:
      return 0;

    case ContextualType:
    case OpenedGeneric:
    case GenericArgument:
    case NamedTupleElement:
    case TupleElement:
    case KeyPathComponent:
    case SynthesizedArgument:
    case KeyPathDynamicMember:
      return 1;

    case TypeParameterRequirement:
    case ConditionalRequirement:
      return 2;

    case ApplyArgToParam:
      return 3;
    }

    llvm_unreachable("Unhandled PathElementKind in switch.");
  }
/// Determine the number of numeric values used for the given path
/// element kind.
Determine the number of numeric values used for the given path
element kind.
Determine the number of numeric values used for the given path element kind .
static unsigned numNumericValuesInPathElement(PathElementKind kind) {
    switch (kind) {
#define SIMPLE_LOCATOR_PATH_ELT(Name) case Name :
#include "ConstraintLocatorPathElts.def"
    case GenericParameter:
    case ProtocolRequirement:
    case Witness:
      return 0;
    case ContextualType:
    case OpenedGeneric:
    case GenericArgument:
    case NamedTupleElement:
    case TupleElement:
    case KeyPathComponent:
    case SynthesizedArgument:
    case KeyPathDynamicMember:
      return 1;
    case TypeParameterRequirement:
    case ConditionalRequirement:
      return 2;
    case ApplyArgToParam:
      return 3;
    }
    llvm_unreachable("Unhandled PathElementKind in switch.");
  }
static unsigned numNumericValuesInPathElement ( PathElementKind kind ) { switch ( kind ) { #define SIMPLE_LOCATOR_PATH_ELT ( Name )  case Name : #include " " case GenericParameter : case ProtocolRequirement : case Witness : return 0 ; case ContextualType : case OpenedGeneric : case GenericArgument : case NamedTupleElement : case TupleElement : case KeyPathComponent : case SynthesizedArgument : case KeyPathDynamicMember : return 1 ; case TypeParameterRequirement : case ConditionalRequirement : return 2 ; case ApplyArgToParam : return 3 ; } llvm_unreachable ( " " ) ; }
Determine the number of numeric values used for the given path
element kind.
Determine the number of numeric values used for the given path element kind .