clang  6.0.0svn
Macros | Enumerations | Functions
ASTContext.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "CXXABI.h"
#include "clang/AST/APValue.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Attr.h"
#include "clang/AST/AttrIterator.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/Comment.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclContextInternals.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExternalASTSource.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/MangleNumberingContext.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/RawCommentList.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/UnresolvedSet.h"
#include "clang/AST/VTableBuilder.h"
#include "clang/Basic/AddressSpaces.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/CommentOptions.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Linkage.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/SanitizerBlacklist.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/TargetCXXABI.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/XRayLists.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Support/Capacity.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <map>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include "clang/AST/TypeNodes.def"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/AST/BuiltinTypes.def"

Go to the source code of this file.

Macros

#define TYPE(Name, Parent)   0,
 
#define ABSTRACT_TYPE(Name, Parent)
 
#define TYPE(Name, Parent)
 
#define ABSTRACT_TYPE(Name, Parent)
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)   InitBuiltinType(SingletonId, BuiltinType::Id);
 
#define TYPE(Class, Base)
 
#define ABSTRACT_TYPE(Class, Base)
 
#define NON_CANONICAL_TYPE(Class, Base)
 
#define DEPENDENT_TYPE(Class, Base)   case Type::Class:
 
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)   case BuiltinType::Id:
 
#define TYPE(Class, Base)
 
#define ABSTRACT_TYPE(Class, Base)
 
#define NON_CANONICAL_TYPE(Class, Base)   case Type::Class:
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)   case BuiltinType::Id:
 
#define BUILTIN_TYPE(KIND, ID)
 
#define PLACEHOLDER_TYPE(KIND, ID)   case BuiltinType::KIND:
 
#define ABSTRACT_TYPE(KIND, BASE)
 
#define TYPE(KIND, BASE)
 
#define DEPENDENT_TYPE(KIND, BASE)   case Type::KIND:
 
#define NON_CANONICAL_TYPE(KIND, BASE)   case Type::KIND:
 
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(KIND, BASE)   case Type::KIND:
 
#define TYPE(Class, Base)
 
#define ABSTRACT_TYPE(Class, Base)
 
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)   case Type::Class:
 
#define NON_CANONICAL_TYPE(Class, Base)   case Type::Class:
 
#define DEPENDENT_TYPE(Class, Base)   case Type::Class:
 

Enumerations

enum  FloatingRank {
  Float16Rank, HalfRank, FloatRank, DoubleRank,
  LongDoubleRank, Float128Rank
}
 

Functions

static const DecladjustDeclToTemplate (const Decl *D)
 If we have a 'templated' declaration for a template, adjust 'D' to refer to the actual template. More...
 
static void addRedeclaredMethods (const ObjCMethodDecl *ObjCMethod, SmallVectorImpl< const NamedDecl *> &Redeclared)
 
static const LangASMap * getAddressSpaceMap (const TargetInfo &T, const LangOptions &LOpts)
 
static bool isAddrSpaceMapManglingEnabled (const TargetInfo &TI, const LangOptions &LangOpts)
 
static std::pair< CharUnits, CharUnitsgetConstantArrayInfoInChars (const ASTContext &Context, const ConstantArrayType *CAT)
 getConstantArrayInfoInChars - Performing the computation in CharUnits instead of in bits prevents overflowing the uint64_t for some large arrays. More...
 
static bool unionHasUniqueObjectRepresentations (const ASTContext &Context, const RecordDecl *RD)
 
bool isStructEmpty (QualType Ty)
 
static llvm::Optional< int64_t > structHasUniqueObjectRepresentations (const ASTContext &Context, const RecordDecl *RD)
 
static QualType getFunctionTypeWithExceptionSpec (ASTContext &Context, QualType Orig, const FunctionProtoType::ExceptionSpecInfo &ESI)
 Get a function type and produce the equivalent function type with the specified exception specification. More...
 
static bool isCanonicalResultType (QualType T)
 Determine whether T is canonical as the result type of a function. More...
 
static bool isCanonicalExceptionSpecification (const FunctionProtoType::ExceptionSpecInfo &ESI, bool NoexceptInType)
 
static bool NeedsInjectedClassNameType (const RecordDecl *D)
 
static bool hasAnyPackExpansions (ArrayRef< TemplateArgument > Args)
 
static int CmpProtocolNames (ObjCProtocolDecl *const *LHS, ObjCProtocolDecl *const *RHS)
 CmpProtocolNames - Comparison predicate for sorting protocols alphabetically. More...
 
static bool areSortedAndUniqued (ArrayRef< ObjCProtocolDecl *> Protocols)
 
static void SortAndUniqueProtocols (SmallVectorImpl< ObjCProtocolDecl *> &Protocols)
 
static FloatingRank getFloatingRank (QualType T)
 getFloatingRank - Return a relative rank for floating point types. More...
 
static const TypegetIntegerTypeForEnum (const EnumType *ET)
 
static bool isTypeTypedefedAsBOOL (QualType T)
 
static std::string charUnitsToString (const CharUnits &CU)
 
static char getObjCEncodingForPrimitiveKind (const ASTContext *C, BuiltinType::Kind kind)
 
static char ObjCEncodingForEnumType (const ASTContext *C, const EnumType *ET)
 
static void EncodeBitField (const ASTContext *Ctx, std::string &S, QualType T, const FieldDecl *FD)
 
static TypedefDeclCreateCharPtrNamedVaListDecl (const ASTContext *Context, StringRef Name)
 
static TypedefDeclCreateMSVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateCharPtrBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateVoidPtrBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateAArch64ABIBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreatePowerABIBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateX86_64ABIBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreatePNaClABIBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateAAPCSABIBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateSystemZBuiltinVaListDecl (const ASTContext *Context)
 
static TypedefDeclCreateVaListDecl (const ASTContext *Context, TargetInfo::BuiltinVaListKind Kind)
 
static bool areCompatVectorTypes (const VectorType *LHS, const VectorType *RHS)
 areCompatVectorTypes - Return true if the two specified vector types are compatible. More...
 
static int compareObjCProtocolsByName (ObjCProtocolDecl *const *lhs, ObjCProtocolDecl *const *rhs)
 Comparison routine for Objective-C protocols to be used with llvm::array_pod_sort. More...
 
static void getIntersectionOfProtocols (ASTContext &Context, const ObjCInterfaceDecl *CommonBase, const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT, SmallVectorImpl< ObjCProtocolDecl *> &IntersectionSet)
 getIntersectionOfProtocols - This routine finds the intersection of set of protocols inherited from two distinct objective-c pointer objects with the given common base. More...
 
static bool canAssignObjCObjectTypes (ASTContext &ctx, QualType lhs, QualType rhs)
 Determine whether the first type is a subtype of the second. More...
 
static bool sameObjCTypeArgs (ASTContext &ctx, const ObjCInterfaceDecl *iface, ArrayRef< QualType > lhsArgs, ArrayRef< QualType > rhsArgs, bool stripKindOf)
 
static QualType mergeEnumWithInteger (ASTContext &Context, const EnumType *ET, QualType other, bool isBlockReturnType)
 Given that we have an enum type and a non-enum type, try to merge them. More...
 
static QualType DecodeTypeFromStr (const char *&Str, const ASTContext &Context, ASTContext::GetBuiltinTypeError &Error, bool &RequiresICE, bool AllowTypeModifiers)
 DecodeTypeFromStr - This decodes one type descriptor from Str, advancing the pointer over the consumed characters. More...
 
static GVALinkage basicGVALinkageForFunction (const ASTContext &Context, const FunctionDecl *FD)
 
static GVALinkage adjustGVALinkageForAttributes (const ASTContext &Context, const Decl *D, GVALinkage L)
 
static GVALinkage adjustGVALinkageForExternalDefinitionKind (const ASTContext &Ctx, const Decl *D, GVALinkage L)
 Adjust the GVALinkage for a declaration based on what an external AST source knows about whether there can be other definitions of this declaration. More...
 
static GVALinkage basicGVALinkageForVariable (const ASTContext &Context, const VarDecl *VD)
 
static ast_type_traits::DynTypedNode getSingleDynTypedNodeFromParentMap (ASTContext::ParentMapPointers::mapped_type U)
 
template<typename NodeTy , typename MapTy >
static ASTContext::DynTypedNodeList getDynNodeFromMap (const NodeTy &Node, const MapTy &Map)
 

Macro Definition Documentation

◆ ABSTRACT_TYPE [1/6]

#define ABSTRACT_TYPE (   Name,
  Parent 
)

◆ ABSTRACT_TYPE [2/6]

#define ABSTRACT_TYPE (   Name,
  Parent 
)

◆ ABSTRACT_TYPE [3/6]

#define ABSTRACT_TYPE (   Class,
  Base 
)

◆ ABSTRACT_TYPE [4/6]

#define ABSTRACT_TYPE (   Class,
  Base 
)

◆ ABSTRACT_TYPE [5/6]

#define ABSTRACT_TYPE (   KIND,
  BASE 
)

◆ ABSTRACT_TYPE [6/6]

#define ABSTRACT_TYPE (   Class,
  Base 
)

◆ BUILTIN_TYPE

#define BUILTIN_TYPE (   KIND,
  ID 
)

◆ DEPENDENT_TYPE [1/3]

#define DEPENDENT_TYPE (   Class,
  Base 
)    case Type::Class:

◆ DEPENDENT_TYPE [2/3]

#define DEPENDENT_TYPE (   KIND,
  BASE 
)    case Type::KIND:

◆ DEPENDENT_TYPE [3/3]

#define DEPENDENT_TYPE (   Class,
  Base 
)    case Type::Class:

◆ IMAGE_TYPE [1/4]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)    InitBuiltinType(SingletonId, BuiltinType::Id);

◆ IMAGE_TYPE [2/4]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)    case BuiltinType::Id:

◆ IMAGE_TYPE [3/4]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)
Value:
return TargetInfo::OCLTK_Image;
int Id
Definition: ASTDiff.cpp:191

◆ IMAGE_TYPE [4/4]

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)    case BuiltinType::Id:

◆ NON_CANONICAL_TYPE [1/4]

#define NON_CANONICAL_TYPE (   Class,
  Base 
)

◆ NON_CANONICAL_TYPE [2/4]

#define NON_CANONICAL_TYPE (   Class,
  Base 
)    case Type::Class:

◆ NON_CANONICAL_TYPE [3/4]

#define NON_CANONICAL_TYPE (   KIND,
  BASE 
)    case Type::KIND:

◆ NON_CANONICAL_TYPE [4/4]

#define NON_CANONICAL_TYPE (   Class,
  Base 
)    case Type::Class:

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [1/3]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE (   Class,
  Base 
)
Value:
case Type::Class: \
assert(!T->isDependentType() && "should not see dependent types here"); \
return getTypeInfo(cast<Class##Type>(T)->desugar().getTypePtr());
const FunctionProtoType * T
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
Definition: Type.h:1860

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [2/3]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE (   KIND,
  BASE 
)    case Type::KIND:

◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [3/3]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE (   Class,
  Base 
)    case Type::Class:

◆ PLACEHOLDER_TYPE

#define PLACEHOLDER_TYPE (   KIND,
  ID 
)    case BuiltinType::KIND:

◆ TYPE [1/6]

#define TYPE (   Name,
  Parent 
)    0,

◆ TYPE [2/6]

#define TYPE (   Name,
  Parent 
)
Value:
if (counts[Idx]) \
llvm::errs() << " " << counts[Idx] << " " << #Name \
<< " types\n"; \
TotalBytes += counts[Idx] * sizeof(Name##Type); \
++Idx;
The base class of the type hierarchy.
Definition: Type.h:1353

◆ TYPE [3/6]

#define TYPE (   Class,
  Base 
)

◆ TYPE [4/6]

#define TYPE (   Class,
  Base 
)

◆ TYPE [5/6]

#define TYPE (   KIND,
  BASE 
)

◆ TYPE [6/6]

#define TYPE (   Class,
  Base 
)

Enumeration Type Documentation

◆ FloatingRank

Enumerator
Float16Rank 
HalfRank 
FloatRank 
DoubleRank 
LongDoubleRank 
Float128Rank 

Definition at line 109 of file ASTContext.cpp.

Function Documentation

◆ addRedeclaredMethods()

static void addRedeclaredMethods ( const ObjCMethodDecl ObjCMethod,
SmallVectorImpl< const NamedDecl *> &  Redeclared 
)
static

◆ adjustDeclToTemplate()

static const Decl* adjustDeclToTemplate ( const Decl D)
static

If we have a 'templated' declaration for a template, adjust 'D' to refer to the actual template.

If we have an implicit instantiation, adjust 'D' to refer to template.

Definition at line 312 of file ASTContext.cpp.

References clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplateOrPartial(), and clang::TSK_ImplicitInstantiation.

Referenced by clang::ASTContext::getCommentForDecl(), and clang::ASTContext::getRawCommentForAnyRedecl().

◆ adjustGVALinkageForAttributes()

static GVALinkage adjustGVALinkageForAttributes ( const ASTContext Context,
const Decl D,
GVALinkage  L 
)
static

◆ adjustGVALinkageForExternalDefinitionKind()

static GVALinkage adjustGVALinkageForExternalDefinitionKind ( const ASTContext Ctx,
const Decl D,
GVALinkage  L 
)
static

◆ areCompatVectorTypes()

static bool areCompatVectorTypes ( const VectorType LHS,
const VectorType RHS 
)
static

areCompatVectorTypes - Return true if the two specified vector types are compatible.

Definition at line 7490 of file ASTContext.cpp.

References clang::VectorType::getElementType(), clang::VectorType::getNumElements(), and clang::Type::isCanonicalUnqualified().

Referenced by clang::ASTContext::mergeTypes().

◆ areSortedAndUniqued()

static bool areSortedAndUniqued ( ArrayRef< ObjCProtocolDecl *>  Protocols)
static

Definition at line 4218 of file ASTContext.cpp.

References CmpProtocolNames(), and getCanonicalDecl().

Referenced by clang::ASTContext::getObjCObjectType().

◆ basicGVALinkageForFunction()

static GVALinkage basicGVALinkageForFunction ( const ASTContext Context,
const FunctionDecl FD 
)
static

Definition at line 9189 of file ASTContext.cpp.

Referenced by clang::ASTContext::GetGVALinkageForFunction().

◆ basicGVALinkageForVariable()

static GVALinkage basicGVALinkageForVariable ( const ASTContext Context,
const VarDecl VD 
)
static

Definition at line 9302 of file ASTContext.cpp.

Referenced by clang::ASTContext::GetGVALinkageForVariable().

◆ canAssignObjCObjectTypes()

static bool canAssignObjCObjectTypes ( ASTContext ctx,
QualType  lhs,
QualType  rhs 
)
static

Determine whether the first type is a subtype of the second.

Definition at line 7855 of file ASTContext.cpp.

References clang::ASTContext::canAssignObjCInterfaces(), clang::Type::getAs(), clang::ObjCObjectPointerType::isObjCIdType(), and clang::ASTContext::typesAreBlockPointerCompatible().

Referenced by sameObjCTypeArgs().

◆ charUnitsToString()

static std::string charUnitsToString ( const CharUnits CU)
inlinestatic

Definition at line 5891 of file ASTContext.cpp.

References clang::CharUnits::getQuantity().

◆ CmpProtocolNames()

static int CmpProtocolNames ( ObjCProtocolDecl *const *  LHS,
ObjCProtocolDecl *const *  RHS 
)
static

CmpProtocolNames - Comparison predicate for sorting protocols alphabetically.

Definition at line 4213 of file ASTContext.cpp.

References clang::DeclarationName::compare().

Referenced by areSortedAndUniqued(), and SortAndUniqueProtocols().

◆ compareObjCProtocolsByName()

static int compareObjCProtocolsByName ( ObjCProtocolDecl *const *  lhs,
ObjCProtocolDecl *const *  rhs 
)
static

Comparison routine for Objective-C protocols to be used with llvm::array_pod_sort.

Definition at line 7783 of file ASTContext.cpp.

◆ CreateAAPCSABIBuiltinVaListDecl()

static TypedefDecl* CreateAAPCSABIBuiltinVaListDecl ( const ASTContext Context)
static

Definition at line 7117 of file ASTContext.cpp.

◆ CreateAArch64ABIBuiltinVaListDecl()

static TypedefDecl* CreateAArch64ABIBuiltinVaListDecl ( const ASTContext Context)
static

Definition at line 6928 of file ASTContext.cpp.

◆ CreateCharPtrBuiltinVaListDecl()

static TypedefDecl* CreateCharPtrBuiltinVaListDecl ( const ASTContext Context)
static

Definition at line 6917 of file ASTContext.cpp.

◆ CreateCharPtrNamedVaListDecl()

static TypedefDecl* CreateCharPtrNamedVaListDecl ( const ASTContext Context,
StringRef  Name 
)
static

Definition at line 6906 of file ASTContext.cpp.

◆ CreateMSVaListDecl()

static TypedefDecl* CreateMSVaListDecl ( const ASTContext Context)
static

Definition at line 6913 of file ASTContext.cpp.

Referenced by clang::ASTContext::getBuiltinMSVaListDecl().

◆ CreatePNaClABIBuiltinVaListDecl()

static TypedefDecl* CreatePNaClABIBuiltinVaListDecl ( const ASTContext Context)
static

Definition at line 7108 of file ASTContext.cpp.

◆ CreatePowerABIBuiltinVaListDecl()

static TypedefDecl* CreatePowerABIBuiltinVaListDecl ( const ASTContext Context)
static

Definition at line 6991 of file ASTContext.cpp.

◆ CreateSystemZBuiltinVaListDecl()

static TypedefDecl* CreateSystemZBuiltinVaListDecl ( const ASTContext Context)
static

Definition at line 7158 of file ASTContext.cpp.

◆ CreateVaListDecl()

static TypedefDecl* CreateVaListDecl ( const ASTContext Context,
TargetInfo::BuiltinVaListKind  Kind 
)
static

Definition at line 7212 of file ASTContext.cpp.

Referenced by clang::ASTContext::getBuiltinVaListDecl().

◆ CreateVoidPtrBuiltinVaListDecl()

static TypedefDecl* CreateVoidPtrBuiltinVaListDecl ( const ASTContext Context)
static

Definition at line 6921 of file ASTContext.cpp.

◆ CreateX86_64ABIBuiltinVaListDecl()

static TypedefDecl* CreateX86_64ABIBuiltinVaListDecl ( const ASTContext Context)
static

Definition at line 7055 of file ASTContext.cpp.

◆ DecodeTypeFromStr()

static QualType DecodeTypeFromStr ( const char *&  Str,
const ASTContext Context,
ASTContext::GetBuiltinTypeError Error,
bool RequiresICE,
bool  AllowTypeModifiers 
)
static

DecodeTypeFromStr - This decodes one type descriptor from Str, advancing the pointer over the consumed characters.

This returns the resultant type. If AllowTypeModifiers is false then modifier like * are not parsed, just basic types. This allows "v2i*" to be parsed as a pointer to a v2i instead of a vector of "i*".

RequiresICE is filled in on return to indicate whether the value is required to be an Integer Constant Expression.

Definition at line 8855 of file ASTContext.cpp.

Referenced by clang::ASTContext::GetBuiltinType().

◆ EncodeBitField()

static void EncodeBitField ( const ASTContext Ctx,
std::string &  S,
QualType  T,
const FieldDecl FD 
)
static

Definition at line 6285 of file ASTContext.cpp.

◆ getAddressSpaceMap()

static const LangASMap* getAddressSpaceMap ( const TargetInfo T,
const LangOptions LOpts 
)
static

◆ getConstantArrayInfoInChars()

static std::pair<CharUnits, CharUnits> getConstantArrayInfoInChars ( const ASTContext Context,
const ConstantArrayType CAT 
)
static

getConstantArrayInfoInChars - Performing the computation in CharUnits instead of in bits prevents overflowing the uint64_t for some large arrays.

Definition at line 1590 of file ASTContext.cpp.

Referenced by clang::ASTContext::getTypeInfoInChars().

◆ getDynNodeFromMap()

template<typename NodeTy , typename MapTy >
static ASTContext::DynTypedNodeList getDynNodeFromMap ( const NodeTy &  Node,
const MapTy Map 
)
static

Definition at line 9879 of file ASTContext.cpp.

Referenced by clang::ASTContext::getParents().

◆ getFloatingRank()

static FloatingRank getFloatingRank ( QualType  T)
static

getFloatingRank - Return a relative rank for floating point types.

This routine will assert if passed a built-in type that isn't a float.

Definition at line 5313 of file ASTContext.cpp.

References DoubleRank, Float128Rank, Float16Rank, FloatRank, clang::Type::getAs(), clang::BuiltinType::getKind(), HalfRank, and LongDoubleRank.

Referenced by clang::ASTContext::getFloatingTypeOfSizeWithinDomain(), and clang::ASTContext::getFloatingTypeOrder().

◆ getFunctionTypeWithExceptionSpec()

static QualType getFunctionTypeWithExceptionSpec ( ASTContext Context,
QualType  Orig,
const FunctionProtoType::ExceptionSpecInfo ESI 
)
static

Get a function type and produce the equivalent function type with the specified exception specification.

Type sugar that can be present on a declaration of a function with an exception specification is permitted and preserved. Other type sugar (for instance, typedefs) is not.

Definition at line 2593 of file ASTContext.cpp.

Referenced by clang::ASTContext::adjustExceptionSpec(), and clang::ASTContext::hasSameFunctionTypeIgnoringExceptionSpec().

◆ getIntegerTypeForEnum()

static const Type* getIntegerTypeForEnum ( const EnumType ET)
static

◆ getIntersectionOfProtocols()

static void getIntersectionOfProtocols ( ASTContext Context,
const ObjCInterfaceDecl CommonBase,
const ObjCObjectPointerType LHSOPT,
const ObjCObjectPointerType RHSOPT,
SmallVectorImpl< ObjCProtocolDecl *> &  IntersectionSet 
)
static

getIntersectionOfProtocols - This routine finds the intersection of set of protocols inherited from two distinct objective-c pointer objects with the given common base.

It is used to build composite qualifier list of the composite type of the conditional expression involving two objective-c pointer objects.

Definition at line 7794 of file ASTContext.cpp.

Referenced by clang::ASTContext::areCommonBaseCompatible().

◆ getObjCEncodingForPrimitiveKind()

static char getObjCEncodingForPrimitiveKind ( const ASTContext C,
BuiltinType::Kind  kind 
)
static

◆ getSingleDynTypedNodeFromParentMap()

static ast_type_traits::DynTypedNode getSingleDynTypedNodeFromParentMap ( ASTContext::ParentMapPointers::mapped_type  U)
static

Definition at line 9722 of file ASTContext.cpp.

References clang::ast_type_traits::DynTypedNode::create(), Node, and clang::T.

◆ hasAnyPackExpansions()

static bool hasAnyPackExpansions ( ArrayRef< TemplateArgument Args)
static

Definition at line 3901 of file ASTContext.cpp.

Referenced by clang::ASTContext::getTemplateSpecializationType().

◆ isAddrSpaceMapManglingEnabled()

static bool isAddrSpaceMapManglingEnabled ( const TargetInfo TI,
const LangOptions LangOpts 
)
static

◆ isCanonicalExceptionSpecification()

static bool isCanonicalExceptionSpecification ( const FunctionProtoType::ExceptionSpecInfo ESI,
bool  NoexceptInType 
)
static

◆ isCanonicalResultType()

static bool isCanonicalResultType ( QualType  T)
static

◆ isStructEmpty()

bool isStructEmpty ( QualType  Ty)

Definition at line 2159 of file ASTContext.cpp.

References clang::Type::castAs(), and clang::RecordDecl::field_empty().

◆ isTypeTypedefedAsBOOL()

static bool isTypeTypedefedAsBOOL ( QualType  T)
static

Definition at line 5837 of file ASTContext.cpp.

◆ mergeEnumWithInteger()

static QualType mergeEnumWithInteger ( ASTContext Context,
const EnumType ET,
QualType  other,
bool  isBlockReturnType 
)
static

Given that we have an enum type and a non-enum type, try to merge them.

Definition at line 8355 of file ASTContext.cpp.

Referenced by clang::ASTContext::mergeTypes().

◆ NeedsInjectedClassNameType()

static bool NeedsInjectedClassNameType ( const RecordDecl D)
static

◆ ObjCEncodingForEnumType()

static char ObjCEncodingForEnumType ( const ASTContext C,
const EnumType ET 
)
static

◆ sameObjCTypeArgs()

static bool sameObjCTypeArgs ( ASTContext ctx,
const ObjCInterfaceDecl iface,
ArrayRef< QualType lhsArgs,
ArrayRef< QualType rhsArgs,
bool  stripKindOf 
)
static

◆ SortAndUniqueProtocols()

static void SortAndUniqueProtocols ( SmallVectorImpl< ObjCProtocolDecl *> &  Protocols)
static

Definition at line 4232 of file ASTContext.cpp.

References CmpProtocolNames(), and P.

Referenced by clang::ASTContext::getObjCObjectType().

◆ structHasUniqueObjectRepresentations()

static llvm::Optional<int64_t> structHasUniqueObjectRepresentations ( const ASTContext Context,
const RecordDecl RD 
)
static

Definition at line 2172 of file ASTContext.cpp.

Referenced by clang::ASTContext::hasUniqueObjectRepresentations().

◆ unionHasUniqueObjectRepresentations()

static bool unionHasUniqueObjectRepresentations ( const ASTContext Context,
const RecordDecl RD 
)
static

Definition at line 2144 of file ASTContext.cpp.

Referenced by clang::ASTContext::hasUniqueObjectRepresentations().