returns True, if type represents C++ volatile type, False otherwise
764230
def is_volatile(type_):
    """"""
    nake_type = remove_alias(type_)
    if isinstance(nake_type, cpptypes.volatile_t):
        return True
    elif isinstance(nake_type, cpptypes.const_t):
        return is_volatile(nake_type.base)
    elif isinstance(nake_type, cpptypes.array_t):
        return is_volatile(nake_type.base)
    return False
1144169
def is_calldef_pointer(type_):
    """"""
    if not is_pointer(type_):
        return False
    nake_type = remove_alias(type_)
    nake_type = remove_cv(nake_type)
    return isinstance(nake_type, cpptypes.compound_t) \
        and isinstance(nake_type.base, cpptypes.calldef_type_t)
758878
private boolean isSupportedPrimitive(PrimitiveTypeInfo type) {
        switch (type.getPrimitiveCategory()) {
            case VOID:
            case STRING:
            case BOOLEAN:
            case BYTE:
            case SHORT:
            case INT:
            case LONG:
            case FLOAT:
            case DOUBLE:
            case DATE:
            case TIMESTAMP:
                return true;
            default:
                return false;
        }
    }
929532
def type(self):
        
        if self.orig_type is TRISTATE and \
           ((self.choice and self.choice.tri_value == 2) or
            not self.kconfig.modules.tri_value):

            return BOOL

        return self.orig_type
1179077
def remove_volatile(type_):
    
    nake_type = remove_alias(type_)
    if not is_volatile(nake_type):
        return type_
    else:
        if isinstance(nake_type, cpptypes.array_t):
            is_c = is_const(nake_type)
            if is_c:
                base_type_ = nake_type.base.base.base
            else:
                base_type_ = nake_type.base.base
            result_type = base_type_
            if is_c:
                result_type = cpptypes.const_t(result_type)
            return cpptypes.array_t(result_type, nake_type.size)
        return nake_type.base
747629
static boolean isSomeCompileTimeConstStringValue(Node node) {
    // TODO(bangert): Support constants, using a Scope argument. See ConstParamCheck
    if (node.isString() || (node.isTemplateLit() && node.hasOneChild())) {
      return true;
    } else if (node.isAdd()) {
      checkState(node.hasTwoChildren(), node);
      Node left = node.getFirstChild();
      Node right = node.getLastChild();
      return isSomeCompileTimeConstStringValue(left) && isSomeCompileTimeConstStringValue(right);
    } else if (node.isHook()) {
      // Ternary operator a ? b : c
      Node left = node.getSecondChild();
      Node right = node.getLastChild();
      return isSomeCompileTimeConstStringValue(left) && isSomeCompileTimeConstStringValue(right);
    }
    return false;
  }
207336
static boolean isSingleton(Types types, TypeElement element) {
    return isSingleton(types, element, element.asType());
  }
43988
static boolean isSafeReturnType(Class<?> type) { 
        return !ConnectionPoolDataSource.class.isAssignableFrom(type)
               && !CommonDataSource.class.isAssignableFrom(type) 
               && !XADataSource.class.isAssignableFrom(type)
               && !DataSource.class.isAssignableFrom(type)
               && !PooledConnection.class.isAssignableFrom(type) // implies XAConnection
               && !Connection.class.isAssignableFrom(type)
               && !DatabaseMetaData.class.isAssignableFrom(type)
               && !Statement.class.isAssignableFrom(type) // implies prepared & callable
               && !ResultSet.class.isAssignableFrom(type)
               && !XAResource.class.isAssignableFrom(type);
    }
880691
private boolean isTypeValid(char type) {
		return (type == MAPPED_ADDRESS || type == RESPONSE_ADDRESS
				|| type == SOURCE_ADDRESS || type == CHANGED_ADDRESS
				|| type == REFLECTED_FROM || type == XOR_MAPPED_ADDRESS
				|| type == ALTERNATE_SERVER || type == XOR_PEER_ADDRESS
				|| type == XOR_RELAYED_ADDRESS || type == DESTINATION_ADDRESS);
	}
678670
function isCustomType(type) {
        return ria.__API.isClassConstructor(type)
            || ria.__API.isInterface(type)
            || ria.__API.isEnum(type)
            || ria.__API.isIdentifier(type)
            || ria.__API.isDelegate(type)
            || ria.__API.isSpecification(type);
            //|| ArrayOfDescriptor.isArrayOfDescriptor(type)
            ;
    }
755360
static boolean isUnaryOperatorType(Token type) {
    switch (type) {
      case DELPROP:
      case VOID:
      case TYPEOF:
      case POS:
      case NEG:
      case BITNOT:
      case NOT:
        return true;

      default:
        return false;
    }
  }
259226
def is_smart_pointer(type_):
        """"""
        type_ = type_traits.remove_alias(type_)
        type_ = type_traits.remove_cv(type_)
        type_ = type_traits.remove_declarated(type_)
        if not isinstance(type_,
                          (class_declaration.class_declaration_t,
                           class_declaration.class_t)):
            return False
        if not (
                traits_impl_details.impl_details.is_defined_in_xxx(
                    'boost', type_) or
                traits_impl_details.impl_details.is_defined_in_xxx(
                    'std', type_)):
            return False
        return type_.decl_string.startswith('::boost::shared_ptr<') or \
            type_.decl_string.startswith('::std::shared_ptr<')
869976
def has_type(type, names):
    """"""
    if type.arg in names:
        return type
    for t in type.search('type'): # check all union's member types
        r = has_type(t, names)
        if r is not None:
            return r
    if not hasattr(type, 'i_typedef'):
        return None
    if (type.i_typedef is not None and
        hasattr(type.i_typedef, 'i_is_circular') and
        type.i_typedef.i_is_circular == False):
        t = type.i_typedef.search_one('type')
        if t is not None:
            return has_type(t, names)
    return None
278244
public static boolean isVoidType(Type type, VisitorState state) {
    if (type == null) {
      return false;
    }
    return type.getKind() == TypeKind.VOID
        || state.getTypes().isSameType(Suppliers.JAVA_LANG_VOID_TYPE.get(state), type);
  }
521717
static boolean isBasicValueType(final Type type) {
        if (type instanceof Class<?>) {
            return isBasicValueType((Class<?>) type);
        } else if (type instanceof ParameterizedType) {
            return isBasicValueType(((ParameterizedType) type).getRawType());
        } else {
            return false;
        }
    }
827363
static boolean isBasicValueType(final Class<?> cls) {
        return cls == String.class //
                || cls == Integer.class || cls == Integer.TYPE //
                || cls == Long.class || cls == Long.TYPE //
                || cls == Short.class || cls == Short.TYPE //
                || cls == Float.class || cls == Float.TYPE //
                || cls == Double.class || cls == Double.TYPE //
                || cls == Byte.class || cls == Byte.TYPE //
                || cls == Character.class || cls == Character.TYPE //
                || cls == Boolean.class || cls == Boolean.TYPE //
                || cls.isEnum();
    }
820418
def is_enum_type(type_):
    

    return isinstance(type_, type) and issubclass(type_, tuple(_get_types(Types.ENUM)))