Known direct subtypes

Inherited predicates

Gets a detailed string representation explaining the AST of this type (with all specifiers and nested constructs such as pointers). This is intended to help debug queries and is a very expensive operation; not to be used in production queries.

Gets a specifier of this type, recursively looking through typedef and decltype. For example, in the context of typedef const int *restrict t, the type volatile t has specifiers volatile and restrict but not const since the const is attached to the type being pointed to rather than the pointer itself.

Gets as many places as possible where this type is used by name in the source after macros have been replaced (in particular, therefore, this will find type name uses caused by macros). Note that all type name uses within instantiations are currently excluded - this is too draconian in the absence of indexing prototype instantiations of functions, and is likely to improve in the future. At present, the method takes the conservative approach of giving valid type name uses, but not necessarily all type name uses.

Holds if this declaration has a specifier called name, recursively looking through typedef and decltype. For example, in the context of typedef const int *restrict t, the type volatile t has specifiers volatile and restrict but not const since the const is attached to the type being pointed to rather than the pointer itself.

Internal – should be protected when QL supports such a flag. Subtypes override this to recursively get specifiers that are not attached directly to this @type in the database but arise through type aliases such as typedef and decltype.

Holds if this type is constant and only contains constant types. For instance, a char *const is a constant type, but not deeply constant, because while the pointer can’t be modified the character can. The type const char *const* is a deeply constant type though - both the pointer and what it points to are immutable.

Holds if this type is constant and only contains constant types, excluding the type itself. It is implied by Type.isDeeplyConst() and is just used to implement that predicate. For example, const char *const is deeply constant and deeply constant below, but const char * is only deeply constant below (the pointer can be changed, but not the underlying char). char *const is neither (it is just const).

Holds if this Element is part of a template template (not if it is part of an instantiation of template). This means it is represented in the database purely as syntax and without guarantees on the presence or correctness of type-based operations such as implicit conversions.

Gets this type with any typedefs resolved. For example, given typedef C T, this would resolve const T&amp; to const C&amp;. Note that this will only work if the resolved type actually appears on its own elsewhere in the program.