clang  6.0.0svn
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
Type.h File Reference

C Language Family Type Representation. More...

#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/TemplateName.h"
#include "clang/Basic/AddressSpaces.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/ExceptionSpecificationType.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/Linkage.h"
#include "clang/Basic/PartialDiagnostic.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/Visibility.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Support/ErrorHandling.h"
#include "clang/AST/TypeNodes.def"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/AST/BuiltinTypes.def"
Include dependency graph for Type.h:

Go to the source code of this file.

Classes

struct  llvm::PointerLikeTypeTraits< T >
 
struct  llvm::PointerLikeTypeTraits< ::clang::Type * >
 
struct  llvm::PointerLikeTypeTraits< ::clang::ExtQuals * >
 
struct  llvm::isPodLike< clang::QualType >
 
class  clang::CanQual< T >
 Represents a canonical, potentially-qualified type. More...
 
class  clang::Qualifiers
 The collection of all-type qualifiers we support. More...
 
struct  clang::SplitQualType
 A std::pair-like structure for storing a qualified type split into its local qualifiers and its locally-unqualified type. More...
 
class  clang::QualType
 A (possibly-)qualified type. More...
 
class  clang::QualType::StreamedQualTypeHelper
 
struct  llvm::simplify_type< ::clang::QualType >
 Implement simplify_type for QualType, so that we can dyn_cast from QualType to a specific Type class. More...
 
struct  llvm::PointerLikeTypeTraits< clang::QualType >
 
class  clang::ExtQualsTypeCommonBase
 Base class that is common to both the ExtQuals and Type classes, which allows QualType to access the common fields between the two. More...
 
class  clang::ExtQuals
 We can encode up to four bits in the low bits of a type pointer, but there are many more type qualifiers that we want to be able to apply to an arbitrary type. More...
 
class  clang::Type
 The base class of the type hierarchy. More...
 
class  clang::Type::ArrayTypeBitfields
 
class  clang::Type::BuiltinTypeBitfields
 
class  clang::Type::FunctionTypeBitfields
 
class  clang::Type::ObjCObjectTypeBitfields
 
class  clang::Type::ReferenceTypeBitfields
 
class  clang::Type::TypeWithKeywordBitfields
 
class  clang::Type::VectorTypeBitfields
 
class  clang::Type::AttributedTypeBitfields
 
class  clang::Type::AutoTypeBitfields
 
class  clang::BuiltinType
 This class is used for builtin types like 'int'. More...
 
class  clang::ComplexType
 Complex values, per C99 6.2.5p11. More...
 
class  clang::ParenType
 Sugar for parentheses used when specifying types. More...
 
class  clang::PointerType
 PointerType - C99 6.7.5.1 - Pointer Declarators. More...
 
class  clang::AdjustedType
 Represents a type which was implicitly adjusted by the semantic engine for arbitrary reasons. More...
 
class  clang::DecayedType
 Represents a pointer type decayed from an array or function type. More...
 
class  clang::BlockPointerType
 Pointer to a block type. More...
 
class  clang::ReferenceType
 Base for LValueReferenceType and RValueReferenceType. More...
 
class  clang::LValueReferenceType
 An lvalue reference type, per C++11 [dcl.ref]. More...
 
class  clang::RValueReferenceType
 An rvalue reference type, per C++11 [dcl.ref]. More...
 
class  clang::MemberPointerType
 A pointer to member type per C++ 8.3.3 - Pointers to members. More...
 
class  clang::ArrayType
 Represents an array type, per C99 6.7.5.2 - Array Declarators. More...
 
class  clang::ConstantArrayType
 Represents the canonical version of C arrays with a specified constant size. More...
 
class  clang::IncompleteArrayType
 Represents a C array with an unspecified size. More...
 
class  clang::VariableArrayType
 Represents a C array with a specified size that is not an integer-constant-expression. More...
 
class  clang::DependentSizedArrayType
 Represents an array type in C++ whose size is a value-dependent expression. More...
 
class  clang::DependentAddressSpaceType
 Represents an extended address space qualifier where the input address space value is dependent. More...
 
class  clang::DependentSizedExtVectorType
 Represents an extended vector type where either the type or size is dependent. More...
 
class  clang::VectorType
 Represents a GCC generic vector type. More...
 
class  clang::ExtVectorType
 ExtVectorType - Extended vector type. More...
 
class  clang::FunctionType
 FunctionType - C99 6.7.5.3 - Function Declarators. More...
 
class  clang::FunctionType::ExtInfo
 A class which abstracts out some details necessary for making a call. More...
 
class  clang::FunctionNoProtoType
 Represents a K&R-style 'int foo()' function, which has no information available about its arguments. More...
 
class  clang::FunctionProtoType
 Represents a prototype with parameter type info, e.g. More...
 
class  clang::FunctionProtoType::ExtParameterInfo
 Interesting information about a specific parameter that can't simply be reflected in parameter's type. More...
 
struct  clang::FunctionProtoType::ExceptionSpecInfo
 
struct  clang::FunctionProtoType::ExtProtoInfo
 Extra information about a function prototype. More...
 
class  clang::UnresolvedUsingType
 Represents the dependent type named by a dependently-scoped typename using declaration, e.g. More...
 
class  clang::TypedefType
 
class  clang::TypeOfExprType
 Represents a typeof (or typeof) expression (a GCC extension). More...
 
class  clang::DependentTypeOfExprType
 Internal representation of canonical, dependent typeof(expr) types. More...
 
class  clang::TypeOfType
 Represents typeof(type), a GCC extension. More...
 
class  clang::DecltypeType
 Represents the type decltype(expr) (C++11). More...
 
class  clang::DependentDecltypeType
 Internal representation of canonical, dependent decltype(expr) types. More...
 
class  clang::UnaryTransformType
 A unary type transform, which is a type constructed from another. More...
 
class  clang::DependentUnaryTransformType
 Internal representation of canonical, dependent __underlying_type(type) types. More...
 
class  clang::TagType
 
class  clang::RecordType
 A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/classes. More...
 
class  clang::EnumType
 A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums. More...
 
class  clang::AttributedType
 An attributed type is a type to which a type attribute has been applied. More...
 
class  clang::TemplateTypeParmType
 
class  clang::SubstTemplateTypeParmType
 Represents the result of substituting a type for a template type parameter. More...
 
class  clang::SubstTemplateTypeParmPackType
 Represents the result of substituting a set of types for a template type parameter pack. More...
 
class  clang::DeducedType
 Common base class for placeholders for types that get replaced by placeholder type deduction: C++11 auto, C++14 decltype(auto), C++17 deduced class template types, and (eventually) constrained type names from the C++ Concepts TS. More...
 
class  clang::AutoType
 Represents a C++11 auto or C++14 decltype(auto) type. More...
 
class  clang::DeducedTemplateSpecializationType
 Represents a C++17 deduced template specialization type. More...
 
class  clang::TemplateSpecializationType
 Represents a type template specialization; the template must be a class template, a type alias template, or a template template parameter. More...
 
class  clang::InjectedClassNameType
 The injected class name of a C++ class template or class template partial specialization. More...
 
class  clang::TypeWithKeyword
 A helper class for Type nodes having an ElaboratedTypeKeyword. More...
 
class  clang::TypeWithKeyword::CannotCastToThisType
 
class  clang::ElaboratedType
 Represents a type that was referred to using an elaborated type keyword, e.g., struct S, or via a qualified name, e.g., N::M::type, or both. More...
 
class  clang::DependentNameType
 Represents a qualified type name for which the type name is dependent. More...
 
class  clang::DependentTemplateSpecializationType
 Represents a template specialization type whose template cannot be resolved, e.g. More...
 
class  clang::PackExpansionType
 Represents a pack expansion of types. More...
 
class  clang::ObjCProtocolQualifiers< T >
 This class wraps the list of protocol qualifiers. More...
 
class  clang::ObjCTypeParamType
 Represents a type parameter type in Objective C. More...
 
class  clang::ObjCObjectType
 Represents a class type in Objective C. More...
 
class  clang::ObjCObjectTypeImpl
 A class providing a concrete implementation of ObjCObjectType, so as to not increase the footprint of ObjCInterfaceType. More...
 
class  clang::ObjCInterfaceType
 Interfaces are the core concept in Objective-C for object oriented design. More...
 
class  clang::ObjCObjectPointerType
 Represents a pointer to an Objective C object. More...
 
class  clang::AtomicType
 
class  clang::PipeType
 PipeType - OpenCL20. More...
 
class  clang::QualifierCollector
 A qualifier set is used to build a set of qualifiers. More...
 

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 llvm
 DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterators.
 

Macros

#define TYPE(Class, Base)   class Class##Type;
 
#define TYPE(Class, Base)   Class,
 
#define LAST_TYPE(Class)   TypeLast = Class,
 
#define ABSTRACT_TYPE(Class, Base)
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)   bool is##Id##Type() const;
 
#define TYPE(Class, Base)
 
#define LEAF_TYPE(Class)
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)   Id,
 
#define BUILTIN_TYPE(Id, SingletonId)   Id,
 
#define LAST_BUILTIN_TYPE(Id)   LastKind = Id
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)   is##Id##Type() ||
 

Typedefs

template<typename T >
using clang::TypeIsArrayType = std::integral_constant< bool, std::is_same< T, ArrayType >::value||std::is_base_of< ArrayType, T >::value >
 

Enumerations

enum  { clang::TypeAlignmentInBits = 4, clang::TypeAlignment = 1 << TypeAlignmentInBits }
 
enum  clang::ObjCSubstitutionContext {
  clang::ObjCSubstitutionContext::Ordinary, clang::ObjCSubstitutionContext::Result, clang::ObjCSubstitutionContext::Parameter, clang::ObjCSubstitutionContext::Property,
  clang::ObjCSubstitutionContext::Superclass
}
 The kind of type we are substituting Objective-C type arguments into. More...
 
enum  clang::RefQualifierKind { clang::RQ_None = 0, clang::RQ_LValue, clang::RQ_RValue }
 The kind of C++11 ref-qualifier associated with a function type. More...
 
enum  clang::AutoTypeKeyword { clang::AutoTypeKeyword::Auto, clang::AutoTypeKeyword::DecltypeAuto, clang::AutoTypeKeyword::GNUAutoType }
 Which keyword(s) were used to create an AutoType. More...
 
enum  clang::TagTypeKind {
  clang::TTK_Struct, clang::TTK_Interface, clang::TTK_Union, clang::TTK_Class,
  clang::TTK_Enum
}
 The kind of a tag type. More...
 
enum  clang::ElaboratedTypeKeyword {
  clang::ETK_Struct, clang::ETK_Interface, clang::ETK_Union, clang::ETK_Class,
  clang::ETK_Enum, clang::ETK_Typename, clang::ETK_None
}
 The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifier. More...
 

Functions

FunctionType::ExtInfo clang::getFunctionExtInfo (const Type &t)
 
FunctionType::ExtInfo clang::getFunctionExtInfo (QualType t)
 
bool clang::IsEnumDeclComplete (EnumDecl *ED)
 Check if the given decl is complete. More...
 
bool clang::IsEnumDeclScoped (EnumDecl *ED)
 Check if the given decl is scoped. More...
 
const DiagnosticBuilder & clang::operator<< (const DiagnosticBuilder &DB, QualType T)
 Insertion operator for diagnostics. More...
 
const PartialDiagnostic & clang::operator<< (const PartialDiagnostic &PD, QualType T)
 Insertion operator for partial diagnostics. More...
 

Detailed Description

C Language Family Type Representation.

This file defines the clang::Type interface and subclasses, used to represent types for languages in the C family.

Definition in file Type.h.

Macro Definition Documentation

◆ ABSTRACT_TYPE

#define ABSTRACT_TYPE (   Class,
  Base 
)

Definition at line 1311 of file Type.h.

◆ BUILTIN_TYPE

#define BUILTIN_TYPE (   Id,
  SingletonId 
)    Id,

Definition at line 2095 of file Type.h.

◆ IMAGE_TYPE [1/4]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)    bool is##Id##Type() const;

Definition at line 5890 of file Type.h.

◆ IMAGE_TYPE [2/4]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)    Id,

Definition at line 5890 of file Type.h.

◆ IMAGE_TYPE [3/4]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)
Value:
inline bool Type::is##Id##Type() const { \
return isSpecificBuiltinType(BuiltinType::Id); \
}
int Id
Definition: ASTDiff.cpp:191
The l-value was considered opaque, so the alignment was determined from a type.

Definition at line 5890 of file Type.h.

◆ IMAGE_TYPE [4/4]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)    is##Id##Type() ||

Definition at line 5890 of file Type.h.

◆ LAST_BUILTIN_TYPE

#define LAST_BUILTIN_TYPE (   Id)    LastKind = Id

Definition at line 2096 of file Type.h.

◆ LAST_TYPE

#define LAST_TYPE (   Class)    TypeLast = Class,

Definition at line 1310 of file Type.h.

◆ LEAF_TYPE

#define LEAF_TYPE (   Class)
Value:
template <> inline const Class##Type *Type::getAs() const { \
return dyn_cast<Class##Type>(CanonicalType); \
} \
template <> inline const Class##Type *Type::castAs() const { \
return cast<Class##Type>(CanonicalType); \
}
The l-value was considered opaque, so the alignment was determined from a type.

Definition at line 2076 of file Type.h.

◆ TYPE [1/3]

#define TYPE (   Class,
  Base 
)    class Class##Type;

Definition at line 2075 of file Type.h.

◆ TYPE [2/3]

#define TYPE (   Class,
  Base 
)    Class,

Definition at line 2075 of file Type.h.

◆ TYPE [3/3]

#define TYPE (   Class,
  Base 
)

Definition at line 2075 of file Type.h.