clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends
clang::Sema Class Reference

Sema - This implements semantic analysis and AST building for C. More...

#include <Sema.h>

Collaboration diagram for clang::Sema:
Collaboration graph
[legend]

List of all members.

Classes

struct  ActiveTemplateInstantiation
 A template instantiation that is currently in progress. More...
struct  ActOnMemberAccessExtraArgs
class  ArgumentPackSubstitutionIndexRAII
 RAII object used to change the argument pack substitution index within a Sema object. More...
class  BoundTypeDiagnoser1
class  BoundTypeDiagnoser2
class  BoundTypeDiagnoser3
struct  CodeCompleteExpressionData
class  CompoundScopeRAII
 A RAII object to enter scope of a compound statement. More...
class  ContextRAII
 A RAII object to temporarily push a declaration context. More...
class  ContextualImplicitConverter
 Abstract base class used to perform a contextual implicit conversion from an expression to any type passing a filter. More...
class  CXXThisScopeRAII
 RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers on the current class type. More...
class  DelayedDiagnostics
class  DelayedDiagnosticsState
struct  ExpressionEvaluationContextRecord
 Data structure used to record current or nested expression evaluation contexts. More...
struct  FormatStringInfo
class  FPContractStateRAII
class  FullExprArg
class  ICEConvertDiagnoser
class  ImplicitExceptionSpecification
 Helper class that collects exception specifications for implicitly-declared special member functions. More...
struct  InstantiatingTemplate
 A stack object to be created when performing template instantiation. More...
struct  LateInstantiatedAttribute
class  NameClassification
struct  ObjCArgInfo
struct  OffsetOfComponent
struct  OriginalCallArg
 brief A function argument from which we performed template argument More...
struct  PragmaStack
class  SavePendingInstantiationsAndVTableUsesRAII
class  SavePendingLocalImplicitInstantiationsRAII
struct  SectionInfo
class  SemaDiagnosticBuilder
 Helper class that creates diagnostics with optional template instantiation stacks. More...
class  SFINAETrap
 RAII class used to determine whether SFINAE has trapped any errors that occur during template argument deduction. More...
class  SpecialMemberOverloadResult
class  SynthesizedFunctionScope
 RAII object to handle the state changes required to synthesize a function body. More...
class  TentativeAnalysisScope
 RAII class used to indicate that we are performing provisional semantic analysis to determine the validity of a construct, so typo-correction and diagnostics in the immediate context (not within implicitly-instantiated templates) should be suppressed. More...
struct  TypeDiagnoser
 Abstract class used to diagnose incomplete types. More...
struct  TypeTagData
class  VerifyICEDiagnoser
 Abstract base class used for diagnosing integer constant expression violations. More...

Public Types

enum  PragmaVtorDispKind { PVDK_Push, PVDK_Set, PVDK_Pop, PVDK_Reset }
enum  PragmaMsStackAction {
  PSK_Reset, PSK_Set, PSK_Push, PSK_Push_Set,
  PSK_Pop, PSK_Pop_Set
}
enum  ExpressionEvaluationContext {
  Unevaluated, UnevaluatedAbstract, ConstantEvaluated, PotentiallyEvaluated,
  PotentiallyEvaluatedIfUsed
}
 Describes how the expressions currently being parsed are evaluated at run-time, if at all. More...
enum  CXXSpecialMember {
  CXXDefaultConstructor, CXXCopyConstructor, CXXMoveConstructor, CXXCopyAssignment,
  CXXMoveAssignment, CXXDestructor, CXXInvalid
}
 Kinds of C++ special members. More...
enum  NameClassificationKind {
  NC_Unknown, NC_Error, NC_Keyword, NC_Type,
  NC_Expression, NC_NestedNameSpecifier, NC_TypeTemplate, NC_VarTemplate,
  NC_FunctionTemplate
}
 Describes the result of the name lookup and resolution performed by ClassifyName(). More...
enum  TagUseKind { TUK_Reference, TUK_Declaration, TUK_Definition, TUK_Friend }
enum  AvailabilityMergeKind { AMK_None, AMK_Redeclaration, AMK_Override }
 Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability"). More...
enum  AssignmentAction {
  AA_Assigning, AA_Passing, AA_Returning, AA_Converting,
  AA_Initializing, AA_Sending, AA_Casting, AA_Passing_CFAudited
}
enum  OverloadKind { Ovl_Overload, Ovl_Match, Ovl_NonFunction }
 C++ Overloading. More...
enum  CCEKind { CCEK_CaseValue, CCEK_Enumerator, CCEK_TemplateArg, CCEK_NewExpr }
 Contexts in which a converted constant expression is required. More...
enum  ObjCSubscriptKind { OS_Array, OS_Dictionary, OS_Error }
enum  ObjCLiteralKind {
  LK_Array, LK_Dictionary, LK_Numeric, LK_Boxed,
  LK_String, LK_Block, LK_None
}
enum  ForRangeStatus { FRS_Success, FRS_NoViableFunction, FRS_DiagnosticIssued }
enum  BeginEndFunction { BEF_begin, BEF_end }
enum  MethodMatchStrategy { MMS_loose, MMS_strict }
enum  BuildForRangeKind { BFRK_Build, BFRK_Rebuild, BFRK_Check }
enum  AvailabilityDiagnostic { AD_Deprecation, AD_Unavailable }
enum  ReuseLambdaContextDecl_t { ReuseLambdaContextDecl }
enum  TryCaptureKind { TryCapture_Implicit, TryCapture_ExplicitByVal, TryCapture_ExplicitByRef }
enum  IfExistsResult { IER_Exists, IER_DoesNotExist, IER_Dependent, IER_Error }
 Describes the result of an "if-exists" condition check. More...
enum  AccessResult { AR_accessible, AR_inaccessible, AR_dependent, AR_delayed }
enum  AbstractDiagSelID {
  AbstractNone = -1, AbstractReturnType, AbstractParamType, AbstractVariableType,
  AbstractFieldType, AbstractIvarType, AbstractSynthesizedIvarType, AbstractArrayType
}
enum  TemplateParamListContext {
  TPC_ClassTemplate, TPC_VarTemplate, TPC_FunctionTemplate, TPC_ClassTemplateMember,
  TPC_FriendClassTemplate, TPC_FriendFunctionTemplate, TPC_FriendFunctionTemplateDefinition, TPC_TypeAliasTemplate
}
 The context in which we are checking a template parameter list. More...
enum  CheckTemplateArgumentKind { CTAK_Specified, CTAK_Deduced, CTAK_DeducedFromArrayBound }
 Specifies the context in which a particular template argument is being checked. More...
enum  TemplateParameterListEqualKind { TPL_TemplateMatch, TPL_TemplateTemplateParmMatch, TPL_TemplateTemplateArgumentMatch }
 Enumeration describing how template parameter lists are compared for equality. More...
enum  UnexpandedParameterPackContext {
  UPPC_Expression = 0, UPPC_BaseType, UPPC_DeclarationType, UPPC_DataMemberType,
  UPPC_BitFieldWidth, UPPC_StaticAssertExpression, UPPC_FixedUnderlyingType, UPPC_EnumeratorValue,
  UPPC_UsingDeclaration, UPPC_FriendDeclaration, UPPC_DeclarationQualifier, UPPC_Initializer,
  UPPC_DefaultArgument, UPPC_NonTypeTemplateParameterType, UPPC_ExceptionType, UPPC_PartialSpecialization,
  UPPC_IfExists, UPPC_IfNotExists, UPPC_Lambda, UPPC_Block
}
 The context in which an unexpanded parameter pack is being diagnosed. More...
enum  TemplateDeductionResult {
  TDK_Success = 0, TDK_Invalid, TDK_InstantiationDepth, TDK_Incomplete,
  TDK_Inconsistent, TDK_Underqualified, TDK_SubstitutionFailure, TDK_NonDeducedMismatch,
  TDK_TooManyArguments, TDK_TooFewArguments, TDK_InvalidExplicitArguments, TDK_FailedOverloadResolution,
  TDK_MiscellaneousDeductionFailure
}
 Describes the result of template argument deduction. More...
enum  DeduceAutoResult { DAR_Succeeded, DAR_Failed, DAR_FailedAlreadyDiagnosed }
 Result type of DeduceAutoType. More...
enum  ObjCContainerKind {
  OCK_None = -1, OCK_Interface = 0, OCK_Protocol, OCK_Category,
  OCK_ClassExtension, OCK_Implementation, OCK_CategoryImplementation
}
enum  ObjCSpecialMethodKind {
  OSMK_None, OSMK_Alloc, OSMK_New, OSMK_Copy,
  OSMK_RetainingInit, OSMK_NonRetainingInit
}
enum  ObjCMessageKind { ObjCSuperMessage, ObjCInstanceMessage, ObjCClassMessage }
 Describes the kind of message expression indicated by a message send that starts with an identifier. More...
enum  ResultTypeCompatibilityKind { RTC_Compatible, RTC_Incompatible, RTC_Unknown }
 Describes the compatibility of a result type with its method. More...
enum  PragmaOptionsAlignKind {
  POAK_Native, POAK_Natural, POAK_Packed, POAK_Power,
  POAK_Mac68k, POAK_Reset
}
enum  PragmaPackKind { PPK_Default, PPK_Show, PPK_Push, PPK_Pop }
enum  PragmaMSStructKind { PMSST_OFF, PMSST_ON }
enum  PragmaMSCommentKind {
  PCK_Unknown, PCK_Linker, PCK_Lib, PCK_Compiler,
  PCK_ExeStr, PCK_User
}
enum  PragmaSectionKind { PSK_DataSeg, PSK_BSSSeg, PSK_ConstSeg, PSK_CodeSeg }
enum  PragmaSectionFlag {
  PSF_None = 0, PSF_Read = 0x1, PSF_Write = 0x2, PSF_Execute = 0x4,
  PSF_Implicit = 0x8, PSF_Invalid = 0x80000000U
}
enum  CheckedConversionKind { CCK_ImplicitConversion, CCK_CStyleCast, CCK_FunctionalCast, CCK_OtherCast }
 The kind of conversion being performed. More...
enum  VariadicCallType {
  VariadicFunction, VariadicBlock, VariadicMethod, VariadicConstructor,
  VariadicDoesNotApply
}
enum  VarArgKind { VAK_Valid, VAK_ValidInCXX11, VAK_Undefined, VAK_Invalid }
enum  AssignConvertType {
  Compatible, PointerToInt, IntToPointer, FunctionVoidPointer,
  IncompatiblePointer, IncompatiblePointerSign, CompatiblePointerDiscardsQualifiers, IncompatiblePointerDiscardsQualifiers,
  IncompatibleNestedPointerQualifiers, IncompatibleVectors, IntToBlockPointer, IncompatibleBlockPointer,
  IncompatibleObjCQualifiedId, IncompatibleObjCWeakRef, Incompatible
}
enum  ReferenceCompareResult { Ref_Incompatible = 0, Ref_Related, Ref_Compatible_With_Added_Qualification, Ref_Compatible }
enum  ARCConversionResult { ACR_okay, ACR_unbridged }
enum  CUDAFunctionTarget { CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice }
enum  FormatStringType {
  FST_Scanf, FST_Printf, FST_NSString, FST_Strftime,
  FST_Strfmon, FST_Kprintf, FST_Unknown
}
typedef OpaquePtr< DeclGroupRefDeclGroupPtrTy
typedef OpaquePtr< TemplateNameTemplateTy
typedef OpaquePtr< QualTypeTypeTy
typedef LazyVector
< TypedefNameDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadExtVectorDecls, 2, 2 > 
ExtVectorDeclsType
typedef llvm::SmallSetVector
< const NamedDecl *, 16 > 
NamedDeclSetType
typedef llvm::SmallPtrSet
< const CXXRecordDecl *, 8 > 
RecordDeclSetTy
typedef LazyVector< VarDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadTentativeDefinitions, 2, 2 > 
TentativeDefinitionsType
typedef LazyVector< const
DeclaratorDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 > 
UnusedFileScopedDeclsType
typedef LazyVector
< CXXConstructorDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadDelegatingConstructors, 2, 2 > 
DelegatingCtorDeclsType
typedef llvm::DenseMap< const
FunctionDecl
*, LateParsedTemplate * > 
LateParsedTemplateMapT
typedef void LateTemplateParserCB (void *P, LateParsedTemplate &LPT)
 Callback to the parser to parse templated functions when needed.
typedef DelayedDiagnosticsState ParsingDeclState
typedef DelayedDiagnosticsState ProcessingContextState
typedef llvm::DenseMap
< ParmVarDecl
*, llvm::TinyPtrVector
< ParmVarDecl * > > 
UnparsedDefaultArgInstantiationsMap
typedef std::pair
< ObjCMethodList,
ObjCMethodList
GlobalMethods
typedef llvm::DenseMap
< Selector, GlobalMethods
GlobalMethodPool
typedef std::pair
< CXXRecordDecl
*, CXXSpecialMember
SpecialMemberDecl
typedef llvm::SmallPtrSet
< DeclContext *, 16 > 
AssociatedNamespaceSet
typedef llvm::SmallPtrSet
< CXXRecordDecl *, 16 > 
AssociatedClassSet
typedef llvm::SmallPtrSet
< Selector, 8 > 
SelectorSet
typedef llvm::DenseMap
< Selector, ObjCMethodDecl * > 
ProtocolsMethodsMap
typedef std::pair< StringRef,
QualType
CapturedParamNameType
typedef ProcessingContextState ParsingClassState
typedef std::pair
< CXXRecordDecl
*, SourceLocation
VTableUse
 The list of classes whose vtables have been used within this translation unit, and the source locations at which the first use occurred.
typedef LazyVector
< CXXRecordDecl
*, ExternalSemaSource,&ExternalSemaSource::ReadDynamicClasses, 2, 2 > 
DynamicClassesType
typedef llvm::DenseMap< Decl
*, SmallVector
< PartialDiagnosticAt, 1 > > 
SuppressedDiagnosticsMap
 For each declaration that involved template argument deduction, the set of diagnostics that were suppressed during that template argument deduction.
typedef llvm::DenseMap
< IdentifierInfo
*, TypoCorrection
UnqualifiedTyposCorrectedMap
typedef llvm::SmallSet
< SourceLocation, 2 > 
SrcLocSet
typedef llvm::DenseMap
< IdentifierInfo *, SrcLocSet
IdentifierSourceLocations
typedef std::pair< ValueDecl
*, SourceLocation
PendingImplicitInstantiation
 An entity for which implicit template instantiation is required.
typedef SmallVector
< LateInstantiatedAttribute, 16 > 
LateInstantiatedAttrVec
typedef std::pair< const
IdentifierInfo *, uint64_t > 
TypeTagMagicValue

Public Member Functions

NamedDeclfindLocallyScopedExternCDecl (DeclarationName Name)
 Look for a locally scoped extern "C" declaration by the given name.
void SetLateTemplateParser (LateTemplateParserCB *LTP, void *P)
void LoadExternalWeakUndeclaredIdentifiers ()
 Load weak undeclared identifiers from the external source.
MangleNumberingContextgetCurrentMangleNumberContext (const DeclContext *DC, Decl *&ManglingContextDecl)
 Compute the mangling number context for a lambda expression or block literal.
void getUndefinedButUsed (SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined)
 Obtain a sorted list of functions that are undefined but ODR-used.
void ReadMethodPool (Selector Sel)
 Read the contents of the method pool for a given selector from external storage.
bool isSelfExpr (Expr *RExpr)
 Private Helper predicate to check for 'self'.
bool isSelfExpr (Expr *RExpr, const ObjCMethodDecl *Method)
void EmitCurrentDiagnostic (unsigned DiagID)
 Cause the active diagnostic on the DiagosticsEngine to be emitted. This is closely coupled to the SemaDiagnosticBuilder class and should not be used elsewhere.
void addImplicitTypedef (StringRef Name, QualType T)
 Sema (Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, TranslationUnitKind TUKind=TU_Complete, CodeCompleteConsumer *CompletionConsumer=nullptr)
 ~Sema ()
void Initialize ()
 Perform initialization that occurs after the parser has been initialized but before it parses anything.
const LangOptionsgetLangOpts () const
OpenCLOptionsgetOpenCLOptions ()
FPOptionsgetFPOptions ()
DiagnosticsEnginegetDiagnostics () const
SourceManagergetSourceManager () const
PreprocessorgetPreprocessor () const
ASTContextgetASTContext () const
ASTConsumergetASTConsumer () const
ASTMutationListenergetASTMutationListener () const
ExternalSemaSourcegetExternalSource () const
void addExternalSource (ExternalSemaSource *E)
 Registers an external source. If an external source already exists, creates a multiplex external source and appends to it.
void PrintStats () const
 Print out statistics about the semantic analysis.
SemaDiagnosticBuilder Diag (SourceLocation Loc, unsigned DiagID)
 Emit a diagnostic.
SemaDiagnosticBuilder Diag (SourceLocation Loc, const PartialDiagnostic &PD)
 Emit a partial diagnostic.
PartialDiagnostic PDiag (unsigned DiagID=0)
 Build a partial diagnostic.
bool findMacroSpelling (SourceLocation &loc, StringRef name)
 Looks through the macro-expansion chain for the given location, looking for a macro expansion with the given name. If one is found, returns true and sets the location to that expansion loc.
std::string getFixItZeroInitializerForType (QualType T, SourceLocation Loc) const
 Get a string to suggest for zero-initialization of a type.
std::string getFixItZeroLiteralForType (QualType T, SourceLocation Loc) const
SourceLocation getLocForEndOfToken (SourceLocation Loc, unsigned Offset=0)
 Calls Lexer::getLocForEndOfToken()
ModuleLoadergetModuleLoader () const
 Retrieve the module loader associated with the preprocessor.
void ActOnEndOfTranslationUnit ()
void CheckDelegatingCtorCycles ()
ScopegetScopeForContext (DeclContext *Ctx)
 Determines the active Scope associated with the given declaration context.
void PushFunctionScope ()
 Enter a new function scope.
void PushBlockScope (Scope *BlockScope, BlockDecl *Block)
sema::LambdaScopeInfoPushLambdaScope ()
void RecordParsingTemplateParameterDepth (unsigned Depth)
 This is used to inform Sema what the current TemplateParameterDepth is during Parsing. Currently it is used to pass on the depth when parsing generic lambda 'auto' parameters.
void PushCapturedRegionScope (Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K)
void PopFunctionScopeInfo (const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, const BlockExpr *blkExpr=nullptr)
sema::FunctionScopeInfogetCurFunction () const
sema::FunctionScopeInfogetEnclosingFunction () const
template<typename ExprT >
void recordUseOfEvaluatedWeak (const ExprT *E, bool IsRead=true)
void PushCompoundScope ()
void PopCompoundScope ()
sema::CompoundScopeInfogetCurCompoundScope () const
bool hasAnyUnrecoverableErrorsInThisFunction () const
 Determine whether any errors occurred within this function/method/ block.
sema::BlockScopeInfogetCurBlock ()
 Retrieve the current block, if any.
sema::LambdaScopeInfogetCurLambda ()
 Retrieve the current lambda scope info, if any.
sema::LambdaScopeInfogetCurGenericLambda ()
 Retrieve the current generic lambda info, if any.
sema::CapturedRegionScopeInfogetCurCapturedRegion ()
 Retrieve the current captured region, if any.
SmallVectorImpl< Decl * > & WeakTopLevelDecls ()
 WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
void ActOnComment (SourceRange Comment)
QualType BuildQualifiedType (QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS=nullptr)
QualType BuildQualifiedType (QualType T, SourceLocation Loc, unsigned CVRA, const DeclSpec *DS=nullptr)
QualType BuildPointerType (QualType T, SourceLocation Loc, DeclarationName Entity)
 Build a pointer type.
QualType BuildReferenceType (QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity)
 Build a reference type.
QualType BuildArrayType (QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity)
 Build an array type.
QualType BuildExtVectorType (QualType T, Expr *ArraySize, SourceLocation AttrLoc)
 Build an ext-vector type.
bool CheckFunctionReturnType (QualType T, SourceLocation Loc)
QualType BuildFunctionType (QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI)
 Build a function type.
QualType BuildMemberPointerType (QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity)
 Build a member pointer type T Class::*.
QualType BuildBlockPointerType (QualType T, SourceLocation Loc, DeclarationName Entity)
 Build a block pointer type.
QualType BuildParenType (QualType T)
 Build a paren type including T.
QualType BuildAtomicType (QualType T, SourceLocation Loc)
TypeSourceInfoGetTypeForDeclarator (Declarator &D, Scope *S)
TypeSourceInfoGetTypeForDeclaratorCast (Declarator &D, QualType FromTy)
TypeSourceInfoGetTypeSourceInfoForDeclarator (Declarator &D, QualType T, TypeSourceInfo *ReturnTypeInfo)
 Create and instantiate a TypeSourceInfo with type source information.
ParsedType CreateParsedType (QualType T, TypeSourceInfo *TInfo)
 Package the given type and TSI into a ParsedType.
DeclarationNameInfo GetNameForDeclarator (Declarator &D)
DeclarationNameInfo GetNameFromUnqualifiedId (const UnqualifiedId &Name)
 Retrieves the declaration name from a parsed unqualified-id.
CanThrowResult canThrow (const Expr *E)
const FunctionProtoTypeResolveExceptionSpec (SourceLocation Loc, const FunctionProtoType *FPT)
void UpdateExceptionSpec (FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI)
bool CheckSpecifiedExceptionType (QualType &T, const SourceRange &Range)
bool CheckDistantExceptionSpec (QualType T)
bool CheckEquivalentExceptionSpec (FunctionDecl *Old, FunctionDecl *New)
bool CheckEquivalentExceptionSpec (const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc)
bool CheckEquivalentExceptionSpec (const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc, bool *MissingExceptionSpecification=nullptr, bool *MissingEmptyExceptionSpecification=nullptr, bool AllowNoexceptAllMatchWithNoSpec=false, bool IsOperatorNew=false)
bool CheckExceptionSpecSubset (const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Superset, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc)
bool CheckParamExceptionSpec (const PartialDiagnostic &NoteID, const FunctionProtoType *Target, SourceLocation TargetLoc, const FunctionProtoType *Source, SourceLocation SourceLoc)
TypeResult ActOnTypeName (Scope *S, Declarator &D)
ParsedType ActOnObjCInstanceType (SourceLocation Loc)
 The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration. Return the appropriate type.
bool RequireCompleteType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
 Ensure that the type T is a complete type.
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID)
template<typename T1 >
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1)
template<typename T1 , typename T2 >
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2)
template<typename T1 , typename T2 , typename T3 >
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2, const T3 &Arg3)
bool RequireCompleteExprType (Expr *E, TypeDiagnoser &Diagnoser)
 Ensure that the type of the given expression is complete.
bool RequireCompleteExprType (Expr *E, unsigned DiagID)
template<typename T1 >
bool RequireCompleteExprType (Expr *E, unsigned DiagID, const T1 &Arg1)
template<typename T1 , typename T2 >
bool RequireCompleteExprType (Expr *E, unsigned DiagID, const T1 &Arg1, const T2 &Arg2)
template<typename T1 , typename T2 , typename T3 >
bool RequireCompleteExprType (Expr *E, unsigned DiagID, const T1 &Arg1, const T2 &Arg2, const T3 &Arg3)
bool RequireLiteralType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
 Ensure that the type T is a literal type.
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID)
template<typename T1 >
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1)
template<typename T1 , typename T2 >
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2)
template<typename T1 , typename T2 , typename T3 >
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2, const T3 &Arg3)
QualType getElaboratedType (ElaboratedTypeKeyword Keyword, const CXXScopeSpec &SS, QualType T)
 Retrieve a version of the type 'T' that is elaborated by Keyword and qualified by the nested-name-specifier contained in SS.
QualType BuildTypeofExprType (Expr *E, SourceLocation Loc)
QualType BuildDecltypeType (Expr *E, SourceLocation Loc)
QualType BuildUnaryTransformType (QualType BaseType, UnaryTransformType::UTTKind UKind, SourceLocation Loc)
DeclGroupPtrTy ConvertDeclToDeclGroup (Decl *Ptr, Decl *OwnedType=nullptr)
void DiagnoseUseOfUnimplementedSelectors ()
bool isSimpleTypeSpecifier (tok::TokenKind Kind) const
 Determine whether the token kind starts a simple-type-specifier.
ParsedType getTypeName (const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS=nullptr, bool isClassName=false, bool HasTrailingDot=false, ParsedType ObjectType=ParsedType(), bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, IdentifierInfo **CorrectedII=nullptr)
 If the identifier refers to a type name within this scope, return the declaration of that type.
TypeSpecifierType isTagName (IdentifierInfo &II, Scope *S)
bool isMicrosoftMissingTypename (const CXXScopeSpec *SS, Scope *S)
void DiagnoseUnknownTypeName (IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool AllowClassTemplates=false)
ParsedType ActOnDelayedDefaultTemplateArg (const IdentifierInfo &II, SourceLocation NameLoc)
 For compatibility with MSVC, we delay parsing of some default template type arguments until instantiation time. Emits a warning and returns a synthesized DependentNameType that isn't really dependent on any other template arguments.
NameClassification ClassifyName (Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, bool IsAddressOfOperand, CorrectionCandidateCallback *CCC=nullptr)
 Perform name lookup on the given name, classifying it based on the results of name lookup and the following token.
DeclActOnDeclarator (Scope *S, Declarator &D)
NamedDeclHandleDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
void RegisterLocallyScopedExternCDecl (NamedDecl *ND, Scope *S)
 Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarations. We include any extern "C" declaration that is not visible in the translation unit here, not just function-scope declarations.
bool DiagnoseClassNameShadow (DeclContext *DC, DeclarationNameInfo Info)
bool diagnoseQualifiedDeclaration (CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc)
 Diagnose a declaration whose declarator-id has the given nested-name-specifier.
void diagnoseIgnoredQualifiers (unsigned DiagID, unsigned Quals, SourceLocation FallbackLoc, SourceLocation ConstQualLoc=SourceLocation(), SourceLocation VolatileQualLoc=SourceLocation(), SourceLocation RestrictQualLoc=SourceLocation(), SourceLocation AtomicQualLoc=SourceLocation())
void DiagnoseFunctionSpecifiers (const DeclSpec &DS)
 Diagnose function specifiers on a declaration of an identifier that does not identify a function.
void CheckShadow (Scope *S, VarDecl *D, const LookupResult &R)
 Diagnose variable or built-in function shadowing. Implements.
void CheckShadow (Scope *S, VarDecl *D)
 Check -Wshadow without the advantage of a previous lookup.
void CheckCastAlign (Expr *Op, QualType T, SourceRange TRange)
void CheckTypedefForVariablyModifiedType (Scope *S, TypedefNameDecl *D)
NamedDeclActOnTypedefDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous)
NamedDeclActOnTypedefNameDecl (Scope *S, DeclContext *DC, TypedefNameDecl *D, LookupResult &Previous, bool &Redeclaration)
NamedDeclActOnVariableDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope)
bool CheckVariableDeclaration (VarDecl *NewVD, LookupResult &Previous)
 Perform semantic checking on a newly-created variable declaration.
void CheckVariableDeclarationType (VarDecl *NewVD)
void CheckCompleteVariableDeclaration (VarDecl *var)
void MaybeSuggestAddingStaticToDecl (const FunctionDecl *D)
NamedDeclActOnFunctionDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope)
bool AddOverriddenMethods (CXXRecordDecl *DC, CXXMethodDecl *MD)
bool CheckConstexprFunctionDecl (const FunctionDecl *FD)
bool CheckConstexprFunctionBody (const FunctionDecl *FD, Stmt *Body)
void DiagnoseHiddenVirtualMethods (CXXMethodDecl *MD)
 Diagnose methods which overload virtual methods in a base class without overriding any.
void FindHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
 Check if a method overloads virtual methods in a base class without overriding any.
void NoteHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
bool CheckFunctionDeclaration (Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsExplicitSpecialization)
 Perform semantic checking of a new function declaration.
void CheckMain (FunctionDecl *FD, const DeclSpec &D)
void CheckMSVCRTEntryPoint (FunctionDecl *FD)
DeclActOnParamDeclarator (Scope *S, Declarator &D)
ParmVarDeclBuildParmVarDeclForTypedef (DeclContext *DC, SourceLocation Loc, QualType T)
 Synthesizes a variable for a parameter arising from a typedef.
ParmVarDeclCheckParameter (DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC)
void ActOnParamDefaultArgument (Decl *param, SourceLocation EqualLoc, Expr *defarg)
void ActOnParamUnparsedDefaultArgument (Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc)
void ActOnParamDefaultArgumentError (Decl *param, SourceLocation EqualLoc)
bool SetParamDefaultArgument (ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
void AddInitializerToDecl (Decl *dcl, Expr *init, bool DirectInit, bool TypeMayContainAuto)
void ActOnUninitializedDecl (Decl *dcl, bool TypeMayContainAuto)
void ActOnInitializerError (Decl *Dcl)
void ActOnCXXForRangeDecl (Decl *D)
StmtResult ActOnCXXForRangeIdentifier (Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs, SourceLocation AttrEnd)
void SetDeclDeleted (Decl *dcl, SourceLocation DelLoc)
void SetDeclDefaulted (Decl *dcl, SourceLocation DefaultLoc)
void FinalizeDeclaration (Decl *D)
DeclGroupPtrTy FinalizeDeclaratorGroup (Scope *S, const DeclSpec &DS, ArrayRef< Decl * > Group)
DeclGroupPtrTy BuildDeclaratorGroup (MutableArrayRef< Decl * > Group, bool TypeMayContainAuto=true)
void ActOnDocumentableDecl (Decl *D)
void ActOnDocumentableDecls (ArrayRef< Decl * > Group)
void ActOnFinishKNRParamDeclarations (Scope *S, Declarator &D, SourceLocation LocAfterDecls)
void CheckForFunctionRedefinition (FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr)
DeclActOnStartOfFunctionDef (Scope *S, Declarator &D)
DeclActOnStartOfFunctionDef (Scope *S, Decl *D)
void ActOnStartOfObjCMethodDef (Scope *S, Decl *D)
bool isObjCMethodDecl (Decl *D)
bool canDelayFunctionBody (const Declarator &D)
 Determine whether we can delay parsing the body of a function or function template until it is used, assuming we don't care about emitting code for that function.
bool canSkipFunctionBody (Decl *D)
 Determine whether we can skip parsing the body of a function definition, assuming we don't care about analyzing its body or emitting code for that function.
void computeNRVO (Stmt *Body, sema::FunctionScopeInfo *Scope)
 Given the set of return statements within a function body, compute the variables that are subject to the named return value optimization.
DeclActOnFinishFunctionBody (Decl *Decl, Stmt *Body)
DeclActOnFinishFunctionBody (Decl *Decl, Stmt *Body, bool IsInstantiation)
DeclActOnSkippedFunctionBody (Decl *Decl)
void ActOnFinishInlineMethodDef (CXXMethodDecl *D)
void ActOnFinishDelayedAttribute (Scope *S, Decl *D, ParsedAttributes &Attrs)
void DiagnoseUnusedParameters (ParmVarDecl *const *Begin, ParmVarDecl *const *End)
 Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
void DiagnoseSizeOfParametersAndReturnValue (ParmVarDecl *const *Begin, ParmVarDecl *const *End, QualType ReturnTy, NamedDecl *D)
 Diagnose whether the size of parameters or return value of a function or obj-c method definition is pass-by-value and larger than a specified threshold.
void DiagnoseInvalidJumps (Stmt *Body)
DeclActOnFileScopeAsmDecl (Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc)
DeclActOnEmptyDeclaration (Scope *S, AttributeList *AttrList, SourceLocation SemiLoc)
 Handle a C++11 empty-declaration and attribute-declaration.
DeclResult ActOnModuleImport (SourceLocation AtLoc, SourceLocation ImportLoc, ModuleIdPath Path)
 The parser has processed a module import declaration.
void ActOnModuleInclude (SourceLocation DirectiveLoc, Module *Mod)
 The parser has processed a module import translated from a #include or similar preprocessing directive.
void createImplicitModuleImportForErrorRecovery (SourceLocation Loc, Module *Mod)
 Create an implicit import of the given module at the given source location, for error recovery, if possible.
PrintingPolicy getPrintingPolicy () const
 Retrieve a suitable printing policy.
void ActOnPopScope (SourceLocation Loc, Scope *S)
 Scope actions.
void ActOnTranslationUnitScope (Scope *S)
DeclParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS)
DeclParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation=false)
DeclBuildAnonymousStructOrUnion (Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy)
DeclBuildMicrosoftCAnonymousStruct (Scope *S, DeclSpec &DS, RecordDecl *Record)
bool isAcceptableTagRedeclaration (const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo &Name)
 Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declaration.
DeclActOnTag (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier)
DeclActOnTemplatedFriendTag (Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, MultiTemplateParamsArg TempParamLists)
TypeResult ActOnDependentTag (Scope *S, unsigned TagSpec, TagUseKind TUK, const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation TagLoc, SourceLocation NameLoc)
void ActOnDefs (Scope *S, Decl *TagD, SourceLocation DeclStart, IdentifierInfo *ClassName, SmallVectorImpl< Decl * > &Decls)
DeclActOnField (Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth)
FieldDeclHandleField (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS)
MSPropertyDeclHandleMSProperty (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, AttributeList *MSPropertyAttr)
FieldDeclCheckFieldDecl (DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=nullptr)
 Build a new FieldDecl and check its well-formedness.
bool CheckNontrivialField (FieldDecl *FD)
void DiagnoseNontrivial (const CXXRecordDecl *Record, CXXSpecialMember CSM)
bool SpecialMemberIsTrivial (CXXMethodDecl *MD, CXXSpecialMember CSM, bool Diagnose=false)
CXXSpecialMember getSpecialMember (const CXXMethodDecl *MD)
 getSpecialMember - get the special member enum for a method.
void ActOnLastBitfield (SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls)
DeclActOnIvar (Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind visibility)
void ActOnFields (Scope *S, SourceLocation RecLoc, Decl *TagDecl, ArrayRef< Decl * > Fields, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList)
void ActOnTagStartDefinition (Scope *S, Decl *TagDecl)
DeclActOnObjCContainerStartDefinition (Decl *IDecl)
void ActOnStartCXXMemberDeclarations (Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, SourceLocation LBraceLoc)
void ActOnTagFinishDefinition (Scope *S, Decl *TagDecl, SourceLocation RBraceLoc)
void ActOnObjCContainerFinishDefinition ()
void ActOnObjCTemporaryExitContainerContext (DeclContext *DC)
 Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs.
void ActOnObjCReenterContainerContext (DeclContext *DC)
void ActOnTagDefinitionError (Scope *S, Decl *TagDecl)
EnumConstantDeclCheckEnumConstant (EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *val)
bool CheckEnumUnderlyingType (TypeSourceInfo *TI)
 Check that this is a valid underlying type for an enum declaration.
bool CheckEnumRedeclaration (SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, const EnumDecl *Prev)
DeclActOnEnumConstant (Scope *S, Decl *EnumDecl, Decl *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, AttributeList *Attrs, SourceLocation EqualLoc, Expr *Val)
void ActOnEnumBody (SourceLocation EnumLoc, SourceLocation LBraceLoc, SourceLocation RBraceLoc, Decl *EnumDecl, ArrayRef< Decl * > Elements, Scope *S, AttributeList *Attr)
DeclContextgetContainingDC (DeclContext *DC)
void PushDeclContext (Scope *S, DeclContext *DC)
 Set the current declaration context until it gets popped.
void PopDeclContext ()
void EnterDeclaratorContext (Scope *S, DeclContext *DC)
void ExitDeclaratorContext (Scope *S)
void ActOnReenterFunctionContext (Scope *S, Decl *D)
 Push the parameters of D, which must be a function, into scope.
void ActOnExitFunctionContext ()
DeclContextgetFunctionLevelDeclContext ()
FunctionDeclgetCurFunctionDecl ()
ObjCMethodDeclgetCurMethodDecl ()
NamedDeclgetCurFunctionOrMethodDecl ()
void PushOnScopeChains (NamedDecl *D, Scope *S, bool AddToContext=true)
 Add this decl to the scope shadowed decl chains.
void pushExternalDeclIntoScope (NamedDecl *D, DeclarationName Name)
 Make the given externally-produced declaration visible at the top level scope.
bool isDeclInScope (NamedDecl *D, DeclContext *Ctx, Scope *S=nullptr, bool AllowInlineNamespace=false)
TypedefDeclParseTypedefDecl (Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo)
 Subroutines of ActOnDeclarator().
bool isIncompatibleTypedef (TypeDecl *Old, TypedefNameDecl *New)
AvailabilityAttr * mergeAvailabilityAttr (NamedDecl *D, SourceRange Range, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool Override, unsigned AttrSpellingListIndex)
 Attribute merging methods. Return true if a new attribute was added.
TypeVisibilityAttr * mergeTypeVisibilityAttr (Decl *D, SourceRange Range, TypeVisibilityAttr::VisibilityType Vis, unsigned AttrSpellingListIndex)
VisibilityAttr * mergeVisibilityAttr (Decl *D, SourceRange Range, VisibilityAttr::VisibilityType Vis, unsigned AttrSpellingListIndex)
DLLImportAttr * mergeDLLImportAttr (Decl *D, SourceRange Range, unsigned AttrSpellingListIndex)
DLLExportAttr * mergeDLLExportAttr (Decl *D, SourceRange Range, unsigned AttrSpellingListIndex)
MSInheritanceAttr * mergeMSInheritanceAttr (Decl *D, SourceRange Range, bool BestCase, unsigned AttrSpellingListIndex, MSInheritanceAttr::Spelling SemanticSpelling)
FormatAttr * mergeFormatAttr (Decl *D, SourceRange Range, IdentifierInfo *Format, int FormatIdx, int FirstArg, unsigned AttrSpellingListIndex)
SectionAttr * mergeSectionAttr (Decl *D, SourceRange Range, StringRef Name, unsigned AttrSpellingListIndex)
void mergeDeclAttributes (NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration)
 mergeDeclAttributes - Copy attributes from the Old decl to the New one.
void MergeTypedefNameDecl (TypedefNameDecl *New, LookupResult &OldDecls)
bool MergeFunctionDecl (FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld)
bool MergeCompatibleFunctionDecls (FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld)
 Completes the merge of two function declarations that are known to be compatible.
void mergeObjCMethodDecls (ObjCMethodDecl *New, ObjCMethodDecl *Old)
void MergeVarDecl (VarDecl *New, LookupResult &Previous)
void MergeVarDeclTypes (VarDecl *New, VarDecl *Old, bool MergeTypeWithOld)
void MergeVarDeclExceptionSpecs (VarDecl *New, VarDecl *Old)
 Merge the exception specifications of two variable declarations.
bool MergeCXXFunctionDecl (FunctionDecl *New, FunctionDecl *Old, Scope *S)
OverloadKind CheckOverload (Scope *S, FunctionDecl *New, const LookupResult &OldDecls, NamedDecl *&OldDecl, bool IsForUsingDecl)
bool IsOverload (FunctionDecl *New, FunctionDecl *Old, bool IsForUsingDecl)
bool isFunctionConsideredUnavailable (FunctionDecl *FD)
 Checks availability of the function depending on the current function context.Inside an unavailable function,unavailability is ignored.
ImplicitConversionSequence TryImplicitConversion (Expr *From, QualType ToType, bool SuppressUserConversions, bool AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion)
bool IsIntegralPromotion (Expr *From, QualType FromType, QualType ToType)
bool IsFloatingPointPromotion (QualType FromType, QualType ToType)
bool IsComplexPromotion (QualType FromType, QualType ToType)
 Determine if a conversion is a complex promotion.
bool IsPointerConversion (Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType, bool &IncompatibleObjC)
bool isObjCPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC)
bool isObjCWritebackConversion (QualType FromType, QualType ToType, QualType &ConvertedType)
 Determine whether this is an Objective-C writeback conversion, used for parameter passing when performing automatic reference counting.
bool IsBlockPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType)
bool FunctionParamTypesAreEqual (const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr)
void HandleFunctionTypeMismatch (PartialDiagnostic &PDiag, QualType FromType, QualType ToType)
CastKind PrepareCastToObjCObjectPointer (ExprResult &E)
bool CheckPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
bool IsMemberPointerConversion (Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType)
bool CheckMemberPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
bool IsQualificationConversion (QualType FromType, QualType ToType, bool CStyle, bool &ObjCLifetimeConversion)
bool IsNoReturnConversion (QualType FromType, QualType ToType, QualType &ResultTy)
 Determine whether the conversion from FromType to ToType is a valid conversion that strips "noreturn" off the nested function type.
bool DiagnoseMultipleUserDefinedConversion (Expr *From, QualType ToType)
bool isSameOrCompatibleFunctionType (CanQualType Param, CanQualType Arg)
 Compare types for equality with respect to possibly compatible function types (noreturn adjustment, implicit calling conventions). If any of parameter and argument is not a function, just perform type comparison.
ExprResult PerformMoveOrCopyInitialization (const InitializedEntity &Entity, const VarDecl *NRVOCandidate, QualType ResultType, Expr *Value, bool AllowNRVO=true)
 Perform the initialization of a potentially-movable value, which is the result of return value.
bool CanPerformCopyInitialization (const InitializedEntity &Entity, ExprResult Init)
ExprResult PerformCopyInitialization (const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false, bool AllowExplicit=false)
ExprResult PerformObjectArgumentInitialization (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method)
ExprResult PerformContextuallyConvertToBool (Expr *From)
ExprResult PerformContextuallyConvertToObjCPointer (Expr *From)
ExprResult CheckConvertedConstantExpression (Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
ExprResult PerformContextualImplicitConversion (SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter)
 Perform a contextual implicit conversion.
ObjCSubscriptKind CheckSubscriptingKind (Expr *FromE)
ObjCLiteralKind CheckLiteralKind (Expr *FromE)
ExprResult PerformObjectMemberConversion (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, NamedDecl *Member)
 Cast a base object to a member's actual type.
void AddOverloadCandidate (FunctionDecl *Function, DeclAccessPair FoundDecl, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=false)
void AddFunctionCandidates (const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
 Add all of the function declarations in the given function set to the overload candidate set.
void AddMethodCandidate (DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversion=false)
void AddMethodCandidate (CXXMethodDecl *Method, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false)
void AddMethodTemplateCandidate (FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false)
 Add a C++ member function template as a candidate to the candidate set, using template argument deduction to produce an appropriate member function template specialization.
void AddTemplateOverloadCandidate (FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false)
 Add a C++ function template specialization as a candidate in the candidate set, using template argument deduction to produce an appropriate function template specialization.
void AddConversionCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit)
void AddTemplateConversionCandidate (FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit)
 Adds a conversion function template specialization candidate to the overload set, using template argument deduction to deduce the template arguments of the conversion function template from the type that we are converting to (C++ [temp.deduct.conv]).
void AddSurrogateCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
void AddMemberOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, SourceRange OpRange=SourceRange())
 Add overload candidates for overloaded operators that are member functions.
void AddBuiltinCandidate (QualType ResultTy, QualType *ParamTys, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0)
void AddBuiltinOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
void AddArgumentDependentLookupCandidates (DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
 Add function candidates found via argument-dependent lookup to the set of overloading candidates.
void NoteOverloadCandidate (FunctionDecl *Fn, QualType DestType=QualType())
void NoteAllOverloadCandidates (Expr *E, QualType DestType=QualType())
EnableIfAttr * CheckEnableIf (FunctionDecl *Function, ArrayRef< Expr * > Args, bool MissingImplicitThis=false)
QualType ExtractUnqualifiedFunctionType (QualType PossiblyAFunctionType)
FunctionDeclResolveAddressOfOverloadedFunction (Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr)
FunctionDeclResolveSingleFunctionTemplateSpecialization (OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr)
 Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function.
bool ResolveAndFixSingleFunctionTemplateSpecialization (ExprResult &SrcExpr, bool DoFunctionPointerConverion=false, bool Complain=false, const SourceRange &OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0)
ExprFixOverloadedFunctionReference (Expr *E, DeclAccessPair FoundDecl, FunctionDecl *Fn)
ExprResult FixOverloadedFunctionReference (ExprResult, DeclAccessPair FoundDecl, FunctionDecl *Fn)
void AddOverloadedCallCandidates (UnresolvedLookupExpr *ULE, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
 Add the overload candidates named by callee and/or found by argument dependent lookup to the given overload set.
ForRangeStatus BuildForRangeBeginEndCall (Scope *S, SourceLocation Loc, SourceLocation RangeLoc, VarDecl *Decl, BeginEndFunction BEF, const DeclarationNameInfo &NameInfo, LookupResult &MemberLookup, OverloadCandidateSet *CandidateSet, Expr *Range, ExprResult *CallExpr)
ExprResult BuildOverloadedCallExpr (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true)
bool buildOverloadedCallSet (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, MultiExprArg Args, SourceLocation RParenLoc, OverloadCandidateSet *CandidateSet, ExprResult *Result)
 Constructs and populates an OverloadedCandidateSet from the given function.
ExprResult CreateOverloadedUnaryOp (SourceLocation OpLoc, unsigned Opc, const UnresolvedSetImpl &Fns, Expr *input)
 Create a unary operation that may resolve to an overloaded operator.
ExprResult CreateOverloadedBinOp (SourceLocation OpLoc, unsigned Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS)
 Create a binary operation that may resolve to an overloaded operator.
ExprResult CreateOverloadedArraySubscriptExpr (SourceLocation LLoc, SourceLocation RLoc, Expr *Base, Expr *Idx)
ExprResult BuildCallToMemberFunction (Scope *S, Expr *MemExpr, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
ExprResult BuildCallToObjectOfClassType (Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
ExprResult BuildOverloadedArrowExpr (Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound=nullptr)
bool CheckCallReturnType (QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
bool CheckParmsForFunctionDef (ParmVarDecl *const *Param, ParmVarDecl *const *ParamEnd, bool CheckParameterNames)
 Helpers for dealing with blocks and functions.
void CheckCXXDefaultArguments (FunctionDecl *FD)
void CheckExtraCXXDefaultArguments (Declarator &D)
ScopegetNonFieldDeclScope (Scope *S)
ObjCInterfaceDeclgetObjCInterfaceDecl (IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false)
 Look for an Objective-C class in the translation unit.
NamedDeclLazilyCreateBuiltin (IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc)
NamedDeclImplicitlyDefineFunction (SourceLocation Loc, IdentifierInfo &II, Scope *S)
void AddKnownFunctionAttributes (FunctionDecl *FD)
 Adds any function attributes that we know a priori based on the declaration of this function.
void ProcessPragmaWeak (Scope *S, Decl *D)
void ProcessDeclAttributes (Scope *S, Decl *D, const Declarator &PD)
void ProcessDeclAttributeList (Scope *S, Decl *D, const AttributeList *AL, bool IncludeCXX11Attributes=true)
bool ProcessAccessDeclAttributeList (AccessSpecDecl *ASDecl, const AttributeList *AttrList)
void checkUnusedDeclAttributes (Declarator &D)
bool CheckRegparmAttr (const AttributeList &attr, unsigned &value)
bool CheckCallingConvAttr (const AttributeList &attr, CallingConv &CC, const FunctionDecl *FD=nullptr)
bool CheckNoReturnAttr (const AttributeList &attr)
bool checkStringLiteralArgumentAttr (const AttributeList &Attr, unsigned ArgNum, StringRef &Str, SourceLocation *ArgLocation=nullptr)
 Check if the argument ArgNum of Attr is a ASCII string literal. If not emit an error and return false. If the argument is an identifier it will emit an error with a fixit hint and treat it as if it was a string literal.
bool checkMSInheritanceAttrOnDefinition (CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceAttr::Spelling SemanticSpelling)
void CheckAlignasUnderalignment (Decl *D)
void adjustMemberFunctionCC (QualType &T, bool IsStatic)
bool hasExplicitCallingConv (QualType &T)
const AttributedTypegetCallingConvAttributedType (QualType T) const
StmtResult ProcessStmtAttributes (Stmt *Stmt, AttributeList *Attrs, SourceRange Range)
 Stmt attributes - this routine is the top level dispatcher.
void WarnConflictingTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
void CheckConflictingOverridingMethod (ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl)
void WarnExactTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
void CheckImplementationIvars (ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc)
void ImplMethodsVsClassMethods (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool IncompleteImpl=false)
void DiagnoseUnimplementedProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties)
void DefaultSynthesizeProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl)
 Default synthesizes all properties which must be synthesized in class's @implementation.
void DefaultSynthesizeProperties (Scope *S, Decl *D)
bool IvarBacksCurrentMethodAccessor (ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV)
void DiagnoseUnusedBackingIvarInAccessor (Scope *S, const ObjCImplementationDecl *ImplD)
ObjCIvarDeclGetIvarBackingPropertyAccessor (const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const
ObjCPropertyDeclHandlePropertyInClassExtension (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, Selector SetterSel, const bool isAssign, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, bool *isOverridingProperty, TypeSourceInfo *T, tok::ObjCKeywordKind MethodImplKind)
ObjCPropertyDeclCreatePropertyDecl (Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, Selector SetterSel, const bool isAssign, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, TypeSourceInfo *T, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
void AtomicPropertySetterGetterRules (ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl)
void DiagnoseOwningPropertyGetterSynthesis (const ObjCImplementationDecl *D)
void DiagnoseMissingDesignatedInitOverrides (const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD)
void DiagnoseDuplicateIvars (ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID)
bool MatchTwoMethodDeclarations (const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict)
void MatchAllMethodDeclarations (const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl=false)
void CheckCategoryVsClassMethodMatches (ObjCCategoryImplDecl *CatIMP)
void addMethodToGlobalList (ObjCMethodList *List, ObjCMethodDecl *Method)
 Add the given method to the list of globally-known methods.
void AddInstanceMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false)
void AddFactoryMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false)
 AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
void AddAnyMethodToGlobalPool (Decl *D)
ObjCMethodDeclLookupInstanceMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false, bool warn=true)
ObjCMethodDeclLookupFactoryMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false, bool warn=true)
const ObjCMethodDeclSelectorsForTypoCorrection (Selector Sel, QualType ObjectType=QualType())
ObjCMethodDeclLookupImplementedMethodInGlobalPool (Selector Sel)
void CollectIvarsToConstructOrDestruct (ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars)
FullExprArg MakeFullExpr (Expr *Arg)
FullExprArg MakeFullExpr (Expr *Arg, SourceLocation CC)
FullExprArg MakeFullDiscardedValueExpr (Expr *Arg)
StmtResult ActOnExprStmt (ExprResult Arg)
StmtResult ActOnExprStmtError ()
StmtResult ActOnNullStmt (SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false)
void ActOnStartOfCompoundStmt ()
void ActOnFinishOfCompoundStmt ()
StmtResult ActOnCompoundStmt (SourceLocation L, SourceLocation R, ArrayRef< Stmt * > Elts, bool isStmtExpr)
StmtResult ActOnDeclStmt (DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc)
void ActOnForEachDeclStmt (DeclGroupPtrTy Decl)
StmtResult ActOnForEachLValueExpr (Expr *E)
StmtResult ActOnCaseStmt (SourceLocation CaseLoc, Expr *LHSVal, SourceLocation DotDotDotLoc, Expr *RHSVal, SourceLocation ColonLoc)
void ActOnCaseStmtBody (Stmt *CaseStmt, Stmt *SubStmt)
 ActOnCaseStmtBody - This installs a statement as the body of a case.
StmtResult ActOnDefaultStmt (SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope)
StmtResult ActOnLabelStmt (SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt)
StmtResult ActOnAttributedStmt (SourceLocation AttrLoc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt)
StmtResult ActOnIfStmt (SourceLocation IfLoc, FullExprArg CondVal, Decl *CondVar, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
StmtResult ActOnStartOfSwitchStmt (SourceLocation SwitchLoc, Expr *Cond, Decl *CondVar)
StmtResult ActOnFinishSwitchStmt (SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
StmtResult ActOnWhileStmt (SourceLocation WhileLoc, FullExprArg Cond, Decl *CondVar, Stmt *Body)
StmtResult ActOnDoStmt (SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen)
StmtResult ActOnForStmt (SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, FullExprArg Second, Decl *SecondVar, FullExprArg Third, SourceLocation RParenLoc, Stmt *Body)
ExprResult CheckObjCForCollectionOperand (SourceLocation forLoc, Expr *collection)
StmtResult ActOnObjCForCollectionStmt (SourceLocation ForColLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc)
StmtResult FinishObjCForCollectionStmt (Stmt *ForCollection, Stmt *Body)
StmtResult ActOnCXXForRangeStmt (SourceLocation ForLoc, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc, BuildForRangeKind Kind)
StmtResult BuildCXXForRangeStmt (SourceLocation ForLoc, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *BeginEndDecl, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind)
 BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
StmtResult FinishCXXForRangeStmt (Stmt *ForRange, Stmt *Body)
StmtResult ActOnGotoStmt (SourceLocation GotoLoc, SourceLocation LabelLoc, LabelDecl *TheDecl)
StmtResult ActOnIndirectGotoStmt (SourceLocation GotoLoc, SourceLocation StarLoc, Expr *DestExp)
StmtResult ActOnContinueStmt (SourceLocation ContinueLoc, Scope *CurScope)
StmtResult ActOnBreakStmt (SourceLocation BreakLoc, Scope *CurScope)
void ActOnCapturedRegionStart (SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, unsigned NumParams)
void ActOnCapturedRegionStart (SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, ArrayRef< CapturedParamNameType > Params)
StmtResult ActOnCapturedRegionEnd (Stmt *S)
void ActOnCapturedRegionError ()
RecordDeclCreateCapturedStmtRecordDecl (CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams)
VarDeclgetCopyElisionCandidate (QualType ReturnType, Expr *E, bool AllowFunctionParameters)
 Determine whether the given expression is a candidate for copy elision in either a return statement or a throw expression.
bool isCopyElisionCandidate (QualType ReturnType, const VarDecl *VD, bool AllowFunctionParameters)
StmtResult ActOnReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope)
StmtResult BuildReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp)
StmtResult ActOnCapScopeReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp)
StmtResult ActOnGCCAsmStmt (SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, SourceLocation RParenLoc)
ExprResult LookupInlineAsmIdentifier (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, llvm::InlineAsmIdentifierInfo &Info, bool IsUnevaluatedContext)
bool LookupInlineAsmField (StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc)
StmtResult ActOnMSAsmStmt (SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr * > Exprs, SourceLocation EndLoc)
VarDeclBuildObjCExceptionDecl (TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid=false)
 Build a type-check a new Objective-C exception variable declaration.
DeclActOnObjCExceptionDecl (Scope *S, Declarator &D)
StmtResult ActOnObjCAtCatchStmt (SourceLocation AtLoc, SourceLocation RParen, Decl *Parm, Stmt *Body)
StmtResult ActOnObjCAtFinallyStmt (SourceLocation AtLoc, Stmt *Body)
StmtResult ActOnObjCAtTryStmt (SourceLocation AtLoc, Stmt *Try, MultiStmtArg Catch, Stmt *Finally)
StmtResult BuildObjCAtThrowStmt (SourceLocation AtLoc, Expr *Throw)
StmtResult ActOnObjCAtThrowStmt (SourceLocation AtLoc, Expr *Throw, Scope *CurScope)
ExprResult ActOnObjCAtSynchronizedOperand (SourceLocation atLoc, Expr *operand)
StmtResult ActOnObjCAtSynchronizedStmt (SourceLocation AtLoc, Expr *SynchExpr, Stmt *SynchBody)
StmtResult ActOnObjCAutoreleasePoolStmt (SourceLocation AtLoc, Stmt *Body)
VarDeclBuildExceptionDeclaration (Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id)
 Perform semantic analysis for the variable declaration that occurs within a C++ catch clause, returning the newly-created variable.
DeclActOnExceptionDeclarator (Scope *S, Declarator &D)
StmtResult ActOnCXXCatchBlock (SourceLocation CatchLoc, Decl *ExDecl, Stmt *HandlerBlock)
StmtResult ActOnCXXTryBlock (SourceLocation TryLoc, Stmt *TryBlock, ArrayRef< Stmt * > Handlers)
StmtResult ActOnSEHTryBlock (bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler)
StmtResult ActOnSEHExceptBlock (SourceLocation Loc, Expr *FilterExpr, Stmt *Block)
StmtResult ActOnSEHFinallyBlock (SourceLocation Loc, Stmt *Block)
StmtResult ActOnSEHLeaveStmt (SourceLocation Loc, Scope *CurScope)
void DiagnoseReturnInConstructorExceptionHandler (CXXTryStmt *TryBlock)
bool ShouldWarnIfUnusedFileScopedDecl (const DeclaratorDecl *D) const
void MarkUnusedFileScopedDecl (const DeclaratorDecl *D)
 If it's a file scoped decl that must warn if not used, keep track of it.
void DiagnoseUnusedExprResult (const Stmt *S)
void DiagnoseUnusedDecl (const NamedDecl *ND)
void DiagnoseEmptyStmtBody (SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID)
void DiagnoseEmptyLoopBody (const Stmt *S, const Stmt *PossibleBody)
ParsingDeclState PushParsingDeclaration (sema::DelayedDiagnosticPool &pool)
void PopParsingDeclaration (ParsingDeclState state, Decl *decl)
ParsingClassState PushParsingClass ()
void PopParsingClass (ParsingClassState state)
void redelayDiagnostics (sema::DelayedDiagnosticPool &pool)
void EmitAvailabilityWarning (AvailabilityDiagnostic AD, NamedDecl *D, StringRef Message, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess)
void HandleDelayedAvailabilityCheck (sema::DelayedDiagnostic &DD, Decl *Ctx)
bool makeUnavailableInSystemHeader (SourceLocation loc, StringRef message)
bool CanUseDecl (NamedDecl *D)
 Determine whether the use of this declaration is valid, without emitting diagnostics.
bool DiagnoseUseOfDecl (NamedDecl *D, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false)
 Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.
void NoteDeletedFunction (FunctionDecl *FD)
 Emit a note explaining that this function is deleted.
std::string getDeletedOrUnavailableSuffix (const FunctionDecl *FD)
 Retrieve the message suffix that should be added to a diagnostic complaining about the given function being deleted or unavailable.
bool DiagnosePropertyAccessorMismatch (ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc)
void DiagnoseSentinelCalls (NamedDecl *D, SourceLocation Loc, ArrayRef< Expr * > Args)
void PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, bool IsDecltype=false)
void PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t, bool IsDecltype=false)
void PopExpressionEvaluationContext ()
void DiscardCleanupsInEvaluationContext ()
ExprResult TransformToPotentiallyEvaluated (Expr *E)
ExprResult HandleExprEvaluationContextForTypeof (Expr *E)
ExprResult ActOnConstantExpression (ExprResult Res)
void MarkAnyDeclReferenced (SourceLocation Loc, Decl *D, bool OdrUse)
 Perform marking for a reference to an arbitrary declaration. It marks the declaration referenced, and performs odr-use checking for functions and variables. This method should not be used when building a normal expression which refers to a variable.
void MarkFunctionReferenced (SourceLocation Loc, FunctionDecl *Func)
 Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3)
void MarkVariableReferenced (SourceLocation Loc, VarDecl *Var)
 Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3). Note that this should not be used directly for normal expressions referring to VarDecl.
void MarkDeclRefReferenced (DeclRefExpr *E)
 Perform reference-marking and odr-use handling for a DeclRefExpr.
void MarkMemberReferenced (MemberExpr *E)
 Perform reference-marking and odr-use handling for a MemberExpr.
void UpdateMarkingForLValueToRValue (Expr *E)
void CleanupVarDeclMarking ()
bool tryCaptureVariable (VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt)
 Try to capture the given variable.
bool tryCaptureVariable (VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind=TryCapture_Implicit, SourceLocation EllipsisLoc=SourceLocation())
 Try to capture the given variable.
QualType getCapturedDeclRefType (VarDecl *Var, SourceLocation Loc)
 Given a variable, determine the type that a reference to that variable will have in the given scope.
void MarkDeclarationsReferencedInType (SourceLocation Loc, QualType T)
void MarkDeclarationsReferencedInExpr (Expr *E, bool SkipLocalVariables=false)
 Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced".
bool tryToRecoverWithCall (ExprResult &E, const PartialDiagnostic &PD, bool ForceComplain=false, bool(*IsPlausibleResult)(QualType)=nullptr)
 Try to recover by turning the given expression into a call. Returns true if recovery was attempted or an error was emitted; this may also leave the ExprResult invalid.
bool tryExprAsCall (Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads)
 Figure out if an expression could be turned into a call.
bool DiagRuntimeBehavior (SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
 Conditionally issue a diagnostic based on the current evaluation context.
SourceRange getExprRange (Expr *E) const
ExprResult ActOnIdExpression (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, CorrectionCandidateCallback *CCC=nullptr, bool IsInlineAsmIdentifier=false)
void DecomposeUnqualifiedId (const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
bool DiagnoseEmptyLookup (Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=None)
ExprResult LookupInObjCMethod (LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false)
ExprResult ActOnDependentIdExpression (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool isAddressOfOperand, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr)
ExprResult BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, const CXXScopeSpec *SS=nullptr, NamedDecl *FoundD=nullptr, const TemplateArgumentListInfo *TemplateArgs=nullptr)
ExprResult BuildAnonymousStructUnionMemberReference (const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation())
ExprResult BuildPossibleImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs)
 Builds an expression which might be an implicit member expression.
ExprResult BuildImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance)
bool UseArgumentDependentLookup (const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen)
ExprResult BuildQualifiedDeclarationNameExpr (CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, TypeSourceInfo **RecoveryTSI=nullptr)
ExprResult BuildDependentDeclRefExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildDeclarationNameExpr (const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL)
ExprResult BuildDeclarationNameExpr (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D, NamedDecl *FoundD=nullptr, const TemplateArgumentListInfo *TemplateArgs=nullptr)
 Complete semantic analysis for a reference to the given declaration.
ExprResult BuildLiteralOperatorCall (LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef< Expr * > Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
ExprResult BuildPredefinedExpr (SourceLocation Loc, PredefinedExpr::IdentType IT)
ExprResult ActOnPredefinedExpr (SourceLocation Loc, tok::TokenKind Kind)
ExprResult ActOnIntegerConstant (SourceLocation Loc, uint64_t Val)
ExprResult ActOnNumericConstant (const Token &Tok, Scope *UDLScope=nullptr)
ExprResult ActOnCharacterConstant (const Token &Tok, Scope *UDLScope=nullptr)
ExprResult ActOnParenExpr (SourceLocation L, SourceLocation R, Expr *E)
ExprResult ActOnParenListExpr (SourceLocation L, SourceLocation R, MultiExprArg Val)
ExprResult ActOnStringLiteral (ArrayRef< Token > StringToks, Scope *UDLScope=nullptr)
ExprResult ActOnGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr * > ArgExprs)
ExprResult CreateGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< TypeSourceInfo * > Types, ArrayRef< Expr * > Exprs)
ExprResult CreateBuiltinUnaryOp (SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr)
ExprResult BuildUnaryOp (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input)
ExprResult ActOnUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input)
QualType CheckAddressOfOperand (ExprResult &Operand, SourceLocation OpLoc)
ExprResult CreateUnaryExprOrTypeTraitExpr (TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
 Build a sizeof or alignof expression given a type operand.
ExprResult CreateUnaryExprOrTypeTraitExpr (Expr *E, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind)
 Build a sizeof or alignof expression given an expression operand.
ExprResult ActOnUnaryExprOrTypeTraitExpr (SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, bool IsType, void *TyOrEx, const SourceRange &ArgRange)
ExprResult CheckPlaceholderExpr (Expr *E)
bool CheckVecStepExpr (Expr *E)
bool CheckUnaryExprOrTypeTraitOperand (Expr *E, UnaryExprOrTypeTrait ExprKind)
 Check the constraints on expression operands to unary type expression and type traits.
bool CheckUnaryExprOrTypeTraitOperand (QualType ExprType, SourceLocation OpLoc, SourceRange ExprRange, UnaryExprOrTypeTrait ExprKind)
 Check the constraints on operands to unary expression and type traits.
ExprResult ActOnSizeofParameterPackExpr (Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc)
 Called when an expression computing the size of a parameter pack is parsed.
ExprResult ActOnPostfixUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Kind, Expr *Input)
ExprResult ActOnArraySubscriptExpr (Scope *S, Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
ExprResult CreateBuiltinArraySubscriptExpr (Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
ExprResult BuildMemberReferenceExpr (Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
ExprResult BuildMemberReferenceExpr (Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool SuppressQualifierCheck=false, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
ExprResult PerformMemberExprBaseConversion (Expr *Base, bool IsArrow)
 Perform conversions on the LHS of a member access expression.
bool CheckQualifiedMemberReference (Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, const LookupResult &R)
ExprResult ActOnDependentMemberExpr (Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
ExprResult ActOnMemberAccessExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Member, Decl *ObjCImpDecl, bool HasTrailingLParen)
void ActOnDefaultCtorInitializers (Decl *CDtorDecl)
bool ConvertArgumentsForCall (CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef< Expr * > Args, SourceLocation RParenLoc, bool ExecConfig=false)
void CheckStaticArrayArgument (SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr)
ExprResult ActOnCallExpr (Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false)
ExprResult BuildResolvedCallExpr (Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, bool IsExecConfig=false)
ExprResult ActOnCUDAExecConfigExpr (Scope *S, SourceLocation LLLLoc, MultiExprArg ExecConfig, SourceLocation GGGLoc)
ExprResult ActOnCastExpr (Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr)
ExprResult BuildCStyleCastExpr (SourceLocation LParenLoc, TypeSourceInfo *Ty, SourceLocation RParenLoc, Expr *Op)
CastKind PrepareScalarCast (ExprResult &src, QualType destType)
ExprResult BuildVectorLiteral (SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo)
 Build an altivec or OpenCL literal.
ExprResult MaybeConvertParenListExprToParenExpr (Scope *S, Expr *ME)
ExprResult ActOnCompoundLiteral (SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc, Expr *InitExpr)
ExprResult BuildCompoundLiteralExpr (SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr)
ExprResult ActOnInitList (SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
ExprResult ActOnDesignatedInitializer (Designation &Desig, SourceLocation Loc, bool GNUSyntax, ExprResult Init)
ExprResult ActOnBinOp (Scope *S, SourceLocation TokLoc, tok::TokenKind Kind, Expr *LHSExpr, Expr *RHSExpr)
ExprResult BuildBinOp (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
ExprResult CreateBuiltinBinOp (SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
ExprResult ActOnConditionalOp (SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr)
ExprResult ActOnAddrLabel (SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl)
 ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
void ActOnStartStmtExpr ()
ExprResult ActOnStmtExpr (SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
void ActOnStmtExprError ()
ExprResult BuildBuiltinOffsetOf (SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, OffsetOfComponent *CompPtr, unsigned NumComponents, SourceLocation RParenLoc)
 __builtin_offsetof(type, a.b[123][456].c)
ExprResult ActOnBuiltinOffsetOf (Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, OffsetOfComponent *CompPtr, unsigned NumComponents, SourceLocation RParenLoc)
ExprResult ActOnChooseExpr (SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc)
ExprResult ActOnVAArg (SourceLocation BuiltinLoc, Expr *E, ParsedType Ty, SourceLocation RPLoc)
ExprResult BuildVAArgExpr (SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc)
ExprResult ActOnGNUNullExpr (SourceLocation TokenLoc)
bool CheckCaseExpression (Expr *E)
IfExistsResult CheckMicrosoftIfExistsSymbol (Scope *S, CXXScopeSpec &SS, const DeclarationNameInfo &TargetNameInfo)
IfExistsResult CheckMicrosoftIfExistsSymbol (Scope *S, SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name)
StmtResult BuildMSDependentExistsStmt (SourceLocation KeywordLoc, bool IsIfExists, NestedNameSpecifierLoc QualifierLoc, DeclarationNameInfo NameInfo, Stmt *Nested)
StmtResult ActOnMSDependentExistsStmt (SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name, Stmt *Nested)
void ActOnBlockStart (SourceLocation CaretLoc, Scope *CurScope)
void ActOnBlockArguments (SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope)
void ActOnBlockError (SourceLocation CaretLoc, Scope *CurScope)
ExprResult ActOnBlockStmtExpr (SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
ExprResult ActOnConvertVectorExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 __builtin_convertvector(...)
ExprResult ActOnAsTypeExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 __builtin_astype(...)
DeclActOnStartNamespaceDef (Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, AttributeList *AttrList)
void ActOnFinishNamespaceDef (Decl *Dcl, SourceLocation RBrace)
NamespaceDeclgetStdNamespace () const
NamespaceDeclgetOrCreateStdNamespace ()
 Retrieve the special "std" namespace, which may require us to implicitly define the namespace.
CXXRecordDeclgetStdBadAlloc () const
bool isStdInitializerList (QualType Ty, QualType *Element)
 Tests whether Ty is an instance of std::initializer_list and, if it is and Element is not NULL, assigns the element type to Element.
QualType BuildStdInitializerList (QualType Element, SourceLocation Loc)
 Looks for the std::initializer_list template and instantiates it with Element, or emits an error if it's not found.
bool isInitListConstructor (const CXXConstructorDecl *Ctor)
 Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2.
DeclActOnUsingDirective (Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, AttributeList *AttrList)
void PushUsingDirective (Scope *S, UsingDirectiveDecl *UDir)
DeclActOnNamespaceAliasDef (Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident)
void HideUsingShadowDecl (Scope *S, UsingShadowDecl *Shadow)
bool CheckUsingShadowDecl (UsingDecl *UD, NamedDecl *Target, const LookupResult &PreviousDecls, UsingShadowDecl *&PrevShadow)
UsingShadowDeclBuildUsingShadowDecl (Scope *S, UsingDecl *UD, NamedDecl *Target, UsingShadowDecl *PrevDecl)
 Builds a shadow declaration corresponding to a 'using' declaration.
bool CheckUsingDeclRedeclaration (SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Previous)
bool CheckUsingDeclQualifier (SourceLocation UsingLoc, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc)
NamedDeclBuildUsingDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, AttributeList *AttrList, bool IsInstantiation, bool HasTypenameKeyword, SourceLocation TypenameLoc)
bool CheckInheritingConstructorUsingDecl (UsingDecl *UD)
 Additional checks for a using declaration referring to a constructor name.
DeclActOnUsingDeclaration (Scope *CurScope, AccessSpecifier AS, bool HasUsingKeyword, SourceLocation UsingLoc, CXXScopeSpec &SS, UnqualifiedId &Name, AttributeList *AttrList, bool HasTypenameKeyword, SourceLocation TypenameLoc)
DeclActOnAliasDeclaration (Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, AttributeList *AttrList, TypeResult Type)
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
ExprResult BuildCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
void FinalizeVarWithDestructor (VarDecl *VD, const RecordType *DeclInitType)
ImplicitExceptionSpecification ComputeDefaultedDefaultCtorExceptionSpec (SourceLocation Loc, CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted copy constructor of a class will have.
ImplicitExceptionSpecification ComputeDefaultedCopyCtorExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted default constructor of a class will have, and whether the parameter will be const.
ImplicitExceptionSpecification ComputeDefaultedCopyAssignmentExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defautled copy assignment operator of a class will have, and whether the parameter will be const.
ImplicitExceptionSpecification ComputeDefaultedMoveCtorExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted move constructor of a class will have.
ImplicitExceptionSpecification ComputeDefaultedMoveAssignmentExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted move assignment operator of a class will have.
ImplicitExceptionSpecification ComputeDefaultedDtorExceptionSpec (CXXMethodDecl *MD)
 Determine what sort of exception specification a defaulted destructor of a class will have.
ImplicitExceptionSpecification ComputeInheritingCtorExceptionSpec (CXXConstructorDecl *CD)
 Determine what sort of exception specification an inheriting constructor of a class will have.
void EvaluateImplicitExceptionSpec (SourceLocation Loc, CXXMethodDecl *MD)
 Evaluate the implicit exception specification for a defaulted special member function.
void checkExceptionSpecification (ExceptionSpecificationType EST, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr, SmallVectorImpl< QualType > &Exceptions, FunctionProtoType::ExceptionSpecInfo &ESI)
 Check the given exception-specification and update the exception specification information with the results.
bool ShouldDeleteSpecialMember (CXXMethodDecl *MD, CXXSpecialMember CSM, bool Diagnose=false)
 Determine if a special member function should have a deleted definition when it is defaulted.
CXXConstructorDeclDeclareImplicitDefaultConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit default constructor for the given class.
void DefineImplicitDefaultConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
CXXDestructorDeclDeclareImplicitDestructor (CXXRecordDecl *ClassDecl)
 Declare the implicit destructor for the given class.
void DefineImplicitDestructor (SourceLocation CurrentLocation, CXXDestructorDecl *Destructor)
void AdjustDestructorExceptionSpec (CXXRecordDecl *ClassDecl, CXXDestructorDecl *Destructor)
 Build an exception spec for destructors that don't have one.
void DeclareInheritingConstructors (CXXRecordDecl *ClassDecl)
 Declare all inheriting constructors for the given class.
void DefineInheritingConstructor (SourceLocation UseLoc, CXXConstructorDecl *Constructor)
 Define the specified inheriting constructor.
CXXConstructorDeclDeclareImplicitCopyConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit copy constructor for the given class.
void DefineImplicitCopyConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
CXXConstructorDeclDeclareImplicitMoveConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit move constructor for the given class.
void DefineImplicitMoveConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
CXXMethodDeclDeclareImplicitCopyAssignment (CXXRecordDecl *ClassDecl)
 Declare the implicit copy assignment operator for the given class.
void DefineImplicitCopyAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
 Defines an implicitly-declared copy assignment operator.
CXXMethodDeclDeclareImplicitMoveAssignment (CXXRecordDecl *ClassDecl)
 Declare the implicit move assignment operator for the given class.
void DefineImplicitMoveAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
 Defines an implicitly-declared move assignment operator.
void ForceDeclarationOfImplicitMembers (CXXRecordDecl *Class)
 Force the declaration of any implicitly-declared members of this class.
bool isImplicitlyDeleted (FunctionDecl *FD)
 Determine whether the given function is an implicitly-deleted special member function.
bool checkThisInStaticMemberFunctionType (CXXMethodDecl *Method)
 Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-qualifier-seq would be.
bool checkThisInStaticMemberFunctionExceptionSpec (CXXMethodDecl *Method)
 Whether this' shows up in the exception specification of a static member function.
bool checkThisInStaticMemberFunctionAttributes (CXXMethodDecl *Method)
 Check whether 'this' shows up in the attributes of the given static member function.
ExprResult MaybeBindToTemporary (Expr *E)
bool CompleteConstructorCall (CXXConstructorDecl *Constructor, MultiExprArg ArgsPtr, SourceLocation Loc, SmallVectorImpl< Expr * > &ConvertedArgs, bool AllowExplicit=false, bool IsListInitialization=false)
 Given a constructor and the set of arguments provided for the constructor, convert the arguments and add any required default arguments to form a proper call to this constructor.
ParsedType getInheritingConstructorName (CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo &Name)
 Handle the result of the special case name lookup for inheriting constructor declarations. 'NS::X::X' and 'NS::X<...>X' are treated as constructor names in member using declarations, even if 'X' is not the name of the corresponding type.
ParsedType getDestructorName (SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectType, bool EnteringContext)
ParsedType getDestructorType (const DeclSpec &DS, ParsedType ObjectType)
void CheckCompatibleReinterpretCast (QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range)
ExprResult ActOnCXXNamedCast (SourceLocation OpLoc, tok::TokenKind Kind, SourceLocation LAngleBracketLoc, Declarator &D, SourceLocation RAngleBracketLoc, SourceLocation LParenLoc, Expr *E, SourceLocation RParenLoc)
 ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's.
ExprResult BuildCXXNamedCast (SourceLocation OpLoc, tok::TokenKind Kind, TypeSourceInfo *Ty, Expr *E, SourceRange AngleBrackets, SourceRange Parens)
ExprResult BuildCXXTypeId (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
 Build a C++ typeid expression with a type operand.
ExprResult BuildCXXTypeId (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
 Build a C++ typeid expression with an expression operand.
ExprResult ActOnCXXTypeid (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
 ActOnCXXTypeid - Parse typeid( something ).
ExprResult BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
 Build a Microsoft __uuidof expression with a type operand.
ExprResult BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
 Build a Microsoft __uuidof expression with an expression operand.
ExprResult ActOnCXXUuidof (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
 ActOnCXXUuidof - Parse __uuidof( something ).
ExprResult ActOnCXXThis (SourceLocation loc)
QualType getCurrentThisType ()
 Try to retrieve the type of the 'this' pointer.
bool CheckCXXThisCapture (SourceLocation Loc, bool Explicit=false, bool BuildAndDiagnose=true, const unsigned *const FunctionScopeIndexToStopAt=nullptr)
 Make sure the value of 'this' is actually available in the current context, if it is a potentially evaluated context.
bool isThisOutsideMemberFunctionBody (QualType BaseType)
 Determine whether the given type is the type of *this that is used outside of the body of a member function for a type that is currently being defined.
ExprResult ActOnCXXBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind)
 ActOnCXXBoolLiteral - Parse {true,false} literals.
ExprResult ActOnObjCBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind)
 ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
ExprResult ActOnCXXNullPtrLiteral (SourceLocation Loc)
 ActOnCXXNullPtrLiteral - Parse 'nullptr'.
ExprResult ActOnCXXThrow (Scope *S, SourceLocation OpLoc, Expr *expr)
 ActOnCXXThrow - Parse throw expressions.
ExprResult BuildCXXThrow (SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope)
ExprResult CheckCXXThrowOperand (SourceLocation ThrowLoc, Expr *E, bool IsThrownVarInScope)
 CheckCXXThrowOperand - Validate the operand of a throw.
ExprResult ActOnCXXTypeConstructExpr (ParsedType TypeRep, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc)
ExprResult BuildCXXTypeConstructExpr (TypeSourceInfo *Type, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc)
ExprResult ActOnCXXNew (SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, Expr *Initializer)
 ActOnCXXNew - Parsed a C++ 'new' expression.
ExprResult BuildCXXNew (SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, Expr *ArraySize, SourceRange DirectInitRange, Expr *Initializer, bool TypeMayContainAuto=true)
bool CheckAllocatedType (QualType AllocType, SourceLocation Loc, SourceRange R)
 Checks that a type is suitable as the allocated type in a new-expression.
bool FindAllocationFunctions (SourceLocation StartLoc, SourceRange Range, bool UseGlobal, QualType AllocType, bool IsArray, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete)
bool FindAllocationOverload (SourceLocation StartLoc, SourceRange Range, DeclarationName Name, MultiExprArg Args, DeclContext *Ctx, bool AllowMissing, FunctionDecl *&Operator, bool Diagnose=true)
 Find an fitting overload for the allocation function in the specified scope.
void DeclareGlobalNewDelete ()
void DeclareGlobalAllocationFunction (DeclarationName Name, QualType Return, QualType Param1, QualType Param2=QualType(), bool addMallocAttr=false)
bool FindDeallocationFunction (SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true)
FunctionDeclFindUsualDeallocationFunction (SourceLocation StartLoc, bool CanProvideSize, DeclarationName Name)
ExprResult ActOnCXXDelete (SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand)
 ActOnCXXDelete - Parsed a C++ 'delete' expression.
DeclResult ActOnCXXConditionDeclaration (Scope *S, Declarator &D)
ExprResult CheckConditionVariable (VarDecl *ConditionVar, SourceLocation StmtLoc, bool ConvertToBoolean)
 Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement.
ExprResult ActOnNoexceptExpr (SourceLocation KeyLoc, SourceLocation LParen, Expr *Operand, SourceLocation RParen)
ExprResult BuildCXXNoexceptExpr (SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen)
ExprResult ActOnTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< ParsedType > Args, SourceLocation RParenLoc)
 Parsed one of the type trait support pseudo-functions.
ExprResult BuildTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc)
ExprResult ActOnArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen)
ExprResult BuildArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen)
ExprResult ActOnExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
ExprResult BuildExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
ExprResult ActOnStartCXXMemberReference (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor)
ExprResult DiagnoseDtorReference (SourceLocation NameLoc, Expr *MemExpr)
ExprResult BuildPseudoDestructorExpr (Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType, bool HasTrailingLParen)
ExprResult ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName, bool HasTrailingLParen)
ExprResult ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, SourceLocation TildeLoc, const DeclSpec &DS, bool HasTrailingLParen)
ExprMaybeCreateExprWithCleanups (Expr *SubExpr)
StmtMaybeCreateStmtWithCleanups (Stmt *SubStmt)
ExprResult MaybeCreateExprWithCleanups (ExprResult SubExpr)
ExprResult ActOnFinishFullExpr (Expr *Expr)
ExprResult ActOnFinishFullExpr (Expr *Expr, SourceLocation CC, bool DiscardedValue=false, bool IsConstexpr=false, bool IsLambdaInitCaptureInitializer=false)
StmtResult ActOnFinishFullStmt (Stmt *Stmt)
bool RequireCompleteDeclContext (CXXScopeSpec &SS, DeclContext *DC)
 Require that the context specified by SS be complete.
DeclContextcomputeDeclContext (QualType T)
 Compute the DeclContext that is associated with the given type.
DeclContextcomputeDeclContext (const CXXScopeSpec &SS, bool EnteringContext=false)
 Compute the DeclContext that is associated with the given scope specifier.
bool isDependentScopeSpecifier (const CXXScopeSpec &SS)
CXXRecordDeclgetCurrentInstantiationOf (NestedNameSpecifier *NNS)
 If the given nested name specifier refers to the current instantiation, return the declaration that corresponds to that current instantiation (C++0x [temp.dep.type]p1).
bool ActOnCXXGlobalScopeSpecifier (Scope *S, SourceLocation CCLoc, CXXScopeSpec &SS)
 The parser has parsed a global nested-name-specifier '::'.
bool isAcceptableNestedNameSpecifier (const NamedDecl *SD)
 Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier.
NamedDeclFindFirstQualifierInScope (Scope *S, NestedNameSpecifier *NNS)
 If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup for that identifier as a nested-name-specifier within the given scope, and return the result of that name lookup.
bool isNonTypeNestedNameSpecifier (Scope *S, CXXScopeSpec &SS, SourceLocation IdLoc, IdentifierInfo &II, ParsedType ObjectType)
bool BuildCXXNestedNameSpecifier (Scope *S, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation CCLoc, QualType ObjectType, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon=nullptr)
 Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier.
bool ActOnCXXNestedNameSpecifier (Scope *S, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation CCLoc, ParsedType ObjectType, bool EnteringContext, CXXScopeSpec &SS, bool ErrorRecoveryLookup=false, bool *IsCorrectedToColon=nullptr)
 The parser has parsed a nested-name-specifier 'identifier::'.
ExprResult ActOnDecltypeExpression (Expr *E)
bool ActOnCXXNestedNameSpecifierDecltype (CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc)
bool IsInvalidUnlessNestedName (Scope *S, CXXScopeSpec &SS, IdentifierInfo &Identifier, SourceLocation IdentifierLoc, SourceLocation ColonLoc, ParsedType ObjectType, bool EnteringContext)
bool ActOnCXXNestedNameSpecifier (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateName, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, SourceLocation CCLoc, bool EnteringContext)
 The parser has parsed a nested-name-specifier 'template[opt] template-name < template-args >::'.
void * SaveNestedNameSpecifierAnnotation (CXXScopeSpec &SS)
 Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to reconstruct the given nested-name-specifier.
void RestoreNestedNameSpecifierAnnotation (void *Annotation, SourceRange AnnotationRange, CXXScopeSpec &SS)
 Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.
bool ShouldEnterDeclaratorScope (Scope *S, const CXXScopeSpec &SS)
bool ActOnCXXEnterDeclaratorScope (Scope *S, CXXScopeSpec &SS)
void ActOnCXXExitDeclaratorScope (Scope *S, const CXXScopeSpec &SS)
void ActOnCXXEnterDeclInitializer (Scope *S, Decl *Dcl)
void ActOnCXXExitDeclInitializer (Scope *S, Decl *Dcl)
CXXRecordDeclcreateLambdaClosureType (SourceRange IntroducerRange, TypeSourceInfo *Info, bool KnownDependent, LambdaCaptureDefault CaptureDefault)
 Create a new lambda closure type.
CXXMethodDeclstartLambdaDefinition (CXXRecordDecl *Class, SourceRange IntroducerRange, TypeSourceInfo *MethodType, SourceLocation EndLoc, ArrayRef< ParmVarDecl * > Params)
 Start the definition of a lambda expression.
void buildLambdaScope (sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, bool ExplicitParams, bool ExplicitResultType, bool Mutable)
 Endow the lambda scope info with the relevant properties.
QualType performLambdaInitCaptureInitialization (SourceLocation Loc, bool ByRef, IdentifierInfo *Id, Expr *&Init)
 Perform initialization analysis of the init-capture and perform any implicit conversions such as an lvalue-to-rvalue conversion if not being used to initialize a reference.
VarDeclcreateLambdaInitCaptureVarDecl (SourceLocation Loc, QualType InitCaptureType, IdentifierInfo *Id, Expr *Init)
 Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purposes for a lambda init capture.
FieldDeclbuildInitCaptureField (sema::LambdaScopeInfo *LSI, VarDecl *Var)
 Build the implicit field for an init-capture.
void finishLambdaExplicitCaptures (sema::LambdaScopeInfo *LSI)
 Note that we have finished the explicit captures for the given lambda.
void addLambdaParameters (CXXMethodDecl *CallOperator, Scope *CurScope)
 Introduce the lambda parameters into scope.
void deduceClosureReturnType (sema::CapturingScopeInfo &CSI)
 Deduce a block or lambda's return type based on the return statements present in the body.
void ActOnStartOfLambdaDefinition (LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope)
void ActOnLambdaError (SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false)
ExprResult ActOnLambdaExpr (SourceLocation StartLoc, Stmt *Body, Scope *CurScope, bool IsInstantiation=false)
void DefineImplicitLambdaToFunctionPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv)
 Define the "body" of the conversion from a lambda object to a function pointer.
void DefineImplicitLambdaToBlockPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv)
 Define the "body" of the conversion from a lambda object to a block pointer.
ExprResult BuildBlockForLambdaConversion (SourceLocation CurrentLocation, SourceLocation ConvLocation, CXXConversionDecl *Conv, Expr *Src)
ExprResult ParseObjCStringLiteral (SourceLocation *AtLocs, Expr **Strings, unsigned NumStrings)
ExprResult BuildObjCStringLiteral (SourceLocation AtLoc, StringLiteral *S)
ExprResult BuildObjCNumericLiteral (SourceLocation AtLoc, Expr *Number)
ExprResult ActOnObjCBoolLiteral (SourceLocation AtLoc, SourceLocation ValueLoc, bool Value)
ExprResult BuildObjCArrayLiteral (SourceRange SR, MultiExprArg Elements)
ExprResult BuildObjCBoxedExpr (SourceRange SR, Expr *ValueExpr)
ExprResult BuildObjCSubscriptExpression (SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
ExprResult BuildObjCDictionaryLiteral (SourceRange SR, ObjCDictionaryElement *Elements, unsigned NumElements)
ExprResult BuildObjCEncodeExpression (SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
ExprResult BuildCXXMemberCallExpr (Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates)
ExprResult ParseObjCEncodeExpression (SourceLocation AtLoc, SourceLocation EncodeLoc, SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc)
ExprResult ParseObjCSelectorExpression (Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors)
 ParseObjCSelectorExpression - Build selector expression for @selector.
ExprResult ParseObjCProtocolExpression (IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc)
 ParseObjCProtocolExpression - Build protocol expression for @protocol.
DeclActOnStartLinkageSpecification (Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc)
DeclActOnFinishLinkageSpecification (Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
bool isCurrentClassName (const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr)
bool isCurrentClassNameTypo (IdentifierInfo *&II, const CXXScopeSpec *SS)
 Determine whether the identifier II is a typo for the name of the class type currently being defined. If so, update it to the identifier that should have been used.
bool ActOnAccessSpecifier (AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, AttributeList *Attrs=nullptr)
 ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
NamedDeclActOnCXXMemberDeclarator (Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle)
void ActOnStartCXXInClassMemberInitializer ()
 Enter a new C++ default initializer scope. After calling this, the caller must call ActOnFinishCXXInClassMemberInitializer, even if parsing or instantiating the initializer failed.
void ActOnFinishCXXInClassMemberInitializer (Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
 This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template. Such actions are deferred until the class is complete.
MemInitResult ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc)
 Handle a C++ member initializer using parentheses syntax.
MemInitResult ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *InitList, SourceLocation EllipsisLoc)
 Handle a C++ member initializer using braced-init-list syntax.
MemInitResult BuildMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc)
 Handle a C++ member initializer.
MemInitResult BuildMemberInitializer (ValueDecl *Member, Expr *Init, SourceLocation IdLoc)
MemInitResult BuildBaseInitializer (QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc)
MemInitResult BuildDelegatingInitializer (TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl)
bool SetDelegatingInitializer (CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer)
bool SetCtorInitializers (CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer * > Initializers=None)
void SetIvarInitializers (ObjCImplementationDecl *ObjCImplementation)
void MarkBaseAndMemberDestructorsReferenced (SourceLocation Loc, CXXRecordDecl *Record)
void LoadExternalVTableUses ()
 Load any externally-stored vtable uses.
void MarkVTableUsed (SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false)
 Note that the vtable for the given class was used at the given location.
void MarkVirtualMemberExceptionSpecsNeeded (SourceLocation Loc, const CXXRecordDecl *RD)
 Mark the exception specifications of all virtual member functions in the given class as needed.
void MarkVirtualMembersReferenced (SourceLocation Loc, const CXXRecordDecl *RD)
bool DefineUsedVTables ()
 Define all of the vtables that have been used in this translation unit and reference any virtual members used by those vtables.
void AddImplicitlyDeclaredMembersToClass (CXXRecordDecl *ClassDecl)
void ActOnMemInitializers (Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer * > MemInits, bool AnyErrors)
 ActOnMemInitializers - Handle the member initializers for a constructor.
void CheckCompletedCXXClass (CXXRecordDecl *Record)
 Perform semantic checks on a class definition that has been completing, introducing implicitly-declared members, checking for abstract types, etc.
void ActOnFinishCXXMemberSpecification (Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList)
void ActOnFinishCXXMemberDecls ()
 Perform any semantic analysis which needs to be delayed until all pending class member declarations have been parsed.
void ActOnReenterCXXMethodParameter (Scope *S, ParmVarDecl *Param)
unsigned ActOnReenterTemplateScope (Scope *S, Decl *Template)
void ActOnStartDelayedMemberDeclarations (Scope *S, Decl *Record)
void ActOnStartDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
void ActOnDelayedCXXMethodParameter (Scope *S, Decl *Param)
void ActOnFinishDelayedMemberDeclarations (Scope *S, Decl *Record)
void ActOnFinishDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
void ActOnFinishDelayedMemberInitializers (Decl *Record)
void MarkAsLateParsedTemplate (FunctionDecl *FD, Decl *FnD, CachedTokens &Toks)
void UnmarkAsLateParsedTemplate (FunctionDecl *FD)
bool IsInsideALocalClassWithinATemplateFunction ()
DeclActOnStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc)
DeclBuildStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *AssertMessageExpr, SourceLocation RParenLoc, bool Failed)
FriendDeclCheckFriendTypeDecl (SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo)
 Perform semantic analysis of the given friend type declaration.
DeclActOnFriendTypeDecl (Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
NamedDeclActOnFriendFunctionDecl (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
QualType CheckConstructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
void CheckConstructor (CXXConstructorDecl *Constructor)
QualType CheckDestructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
bool CheckDestructor (CXXDestructorDecl *Destructor)
void CheckConversionDeclarator (Declarator &D, QualType &R, StorageClass &SC)
DeclActOnConversionDeclarator (CXXConversionDecl *Conversion)
void CheckExplicitlyDefaultedSpecialMember (CXXMethodDecl *MD)
void CheckExplicitlyDefaultedMemberExceptionSpec (CXXMethodDecl *MD, const FunctionProtoType *T)
void CheckDelayedMemberExceptionSpecs ()
CXXBaseSpecifierCheckBaseSpecifier (CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
 ActOnBaseSpecifier - Parsed a base specifier.
BaseResult ActOnBaseSpecifier (Decl *classdecl, SourceRange SpecifierRange, ParsedAttributes &Attrs, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc)
bool AttachBaseSpecifiers (CXXRecordDecl *Class, CXXBaseSpecifier **Bases, unsigned NumBases)
 Performs the actual work of attaching the given base class specifiers to a C++ class.
void ActOnBaseSpecifiers (Decl *ClassDecl, CXXBaseSpecifier **Bases, unsigned NumBases)
bool IsDerivedFrom (QualType Derived, QualType Base)
 Determine whether the type Derived is a C++ class that is derived from the type Base.
bool IsDerivedFrom (QualType Derived, QualType Base, CXXBasePaths &Paths)
 Determine whether the type Derived is a C++ class that is derived from the type Base.
void BuildBasePathArray (const CXXBasePaths &Paths, CXXCastPath &BasePath)
bool BasePathInvolvesVirtualBase (const CXXCastPath &BasePath)
 Determine whether the given base path includes a virtual base class.
bool CheckDerivedToBaseConversion (QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath=nullptr, bool IgnoreAccess=false)
bool CheckDerivedToBaseConversion (QualType Derived, QualType Base, unsigned InaccessibleBaseID, unsigned AmbigiousBaseConvID, SourceLocation Loc, SourceRange Range, DeclarationName Name, CXXCastPath *BasePath)
std::string getAmbiguousPathsDisplayString (CXXBasePaths &Paths)
 Builds a string representing ambiguous paths from a specific derived class to different subobjects of the same base class.
bool CheckOverridingFunctionAttributes (const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool CheckOverridingFunctionReturnType (const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool CheckOverridingFunctionExceptionSpec (const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool CheckPureMethod (CXXMethodDecl *Method, SourceRange InitRange)
 Mark the given method pure.
void CheckOverrideControl (NamedDecl *D)
 CheckOverrideControl - Check C++11 override control semantics.
bool CheckIfOverriddenFunctionIsMarkedFinal (const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool SetMemberAccessSpecifier (NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS)
AccessResult CheckUnresolvedMemberAccess (UnresolvedMemberExpr *E, DeclAccessPair FoundDecl)
AccessResult CheckUnresolvedLookupAccess (UnresolvedLookupExpr *E, DeclAccessPair FoundDecl)
AccessResult CheckAllocationAccess (SourceLocation OperatorLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, bool Diagnose=true)
 Checks access to an overloaded operator new or delete.
AccessResult CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, const InitializedEntity &Entity, AccessSpecifier Access, bool IsCopyBindingRefToTemp=false)
 Checks access to a constructor.
AccessResult CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, const InitializedEntity &Entity, AccessSpecifier Access, const PartialDiagnostic &PDiag)
 Checks access to a constructor.
AccessResult CheckDestructorAccess (SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag, QualType objectType=QualType())
AccessResult CheckFriendAccess (NamedDecl *D)
 Checks access to the target of a friend declaration.
AccessResult CheckMemberAccess (SourceLocation UseLoc, CXXRecordDecl *NamingClass, DeclAccessPair Found)
 Checks access to a member.
AccessResult CheckMemberOperatorAccess (SourceLocation Loc, Expr *ObjectExpr, Expr *ArgExpr, DeclAccessPair FoundDecl)
AccessResult CheckAddressOfMemberAccess (Expr *OvlExpr, DeclAccessPair FoundDecl)
AccessResult CheckBaseClassAccess (SourceLocation AccessLoc, QualType Base, QualType Derived, const CXXBasePath &Path, unsigned DiagID, bool ForceCheck=false, bool ForceUnprivileged=false)
void CheckLookupAccess (const LookupResult &R)
 Checks access to all the declarations in the given result set.
bool IsSimplyAccessible (NamedDecl *decl, DeclContext *Ctx)
bool isSpecialMemberAccessibleForDeletion (CXXMethodDecl *decl, AccessSpecifier access, QualType objectType)
void HandleDependentAccessCheck (const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs)
void PerformDependentDiagnostics (const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
void HandleDelayedAccessCheck (sema::DelayedDiagnostic &DD, Decl *Ctx)
bool RequireNonAbstractType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
template<typename T1 >
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1)
template<typename T1 , typename T2 >
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2)
template<typename T1 , typename T2 , typename T3 >
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, const T1 &Arg1, const T2 &Arg2, const T3 &Arg3)
void DiagnoseAbstractType (const CXXRecordDecl *RD)
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, AbstractDiagSelID SelID=AbstractNone)
bool CheckOverloadedOperatorDeclaration (FunctionDecl *FnDecl)
bool CheckLiteralOperatorDeclaration (FunctionDecl *FnDecl)
void FilterAcceptableTemplateNames (LookupResult &R, bool AllowFunctionTemplates=true)
bool hasAnyAcceptableTemplateNames (LookupResult &R, bool AllowFunctionTemplates=true)
void LookupTemplateName (LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization)
TemplateNameKind isTemplateName (Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword, UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool &MemberOfUnknownSpecialization)
bool DiagnoseUnknownTemplateName (const IdentifierInfo &II, SourceLocation IILoc, Scope *S, const CXXScopeSpec *SS, TemplateTy &SuggestedTemplate, TemplateNameKind &SuggestedKind)
void DiagnoseTemplateParameterShadow (SourceLocation Loc, Decl *PrevDecl)
TemplateDeclAdjustDeclIfTemplate (Decl *&Decl)
DeclActOnTypeParameter (Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg)
QualType CheckNonTypeTemplateParameterType (QualType T, SourceLocation Loc)
 Check that the type of a non-type template parameter is well-formed.
DeclActOnNonTypeTemplateParameter (Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg)
DeclActOnTemplateTemplateParameter (Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument DefaultArg)
TemplateParameterListActOnTemplateParameterList (unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, Decl **Params, unsigned NumParams, SourceLocation RAngleLoc)
bool CheckTemplateParameterList (TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC)
 Checks the validity of a template parameter list, possibly considering the template parameter list from a previous declaration.
TemplateParameterListMatchTemplateParametersToScopeSpecifier (SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef< TemplateParameterList * > ParamLists, bool IsFriend, bool &IsExplicitSpecialization, bool &Invalid)
 Match the given template parameter lists to the given scope specifier, returning the template parameter list that applies to the name.
DeclResult CheckClassTemplate (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists)
void translateTemplateArguments (const ASTTemplateArgsPtr &In, TemplateArgumentListInfo &Out)
 Translates template arguments as provided by the parser into template arguments used by semantic analysis.
void NoteAllFoundTemplates (TemplateName Name)
QualType CheckTemplateIdType (TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs)
TypeResult ActOnTemplateIdType (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy Template, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, bool IsCtorOrDtorName=false)
TypeResult ActOnTagTemplateIdType (TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc)
 Parsed an elaborated-type-specifier that refers to a template-id, such as class T::template apply<U>.
DeclResult ActOnVarTemplateSpecialization (Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization)
DeclResult CheckVarTemplateId (VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs)
ExprResult CheckVarTemplateId (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, VarTemplateDecl *Template, SourceLocation TemplateLoc, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildTemplateIdExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildQualifiedTemplateIdExpr (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
TemplateNameKind ActOnDependentTemplateName (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template)
 Form a dependent template name.
DeclResult ActOnClassTemplateSpecialization (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, TemplateIdAnnotation &TemplateId, AttributeList *Attr, MultiTemplateParamsArg TemplateParameterLists)
DeclActOnTemplateDeclarator (Scope *S, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
DeclActOnStartOfFunctionTemplateDef (Scope *FnBodyScope, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
bool CheckSpecializationInstantiationRedecl (SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPtOfInstantiation, bool &SuppressNew)
 Diagnose cases where we have an explicit template specialization before/after an explicit template instantiation, producing diagnostics for those cases where they are required and determining whether the new specialization/instantiation will have any effect.
bool CheckDependentFunctionTemplateSpecialization (FunctionDecl *FD, const TemplateArgumentListInfo &ExplicitTemplateArgs, LookupResult &Previous)
 Perform semantic analysis for the given dependent function template specialization.
bool CheckFunctionTemplateSpecialization (FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous)
 Perform semantic analysis for the given function template specialization.
bool CheckMemberSpecialization (NamedDecl *Member, LookupResult &Previous)
 Perform semantic analysis for the given non-template member specialization.
DeclResult ActOnExplicitInstantiation (Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy Template, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, AttributeList *Attr)
DeclResult ActOnExplicitInstantiation (Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr)
DeclResult ActOnExplicitInstantiation (Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D)
TemplateArgumentLoc SubstDefaultTemplateArgumentIfAvailable (TemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, Decl *Param, SmallVectorImpl< TemplateArgument > &Converted, bool &HasDefaultArg)
 If the given template parameter has a default template argument, substitute into that default template argument and return the corresponding template argument.
bool CheckTemplateArgument (NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl< TemplateArgument > &Converted, CheckTemplateArgumentKind CTAK=CTAK_Specified)
 Check that the given template argument corresponds to the given template parameter.
bool CheckTemplateArgumentList (TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl< TemplateArgument > &Converted)
 Check that the given template arguments can be be provided to the given template, converting the arguments along the way.
bool CheckTemplateTypeArgument (TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &Converted)
bool CheckTemplateArgument (TemplateTypeParmDecl *Param, TypeSourceInfo *Arg)
 Check a template argument against its corresponding template type parameter.
ExprResult CheckTemplateArgument (NonTypeTemplateParmDecl *Param, QualType InstantiatedParamType, Expr *Arg, TemplateArgument &Converted, CheckTemplateArgumentKind CTAK=CTAK_Specified)
 Check a template argument against its corresponding non-type template parameter.
bool CheckTemplateArgument (TemplateTemplateParmDecl *Param, TemplateArgumentLoc &Arg, unsigned ArgumentPackIndex)
 Check a template argument against its corresponding template template parameter.
ExprResult BuildExpressionFromDeclTemplateArgument (const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc)
 Given a non-type template argument that refers to a declaration and the type of its corresponding non-type template parameter, produce an expression that properly refers to that declaration.
ExprResult BuildExpressionFromIntegralTemplateArgument (const TemplateArgument &Arg, SourceLocation Loc)
 Construct a new expression that refers to the given integral template argument with the given source-location information.
bool TemplateParameterListsAreEqual (TemplateParameterList *New, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation())
 Determine whether the given template parameter lists are equivalent.
bool CheckTemplateDeclScope (Scope *S, TemplateParameterList *TemplateParams)
 Check whether a template can be declared within this scope.
TypeResult ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc)
 Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".
TypeResult ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, SourceLocation TemplateLoc, TemplateTy TemplateName, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc)
 Called when the parser has parsed a C++ typename specifier that ends in a template-id, e.g., "typename MetaFun::template apply<T1, T2>".
QualType CheckTypenameType (ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc)
 Build the type that describes a C++ typename specifier, e.g., "typename T::type".
TypeSourceInfoRebuildTypeInCurrentInstantiation (TypeSourceInfo *T, SourceLocation Loc, DeclarationName Name)
 Rebuilds a type within the context of the current instantiation.
bool RebuildNestedNameSpecifierInCurrentInstantiation (CXXScopeSpec &SS)
ExprResult RebuildExprInCurrentInstantiation (Expr *E)
bool RebuildTemplateParamsInCurrentInstantiation (TemplateParameterList *Params)
 Rebuild the template parameters now that we know we're in a current instantiation.
std::string getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgumentList &Args)
 Produces a formatted string that describes the binding of template parameters to template arguments.
std::string getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgument *Args, unsigned NumArgs)
bool isUnexpandedParameterPackPermitted ()
 Determine whether it's possible for an unexpanded parameter pack to be valid in this location. This only happens when we're in a declaration that is nested within an expression that could be expanded, such as a lambda-expression within a function call.
bool DiagnoseUnexpandedParameterPacks (SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef< UnexpandedParameterPack > Unexpanded)
 Diagnose unexpanded parameter packs.
bool DiagnoseUnexpandedParameterPack (SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC)
 If the given type contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (Expr *E, UnexpandedParameterPackContext UPPC=UPPC_Expression)
 If the given expression contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (const CXXScopeSpec &SS, UnexpandedParameterPackContext UPPC)
 If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (const DeclarationNameInfo &NameInfo, UnexpandedParameterPackContext UPPC)
 If the given name contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (SourceLocation Loc, TemplateName Template, UnexpandedParameterPackContext UPPC)
 If the given template name contains an unexpanded parameter pack, diagnose the error.
bool DiagnoseUnexpandedParameterPack (TemplateArgumentLoc Arg, UnexpandedParameterPackContext UPPC)
 If the given template argument contains an unexpanded parameter pack, diagnose the error.
void collectUnexpandedParameterPacks (TemplateArgument Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given template argument.
void collectUnexpandedParameterPacks (TemplateArgumentLoc Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given template argument.
void collectUnexpandedParameterPacks (QualType T, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given type.
void collectUnexpandedParameterPacks (TypeLoc TL, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given type.
void collectUnexpandedParameterPacks (CXXScopeSpec &SS, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given nested-name-specifier.
void collectUnexpandedParameterPacks (const DeclarationNameInfo &NameInfo, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given name.
ParsedTemplateArgument ActOnPackExpansion (const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc)
 Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion.
TypeResult ActOnPackExpansion (ParsedType Type, SourceLocation EllipsisLoc)
 Invoked when parsing a type followed by an ellipsis, which creates a pack expansion.
TypeSourceInfoCheckPackExpansion (TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
 Construct a pack expansion type from the pattern of the pack expansion.
QualType CheckPackExpansion (QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
 Construct a pack expansion type from the pattern of the pack expansion.
ExprResult ActOnPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc)
 Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
ExprResult CheckPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
 Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
bool CheckParameterPacksForExpansion (SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, Optional< unsigned > &NumExpansions)
 Determine whether we could expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern.
Optional< unsignedgetNumArgumentsInExpansion (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs)
 Determine the number of arguments in the given pack expansion type.
bool containsUnexpandedParameterPacks (Declarator &D)
 Determine whether the given declarator contains any unexpanded parameter packs.
TemplateArgumentLoc getTemplateArgumentPackExpansionPattern (TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, Optional< unsigned > &NumExpansions) const
 Returns the pattern of the pack expansion for a template argument.
QualType adjustCCAndNoReturn (QualType ArgFunctionType, QualType FunctionType)
TemplateDeductionResult DeduceTemplateArguments (ClassTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
 Perform template argument deduction to determine whether the given template arguments match the given class template partial specialization per C++ [temp.class.spec.match].
TemplateDeductionResult DeduceTemplateArguments (VarTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
 Perform template argument deduction to determine whether the given template arguments match the given variable template partial specialization per C++ [temp.class.spec.match]. TODO: Unify with ClassTemplatePartialSpecializationDecl version? May require unifying ClassTemplate(Partial)SpecializationDecl and VarTemplate(Partial)SpecializationDecl with a new data structure Template(Partial)SpecializationDecl, and using Template(Partial)SpecializationDecl as input type.
TemplateDeductionResult SubstituteExplicitTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo &ExplicitTemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, SmallVectorImpl< QualType > &ParamTypes, QualType *FunctionType, sema::TemplateDeductionInfo &Info)
 Substitute the explicitly-provided template arguments into the given function template according to C++ [temp.arg.explicit].
TemplateDeductionResult FinishTemplateArgumentDeduction (FunctionTemplateDecl *FunctionTemplate, SmallVectorImpl< DeducedTemplateArgument > &Deduced, unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, SmallVectorImpl< OriginalCallArg > const *OriginalCallArgs=nullptr)
 Finish template argument deduction for a function template, checking the deduced template arguments for completeness and forming the function template specialization.
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
 Perform template argument deduction from a function call (C++ [temp.deduct.call]).
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ArgFunctionType, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool InOverloadResolution=false)
 Deduce template arguments when taking the address of a function template (C++ [temp.deduct.funcaddr]) or matching a specialization to a template.
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, QualType ToType, CXXConversionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
 Deduce template arguments for a templated conversion function (C++ [temp.deduct.conv]) and, if successful, produce a conversion function template specialization.
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool InOverloadResolution=false)
 Deduce template arguments for a function template when there is nothing to deduce against (C++0x [temp.arg.explicit]p3).
QualType SubstAutoType (QualType TypeWithAuto, QualType Replacement)
 Substitute Replacement for auto in TypeWithAuto.
TypeSourceInfoSubstAutoTypeSourceInfo (TypeSourceInfo *TypeWithAuto, QualType Replacement)
 Substitute Replacement for auto in TypeWithAuto.
DeduceAutoResult DeduceAutoType (TypeSourceInfo *AutoType, Expr *&Initializer, QualType &Result)
DeduceAutoResult DeduceAutoType (TypeLoc AutoTypeLoc, Expr *&Initializer, QualType &Result)
 Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6)
void DiagnoseAutoDeductionFailure (VarDecl *VDecl, Expr *Init)
bool DeduceReturnType (FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true)
bool DeduceFunctionTypeFromReturnExpr (FunctionDecl *FD, SourceLocation ReturnLoc, Expr *&RetExpr, AutoType *AT)
FunctionTemplateDeclgetMoreSpecializedTemplate (FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, unsigned NumCallArguments2)
 Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]).
UnresolvedSetIterator getMostSpecialized (UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplateSpecCandidateSet &FailedCandidates, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain=true, QualType TargetType=QualType())
 Retrieve the most specialized of the given function template specializations.
ClassTemplatePartialSpecializationDeclgetMoreSpecializedPartialSpecialization (ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
 Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]).
VarTemplatePartialSpecializationDeclgetMoreSpecializedPartialSpecialization (VarTemplatePartialSpecializationDecl *PS1, VarTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
void MarkUsedTemplateParameters (const TemplateArgumentList &TemplateArgs, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
 Mark which template parameters can be deduced from a given template argument list.
void MarkDeducedTemplateParameters (const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
MultiLevelTemplateArgumentList getTemplateInstantiationArgs (NamedDecl *D, const TemplateArgumentList *Innermost=nullptr, bool RelativeToPrimary=false, const FunctionDecl *Pattern=nullptr)
 Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.
llvm::DenseSet< Module * > & getLookupModules ()
 Get the set of additional modules that should be checked during name lookup. A module and its imports become visible when instanting a template defined within it.
void PrintInstantiationStack ()
 Prints the current instantiation stack through a series of notes.
Optional
< sema::TemplateDeductionInfo * > 
isSFINAEContext () const
 Determines whether we are currently in a context where template argument substitution failures are not considered errors.
bool isUnevaluatedContext () const
 Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
void PerformPendingInstantiations (bool LocalOnly=false)
 Performs template instantiation for all implicit template instantiations we have seen until this point.
TypeSourceInfoSubstType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
 Perform substitution on the type T with a given set of template arguments.
QualType SubstType (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
 Deprecated form of the above.
TypeSourceInfoSubstType (TypeLoc TL, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
TypeSourceInfoSubstFunctionDeclType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext, unsigned ThisTypeQuals)
ParmVarDeclSubstParmVarDecl (ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, Optional< unsigned > NumExpansions, bool ExpectParameterPack)
bool SubstParmTypes (SourceLocation Loc, ParmVarDecl **Params, unsigned NumParams, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< QualType > &ParamTypes, SmallVectorImpl< ParmVarDecl * > *OutParams=nullptr)
 Substitute the given template arguments into the given set of parameters, producing the set of parameter types that would be generated from such a substitution.
ExprResult SubstExpr (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
bool SubstExprs (Expr **Exprs, unsigned NumExprs, bool IsCall, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< Expr * > &Outputs)
 Substitute the given template arguments into a list of expressions, expanding pack expansions if required.
StmtResult SubstStmt (Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs)
DeclSubstDecl (Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
ExprResult SubstInitializer (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs, bool CXXDirectInit)
bool SubstBaseSpecifiers (CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
 Perform substitution on the base class specifiers of the given class template specialization.
bool InstantiateClass (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true)
 Instantiate the definition of a class from a given pattern.
bool InstantiateEnum (SourceLocation PointOfInstantiation, EnumDecl *Instantiation, EnumDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
 Instantiate the definition of an enum from a given pattern.
void InstantiateAttrs (const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
bool InstantiateClassTemplateSpecialization (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK, bool Complain=true)
void InstantiateClassMembers (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
 Instantiates the definitions of all of the member of the given class, which is an instantiation of a class template or a member class of a template.
void InstantiateClassTemplateSpecializationMembers (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK)
 Instantiate the definitions of all of the members of the given class template specialization, which was named as part of an explicit instantiation.
NestedNameSpecifierLoc SubstNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS, const MultiLevelTemplateArgumentList &TemplateArgs)
DeclarationNameInfo SubstDeclarationNameInfo (const DeclarationNameInfo &NameInfo, const MultiLevelTemplateArgumentList &TemplateArgs)
 Do template substitution on declaration name info.
TemplateName SubstTemplateName (NestedNameSpecifierLoc QualifierLoc, TemplateName Name, SourceLocation Loc, const MultiLevelTemplateArgumentList &TemplateArgs)
bool Subst (const TemplateArgumentLoc *Args, unsigned NumArgs, TemplateArgumentListInfo &Result, const MultiLevelTemplateArgumentList &TemplateArgs)
void InstantiateExceptionSpec (SourceLocation PointOfInstantiation, FunctionDecl *Function)
void InstantiateFunctionDefinition (SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive=false, bool DefinitionRequired=false)
 Instantiate the definition of the given function from its template.
VarTemplateSpecializationDeclBuildVarTemplateInstantiation (VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList &TemplateArgList, const TemplateArgumentListInfo &TemplateArgsInfo, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, void *InsertPos, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr)
VarTemplateSpecializationDeclCompleteVarTemplateSpecializationDecl (VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs)
 Instantiates a variable template specialization by completing it with appropriate type information and initializer.
void BuildVariableInstantiation (VarDecl *NewVar, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs, LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, bool InstantiatingVarTemplate=false)
void InstantiateVariableInitializer (VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs)
 Instantiate the initializer of a variable.
void InstantiateVariableDefinition (SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false)
void InstantiateStaticDataMemberDefinition (SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false)
 Instantiate the definition of the given variable from its template.
void InstantiateMemInitializers (CXXConstructorDecl *New, const CXXConstructorDecl *Tmpl, const MultiLevelTemplateArgumentList &TemplateArgs)
NamedDeclFindInstantiatedDecl (SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs)
 Find the instantiation of the given declaration within the current instantiation.
DeclContextFindInstantiatedContext (SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs)
 Finds the instantiation of the given declaration context within the current instantiation.
ObjCContainerKind getObjCContainerKind () const
DeclActOnStartClassInterface (SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, AttributeList *AttrList)
void ActOnTypedefedProtocols (SmallVectorImpl< Decl * > &ProtocolRefs, IdentifierInfo *SuperName, SourceLocation SuperLoc)
DeclActOnCompatibilityAlias (SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation)
bool CheckForwardProtocolDeclarationForCircularDependency (IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList)
DeclActOnStartProtocolInterface (SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, AttributeList *AttrList)
DeclActOnStartCategoryInterface (SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc)
DeclActOnStartClassImplementation (SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc)
DeclActOnStartCategoryImplementation (SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc)
DeclGroupPtrTy ActOnFinishObjCImplementation (Decl *ObjCImpDecl, ArrayRef< Decl * > Decls)
DeclGroupPtrTy ActOnForwardClassDeclaration (SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, unsigned NumElts)
 ActOnForwardClassDeclaration -.
DeclGroupPtrTy ActOnForwardProtocolDeclaration (SourceLocation AtProtoclLoc, const IdentifierLocPair *IdentList, unsigned NumElts, AttributeList *attrList)
 ActOnForwardProtocolDeclaration - Handle @protocol foo;.
void FindProtocolDeclaration (bool WarnOnDeclarations, const IdentifierLocPair *ProtocolId, unsigned NumProtocols, SmallVectorImpl< Decl * > &Protocols)
void CheckObjCPropertyAttributes (Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass)
void ProcessPropertyDecl (ObjCPropertyDecl *property, ObjCContainerDecl *CD, ObjCPropertyDecl *redeclaredProperty=nullptr, ObjCContainerDecl *lexicalDC=nullptr)
void DiagnosePropertyMismatch (ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty)
void DiagnoseClassExtensionDupMethods (ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
DeclActOnAtEnd (Scope *S, SourceRange AtEnd, ArrayRef< Decl * > allMethods=None, ArrayRef< DeclGroupPtrTy > allTUVars=None)
DeclActOnProperty (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, bool *OverridingProperty, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
DeclActOnPropertyImplDecl (Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool ImplKind, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc)
DeclActOnMethodDeclaration (Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, AttributeList *AttrList, tok::ObjCKeywordKind MethodImplKind, bool isVariadic, bool MethodDefinition)
ObjCMethodDeclLookupMethodInQualifiedType (Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
ObjCMethodDeclLookupMethodInObjectType (Selector Sel, QualType Ty, bool IsInstance)
 LookupMethodInType - Look up a method in an ObjCObjectType.
bool CheckARCMethodDecl (ObjCMethodDecl *method)
 Check a method declaration for compatibility with the Objective-C ARC conventions.
bool inferObjCARCLifetime (ValueDecl *decl)
ExprResult HandleExprPropertyRefExpr (const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
ExprResult ActOnClassPropertyRefExpr (IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc)
ObjCMethodDecltryCaptureObjCSelf (SourceLocation Loc)
 Try to capture an implicit reference to 'self'.
ObjCMessageKind getObjCMessageKind (Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType)
ExprResult ActOnSuperMessage (Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
ExprResult BuildClassMessage (TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
 Build an Objective-C class message expression.
ExprResult BuildClassMessageImplicit (QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
ExprResult ActOnClassMessage (Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
ExprResult BuildInstanceMessage (Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
 Build an Objective-C instance message expression.
ExprResult BuildInstanceMessageImplicit (Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
ExprResult ActOnInstanceMessage (Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
ExprResult BuildObjCBridgedCast (SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr)
ExprResult ActOnObjCBridgedCast (Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr)
void CheckTollFreeBridgeCast (QualType castType, Expr *castExpr)
void CheckObjCBridgeRelatedCast (QualType castType, Expr *castExpr)
bool CheckTollFreeBridgeStaticCast (QualType castType, Expr *castExpr, CastKind &Kind)
bool checkObjCBridgeRelatedComponents (SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs)
bool CheckObjCBridgeRelatedConversions (SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr)
bool ConversionToObjCStringLiteralCheck (QualType DstType, Expr *&SrcExpr)
bool checkInitMethod (ObjCMethodDecl *method, QualType receiverTypeIfCall)
void CheckObjCMethodOverride (ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden)
 Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited.
void CheckObjCMethodOverrides (ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC)
void ActOnPragmaOptionsAlign (PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc)
 ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
void ActOnPragmaPack (PragmaPackKind Kind, IdentifierInfo *Name, Expr *Alignment, SourceLocation PragmaLoc, SourceLocation LParenLoc, SourceLocation RParenLoc)
 ActOnPragmaPack - Called on well formed #pragma pack(...).
void ActOnPragmaMSStruct (PragmaMSStructKind Kind)
 ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].
void ActOnPragmaMSComment (PragmaMSCommentKind Kind, StringRef Arg)
void ActOnPragmaMSPointersToMembers (LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc)
void ActOnPragmaMSVtorDisp (PragmaVtorDispKind Kind, SourceLocation PragmaLoc, MSVtorDispAttr::Mode Value)
 Called on well formed #pragma vtordisp().
bool UnifySection (const StringRef &SectionName, int SectionFlags, DeclaratorDecl *TheDecl)
bool UnifySection (const StringRef &SectionName, int SectionFlags, SourceLocation PragmaSectionLocation)
void ActOnPragmaMSSeg (SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName)
 Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.
void ActOnPragmaMSSection (SourceLocation PragmaLocation, int SectionFlags, StringLiteral *SegmentName)
 Called on well formed #pragma section().
void ActOnPragmaMSInitSeg (SourceLocation PragmaLocation, StringLiteral *SegmentName)
 Called on well-formed #pragma init_seg().
void ActOnPragmaDetectMismatch (StringRef Name, StringRef Value)
 ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.
void ActOnPragmaUnused (const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc)
 ActOnPragmaUnused - Called on well-formed '#pragma unused'.
void ActOnPragmaVisibility (const IdentifierInfo *VisType, SourceLocation PragmaLoc)
 ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
NamedDeclDeclClonePragmaWeak (NamedDecl *ND, IdentifierInfo *II, SourceLocation Loc)
void DeclApplyPragmaWeak (Scope *S, NamedDecl *ND, WeakInfo &W)
void ActOnPragmaWeakID (IdentifierInfo *WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc)
 ActOnPragmaWeakID - Called on well formed #pragma weak ident.
void ActOnPragmaRedefineExtname (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
void ActOnPragmaWeakAlias (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
 ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
void ActOnPragmaFPContract (tok::OnOffSwitch OOS)
void AddAlignmentAttributesForRecord (RecordDecl *RD)
void AddMsStructLayoutForRecord (RecordDecl *RD)
 AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
void FreePackedContext ()
 FreePackedContext - Deallocate and null out PackContext.
void PushNamespaceVisibilityAttr (const VisibilityAttr *Attr, SourceLocation Loc)
void AddPushedVisibilityAttribute (Decl *RD)
void PopPragmaVisibility (bool IsNamespaceEnd, SourceLocation EndLoc)
void FreeVisContext ()
 FreeVisContext - Deallocate and null out VisContext.
void AddCFAuditedAttribute (Decl *D)
void ActOnPragmaOptimize (bool On, SourceLocation PragmaLoc)
 Called on well formed #pragma clang optimize.
SourceLocation getOptimizeOffPragmaLocation () const
 Get the location for the currently active "\#pragma clang optimize off". If this location is invalid, then the state of the pragma is "on".
void AddRangeBasedOptnone (FunctionDecl *FD)
 Only called on function definitions; if there is a pragma in scope with the effect of a range-based optnone, consider marking the function with attribute optnone.
void AddOptnoneAttributeIfNoConflicts (FunctionDecl *FD, SourceLocation Loc)
 Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents the location causing the 'optnone' attribute to be added (usually because of a pragma).
void AddAlignedAttr (SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex, bool IsPackExpansion)
 AddAlignedAttr - Adds an aligned attribute to a particular declaration.
void AddAlignedAttr (SourceRange AttrRange, Decl *D, TypeSourceInfo *T, unsigned SpellingListIndex, bool IsPackExpansion)
ExprResult PerformOpenMPImplicitIntegerConversion (SourceLocation OpLoc, Expr *Op)
void StartOpenMPDSABlock (OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
 Called on start of new data sharing attribute block.
void EndOpenMPDSABlock (Stmt *CurDirective)
 Called on end of data sharing attribute block.
ExprResult ActOnOpenMPIdExpression (Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id)
 Called on correct id-expression from the '#pragma omp threadprivate'.
DeclGroupPtrTy ActOnOpenMPThreadprivateDirective (SourceLocation Loc, ArrayRef< Expr * > VarList)
 Called on well-formed '#pragma omp threadprivate'.
OMPThreadPrivateDeclCheckOMPThreadPrivateDecl (SourceLocation Loc, ArrayRef< Expr * > VarList)
 Builds a new OpenMPThreadPrivateDecl and checks its correctness.
void ActOnOpenMPRegionStart (OpenMPDirectiveKind DKind, Scope *CurScope)
 Initialization of captured region for OpenMP region.
StmtResult ActOnOpenMPExecutableDirective (OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
StmtResult ActOnOpenMPParallelDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp parallel' after parsing of the associated statement.
StmtResult ActOnOpenMPSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp simd' after parsing of the associated statement.
StmtResult ActOnOpenMPForDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp for' after parsing of the associated statement.
StmtResult ActOnOpenMPSectionsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp sections' after parsing of the associated statement.
StmtResult ActOnOpenMPSectionDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp section' after parsing of the associated statement.
StmtResult ActOnOpenMPSingleDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp single' after parsing of the associated statement.
StmtResult ActOnOpenMPMasterDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp master' after parsing of the associated statement.
StmtResult ActOnOpenMPCriticalDirective (const DeclarationNameInfo &DirName, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp critical' after parsing of the associated statement.
StmtResult ActOnOpenMPParallelForDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.
StmtResult ActOnOpenMPParallelSectionsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.
StmtResult ActOnOpenMPTaskDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp task' after parsing of the associated statement.
StmtResult ActOnOpenMPTaskyieldDirective (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp taskyield'.
StmtResult ActOnOpenMPBarrierDirective (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp barrier'.
StmtResult ActOnOpenMPTaskwaitDirective (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp taskwait'.
StmtResult ActOnOpenMPFlushDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp flush'.
StmtResult ActOnOpenMPOrderedDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp ordered' after parsing of the associated statement.
StmtResult ActOnOpenMPAtomicDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp atomic' after parsing of the associated statement.
OMPClauseActOnOpenMPSingleExprClause (OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
OMPClauseActOnOpenMPIfClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'if' clause.
OMPClauseActOnOpenMPFinalClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'final' clause.
OMPClauseActOnOpenMPNumThreadsClause (Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'num_threads' clause.
OMPClauseActOnOpenMPSafelenClause (Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'safelen' clause.
OMPClauseActOnOpenMPCollapseClause (Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'collapse' clause.
OMPClauseActOnOpenMPSimpleClause (OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
OMPClauseActOnOpenMPDefaultClause (OpenMPDefaultClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'default' clause.
OMPClauseActOnOpenMPProcBindClause (OpenMPProcBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'proc_bind' clause.
OMPClauseActOnOpenMPSingleExprWithArgClause (OpenMPClauseKind Kind, unsigned Argument, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ArgumentLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
OMPClauseActOnOpenMPScheduleClause (OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
 Called on well-formed 'schedule' clause.
OMPClauseActOnOpenMPClause (OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc)
OMPClauseActOnOpenMPOrderedClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'ordered' clause.
OMPClauseActOnOpenMPNowaitClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'nowait' clause.
OMPClauseActOnOpenMPUntiedClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'untied' clause.
OMPClauseActOnOpenMPMergeableClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'mergeable' clause.
OMPClauseActOnOpenMPReadClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'read' clause.
OMPClauseActOnOpenMPWriteClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'write' clause.
OMPClauseActOnOpenMPUpdateClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'update' clause.
OMPClauseActOnOpenMPCaptureClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'capture' clause.
OMPClauseActOnOpenMPSeqCstClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'seq_cst' clause.
OMPClauseActOnOpenMPVarListClause (OpenMPClauseKind Kind, ArrayRef< Expr * > Vars, Expr *TailExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId)
OMPClauseActOnOpenMPPrivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'private' clause.
OMPClauseActOnOpenMPFirstprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'firstprivate' clause.
OMPClauseActOnOpenMPLastprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'lastprivate' clause.
OMPClauseActOnOpenMPSharedClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'shared' clause.
OMPClauseActOnOpenMPReductionClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId)
 Called on well-formed 'reduction' clause.
OMPClauseActOnOpenMPLinearClause (ArrayRef< Expr * > VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
 Called on well-formed 'linear' clause.
OMPClauseActOnOpenMPAlignedClause (ArrayRef< Expr * > VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
 Called on well-formed 'aligned' clause.
OMPClauseActOnOpenMPCopyinClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'copyin' clause.
OMPClauseActOnOpenMPCopyprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'copyprivate' clause.
OMPClauseActOnOpenMPFlushClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'flush' pseudo clause.
ExprResult ImpCastExprToType (Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_RValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
ExprResult IgnoredValueConversions (Expr *E)
ExprResult UsualUnaryConversions (Expr *E)
ExprResult CallExprUnaryConversions (Expr *E)
ExprResult DefaultFunctionArrayConversion (Expr *E)
 DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
ExprResult DefaultFunctionArrayLvalueConversion (Expr *E)
ExprResult DefaultLvalueConversion (Expr *E)
ExprResult DefaultArgumentPromotion (Expr *E)
VariadicCallType getVariadicCallType (FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn)
VarArgKind isValidVarArgType (const QualType &Ty)
void checkVariadicArgument (const Expr *E, VariadicCallType CT)
bool hasCStrMethod (const Expr *E)
 Check to see if a given expression could have '.c_str()' called on it.
bool GatherArgumentsForCall (SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr * > Args, SmallVectorImpl< Expr * > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false)
ExprResult DefaultVariadicArgumentPromotion (Expr *E, VariadicCallType CT, FunctionDecl *FDecl)
QualType UsualArithmeticConversions (ExprResult &LHS, ExprResult &RHS, bool IsCompAssign=false)
bool DiagnoseAssignmentResult (AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr)
void DiagnoseAssignmentEnum (QualType DstType, QualType SrcType, Expr *SrcExpr)
AssignConvertType CheckAssignmentConstraints (SourceLocation Loc, QualType LHSType, QualType RHSType)
AssignConvertType CheckAssignmentConstraints (QualType LHSType, ExprResult &RHS, CastKind &Kind)
AssignConvertType CheckSingleAssignmentConstraints (QualType LHSType, ExprResult &RHS, bool Diagnose=true, bool DiagnoseCFAudited=false)
AssignConvertType CheckTransparentUnionArgumentConstraints (QualType ArgType, ExprResult &RHS)
bool IsStringLiteralToNonConstPointerConversion (Expr *From, QualType ToType)
bool CheckExceptionSpecCompatibility (Expr *From, QualType ToType)
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false)
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit, ImplicitConversionSequence &ICS)
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, const ImplicitConversionSequence &ICS, AssignmentAction Action, CheckedConversionKind CCK=CCK_ImplicitConversion)
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK)
QualType InvalidOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
 type checking binary operators (subroutines of CreateBuiltinBinOp).
QualType CheckPointerToMemberOperands (ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation OpLoc, bool isIndirect)
QualType CheckMultiplyDivideOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool IsDivide)
QualType CheckRemainderOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false)
QualType CheckAdditionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc, QualType *CompLHSTy=nullptr)
QualType CheckSubtractionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=nullptr)
QualType CheckShiftOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc, bool IsCompAssign=false)
QualType CheckCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned OpaqueOpc, bool isRelational)
QualType CheckBitwiseOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false)
QualType CheckLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, unsigned Opc)
QualType CheckAssignmentOperands (Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType)
ExprResult checkPseudoObjectIncDec (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opcode, Expr *Op)
 Check an increment or decrement of a pseudo-object expression.
ExprResult checkPseudoObjectAssignment (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opcode, Expr *LHS, Expr *RHS)
ExprResult checkPseudoObjectRValue (Expr *E)
ExprrecreateSyntacticForm (PseudoObjectExpr *E)
QualType CheckConditionalOperands (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc)
QualType CXXCheckConditionalOperands (ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc)
 Check the operands of ?: under C++ semantics.
QualType FindCompositePointerType (SourceLocation Loc, Expr *&E1, Expr *&E2, bool *NonStandardCompositeType=nullptr)
 Find a merged pointer type and convert the two expressions to it.
QualType FindCompositePointerType (SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool *NonStandardCompositeType=nullptr)
QualType FindCompositeObjCPointerType (ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
bool DiagnoseConditionalForNull (Expr *LHSExpr, Expr *RHSExpr, SourceLocation QuestionLoc)
 Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a pointer. Returns true if a diagnostic is emitted.
void DiagnoseAlwaysNonNullPointer (Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range)
 Diagnose pointers that are always non-null.
QualType CheckVectorOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
 type checking for vector binary operators.
QualType GetSignedVectorType (QualType V)
QualType CheckVectorCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool isRelational)
QualType CheckVectorLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc)
bool isLaxVectorConversion (QualType srcType, QualType destType)
 Is this a legal conversion between two known vector types?
bool CheckForConstantInitializer (Expr *e, QualType t)
 type checking declaration initializers (C99 6.7.8)
ReferenceCompareResult CompareReferenceRelationship (SourceLocation Loc, QualType T1, QualType T2, bool &DerivedToBase, bool &ObjCConversion, bool &ObjCLifetimeConversion)
ExprResult checkUnknownAnyCast (SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path)
ExprResult forceUnknownAnyToType (Expr *E, QualType ToType)
 Force an expression with unknown-type to an expression of the given type.
ExprResult checkUnknownAnyArg (SourceLocation callLoc, Expr *result, QualType &paramType)
 Type-check an expression that's being passed to an __unknown_anytype parameter.
bool CheckVectorCast (SourceRange R, QualType VectorTy, QualType Ty, CastKind &Kind)
ExprResult CheckExtVectorCast (SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind)
ExprResult BuildCXXFunctionalCastExpr (TypeSourceInfo *TInfo, SourceLocation LParenLoc, Expr *CastExpr, SourceLocation RParenLoc)
ARCConversionResult CheckObjCARCConversion (SourceRange castRange, QualType castType, Expr *&op, CheckedConversionKind CCK, bool DiagnoseCFAudited=false, BinaryOperatorKind Opc=BO_PtrMemD)
 Checks for invalid conversions and casts between retainable pointers and other pointer kinds.
ExprstripARCUnbridgedCast (Expr *e)
void diagnoseARCUnbridgedCast (Expr *e)
bool CheckObjCARCUnavailableWeakConversion (QualType castType, QualType ExprType)
void checkRetainCycles (ObjCMessageExpr *msg)
 Check a message send to see if it's likely to cause a retain cycle.
void checkRetainCycles (Expr *receiver, Expr *argument)
 Check a property assign to see if it's likely to cause a retain cycle.
void checkRetainCycles (VarDecl *Var, Expr *Init)
bool checkUnsafeAssigns (SourceLocation Loc, QualType LHS, Expr *RHS)
void checkUnsafeExprAssigns (SourceLocation Loc, Expr *LHS, Expr *RHS)
bool CheckMessageArgumentTypes (QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK)
QualType getMessageSendResultType (QualType ReceiverType, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage)
 Determine the result of a message send expression based on the type of the receiver, the method expected to receive the message, and the form of the message send.
void EmitRelatedResultTypeNote (const Expr *E)
 If the given expression involves a message send to a method with a related result type, emit a note describing what happened.
void EmitRelatedResultTypeNoteForReturn (QualType destType)
 Given that we had incompatible pointer types in a return statement, check whether we're in a method with a related result type, and if so, emit a note describing what happened.
ExprResult CheckBooleanCondition (Expr *E, SourceLocation Loc)
ExprResult ActOnBooleanCondition (Scope *S, SourceLocation Loc, Expr *SubExpr)
void DiagnoseAssignmentAsCondition (Expr *E)
void DiagnoseEqualityWithExtraParens (ParenExpr *ParenE)
 Redundant parentheses over an equality comparison can indicate that the user intended an assignment used as condition.
ExprResult CheckCXXBooleanCondition (Expr *CondExpr)
 CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
void ConvertIntegerToTypeWarnOnOverflow (llvm::APSInt &OldVal, unsigned NewWidth, bool NewSign, SourceLocation Loc, unsigned DiagID)
bool CheckObjCDeclScope (Decl *D)
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, bool AllowFold=true)
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, unsigned DiagID, bool AllowFold=true)
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result=nullptr)
ExprResult VerifyBitField (SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth, bool *ZeroWidth=nullptr)
CUDAFunctionTarget IdentifyCUDATarget (const FunctionDecl *D)
 IdentifyCUDATarget - Determine the CUDA compilation target for this function.
bool CheckCUDATarget (CUDAFunctionTarget CallerTarget, CUDAFunctionTarget CalleeTarget)
bool CheckCUDATarget (const FunctionDecl *Caller, const FunctionDecl *Callee)
SourceLocation getLocationOfStringLiteralByte (const StringLiteral *SL, unsigned ByteNo) const
ExprResult SemaBuiltinShuffleVector (CallExpr *TheCall)
 SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
ExprResult SemaConvertVectorExpr (Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 SemaConvertVectorExpr - Handle __builtin_convertvector.
void CheckFormatString (const StringLiteral *FExpr, const Expr *OrigFormatExpr, ArrayRef< const Expr * > Args, bool HasVAListArg, unsigned format_idx, unsigned firstDataArg, FormatStringType Type, bool inFunctionCall, VariadicCallType CallType, llvm::SmallBitVector &CheckedVarArgs)
void RegisterTypeTagForDatatype (const IdentifierInfo *ArgumentKind, uint64_t MagicValue, QualType Type, bool LayoutCompatible, bool MustBeNull)
 Register a magic integral constant to be used as a type tag.
ScopegetCurScope () const
 Retrieve the parser's current scope.
void incrementMSLocalManglingNumber () const
IdentifierInfogetSuperIdentifier () const
IdentifierInfogetFloat128Identifier () const
DeclgetObjCDeclContext () const
DeclContextgetCurLexicalContext () const
AvailabilityResult getCurContextAvailability () const
const DeclContextgetCurObjCLexicalContext () const

Static Public Member Functions

static QualType GetTypeFromParser (ParsedType Ty, TypeSourceInfo **TInfo=nullptr)
static int getPrintable (int I)
static unsigned getPrintable (unsigned I)
static bool getPrintable (bool B)
static const char * getPrintable (const char *S)
static StringRef getPrintable (StringRef S)
static const std::string & getPrintable (const std::string &S)
static const IdentifierInfogetPrintable (const IdentifierInfo *II)
static DeclarationName getPrintable (DeclarationName N)
static QualType getPrintable (QualType T)
static SourceRange getPrintable (SourceRange R)
static SourceRange getPrintable (SourceLocation L)
static SourceRange getPrintable (Expr *E)
static SourceRange getPrintable (TypeLoc TL)
static bool adjustContextForLocalExternDecl (DeclContext *&DC)
static PrintingPolicy getPrintingPolicy (const ASTContext &Ctx, const Preprocessor &PP)
 Retrieve a suitable printing policy.
static ScopegetScopeForDeclContext (Scope *S, DeclContext *DC)
static void MarkDeducedTemplateParameters (ASTContext &Ctx, const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
 Marks all of the template parameters that will be deduced by a call to the given function template.
static CastKind ScalarTypeToBooleanCastKind (QualType ScalarTy)
static FormatStringType GetFormatStringType (const FormatAttr *Format)

Public Attributes

OpenCLOptions OpenCLFeatures
FPOptions FPFeatures
const LangOptionsLangOpts
PreprocessorPP
ASTContextContext
ASTConsumerConsumer
DiagnosticsEngineDiags
SourceManagerSourceMgr
bool CollectStats
 Flag indicating whether or not to collect detailed statistics.
CodeCompleteConsumerCodeCompleter
 Code-completion consumer.
DeclContextCurContext
 CurContext - This is the current declaration context of parsing.
DeclContextOriginalLexicalContext
 Generally null except when we temporarily switch decl contexts, like in.
DeclarationName VAListTagName
void * PackContext
bool MSStructPragmaOn
LangOptions::PragmaMSPointersToMembersKind MSPointerToMemberRepresentationMethod
 Controls member pointer representation format under the MS ABI.
SmallVector
< MSVtorDispAttr::Mode, 2 > 
VtorDispModeStack
 Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI. Possible values are 0, 1, and 2, which mean:
SourceLocation ImplicitMSInheritanceAttrLoc
 Source location for newly created implicit MSInheritanceAttrs.
PragmaStack< StringLiteral * > DataSegStack
PragmaStack< StringLiteral * > BSSSegStack
PragmaStack< StringLiteral * > ConstSegStack
PragmaStack< StringLiteral * > CodeSegStack
StringLiteralCurInitSeg
 Last section used with #pragma init_seg.
SourceLocation CurInitSegLoc
void * VisContext
 VisContext - Manages the stack for #pragma GCC visibility.
SourceLocation OptimizeOffPragmaLocation
 This represents the last location of a "#pragma clang optimize off" directive if such a directive has not been closed by an "on" yet. If optimizations are currently "on", this is set to an invalid location.
bool IsBuildingRecoveryCallExpr
 Flag indicating if Sema is building a recovery call expression.
bool ExprNeedsCleanups
SmallVector< BlockDecl *, 8 > ExprCleanupObjects
llvm::SmallPtrSet< Expr *, 2 > MaybeODRUseExprs
 Store a list of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) that may or may not be odr-used in this Expr, and we won't know until all lvalue-to-rvalue and discarded value conversions have been applied to all subexpressions of the enclosing full expression. This is cleared at the end of each full expression.
SmallVector
< sema::FunctionScopeInfo *, 4 > 
FunctionScopes
 Stack containing information about each of the nested function, block, and method scopes that are currently active.
ExtVectorDeclsType ExtVectorDecls
std::unique_ptr
< CXXFieldCollector
FieldCollector
 FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
NamedDeclSetType UnusedPrivateFields
 Set containing all declared private fields that are not used.
std::unique_ptr< RecordDeclSetTyPureVirtualClassDiagSet
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
llvm::DenseMap
< DeclarationName, NamedDecl * > 
LocallyScopedExternCDecls
 A mapping from external names to the most recent locally-scoped extern "C" declaration with that name.
TentativeDefinitionsType TentativeDefinitions
 All the tentative definitions encountered in the TU.
UnusedFileScopedDeclsType UnusedFileScopedDecls
 The set of file scoped decls seen so far that have not been used and must warn if not used. Only contains the first declaration.
DelegatingCtorDeclsType DelegatingCtorDecls
 All the delegating constructors seen so far in the file, used for cycle detection at the end of the TU.
SmallVector< std::pair< const
CXXDestructorDecl *, const
CXXDestructorDecl * >, 2 > 
DelayedDestructorExceptionSpecChecks
 All the overriding destructors seen during a class definition (there could be multiple due to nested classes) that had their exception spec checks delayed, plus the overridden destructor.
SmallVector< std::pair
< CXXMethodDecl *, const
FunctionProtoType * >, 2 > 
DelayedDefaultedMemberExceptionSpecs
 All the members seen during a class definition which were both explicitly defaulted and had explicitly-specified exception specifications, along with the function type containing their user-specified exception specification. Those exception specifications were overridden with the default specifications, but we still need to check whether they are compatible with the default specification, and we can't do that until the nesting set of class definitions is complete.
LateParsedTemplateMapT LateParsedTemplateMap
LateTemplateParserCBLateTemplateParser
void * OpaqueParser
class
clang::Sema::DelayedDiagnostics 
DelayedDiagnostics
llvm::DenseMap< IdentifierInfo
*, WeakInfo
WeakUndeclaredIdentifiers
llvm::DenseMap< IdentifierInfo
*, AsmLabelAttr * > 
ExtnameUndeclaredIdentifiers
SmallVector< Decl *, 2 > WeakTopLevelDecl
IdentifierResolver IdResolver
ScopeTUScope
LazyDeclPtr StdNamespace
 The C++ "std" namespace, where the standard library resides.
LazyDeclPtr StdBadAlloc
 The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
ClassTemplateDeclStdInitializerList
 The C++ "std::initializer_list" template, which is defined in <initializer_list>.
RecordDeclCXXTypeInfoDecl
 The C++ "type_info" declaration, which is defined in <typeinfo>.
RecordDeclMSVCGuidDecl
 The MSVC "_GUID" struct, which is defined in MSVC header files.
std::unique_ptr< NSAPINSAPIObj
 Caches identifiers/selectors for NSFoundation APIs.
ObjCInterfaceDeclNSNumberDecl
 The declaration of the Objective-C NSNumber class.
QualType NSNumberPointer
 Pointer to NSNumber type (NSNumber *).
ObjCMethodDeclNSNumberLiteralMethods [NSAPI::NumNSNumberLiteralMethods]
 The Objective-C NSNumber methods used to create NSNumber literals.
ObjCInterfaceDeclNSStringDecl
 The declaration of the Objective-C NSString class.
QualType NSStringPointer
 Pointer to NSString type (NSString *).
ObjCMethodDeclStringWithUTF8StringMethod
 The declaration of the stringWithUTF8String: method.
ObjCInterfaceDeclNSArrayDecl
 The declaration of the Objective-C NSArray class.
ObjCMethodDeclArrayWithObjectsMethod
 The declaration of the arrayWithObjects:count: method.
ObjCMethodDeclInitArrayWithObjectsMethod
 The declaration of the initWithObjects:count: method.
ObjCInterfaceDeclNSDictionaryDecl
 The declaration of the Objective-C NSDictionary class.
ObjCMethodDeclDictionaryWithObjectsMethod
 The declaration of the dictionaryWithObjects:forKeys:count: method.
ObjCMethodDeclInitDictionaryWithObjectsMethod
 The declaration of the initWithObjects:forKeys:count: method.
ObjCMethodDeclArrayAllocObjectsMethod
 The declaration for + (id) alloc method used in [NSArray alloc].
ObjCMethodDeclDictAllocObjectsMethod
 The declaration for + (id) alloc method used in [NSDictionary alloc].
QualType QIDNSCopying
 id<NSCopying> type.
Selector RespondsToSelectorSel
 will hold 'respondsToSelector:'
bool GlobalNewDeleteDeclared
bool AllowAbstractFieldReference
SmallVector
< ExpressionEvaluationContextRecord, 8 > 
ExprEvalContexts
 A stack of expression evaluation contexts.
llvm::FoldingSet
< SpecialMemberOverloadResult
SpecialMemberCache
 A cache of special member function overload resolution results for C++ records.
TranslationUnitKind TUKind
 The kind of translation unit we are processing.
llvm::BumpPtrAllocator BumpAlloc
unsigned NumSFINAEErrors
 The number of SFINAE diagnostics that have been trapped.
UnparsedDefaultArgInstantiationsMap UnparsedDefaultArgInstantiations
 A mapping from parameters with unparsed default arguments to the set of instantiations of each parameter.
llvm::DenseMap< ParmVarDecl
*, SourceLocation
UnparsedDefaultArgLocs
llvm::DenseMap< NamedDecl
*, SourceLocation
UndefinedButUsed
GlobalMethodPool MethodPool
llvm::DenseMap< Selector,
SourceLocation
ReferencedSelectors
llvm::SmallSet
< SpecialMemberDecl, 4 > 
SpecialMembersBeingDeclared
std::vector< NamedDecl * > DeclsInPrototypeScope
QualType CXXThisTypeOverride
 When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-static member function. In such cases, this provides the type used for 'this'.
SmallVector< VTableUse, 16 > VTableUses
 The list of vtables that are required but have not yet been materialized.
llvm::DenseMap< CXXRecordDecl
*, bool
VTablesUsed
 The set of classes whose vtables have been used within this translation unit, and a bit that will be true if the vtable is required to be emitted (otherwise, it should be emitted only if needed by code generation).
DynamicClassesType DynamicClasses
 A list of all of the dynamic classes in this translation unit.
bool AccessCheckingSFINAE
 When true, access checking violations are treated as SFINAE failures rather than hard errors.
SmallVector
< ActiveTemplateInstantiation, 16 > 
ActiveTemplateInstantiations
 List of active template instantiations.
SmallVector< Module *, 16 > ActiveTemplateInstantiationLookupModules
 Extra modules inspected when performing a lookup during a template instantiation. Computed lazily.
llvm::DenseSet< Module * > LookupModulesCache
 Cache of additional modules that should be used for name lookup within the current template instantiation. Computed lazily; use getLookupModules() to get a complete set.
bool InNonInstantiationSFINAEContext
 Whether we are in a SFINAE context that is not associated with template instantiation.
unsigned NonInstantiationEntries
 The number of ActiveTemplateInstantiation entries in ActiveTemplateInstantiations that are not actual instantiations and, therefore, should not be counted as part of the instantiation depth.
ActiveTemplateInstantiation LastTemplateInstantiationErrorContext
 The last template from which a template instantiation error or warning was produced.
int ArgumentPackSubstitutionIndex
 The current index into pack expansion arguments that will be used for substitution of parameter packs.
SmallVector< CallExpr *, 8 > CallsUndergoingInstantiation
 The stack of calls expression undergoing template instantiation.
SuppressedDiagnosticsMap SuppressedDiagnostics
LocalInstantiationScopeCurrentInstantiationScope
 The current instantiation scope used to store local variables.
bool DisableTypoCorrection
 Tracks whether we are in a context where typo correction is disabled.
unsigned TyposCorrected
 The number of typos corrected by CorrectTypo.
UnqualifiedTyposCorrectedMap UnqualifiedTyposCorrected
 A cache containing the results of typo correction for unqualified name lookup.
IdentifierSourceLocations TypoCorrectionFailures
 A cache containing identifiers for which typo correction failed and their locations, so that repeated attempts to correct an identifier in a given location are ignored if typo correction already failed for it.
sema::AnalysisBasedWarnings AnalysisWarnings
 Worker object for performing CFG-based warnings.
std::deque
< PendingImplicitInstantiation
PendingInstantiations
 The queue of implicit template instantiations that are required but have not yet been performed.
std::deque
< PendingImplicitInstantiation
PendingLocalImplicitInstantiations
 The queue of implicit template instantiations that are required and must be performed within the current local scope.
llvm::StringMap< SectionInfoSectionInfos

Friends

class ArgumentPackSubstitutionRAII
class Parser
class InitializationSequence
class ASTReader
class ASTWriter

Name lookup

These routines provide name lookup that is used during semantic analysis to resolve the various kinds of names (identifiers, overloaded operator names, constructor names, etc.) into zero or more declarations within a particular scope. The major entry points are LookupName, which performs unqualified name lookup, and LookupQualifiedName, which performs qualified name lookup.

All name lookup is performed based on some specific criteria, which specify what names will be visible to name lookup and how far name lookup should work. These criteria are important both for capturing language semantics (certain lookups will ignore certain names, for example) and for performance, since name lookup is often a bottleneck in the compilation of C++. Name lookup criteria is specified via the LookupCriteria enumeration.

The results of name lookup can vary based on the kind of name lookup performed, the current language, and the translation unit. In C, for example, name lookup will either return nothing (no entity found) or a single declaration. In C++, name lookup can additionally refer to a set of overloaded functions or result in an ambiguity. All of the possible results of name lookup are captured by the LookupResult class, which provides the ability to distinguish among them.

enum  LookupNameKind {
  LookupOrdinaryName = 0, LookupTagName, LookupLabel, LookupMemberName,
  LookupOperatorName, LookupNestedNameSpecifierName, LookupNamespaceName, LookupUsingDeclName,
  LookupRedeclarationWithLinkage, LookupLocalFriendName, LookupObjCProtocolName, LookupObjCImplicitSelfParam,
  LookupAnyName
}
 Describes the kind of name lookup to perform. More...
enum  RedeclarationKind { NotForRedeclaration = 0, ForRedeclaration }
 Specifies whether (or how) name lookup is being performed for a redeclaration (vs. a reference). More...
enum  LiteralOperatorLookupResult {
  LOLR_Error, LOLR_Cooked, LOLR_Raw, LOLR_Template,
  LOLR_StringTemplate
}
 The possible outcomes of name lookup for a literal operator. More...
enum  CorrectTypoKind { CTK_NonError, CTK_ErrorRecovery }
SpecialMemberOverloadResultLookupSpecialMember (CXXRecordDecl *D, CXXSpecialMember SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis)
NamedDeclLookupSingleName (Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=NotForRedeclaration)
 Look up a name, looking for a single declaration. Return null if the results were absent, ambiguous, or overloaded.
bool LookupName (LookupResult &R, Scope *S, bool AllowBuiltinCreation=false)
 Perform unqualified name lookup starting from a given scope.
bool LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
 Perform qualified name lookup into a given context.
bool LookupParsedName (LookupResult &R, Scope *S, CXXScopeSpec *SS, bool AllowBuiltinCreation=false, bool EnteringContext=false)
 Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope specifier.
ObjCProtocolDeclLookupProtocol (IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration)
 Find the protocol with the given name, if any.
void LookupOverloadedOperatorName (OverloadedOperatorKind Op, Scope *S, QualType T1, QualType T2, UnresolvedSetImpl &Functions)
void addOverloadedOperatorToUnresolvedSet (UnresolvedSetImpl &Functions, DeclAccessPair Operator, QualType T1, QualType T2)
LabelDeclLookupOrCreateLabel (IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation())
DeclContextLookupResult LookupConstructors (CXXRecordDecl *Class)
 Look up the constructors for the given class.
CXXConstructorDeclLookupDefaultConstructor (CXXRecordDecl *Class)
 Look up the default constructor for the given class.
CXXConstructorDeclLookupCopyingConstructor (CXXRecordDecl *Class, unsigned Quals)
 Look up the copying constructor for the given class.
CXXMethodDeclLookupCopyingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
 Look up the copying assignment operator for the given class.
CXXConstructorDeclLookupMovingConstructor (CXXRecordDecl *Class, unsigned Quals)
 Look up the moving constructor for the given class.
CXXMethodDeclLookupMovingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
 Look up the moving assignment operator for the given class.
CXXDestructorDeclLookupDestructor (CXXRecordDecl *Class)
 Look for the destructor of the given class.
bool checkLiteralOperatorId (const CXXScopeSpec &SS, const UnqualifiedId &Id)
LiteralOperatorLookupResult LookupLiteralOperator (Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate)
bool isKnownName (StringRef name)
void ArgumentDependentLookup (DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, ADLResult &Functions)
void LookupVisibleDecls (Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true)
void LookupVisibleDecls (DeclContext *Ctx, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true)
TypoCorrection CorrectTypo (const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr, bool RecordFailure=true)
 Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
void diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
void diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, const PartialDiagnostic &PrevNote, bool ErrorRecovery=true)
 Diagnose a successfully-corrected typo. Separated from the correction itself to allow external validation of the result, etc.
void FindAssociatedClassesAndNamespaces (SourceLocation InstantiationLoc, ArrayRef< Expr * > Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses)
 Find the associated classes and namespaces for argument-dependent lookup for a call with the given set of arguments.
void FilterLookupForScope (LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace)
void DiagnoseAmbiguousLookup (LookupResult &Result)
 Produce a diagnostic describing the ambiguity that resulted from name lookup.

Code completion

enum  ParserCompletionContext {
  PCC_Namespace, PCC_Class, PCC_ObjCInterface, PCC_ObjCImplementation,
  PCC_ObjCInstanceVariableList, PCC_Template, PCC_MemberTemplate, PCC_Expression,
  PCC_Statement, PCC_ForInit, PCC_Condition, PCC_RecoveryInFunction,
  PCC_Type, PCC_ParenthesizedExpression, PCC_LocalDeclarationSpecifiers
}
 Describes the context in which code completion occurs. More...
void CodeCompleteModuleImport (SourceLocation ImportLoc, ModuleIdPath Path)
void CodeCompleteOrdinaryName (Scope *S, ParserCompletionContext CompletionContext)
void CodeCompleteDeclSpec (Scope *S, DeclSpec &DS, bool AllowNonIdentifiers, bool AllowNestedNameSpecifiers)
void CodeCompleteExpression (Scope *S, const CodeCompleteExpressionData &Data)
 Perform code-completion in an expression context when we know what type we're looking for.
void CodeCompleteMemberReferenceExpr (Scope *S, Expr *Base, SourceLocation OpLoc, bool IsArrow)
void CodeCompletePostfixExpression (Scope *S, ExprResult LHS)
void CodeCompleteTag (Scope *S, unsigned TagSpec)
void CodeCompleteTypeQualifiers (DeclSpec &DS)
void CodeCompleteCase (Scope *S)
void CodeCompleteCall (Scope *S, Expr *Fn, ArrayRef< Expr * > Args)
void CodeCompleteInitializer (Scope *S, Decl *D)
void CodeCompleteReturn (Scope *S)
void CodeCompleteAfterIf (Scope *S)
void CodeCompleteAssignmentRHS (Scope *S, Expr *LHS)
void CodeCompleteQualifiedId (Scope *S, CXXScopeSpec &SS, bool EnteringContext)
void CodeCompleteUsing (Scope *S)
void CodeCompleteUsingDirective (Scope *S)
void CodeCompleteNamespaceDecl (Scope *S)
void CodeCompleteNamespaceAliasDecl (Scope *S)
void CodeCompleteOperatorName (Scope *S)
void CodeCompleteConstructorInitializer (Decl *Constructor, ArrayRef< CXXCtorInitializer * > Initializers)
void CodeCompleteLambdaIntroducer (Scope *S, LambdaIntroducer &Intro, bool AfterAmpersand)
void CodeCompleteObjCAtDirective (Scope *S)
void CodeCompleteObjCAtVisibility (Scope *S)
void CodeCompleteObjCAtStatement (Scope *S)
void CodeCompleteObjCAtExpression (Scope *S)
void CodeCompleteObjCPropertyFlags (Scope *S, ObjCDeclSpec &ODS)
void CodeCompleteObjCPropertyGetter (Scope *S)
void CodeCompleteObjCPropertySetter (Scope *S)
void CodeCompleteObjCPassingType (Scope *S, ObjCDeclSpec &DS, bool IsParameter)
void CodeCompleteObjCMessageReceiver (Scope *S)
void CodeCompleteObjCSuperMessage (Scope *S, SourceLocation SuperLoc, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression)
void CodeCompleteObjCClassMessage (Scope *S, ParsedType Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, bool IsSuper=false)
void CodeCompleteObjCInstanceMessage (Scope *S, Expr *Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, ObjCInterfaceDecl *Super=nullptr)
void CodeCompleteObjCForCollection (Scope *S, DeclGroupPtrTy IterationVar)
void CodeCompleteObjCSelector (Scope *S, ArrayRef< IdentifierInfo * > SelIdents)
void CodeCompleteObjCProtocolReferences (IdentifierLocPair *Protocols, unsigned NumProtocols)
void CodeCompleteObjCProtocolDecl (Scope *S)
void CodeCompleteObjCInterfaceDecl (Scope *S)
void CodeCompleteObjCSuperclass (Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void CodeCompleteObjCImplementationDecl (Scope *S)
void CodeCompleteObjCInterfaceCategory (Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void CodeCompleteObjCImplementationCategory (Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void CodeCompleteObjCPropertyDefinition (Scope *S)
void CodeCompleteObjCPropertySynthesizeIvar (Scope *S, IdentifierInfo *PropertyName)
void CodeCompleteObjCMethodDecl (Scope *S, bool IsInstanceMethod, ParsedType ReturnType)
void CodeCompleteObjCMethodDeclSelector (Scope *S, bool IsInstanceMethod, bool AtParameterName, ParsedType ReturnType, ArrayRef< IdentifierInfo * > SelIdents)
void CodeCompletePreprocessorDirective (bool InConditional)
void CodeCompleteInPreprocessorConditionalExclusion (Scope *S)
void CodeCompletePreprocessorMacroName (bool IsDefinition)
void CodeCompletePreprocessorExpression ()
void CodeCompletePreprocessorMacroArgument (Scope *S, IdentifierInfo *Macro, MacroInfo *MacroInfo, unsigned Argument)
void CodeCompleteNaturalLanguage ()
void GatherGlobalCodeCompletions (CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, SmallVectorImpl< CodeCompletionResult > &Results)

Detailed Description

Sema - This implements semantic analysis and AST building for C.

Definition at line 208 of file Sema.h.


Member Typedef Documentation

typedef llvm::SmallPtrSet<CXXRecordDecl *, 16> clang::Sema::AssociatedClassSet

Definition at line 2254 of file Sema.h.

typedef llvm::SmallPtrSet<DeclContext *, 16> clang::Sema::AssociatedNamespaceSet

Definition at line 2253 of file Sema.h.

typedef std::pair<StringRef, QualType> clang::Sema::CapturedParamNameType

Definition at line 3110 of file Sema.h.

Definition at line 232 of file Sema.h.

Definition at line 451 of file Sema.h.

Definition at line 4906 of file Sema.h.

Definition at line 378 of file Sema.h.

Definition at line 890 of file Sema.h.

Definition at line 889 of file Sema.h.

Definition at line 6547 of file Sema.h.

Definition at line 6714 of file Sema.h.

Definition at line 475 of file Sema.h.

Callback to the parser to parse templated functions when needed.

Definition at line 479 of file Sema.h.

typedef llvm::SmallSetVector<const NamedDecl*, 16> clang::Sema::NamedDeclSetType

Definition at line 388 of file Sema.h.

Definition at line 3232 of file Sema.h.

Definition at line 494 of file Sema.h.

An entity for which implicit template instantiation is required.

The source location associated with the declaration is the first place in the source code where the declaration was "used". It is not necessarily the point of instantiation (which will be either before or after the namespace-scope declaration that triggered this implicit instantiation), However, it is the location that diagnostics should generally refer to, because users will need to know what code triggered the instantiation.

Definition at line 6565 of file Sema.h.

Definition at line 495 of file Sema.h.

Definition at line 2755 of file Sema.h.

typedef llvm::SmallPtrSet<const CXXRecordDecl*, 8> clang::Sema::RecordDeclSetTy

Definition at line 393 of file Sema.h.

typedef llvm::SmallPtrSet<Selector, 8> clang::Sema::SelectorSet

Definition at line 2754 of file Sema.h.

Definition at line 915 of file Sema.h.

typedef llvm::SmallSet<SourceLocation, 2> clang::Sema::SrcLocSet

Definition at line 6546 of file Sema.h.

typedef llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> > clang::Sema::SuppressedDiagnosticsMap

For each declaration that involved template argument deduction, the set of diagnostics that were suppressed during that template argument deduction.

FIXME: Serialize this structure to the AST file.

Definition at line 6327 of file Sema.h.

Definition at line 233 of file Sema.h.

Definition at line 436 of file Sema.h.

typedef std::pair<const IdentifierInfo *, uint64_t> clang::Sema::TypeTagMagicValue

A pair of ArgumentKind identifier and magic value. This uniquely identifies the magic value.

Definition at line 8471 of file Sema.h.

Definition at line 234 of file Sema.h.

typedef llvm::DenseMap<ParmVarDecl *, llvm::TinyPtrVector<ParmVarDecl *> > clang::Sema::UnparsedDefaultArgInstantiationsMap

Definition at line 866 of file Sema.h.

Definition at line 6536 of file Sema.h.

Definition at line 443 of file Sema.h.

The list of classes whose vtables have been used within this translation unit, and the source locations at which the first use occurred.

Definition at line 4889 of file Sema.h.


Member Enumeration Documentation

Enumerator:
AbstractNone 
AbstractReturnType 
AbstractParamType 
AbstractVariableType 
AbstractFieldType 
AbstractIvarType 
AbstractSynthesizedIvarType 
AbstractArrayType 

Definition at line 5136 of file Sema.h.

Enumerator:
AR_accessible 
AR_inaccessible 
AR_dependent 
AR_delayed 

Definition at line 5069 of file Sema.h.

Enumerator:
ACR_okay 
ACR_unbridged 

Definition at line 8007 of file Sema.h.

AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the assignment was allowed. These checks are done for simple assignments, as well as initialization, return from function, argument passing, etc. The query is phrased in terms of a source and destination type.

Enumerator:
Compatible 

Compatible - the types are compatible according to the standard.

PointerToInt 

PointerToInt - The assignment converts a pointer to an int, which we accept as an extension.

IntToPointer 

IntToPointer - The assignment converts an int to a pointer, which we accept as an extension.

FunctionVoidPointer 

FunctionVoidPointer - The assignment is between a function pointer and void*, which the standard doesn't allow, but we accept as an extension.

IncompatiblePointer 

IncompatiblePointer - The assignment is between two pointers types that are not compatible, but we accept them as an extension.

IncompatiblePointerSign 

IncompatiblePointer - The assignment is between two pointers types which point to integers which have a different sign, but are otherwise identical. This is a subset of the above, but broken out because it's by far the most common case of incompatible pointers.

CompatiblePointerDiscardsQualifiers 

CompatiblePointerDiscardsQualifiers - The assignment discards c/v/r qualifiers, which we accept as an extension.

IncompatiblePointerDiscardsQualifiers 

IncompatiblePointerDiscardsQualifiers - The assignment discards qualifiers that we don't permit to be discarded, like address spaces.

IncompatibleNestedPointerQualifiers 

IncompatibleNestedPointerQualifiers - The assignment is between two nested pointer types, and the qualifiers other than the first two levels differ e.g. char ** -> const char **, but we accept them as an extension.

IncompatibleVectors 

IncompatibleVectors - The assignment is between two vector types that have the same size, which we accept as an extension.

IntToBlockPointer 

IntToBlockPointer - The assignment converts an int to a block pointer. We disallow this.

IncompatibleBlockPointer 

IncompatibleBlockPointer - The assignment is between two block pointers types that are not compatible.

IncompatibleObjCQualifiedId 

IncompatibleObjCQualifiedId - The assignment is between a qualified id type and something else (that is incompatible with it). For example, "id <XXX>" = "Foo *", where "Foo *" doesn't implement the XXX protocol.

IncompatibleObjCWeakRef 

IncompatibleObjCWeakRef - Assigning a weak-unavailable object to an object with __weak qualifier.

Incompatible 

Incompatible - We reject this conversion outright, it is invalid to represent it in the AST.

Definition at line 7728 of file Sema.h.

Enumerator:
AA_Assigning 
AA_Passing 
AA_Returning 
AA_Converting 
AA_Initializing 
AA_Sending 
AA_Casting 
AA_Passing_CFAudited 

Definition at line 2033 of file Sema.h.

Enumerator:
AD_Deprecation 
AD_Unavailable 

Definition at line 3242 of file