clang  mainline
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  BoundTypeDiagnoser
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
 A class which encapsulates the logic for delaying diagnostics during parsing and other processing. More...
class  DelayedDiagnosticsState
struct  ExpressionEvaluationContextRecord
 Data structure used to record current or nested expression evaluation contexts. More...
struct  FormatStringInfo
class  FPContractStateRAII
 Records and restores the FP_CONTRACT state on entry/exit of compound statements. More...
class  FullExprArg
struct  FunctionScopeRAII
 An RAII helper that pops function a function scope on exit. More...
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
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...
struct  SkipBodyInfo
class  SpecialMemberOverloadResult
 SpecialMemberOverloadResult - The overloading result for a special member function. More...
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
struct  TypoExprState
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  MissingImportKind { Declaration, Definition, DefaultArgument }
 Kinds of missing import. 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, AD_Partial }
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  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_MSVCUndefined,
  VAK_Invalid
}
enum  AssignConvertType {
  Compatible, PointerToInt, IntToPointer, FunctionVoidPointer,
  IncompatiblePointer, IncompatiblePointerSign, CompatiblePointerDiscardsQualifiers, IncompatiblePointerDiscardsQualifiers,
  IncompatibleNestedPointerQualifiers, IncompatibleVectors, IntToBlockPointer, IncompatibleBlockPointer,
  IncompatibleObjCQualifiedId, IncompatibleObjCWeakRef, Incompatible
}
 AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the assignment was allowed. More...
enum  ReferenceCompareResult { Ref_Incompatible = 0, Ref_Related, Ref_Compatible_With_Added_Qualification, Ref_Compatible }
 ReferenceCompareResult - Expresses the result of comparing two types (cv1 T1 and cv2 T2) to determine their compatibility for the purposes of initialization by reference (C++ [dcl.init.ref]p4). More...
enum  ARCConversionResult { ACR_okay, ACR_unbridged }
enum  CUDAFunctionTarget {
  CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice,
  CFT_InvalidTarget
}
enum  FormatStringType {
  FST_Scanf, FST_Printf, FST_NSString, FST_Strftime,
  FST_Strfmon, FST_Kprintf, FST_FreeBSDKPrintf, FST_OSTrace,
  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 std::pair
< SourceLocation, bool
DeleteExprLoc
 Delete-expressions to be analyzed at the end of translation unit.
typedef llvm::SmallVector
< DeleteExprLoc, 4 > 
DeleteLocs
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::MapVector< const
FunctionDecl
*, LateParsedTemplate * > 
LateParsedTemplateMapT
typedef void LateTemplateParserCB (void *P, LateParsedTemplate &LPT)
 Callback to the parser to parse templated functions when needed.
typedef void LateTemplateParserCleanupCB (void *P)
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 void * SkippedDefinitionContext
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 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::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
 A pair of ArgumentKind identifier and magic value.

Public Member Functions

NamedDeclfindLocallyScopedExternCDecl (DeclarationName Name)
 Look for a locally scoped extern "C" declaration by the given name.
void SetLateTemplateParser (LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, 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.
const llvm::MapVector
< FieldDecl *, DeleteLocs > & 
getMismatchingDeleteExpressions () const
 Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit.
void ReadMethodPool (Selector Sel)
 Read the contents of the method pool for a given selector from external storage.
void EmitCurrentDiagnostic (unsigned DiagID)
 Cause the active diagnostic on the DiagosticsEngine to be emitted.
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.
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.
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 emitAndClearUnusedLocalTypedefWarnings ()
void ActOnEndOfTranslationUnit ()
 ActOnEndOfTranslationUnit - This is called at the very end of the translation unit when EOF is reached and all but the top-level scope is popped.
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::LambdaScopeInfo * PushLambdaScope ()
void RecordParsingTemplateParameterDepth (unsigned Depth)
 This is used to inform Sema what the current TemplateParameterDepth is during Parsing.
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::BlockScopeInfo * getCurBlock ()
 Retrieve the current block, if any.
sema::LambdaScopeInfo * getCurLambda ()
 Retrieve the current lambda scope info, if any.
sema::LambdaScopeInfo * getCurGenericLambda ()
 Retrieve the current generic lambda info, if any.
sema::CapturedRegionScopeInfo * getCurCapturedRegion ()
 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)
unsigned deduceWeakPropertyFromType (QualType T)
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)
 GetTypeForDeclarator - Convert the type for the specified declarator to Type instances.
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)
 GetNameForDeclarator - Determine the full declaration name for the given Declarator.
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)
 CheckSpecifiedExceptionType - Check if the given type is valid in an exception specification.
bool CheckDistantExceptionSpec (QualType T)
 CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function with an exception specification.
bool CheckEquivalentExceptionSpec (FunctionDecl *Old, FunctionDecl *New)
bool CheckEquivalentExceptionSpec (const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc)
 CheckEquivalentExceptionSpec - Check if the two types have equivalent exception specifications.
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)
 CheckEquivalentExceptionSpec - Check if the two types have compatible exception specifications.
bool CheckExceptionSpecSubset (const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Superset, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc)
 CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subset (or equivalent) of the first function type.
bool CheckParamExceptionSpec (const PartialDiagnostic &NoteID, const FunctionProtoType *Target, SourceLocation TargetLoc, const FunctionProtoType *Source, SourceLocation SourceLoc)
 CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalent exception specs.
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.
ModulegetOwningModule (Decl *Entity)
 Get the module owning an entity.
void makeMergedDefinitionVisible (NamedDecl *ND, SourceLocation Loc)
 Make a merged definition of an existing hidden definition ND visible at the specified location.
bool isModuleVisible (Module *M)
bool isVisible (const NamedDecl *D)
 Determine whether a declaration is visible to name lookup.
bool hasVisibleMergedDefinition (NamedDecl *Def)
bool hasVisibleDefinition (NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
 Determine if D has a visible definition.
bool hasVisibleDefinition (const NamedDecl *D)
bool hasVisibleDefaultArgument (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if the template parameter D has a visible default argument.
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... Ts>
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
bool RequireCompleteExprType (Expr *E, TypeDiagnoser &Diagnoser)
 Ensure that the type of the given expression is complete.
bool RequireCompleteExprType (Expr *E, unsigned DiagID)
template<typename... Ts>
bool RequireCompleteExprType (Expr *E, unsigned DiagID, const Ts &...Args)
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... Ts>
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
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, bool AsUnevaluated=true)
 If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building a type for decltype(auto).
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)
 isTagName() - This method is called *for error recovery purposes only* to determine if the specified name is a valid tag name ("struct foo").
bool isMicrosoftMissingTypename (const CXXScopeSpec *SS, Scope *S)
 isMicrosoftMissingTypename - In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to the type of one of the base classes then downgrade the missing typename error to a warning.
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.
NameClassification ClassifyName (Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, bool IsAddressOfOperand, std::unique_ptr< 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.
bool DiagnoseClassNameShadow (DeclContext *DC, DeclarationNameInfo Info)
 DiagnoseClassNameShadow - Implement C++ [class.mem]p13: If T is the name of a class, then each of the following shall have a name different from T:
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.
void CheckShadow (Scope *S, VarDecl *D)
 Check -Wshadow without the advantage of a previous lookup.
void CheckCastAlign (Expr *Op, QualType T, SourceRange TRange)
 CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment requirements.
void handleTagNumbering (const TagDecl *Tag, Scope *TagScope)
void setTagNameForLinkagePurposes (TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD)
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)
 ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name, either using the 'typedef' type specifier or via a C++0x [dcl.typedef]p2 alias-declaration: 'using T = A;'.
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)
 AddOverriddenMethods - See if a method overrides any in the base classes, and if so, check that it's a valid override and remember it.
bool CheckConstexprFunctionDecl (const FunctionDecl *FD)
bool CheckConstexprFunctionBody (const FunctionDecl *FD, Stmt *Body)
 Check the body for the given constexpr function declaration only contains the permitted types of statement.
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)
 ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into function prototype scope.
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)
 ActOnParamDefaultArgument - Check whether the default argument provided for a function parameter is well-formed.
void ActOnParamUnparsedDefaultArgument (Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc)
 ActOnParamUnparsedDefaultArgument - We've seen a default argument for a function parameter, but we can't parse it yet because we're inside a class definition.
void ActOnParamDefaultArgumentError (Decl *param, SourceLocation EqualLoc)
 ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the parameter param failed.
bool SetParamDefaultArgument (ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
void AddInitializerToDecl (Decl *dcl, Expr *init, bool DirectInit, bool TypeMayContainAuto)
 AddInitializerToDecl - Adds the initializer Init to the declaration dcl.
void ActOnUninitializedDecl (Decl *dcl, bool TypeMayContainAuto)
void ActOnInitializerError (Decl *Dcl)
 ActOnInitializerError - Given that there was an error parsing an initializer for the given declaration, try to return to some form of sanity.
void ActOnPureSpecifier (Decl *D, SourceLocation PureSpecLoc)
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)
 FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions necessary after any initializer has been attached.
DeclGroupPtrTy FinalizeDeclaratorGroup (Scope *S, const DeclSpec &DS, ArrayRef< Decl * > Group)
DeclGroupPtrTy BuildDeclaratorGroup (MutableArrayRef< Decl * > Group, bool TypeMayContainAuto=true)
 BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necessary semantic checking.
void ActOnDocumentableDecl (Decl *D)
 Should be called on all declarations that might have attached documentation comments.
void ActOnDocumentableDecls (ArrayRef< Decl * > Group)
void ActOnFinishKNRParamDeclarations (Scope *S, Declarator &D, SourceLocation LocAfterDecls)
void CheckForFunctionRedefinition (FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr, SkipBodyInfo *SkipBody=nullptr)
DeclActOnStartOfFunctionDef (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists, SkipBodyInfo *SkipBody=nullptr)
DeclActOnStartOfFunctionDef (Scope *S, Decl *D, SkipBodyInfo *SkipBody=nullptr)
void ActOnStartOfObjCMethodDef (Scope *S, Decl *D)
 ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST.
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)
 ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is delayed.
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 ActOnModuleBegin (SourceLocation DirectiveLoc, Module *Mod)
 The parsed has entered a submodule.
void ActOnModuleEnd (SourceLocation DirectiveLoc, Module *Mod)
 The parser has left a submodule.
void createImplicitModuleImportForErrorRecovery (SourceLocation Loc, Module *Mod)
 Create an implicit import of the given module at the given source location, for error recovery, if possible.
void diagnoseMissingImport (SourceLocation Loc, NamedDecl *Decl, bool NeedDefinition, bool Recover=true)
 Diagnose that the specified declaration needs to be visible but isn't, and suggest a module import that would resolve the problem.
void diagnoseMissingImport (SourceLocation Loc, NamedDecl *Decl, SourceLocation DeclLoc, ArrayRef< Module * > Modules, MissingImportKind MIK, bool Recover)
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)
 ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.
DeclParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation=false)
 ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.
DeclBuildAnonymousStructOrUnion (Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy)
 BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union.
DeclBuildMicrosoftCAnonymousStruct (Scope *S, DeclSpec &DS, RecordDecl *Record)
 BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure.
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, SkipBodyInfo *SkipBody=nullptr)
 This is invoked when we see 'struct foo' or 'struct {'.
DeclActOnTemplatedFriendTag (Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr, MultiTemplateParamsArg TempParamLists)
 Handle a friend tag declaration where the scope specifier was templated.
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)
 Called whenever @defs(ClassName) is encountered in the source.
DeclActOnField (Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth)
 ActOnField - Each field of a C struct/union is passed into this in order to create a FieldDecl object for it.
FieldDeclHandleField (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS)
 HandleField - Analyze a field of a C struct or a C++ data member.
MSPropertyDeclHandleMSProperty (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, AttributeList *MSPropertyAttr)
 HandleMSProperty - Analyze a __delcspec(property) field of a C++ class.
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)
 Diagnose why the specified class does not have a trivial special member of the given kind.
bool SpecialMemberIsTrivial (CXXMethodDecl *MD, CXXSpecialMember CSM, bool Diagnose=false)
 Determine whether a defaulted or deleted special member function is trivial, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25, and C++11 [class.dtor]p5.
CXXSpecialMember getSpecialMember (const CXXMethodDecl *MD)
 getSpecialMember - get the special member enum for a method.
void ActOnLastBitfield (SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls)
 ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions.
DeclActOnIvar (Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind visibility)
 ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDecl object for it.
void ActOnFields (Scope *S, SourceLocation RecLoc, Decl *TagDecl, ArrayRef< Decl * > Fields, SourceLocation LBrac, SourceLocation RBrac, AttributeList *AttrList)
void ActOnTagStartDefinition (Scope *S, Decl *TagDecl)
 ActOnTagStartDefinition - Invoked when we have entered the scope of a tag's definition (e.g., for an enumeration, class, struct, or union).
SkippedDefinitionContext ActOnTagStartSkippedDefinition (Scope *S, Decl *TD)
 Invoked when we enter a tag definition that we're skipping.
DeclActOnObjCContainerStartDefinition (Decl *IDecl)
void ActOnStartCXXMemberDeclarations (Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, SourceLocation LBraceLoc)
 ActOnStartCXXMemberDeclarations - Invoked when we have parsed a C++ record definition's base-specifiers clause and are starting its member declarations.
void ActOnTagFinishDefinition (Scope *S, Decl *TagDecl, SourceLocation RBraceLoc)
 ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration, class, struct, or union).
void ActOnTagFinishSkippedDefinition (SkippedDefinitionContext Context)
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)
 ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a tag.
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)
 Check whether this is a valid redeclaration of a previous enumeration.
SkipBodyInfo shouldSkipAnonEnumBody (Scope *S, IdentifierInfo *II, SourceLocation IILoc)
 Determine whether the body of an anonymous enumeration should be skipped.
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)
 EnterDeclaratorContext - Used when we must lookup names in the context of a declarator's nested name specifier.
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 ()
 getCurFunctionDecl - If inside of a function body, this returns a pointer to the function decl for the function being parsed.
ObjCMethodDeclgetCurMethodDecl ()
 getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the method being parsed.
NamedDeclgetCurFunctionOrMethodDecl ()
 getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method or C function we're in, otherwise return null.
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)
 isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns true if 'D' belongs to the given declaration context.
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)
AlwaysInlineAttr * mergeAlwaysInlineAttr (Decl *D, SourceRange Range, IdentifierInfo *Ident, unsigned AttrSpellingListIndex)
MinSizeAttr * mergeMinSizeAttr (Decl *D, SourceRange Range, unsigned AttrSpellingListIndex)
OptimizeNoneAttr * mergeOptimizeNoneAttr (Decl *D, SourceRange Range, 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)
 MergeTypedefNameDecl - We just parsed a typedef 'New' which has the same name and scope as a previous declaration 'Old'.
bool MergeFunctionDecl (FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld)
 MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and scope as a previous declaration 'Old'.
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)
 MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'.
void MergeVarDeclTypes (VarDecl *New, VarDecl *Old, bool MergeTypeWithOld)
 MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'.
void MergeVarDeclExceptionSpecs (VarDecl *New, VarDecl *Old)
 Merge the exception specifications of two variable declarations.
bool MergeCXXFunctionDecl (FunctionDecl *New, FunctionDecl *Old, Scope *S)
 MergeCXXFunctionDecl - Merge two declarations of the same C++ function, once we already know that they have the same type.
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)
 IsIntegralPromotion - Determines whether the conversion from the expression From (whose potentially-adjusted type is FromType) to ToType is an integral promotion (C++ 4.5).
bool IsFloatingPointPromotion (QualType FromType, QualType ToType)
 IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating point promotion (C++ 4.6).
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)
 IsPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a pointer conversion (C++ 4.10).
bool isObjCPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC)
 isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion.
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)
 FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their argument types.
void HandleFunctionTypeMismatch (PartialDiagnostic &PDiag, QualType FromType, QualType ToType)
 HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types.
void maybeExtendBlockObject (ExprResult &E)
 Do an explicit extend of the given block pointer if we're in ARC.
CastKind PrepareCastToObjCObjectPointer (ExprResult &E)
 Prepare a conversion of the given expression to an ObjC object pointer type.
bool CheckPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
 CheckPointerConversion - Check the pointer conversion from the expression From to the type ToType.
bool IsMemberPointerConversion (Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType)
 IsMemberPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a member pointer conversion (C++ 4.11).
bool CheckMemberPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
 CheckMemberPointerConversion - Check the member pointer conversion from the expression From to the type ToType.
bool IsQualificationConversion (QualType FromType, QualType ToType, bool CStyle, bool &ObjCLifetimeConversion)
 IsQualificationConversion - Determines whether the conversion from an rvalue of type FromType to ToType is a qualification conversion (C++ 4.4).
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).
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)
 PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the given Method with the given expression.
ExprResult PerformContextuallyConvertToBool (Expr *From)
 PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C++0x [conv]p3).
ExprResult PerformContextuallyConvertToObjCPointer (Expr *From)
 PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to an Objective-C pointer type.
ExprResult CheckConvertedConstantExpression (Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
ExprResult CheckConvertedConstantExpression (Expr *From, QualType T, APValue &Value, CCEKind CCE)
ExprResult PerformContextualImplicitConversion (SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter)
 Perform a contextual implicit conversion.
ObjCSubscriptKind CheckSubscriptingKind (Expr *FromE)
 CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being done.
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)
 AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given function call arguments.
void AddFunctionCandidates (const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, bool SuppressUserConversions=false, bool PartialOverloading=false)
 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)
 AddMethodCandidate - Adds a named decl (which is some kind of method) as a method candidate to the given overload set.
void AddMethodCandidate (CXXMethodDecl *Method, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false)
 AddMethodCandidate - Adds the given C++ member function to the set of candidate functions, using the given function call arguments and the object argument (Object).
void AddMethodTemplateCandidate (FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=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, bool PartialOverloading=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)
 AddConversionCandidate - Add a C++ conversion function as a candidate in the candidate set (C++ [over.match.conv], C++ [over.match.copy]).
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)
 AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given Object to a function pointer via the conversion function Conversion, and then attempts to call it with the given arguments (C++ [over.call.object]p2-4).
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)
 AddBuiltinCandidate - Add a candidate for a built-in operator.
void AddBuiltinOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
 AddBuiltinOperatorCandidates - Add the appropriate built-in operator overloads to the candidate set (C++ [over.built]), based on the operator Op and the arguments given.
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)
 Check the enable_if expressions on the given function.
QualType ExtractUnqualifiedFunctionType (QualType PossiblyAFunctionType)
FunctionDeclResolveAddressOfOverloadedFunction (Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr)
 ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over.over]), where From is an expression with overloaded function type and ToType is the type we're trying to resolve to.
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)
 FixOverloadedFunctionReference - E is an expression that refers to a C++ overloaded function (possibly with some parentheses and perhaps a '&' around it).
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)
 Build a call to 'begin' or 'end' for a C++11 for-range statement.
ExprResult BuildOverloadedCallExpr (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true)
 BuildOverloadedCallExpr - Given the call expression that calls Fn (which eventually refers to the declaration Func) and the call arguments Args/NumArgs, attempt to resolve the function call down to a specific function.
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)
 BuildCallToMemberFunction - Build a call to a member function.
ExprResult BuildCallToObjectOfClassType (Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
 BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over.call.object]), which can end up invoking an overloaded function call operator (operator()) or performing a user-defined conversion on the object argument.
ExprResult BuildOverloadedArrowExpr (Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound=nullptr)
 BuildOverloadedArrowExpr - Build a call to an overloaded operator-> (if one exists), where Base is an expression of class type and Member is the name of the member we're trying to find.
bool CheckCallReturnType (QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
 CheckCallReturnType - Checks that a call expression's return type is complete.
bool CheckParmsForFunctionDef (ParmVarDecl *const *Param, ParmVarDecl *const *ParamEnd, bool CheckParameterNames)
 Helpers for dealing with blocks and functions.
void CheckCXXDefaultArguments (FunctionDecl *FD)
 CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-formed according to C++ [dcl.fct.default].
void CheckExtraCXXDefaultArguments (Declarator &D)
 CheckExtraCXXDefaultArguments - Check for any extra default arguments in the declarator, which is not a function declaration or definition and therefore is not permitted to have default arguments.
ScopegetNonFieldDeclScope (Scope *S)
 getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared.
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)
 LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope.
NamedDeclImplicitlyDefineFunction (SourceLocation Loc, IdentifierInfo &II, Scope *S)
 ImplicitlyDefineFunction - An undeclared identifier was used in a function call, forming a call to an implicitly defined function (per C99 6.5.1p2).
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)
 ProcessDeclAttributes - Given a declarator (PD) with attributes indicated in it, apply them to D.
void ProcessDeclAttributeList (Scope *S, Decl *D, const AttributeList *AL, bool IncludeCXX11Attributes=true)
 ProcessDeclAttributeList - Apply all the decl attributes in the specified attribute list to the specified decl, ignoring any type attributes.
bool ProcessAccessDeclAttributeList (AccessSpecDecl *ASDecl, const AttributeList *AttrList)
void checkUnusedDeclAttributes (Declarator &D)
 checkUnusedDeclAttributes - Given a declarator which is not being used to build a declaration, complain about any decl attributes which might be lying around on it.
bool isValidPointerAttrType (QualType T, bool RefOkay=false)
 Determine if type T is a valid subject for a nonnull and similar attributes.
bool CheckRegparmAttr (const AttributeList &attr, unsigned &value)
 Checks a regparm attribute, returning true if it is ill-formed and otherwise setting numParams to the appropriate 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.
bool checkSectionName (SourceLocation LiteralLoc, StringRef Str)
void checkTargetAttr (SourceLocation LiteralLoc, StringRef Str)
bool checkMSInheritanceAttrOnDefinition (CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceAttr::Spelling SemanticSpelling)
void CheckAlignasUnderalignment (Decl *D)
void adjustMemberFunctionCC (QualType &T, bool IsStatic)
 Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly.
bool hasExplicitCallingConv (QualType &T)
const AttributedTypegetCallingConvAttributedType (QualType T) const
 Get the outermost AttributedType node that sets a calling convention.
bool checkNullabilityTypeSpecifier (QualType &type, NullabilityKind nullability, SourceLocation nullabilityLoc, bool isContextSensitive)
 Check whether a nullability type specifier can be added to the given type.
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)
 WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches exactly that of its declaration.
void CheckImplementationIvars (ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc)
 CheckImplementationIvars - This routine checks if the instance variables listed in the implelementation match those listed in the interface.
void ImplMethodsVsClassMethods (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool IncompleteImpl=false)
 ImplMethodsVsClassMethods - This is main routine to warn if any method remains unimplemented in the class or category @implementation.
void DiagnoseUnimplementedProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties)
 DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by this implementation.
void diagnoseNullResettableSynthesizedSetters (const ObjCImplDecl *impDecl)
 Diagnose any null-resettable synthesized setters.
void DefaultSynthesizeProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl)
 DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesized in the class's @implementation.
void DefaultSynthesizeProperties (Scope *S, Decl *D)
bool IvarBacksCurrentMethodAccessor (ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV)
 IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Method' and 'Method' is a property accessor declared in class 'IFace'.
void DiagnoseUnusedBackingIvarInAccessor (Scope *S, const ObjCImplementationDecl *ImplD)
 DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is not used in the property's accessor.
ObjCIvarDeclGetIvarBackingPropertyAccessor (const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const
 GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ivar, returns this ivar; otherwise, returns NULL.
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, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind)
 Called by ActOnProperty to handle @property declarations in class extensions.
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, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
 Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl for a category or @interface.
void AtomicPropertySetterGetterRules (ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl)
 AtomicPropertySetterGetterRules - This routine enforces the rule (via warning) when atomic property has one but not the other user-declared setter or getter.
void DiagnoseOwningPropertyGetterSynthesis (const ObjCImplementationDecl *D)
void DiagnoseMissingDesignatedInitOverrides (const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD)
void DiagnoseDuplicateIvars (ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID)
 DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementation.
bool MatchTwoMethodDeclarations (const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict)
 MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false, accordingly.
void MatchAllMethodDeclarations (const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl=false)
 MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declared in their implementations.
void CheckCategoryVsClassMethodMatches (ObjCCategoryImplDecl *CatIMP)
 CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those implemented in its primary class and warns each time an exact match is found.
void addMethodToGlobalList (ObjCMethodList *List, ObjCMethodDecl *Method)
 Add the given method to the list of globally-known methods.
bool CollectMultipleMethodsInGlobalPool (Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool instance)
 
  • Returns instance or factory methods in global method pool for given selector.

bool AreMultipleMethodsInGlobalPool (Selector Sel, ObjCMethodDecl *BestMethod, SourceRange R, bool receiverIdOrClass)
void DiagnoseMultipleMethodInGlobalPool (SmallVectorImpl< ObjCMethodDecl * > &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass)
void AddInstanceMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false)
 AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool.
void AddFactoryMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false)
 AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
void AddAnyMethodToGlobalPool (Decl *D)
 AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.
ObjCMethodDeclLookupInstanceMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false)
 LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
ObjCMethodDeclLookupFactoryMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false)
 LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
const ObjCMethodDeclSelectorsForTypoCorrection (Selector Sel, QualType ObjectType=QualType())
ObjCMethodDeclLookupImplementedMethodInGlobalPool (Selector Sel)
 LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.
void CollectIvarsToConstructOrDestruct (ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars)
 CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.
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)
 In an Objective C collection iteration statement: for (x in y) x can be an arbitrary l-value expression.
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)
 FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.
StmtResult ActOnCXXForRangeStmt (SourceLocation ForLoc, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc, BuildForRangeKind Kind)
 ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.
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)
 FinishCXXForRangeStmt - Attach the body to a C++0x for-range statement.
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)
 ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes.
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)
ExprResult LookupInlineAsmVarDeclField (Expr *RefExpr, StringRef Member, unsigned &Offset, llvm::InlineAsmIdentifierInfo &Info, 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)
LabelDeclGetOrCreateMSAsmLabel (StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate)
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)
 ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler.
StmtResult ActOnCXXCatchBlock (SourceLocation CatchLoc, Decl *ExDecl, Stmt *HandlerBlock)
 ActOnCXXCatchBlock - Takes an exception declaration and a handler block and creates a proper catch handler from them.
StmtResult ActOnCXXTryBlock (SourceLocation TryLoc, Stmt *TryBlock, ArrayRef< Stmt * > Handlers)
 ActOnCXXTryBlock - Takes a try compound-statement and a number of handlers and creates a try statement from them.
StmtResult ActOnSEHTryBlock (bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler)
StmtResult ActOnSEHExceptBlock (SourceLocation Loc, Expr *FilterExpr, Stmt *Block)
void ActOnStartSEHFinallyBlock ()
void ActOnAbortSEHFinallyBlock ()
StmtResult ActOnFinishSEHFinallyBlock (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)
 DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused, warn.
void DiagnoseUnusedNestedTypedefs (const RecordDecl *D)
void DiagnoseUnusedDecl (const NamedDecl *ND)
 DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused).
void DiagnoseEmptyStmtBody (SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID)
 Emit DiagID if statement located on StmtLoc has a suspicious null statement as a Body, and it is located on the same line.
void DiagnoseEmptyLoopBody (const Stmt *S, const Stmt *PossibleBody)
 Warn if a for/while loop statement S, which is followed by PossibleBody, has a suspicious null statement as a body.
void DiagnoseSelfMove (const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc)
 Warn if a value is moved to itself.
ParsingDeclState PushParsingDeclaration (sema::DelayedDiagnosticPool &pool)
void PopParsingDeclaration (ParsingDeclState state, Decl *decl)
ParsingClassState PushParsingClass ()
void PopParsingClass (ParsingClassState state)
void redelayDiagnostics (sema::DelayedDiagnosticPool &pool)
 Given a set of delayed diagnostics, re-emit them as if they had been delayed in the current context instead of in the given pool.
void EmitAvailabilityWarning (AvailabilityDiagnostic AD, NamedDecl *D, StringRef Message, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess)
bool makeUnavailableInSystemHeader (SourceLocation loc, StringRef message)
 makeUnavailableInSystemHeader - There is an error in the current context.
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)
 DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with the sentinel attribute, and if so, it checks that the requirements of the sentinel are satisfied.
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.
void MarkFunctionReferenced (SourceLocation Loc, FunctionDecl *Func, bool OdrUse=true)
 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).
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.
bool NeedToCaptureVariable (VarDecl *Var, SourceLocation Loc)
 Checks if the variable must be captured.
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.
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, std::unique_ptr< CorrectionCandidateCallback > CCC=nullptr, bool IsInlineAsmIdentifier=false, Token *KeywordReplacement=nullptr)
void DecomposeUnqualifiedId (const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
 Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template arguments.
bool DiagnoseEmptyLookup (Scope *S, CXXScopeSpec &SS, LookupResult &R, std::unique_ptr< CorrectionCandidateCallback > CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=None, TypoExpr **Out=nullptr)
 Diagnose an empty lookup.
ExprResult LookupInObjCMethod (LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false)
 LookupInObjCMethod - The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
ExprResult ActOnDependentIdExpression (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool isAddressOfOperand, const TemplateArgumentListInfo *TemplateArgs)
 ActOnDependentIdExpression - Handle a dependent id-expression that was just parsed.
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)
 BuildDeclRefExpr - Build an expression that references a declaration that does not require a closure capture.
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)
 Builds an implicit member access expression.
bool UseArgumentDependentLookup (const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen)
ExprResult BuildQualifiedDeclarationNameExpr (CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, TypeSourceInfo **RecoveryTSI=nullptr)
 BuildQualifiedDeclarationNameExpr - Build a C++ qualified declaration name, generally during template instantiation.
ExprResult BuildDependentDeclRefExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
ExprResult BuildDeclarationNameExpr (const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL, bool AcceptInvalidDecl=false)
ExprResult BuildDeclarationNameExpr (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D, NamedDecl *FoundD=nullptr, const TemplateArgumentListInfo *TemplateArgs=nullptr, bool AcceptInvalidDecl=false)
 Complete semantic analysis for a reference to the given declaration.
ExprResult BuildLiteralOperatorCall (LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef< Expr * > Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
 BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to a literal operator described by the provided lookup results.
ExprResult BuildPredefinedExpr (SourceLocation Loc, PredefinedExpr::IdentType IT)
ExprResult ActOnPredefinedExpr (SourceLocation Loc, tok::TokenKind Kind)
ExprResult ActOnIntegerConstant (SourceLocation Loc, uint64_t Val)
bool CheckLoopHintExpr (Expr *E, SourceLocation Loc)
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)
 ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e.g.
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)
 CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designating an object.
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)
 ActOnUnaryExprOrTypeTraitExpr - Handle sizeof(type) and sizeof expr and the same for alignof and __alignof Note that the ArgRange is invalid if isType is false.
ExprResult CheckPlaceholderExpr (Expr *E)
 Check for operands with placeholder types and complain if found.
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 ActOnOMPArraySectionExpr (Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLoc, Expr *Length, SourceLocation RBLoc)
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)
 The main callback when the parser finds something like expression .
void ActOnDefaultCtorInitializers (Decl *CDtorDecl)
bool ConvertArgumentsForCall (CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef< Expr * > Args, SourceLocation RParenLoc, bool ExecConfig=false)
 ConvertArgumentsForCall - Converts the arguments specified in Args/NumArgs to the parameter types of the function FDecl with function prototype Proto.
void CheckStaticArrayArgument (SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr)
 CheckStaticArrayArgument - If the given argument corresponds to a static array parameter, check that it is non-null, and that if it is formed by array-to-pointer decay, the underlying array is sufficiently large.
ExprResult ActOnCallExpr (Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false)
 ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
ExprResult BuildResolvedCallExpr (Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, bool IsExecConfig=false)
 BuildResolvedCallExpr - Build a call to a resolved expression, i.e.
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)
 Prepares for a scalar cast, performing all the necessary stages except the final cast and returning the kind required.
ExprResult BuildVectorLiteral (SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo)
 Build an altivec or OpenCL literal.
ExprResult MaybeConvertParenListExprToParenExpr (Scope *S, Expr *ME)
 This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a sequence of comma binary operators.
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)
 CreateBuiltinBinOp - Creates a new built-in binary operation with operator Opc at location TokLoc.
ExprResult ActOnConditionalOp (SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr)
 ActOnConditionalOp - Parse a ?: operation.
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)
 ActOnBlockStart - This callback is invoked when a block literal is started.
void ActOnBlockArguments (SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope)
 ActOnBlockArguments - This callback allows processing of block arguments.
void ActOnBlockError (SourceLocation CaretLoc, Scope *CurScope)
 ActOnBlockError - If there is an error parsing a block, this callback is invoked to pop the information about the block from the action impl.
ExprResult ActOnBlockStmtExpr (SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
 ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully completed.
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)
 ActOnStartNamespaceDef - This is called at the start of a namespace definition.
void ActOnFinishNamespaceDef (Decl *Dcl, SourceLocation RBrace)
 ActOnFinishNamespaceDef - This callback is called after a namespace is exited.
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)
 Hides a using shadow declaration.
bool CheckUsingShadowDecl (UsingDecl *UD, NamedDecl *Target, const LookupResult &PreviousDecls, UsingShadowDecl *&PrevShadow)
 Determines whether to create a using shadow decl for a particular decl, given the set of decls existing prior to this using lookup.
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)
 Checks that the given using declaration is not an invalid redeclaration.
bool CheckUsingDeclQualifier (SourceLocation UsingLoc, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc)
 Checks that the given nested-name qualifier used in a using decl in the current context is appropriately related to the current scope.
NamedDeclBuildUsingDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, AttributeList *AttrList, bool IsInstantiation, bool HasTypenameKeyword, SourceLocation TypenameLoc)
 Builds a using declaration.
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, Decl *DeclFromDeclSpec)
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
 BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
 BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.
ExprResult BuildCXXDefaultInitExpr (SourceLocation Loc, FieldDecl *Field)
ExprResult BuildCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
 BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed.
void FinalizeVarWithDestructor (VarDecl *VD, const RecordType *DeclInitType)
 FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable.
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 (bool IsTopLevel, 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 isLibstdcxxEagerExceptionSpecHack (const Declarator &D)
 Determine if we're in a case where we need to (incorrectly) eagerly parse an exception specification to work around a libstdc++ bug.
void actOnDelayedExceptionSpecification (Decl *Method, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr)
 Add an exception-specification to the given member function (or member function template).
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)
 DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default constructor.
CXXDestructorDeclDeclareImplicitDestructor (CXXRecordDecl *ClassDecl)
 Declare the implicit destructor for the given class.
void DefineImplicitDestructor (SourceLocation CurrentLocation, CXXDestructorDecl *Destructor)
 DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default 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)
 DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy constructor.
CXXConstructorDeclDeclareImplicitMoveConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit move constructor for the given class.
void DefineImplicitMoveConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
 DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move 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)
 MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor, this will return CXXBindTemporaryExpr.
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.
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 ActOnCXXFoldExpr (SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
 Handle a C++1z fold-expression: ( expr op ... op expr ).
ExprResult BuildCXXFoldExpr (SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
ExprResult BuildEmptyCXXFoldExpr (SourceLocation EllipsisLoc, BinaryOperatorKind Operator)
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)
bool CheckCXXThrowOperand (SourceLocation ThrowLoc, QualType ThrowTy, Expr *E)
 CheckCXXThrowOperand - Validate the operand of a throw.
ExprResult ActOnCXXTypeConstructExpr (ParsedType TypeRep, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc)
 ActOnCXXTypeConstructExpr - Parse construction of a specified type.
ExprResult BuildCXXTypeConstructExpr (TypeSourceInfo *Type, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc)
 ActOnCXXTypeConstructExpr - Parse construction of a specified type.
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)
 FindAllocationFunctions - Finds the overloads of operator new and delete that are appropriate for the allocation.
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 ()
 DeclareGlobalNewDelete - Declare the global forms of operator new and delete.
void DeclareGlobalAllocationFunction (DeclarationName Name, QualType Return, QualType Param1, QualType Param2=QualType(), bool addRestrictAttr=false)
 DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't already exist.
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)
 ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statement.
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)
 ActOnArrayTypeTrait - Parsed one of the bianry type trait support pseudo-functions.
ExprResult BuildArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen)
ExprResult ActOnExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
 ActOnExpressionTrait - Parsed one of the unary type trait support pseudo-functions.
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 BuildPseudoDestructorExpr (Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
ExprResult ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName)
ExprResult ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, SourceLocation TildeLoc, const DeclSpec &DS)
ExprMaybeCreateExprWithCleanups (Expr *SubExpr)
 MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups, surround it with a ExprWithCleanups node.
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 (SourceLocation CCLoc, CXXScopeSpec &SS)
 The parser has parsed a global nested-name-specifier '::'.
bool ActOnSuperScopeSpecifier (SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS)
 The parser has parsed a '__super' nested-name-specifier.
bool isAcceptableNestedNameSpecifier (const NamedDecl *SD, bool *CanCorrect=nullptr)
 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)
 Process the expression contained within a decltype.
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)
 IsInvalidUnlessNestedName - This method is used for error recovery purposes to determine whether the specified identifier is only valid as a nested name specifier, for example a namespace name.
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)
 ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global scope or nested-name-specifier) is parsed, part of a declarator-id.
void ActOnCXXExitDeclaratorScope (Scope *S, const CXXScopeSpec &SS)
 ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclaratorScope(), is finished.
void ActOnCXXEnterDeclInitializer (Scope *S, Decl *Dcl)
 ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration 'Dcl'.
void ActOnCXXExitDeclInitializer (Scope *S, Decl *Dcl)
 ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaration '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)
 ActOnStartOfLambdaDefinition - This is called just before we start parsing the body of a lambda; it analyzes the explicit captures and arguments, and sets up various data-structures for the body of the lambda.
void ActOnLambdaError (SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false)
 ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the information about the lambda.
ExprResult ActOnLambdaExpr (SourceLocation StartLoc, Stmt *Body, Scope *CurScope)
 ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed.
ExprResult BuildLambdaExpr (SourceLocation StartLoc, SourceLocation EndLoc, sema::LambdaScopeInfo *LSI)
 Complete a lambda-expression having processed and attached the lambda body.
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 BuildCXXMemberCallExpr (Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates)
DeclActOnStartLinkageSpecification (Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc)
 ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification, including the language and (if present) the '{'.
DeclActOnFinishLinkageSpecification (Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
 ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpec.
bool isCurrentClassName (const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr)
 isCurrentClassName - Determine whether the identifier II is the name of the class type currently being defined.
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.
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)
 ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed.
void ActOnStartCXXInClassMemberInitializer ()
 Enter a new C++ default initializer scope.
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.
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)
 SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whose ivars need be initialized.
void MarkBaseAndMemberDestructorsReferenced (SourceLocation Loc, CXXRecordDecl *Record)
 MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of its members and bases as referenced.
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)
 MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced.
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)
 AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions, such as the default constructor, copy constructor, or destructor, to the given C++ class (C++ [special]p1).
void ActOnMemInitializers (Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer * > MemInits, bool AnyErrors)
 ActOnMemInitializers - Handle the member initializers for a constructor.
void checkClassLevelDLLAttribute (CXXRecordDecl *Class)
 Check class-level dllimport/dllexport attribute.
void propagateDLLAttrToBaseClassTemplate (CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc)
 Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibility.
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 ActOnFinishCXXNonNestedClass (Decl *D)
void ActOnReenterCXXMethodParameter (Scope *S, ParmVarDecl *Param)
 This is used to implement the constant expression evaluation part of the attribute enable_if extension.
unsigned ActOnReenterTemplateScope (Scope *S, Decl *Template)
void ActOnStartDelayedMemberDeclarations (Scope *S, Decl *Record)
void ActOnStartDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
 ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class, and we are now parsing those parts of the given Method declaration that could not be parsed earlier (C++ [class.mem]p2), such as default arguments.
void ActOnDelayedCXXMethodParameter (Scope *S, Decl *Param)
 ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration.
void ActOnFinishDelayedMemberDeclarations (Scope *S, Decl *Record)
void ActOnFinishDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
 ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration for 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)
 Handle a friend type declaration.
NamedDeclActOnFriendFunctionDecl (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
QualType CheckConstructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
 CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructor declarator D with type R.
void CheckConstructor (CXXConstructorDecl *Constructor)
 CheckConstructor - Checks a fully-formed constructor for well-formedness, issuing any diagnostics required.
QualType CheckDestructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
 CheckDestructorDeclarator - Called by ActOnDeclarator to check the well-formednes of the destructor declarator D with type R.
bool CheckDestructor (CXXDestructorDecl *Destructor)
 CheckDestructor - Checks a fully-formed destructor definition for well-formedness, issuing any diagnostics required.
void CheckConversionDeclarator (Declarator &D, QualType &R, StorageClass &SC)
 CheckConversionDeclarator - Called by ActOnDeclarator to check the well-formednes of the conversion function declarator D with type R.
DeclActOnConversionDeclarator (CXXConversionDecl *Conversion)
 ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ conversion function.
void CheckExplicitlyDefaultedSpecialMember (CXXMethodDecl *MD)
void CheckExplicitlyDefaultedMemberExceptionSpec (CXXMethodDecl *MD, const FunctionProtoType *T)
 Check whether the exception specification provided for an explicitly-defaulted special member matches the exception specification that would have been generated for an implicit special member, per C++11 [dcl.fct.def.default]p2.
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)
 ActOnBaseSpecifier - Parsed a base specifier.
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)
 ActOnBaseSpecifiers - Attach the given base specifiers to the class, after checking whether there are any duplicate base classes.
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 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)
 CheckDerivedToBaseConversion - Check whether the Derived-to-Base conversion (where Derived and Base are class types) is well-formed, meaning that the conversion is unambiguous (and that all of the base classes are accessible).
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)
 CheckOverridingFunctionReturnType - Checks whether the return types are covariant, according to C++ [class.virtual]p5.
bool CheckOverridingFunctionExceptionSpec (const CXXMethodDecl *New, const CXXMethodDecl *Old)
 CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec.
bool CheckPureMethod (CXXMethodDecl *Method, SourceRange InitRange)
 Mark the given method pure.
void CheckOverrideControl (NamedDecl *D)
 CheckOverrideControl - Check C++11 override control semantics.
void DiagnoseAbsenceOfOverrideControl (NamedDecl *D)
 DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of an overriding method.
bool CheckIfOverriddenFunctionIsMarkedFinal (const CXXMethodDecl *New, const CXXMethodDecl *Old)
 CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4.
bool SetMemberAccessSpecifier (NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS)
 SetMemberAccessSpecifier - Set the access specifier of a member.
AccessResult CheckUnresolvedMemberAccess (UnresolvedMemberExpr *E, DeclAccessPair FoundDecl)
 Perform access-control checking on a previously-unresolved member access which has now been resolved to a member.
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)
 Checks access to an overloaded member operator, including conversion operators.
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)
 Checks access for a hierarchy conversion.
void CheckLookupAccess (const LookupResult &R)
 Checks access to all the declarations in the given result set.
bool IsSimplyAccessible (NamedDecl *decl, DeclContext *Ctx)
 Checks access to Decl from the given class.
bool isSpecialMemberAccessibleForDeletion (CXXMethodDecl *decl, AccessSpecifier access, QualType objectType)
 Is the given special member function accessible for the purposes of deciding whether to define a special member function as deleted?
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... Ts>
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
void DiagnoseAbstractType (const CXXRecordDecl *RD)
bool RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, AbstractDiagSelID SelID=AbstractNone)
bool CheckOverloadedOperatorDeclaration (FunctionDecl *FnDecl)
bool CheckLiteralOperatorDeclaration (FunctionDecl *FnDecl)
 CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is well-formed.
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)
 DiagnoseTemplateParameterShadow - Produce a diagnostic complaining that the template parameter 'PrevDecl' is being shadowed by a new declaration at location Loc.
TemplateDeclAdjustDeclIfTemplate (Decl *&Decl)
 AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference the templated declaration and return a pointer to the template declaration.
DeclActOnTypeParameter (Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg)
 ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed.
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)
 ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e.g.
TemplateParameterList * ActOnTemplateParameterList (unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, Decl **Params, unsigned NumParams, SourceLocation RAngleLoc)
 ActOnTemplateParameterList - Builds a TemplateParameterList that contains the template parameters in Params/NumParams.
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.
TemplateParameterList * MatchTemplateParametersToScopeSpecifier (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, SkipBodyInfo *SkipBody=nullptr)
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, SkipBodyInfo *SkipBody=nullptr)
DeclActOnTemplateDeclarator (Scope *S, 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 an unexpanded parameter pack might be permitted in this location.
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].
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, bool PartialOverloading=false)
 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, bool PartialOverloading=false)
 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)
TypeLoc getReturnTypeLoc (FunctionDecl *FD) const
bool DeduceFunctionTypeFromReturnExpr (FunctionDecl *FD, SourceLocation ReturnLoc, Expr *&RetExpr, AutoType *AT)
 Deduce the return type for a function from a returned expression, per C++1y [dcl.spec.auto]p6.
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)
 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.
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.
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)
 A form of SubstType intended specifically for instantiating the type of a FunctionDecl.
void SubstExceptionSpec (FunctionDecl *New, const FunctionProtoType *Proto, const MultiLevelTemplateArgumentList &Args)
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.
bool InstantiateInClassInitializer (SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
 Instantiate the definition of a field from the 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)
 BuildVariableInstantiation - Used after a new variable has been created.
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
DeclResult actOnObjCTypeParam (Scope *S, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, IdentifierInfo *paramName, SourceLocation paramLoc, SourceLocation colonLoc, ParsedType typeBound)
ObjCTypeParamListactOnObjCTypeParamList (Scope *S, SourceLocation lAngleLoc, ArrayRef< Decl * > typeParams, SourceLocation rAngleLoc)
void popObjCTypeParamList (Scope *S, ObjCTypeParamList *typeParamList)
DeclActOnStartClassInterface (Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, AttributeList *AttrList)
void ActOnSuperClassOfClassInterface (Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange)
void ActOnTypedefedProtocols (SmallVectorImpl< Decl * > &ProtocolRefs, IdentifierInfo *SuperName, SourceLocation SuperLoc)
 ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualified super class and adds them to the list of the protocols.
DeclActOnCompatibilityAlias (SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation)
 ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias declaration.
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, ObjCTypeParamList *typeParamList, 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)
 ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration and build an ObjCCategoryImplDecl object.
DeclGroupPtrTy ActOnFinishObjCImplementation (Decl *ObjCImpDecl, ArrayRef< Decl * > Decls)
DeclGroupPtrTy ActOnForwardClassDeclaration (SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef< ObjCTypeParamList * > TypeParamLists, unsigned NumElts)
DeclGroupPtrTy ActOnForwardProtocolDeclaration (SourceLocation AtProtoclLoc, const IdentifierLocPair *IdentList, unsigned NumElts, AttributeList *attrList)
 ActOnForwardProtocolDeclaration - Handle @protocol foo;.
void FindProtocolDeclaration (bool WarnOnDeclarations, bool ForObjCContainer, const IdentifierLocPair *ProtocolId, unsigned NumProtocols, SmallVectorImpl< Decl * > &Protocols)
 FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declared.
void actOnObjCTypeArgsOrProtocolQualifiers (Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef< IdentifierInfo * > identifiers, ArrayRef< SourceLocation > identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl< ParsedType > &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl< Decl * > &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols)
 Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol qualifiers or type arguments, as appropriate.
TypeResult actOnObjCProtocolQualifierType (SourceLocation lAngleLoc, ArrayRef< Decl * > protocols, ArrayRef< SourceLocation > protocolLocs, SourceLocation rAngleLoc)
 Build a an Objective-C protocol-qualified 'id' type where no base type was specified.
TypeResult actOnObjCTypeArgsAndProtocolQualifiers (Scope *S, SourceLocation Loc, ParsedType BaseType, SourceLocation TypeArgsLAngleLoc, ArrayRef< ParsedType > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< Decl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc)
 Build a specialized and/or protocol-qualified Objective-C type.
QualType BuildObjCObjectType (QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo * > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
 Build an Objective-C object pointer type.
bool checkObjCKindOfType (QualType &type, SourceLocation loc)
 Check the application of the Objective-C '__kindof' qualifier to the given type.
void CheckObjCPropertyAttributes (Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass)
 Ensure attributes are consistent with type.
void ProcessPropertyDecl (ObjCPropertyDecl *property, ObjCContainerDecl *CD, ObjCPropertyDecl *redeclaredProperty=nullptr, ObjCContainerDecl *lexicalDC=nullptr)
 Process the specified property declaration and create decls for the setters and getters as needed.
void DiagnosePropertyMismatch (ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty)
 DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a variety of inconsistencies.
void DiagnoseClassExtensionDupMethods (ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
 DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension.
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)
 ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property implementation declaration; declared as @synthesize or @dynamic.
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)
bool CheckARCMethodDecl (ObjCMethodDecl *method)
 Check a method declaration for compatibility with the Objective-C ARC conventions.
bool inferObjCARCLifetime (ValueDecl *decl)
bool ConversionToObjCStringLiteralCheck (QualType DstType, Expr *&SrcExpr)
bool checkInitMethod (ObjCMethodDecl *method, QualType receiverTypeIfCall)
 Check whether the given method, which must be in the 'init' family, is a valid member of that family.
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)
 ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").
void ActOnPragmaMSPointersToMembers (LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc)
 ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation method[, general purpose representation]).
void ActOnPragmaMSVtorDisp (PragmaVtorDispKind Kind, SourceLocation PragmaLoc, MSVtorDispAttr::Mode Value)
 Called on well formed #pragma vtordisp().
bool UnifySection (StringRef SectionName, int SectionFlags, DeclaratorDecl *TheDecl)
bool UnifySection (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)
 DeclClonePragmaWeak - clone existing decl (maybe definition), #pragma weak needs a non-definition decl and source may not have one.
void DeclApplyPragmaWeak (Scope *S, NamedDecl *ND, WeakInfo &W)
 DeclApplyPragmaWeak - A declaration (maybe definition) needs #pragma weak applied to it, possibly with an alias.
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)
 ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname.
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)
 ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT.
void AddAlignmentAttributesForRecord (RecordDecl *RD)
 AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl, to handle '#pragma pack' and '#pragma options align'.
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)
 PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.
void AddPushedVisibilityAttribute (Decl *RD)
 AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute.
void PopPragmaVisibility (bool IsNamespaceEnd, SourceLocation EndLoc)
 PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' and visibility attributes on namespaces.
void FreeVisContext ()
 FreeVisContext - Deallocate and null out VisContext.
void AddCFAuditedAttribute (Decl *D)
 AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and, if so, consider adding the appropriate attribute.
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)
void AddAssumeAlignedAttr (SourceRange AttrRange, Decl *D, Expr *E, Expr *OE, unsigned SpellingListIndex)
 AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration.
void AddAlignValueAttr (SourceRange AttrRange, Decl *D, Expr *E, unsigned SpellingListIndex)
 AddAlignValueAttr - Adds an align_value attribute to a particular declaration.
void AddLaunchBoundsAttr (SourceRange AttrRange, Decl *D, Expr *MaxThreads, Expr *MinBlocks, unsigned SpellingListIndex)
 AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration.
bool IsOpenMPCapturedVar (VarDecl *VD)
 Check if the specified variable is used in one of the private clauses (private, firstprivate, lastprivate, reduction etc.) in OpenMP constructs.
bool isOpenMPPrivateVar (VarDecl *VD, unsigned Level)
 Check if the specified variable is used in 'private' clause.
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 StartOpenMPClause (OpenMPClauseKind K)
 Start analysis of clauses.
void EndOpenMPClause ()
 End analysis of clauses.
void EndOpenMPDSABlock (Stmt *CurDirective)
 Called on end of data sharing attribute block.
void ActOnOpenMPLoopInitialization (SourceLocation ForLoc, Stmt *Init)
 Check if the current region is an OpenMP loop region and if it is, mark loop control variable, used in Init for loop initialization, as private by default.
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 ActOnOpenMPRegionEnd (StmtResult S, ArrayRef< OMPClause * > Clauses)
 End of OpenMP region.
StmtResult ActOnOpenMPExecutableDirective (OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, 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 ActOnOpenMPForSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp for simd' 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 ActOnOpenMPParallelForSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, llvm::DenseMap< VarDecl *, Expr * > &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp parallel for simd' 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 ActOnOpenMPTaskgroupDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp taskgroup'.
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.
StmtResult ActOnOpenMPTargetDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp target' after parsing of the associated statement.
StmtResult ActOnOpenMPTargetDataDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp target data' after parsing of the associated statement.
StmtResult ActOnOpenMPTeamsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp teams' after parsing of the associated statement.
StmtResult ActOnOpenMPCancellationPointDirective (SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
 Called on well-formed '#pragma omp cancellation point'.
StmtResult ActOnOpenMPCancelDirective (SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
 Called on well-formed '#pragma omp cancel'.
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.
OMPClauseActOnOpenMPSimdlenClause (Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'simdlen' clause.
OMPClauseActOnOpenMPCollapseClause (Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'collapse' clause.
OMPClauseActOnOpenMPOrderedClause (SourceLocation StartLoc, SourceLocation EndLoc, SourceLocation LParenLoc=SourceLocation(), Expr *NumForLoops=nullptr)
 Called on well-formed 'ordered' 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)
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, OpenMPDependClauseKind DepKind, OpenMPLinearClauseKind LinKind, SourceLocation DepLinLoc)
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, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, 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.
OMPClauseActOnOpenMPDependClause (OpenMPDependClauseKind DepKind, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'depend' clause.
OMPClauseActOnOpenMPDeviceClause (Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'device' clause.
ExprResult ImpCastExprToType (Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_RValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
 ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
ExprResult IgnoredValueConversions (Expr *E)
 IgnoredValueConversions - Given that an expression's result is syntactically ignored, perform any conversions that are required.
ExprResult UsualUnaryConversions (Expr *E)
 UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6.3).
ExprResult CallExprUnaryConversions (Expr *E)
 CallExprUnaryConversions - a special case of an unary conversion performed on a function designator of a call expression.
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)
 DefaultArgumentPromotion (C99 6.5.2.2p6).
VariadicCallType getVariadicCallType (FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn)
VarArgKind isValidVarArgType (const QualType &Ty)
 Determine the degree of POD-ness for an expression.
void checkVariadicArgument (const Expr *E, VariadicCallType CT)
 Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic if not.
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)
 GatherArgumentsForCall - Collector argument expressions for various form of call prototypes.
ExprResult DefaultVariadicArgumentPromotion (Expr *E, VariadicCallType CT, FunctionDecl *FDecl)
 DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but will create a trap if the resulting type is not a POD type.
QualType UsualArithmeticConversions (ExprResult &LHS, ExprResult &RHS, bool IsCompAssign=false)
 UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6.3.1.8).
bool DiagnoseAssignmentResult (AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr)
 DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specified by ConvTy.
bool IsValueInFlagEnum (const EnumDecl *ED, const llvm::APInt &Val, bool AllowMask) const
 IsValueInFlagEnum - Determine if a value is allowed as part of a flag enum.
void DiagnoseAssignmentEnum (QualType DstType, QualType SrcType, Expr *SrcExpr)
 DiagnoseAssignmentEnum - Warn if assignment to enum is a constant integer not in the range of enum values.
AssignConvertType CheckAssignmentConstraints (SourceLocation Loc, QualType LHSType, QualType RHSType)
 CheckAssignmentConstraints - Perform type checking for assignment, argument passing, variable initialization, and function return values.
AssignConvertType CheckAssignmentConstraints (QualType LHSType, ExprResult &RHS, CastKind &Kind)
 Check assignment constraints and prepare for a conversion of the RHS to the LHS type.
AssignConvertType CheckSingleAssignmentConstraints (QualType LHSType, ExprResult &RHS, bool Diagnose=true, bool DiagnoseCFAudited=false)
AssignConvertType CheckTransparentUnionArgumentConstraints (QualType ArgType, ExprResult &RHS)
bool IsStringLiteralToNonConstPointerConversion (Expr *From, QualType ToType)
 Helper function to determine whether this is the (deprecated) C++ conversion from a string literal to a pointer to non-const char or non-const wchar_t (for narrow and wide string literals, respectively).
bool CheckExceptionSpecCompatibility (Expr *From, QualType ToType)
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false)
 PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType.
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)
 PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType using the pre-computed implicit conversion sequence ICS.
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK)
 PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType by following the standard conversion sequence SCS.
QualType InvalidOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
 the following "Check" methods will return a valid/converted QualType or a null QualType (indicating an error diagnostic was issued).
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)
 Given a pseudo-object expression, recreate what it looks like syntactically without the attendant OpaqueValueExprs.
QualType CheckConditionalOperands (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc)
 Note that LHS is not null here, even if this is the gnu "x ?: y" extension.
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)
 FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types of the two input expressions.
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.
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, bool AllowBothBool, bool AllowBoolConversion)
 type checking for vector binary operators.
QualType GetSignedVectorType (QualType V)
QualType CheckVectorCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool isRelational)
 CheckVectorCompareOperands - vector comparisons are a clang extension that operates on extended vector types.
QualType CheckVectorLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc)
bool areLaxCompatibleVectorTypes (QualType srcType, QualType destType)
 Are the two types lax-compatible vector types? That is, given that one of them is a vector, do they have equal storage sizes, where the storage size is the number of elements times the element size?
bool isLaxVectorConversion (QualType srcType, QualType destType)
 Is this a legal conversion between two types, one of which is known to be a vector type?
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)
 CompareReferenceRelationship - Compare the two types T1 and T2 to determine whether they are reference-related, reference-compatible, reference-compatible with added qualification, or incompatible, for use in C++ initialization by reference (C++ [dcl.ref.init]p4).
ExprResult checkUnknownAnyCast (SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path)
 Check a cast of an unknown-any type.
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)
void checkRetainCycles (ObjCMessageExpr *msg)
 checkRetainCycles - Check whether an Objective-C message send might create an obvious 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)
 checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type.
void checkUnsafeExprAssigns (SourceLocation Loc, Expr *LHS, Expr *RHS)
 checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expression.
ExprResult CheckBooleanCondition (Expr *E, SourceLocation Loc)
 CheckBooleanCondition - Diagnose problems involving the use of the given expression as a boolean condition (e.g.
ExprResult ActOnBooleanCondition (Scope *S, SourceLocation Loc, Expr *SubExpr)
void DiagnoseAssignmentAsCondition (Expr *E)
 DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition, warn if it's an assignment.
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)
 ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have the specified width and sign.
bool CheckObjCDeclScope (Decl *D)
 Checks that the Objective-C declaration is declared in the global scope.
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, bool AllowFold=true)
 VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate diagnostics.
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)
 VerifyBitField - verifies that a bit field expression is an ICE and has the correct width, and that the field type is valid.
CUDAFunctionTarget IdentifyCUDATarget (const FunctionDecl *D)
 IdentifyCUDATarget - Determine the CUDA compilation target for this function.
bool CheckCUDATarget (const FunctionDecl *Caller, const FunctionDecl *Callee)
bool inferCUDATargetForImplicitSpecialMember (CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose)
 Given a implicit special member, infer its CUDA target from the calls it needs to make to underlying base/field special members.
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)
bool FormatStringHasSArg (const StringLiteral *FExpr)
bool GetFormatNSStringIdx (const FormatAttr *Format, unsigned &Idx)
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.
IdentifierInfogetNullabilityKeyword (NullabilityKind nullability)
 Retrieve the keyword associated.
IdentifierInfogetNSErrorIdent ()
 Retrieve the identifier "NSError".
ScopegetCurScope () const
 Retrieve the parser's current scope.
void incrementMSManglingNumber () const
IdentifierInfogetSuperIdentifier () const
IdentifierInfogetFloat128Identifier () const
DeclgetObjCDeclContext () const
DeclContextgetCurLexicalContext () const
AvailabilityResult getCurContextAvailability () const
const DeclContextgetCurObjCLexicalContext () const
bool isSelfExpr (Expr *RExpr)
 Private Helper predicate to check for 'self'.
bool isSelfExpr (Expr *RExpr, const ObjCMethodDecl *Method)
ExprResult BuildObjCNumericLiteral (SourceLocation AtLoc, Expr *Number)
 BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression.
ExprResult ActOnObjCBoolLiteral (SourceLocation AtLoc, SourceLocation ValueLoc, bool Value)
ExprResult BuildObjCArrayLiteral (SourceRange SR, MultiExprArg Elements)
ExprResult BuildObjCBoxedExpr (SourceRange SR, Expr *ValueExpr)
 BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression.
ExprResult BuildObjCSubscriptExpression (SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
 Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime.
ExprResult BuildObjCDictionaryLiteral (SourceRange SR, ObjCDictionaryElement *Elements, unsigned NumElements)
ExprResult BuildObjCEncodeExpression (SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
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.
ObjCMethodDeclLookupMethodInQualifiedType (Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
 LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type.
ObjCMethodDeclLookupMethodInObjectType (Selector Sel, QualType Ty, bool IsInstance)
 LookupMethodInType - Look up a method in an ObjCObjectType.
ExprResult HandleExprPropertyRefExpr (const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
 HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface.
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)
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)
 stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.
void diagnoseARCUnbridgedCast (Expr *e)
 Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly.
bool CheckObjCARCUnavailableWeakConversion (QualType castType, QualType ExprType)
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)
 CheckMessageArgumentTypes - Check types in an Obj-C message send.
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.

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 (const Expr *E)
static SourceRange getPrintable (TypeLoc TL)
static bool adjustContextForLocalExternDecl (DeclContext *&DC)
 Adjust the DeclContext for a function or variable that might be a function-local external declaration.
static PrintingPolicy getPrintingPolicy (const ASTContext &Ctx, const Preprocessor &PP)
 Retrieve a suitable printing policy.
static ScopegetScopeForDeclContext (Scope *S, DeclContext *DC)
 Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope.
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)
 ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ScalarTy to the Boolean type.
static FormatStringType GetFormatStringType (const FormatAttr *Format)
static bool TooManyArguments (size_t NumParams, size_t NumArgs, bool PartialOverloading=false)
 To be used for checking whether the arguments being passed to function exceeds the number of parameters expected for it.

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
 VAListTagName - The declaration name corresponding to __va_list_tag.
void * PackContext
 PackContext - Manages the stack for #pragma pack.
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.
SmallVector< Scope *, 2 > CurrentSEHFinally
 Stack of active SEH __finally scopes. Can be empty.
SourceLocation ImplicitMSInheritanceAttrLoc
 Source location for newly created implicit MSInheritanceAttrs.
PragmaStack< StringLiteral * > DataSegStack
PragmaStack< StringLiteral * > BSSSegStack
PragmaStack< StringLiteral * > ConstSegStack
PragmaStack< StringLiteral * > CodeSegStack
FileNullabilityMap NullabilityMap
 A mapping that describes the nullability we've seen in each header file.
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.
bool IsBuildingRecoveryCallExpr
 Flag indicating if Sema is building a recovery call expression.
bool ExprNeedsCleanups
 ExprNeedsCleanups - True if the current evaluation context requires cleanups to be run at its conclusion.
SmallVector< BlockDecl *, 8 > ExprCleanupObjects
 ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current full expression.
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.
SmallVector
< sema::FunctionScopeInfo *, 4 > 
FunctionScopes
 Stack containing information about each of the nested function, block, and method scopes that are currently active.
ExtVectorDeclsType ExtVectorDecls
 ExtVectorDecls - This is a list all the extended vector types.
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.
llvm::SmallSetVector< const
TypedefNameDecl *, 4 > 
UnusedLocalTypedefNameCandidates
 Set containing all typedefs that are likely unused.
llvm::MapVector< FieldDecl
*, DeleteLocs
DeleteExprs
std::unique_ptr< RecordDeclSetTyPureVirtualClassDiagSet
 PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual functions.
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
 ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the initializer.
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.
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
CXXMethodDecl *, const
CXXMethodDecl