clang 18.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
clang::Sema Class Referencefinal

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

#include "clang/Sema/Sema.h"


struct  ActOnMemberAccessExtraArgs
struct  AlignPackIncludeState
class  AlignPackInfo
class  ArgumentPackSubstitutionIndexRAII
 RAII object used to change the argument pack substitution index within a Sema object. More...
class  BoundTypeDiagnoser
struct  CodeCompleteExpressionData
struct  CodeSynthesisContext
 A context in which code is being synthesized (where a source location alone is not sufficient to identify the context). More...
class  CompoundScopeRAII
 A RAII object to enter scope of a compound statement. More...
class  ConditionResult
struct  ConstraintEvalRAII
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...
struct  CUDATargetContext
 Define the current global CUDA host/device context where a function may be called. More...
struct  CUDATargetContextRAII
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  DefaultedFunctionKind
 For a defaulted function, the kind of defaulted function that it is. More...
class  DeferDiagsRAII
 RAII class to control scope of DeferDiags. 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...
class  ExtParameterInfoBuilder
 A helper class for building up ExtParameterInfos. More...
struct  FormatStringInfo
class  FPFeaturesStateRAII
 Records and restores the CurFPFeatures state on entry/exit of compound statements. More...
class  FpPragmaStackSaveRAII
class  FullExprArg
struct  FunctionDeclAndLoc
 A pair of a canonical FunctionDecl and a SourceLocation. More...
struct  FunctionScopeRAII
 An RAII helper that pops function a function scope on exit. More...
class  GlobalEagerInstantiationScope
class  GlobalMethodPool
class  ICEConvertDiagnoser
class  ImmediateDiagBuilder
 Helper class that creates diagnostics with optional template instantiation stacks. More...
class  ImplicitExceptionSpecification
 Helper class that collects exception specifications for implicitly-declared special member functions. More...
class  InheritedConstructorInfo
struct  InstantiatingTemplate
 A stack object to be created when performing template instantiation. More...
class  LambdaScopeForCallOperatorInstantiationRAII
struct  LateInstantiatedAttribute
class  LocalEagerInstantiationScope
class  NameClassification
struct  NamedReturnInfo
struct  NestedNameSpecInfo
 Keeps information about an identifier in a nested-name-spec. More...
struct  ObjCArgInfo
struct  OffsetOfComponent
struct  OMPIteratorData
 Data structure for iterator expression. More...
struct  OpenMPVarListDataTy
 Data used for processing a list of variables in OpenMP clauses. More...
struct  OriginalCallArg
 brief A function argument from which we performed template argument More...
class  PoppedFunctionScopeDeleter
 Custom deleter to allow FunctionScopeInfos to be kept alive for a short time after they've been popped. More...
struct  PragmaAttributeEntry
 This an attribute introduced by #pragma clang attribute. More...
struct  PragmaAttributeGroup
 A push'd group of PragmaAttributeEntries. More...
struct  PragmaClangSection
struct  PragmaPackInfo
struct  PragmaStack
class  PragmaStackSentinelRAII
struct  ProcessDeclAttributeOptions
struct  ReferenceConversionsScope
class  RequiredTemplateKind
 Whether and why a template name is required in this lookup. More...
class  SatisfactionStackResetRAII
class  SemaDiagnosticBuilder
 A generic diagnostic builder for errors which may or may not be deferred. More...
class  SFINAETrap
 RAII class used to determine whether SFINAE has trapped any errors that occur during template argument deduction. More...
class  SizelessTypeDiagnoser
 A derivative of BoundTypeDiagnoser for which the diagnostic's type parameter is preceded by a 0/1 enum that is 1 if the type is sizeless. More...
struct  SkipBodyInfo
class  SpecialMemberOverloadResult
 SpecialMemberOverloadResult - The overloading result for a special member function. More...
class  SpecialMemberOverloadResultEntry
class  SynthesizedFunctionScope
 RAII object to handle the state changes required to synthesize a function body. More...
class  TemplateCompareNewDeclInfo
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  UsesAllocatorsData
 Data for list of allocators. More...
class  VerifyICEDiagnoser
 Abstract base class used for diagnosing integer constant expression violations. More...

Public Types

enum  PragmaClangSectionKind {
  PCSK_Invalid = 0 , PCSK_BSS = 1 , PCSK_Data = 2 , PCSK_Rodata = 3 ,
  PCSK_Text = 4 , PCSK_Relro = 5
 pragma clang section kind More...
enum  PragmaClangSectionAction { PCSA_Set = 0 , PCSA_Clear = 1 }
enum  PragmaMsStackAction {
  PSK_Reset = 0x0 , PSK_Set = 0x1 , PSK_Push = 0x2 , PSK_Pop = 0x4 ,
  PSK_Show = 0x8 , PSK_Push_Set = PSK_Push | PSK_Set , PSK_Pop_Set = PSK_Pop | PSK_Set
enum  CUDAFunctionTarget {
  CFT_Device , CFT_Global , CFT_Host , CFT_HostDevice ,
enum class  ExpressionEvaluationContext {
  Unevaluated , UnevaluatedList , DiscardedStatement , UnevaluatedAbstract ,
  ConstantEvaluated , ImmediateFunctionContext , 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 class  DefaultedComparisonKind : unsigned char {
  None , Equal , ThreeWay , NotEqual ,
 Kinds of defaulted comparison operator functions. More...
enum  TUFragmentKind { Global , Normal , Private }
enum class  CompleteTypeKind { Normal , AcceptSizeless , Default = AcceptSizeless }
enum class  AcceptableKind { Visible , Reachable }
enum  NameClassificationKind {
  NC_Unknown , NC_Error , NC_Keyword , NC_Type ,
  NC_NonType , NC_UndeclaredNonType , NC_DependentNonType , NC_OverloadSet ,
  NC_TypeTemplate , NC_VarTemplate , NC_FunctionTemplate , NC_UndeclaredTemplate ,
 Describes the result of the name lookup and resolution performed by ClassifyName(). More...
enum class  TemplateNameKindForDiagnostics {
  ClassTemplate , FunctionTemplate , VarTemplate , AliasTemplate ,
  TemplateTemplateParam , Concept , DependentTemplate
 Describes the detailed kind of a template name. Used in diagnostics. More...
enum class  CheckConstexprKind { Diagnose , CheckValid }
enum  NonTrivialCUnionContext {
  NTCUC_FunctionParam , NTCUC_FunctionReturn , NTCUC_DefaultInitializedObject , NTCUC_AutoVar ,
  NTCUC_CopyInit , NTCUC_Assignment , NTCUC_CompoundLiteral , NTCUC_BlockCapture ,
enum  NonTrivialCUnionKind { NTCUK_Init = 0x1 , NTCUK_Destruct = 0x2 , NTCUK_Copy = 0x4 }
enum class  FnBodyKind { Other , Default , Delete }
enum class  ModuleDeclKind { Interface , Implementation , PartitionInterface , PartitionImplementation }
enum class  ModuleImportState {
  FirstDecl , GlobalFragment , ImportAllowed , ImportFinished ,
  PrivateFragmentImportAllowed , PrivateFragmentImportFinished , NotACXX20Module
 An enumeration to represent the transition of states in parsing module fragments and imports. More...
enum class  MissingImportKind {
  Declaration , Definition , DefaultArgument , ExplicitSpecialization ,
 Kinds of missing import. More...
enum  NonTagKind {
  NTK_NonStruct , NTK_NonClass , NTK_NonUnion , NTK_NonEnum ,
  NTK_Typedef , NTK_TypeAlias , NTK_Template , NTK_TypeAliasTemplate ,
 Common ways to introduce type names without a tag for use in diagnostics. More...
enum  TagUseKind { TUK_Reference , TUK_Declaration , TUK_Definition , TUK_Friend }
enum  OffsetOfKind { OOK_Outside , OOK_Builtin , OOK_Macro }
enum  TrivialABIHandling { TAH_IgnoreTrivialABI , TAH_ConsiderTrivialABI }
enum  AvailabilityMergeKind {
  AMK_None , AMK_Redeclaration , AMK_Override , AMK_ProtocolImplementation ,
 Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability"). More...
enum  AvailabilityPriority : int { AP_Explicit = 0 , AP_PragmaClangAttribute = 1 , AP_InferredFromOtherPlatform = 2 }
 Describes the kind of priority given to an availability attribute. 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 class  AllowedExplicit { None , Conversions , All }
enum  CCEKind {
  CCEK_CaseValue , CCEK_Enumerator , CCEK_TemplateArg , CCEK_ArrayBound ,
  CCEK_ExplicitBool , CCEK_Noexcept , CCEK_StaticAssertMessageSize , CCEK_StaticAssertMessageData
 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 }
typedef OpaquePtr< DeclGroupRefDeclGroupPtrTy
typedef OpaquePtr< TemplateNameTemplateTy
typedef OpaquePtr< QualTypeTypeTy
using MaybeODRUseExprSet = llvm::SmallSetVector< Expr *, 4 >
 Store a set 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.
typedef LazyVector< TypedefNameDecl *, ExternalSemaSource, &ExternalSemaSource::ReadExtVectorDecls, 2, 2 > ExtVectorDeclsType
typedef llvm::SmallSetVector< const NamedDecl *, 16 > NamedDeclSetType
typedef std::pair< SourceLocation, boolDeleteExprLoc
 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 *, std::unique_ptr< 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
using ImmediateInvocationCandidate = llvm::PointerIntPair< ConstantExpr *, 1 >
typedef llvm::DenseMap< ParmVarDecl *, llvm::TinyPtrVector< ParmVarDecl * > > UnparsedDefaultArgInstantiationsMap
typedef llvm::PointerIntPair< CXXRecordDecl *, 3, CXXSpecialMemberSpecialMemberDecl
using PoppedFunctionScopePtr = std::unique_ptr< sema::FunctionScopeInfo, PoppedFunctionScopeDeleter >
using UTTKind = UnaryTransformType::UTTKind
typedef void * SkippedDefinitionContext
typedef llvm::SmallSetVector< DeclContext *, 16 > AssociatedNamespaceSet
typedef llvm::SmallSetVector< CXXRecordDecl *, 16 > AssociatedClassSet
using ADLCallKind = CallExpr::ADLCallKind

Public Member Functions

FPOptionsOverride CurFPFeatureOverrides ()
void resetFPOptions (FPOptions FPO)
ArrayRef< sema::FunctionScopeInfo * > getFunctionScopes () const
ArrayRef< InventedTemplateParameterInfogetInventedParameterInfos () const
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.
void WarnOnPendingNoDerefs (ExpressionEvaluationContextRecord &Rec)
 Emit a warning for all pending noderef expressions that we recorded.
std::tuple< MangleNumberingContext *, Decl * > getCurrentMangleNumberContext (const DeclContext *DC)
 Compute the mangling number context for a lambda expression or block literal.
bool isExternalWithNoLinkageType (const ValueDecl *VD) const
 Determine if VD, which must be a variable or function, is an external symbol that nonetheless can't be referenced from outside this translation unit because its type has no linkage and it's not extern "C".
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 updateOutOfDateSelector (Selector Sel)
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.
virtual void anchor ()
 This virtual key function only exists to limit the emission of debug info describing the Sema class.
const LangOptionsgetLangOpts () const
OpenCLOptionsgetOpenCLOptions ()
FPOptionsgetCurFPFeatures ()
DiagnosticsEnginegetDiagnostics () const
SourceManagergetSourceManager () const
PreprocessorgetPreprocessor () const
ASTContextgetASTContext () const
ASTConsumergetASTConsumer () const
ASTMutationListenergetASTMutationListener () const
ExternalSemaSourcegetExternalSource () const
DarwinSDKInfogetDarwinSDKInfoForAvailabilityChecking (SourceLocation Loc, StringRef Platform)
DarwinSDKInfogetDarwinSDKInfoForAvailabilityChecking ()
void addExternalSource (ExternalSemaSource *E)
 Registers an external source.
void PrintStats () const
 Print out statistics about the semantic analysis.
void warnStackExhausted (SourceLocation Loc)
 Warn that the stack is nearly exhausted.
void runWithSufficientStackSpace (SourceLocation Loc, llvm::function_ref< void()> Fn)
 Run some code with "sufficient" stack space.
SemaDiagnosticBuilder Diag (SourceLocation Loc, unsigned DiagID, bool DeferHint=false)
 Emit a diagnostic.
SemaDiagnosticBuilder Diag (SourceLocation Loc, const PartialDiagnostic &PD, bool DeferHint=false)
 Emit a partial diagnostic.
PartialDiagnostic PDiag (unsigned DiagID=0)
 Build a partial diagnostic.
bool hasUncompilableErrorOccurred () const
 Whether uncompilable error has occurred.
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.
IdentifierInfoInventAbbreviatedTemplateParameterTypeName (IdentifierInfo *ParamName, unsigned Index)
 Invent a new identifier for parameters of abbreviated templates.
void emitAndClearUnusedLocalTypedefWarnings ()
void emitDeferredDiags ()
void ActOnStartOfTranslationUnit ()
 This is called before the very first declaration in the translation unit is parsed.
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 ActOnEndOfTranslationUnitFragment (TUFragmentKind Kind)
void CheckDelegatingCtorCycles ()
ScopegetScopeForContext (DeclContext *Ctx)
 Determines the active Scope associated with the given declaration context.
void PushFunctionScope ()
 Enter a new function scope.
void PushBlockScope (Scope *BlockScope, BlockDecl *Block)
sema::LambdaScopeInfoPushLambdaScope ()
void RecordParsingTemplateParameterDepth (unsigned Depth)
 This is used to inform Sema what the current TemplateParameterDepth is during Parsing.
void PushCapturedRegionScope (Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K, unsigned OpenMPCaptureLevel=0)
PoppedFunctionScopePtr PopFunctionScopeInfo (const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, QualType BlockType=QualType())
 Pop a function (or block or lambda or captured region) scope from the stack.
sema::FunctionScopeInfogetCurFunction () const
sema::FunctionScopeInfogetEnclosingFunction () const
void setFunctionHasBranchIntoScope ()
void setFunctionHasBranchProtectedScope ()
void setFunctionHasIndirectGoto ()
void setFunctionHasMustTail ()
void PushCompoundScope (bool IsStmtExpr)
void PopCompoundScope ()
sema::CompoundScopeInfogetCurCompoundScope () const
bool hasAnyUnrecoverableErrorsInThisFunction () const
 Determine whether any errors occurred within this function/method/ block.
sema::BlockScopeInfogetCurBlock ()
 Retrieve the current block, if any.
sema::LambdaScopeInfogetEnclosingLambda () const
 Get the innermost lambda enclosing the current location, if any.
sema::LambdaScopeInfogetCurLambda (bool IgnoreNonLambdaCapturingScope=false)
 Retrieve the current lambda scope info, if any.
sema::LambdaScopeInfogetCurGenericLambda ()
 Retrieve the current generic lambda info, if any.
sema::CapturedRegionScopeInfogetCurCapturedRegion ()
 Retrieve the current captured region, if any.
sema::FunctionScopeInfogetCurFunctionAvailabilityContext ()
 Retrieve the current function, if any, that should be analyzed for potential availability violations.
SmallVectorImpl< Decl * > & WeakTopLevelDecls ()
 WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
void ActOnStartFunctionDeclarationDeclarator (Declarator &D, unsigned TemplateParameterDepth)
 Called before parsing a function declarator belonging to a function declaration.
void ActOnFinishFunctionDeclarationDeclarator (Declarator &D)
 Called after parsing a function declarator belonging to a function declaration.
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, ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity)
 Build an array type.
QualType BuildVectorType (QualType T, Expr *VecSize, SourceLocation AttrLoc)
QualType BuildExtVectorType (QualType T, Expr *ArraySize, SourceLocation AttrLoc)
 Build an ext-vector type.
QualType BuildMatrixType (QualType T, Expr *NumRows, Expr *NumColumns, SourceLocation AttrLoc)
QualType BuildAddressSpaceAttr (QualType &T, LangAS ASIdx, Expr *AddrSpace, SourceLocation AttrLoc)
 BuildAddressSpaceAttr - Builds a DependentAddressSpaceType if an expression is uninstantiated.
QualType BuildAddressSpaceAttr (QualType &T, Expr *AddrSpace, SourceLocation AttrLoc)
 Same as above, but constructs the AddressSpace index if not provided.
CodeAlignAttr * BuildCodeAlignAttr (const AttributeCommonInfo &CI, Expr *E)
bool CheckRebuiltCodeAlignStmtAttributes (ArrayRef< const Attr * > Attrs)
bool CheckQualifiedFunctionForTypeId (QualType T, SourceLocation Loc)
bool CheckFunctionReturnType (QualType T, SourceLocation Loc)
QualType BuildFunctionType (QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI)
 Build a function type.
QualType BuildMemberPointerType (QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity)
 Build a member pointer type T Class::*.
QualType BuildBlockPointerType (QualType T, SourceLocation Loc, DeclarationName Entity)
 Build a block pointer type.
QualType BuildParenType (QualType T)
 Build a paren type including T.
QualType BuildAtomicType (QualType T, SourceLocation Loc)
QualType BuildReadPipeType (QualType T, SourceLocation Loc)
 Build a Read-only Pipe type.
QualType BuildWritePipeType (QualType T, SourceLocation Loc)
 Build a Write-only Pipe type.
QualType BuildBitIntType (bool IsUnsigned, Expr *BitWidth, SourceLocation Loc)
 Build a bit-precise integer type.
TypeSourceInfoGetTypeForDeclarator (Declarator &D, Scope *S)
 GetTypeForDeclarator - Convert the type for the specified declarator to Type instances.
TypeSourceInfoGetTypeForDeclaratorCast (Declarator &D, QualType FromTy)
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 Stmt *E)
const FunctionProtoTypeResolveExceptionSpec (SourceLocation Loc, const FunctionProtoType *FPT)
void UpdateExceptionSpec (FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI)
bool CheckSpecifiedExceptionType (QualType &T, 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 handlerCanCatch (QualType HandlerType, QualType ExceptionType)
bool CheckExceptionSpecSubset (const PartialDiagnostic &DiagID, const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const PartialDiagnostic &NoThrowDiagID, const FunctionProtoType *Superset, bool SkipSupersetFirstParameter, SourceLocation SuperLoc, const FunctionProtoType *Subset, bool SkipSubsetFirstParameter, 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 &NestedDiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Target, bool SkipTargetFirstParameter, SourceLocation TargetLoc, const FunctionProtoType *Source, bool SkipSourceFirstParameter, 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.
bool DiagnoseSwiftName (Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync)
 Do a check to make sure Name looks like a legal argument for the swift_name attribute applied to decl D.
ModulegetCurrentModule () const
 Get the module unit whose scope we are currently within.
bool currentModuleIsImplementation () const
 Is the module scope we are an implementation unit?
bool currentModuleIsHeaderUnit () const
 Is the module scope we are in a C++ Header Unit?
ModulegetOwningModule (const Decl *Entity)
 Get the module owning an entity.
void makeMergedDefinitionVisible (NamedDecl *ND)
 Make a merged definition of an existing hidden definition ND visible at the specified location.
bool isModuleVisible (const Module *M, bool ModulePrivate=false)
void makeModuleVisible (Module *Mod, SourceLocation ImportLoc)
bool isVisible (const NamedDecl *D)
 Determine whether a declaration is visible to name lookup.
bool isReachable (const NamedDecl *D)
 Determine whether a declaration is reachable.
bool isAcceptable (const NamedDecl *D, AcceptableKind Kind)
 Determine whether a declaration is acceptable (visible/reachable).
bool hasVisibleDeclaration (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine whether any declaration of an entity is visible.
bool hasVisibleDeclarationSlow (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules)
bool hasReachableDeclaration (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine whether any declaration of an entity is reachable.
bool hasReachableDeclarationSlow (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
bool hasVisibleMergedDefinition (const NamedDecl *Def)
bool hasMergedDefinitionInCurrentModule (const NamedDecl *Def)
bool hasStructuralCompatLayout (Decl *D, Decl *Suggested)
 Determine if D and Suggested have a structurally compatible layout as described in C11 6.2.7/1.
bool hasVisibleDefinition (NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
 Determine if D has a visible definition.
bool hasVisibleDefinition (const NamedDecl *D)
bool hasReachableDefinition (NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
 Determine if D has a reachable definition.
bool hasReachableDefinition (NamedDecl *D)
bool hasAcceptableDefinition (NamedDecl *D, NamedDecl **Suggested, AcceptableKind Kind, bool OnlyNeedComplete=false)
bool hasAcceptableDefinition (NamedDecl *D, AcceptableKind Kind)
bool hasVisibleDefaultArgument (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if the template parameter D has a visible default argument.
bool hasReachableDefaultArgument (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if the template parameter D has a reachable default argument.
bool hasAcceptableDefaultArgument (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules, Sema::AcceptableKind Kind)
 Determine if the template parameter D has a reachable default argument.
bool hasVisibleExplicitSpecialization (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if there is a visible declaration of D that is an explicit specialization declaration for a specialization of a template.
bool hasReachableExplicitSpecialization (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if there is a reachable declaration of D that is an explicit specialization declaration for a specialization of a template.
bool hasVisibleMemberSpecialization (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if there is a visible declaration of D that is a member specialization declaration (as opposed to an instantiated declaration).
bool hasReachableMemberSpecialization (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if there is a reachable declaration of D that is a member specialization declaration (as opposed to an instantiated declaration).
bool isEquivalentInternalLinkageDeclaration (const NamedDecl *A, const NamedDecl *B)
 Determine if A and B are equivalent internal linkage declarations from different modules, and thus an ambiguity error can be downgraded to an extension warning.
void diagnoseEquivalentInternalLinkageDeclarations (SourceLocation Loc, const NamedDecl *D, ArrayRef< const NamedDecl * > Equiv)
bool isUsualDeallocationFunction (const CXXMethodDecl *FD)
bool checkArrayElementAlignment (QualType EltTy, SourceLocation Loc)
bool isCompleteType (SourceLocation Loc, QualType T, CompleteTypeKind Kind=CompleteTypeKind::Default)
bool RequireCompleteType (SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
 Ensure that the type T is a complete type.
bool RequireCompleteType (SourceLocation Loc, QualType T, CompleteTypeKind Kind, unsigned DiagID)
bool RequireCompleteType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID)
template<typename... Ts>
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
template<typename... Ts>
bool RequireCompleteSizedType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &... Args)
QualType getCompletedType (Expr *E)
 Get the type of expression E, triggering instantiation to complete the type if necessary – that is, if the expression refers to a templated static data member of incomplete array type.
void completeExprArrayBound (Expr *E)
bool RequireCompleteExprType (Expr *E, CompleteTypeKind Kind, 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)
template<typename... Ts>
bool RequireCompleteSizedExprType (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, TagDecl *OwnedTagDecl=nullptr)
 Retrieve a version of the type 'T' that is elaborated by Keyword, qualified by the nested-name-specifier contained in SS, and that is (re)declared by OwnedTagDecl, which is nullptr if this is not a (re)declaration.
QualType getDecltypeForExpr (Expr *E)
 getDecltypeForExpr - Given an expr, will return the decltype for that expression, according to the rules in C++11 [dcl.type.simple]p4 and C++11 [expr.lambda.prim]p18.
QualType BuildTypeofExprType (Expr *E, TypeOfKind Kind)
QualType BuildDecltypeType (Expr *E, 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, UTTKind UKind, SourceLocation Loc)
QualType BuiltinEnumUnderlyingType (QualType BaseType, SourceLocation Loc)
QualType BuiltinAddPointer (QualType BaseType, SourceLocation Loc)
QualType BuiltinRemovePointer (QualType BaseType, SourceLocation Loc)
QualType BuiltinDecay (QualType BaseType, SourceLocation Loc)
QualType BuiltinAddReference (QualType BaseType, UTTKind UKind, SourceLocation Loc)
QualType BuiltinRemoveExtent (QualType BaseType, UTTKind UKind, SourceLocation Loc)
QualType BuiltinRemoveReference (QualType BaseType, UTTKind UKind, SourceLocation Loc)
QualType BuiltinChangeCVRQualifiers (QualType BaseType, UTTKind UKind, SourceLocation Loc)
QualType BuiltinChangeSignedness (QualType BaseType, 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=nullptr, bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, bool IsClassTemplateDeductionContext=true, ImplicitTypenameContext AllowImplicitTypename=ImplicitTypenameContext::No, 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 IsTemplateName=false)
ParsedType ActOnMSVCUnknownTypeName (const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg)
 Attempt to behave like MSVC in situations where lookup of an unqualified type name has failed in a dependent context.
NameClassification ClassifyName (Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, CorrectionCandidateCallback *CCC=nullptr)
 Perform name lookup on the given name, classifying it based on the results of name lookup and the following token.
ExprResult ActOnNameClassifiedAsUndeclaredNonType (IdentifierInfo *Name, SourceLocation NameLoc)
 Act on the result of classifying a name as an undeclared (ADL-only) non-type declaration.
ExprResult ActOnNameClassifiedAsDependentNonType (const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, bool IsAddressOfOperand)
 Act on the result of classifying a name as an undeclared member of a dependent base class.
ExprResult ActOnNameClassifiedAsNonType (Scope *S, const CXXScopeSpec &SS, NamedDecl *Found, SourceLocation NameLoc, const Token &NextToken)
 Act on the result of classifying a name as a specific non-type declaration.
ExprResult ActOnNameClassifiedAsOverloadSet (Scope *S, Expr *OverloadSet)
 Act on the result of classifying a name as an overload set.
TemplateNameKindForDiagnostics getTemplateNameKindForDiagnostics (TemplateName Name)
bool mightBeIntendedToBeTemplateName (ExprResult E, bool &Dependent)
 Determine whether it's plausible that E was intended to be a template-name.
void diagnoseExprIntendedAsTemplateName (Scope *S, ExprResult TemplateName, SourceLocation Less, SourceLocation Greater)
void warnOnReservedIdentifier (const NamedDecl *D)
DeclActOnDeclarator (Scope *S, Declarator &D)
NamedDeclHandleDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
bool tryToFixVariablyModifiedVarType (TypeSourceInfo *&TInfo, QualType &T, SourceLocation Loc, unsigned FailedFoldDiagID)
 Attempt to fold a variable-sized type to a constant-sized type, returning true if we were successful.
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, bool IsTemplateId)
 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(), SourceLocation UnalignedQualLoc=SourceLocation())
void DiagnoseFunctionSpecifiers (const DeclSpec &DS)
 Diagnose function specifiers on a declaration of an identifier that does not identify a function.
NamedDeclgetShadowedDeclaration (const TypedefNameDecl *D, const LookupResult &R)
 Return the declaration shadowed by the given typedef D, or null if it doesn't shadow any declaration or shadowing warnings are disabled.
NamedDeclgetShadowedDeclaration (const VarDecl *D, const LookupResult &R)
 Return the declaration shadowed by the given variable D, or null if it doesn't shadow any declaration or shadowing warnings are disabled.
NamedDeclgetShadowedDeclaration (const BindingDecl *D, const LookupResult &R)
 Return the declaration shadowed by the given variable D, or null if it doesn't shadow any declaration or shadowing warnings are disabled.
void CheckShadow (NamedDecl *D, NamedDecl *ShadowedDecl, 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 CheckShadowingDeclModification (Expr *E, SourceLocation Loc)
 Warn if 'E', which is an expression that is about to be modified, refers to a shadowing declaration.
void DiagnoseShadowingLambdaDecls (const sema::LambdaScopeInfo *LSI)
 Diagnose shadowing for variables shadowed in the lambda record LambdaRD when these variables are captured by the lambda.
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, ArrayRef< BindingDecl * > Bindings=std::nullopt)
NamedDeclActOnDecompositionDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists)
void DiagPlaceholderVariableDefinition (SourceLocation Loc)
bool DiagRedefinedPlaceholderFieldDecl (SourceLocation Loc, RecordDecl *ClassDecl, const IdentifierInfo *Name)
bool CheckVariableDeclaration (VarDecl *NewVD, LookupResult &Previous)
 Perform semantic checking on a newly-created variable declaration.
void CheckVariableDeclarationType (VarDecl *NewVD)
bool DeduceVariableDeclarationType (VarDecl *VDecl, bool DirectInit, Expr *Init)
void CheckCompleteVariableDeclaration (VarDecl *VD)
void CheckCompleteDecompositionDeclaration (DecompositionDecl *DD)
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 CheckConstexprFunctionDefinition (const FunctionDecl *FD, CheckConstexprKind Kind)
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 IsMemberSpecialization, bool DeclIsDefn)
 Perform semantic checking of a new function declaration.
bool shouldLinkDependentDeclWithPrevious (Decl *D, Decl *OldDecl)
 Checks if the new declaration declared in dependent context must be put in the same redeclaration chain as the specified declaration.
bool canFullyTypeCheckRedeclaration (ValueDecl *NewD, ValueDecl *OldD, QualType NewT, QualType OldT)
 Determines if we can perform a correct type check for D as a redeclaration of PrevDecl.
void CheckMain (FunctionDecl *FD, const DeclSpec &D)
void CheckMSVCRTEntryPoint (FunctionDecl *FD)
void ActOnHLSLTopLevelFunction (FunctionDecl *FD)
void CheckHLSLEntryPoint (FunctionDecl *FD)
void CheckHLSLSemanticAnnotation (FunctionDecl *EntryPoint, const Decl *Param, const HLSLAnnotationAttr *AnnotationAttr)
void DiagnoseHLSLAttrStageMismatch (const Attr *A, HLSLShaderAttr::ShaderType Stage, std::initializer_list< HLSLShaderAttr::ShaderType > AllowedStages)
AttrgetImplicitCodeSegOrSectionAttrForFunction (const FunctionDecl *FD, bool IsDefinition)
 Returns an implicit CodeSegAttr if a __declspec(code_seg) is found on a containing class.
void CheckFunctionOrTemplateParamDeclarator (Scope *S, Declarator &D)
 Common checks for a parameter-declaration that should apply to both function parameters and non-type template parameters.
DeclActOnParamDeclarator (Scope *S, Declarator &D, SourceLocation ExplicitThisLoc={})
 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, Expr *DefaultArg)
 ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the parameter param failed.
ExprResult ConvertParamDefaultArgument (ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
void SetParamDefaultArgument (ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
void checkNonTrivialCUnionInInitializer (const Expr *Init, SourceLocation Loc)
 Emit diagnostics if the initializer or any of its explicit or implicitly-generated subexpressions require copying or default-initializing a type that is or contains a C union type that is non-trivial to copy or default-initialize.
void checkNonTrivialCUnion (QualType QT, SourceLocation Loc, NonTrivialCUnionContext UseContext, unsigned NonTrivialKind)
 Emit diagnostics if a non-trivial C union type or a struct that contains a non-trivial C union is used in an invalid context.
void AddInitializerToDecl (Decl *dcl, Expr *init, bool DirectInit)
 AddInitializerToDecl - Adds the initializer Init to the declaration dcl.
void ActOnUninitializedDecl (Decl *dcl)
void ActOnInitializerError (Decl *Dcl)
 ActOnInitializerError - Given that there was an error parsing an initializer for the given declaration, try to at least re-establish invariants such as whether a variable's type is either dependent or complete.
void ActOnPureSpecifier (Decl *D, SourceLocation PureSpecLoc)
void ActOnCXXForRangeDecl (Decl *D)
StmtResult ActOnCXXForRangeIdentifier (Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs)
void SetDeclDeleted (Decl *dcl, SourceLocation DelLoc)
void SetDeclDefaulted (Decl *dcl, SourceLocation DefaultLoc)
void CheckStaticLocalForDllExport (VarDecl *VD)
 Check if VD needs to be dllexport/dllimport due to being in a dllexport/import function.
void CheckThreadLocalForLargeAlignment (VarDecl *VD)
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)
 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, FnBodyKind BodyKind=FnBodyKind::Other)
DeclActOnStartOfFunctionDef (Scope *S, Decl *D, SkipBodyInfo *SkipBody=nullptr, FnBodyKind BodyKind=FnBodyKind::Other)
void SetFunctionBodyKind (Decl *D, SourceLocation Loc, FnBodyKind BodyKind)
void ActOnStartTrailingRequiresClause (Scope *S, Declarator &D)
ExprResult ActOnFinishTrailingRequiresClause (ExprResult ConstraintExpr)
ExprResult ActOnRequiresClause (ExprResult ConstraintExpr)
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.
bool isDeclaratorFunctionLike (Declarator &D)
 Determine whether.
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 ActOnFinishInlineFunctionDef (FunctionDecl *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 (ArrayRef< ParmVarDecl * > Parameters)
 Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
void DiagnoseSizeOfParametersAndReturnValue (ArrayRef< ParmVarDecl * > Parameters, 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)
DeclActOnTopLevelStmtDecl (Stmt *Statement)
DeclActOnEmptyDeclaration (Scope *S, const ParsedAttributesView &AttrList, SourceLocation SemiLoc)
 Handle a C++11 empty-declaration and attribute-declaration.
DeclGroupPtrTy ActOnModuleDecl (SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState)
 The parser has processed a module-declaration that begins the definition of a module interface or implementation.
DeclGroupPtrTy ActOnGlobalModuleFragmentDecl (SourceLocation ModuleLoc)
 The parser has processed a global-module-fragment declaration that begins the definition of the global module fragment of the current module unit.
DeclGroupPtrTy ActOnPrivateModuleFragmentDecl (SourceLocation ModuleLoc, SourceLocation PrivateLoc)
 The parser has processed a private-module-fragment declaration that begins the definition of the private module fragment of the current module unit.
DeclResult ActOnModuleImport (SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, ModuleIdPath Path, bool IsPartition=false)
 The parser has processed a module import declaration.
DeclResult ActOnModuleImport (SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, Module *M, ModuleIdPath Path={})
void ActOnModuleInclude (SourceLocation DirectiveLoc, Module *Mod)
 The parser has processed a module import translated from a #include or similar preprocessing directive.
void BuildModuleInclude (SourceLocation DirectiveLoc, Module *Mod)
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, const NamedDecl *Decl, MissingImportKind MIK, 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, const NamedDecl *Decl, SourceLocation DeclLoc, ArrayRef< Module * > Modules, MissingImportKind MIK, bool Recover)
DeclActOnStartExportDecl (Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc)
 We have parsed the start of an export declaration, including the '{' (if present).
DeclActOnFinishExportDecl (Scope *S, Decl *ExportDecl, SourceLocation RBraceLoc)
 Complete the definition of an export declaration.
void checkSpecializationVisibility (SourceLocation Loc, NamedDecl *Spec)
 We've found a use of a templated declaration that would trigger an implicit instantiation.
void checkSpecializationReachability (SourceLocation Loc, NamedDecl *Spec)
PrintingPolicy getPrintingPolicy () const
 Retrieve a suitable printing policy for diagnostics.
void ActOnPopScope (SourceLocation Loc, Scope *S)
 Scope actions.
void ActOnTranslationUnitScope (Scope *S)
DeclParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, RecordDecl *&AnonRecord)
 ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.
DeclParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord)
 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.
void ActOnDefinedDeclarationSpecifier (Decl *D)
 Called once it is known whether a tag declaration is an anonymous union or struct.
void DiagPlaceholderFieldDeclDefinitions (RecordDecl *Record)
 Emit diagnostic warnings for placeholder members.
DeclBuildMicrosoftCAnonymousStruct (Scope *S, DeclSpec &DS, RecordDecl *Record)
 BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure.
NonTagKind getNonTagTypeDeclKind (const Decl *D, TagTypeKind TTK)
 Given a non-tag type declaration, returns an enum useful for indicating what kind of non-tag type this is.
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.
DeclResult ActOnTag (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody=nullptr)
 This is invoked when we see 'struct foo' or 'struct {'.
DeclResult ActOnTemplatedFriendTag (Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &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, const ParsedAttr &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, TrivialABIHandling TAH=TAH_IgnoreTrivialABI, 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.
DefaultedFunctionKind getDefaultedFunctionKind (const FunctionDecl *FD)
 Determine the kind of defaulting that would be done for a given function.
CXXSpecialMember getSpecialMember (const CXXMethodDecl *MD)
DefaultedComparisonKind getDefaultedComparisonKind (const FunctionDecl *FD)
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 *BitWidth, 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, const ParsedAttributesView &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).
bool ActOnDuplicateDefinition (Decl *Prev, SkipBodyInfo &SkipBody)
 Perform ODR-like check for C/ObjC when merging tag types from modules.
template<typename T , typename = std::enable_if_t<std::is_base_of<NamedDecl, T>::value>>
bool ActOnDuplicateODRHashDefinition (T *Duplicate, T *Previous)
 Check ODR hashes for C/ObjC when merging types from modules.
SkippedDefinitionContext ActOnTagStartSkippedDefinition (Scope *S, Decl *TD)
 Invoked when we enter a tag definition that we're skipping.
void ActOnObjCContainerStartDefinition (ObjCContainerDecl *IDecl)
void ActOnStartCXXMemberDeclarations (Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, bool IsAbstract, 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, SourceRange BraceRange)
 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 (ObjCContainerDecl *ObjCCtx)
 Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs.
void ActOnObjCReenterContainerContext (ObjCContainerDecl *ObjCCtx)
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, bool IsFixed, 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, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val)
void ActOnEnumBody (SourceLocation EnumLoc, SourceRange BraceRange, Decl *EnumDecl, ArrayRef< Decl * > Elements, Scope *S, const ParsedAttributesView &Attr)
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 EnterTemplatedContext (Scope *S, DeclContext *DC)
 Enter a template parameter scope, after it's been associated with a particular DeclContext.
void ActOnReenterFunctionContext (Scope *S, Decl *D)
 Push the parameters of D, which must be a function, into scope.
void ActOnExitFunctionContext ()
DeclContextgetFunctionLevelDeclContext (bool AllowLambda=false) const
 If AllowLambda is true, treat lambda as function.
FunctionDeclgetCurFunctionDecl (bool AllowLambda=false) const
 Returns a pointer to the innermost enclosing function, or nullptr if the current context is not inside a function.
ObjCMethodDeclgetCurMethodDecl ()
 getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the method being parsed.
NamedDeclgetCurFunctionOrMethodDecl () const
 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.
bool isDeclInScope (NamedDecl *D, DeclContext *Ctx, Scope *S=nullptr, bool AllowInlineNamespace=false) const
 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, const AttributeCommonInfo &CI, IdentifierInfo *Platform, bool Implicit, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool IsStrict, StringRef Replacement, AvailabilityMergeKind AMK, int Priority)
 Attribute merging methods. Return true if a new attribute was added.
TypeVisibilityAttr * mergeTypeVisibilityAttr (Decl *D, const AttributeCommonInfo &CI, TypeVisibilityAttr::VisibilityType Vis)
VisibilityAttr * mergeVisibilityAttr (Decl *D, const AttributeCommonInfo &CI, VisibilityAttr::VisibilityType Vis)
UuidAttr * mergeUuidAttr (Decl *D, const AttributeCommonInfo &CI, StringRef UuidAsWritten, MSGuidDecl *GuidDecl)
DLLImportAttr * mergeDLLImportAttr (Decl *D, const AttributeCommonInfo &CI)
DLLExportAttr * mergeDLLExportAttr (Decl *D, const AttributeCommonInfo &CI)
MSInheritanceAttr * mergeMSInheritanceAttr (Decl *D, const AttributeCommonInfo &CI, bool BestCase, MSInheritanceModel Model)
ErrorAttr * mergeErrorAttr (Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic)
FormatAttr * mergeFormatAttr (Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Format, int FormatIdx, int FirstArg)
SectionAttr * mergeSectionAttr (Decl *D, const AttributeCommonInfo &CI, StringRef Name)
CodeSegAttr * mergeCodeSegAttr (Decl *D, const AttributeCommonInfo &CI, StringRef Name)
AlwaysInlineAttr * mergeAlwaysInlineAttr (Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Ident)
MinSizeAttr * mergeMinSizeAttr (Decl *D, const AttributeCommonInfo &CI)
SwiftNameAttr * mergeSwiftNameAttr (Decl *D, const SwiftNameAttr &SNA, StringRef Name)
OptimizeNoneAttr * mergeOptimizeNoneAttr (Decl *D, const AttributeCommonInfo &CI)
InternalLinkageAttr * mergeInternalLinkageAttr (Decl *D, const ParsedAttr &AL)
InternalLinkageAttr * mergeInternalLinkageAttr (Decl *D, const InternalLinkageAttr &AL)
WebAssemblyImportNameAttr * mergeImportNameAttr (Decl *D, const WebAssemblyImportNameAttr &AL)
WebAssemblyImportModuleAttr * mergeImportModuleAttr (Decl *D, const WebAssemblyImportModuleAttr &AL)
EnforceTCBAttr * mergeEnforceTCBAttr (Decl *D, const EnforceTCBAttr &AL)
EnforceTCBLeafAttr * mergeEnforceTCBLeafAttr (Decl *D, const EnforceTCBLeafAttr &AL)
BTFDeclTagAttr * mergeBTFDeclTagAttr (Decl *D, const BTFDeclTagAttr &AL)
HLSLNumThreadsAttr * mergeHLSLNumThreadsAttr (Decl *D, const AttributeCommonInfo &AL, int X, int Y, int Z)
HLSLShaderAttr * mergeHLSLShaderAttr (Decl *D, const AttributeCommonInfo &AL, HLSLShaderAttr::ShaderType ShaderType)
void mergeDeclAttributes (NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration)
 mergeDeclAttributes - Copy attributes from the Old decl to the New one.
void MergeTypedefNameDecl (Scope *S, 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, bool NewDeclIsDefn)
 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 checkVarDeclRedefinition (VarDecl *OldDefn, VarDecl *NewDefn)
 We've just determined that Old and New both appear to be definitions of the same variable.
void notePreviousDefinition (const NamedDecl *Old, SourceLocation New)
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 UseMemberUsingDeclRules)
 Determine whether the given New declaration is an overload of the declarations in Old.
bool IsOverload (FunctionDecl *New, FunctionDecl *Old, bool UseMemberUsingDeclRules, bool ConsiderCudaAttrs=true)
bool IsOverride (FunctionDecl *MD, FunctionDecl *BaseMD, bool UseMemberUsingDeclRules, bool ConsiderCudaAttrs=true)
bool ConstraintExpressionDependsOnEnclosingTemplate (const FunctionDecl *Friend, unsigned TemplateDepth, const Expr *Constraint)
bool FriendConstraintsDependOnEnclosingTemplate (const FunctionDecl *FD)
ImplicitConversionSequence TryImplicitConversion (Expr *From, QualType ToType, bool SuppressUserConversions, AllowedExplicit 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 (ArrayRef< QualType > Old, ArrayRef< QualType > New, unsigned *ArgPos=nullptr, bool Reversed=false)
 FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their parameter types.
bool FunctionParamTypesAreEqual (const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr, bool Reversed=false)
bool FunctionNonObjectParamTypesAreEqual (const FunctionDecl *OldFunction, const FunctionDecl *NewFunction, unsigned *ArgPos=nullptr, bool Reversed=false)
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, bool Diagnose=true)
 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 IsFunctionConversion (QualType FromType, QualType ToType, QualType &ResultTy)
 Determine whether the conversion from FromType to ToType is a valid conversion that strips "noexcept" or "noreturn" off the nested function type.
bool DiagnoseMultipleUserDefinedConversion (Expr *From, QualType ToType)
bool isSameOrCompatibleFunctionType (QualType Param, QualType Arg)
 Compare types for equality with respect to possibly compatible function types (noreturn adjustment, implicit calling conventions).
bool CanPerformAggregateInitializationForOverloadResolution (const InitializedEntity &Entity, InitListExpr *From)
 Determine whether we can perform aggregate initialization for the purposes of overload resolution.
bool IsStringInit (Expr *Init, const ArrayType *AT)
bool CanPerformCopyInitialization (const InitializedEntity &Entity, ExprResult Init)
ExprResult PerformCopyInitialization (const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false, bool AllowExplicit=false)
ExprResult InitializeExplicitObjectArgument (Sema &S, Expr *Obj, FunctionDecl *Fun)
ExprResult PerformImplicitObjectArgumentInitialization (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method)
 PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the given Method with the given expression.
void checkInitializerLifetime (const InitializedEntity &Entity, Expr *Init)
 Check that the lifetime of the initializer (and its subobjects) is sufficient for initializing the entity, and perform lifetime extension (when permitted) if not.
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 BuildConvertedConstantExpression (Expr *From, QualType T, CCEKind CCE, NamedDecl *Dest=nullptr)
ExprResult CheckConvertedConstantExpression (Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
ExprResult CheckConvertedConstantExpression (Expr *From, QualType T, APValue &Value, CCEKind CCE, NamedDecl *Dest=nullptr)
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=true, bool AllowExplicitConversion=false, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, ConversionSequenceList EarlyConversions=std::nullopt, OverloadCandidateParamOrder PO={}, bool AggregateCandidateDeduction=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, bool FirstArgumentIsBase=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, OverloadCandidateParamOrder PO={})
 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, ConversionSequenceList EarlyConversions=std::nullopt, OverloadCandidateParamOrder PO={})
 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, OverloadCandidateParamOrder PO={})
 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, bool AllowExplicit=true, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, OverloadCandidateParamOrder PO={}, bool AggregateCandidateDeduction=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.
bool CheckNonDependentConversions (FunctionTemplateDecl *FunctionTemplate, ArrayRef< QualType > ParamTypes, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, ConversionSequenceList &Conversions, bool SuppressUserConversions, CXXRecordDecl *ActingContext=nullptr, QualType ObjectType=QualType(), Expr::Classification ObjectClassification={}, OverloadCandidateParamOrder PO={})
 Check that implicit conversion sequences can be formed for each argument whose corresponding parameter has a non-dependent type, per DR1391's []p10.
void AddConversionCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit, bool AllowExplicit, bool AllowResultConversion=true)
 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, bool AllowExplicit, bool AllowResultConversion=true)
 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++ []p2-4).
void AddNonMemberOperatorCandidates (const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
 Add all of the non-member operator function declarations in the given function set to the overload candidate set.
void AddMemberOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, OverloadCandidateParamOrder PO={})
 Add overload candidates for overloaded operators that are member functions.
void AddBuiltinCandidate (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 (const NamedDecl *Found, const FunctionDecl *Fn, OverloadCandidateRewriteKind RewriteKind=OverloadCandidateRewriteKind(), QualType DestType=QualType(), bool TakingAddress=false)
void NoteAllOverloadCandidates (Expr *E, QualType DestType=QualType(), bool TakingAddress=false)
EnableIfAttr * CheckEnableIf (FunctionDecl *Function, SourceLocation CallLoc, ArrayRef< Expr * > Args, bool MissingImplicitThis=false)
 Check the enable_if expressions on the given function.
std::pair< Expr *, std::string > findFailedBooleanCondition (Expr *Cond)
 Find the failed Boolean condition within a given Boolean constant expression, and describe it with a string.
bool diagnoseArgDependentDiagnoseIfAttrs (const FunctionDecl *Function, const Expr *ThisArg, ArrayRef< const Expr * > Args, SourceLocation Loc)
 Emit diagnostics for the diagnose_if attributes on Function, ignoring any non-ArgDependent DiagnoseIfAttrs.
bool diagnoseArgIndependentDiagnoseIfAttrs (const NamedDecl *ND, SourceLocation Loc)
 Emit diagnostics for the diagnose_if attributes on Function, ignoring any ArgDependent DiagnoseIfAttrs.
bool checkAddressOfFunctionIsAvailable (const FunctionDecl *Function, bool Complain=false, SourceLocation Loc=SourceLocation())
 Returns whether the given function's address can be taken or not, optionally emitting a diagnostic if the address can't be taken.
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.
FunctionDeclresolveAddressOfSingleOverloadCandidate (Expr *E, DeclAccessPair &FoundResult)
 Given an expression that refers to an overloaded function, try to resolve that function to a single function that can have its address taken.
bool resolveAndFixAddressOfSingleOverloadCandidate (ExprResult &SrcExpr, bool DoFunctionPointerConversion=false)
 Given an overloaded function, tries to turn it into a non-overloaded function reference using resolveAddressOfSingleOverloadCandidate.
FunctionDeclResolveSingleFunctionTemplateSpecialization (OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr, TemplateSpecCandidateSet *FailedTSC=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 DoFunctionPointerConversion=false, bool Complain=false, SourceRange OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0)
ExprResult FixOverloadedFunctionReference (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.
void AddOverloadedCallCandidates (LookupResult &R, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
 Add the call candidates from the given set of lookup results to the given overload set.
ForRangeStatus BuildForRangeBeginEndCall (SourceLocation Loc, SourceLocation RangeLoc, 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, bool CalleesAddressIsTaken=false)
 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 CreateUnresolvedLookupExpr (CXXRecordDecl *NamingClass, NestedNameSpecifierLoc NNSLoc, DeclarationNameInfo DNI, const UnresolvedSetImpl &Fns, bool PerformADL=true)
ExprResult CreateOverloadedUnaryOp (SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *input, bool RequiresADL=true)
 Create a unary operation that may resolve to an overloaded operator.
void LookupOverloadedBinOp (OverloadCandidateSet &CandidateSet, OverloadedOperatorKind Op, const UnresolvedSetImpl &Fns, ArrayRef< Expr * > Args, bool RequiresADL=true)
 Perform lookup for an overloaded binary operator.
ExprResult CreateOverloadedBinOp (SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool RequiresADL=true, bool AllowRewrittenCandidates=true, FunctionDecl *DefaultedFn=nullptr)
 Create a binary operation that may resolve to an overloaded operator.
ExprResult BuildSynthesizedThreeWayComparison (SourceLocation OpLoc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, FunctionDecl *DefaultedFn)
ExprResult CreateOverloadedArraySubscriptExpr (SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg Args)
ExprResult BuildCallToMemberFunction (Scope *S, Expr *MemExpr, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
 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++ []), 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 (ArrayRef< ParmVarDecl * > Parameters, 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.
bool isSelfExpr (Expr *RExpr)
 Private Helper predicate to check for 'self'.
bool isSelfExpr (Expr *RExpr, const ObjCMethodDecl *Method)

Static Public Member Functions

static QualType GetTypeFromParser (ParsedType Ty, TypeSourceInfo **TInfo=nullptr)
static CanThrowResult canCalleeThrow (Sema &S, const Expr *E, const Decl *D, SourceLocation Loc=SourceLocation())
 Determine whether the callee of a particular function call can throw.
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 for diagnostics.
static ScopegetScopeForDeclContext (Scope *S, DeclContext *DC)
 Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope.

Public Attributes

OpenCLOptions OpenCLFeatures
FPOptions CurFPFeatures
const LangOptionsLangOpts
api_notes::APINotesManager APINotes
bool CollectStats
 Flag indicating whether or not to collect detailed statistics.
 Code-completion consumer.
 CurContext - This is the current declaration context of parsing.
 Generally null except when we temporarily switch decl contexts, like in.
DeclarationName VAListTagName
 VAListTagName - The declaration name corresponding to __va_list_tag.
bool MSStructPragmaOn
LangOptions::PragmaMSPointersToMembersKind MSPointerToMemberRepresentationMethod
 Controls member pointer representation format under the MS ABI.
SmallVector< Scope *, 2 > CurrentSEHFinally
 Stack of active SEH __finally scopes. Can be empty.
SourceLocation ImplicitMSInheritanceAttrLoc
 Source location for newly created implicit MSInheritanceAttrs.
llvm::SmallVector< TypoExpr *, 2 > TypoExprs
 Holds TypoExprs that are created from createDelayedTypo.
PragmaClangSection PragmaClangBSSSection
PragmaClangSection PragmaClangDataSection
PragmaClangSection PragmaClangRodataSection
PragmaClangSection PragmaClangRelroSection
PragmaClangSection PragmaClangTextSection
PragmaStack< MSVtorDispModeVtorDispStack
 Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI.
PragmaStack< AlignPackInfoAlignPackStack
SmallVector< AlignPackIncludeState, 8 > AlignPackIncludeStack
PragmaStack< StringLiteral * > DataSegStack
PragmaStack< StringLiteral * > BSSSegStack
PragmaStack< StringLiteral * > ConstSegStack
PragmaStack< StringLiteral * > CodeSegStack
PragmaStack< boolStrictGuardStackCheckStack
PragmaStack< FPOptionsOverrideFpPragmaStack
FileNullabilityMap NullabilityMap
 A mapping that describes the nullability we've seen in each header file.
 Last section used with #pragma init_seg.
SourceLocation CurInitSegLoc
llvm::StringMap< std::tuple< StringRef, SourceLocation > > FunctionToSectionMap
 Sections used with #pragma alloc_text.
void * VisContext
 VisContext - Manages the stack for #pragma GCC visibility.
SmallVector< PragmaAttributeGroup, 2 > PragmaAttributeStack
const DeclPragmaAttributeCurrentTargetDecl
 The declaration that is currently receiving an attribute from the #pragma attribute stack.
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 MSPragmaOptimizeIsOn = true
 The "on" or "off" argument passed by #pragma optimize, that denotes whether the optimizations in the list passed to the pragma should be turned off or on.
llvm::SmallSetVector< StringRef, 4 > MSFunctionNoBuiltins
 Set of no-builtin functions listed by #pragma function.
bool IsBuildingRecoveryCallExpr
 Flag indicating if Sema is building a recovery call expression.
CleanupInfo Cleanup
 Used to control the generation of ExprWithCleanups.
SmallVector< ExprWithCleanups::CleanupObject, 8 > ExprCleanupObjects
 ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current full expression.
MaybeODRUseExprSet MaybeODRUseExprs
std::unique_ptr< sema::FunctionScopeInfoCachedFunctionScope
SmallVector< sema::FunctionScopeInfo *, 4 > FunctionScopes
 Stack containing information about each of the nested function, block, and method scopes that are currently active.
unsigned FunctionScopesStart = 0
 The index of the first FunctionScope that corresponds to the current context.
unsigned CapturingFunctionScopes = 0
 Track the number of currently active capturing scopes.
SmallVector< InventedTemplateParameterInfo, 4 > InventedParameterInfos
 Stack containing information needed when in C++2a an 'auto' is encountered in a function declaration parameter type specifier in order to invent a corresponding template parameter in the enclosing abbreviated function template.
unsigned InventedParameterInfosStart = 0
 The index of the first InventedParameterInfo that refers to the current context.
ExtVectorDeclsType ExtVectorDecls
 ExtVectorDecls - This is a list all the extended vector types.
std::unique_ptr< CXXFieldCollectorFieldCollector
 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 *, DeleteLocsDeleteExprs
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.
SmallVector< VarDecl *, 4 > ExternalDeclarations
 All the external declarations encoutered and used 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 * >, 2 > DelayedOverridingExceptionSpecChecks
 All the overriding functions seen during a class definition that had their exception spec checks delayed, plus the overridden function.
SmallVector< std::pair< FunctionDecl *, FunctionDecl * >, 2 > DelayedEquivalentExceptionSpecChecks
 All the function redeclarations seen during a class definition that had their exception spec checks delayed, plus the prior declaration they should be checked against.
LateParsedTemplateMapT LateParsedTemplateMap
void * OpaqueParser
class clang::Sema::DelayedDiagnostics DelayedDiagnostics
llvm::MapVector< IdentifierInfo *, llvm::SetVector< WeakInfo, llvm::SmallVector< WeakInfo, 1u >, llvm::SmallDenseSet< WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly > > > WeakUndeclaredIdentifiers
 WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared.
llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > ExtnameUndeclaredIdentifiers
 ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared.
SmallVector< Decl *, 2 > WeakTopLevelDecl
 WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing of other Decls.
IdentifierResolver IdResolver
 Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in the "ordinary" C decl namespace.
LazyDeclPtr StdNamespace
 The C++ "std" namespace, where the standard library resides.
LazyDeclPtr StdBadAlloc
 The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
LazyDeclPtr StdAlignValT
 The C++ "std::align_val_t" enum class, which is defined by the C++ standard library.
 The C++ "std::initializer_list" template, which is defined in <initializer_list>.
 The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>
 The C++ "type_info" declaration, which is defined in <typeinfo>.
 The C++ "std::source_location::__impl" struct, defined in <source_location>.
std::unique_ptr< NSAPINSAPIObj
 Caches identifiers/selectors for NSFoundation APIs.
 The declaration of the Objective-C NSNumber class.
 The declaration of the Objective-C NSValue class.
QualType NSNumberPointer
 Pointer to NSNumber type (NSNumber *).
QualType NSValuePointer
 Pointer to NSValue type (NSValue *).
ObjCMethodDeclNSNumberLiteralMethods [NSAPI::NumNSNumberLiteralMethods]
 The Objective-C NSNumber methods used to create NSNumber literals.
 The declaration of the Objective-C NSString class.
QualType NSStringPointer
 Pointer to NSString type (NSString *).
 The declaration of the stringWithUTF8String: method.
 The declaration of the valueWithBytes:objCType: method.
 The declaration of the Objective-C NSArray class.
 The declaration of the arrayWithObjects:count: method.
 The declaration of the Objective-C NSDictionary class.
 The declaration of the dictionaryWithObjects:forKeys:count: method.
QualType QIDNSCopying
 id<NSCopying> type.
Selector RespondsToSelectorSel
 will hold 'respondsToSelector:'
bool GlobalNewDeleteDeclared
 A flag to remember whether the implicit forms of operator new and delete have been declared.
SmallVector< ExpressionEvaluationContextRecord, 8 > ExprEvalContexts
 A stack of expression evaluation contexts.
llvm::SmallPtrSet< ConstantExpr *, 4 > FailedImmediateInvocations
llvm::FoldingSet< SpecialMemberOverloadResultEntrySpecialMemberCache
 A cache of special member function overload resolution results for C++ records.
llvm::DenseMap< const EnumDecl *, llvm::APInt > FlagBitsCache
 A cache of the flags available in enumerations with the flag_bits attribute.
const TranslationUnitKind TUKind
 The kind of translation unit we are processing.
llvm::BumpPtrAllocator BumpAlloc
unsigned NumSFINAEErrors
 The number of SFINAE diagnostics that have been trapped.
UnparsedDefaultArgInstantiationsMap UnparsedDefaultArgInstantiations
 A mapping from parameters with unparsed default arguments to the set of instantiations of each parameter.
llvm::DenseMap< ParmVarDecl *, SourceLocationUnparsedDefaultArgLocs
llvm::MapVector< NamedDecl *, SourceLocationUndefinedButUsed
 UndefinedInternals - all the used, undefined objects which require a definition in this translation unit.
GlobalMethodPool MethodPool
 Method Pool - allows efficient lookup when typechecking messages to "id".
llvm::MapVector< Selector, SourceLocationReferencedSelectors
 Method selectors used in a @selector expression.
llvm::SmallVector< std::pair< SourceLocation, const BlockDecl * >, 1 > ImplicitlyRetainedSelfLocs
 List of SourceLocations where 'self' is implicitly retained inside a block.
llvm::SmallPtrSet< SpecialMemberDecl, 4 > SpecialMembersBeingDeclared
 The C++ special members which we are currently in the process of declaring.
llvm::SmallPtrSet< const NamedDecl *, 4 > TypoCorrectedFunctionDefinitions
 The function definitions which were renamed as part of typo-correction to match their respective declarations.
llvm::SmallVector< QualType, 4 > CurrentParameterCopyTypes
 Stack of types that correspond to the parameter entities that are currently being copy-initialized.
bool WarnedStackExhausted = false
llvm::DenseMap< const VarDecl *, intRefsMinusAssignments
 Increment when we find a reference; decrement when we find an ignored assignment.
bool DeclareRISCVVBuiltins = false
 Indicate RISC-V vector builtin functions enabled or not.
bool DeclareRISCVSiFiveVectorBuiltins = false
 Indicate RISC-V SiFive vector builtin functions enabled or not.
bool IsLastErrorImmediate = true
 Is the last error level diagnostic immediate.
bool DeferDiags = false
 Whether deferrable diagnostics should be deferred.

Static Public Attributes

static const unsigned MaxAlignmentExponent = 32
 The maximum alignment, same as in llvm::Value.
static const uint64_t MaximumAlignment = 1ull << MaxAlignmentExponent

Name lookup

These routines provide name lookup that is used during semantic analysis to resolve the various kinds of names (identifiers, overloaded operator names, constructor names, etc.) into zero or more declarations within a particular scope.

The major entry points are LookupName, which performs unqualified name lookup, and LookupQualifiedName, which performs qualified name lookup.

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

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

enum  LookupNameKind {
  LookupOrdinaryName = 0 , LookupTagName , LookupLabel , LookupMemberName ,
  LookupOperatorName , LookupDestructorName , LookupNestedNameSpecifierName , LookupNamespaceName ,
  LookupUsingDeclName , LookupRedeclarationWithLinkage , LookupLocalFriendName , LookupObjCProtocolName ,
  LookupObjCImplicitSelfParam , LookupOMPReductionName , LookupOMPMapperName , LookupAnyName
 Describes the kind of name lookup to perform. More...
enum  RedeclarationKind { NotForRedeclaration = 0 , ForVisibleRedeclaration , ForExternalRedeclaration }
 Specifies whether (or how) name lookup is being performed for a redeclaration (vs. More...
enum  LiteralOperatorLookupResult {
  LOLR_Error , LOLR_ErrorNoDiagnostic , LOLR_Cooked , LOLR_Raw ,
  LOLR_Template , LOLR_StringTemplatePack
 The possible outcomes of name lookup for a literal operator. More...
enum class  FunctionEmissionStatus {
  Emitted , CUDADiscarded , OMPDiscarded , TemplateDiscarded ,
 Status of the function emission on the CUDA/HIP/OpenMP host/device attrs. More...
enum  CorrectTypoKind { CTK_NonError , CTK_ErrorRecovery }
enum  MethodMatchStrategy { MMS_loose , MMS_strict }
enum  BuildForRangeKind { BFRK_Build , BFRK_Rebuild , BFRK_Check }
enum class  SimplerImplicitMoveMode { ForceOff , Normal , ForceOn }
enum  ReuseLambdaContextDecl_t { ReuseLambdaContextDecl }
enum  TryCaptureKind { TryCapture_Implicit , TryCapture_ExplicitByVal , TryCapture_ExplicitByRef }
enum class  AtomicArgumentOrder { API , AST }
enum  IfExistsResult { IER_Exists , IER_DoesNotExist , IER_Dependent , IER_Error }
 Describes the result of an "if-exists" condition check. More...
enum class  ComparisonCategoryUsage { OperatorInExpression , DefaultedOperator }
enum  AllocationFunctionScope { AFS_Global , AFS_Class , AFS_Both }
 The scope in which to find allocation functions. More...
enum class  AArch64SMECallConversionKind { MatchExactly , MayAddPreservesZA , MayDropPreservesZA }
 The kind of conversion to check for. More...
enum  AccessResult { AR_accessible , AR_inaccessible , AR_dependent , AR_delayed }
enum  AbstractDiagSelID {
  AbstractNone = -1 , AbstractReturnType , AbstractParamType , AbstractVariableType ,
  AbstractFieldType , AbstractIvarType , AbstractSynthesizedIvarType , AbstractArrayType
enum  TemplateNameIsRequiredTag { TemplateNameIsRequired }
enum class  AssumedTemplateKind { None , FoundNothing , FoundFunctions }
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 , TPL_TemplateParamsEquivalent }
 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_ExplicitSpecialization ,
  UPPC_PartialSpecialization , UPPC_IfExists , UPPC_IfNotExists , UPPC_Lambda ,
  UPPC_Block , UPPC_TypeConstraint , UPPC_Requirement , UPPC_RequiresClause
 The context in which an unexpanded parameter pack is being diagnosed. More...
enum  TemplateDeductionResult {
  TDK_Success = 0 , TDK_Invalid , TDK_InstantiationDepth , TDK_Incomplete ,
  TDK_IncompletePack , TDK_Inconsistent , TDK_Underqualified , TDK_SubstitutionFailure ,
  TDK_DeducedMismatch , TDK_DeducedMismatchNested , TDK_NonDeducedMismatch , TDK_TooManyArguments ,
  TDK_TooFewArguments , TDK_InvalidExplicitArguments , TDK_NonDependentConversionFailure , TDK_ConstraintsNotSatisfied ,
  TDK_MiscellaneousDeductionFailure , TDK_CUDATargetMismatch , TDK_AlreadyDiagnosed
 Describes the result of template argument deduction. 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 class  PragmaAlignPackDiagnoseKind { NonDefaultStateAtInclude , ChangedStateAtExit }
enum  PragmaSectionKind { PSK_DataSeg , PSK_BSSSeg , PSK_ConstSeg , PSK_CodeSeg }
enum class  RetainOwnershipKind { NS , CF , OS }
enum  CheckedConversionKind {
  CCK_ImplicitConversion , CCK_CStyleCast , CCK_FunctionalCast , CCK_OtherCast ,
 The kind of conversion being performed. More...
enum  VariadicCallType {
  VariadicFunction , VariadicBlock , VariadicMethod , VariadicConstructor ,
enum  VarArgKind {
  VAK_Valid , VAK_ValidInCXX11 , VAK_Undefined , VAK_MSVCUndefined ,
enum  ArithConvKind {
  ACK_Arithmetic , ACK_BitwiseOp , ACK_Comparison , ACK_Conditional ,
 Context in which we're performing a usual arithmetic conversion. More...
enum  AssignConvertType {
  Compatible , PointerToInt , IntToPointer , FunctionVoidPointer ,
  IncompatiblePointer , IncompatibleFunctionPointer , IncompatibleFunctionPointerStrict , IncompatiblePointerSign ,
  CompatiblePointerDiscardsQualifiers , IncompatiblePointerDiscardsQualifiers , IncompatibleNestedPointerAddressSpaceMismatch , 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 }
 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 , ACR_error }
enum class  ConditionKind { Boolean , ConstexprIf , Switch }
enum  AllowFoldKind { NoFold , AllowFold }
enum  CUDAVariableTarget { CVT_Device , CVT_Host , CVT_Both , CVT_Unified }
enum  CUDATargetContextKind { CTCK_Unknown , CTCK_InitGlobalVar }
 Defines kinds of CUDA global host/device context where a function may be called. More...
enum  CUDAFunctionPreference {
  CFP_Never , CFP_WrongSide , CFP_HostDevice , CFP_SameSide ,
typedef std::function< void(const TypoCorrection &)> TypoDiagnosticGenerator
typedef std::function< ExprResult(Sema &, TypoExpr *, TypoCorrection)> TypoRecoveryCallback
typedef llvm::SmallPtrSet< Selector, 8 > SelectorSet
typedef std::pair< StringRef, QualTypeCapturedParamNameType
typedef llvm::function_ref< void(SourceLocation Loc, PartialDiagnostic PD)> DiagReceiverTy
typedef ProcessingContextState ParsingClassState
typedef std::pair< CXXRecordDecl *, SourceLocationVTableUse
 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 *, SrcLocSetIdentifierSourceLocations
typedef std::pair< ValueDecl *, SourceLocationPendingImplicitInstantiation
 An entity for which implicit template instantiation is required.
typedef SmallVector< LateInstantiatedAttribute, 16 > LateInstantiatedAttrVec
using VarsWithInheritedDSAType = llvm::SmallDenseMap< const ValueDecl *, const Expr *, 4 >
using ReferenceConversions = ReferenceConversionsScope::ReferenceConversions
QualType CXXThisTypeOverride
 When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-static member function.
SmallVector< VTableUse, 16 > VTableUses
 The list of vtables that are required but have not yet been materialized.
llvm::DenseMap< CXXRecordDecl *, boolVTablesUsed
 The set of classes whose vtables have been used within this translation unit, and a bit that will be true if the vtable is required to be emitted (otherwise, it should be emitted only if needed by code generation).
bool AccessCheckingSFINAE
 When true, access checking violations are treated as SFINAE failures rather than hard errors.
llvm::DenseMap< unsigned, CXXDeductionGuideDecl * > AggregateDeductionCandidates
SmallVector< CodeSynthesisContext, 16 > CodeSynthesisContexts
 List of active code synthesis contexts.
llvm::DenseSet< std::pair< Decl *, unsigned > > InstantiatingSpecializations
 Specializations whose definitions are currently being instantiated.
llvm::DenseSet< QualTypeInstantiatedNonDependentTypes
 Non-dependent types used in templates that have already been instantiated by some template instantiation.
SmallVector< Module *, 16 > CodeSynthesisContextLookupModules
 Extra modules inspected when performing a lookup during a template instantiation.
llvm::DenseSet< Module * > LookupModulesCache
 Cache of additional modules that should be used for name lookup within the current template instantiation.
llvm::DenseMap< NamedDecl *, NamedDecl * > VisibleNamespaceCache
 Map from the most recent declaration of a namespace to the most recent visible declaration of that namespace.
bool InNonInstantiationSFINAEContext
 Whether we are in a SFINAE context that is not associated with template instantiation.
unsigned NonInstantiationEntries
 The number of CodeSynthesisContexts that are not template instantiations and, therefore, should not be counted as part of the instantiation depth.
unsigned LastEmittedCodeSynthesisContextDepth = 0
 The depth of the context stack at the point when the most recent error or warning was produced.
std::vector< std::unique_ptr< TemplateInstantiationCallback > > TemplateInstCallbacks
 The template instantiation callbacks to trace or track instantiations (objects can be chained).
int ArgumentPackSubstitutionIndex
 The current index into pack expansion arguments that will be used for substitution of parameter packs.
SuppressedDiagnosticsMap SuppressedDiagnostics
bool RebuildingImmediateInvocation = false
 Whether the AST is currently being rebuilt to correct immediate invocations.
bool isConstantEvaluatedOverride = false
 Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextRecord object.
 The current instantiation scope used to store local variables.
bool DisableTypoCorrection
 Tracks whether we are in a context where typo correction is disabled.
unsigned TyposCorrected
 The number of typos corrected by CorrectTypo.
IdentifierSourceLocations TypoCorrectionFailures
 A cache containing identifiers for which typo correction failed and their locations, so that repeated attempts to correct an identifier in a given location are ignored if typo correction already failed for it.
sema::AnalysisBasedWarnings AnalysisWarnings
 Worker object for performing CFG-based warnings.
std::deque< PendingImplicitInstantiationPendingInstantiations
 The queue of implicit template instantiations that are required but have not yet been performed.
SmallVector< PendingImplicitInstantiation, 1 > LateParsedInstantiations
 Queue of implicit template instantiations that cannot be performed eagerly.
SmallVector< SmallVector< VTableUse, 16 >, 8 > SavedVTableUses
SmallVector< std::deque< PendingImplicitInstantiation >, 8 > SavedPendingInstantiations
std::deque< PendingImplicitInstantiationPendingLocalImplicitInstantiations
 The queue of implicit template instantiations that are required and must be performed within the current local scope.
llvm::DenseMap< CanonicalDeclPtr< const FunctionDecl >, std::vector< PartialDiagnosticAt > > DeviceDeferredDiags
 Diagnostics that are emitted only if we discover that the given function must be codegen'ed.
llvm::DenseSet< FunctionDeclAndLocLocsWithCUDACallDiags
 FunctionDecls and SourceLocations for which CheckCUDACall has emitted a (maybe deferred) "bad call" diagnostic.
llvm::DenseMap< CanonicalDeclPtr< const FunctionDecl >, FunctionDeclAndLocDeviceKnownEmittedFns
 An inverse call graph, mapping known-emitted functions to one of their known-emitted callers (plus the location of the call).
struct clang::Sema::CUDATargetContext CurCUDATargetCtx
class ArgumentPackSubstitutionRAII
RedeclarationKind forRedeclarationInCurContext () const
SpecialMemberOverloadResult LookupSpecialMember (CXXRecordDecl *D, CXXSpecialMember SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis)
const TypoExprState & getTypoExprState (TypoExpr *TE) const
void clearDelayedTypo (TypoExpr *TE)
 Clears the state of the given TypoExpr.
NamedDeclLookupSingleName (Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=NotForRedeclaration)
 Look up a name, looking for a single declaration.
bool LookupBuiltin (LookupResult &R)
 Lookup a builtin function, when name lookup would otherwise fail.
void LookupNecessaryTypesForBuiltin (Scope *S, unsigned ID)
bool LookupName (LookupResult &R, Scope *S, bool AllowBuiltinCreation=false, bool ForceNoCPlusPlus=false)
 Perform unqualified name lookup starting from a given scope.
bool LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
 Perform qualified name lookup into a given context.
bool LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, CXXScopeSpec &SS)
 Performs qualified name lookup or special type of lookup for "__super::" scope specifier.
bool LookupParsedName (LookupResult &R, Scope *S, CXXScopeSpec *SS, bool AllowBuiltinCreation=false, bool EnteringContext=false)
 Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope specifier.
ObjCProtocolDeclLookupProtocol (IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration)
 Find the protocol with the given name, if any.
bool LookupInSuper (LookupResult &R, CXXRecordDecl *Class)
 Perform qualified name lookup into all base classes of the given class.
void LookupOverloadedOperatorName (OverloadedOperatorKind Op, Scope *S, UnresolvedSetImpl &Functions)
LabelDeclLookupOrCreateLabel (IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation())
 LookupOrCreateLabel - Do a name lookup of a label with the specified name.
DeclContextLookupResult LookupConstructors (CXXRecordDecl *Class)
 Look up the constructors for the given class.
CXXConstructorDeclLookupDefaultConstructor (CXXRecordDecl *Class)
 Look up the default constructor for the given class.
CXXConstructorDeclLookupCopyingConstructor (CXXRecordDecl *Class, unsigned Quals)
 Look up the copying constructor for the given class.
CXXMethodDeclLookupCopyingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
 Look up the copying assignment operator for the given class.
CXXConstructorDeclLookupMovingConstructor (CXXRecordDecl *Class, unsigned Quals)
 Look up the moving constructor for the given class.
CXXMethodDeclLookupMovingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
 Look up the moving assignment operator for the given class.
CXXDestructorDeclLookupDestructor (CXXRecordDecl *Class)
 Look for the destructor of the given class.
bool checkLiteralOperatorId (const CXXScopeSpec &SS, const UnqualifiedId &Id, bool IsUDSuffix)
LiteralOperatorLookupResult LookupLiteralOperator (Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate, bool DiagnoseMissing, StringLiteral *StringLit=nullptr)
 LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal, per C++11 [lex.ext].
bool isKnownName (StringRef name)
FunctionEmissionStatus getEmissionStatus (const FunctionDecl *Decl, bool Final=false)
bool shouldIgnoreInHostDeviceCheck (FunctionDecl *Callee)
void ArgumentDependentLookup (DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, ADLResult &Functions)
void LookupVisibleDecls (Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true, bool LoadExternal=true)
void LookupVisibleDecls (DeclContext *Ctx, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true, bool IncludeDependentBases=false, bool LoadExternal=true)
TypoCorrection CorrectTypo (const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr, bool RecordFailure=true)
 Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
TypoExprCorrectTypoDelayed (const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, TypoDiagnosticGenerator TDG, TypoRecoveryCallback TRC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr)
 Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
ExprResult CorrectDelayedTyposInExpr (Expr *E, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
 Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and returning a new Expr if there were typos that were all successfully corrected and ExprError if one or more typos could not be corrected.
ExprResult CorrectDelayedTyposInExpr (ExprResult ER, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
void diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
void diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, const PartialDiagnostic &PrevNote, bool ErrorRecovery=true)
 Diagnose a successfully-corrected typo.
void MarkTypoCorrectedFunctionDefinition (const NamedDecl *F)
void FindAssociatedClassesAndNamespaces (SourceLocation InstantiationLoc, ArrayRef< Expr * > Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses)
 Find the associated classes and namespaces for argument-dependent lookup for a call with the given set of arguments.
void FilterLookupForScope (LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace)
 Filters out lookup results that don't fall within the given scope as determined by isDeclInScope.
bool CheckRedeclarationModuleOwnership (NamedDecl *New, NamedDecl *Old)
 We've determined that New is a redeclaration of Old.
bool CheckRedeclarationExported (NamedDecl *New, NamedDecl *Old)
bool CheckRedeclarationInModule (NamedDecl *New, NamedDecl *Old)
bool IsRedefinitionInModule (const NamedDecl *New, const NamedDecl *Old) const
void DiagnoseAmbiguousLookup (LookupResult &Result)
 Produce a diagnostic describing the ambiguity that resulted from name lookup.
ExprResult CreateRecoveryExpr (SourceLocation Begin, SourceLocation End, ArrayRef< Expr * > SubExprs, QualType T=QualType())
 Attempts to produce a RecoveryExpr after some AST node cannot be created.
ObjCInterfaceDeclgetObjCInterfaceDecl (IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false)
 Look for an Objective-C class in the translation unit.
FunctionDeclCreateBuiltin (IdentifierInfo *II, QualType Type, unsigned ID, SourceLocation Loc)
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 AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction (FunctionDecl *FD)
 If this function is a C++ replaceable global allocation function (C++2a [], C++2a [new.delete]), adds any function attributes that we know a priori based on the standard.
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 ProcessDeclAttributeDelayed (Decl *D, const ParsedAttributesView &AttrList)
void ProcessDeclAttributeList (Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options=ProcessDeclAttributeOptions())
 ProcessDeclAttributeList - Apply all the decl attributes in the specified attribute list to the specified decl, ignoring any type attributes.
bool ProcessAccessDeclAttributeList (AccessSpecDecl *ASDecl, const ParsedAttributesView &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 checkCommonAttributeFeatures (const Decl *D, const ParsedAttr &A, bool SkipArgCountCheck=false)
 Handles semantic checking for features that are common to all attributes, such as checking whether a parameter was properly specified, or the correct number of arguments were passed, etc.
bool checkCommonAttributeFeatures (const Stmt *S, const ParsedAttr &A, bool SkipArgCountCheck=false)
bool isValidPointerAttrType (QualType T, bool RefOkay=false)
 Determine if type T is a valid subject for a nonnull and similar attributes.
bool CheckRegparmAttr (const ParsedAttr &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 ParsedAttr &attr, CallingConv &CC, const FunctionDecl *FD=nullptr, CUDAFunctionTarget CFT=CFT_InvalidTarget)
 Check validaty of calling convention attribute attr.
bool CheckAttrTarget (const ParsedAttr &CurrAttr)
bool CheckAttrNoArgs (const ParsedAttr &CurrAttr)
bool checkStringLiteralArgumentAttr (const AttributeCommonInfo &CI, const Expr *E, StringRef &Str, SourceLocation *ArgLocation=nullptr)
 Check if the argument E is a ASCII string literal.
bool checkStringLiteralArgumentAttr (const ParsedAttr &Attr, unsigned ArgNum, StringRef &Str, SourceLocation *ArgLocation=nullptr)
 Check if the argument ArgNum of Attr is a ASCII string literal.
llvm::Error isValidSectionSpecifier (StringRef Str)
 Used to implement to perform semantic checking on attribute((section("foo"))) specifiers.
bool checkSectionName (SourceLocation LiteralLoc, StringRef Str)
bool checkTargetAttr (SourceLocation LiteralLoc, StringRef Str)
bool checkTargetVersionAttr (SourceLocation LiteralLoc, StringRef &Str, bool &isDefault)
bool checkTargetClonesAttrString (SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl< SmallString< 64 > > &StringsBuffer)
bool checkMSInheritanceAttrOnDefinition (CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel SemanticSpelling)
void CheckAlignasUnderalignment (Decl *D)
bool CheckNoInlineAttr (const Stmt *OrigSt, const Stmt *CurSt, const AttributeCommonInfo &A)
bool CheckAlwaysInlineAttr (const Stmt *OrigSt, const Stmt *CurSt, const AttributeCommonInfo &A)
bool CheckCountedByAttr (Scope *Scope, const FieldDecl *FD)
void adjustMemberFunctionCC (QualType &T, bool HasThisPointer, bool IsCtorOrDtor, SourceLocation Loc)
 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.
void ProcessStmtAttributes (Stmt *Stmt, const ParsedAttributes &InAttrs, SmallVectorImpl< const Attr * > &OutAttrs)
 Process the attributes before creating an attributed statement.
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, SourceLocation AtEnd)
 DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesized in the class's @implementation.
void DefaultSynthesizeProperties (Scope *S, Decl *D, SourceLocation AtEnd)
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, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, 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, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, 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, ObjCInterfaceDecl *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.
LangAS getDefaultCXXMethodAddrSpace () const
 Returns default addr space for method qualifiers.
bool CollectMultipleMethodsInGlobalPool (Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool InstanceFirst, bool CheckTheOther, const ObjCObjectType *TypeBound=nullptr)
 We first select the type of the method: Instance or Factory, then collect all methods with that type.
bool AreMultipleMethodsInGlobalPool (Selector Sel, ObjCMethodDecl *BestMethod, SourceRange R, bool receiverIdOrClass, SmallVectorImpl< ObjCMethodDecl * > &Methods)
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, bool DiscardedValue=true)
StmtResult ActOnExprStmtError ()
StmtResult ActOnNullStmt (SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false)
void ActOnStartOfCompoundStmt (bool IsStmtExpr)
void ActOnAfterCompoundStatementLeadingPragmas ()
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.
ExprResult ActOnCaseExpr (SourceLocation CaseLoc, ExprResult Val)
StmtResult ActOnCaseStmt (SourceLocation CaseLoc, ExprResult LHS, SourceLocation DotDotDotLoc, ExprResult RHS, 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 BuildAttributedStmt (SourceLocation AttrsLoc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt)
StmtResult ActOnAttributedStmt (const ParsedAttributes &AttrList, Stmt *SubStmt)
StmtResult ActOnIfStmt (SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
StmtResult BuildIfStmt (SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
StmtResult ActOnStartOfSwitchStmt (SourceLocation SwitchLoc, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc)
StmtResult ActOnFinishSwitchStmt (SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
StmtResult ActOnWhileStmt (SourceLocation WhileLoc, SourceLocation LParenLoc, ConditionResult Cond, SourceLocation RParenLoc, Stmt *Body)
StmtResult ActOnDoStmt (SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen)
StmtResult ActOnForStmt (SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, ConditionResult Second, 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 (Scope *S, SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, 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 CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, 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, unsigned OpenMPCaptureLevel=0)
StmtResult ActOnCapturedRegionEnd (Stmt *S)
void ActOnCapturedRegionError ()
RecordDeclCreateCapturedStmtRecordDecl (CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams)
NamedReturnInfo getNamedReturnInfo (Expr *&E, SimplerImplicitMoveMode Mode=SimplerImplicitMoveMode::Normal)
 Determine whether the given expression might be move-eligible or copy-elidable in either a (co_)return statement or throw expression, without considering function return type, if applicable.
NamedReturnInfo getNamedReturnInfo (const VarDecl *VD)
 Determine whether the given NRVO candidate variable is move-eligible or copy-elidable, without considering function return type.
const VarDeclgetCopyElisionCandidate (NamedReturnInfo &Info, QualType ReturnType)
 Updates given NamedReturnInfo's move-eligible and copy-elidable statuses, considering the function return type criteria as applicable to return statements.
ExprResult PerformMoveOrCopyInitialization (const InitializedEntity &Entity, const NamedReturnInfo &NRInfo, Expr *Value, bool SupressSimplerImplicitMoves=false)
 Perform the initialization of a potentially-movable value, which is the result of return value.
StmtResult ActOnReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope)
StmtResult BuildReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery=false)
StmtResult ActOnCapScopeReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, NamedReturnInfo &NRInfo, bool SupressSimplerImplicitMoves)
 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, unsigned NumLabels, SourceLocation RParenLoc)
void FillInlineAsmIdentifierInfo (Expr *Res, llvm::InlineAsmIdentifierInfo &Info)
ExprResult LookupInlineAsmIdentifier (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool IsUnevaluatedContext)
bool LookupInlineAsmField (StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc)
ExprResult LookupInlineAsmVarDeclField (Expr *RefExpr, StringRef Member, 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, unsigned DiagID)
 DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused, warn.
void DiagnoseUnusedNestedTypedefs (const RecordDecl *D)
void DiagnoseUnusedNestedTypedefs (const RecordDecl *D, DiagReceiverTy DiagReceiver)
void DiagnoseUnusedDecl (const NamedDecl *ND)
void DiagnoseUnusedDecl (const NamedDecl *ND, DiagReceiverTy DiagReceiver)
 DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused).
void DiagnoseUnusedButSetDecl (const VarDecl *VD, DiagReceiverTy DiagReceiver)
 If VD is set but not otherwise used, diagnose, for a parameter or a variable.
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.
const FieldDeclgetSelfAssignmentClassMemberCandidate (const ValueDecl *SelfAssigned)
 Returns a field in a CXXRecordDecl that has the same name as the decl SelfAssigned when inside a CXXMethodDecl.
void diagnoseNullableToNonnullConversion (QualType DstType, QualType SrcType, SourceLocation Loc)
 Warn if we're implicitly casting from a _Nullable pointer type to a _Nonnull one.
void diagnoseZeroToNullptrConversion (CastKind Kind, const Expr *E)
 Warn when implicitly casting 0 to nullptr.
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 DiagnoseAvailabilityOfDecl (NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReceiver=nullptr)
bool makeUnavailableInSystemHeader (SourceLocation loc, UnavailableAttr::ImplicitReason reason)
 makeUnavailableInSystemHeader - There is an error in the current context.
void DiagnoseUnguardedAvailabilityViolations (Decl *FD)
 Issue any -Wunguarded-availability warnings in FD.
void handleDelayedAvailabilityCheck (sema::DelayedDiagnostic &DD, Decl *Ctx)
bool CanUseDecl (NamedDecl *D, bool TreatUnavailableAsInvalid)
 Determine whether the use of this declaration is valid, without emitting diagnostics.
bool DiagnoseUseOfOverloadedDecl (NamedDecl *D, SourceLocation Loc)
bool DiagnoseUseOfDecl (NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReciever=nullptr, bool SkipTrailingRequiresClause=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.
void NoteDeletedInheritingConstructor (CXXConstructorDecl *CD)
bool DiagnosePropertyAccessorMismatch (ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc)
void DiagnoseSentinelCalls (const 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, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other)
void PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other)
void PopExpressionEvaluationContext ()
void DiscardCleanupsInEvaluationContext ()
ExprResult TransformToPotentiallyEvaluated (Expr *E)
TypeSourceInfoTransformToPotentiallyEvaluated (TypeSourceInfo *TInfo)
ExprResult HandleExprEvaluationContextForTypeof (Expr *E)
ExprResult CheckUnevaluatedOperand (Expr *E)
void CheckUnusedVolatileAssignment (Expr *E)
 Check whether E, which is either a discarded-value expression or an unevaluated operand, is a simple-assignment to a volatlie-qualified lvalue, and if so, remove it from the list of volatile-qualified assignments that we are going to warn are deprecated.
ExprResult ActOnConstantExpression (ExprResult Res)
void MarkAnyDeclReferenced (SourceLocation Loc, Decl *D, bool MightBeOdrUse)
 Perform marking for a reference to an arbitrary declaration.
void MarkFunctionReferenced (SourceLocation Loc, FunctionDecl *Func, bool MightBeOdrUse=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, const Expr *Base=nullptr)
 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 MarkFunctionParmPackReferenced (FunctionParmPackExpr *E)
 Perform reference-marking and odr-use handling for a FunctionParmPackExpr.
void MarkCaptureUsedInEnclosingContext (ValueDecl *Capture, SourceLocation Loc, unsigned CapturingScopeIndex)
ExprResult CheckLValueToRValueConversionOperand (Expr *E)
void CleanupVarDeclMarking ()
bool tryCaptureVariable (ValueDecl *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 (ValueDecl *Var, SourceLocation Loc, TryCaptureKind Kind=TryCapture_Implicit, SourceLocation EllipsisLoc=SourceLocation())
 Try to capture the given variable.
bool NeedToCaptureVariable (ValueDecl *Var, SourceLocation Loc)
 Checks if the variable must be captured.
QualType getCapturedDeclRefType (ValueDecl *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)
 Mark all of the declarations referenced within a particular AST node as referenced.
void MarkDeclarationsReferencedInExpr (Expr *E, bool SkipLocalVariables=false, ArrayRef< const Expr * > StopAt=std::nullopt)
 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.
ExprResult tryConvertExprToType (Expr *E, QualType Ty)
 Try to convert an expression E to type Ty.
bool DiagIfReachable (SourceLocation Loc, ArrayRef< const Stmt * > Stmts, const PartialDiagnostic &PD)
 Conditionally issue a diagnostic based on the statements's reachability analysis.
bool DiagRuntimeBehavior (SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
 Conditionally issue a diagnostic based on the current evaluation context.
bool DiagRuntimeBehavior (SourceLocation Loc, ArrayRef< const Stmt * > Stmts, const PartialDiagnostic &PD)
 Similar, but diagnostic is only produced if all the specified statements are reachable.
SourceRange getExprRange (Expr *E) const
ExprResult ActOnIdExpression (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, CorrectionCandidateCallback *CCC=nullptr, bool IsInlineAsmIdentifier=false, 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 DiagnoseDependentMemberLookup (const LookupResult &R)
 Diagnose a lookup that found results in an enclosing class during error recovery.
bool DiagnoseEmptyLookup (Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=std::nullopt, DeclContext *LookupCtx=nullptr, TypoExpr **Out=nullptr)
 Diagnose an empty lookup.
DeclResult LookupIvarInObjCMethod (LookupResult &Lookup, Scope *S, IdentifierInfo *II)
 The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
ExprResult BuildIvarRefExpr (Scope *S, SourceLocation Loc, ObjCIvarDecl *IV)
ExprResult LookupInObjCMethod (LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false)
 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.
NonOdrUseReason getNonOdrUseReasonInCurrentContext (ValueDecl *D)
 If D cannot be odr-used in the current expression evaluation context, return a reason explaining why.
DeclRefExprBuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr)
DeclRefExprBuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, const CXXScopeSpec *SS=nullptr, NamedDecl *FoundD=nullptr, SourceLocation TemplateKWLoc=SourceLocation(), const TemplateArgumentListInfo *TemplateArgs=nullptr)
DeclRefExprBuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, NestedNameSpecifierLoc NNS, NamedDecl *FoundD=nullptr, SourceLocation TemplateKWLoc=SourceLocation(), 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, const Scope *S, UnresolvedLookupExpr *AsULE=nullptr)
 Builds an expression which might be an implicit member expression.
ExprResult BuildImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance, const Scope *S)
 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, const Scope *S, 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.
std::vector< TokenExpandFunctionLocalPredefinedMacros (ArrayRef< Token > Toks)
ExprResult BuildPredefinedExpr (SourceLocation Loc, PredefinedIdentKind IK)
ExprResult ActOnPredefinedExpr (SourceLocation Loc, tok::TokenKind Kind)
ExprResult ActOnIntegerConstant (SourceLocation Loc, uint64_t Val)
ExprResult BuildSYCLUniqueStableNameExpr (SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, TypeSourceInfo *TSI)
ExprResult ActOnSYCLUniqueStableNameExpr (SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, ParsedType ParsedTy)
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 ActOnUnevaluatedStringLiteral (ArrayRef< Token > StringToks)
ExprResult ActOnGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr * > ArgExprs)
 ControllingExprOrType is either an opaque pointer coming out of a ParsedType or an Expr *.
ExprResult CreateGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef< TypeSourceInfo * > Types, ArrayRef< Expr * > Exprs)
 ControllingExprOrType is either a TypeSourceInfo * or an Expr *.
ExprResult CreateBuiltinUnaryOp (SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp=false)
ExprResult BuildUnaryOp (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input, bool IsAfterAmp=false)
ExprResult ActOnUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input, bool IsAfterAmp=false)
bool isQualifiedMemberAccess (Expr *E)
 Determine whether the given expression is a qualified member access expression, of a form that could be turned into a pointer to member with the address-of operator.
bool CheckUseOfCXXMethodAsAddressOfOperand (SourceLocation OpLoc, const Expr *Op, const CXXMethodDecl *MD)
QualType CheckAddressOfOperand (ExprResult &Operand, SourceLocation OpLoc)
 CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designating an object.
bool CheckTypeTraitArity (unsigned Arity, SourceLocation Loc, size_t N)
bool ActOnAlignasTypeArgument (StringRef KWName, ParsedType Ty, SourceLocation OpLoc, SourceRange R)
 ActOnAlignasTypeArgument - Handle alignas(type-id) and _Alignas(type-name) .
bool CheckAlignasTypeArgument (StringRef KWName, TypeSourceInfo *TInfo, SourceLocation OpLoc, SourceRange R)
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, 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, StringRef KWName)
 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, MultiExprArg ArgExprs, SourceLocation RLoc)
ExprResult CreateBuiltinArraySubscriptExpr (Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
ExprResult CreateBuiltinMatrixSubscriptExpr (Expr *Base, Expr *RowIdx, Expr *ColumnIdx, SourceLocation RBLoc)
ExprResult ActOnOMPArraySectionExpr (Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc)
ExprResult ActOnOMPArrayShapingExpr (Expr *Base, SourceLocation LParenLoc, SourceLocation RParenLoc, ArrayRef< Expr * > Dims, ArrayRef< SourceRange > Brackets)
ExprResult ActOnOMPIteratorExpr (Scope *S, SourceLocation IteratorKwLoc, SourceLocation LLoc, SourceLocation RLoc, ArrayRef< OMPIteratorData > Data)
ExprResult BuildMemberReferenceExpr (Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, 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, const Scope *S, bool SuppressQualifierCheck=false, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
ExprResult BuildFieldReferenceExpr (Expr *BaseExpr, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, FieldDecl *Field, DeclAccessPair FoundDecl, const DeclarationNameInfo &MemberNameInfo)
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 .
MemberExprBuildMemberExpr (Expr *Base, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec *SS, SourceLocation TemplateKWLoc, ValueDecl *Member, DeclAccessPair FoundDecl, bool HadMultipleCandidates, const DeclarationNameInfo &MemberNameInfo, QualType Ty, ExprValueKind VK, ExprObjectKind OK, const TemplateArgumentListInfo *TemplateArgs=nullptr)
MemberExprBuildMemberExpr (Expr *Base, bool IsArrow, SourceLocation OpLoc, NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, ValueDecl *Member, DeclAccessPair FoundDecl, bool HadMultipleCandidates, const DeclarationNameInfo &MemberNameInfo, QualType Ty, ExprValueKind VK, ExprObjectKind OK, const TemplateArgumentListInfo *TemplateArgs=nullptr)
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)
 ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
ExprResult BuildCallExpr (Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
 BuildCallExpr - Handle a call to Fn with the specified array of arguments.
ExprBuildBuiltinCallExpr (SourceLocation Loc, Builtin::ID Id, MultiExprArg CallArgs)
 BuildBuiltinCallExpr - Create a call to a builtin function specified by Id.
ExprResult BuildAtomicExpr (SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder=AtomicArgumentOrder::API)
ExprResult BuildResolvedCallExpr (Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, bool IsExecConfig=false, ADLCallKind UsesADL=ADLCallKind::NotADL)
 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 BuildInitList (SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
ExprResult ActOnDesignatedInitializer (Designation &Desig, SourceLocation EqualOrColonLoc, 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.
void LookupBinOp (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, UnresolvedSetImpl &Functions)
void DiagnoseCommaOperator (const Expr *LHS, SourceLocation Loc)
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 (Scope *S, SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
ExprResult BuildStmtExpr (SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc, unsigned TemplateDepth)
ExprResult ActOnStmtExprResult (ExprResult E)
void ActOnStmtExprError ()
ExprResult BuildBuiltinOffsetOf (SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc)
 __builtin_offsetof(type, a.b[123][456].c)
ExprResult ActOnBuiltinOffsetOf (Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, ArrayRef< OffsetOfComponent > Components, 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 ActOnSourceLocExpr (SourceLocIdentKind Kind, SourceLocation BuiltinLoc, SourceLocation RPLoc)
ExprResult BuildSourceLocExpr (SourceLocIdentKind Kind, QualType ResultTy, SourceLocation BuiltinLoc, SourceLocation RPLoc, DeclContext *ParentContext)
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)
ExprResult ActOnAsTypeExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
ExprResult BuildAsTypeExpr (Expr *E, QualType DestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 Create a new AsTypeExpr node (bitcast) from the arguments.
DeclActOnStartHLSLBuffer (Scope *BufferScope, bool CBuffer, SourceLocation KwLoc, IdentifierInfo *Ident, SourceLocation IdentLoc, SourceLocation LBrace)
void ActOnFinishHLSLBuffer (Decl *Dcl, SourceLocation RBrace)
DeclActOnStartNamespaceDef (Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, const ParsedAttributesView &AttrList, UsingDirectiveDecl *&UsingDecl, bool IsNested)
 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
EnumDeclgetStdAlignValT () const
ValueDecltryLookupUnambiguousFieldDecl (RecordDecl *ClassDecl, const IdentifierInfo *MemberOrBase)
QualType CheckComparisonCategoryType (ComparisonCategoryType Kind, SourceLocation Loc, ComparisonCategoryUsage Usage)
 Lookup the specified comparison category types in the standard library, an check the VarDecls possibly returned by the operator<=> builtins for that type.
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 FunctionDecl *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, const ParsedAttributesView &AttrList)
void PushUsingDirective (Scope *S, UsingDirectiveDecl *UDir)
DeclActOnNamespaceAliasDef (Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident)
void FilterUsingLookup (Scope *S, LookupResult &lookup)
 Remove decls we can't actually see from a lookup being used to declare shadow using decls.
void HideUsingShadowDecl (Scope *S, UsingShadowDecl *Shadow)
 Hides a using shadow declaration.
bool CheckUsingShadowDecl (BaseUsingDecl *BUD, 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, BaseUsingDecl *BUD, 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, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R=nullptr, const UsingDecl *UD=nullptr)
 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, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists)
 Builds a using declaration.
NamedDeclBuildUsingEnumDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation NameLoc, TypeSourceInfo *EnumType, EnumDecl *ED)
NamedDeclBuildUsingPackDecl (NamedDecl *InstantiatedFrom, ArrayRef< NamedDecl * > Expansions)
bool CheckInheritingConstructorUsingDecl (UsingDecl *UD)
 Additional checks for a using declaration referring to a constructor name.
CXXConstructorDeclfindInheritingConstructor (SourceLocation Loc, CXXConstructorDecl *BaseCtor, ConstructorUsingShadowDecl *DerivedShadow)
 Given a derived-class using shadow declaration for a constructor and the correspnding base class constructor, find or create the implicit synthesized derived class constructor to use for this initialization.
DeclActOnUsingDeclaration (Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList)
DeclActOnUsingEnumDeclaration (Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation IdentLoc, IdentifierInfo &II, CXXScopeSpec *SS=nullptr)
DeclActOnAliasDeclaration (Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec)
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, CXXConstructionKind 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, CXXConstructionKind ConstructKind, SourceRange ParenRange)
 Build a CXXConstructExpr whose constructor has already been resolved if it denotes an inherited constructor.
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, CXXConstructionKind ConstructKind, SourceRange ParenRange)
ExprResult ConvertMemberDefaultInitExpression (FieldDecl *FD, Expr *InitExpr, SourceLocation InitLoc)
ExprResult BuildCXXDefaultInitExpr (SourceLocation Loc, FieldDecl *Field)
bool CheckCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *Init=nullptr, bool SkipImmediateInvocations=true)
 Instantiate or parse a C++ default argument expression as necessary.
ExprResult BuildCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *Init=nullptr)
 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.
void EvaluateImplicitExceptionSpec (SourceLocation Loc, FunctionDecl *FD)
 Evaluate the implicit exception specification for a defaulted special member function.
ExprResult ActOnNoexceptSpec (Expr *NoexceptExpr, ExceptionSpecificationType &EST)
 Check the given noexcept-specifier, convert its expression, and compute the appropriate ExceptionSpecificationType.
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