clang 10.0.0git

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

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

`#include "clang/Sema/Sema.h"`

Collaboration diagram for clang::Sema:
[legend]

## Classes
struct | ActOnMemberAccessExtraArgs
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
class | ContextRAII
| A RAII object to temporarily push a declaration context. More...
class | ContextualImplicitConverter
| Abstract base class used to perform a contextual implicit conversion from an expression to any type passing a filter. More...
class | CXXThisScopeRAII
| RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers on the current class type. More...
class | DefaultedFunctionKind
| For a defaulted function, the kind of defaulted function that it is. More...
class | DelayedDiagnostics
| A class which encapsulates the logic for delaying diagnostics during parsing and other processing. More...
class | DelayedDiagnosticsState
class | DeviceDiagBuilder
| Diagnostic builder for CUDA/OpenMP devices errors which may or may not be deferred. More...
struct | ExpressionEvaluationContextRecord
| Data structure used to record current or nested expression evaluation contexts. More...
class | ExtParameterInfoBuilder
| A helper class for building up ExtParameterInfos. More...
class | FPContractStateRAII
| Records and restores the FP_CONTRACT state on entry/exit of compound statements. More...
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 | ICEConvertDiagnoser
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...
struct | LateInstantiatedAttribute
class | LocalEagerInstantiationScope
class | NameClassification
struct | NestedNameSpecInfo
| Keeps information about an identifier in a nested-name-spec. More...
struct | ObjCArgInfo
struct | OffsetOfComponent
struct | OriginalCallArg
| brief A function argument from which we performed template argument More...
struct | PackIncludeState
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 | PragmaStack
class | PragmaStackSentinelRAII
struct | ReferenceConversionsScope
class | SemaDiagnosticBuilder
| Helper class that creates diagnostics with optional template instantiation stacks. More...
class | SFINAETrap
| RAII class used to determine whether SFINAE has trapped any errors that occur during template argument deduction. More...
struct | SkipBodyInfo
class | SpecialMemberOverloadResult
| SpecialMemberOverloadResult - The overloading result for a special member function. More...
class | SpecialMemberOverloadResultEntry
class | SynthesizedFunctionScope
| RAII object to handle the state changes required to synthesize a function body. More...
class | TentativeAnalysisScope
| RAII class used to indicate that we are performing provisional semantic analysis to determine the validity of a construct, so typo-correction and diagnostics in the immediate context (not within implicitly-instantiated templates) should be suppressed. More...
struct | TypeDiagnoser
| Abstract class used to diagnose incomplete types. More...
struct | TypeTagData
class | VerifyICEDiagnoser
| Abstract base class used for diagnosing integer constant expression violations. More...

## Public Types
enum | 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 | ExpressionEvaluationContext { ExpressionEvaluationContext::Unevaluated, ExpressionEvaluationContext::UnevaluatedList, ExpressionEvaluationContext::DiscardedStatement, ExpressionEvaluationContext::UnevaluatedAbstract, ExpressionEvaluationContext::ConstantEvaluated, ExpressionEvaluationContext::PotentiallyEvaluated, ExpressionEvaluationContext::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 | DefaultedComparisonKind : unsigned char { DefaultedComparisonKind::None, DefaultedComparisonKind::Equal, DefaultedComparisonKind::ThreeWay, DefaultedComparisonKind::NotEqual, DefaultedComparisonKind::Relational }
| Kinds of defaulted comparison operator functions. More...
enum | TUFragmentKind { Global, Normal, Private }
enum | NameClassificationKind { NC_Unknown, NC_Error, NC_Keyword, NC_Type, NC_NonType, NC_UndeclaredNonType, NC_DependentNonType, NC_ContextIndependentExpr, NC_TypeTemplate, NC_VarTemplate, NC_FunctionTemplate, NC_UndeclaredTemplate, NC_Concept }
| Describes the result of the name lookup and resolution performed by `ClassifyName()`. More...
enum | TemplateNameKindForDiagnostics { TemplateNameKindForDiagnostics::ClassTemplate, TemplateNameKindForDiagnostics::FunctionTemplate, TemplateNameKindForDiagnostics::VarTemplate, TemplateNameKindForDiagnostics::AliasTemplate, TemplateNameKindForDiagnostics::TemplateTemplateParam, TemplateNameKindForDiagnostics::Concept, TemplateNameKindForDiagnostics::DependentTemplate }
| Describes the detailed kind of a template name. Used in diagnostics. More...
enum | CheckConstexprKind { CheckConstexprKind::Diagnose, CheckConstexprKind::CheckValid }
enum | NonTrivialCUnionContext { NTCUC_FunctionParam, NTCUC_FunctionReturn, NTCUC_DefaultInitializedObject, NTCUC_AutoVar, NTCUC_CopyInit, NTCUC_Assignment, NTCUC_CompoundLiteral, NTCUC_BlockCapture, NTCUC_LValueToRValueVolatile }
enum | NonTrivialCUnionKind { NTCUK_Init = 0x1, NTCUK_Destruct = 0x2, NTCUK_Copy = 0x4 }
enum | ModuleDeclKind { ModuleDeclKind::Interface, ModuleDeclKind::Implementation }
enum | MissingImportKind { MissingImportKind::Declaration, MissingImportKind::Definition, MissingImportKind::DefaultArgument, MissingImportKind::ExplicitSpecialization, MissingImportKind::PartialSpecialization }
| Kinds of missing import. More...
enum | NonTagKind { NTK_NonStruct, NTK_NonClass, NTK_NonUnion, NTK_NonEnum, NTK_Typedef, NTK_TypeAlias, NTK_Template, NTK_TypeAliasTemplate, NTK_TemplateTemplateArgument }
| 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 | 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 | CCEKind { CCEK_CaseValue, CCEK_Enumerator, CCEK_TemplateArg, CCEK_NewExpr, CCEK_ConstexprIf, CCEK_ExplicitBool }
| Contexts in which a converted constant expression is required. More...
enum | ObjCSubscriptKind { OS_Array, OS_Dictionary, OS_Error }
enum | ObjCLiteralKind { LK_Array, LK_Dictionary, LK_Numeric, LK_Boxed, LK_String, LK_Block, LK_None }
enum | ForRangeStatus { FRS_Success, FRS_NoViableFunction, FRS_DiagnosticIssued }
enum | MethodMatchStrategy { MMS_loose, MMS_strict }
enum | BuildForRangeKind { BFRK_Build, BFRK_Rebuild, BFRK_Check }
enum | CopyElisionSemanticsKind { CES_Strict = 0, CES_AllowParameters = 1, CES_AllowDifferentTypes = 2, CES_AllowExceptionVariables = 4, CES_FormerDefault = (CES_AllowParameters), CES_Default = (CES_AllowParameters | CES_AllowDifferentTypes), CES_AsIfByStdMove }
enum | ReuseLambdaContextDecl_t { ReuseLambdaContextDecl }
enum | TryCaptureKind { TryCapture_Implicit, TryCapture_ExplicitByVal, TryCapture_ExplicitByRef }
enum | AtomicArgumentOrder { AtomicArgumentOrder::API, AtomicArgumentOrder::AST }
enum | IfExistsResult { IER_Exists, IER_DoesNotExist, IER_Dependent, IER_Error }
| Describes the result of an "if-exists" condition check. More...
enum | ComparisonCategoryUsage { ComparisonCategoryUsage::OperatorInExpression, ComparisonCategoryUsage::DefaultedOperator }
enum | AllocationFunctionScope { AFS_Global, AFS_Class, AFS_Both }
| The scope in which to find allocation functions. More...
enum | AccessResult { AR_accessible, AR_inaccessible, AR_dependent, AR_delayed }
enum | AbstractDiagSelID { AbstractNone = -1, AbstractReturnType, AbstractParamType, AbstractVariableType, AbstractFieldType, AbstractIvarType, AbstractSynthesizedIvarType, AbstractArrayType }
enum | AssumedTemplateKind { AssumedTemplateKind::None, AssumedTemplateKind::FoundNothing, AssumedTemplateKind::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 }
| Enumeration describing how template parameter lists are compared for equality. More...
enum | UnexpandedParameterPackContext { UPPC_Expression = 0, UPPC_BaseType, UPPC_DeclarationType, UPPC_DataMemberType, UPPC_BitFieldWidth, UPPC_StaticAssertExpression, UPPC_FixedUnderlyingType, UPPC_EnumeratorValue, UPPC_UsingDeclaration, UPPC_FriendDeclaration, UPPC_DeclarationQualifier, UPPC_Initializer, UPPC_DefaultArgument, UPPC_NonTypeTemplateParameterType, UPPC_ExceptionType, UPPC_PartialSpecialization, UPPC_IfExists, UPPC_IfNotExists, UPPC_Lambda, UPPC_Block, UPPC_TypeConstraint }
| 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 }
| Describes the result of template argument deduction. More...
enum | DeduceAutoResult { DAR_Succeeded, DAR_Failed, DAR_FailedAlreadyDiagnosed }
| Result type of DeduceAutoType. More...
enum | ObjCContainerKind { OCK_None = -1, OCK_Interface = 0, OCK_Protocol, OCK_Category, OCK_ClassExtension, OCK_Implementation, OCK_CategoryImplementation }
enum | ObjCSpecialMethodKind { OSMK_None, OSMK_Alloc, OSMK_New, OSMK_Copy, OSMK_RetainingInit, OSMK_NonRetainingInit }
enum | ObjCMessageKind { ObjCSuperMessage, ObjCInstanceMessage, ObjCClassMessage }
| Describes the kind of message expression indicated by a message send that starts with an identifier. More...
enum | ResultTypeCompatibilityKind { RTC_Compatible, RTC_Incompatible, RTC_Unknown }
| Describes the compatibility of a result type with its method. More...
enum | PragmaOptionsAlignKind { POAK_Native, POAK_Natural, POAK_Packed, POAK_Power, POAK_Mac68k, POAK_Reset }
enum | PragmaPackDiagnoseKind { PragmaPackDiagnoseKind::NonDefaultStateAtInclude, PragmaPackDiagnoseKind::ChangedStateAtExit }
enum | PragmaSectionKind { PSK_DataSeg, PSK_BSSSeg, PSK_ConstSeg, PSK_CodeSeg }
enum | RetainOwnershipKind { RetainOwnershipKind::NS, RetainOwnershipKind::CF, RetainOwnershipKind::OS }
enum | CheckedConversionKind { CCK_ImplicitConversion, CCK_CStyleCast, CCK_FunctionalCast, CCK_OtherCast, CCK_ForBuiltinOverloadedOp }
| The kind of conversion being performed. More...
enum | VariadicCallType { VariadicFunction, VariadicBlock, VariadicMethod, VariadicConstructor, VariadicDoesNotApply }
enum | VarArgKind { VAK_Valid, VAK_ValidInCXX11, VAK_Undefined, VAK_MSVCUndefined, VAK_Invalid }
enum | ArithConvKind { ACK_Arithmetic, ACK_BitwiseOp, ACK_Comparison, ACK_Conditional, ACK_CompAssign }
| Context in which we're performing a usual arithmetic conversion. More...
enum | AssignConvertType { Compatible, PointerToInt, IntToPointer, FunctionVoidPointer, IncompatiblePointer, 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 | ConditionKind { ConditionKind::Boolean, ConditionKind::ConstexprIf, ConditionKind::Switch }
enum | CUDAFunctionTarget { CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, CFT_InvalidTarget }
enum | CUDAFunctionPreference { CFP_Never, CFP_WrongSide, CFP_HostDevice, CFP_SameSide, CFP_Native }
enum | FormatStringType { FST_Scanf, FST_Printf, FST_NSString, FST_Strftime, FST_Strfmon, FST_Kprintf, FST_FreeBSDKPrintf, FST_OSTrace, FST_OSLog, FST_Unknown }
enum | CallingConventionIgnoredReason { CallingConventionIgnoredReason::ForThisTarget = 0, CallingConventionIgnoredReason::VariadicFunction, CallingConventionIgnoredReason::ConstructorDestructor, CallingConventionIgnoredReason::BuiltinFunction }
| Describes the reason a calling convention specification was ignored, used for diagnostics. More...
typedef OpaquePtr< DeclGroupRef > | DeclGroupPtrTy
typedef OpaquePtr< TemplateName > | TemplateTy
typedef OpaquePtr< QualType > | TypeTy
using | MaybeODRUseExprSet = llvm::SmallPtrSet< Expr *, 2 >
| 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. More...
typedef LazyVector< TypedefNameDecl *, ExternalSemaSource, &ExternalSemaSource::ReadExtVectorDecls, 2, 2 > | ExtVectorDeclsType
typedef llvm::SmallSetVector< NamedDecl *, 16 > | NamedDeclSetType
typedef std::pair< SourceLocation, bool > | DeleteExprLoc
| Delete-expressions to be analyzed at the end of translation unit. More...
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. More...
typedef void | LateTemplateParserCleanupCB(void *P)
typedef DelayedDiagnosticsState | ParsingDeclState
typedef DelayedDiagnosticsState | ProcessingContextState
typedef llvm::DenseMap< ParmVarDecl *, llvm::TinyPtrVector< ParmVarDecl * > > | UnparsedDefaultArgInstantiationsMap
typedef std::pair< ObjCMethodList, ObjCMethodList > | GlobalMethods
typedef llvm::DenseMap< Selector, GlobalMethods > | GlobalMethodPool
typedef llvm::PointerIntPair< CXXRecordDecl *, 3, CXXSpecialMember > | SpecialMemberDecl
using | PoppedFunctionScopePtr = std::unique_ptr< sema::FunctionScopeInfo, PoppedFunctionScopeDeleter >
typedef void * | SkippedDefinitionContext
typedef llvm::SmallSetVector< DeclContext *, 16 > | AssociatedNamespaceSet
typedef llvm::SmallSetVector< CXXRecordDecl *, 16 > | AssociatedClassSet
using | ADLCallKind = CallExpr::ADLCallKind
typedef llvm::SmallPtrSet< Selector, 8 > | SelectorSet
typedef std::pair< StringRef, QualType > | CapturedParamNameType
typedef ProcessingContextState | ParsingClassState
typedef std::pair< CXXRecordDecl *, SourceLocation > | VTableUse
| The list of classes whose vtables have been used within this translation unit, and the source locations at which the first use occurred. More...
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. More...
typedef llvm::SmallSet< SourceLocation, 2 > | SrcLocSet
typedef llvm::DenseMap< IdentifierInfo *, SrcLocSet > | IdentifierSourceLocations
typedef std::pair< ValueDecl *, SourceLocation > | PendingImplicitInstantiation
| An entity for which implicit template instantiation is required. More...
typedef SmallVector< LateInstantiatedAttribute, 16 > | LateInstantiatedAttrVec
using | OMPCtxStringType = SmallString< 8 >
| Struct to store the context selectors info for declare variant directive. More...
using | OMPCtxSelectorData = OpenMPCtxSelectorData< SmallVector< OMPCtxStringType, 4 >, ExprResult >
using | VarsWithInheritedDSAType = llvm::SmallDenseMap< const ValueDecl *, const Expr *, 4 >
using | ReferenceConversions = ReferenceConversionsScope::ReferenceConversions
typedef std::pair< const IdentifierInfo *, uint64_t > | TypeTagMagicValue
| A pair of ArgumentKind identifier and magic value. More...

## Public Member Functions
NamedDecl * | findLocallyScopedExternCDecl (DeclarationName Name)
| Look for a locally scoped extern "C" declaration by the given name. More...
void | SetLateTemplateParser (LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P)
bool | isConstantEvaluated ()
void | LoadExternalWeakUndeclaredIdentifiers ()
| Load weak undeclared identifiers from the external source. More...
void | WarnOnPendingNoDerefs (ExpressionEvaluationContextRecord &Rec)
| Emit a warning for all pending noderef expressions that we recorded. More...
std::tuple< MangleNumberingContext *, Decl * > | getCurrentMangleNumberContext (const DeclContext *DC)
| Compute the mangling number context for a lambda expression or block literal. More...
bool | isExternalWithNoLinkageType (ValueDecl *VD)
| 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". More...
void | getUndefinedButUsed (SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined)
| Obtain a sorted list of functions that are undefined but ODR-used. More...
const llvm::MapVector< FieldDecl *, DeleteLocs > & | getMismatchingDeleteExpressions () const
| Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit. More...
void | ReadMethodPool (Selector Sel)
| Read the contents of the method pool for a given selector from external storage. More...
void | updateOutOfDateSelector (Selector Sel)
void | EmitCurrentDiagnostic (unsigned DiagID)
| Cause the active diagnostic on the DiagosticsEngine to be emitted. More...
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. More...
const LangOptions & | getLangOpts () const
OpenCLOptions & | getOpenCLOptions ()
FPOptions & | getFPOptions ()
DiagnosticsEngine & | getDiagnostics () const
SourceManager & | getSourceManager () const
Preprocessor & | getPreprocessor () const
ASTContext & | getASTContext () const
ASTConsumer & | getASTConsumer () const
ASTMutationListener * | getASTMutationListener () const
ExternalSemaSource * | getExternalSource () const
void | addExternalSource (ExternalSemaSource *E)
| Registers an external source. More...
void | PrintStats () const
| Print out statistics about the semantic analysis. More...
void | warnStackExhausted (SourceLocation Loc)
| Warn that the stack is nearly exhausted. More...
void | runWithSufficientStackSpace (SourceLocation Loc, llvm::function_ref< void()> Fn)
| Run some code with "sufficient" stack space. More...
SemaDiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID)
| Emit a diagnostic. More...
SemaDiagnosticBuilder | Diag (SourceLocation Loc, const PartialDiagnostic &PD)
| Emit a partial diagnostic. More...
PartialDiagnostic | PDiag (unsigned DiagID=0)
| Build a partial diagnostic. More...
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. More...
std::string | getFixItZeroInitializerForType (QualType T, SourceLocation Loc) const
| Get a string to suggest for zero-initialization of a type. More...
std::string | getFixItZeroLiteralForType (QualType T, SourceLocation Loc) const
SourceLocation | getLocForEndOfToken (SourceLocation Loc, unsigned Offset=0)
| Calls `Lexer::getLocForEndOfToken()` More...
ModuleLoader & | getModuleLoader () const
| Retrieve the module loader associated with the preprocessor. More...
IdentifierInfo * | InventAbbreviatedTemplateParameterTypeName (IdentifierInfo *ParamName, unsigned Index)
| Invent a new identifier for parameters of abbreviated templates. More...
void | emitAndClearUnusedLocalTypedefWarnings ()
void | ActOnStartOfTranslationUnit ()
| This is called before the very first declaration in the translation unit is parsed. More...
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. More...
void | ActOnEndOfTranslationUnitFragment (TUFragmentKind Kind)
void | CheckDelegatingCtorCycles ()
Scope * | getScopeForContext (DeclContext *Ctx)
| Determines the active Scope associated with the given declaration context. More...
void | PushFunctionScope ()
| Enter a new function scope. More...
void | PushBlockScope (Scope *BlockScope, BlockDecl *Block)
sema::LambdaScopeInfo * | PushLambdaScope ()
void | RecordParsingTemplateParameterDepth (unsigned Depth)
| This is used to inform Sema what the current TemplateParameterDepth is during Parsing. More...
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. More...
sema::FunctionScopeInfo * | getCurFunction () const
sema::FunctionScopeInfo * | getEnclosingFunction () const
void | setFunctionHasBranchIntoScope ()
void | setFunctionHasBranchProtectedScope ()
void | setFunctionHasIndirectGoto ()
void | PushCompoundScope (bool IsStmtExpr)
void | PopCompoundScope ()
sema::CompoundScopeInfo & | getCurCompoundScope () const
bool | hasAnyUnrecoverableErrorsInThisFunction () const
| Determine whether any errors occurred within this function/method/ block. More...
sema::BlockScopeInfo * | getCurBlock ()
| Retrieve the current block, if any. More...
sema::LambdaScopeInfo * | getEnclosingLambda () const
| Get the innermost lambda enclosing the current location, if any. More...
sema::LambdaScopeInfo * | getCurLambda (bool IgnoreNonLambdaCapturingScope=false)
| Retrieve the current lambda scope info, if any. More...
sema::LambdaScopeInfo * | getCurGenericLambda ()
| Retrieve the current generic lambda info, if any. More...
sema::CapturedRegionScopeInfo * | getCurCapturedRegion ()
| Retrieve the current captured region, if any. More...
SmallVectorImpl< Decl * > & | WeakTopLevelDecls ()
| WeakTopLevelDeclDecls - access to #pragma weak-generated Decls. More...
void | ActOnStartFunctionDeclarationDeclarator (Declarator &D, unsigned TemplateParameterDepth)
| Called before parsing a function declarator belonging to a function declaration. More...
void | ActOnFinishFunctionDeclarationDeclarator (Declarator &D)
| Called after parsing a function declarator belonging to a function declaration. More...
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. More...
QualType | BuildReferenceType (QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity)
| Build a reference type. More...
QualType | BuildArrayType (QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity)
| Build an array type. More...
QualType | BuildVectorType (QualType T, Expr *VecSize, SourceLocation AttrLoc)
QualType | BuildExtVectorType (QualType T, Expr *ArraySize, SourceLocation AttrLoc)
| Build an ext-vector type. More...
QualType | BuildAddressSpaceAttr (QualType &T, LangAS ASIdx, Expr *AddrSpace, SourceLocation AttrLoc)
| BuildAddressSpaceAttr - Builds a DependentAddressSpaceType if an expression is uninstantiated. More...
QualType | BuildAddressSpaceAttr (QualType &T, Expr *AddrSpace, SourceLocation AttrLoc)
| Same as above, but constructs the AddressSpace index if not provided. More...
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. More...
QualType | BuildMemberPointerType (QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity)
| Build a member pointer type `T` Class::*. More...
QualType | BuildBlockPointerType (QualType T, SourceLocation Loc, DeclarationName Entity)
| Build a block pointer type. More...
QualType | BuildParenType (QualType T)
| Build a paren type including `T`. More...
QualType | BuildAtomicType (QualType T, SourceLocation Loc)
QualType | BuildReadPipeType (QualType T, SourceLocation Loc)
| Build a Read-only Pipe type. More...
QualType | BuildWritePipeType (QualType T, SourceLocation Loc)
| Build a Write-only Pipe type. More...
TypeSourceInfo * | GetTypeForDeclarator (Declarator &D, Scope *S)
| GetTypeForDeclarator - Convert the type for the specified declarator to Type instances. More...
TypeSourceInfo * | GetTypeForDeclaratorCast (Declarator &D, QualType FromTy)
ParsedType | CreateParsedType (QualType T, TypeSourceInfo *TInfo)
| Package the given type and TSI into a ParsedType. More...
DeclarationNameInfo | GetNameForDeclarator (Declarator &D)
| GetNameForDeclarator - Determine the full declaration name for the given Declarator. More...
DeclarationNameInfo | GetNameFromUnqualifiedId (const UnqualifiedId &Name)
| Retrieves the declaration name from a parsed unqualified-id. More...
CanThrowResult | canThrow (const Stmt *E)
const FunctionProtoType * | ResolveExceptionSpec (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. More...
bool | CheckDistantExceptionSpec (QualType T)
| CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function with an exception specification. More...
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. More...
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, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc)
| CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subset (or equivalent) of the first function type. More...
bool | CheckParamExceptionSpec (const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Target, SourceLocation TargetLoc, const FunctionProtoType *Source, SourceLocation SourceLoc)
| CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalent exception specs. More...
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. More...
Module * | getOwningModule (const Decl *Entity)
| Get the module owning an entity. More...
void | makeMergedDefinitionVisible (NamedDecl *ND)
| Make a merged definition of an existing hidden definition `ND` visible at the specified location. More...
bool | isModuleVisible (const Module *M, bool ModulePrivate=false)
bool | isVisible (const NamedDecl *D)
| Determine whether a declaration is visible to name lookup. More...
bool | hasVisibleDeclaration (const NamedDecl *D, llvm::SmallVectorImpl< Module *> *Modules=nullptr)
| Determine whether any declaration of an entity is visible. More...
bool | hasVisibleDeclarationSlow (const NamedDecl *D, llvm::SmallVectorImpl< Module *> *Modules)
bool | hasVisibleMergedDefinition (NamedDecl *Def)
bool | hasMergedDefinitionInCurrentModule (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. More...
bool | hasVisibleDefinition (NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
| Determine if `D` has a visible definition. More...
bool | hasVisibleDefinition (const NamedDecl *D)
bool | hasVisibleDefaultArgument (const NamedDecl *D, llvm::SmallVectorImpl< Module *> *Modules=nullptr)
| Determine if the template parameter `D` has a visible default argument. More...
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. More...
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). More...
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. More...
void | diagnoseEquivalentInternalLinkageDeclarations (SourceLocation Loc, const NamedDecl *D, ArrayRef< const NamedDecl *> Equiv)
bool | isUsualDeallocationFunction (const CXXMethodDecl *FD)
bool | isCompleteType (SourceLocation Loc, QualType T)
bool | RequireCompleteType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
| Ensure that the type T is a complete type. More...
bool | RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID)
template<typename... Ts>
bool | RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
void | completeExprArrayBound (Expr *E)
bool | RequireCompleteExprType (Expr *E, TypeDiagnoser &Diagnoser)
| Ensure that the type of the given expression is complete. More...
bool | RequireCompleteExprType (Expr *E, unsigned DiagID)
template<typename... Ts>
bool | RequireCompleteExprType (Expr *E, unsigned DiagID, const Ts &...Args)
bool | RequireLiteralType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
| Ensure that the type T is a literal type. More...
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. More...
QualType | BuildTypeofExprType (Expr *E, SourceLocation Loc)
QualType | BuildDecltypeType (Expr *E, SourceLocation Loc, bool AsUnevaluated=true)
| If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building a type for decltype(auto). More...
QualType | BuildUnaryTransformType (QualType BaseType, UnaryTransformType::UTTKind UKind, SourceLocation Loc)
DeclGroupPtrTy | ConvertDeclToDeclGroup (Decl *Ptr, Decl *OwnedType=nullptr)
void | DiagnoseUseOfUnimplementedSelectors ()
bool | isSimpleTypeSpecifier (tok::TokenKind Kind) const
| Determine whether the token kind starts a simple-type-specifier. More...
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, IdentifierInfo **CorrectedII=nullptr)
| If the identifier refers to a type name within this scope, return the declaration of that type. More...
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"). More...
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. More...
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. More...
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. More...
ExprResult | ActOnNameClassifiedAsUndeclaredNonType (IdentifierInfo *Name, SourceLocation NameLoc)
| Act on the result of classifying a name as an undeclared (ADL-only) non-type declaration. More...
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. More...
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. More...
TemplateNameKindForDiagnostics | getTemplateNameKindForDiagnostics (TemplateName Name)
bool | mightBeIntendedToBeTemplateName (ExprResult E, bool &Dependent)
| Determine whether it's plausible that E was intended to be a template-name. More...
void | diagnoseExprIntendedAsTemplateName (Scope *S, ExprResult TemplateName, SourceLocation Less, SourceLocation Greater)
Decl * | ActOnDeclarator (Scope *S, Declarator &D)
NamedDecl * | HandleDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
void | RegisterLocallyScopedExternCDecl (NamedDecl *ND, Scope *S)
| Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarations. More...
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: More...
bool | diagnoseQualifiedDeclaration (CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc, bool IsTemplateId)
| Diagnose a declaration whose declarator-id has the given nested-name-specifier. More...
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. More...
NamedDecl * | getShadowedDeclaration (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. More...
NamedDecl * | getShadowedDeclaration (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. More...
void | CheckShadow (NamedDecl *D, NamedDecl *ShadowedDecl, const LookupResult &R)
| Diagnose variable or built-in function shadowing. More...
void | CheckShadow (Scope *S, VarDecl *D)
| Check -Wshadow without the advantage of a previous lookup. More...
void | CheckShadowingDeclModification (Expr *E, SourceLocation Loc)
| Warn if 'E', which is an expression that is about to be modified, refers to a shadowing declaration. More...
void | DiagnoseShadowingLambdaDecls (const sema::LambdaScopeInfo *LSI)
| Diagnose shadowing for variables shadowed in the lambda record `LambdaRD` when these variables are captured by the lambda. More...
void | CheckCastAlign (Expr *Op, QualType T, SourceRange TRange)
| CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment requirements. More...
void | handleTagNumbering (const TagDecl *Tag, Scope *TagScope)
void | setTagNameForLinkagePurposes (TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD)
void | CheckTypedefForVariablyModifiedType (Scope *S, TypedefNameDecl *D)
NamedDecl * | ActOnTypedefDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous)
NamedDecl * | ActOnTypedefNameDecl (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;'. More...
NamedDecl * | ActOnVariableDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef< BindingDecl *> Bindings=None)
NamedDecl * | ActOnDecompositionDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists)
bool | CheckVariableDeclaration (VarDecl *NewVD, LookupResult &Previous)
| Perform semantic checking on a newly-created variable declaration. More...
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)
NamedDecl * | ActOnFunctionDeclarator (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. More...
bool | CheckConstexprFunctionDefinition (const FunctionDecl *FD, CheckConstexprKind Kind)
void | DiagnoseHiddenVirtualMethods (CXXMethodDecl *MD)
| Diagnose methods which overload virtual methods in a base class without overriding any. More...
void | FindHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl *> &OverloadedMethods)
| Check if a method overloads virtual methods in a base class without overriding any. More...
void | NoteHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl *> &OverloadedMethods)
bool | CheckFunctionDeclaration (Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization)
| Perform semantic checking of a new function declaration. More...
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. More...
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`. More...
void | CheckMain (FunctionDecl *FD, const DeclSpec &D)
void | CheckMSVCRTEntryPoint (FunctionDecl *FD)
Attr * | getImplicitCodeSegOrSectionAttrForFunction (const FunctionDecl *FD, bool IsDefinition)
| Returns an implicit CodeSegAttr if a __declspec(code_seg) is found on a containing class. More...
void | CheckFunctionOrTemplateParamDeclarator (Scope *S, Declarator &D)
| Common checks for a parameter-declaration that should apply to both function parameters and non-type template parameters. More...
Decl * | ActOnParamDeclarator (Scope *S, Declarator &D)
| ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into function prototype scope. More...
ParmVarDecl * | BuildParmVarDeclForTypedef (DeclContext *DC, SourceLocation Loc, QualType T)
| Synthesizes a variable for a parameter arising from a typedef. More...
ParmVarDecl * | CheckParameter (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. More...
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. More...
void | ActOnParamDefaultArgumentError (Decl *param, SourceLocation EqualLoc)
| ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the parameter param failed. More...
bool | 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. More...
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. More...
void | AddInitializerToDecl (Decl *dcl, Expr *init, bool DirectInit)
| AddInitializerToDecl - Adds the initializer Init to the declaration dcl. More...
void | ActOnUninitializedDecl (Decl *dcl)
void | ActOnInitializerError (Decl *Dcl)
| ActOnInitializerError - Given that there was an error parsing an initializer for the given declaration, try to return to some form of sanity. More...
void | ActOnPureSpecifier (Decl *D, SourceLocation PureSpecLoc)
void | ActOnCXXForRangeDecl (Decl *D)
StmtResult | ActOnCXXForRangeIdentifier (Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs, SourceLocation AttrEnd)
void | SetDeclDeleted (Decl *dcl, SourceLocation DelLoc)
void | SetDeclDefaulted (Decl *dcl, SourceLocation DefaultLoc)
void | CheckStaticLocalForDllExport (VarDecl *VD)
| Check if VD needs to be dllexport/dllimport due to being in a dllexport/import function. More...
void | FinalizeDeclaration (Decl *D)
| FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions necessary after any initializer has been attached. More...
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. More...
void | ActOnDocumentableDecl (Decl *D)
| Should be called on all declarations that might have attached documentation comments. More...
void | ActOnDocumentableDecls (ArrayRef< Decl *> Group)
void | ActOnFinishKNRParamDeclarations (Scope *S, Declarator &D, SourceLocation LocAfterDecls)
void | CheckForFunctionRedefinition (FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr, SkipBodyInfo *SkipBody=nullptr)
Decl * | ActOnStartOfFunctionDef (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists, SkipBodyInfo *SkipBody=nullptr)
Decl * | ActOnStartOfFunctionDef (Scope *S, Decl *D, SkipBodyInfo *SkipBody=nullptr)
void | ActOnStartTrailingRequiresClause (Scope *S, Declarator &D)
ExprResult | ActOnFinishTrailingRequiresClause (ExprResult ConstraintExpr)
void | ActOnStartOfObjCMethodDef (Scope *S, Decl *D)
| ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST. More...
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. More...
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. More...
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. More...
Decl * | ActOnFinishFunctionBody (Decl *Decl, Stmt *Body)
Decl * | ActOnFinishFunctionBody (Decl *Decl, Stmt *Body, bool IsInstantiation)
Decl * | ActOnSkippedFunctionBody (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. More...
void | DiagnoseUnusedParameters (ArrayRef< ParmVarDecl *> Parameters)
| Diagnose any unused parameters in the given sequence of ParmVarDecl pointers. More...
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. More...
void | DiagnoseInvalidJumps (Stmt *Body)
Decl * | ActOnFileScopeAsmDecl (Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc)
Decl * | ActOnEmptyDeclaration (Scope *S, const ParsedAttributesView &AttrList, SourceLocation SemiLoc)
| Handle a C++11 empty-declaration and attribute-declaration. More...
DeclGroupPtrTy | ActOnModuleDecl (SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, bool IsFirstDecl)
| The parser has processed a module-declaration that begins the definition of a module interface or implementation. More...
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. More...
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. More...
DeclResult | ActOnModuleImport (SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, ModuleIdPath Path)
| The parser has processed a module import declaration. More...
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. More...
void | BuildModuleInclude (SourceLocation DirectiveLoc, Module *Mod)
void | ActOnModuleBegin (SourceLocation DirectiveLoc, Module *Mod)
| The parsed has entered a submodule. More...
void | ActOnModuleEnd (SourceLocation DirectiveLoc, Module *Mod)
| The parser has left a submodule. More...
void | createImplicitModuleImportForErrorRecovery (SourceLocation Loc, Module *Mod)
| Create an implicit import of the given module at the given source location, for error recovery, if possible. More...
void | diagnoseMissingImport (SourceLocation Loc, 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. More...
void | diagnoseMissingImport (SourceLocation Loc, NamedDecl *Decl, SourceLocation DeclLoc, ArrayRef< Module *> Modules, MissingImportKind MIK, bool Recover)
Decl * | ActOnStartExportDecl (Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc)
| We have parsed the start of an export declaration, including the '{' (if present). More...
Decl * | ActOnFinishExportDecl (Scope *S, Decl *ExportDecl, SourceLocation RBraceLoc)
| Complete the definition of an export declaration. More...
void | checkSpecializationVisibility (SourceLocation Loc, NamedDecl *Spec)
| We've found a use of a templated declaration that would trigger an implicit instantiation. More...
void | checkPartialSpecializationVisibility (SourceLocation Loc, NamedDecl *Spec)
| We've found a use of a template specialization that would select a partial specialization. More...
PrintingPolicy | getPrintingPolicy () const
| Retrieve a suitable printing policy for diagnostics. More...
void | ActOnPopScope (SourceLocation Loc, Scope *S)
| Scope actions. More...
void | ActOnTranslationUnitScope (Scope *S)
Decl * | ParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, RecordDecl *&AnonRecord)
| ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g. More...
Decl * | ParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord)
| ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g. More...
Decl * | BuildAnonymousStructOrUnion (Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy)
| BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union. More...
Decl * | BuildMicrosoftCAnonymousStruct (Scope *S, DeclSpec &DS, RecordDecl *Record)
| BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure. More...
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. More...
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. More...
Decl * | 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, SkipBodyInfo *SkipBody=nullptr)
| This is invoked when we see 'struct foo' or 'struct {'. More...
Decl * | 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. More...
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. More...
Decl * | ActOnField (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. More...
FieldDecl * | HandleField (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. More...
MSPropertyDecl * | HandleMSProperty (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. More...
FieldDecl * | CheckFieldDecl (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. More...
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. More...
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. More...
DefaultedFunctionKind | getDefaultedFunctionKind (const FunctionDecl *FD)
| Determine the kind of defaulting that would be done for a given function. More...
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. More...
Decl * | ActOnIvar (Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind visibility)
| ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDecl object for it. More...
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). More...
bool | ActOnDuplicateDefinition (DeclSpec &DS, Decl *Prev, SkipBodyInfo &SkipBody)
| Perform ODR-like check for C/ObjC when merging tag types from modules. More...
SkippedDefinitionContext | ActOnTagStartSkippedDefinition (Scope *S, Decl *TD)
| Invoked when we enter a tag definition that we're skipping. More...
Decl * | ActOnObjCContainerStartDefinition (Decl *IDecl)
void | ActOnStartCXXMemberDeclarations (Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, SourceLocation LBraceLoc)
| ActOnStartCXXMemberDeclarations - Invoked when we have parsed a C++ record definition's base-specifiers clause and are starting its member declarations. More...
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). More...
void | ActOnTagFinishSkippedDefinition (SkippedDefinitionContext Context)
void | ActOnObjCContainerFinishDefinition ()
void | ActOnObjCTemporaryExitContainerContext (DeclContext *DC)
| Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs. More...
void | ActOnObjCReenterContainerContext (DeclContext *DC)
void | ActOnTagDefinitionError (Scope *S, Decl *TagDecl)
| ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a tag. More...
EnumConstantDecl * | CheckEnumConstant (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. More...
bool | CheckEnumRedeclaration (SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, bool IsFixed, const EnumDecl *Prev)
| Check whether this is a valid redeclaration of a previous enumeration. More...
SkipBodyInfo | shouldSkipAnonEnumBody (Scope *S, IdentifierInfo *II, SourceLocation IILoc)
| Determine whether the body of an anonymous enumeration should be skipped. More...
Decl * | ActOnEnumConstant (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)
DeclContext * | getContainingDC (DeclContext *DC)
void | PushDeclContext (Scope *S, DeclContext *DC)
| Set the current declaration context until it gets popped. More...
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. More...
void | ExitDeclaratorContext (Scope *S)
void | ActOnReenterFunctionContext (Scope *S, Decl *D)
| Push the parameters of D, which must be a function, into scope. More...
void | ActOnExitFunctionContext ()
DeclContext * | getFunctionLevelDeclContext ()
FunctionDecl * | getCurFunctionDecl ()
| getCurFunctionDecl - If inside of a function body, this returns a pointer to the function decl for the function being parsed. More...
ObjCMethodDecl * | getCurMethodDecl ()
| getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the method being parsed. More...
NamedDecl * | getCurFunctionOrMethodDecl ()
| getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method or C function we're in, otherwise return null. More...
void | PushOnScopeChains (NamedDecl *D, Scope *S, bool AddToContext=true)
| Add this decl to the scope shadowed decl chains. More...
bool | isDeclInScope (NamedDecl *D, DeclContext *Ctx, Scope *S=nullptr, bool AllowInlineNamespace=false)
| isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns true if 'D' belongs to the given declaration context. More...
TypedefDecl * | ParseTypedefDecl (Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo)
| Subroutines of ActOnDeclarator(). More...
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. More...
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 Uuid)
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)
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)
NoSpeculativeLoadHardeningAttr * | mergeNoSpeculativeLoadHardeningAttr (Decl *D, const NoSpeculativeLoadHardeningAttr &AL)
SpeculativeLoadHardeningAttr * | mergeSpeculativeLoadHardeningAttr (Decl *D, const SpeculativeLoadHardeningAttr &AL)
OptimizeNoneAttr * | mergeOptimizeNoneAttr (Decl *D, const AttributeCommonInfo &CI)
InternalLinkageAttr * | mergeInternalLinkageAttr (Decl *D, const ParsedAttr &AL)
InternalLinkageAttr * | mergeInternalLinkageAttr (Decl *D, const InternalLinkageAttr &AL)
CommonAttr * | mergeCommonAttr (Decl *D, const ParsedAttr &AL)
CommonAttr * | mergeCommonAttr (Decl *D, const CommonAttr &AL)
void | mergeDeclAttributes (NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration)
| mergeDeclAttributes - Copy attributes from the Old decl to the New one. More...
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'. More...
bool | MergeFunctionDecl (FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld)
| MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and scope as a previous declaration 'Old'. More...
bool | MergeCompatibleFunctionDecls (FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld)
| Completes the merge of two function declarations that are known to be compatible. More...
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'. More...
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'. More...
void | MergeVarDeclExceptionSpecs (VarDecl *New, VarDecl *Old)
| Merge the exception specifications of two variable declarations. More...
bool | checkVarDeclRedefinition (VarDecl *OldDefn, VarDecl *NewDefn)
| We've just determined that `Old` and `New` both appear to be definitions of the same variable. More...
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. More...
OverloadKind | CheckOverload (Scope *S, FunctionDecl *New, const LookupResult &OldDecls, NamedDecl *&OldDecl, bool IsForUsingDecl)
| Determine whether the given New declaration is an overload of the declarations in Old. More...
bool | IsOverload (FunctionDecl *New, FunctionDecl *Old, bool IsForUsingDecl, bool ConsiderCudaAttrs=true, bool ConsiderRequiresClauses=true)
ImplicitConversionSequence | TryImplicitConversion (Expr *From, QualType ToType, bool SuppressUserConversions, bool AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion)
bool | IsIntegralPromotion (Expr *From, QualType FromType, QualType ToType)
| IsIntegralPromotion - Determines whether the conversion from the expression From (whose potentially-adjusted type is FromType) to ToType is an integral promotion (C++ 4.5). More...
bool | IsFloatingPointPromotion (QualType FromType, QualType ToType)
| IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating point promotion (C++ 4.6). More...
bool | IsComplexPromotion (QualType FromType, QualType ToType)
| Determine if a conversion is a complex promotion. More...
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). More...
bool | isObjCPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC)
| isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion. More...
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. More...
bool | IsBlockPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType)
bool | FunctionParamTypesAreEqual (const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr)
| FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their argument types. More...
void | HandleFunctionTypeMismatch (PartialDiagnostic &PDiag, QualType FromType, QualType ToType)
| HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types. More...
void | maybeExtendBlockObject (ExprResult &E)
| Do an explicit extend of the given block pointer if we're in ARC. More...
CastKind | PrepareCastToObjCObjectPointer (ExprResult &E)
| Prepare a conversion of the given expression to an ObjC object pointer type. More...
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. More...
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). More...
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. More...
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). More...
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. More...
bool | DiagnoseMultipleUserDefinedConversion (Expr *From, QualType ToType)
bool | isSameOrCompatibleFunctionType (CanQualType Param, CanQualType Arg)
| Compare types for equality with respect to possibly compatible function types (noreturn adjustment, implicit calling conventions). More...
ExprResult | PerformMoveOrCopyInitialization (const InitializedEntity &Entity, const VarDecl *NRVOCandidate, QualType ResultType, Expr *Value, bool AllowNRVO=true)
| Perform the initialization of a potentially-movable value, which is the result of return value. More...
bool | CanPerformAggregateInitializationForOverloadResolution (const InitializedEntity &Entity, InitListExpr *From)
| Determine whether we can perform aggregate initialization for the purposes of overload resolution. More...
bool | CanPerformCopyInitialization (const InitializedEntity &Entity, ExprResult Init)
ExprResult | PerformCopyInitialization (const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false, bool AllowExplicit=false)
ExprResult | PerformObjectArgumentInitialization (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method)
| PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the given Method with the given expression. More...
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. More...
ExprResult | PerformContextuallyConvertToBool (Expr *From)
| PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C++0x [conv]p3). More...
ExprResult | PerformContextuallyConvertToObjCPointer (Expr *From)
| PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to an Objective-C pointer type. More...
ExprResult | CheckConvertedConstantExpression (Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
ExprResult | CheckConvertedConstantExpression (Expr *From, QualType T, APValue &Value, CCEKind CCE)
ExprResult | PerformContextualImplicitConversion (SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter)
| Perform a contextual implicit conversion. More...
ObjCSubscriptKind | CheckSubscriptingKind (Expr *FromE)
| CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being done. More...
ObjCLiteralKind | CheckLiteralKind (Expr *FromE)
ExprResult | PerformObjectMemberConversion (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, NamedDecl *Member)
| Cast a base object to a member's actual type. More...
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=None, OverloadCandidateParamOrder PO={})
| AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given function call arguments. More...
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. More...
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. More...
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=None, 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`). More...
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. More...
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={})
| Add a C++ function template specialization as a candidate in the candidate set, using template argument deduction to produce an appropriate function template specialization. More...
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 [temp.deduct.call]p10. More...
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]). More...
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]). More...
void | AddSurrogateCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, ArrayRef< Expr *> Args, OverloadCandidateSet &CandidateSet)
| AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given `Object` to a function pointer via the conversion function `Conversion`, and then attempts to call it with the given arguments (C++ [over.call.object]p2-4). More...
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. More...
void | AddMemberOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr *> Args, OverloadCandidateSet &CandidateSet, OverloadCandidateParamOrder PO={})
| Add overload candidates for overloaded operators that are member functions. More...
void | AddBuiltinCandidate (QualType *ParamTys, ArrayRef< Expr *> Args, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0)
| AddBuiltinCandidate - Add a candidate for a built-in operator. More...
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. More...
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. More...
void | NoteOverloadCandidate (NamedDecl *Found, 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, ArrayRef< Expr *> Args, bool MissingImplicitThis=false)
| Check the enable_if expressions on the given function. More...
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. More...
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. More...
bool | diagnoseArgIndependentDiagnoseIfAttrs (const NamedDecl *ND, SourceLocation Loc)
| Emit diagnostics for the diagnose_if attributes on Function, ignoring any ArgDependent DiagnoseIfAttrs. More...
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. More...
QualType | ExtractUnqualifiedFunctionType (QualType PossiblyAFunctionType)
FunctionDecl * | ResolveAddressOfOverloadedFunction (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. More...
FunctionDecl * | resolveAddressOfSingleOverloadCandidate (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. More...
bool | resolveAndFixAddressOfSingleOverloadCandidate (ExprResult &SrcExpr, bool DoFunctionPointerConversion=false)
| Given an overloaded function, tries to turn it into a non-overloaded function reference using resolveAddressOfSingleOverloadCandidate. More...
FunctionDecl * | ResolveSingleFunctionTemplateSpecialization (OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr)
| Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function. More...
bool | ResolveAndFixSingleFunctionTemplateSpecialization (ExprResult &SrcExpr, bool DoFunctionPointerConverion=false, bool Complain=false, SourceRange OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0)
Expr * | 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). More...
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. More...
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. More...
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. More...
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. More...
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. More...
void | LookupOverloadedBinOp (OverloadCandidateSet &CandidateSet, OverloadedOperatorKind Op, const UnresolvedSetImpl &Fns, ArrayRef< Expr *> Args, bool RequiresADL=true)
| Perform lookup for an overloaded binary operator. More...
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. More...
ExprResult | BuildSynthesizedThreeWayComparison (SourceLocation OpLoc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, FunctionDecl *DefaultedFn)
ExprResult | CreateOverloadedArraySubscriptExpr (SourceLocation LLoc, SourceLocation RLoc, Expr *Base, Expr *Idx)
ExprResult | BuildCallToMemberFunction (Scope *S, Expr *MemExpr, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
| BuildCallToMemberFunction - Build a call to a member function. More...
ExprResult | BuildCallToObjectOfClassType (Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
| BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over.call.object]), which can end up invoking an overloaded function call operator (`operator()`) or performing a user-defined conversion on the object argument. More...
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. More...
bool | CheckCallReturnType (QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
| CheckCallReturnType - Checks that a call expression's return type is complete. More...
bool | CheckParmsForFunctionDef (ArrayRef< ParmVarDecl *> Parameters, bool CheckParameterNames)
| Helpers for dealing with blocks and functions. More...
void | CheckCXXDefaultArguments (FunctionDecl *FD)
| CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-formed according to C++ [dcl.fct.default]. More...
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. More...
Scope * | getNonFieldDeclScope (Scope *S)
| getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared. More...
ObjCInterfaceDecl * | getObjCInterfaceDecl (IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false)
| Look for an Objective-C class in the translation unit. More...
NamedDecl * | LazilyCreateBuiltin (IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc)
| LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope. More...
NamedDecl * | ImplicitlyDefineFunction (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). More...
void | AddKnownFunctionAttributes (FunctionDecl *FD)
| Adds any function attributes that we know a priori based on the declaration of this function. More...
void | ProcessPragmaWeak (Scope *S, Decl *D)
void | ProcessDeclAttributes (Scope *S, Decl *D, const Declarator &PD)
void | ProcessDeclAttributeDelayed (Decl *D, const ParsedAttributesView &AttrList)
void | ProcessDeclAttributeList (Scope *S, Decl *D, const ParsedAttributesView &AL, bool IncludeCXX11Attributes=true)
bool | ProcessAccessDeclAttributeList (AccessSpecDecl *ASDecl, const ParsedAttributesView &AttrList)
void | checkUnusedDeclAttributes (Declarator &D)
bool | isValidPointerAttrType (QualType T, bool RefOkay=false)
| Determine if type T is a valid subject for a nonnull and similar attributes. More...
bool | CheckRegparmAttr (const ParsedAttr &attr, unsigned &value)
bool | CheckCallingConvAttr (const ParsedAttr &attr, CallingConv &CC, const FunctionDecl *FD=nullptr)
bool | CheckAttrTarget (const ParsedAttr &CurrAttr)
bool | CheckAttrNoArgs (const ParsedAttr &CurrAttr)
bool | checkStringLiteralArgumentAttr (const ParsedAttr &Attr, unsigned ArgNum, StringRef &Str, SourceLocation *ArgLocation=nullptr)
| Check if the argument `ArgNum` of `Attr` is a ASCII string literal. More...
bool | checkSectionName (SourceLocation LiteralLoc, StringRef Str)
bool | checkTargetAttr (SourceLocation LiteralLoc, StringRef Str)
bool | checkMSInheritanceAttrOnDefinition (CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel SemanticSpelling)
void | CheckAlignasUnderalignment (Decl *D)
void | adjustMemberFunctionCC (QualType &T, bool IsStatic, bool IsCtorOrDtor, SourceLocation Loc)
| Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly. More...
bool | hasExplicitCallingConv (QualType T)
const AttributedType * | getCallingConvAttributedType (QualType T) const
| Get the outermost AttributedType node that sets a calling convention. More...
StmtResult | ProcessStmtAttributes (Stmt *Stmt, const ParsedAttributesView &Attrs, SourceRange Range)
| Stmt attributes - this routine is the top level dispatcher. More...
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. More...
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. More...
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. More...
void | DiagnoseUnimplementedProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties)
| DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by this implementation. More...
void | diagnoseNullResettableSynthesizedSetters (const ObjCImplDecl *impDecl)
| Diagnose any null-resettable synthesized setters. More...
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. More...
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'. More...
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. More...
ObjCIvarDecl * | GetIvarBackingPropertyAccessor (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. More...
ObjCPropertyDecl * | HandlePropertyInClassExtension (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. More...
ObjCPropertyDecl * | CreatePropertyDecl (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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
void | addMethodToGlobalList (ObjCMethodList *List, ObjCMethodDecl *Method)
| Add the given method to the list of globally-known methods. More...
LangAS | getDefaultCXXMethodAddrSpace () const
| Returns default addr space for method qualifiers. More...
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. More...
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. More...
void | AddFactoryMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false)
| AddFactoryMethodToGlobalPool - Same as above, but for factory methods. More...
void | AddAnyMethodToGlobalPool (Decl *D)
| AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool. More...
ObjCMethodDecl * | LookupInstanceMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false)
| LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures. More...
ObjCMethodDecl * | LookupFactoryMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false)
| LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures. More...
const ObjCMethodDecl * | SelectorsForTypoCorrection (Selector Sel, QualType ObjectType=QualType())
ObjCMethodDecl * | LookupImplementedMethodInGlobalPool (Selector Sel)
| LookupImplementedMethodInGlobalPool - Returns the method which has an implementation. More...
void | CollectIvarsToConstructOrDestruct (ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl *> &Ivars)
| CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization. More...
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 | 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. More...
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. More...
StmtResult | ActOnDefaultStmt (SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope)
StmtResult | ActOnLabelStmt (SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt)
StmtResult | ActOnAttributedStmt (SourceLocation AttrLoc, ArrayRef< const Attr *> Attrs, Stmt *SubStmt)
StmtResult | ActOnIfStmt (SourceLocation IfLoc, bool IsConstexpr, Stmt *InitStmt, ConditionResult Cond, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
StmtResult | BuildIfStmt (SourceLocation IfLoc, bool IsConstexpr, Stmt *InitStmt, ConditionResult Cond, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
StmtResult | ActOnStartOfSwitchStmt (SourceLocation SwitchLoc, Stmt *InitStmt, ConditionResult Cond)
StmtResult | ActOnFinishSwitchStmt (SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
StmtResult | ActOnWhileStmt (SourceLocation WhileLoc, ConditionResult Cond, 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. More...
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. More...
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. More...
StmtResult | FinishCXXForRangeStmt (Stmt *ForRange, Stmt *Body)
| FinishCXXForRangeStmt - Attach the body to a C++0x for-range statement. More...
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 ()
RecordDecl * | CreateCapturedStmtRecordDecl (CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams)
VarDecl * | getCopyElisionCandidate (QualType ReturnType, Expr *E, CopyElisionSemanticsKind CESK)
| Determine whether the given expression is a candidate for copy elision in either a return statement or a throw expression. More...
bool | isCopyElisionCandidate (QualType ReturnType, const VarDecl *VD, CopyElisionSemanticsKind CESK)
StmtResult | ActOnReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope)
StmtResult | BuildReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp)
StmtResult | ActOnCapScopeReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp)
| ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes. More...
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)
LabelDecl * | GetOrCreateMSAsmLabel (StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate)
VarDecl * | BuildObjCExceptionDecl (TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid=false)
| Build a type-check a new Objective-C exception variable declaration. More...
Decl * | ActOnObjCExceptionDecl (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)
VarDecl * | BuildExceptionDeclaration (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. More...
Decl * | ActOnExceptionDeclarator (Scope *S, Declarator &D)
| ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler. More...
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. More...
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. More...
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. More...
void | DiagnoseUnusedExprResult (const Stmt *S)
| DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused, warn. More...
void | DiagnoseUnusedNestedTypedefs (const RecordDecl *D)
void | DiagnoseUnusedDecl (const NamedDecl *ND)
| DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused). More...
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. More...
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. More...
void | DiagnoseSelfMove (const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc)
| Warn if a value is moved to itself. More...
void | diagnoseNullableToNonnullConversion (QualType DstType, QualType SrcType, SourceLocation Loc)
| Warn if we're implicitly casting from a _Nullable pointer type to a _Nonnull one. More...
void | diagnoseZeroToNullptrConversion (CastKind Kind, const Expr *E)
| Warn when implicitly casting 0 to nullptr. More...
ParsingDeclState | PushParsingDeclaration (sema::DelayedDiagnosticPool &pool)
void | PopParsingDeclaration (ParsingDeclState state, Decl *decl)
ParsingClassState | PushParsingClass ()
void | PopParsingClass (ParsingClassState state)
void | redelayDiagnostics (sema::DelayedDiagnosticPool &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. More...
void | DiagnoseUnguardedAvailabilityViolations (Decl *FD)
| Issue any -Wunguarded-availability warnings in `FD`. More...
bool | CanUseDecl (NamedDecl *D, bool TreatUnavailableAsInvalid)
| Determine whether the use of this declaration is valid, without emitting diagnostics. More...
bool | DiagnoseUseOfDecl (NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReciever=nullptr)
| Determine whether the use of this declaration is valid, and emit any corresponding diagnostics. More...
void | NoteDeletedFunction (FunctionDecl *FD)
| Emit a note explaining that this function is deleted. More...
void | NoteDeletedInheritingConstructor (CXXConstructorDecl *CD)
bool | DiagnosePropertyAccessorMismatch (ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc)
void | DiagnoseSentinelCalls (NamedDecl *D, SourceLocation Loc, ArrayRef< Expr *> Args)
| DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with the sentinel attribute, and if so, it checks that the requirements of the sentinel are satisfied. More...
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)
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. More...
ExprResult | ActOnConstantExpression (ExprResult Res)
void | MarkAnyDeclReferenced (SourceLocation Loc, Decl *D, bool MightBeOdrUse)
| Perform marking for a reference to an arbitrary declaration. More...
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) More...
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). More...
void | MarkDeclRefReferenced (DeclRefExpr *E, const Expr *Base=nullptr)
| Perform reference-marking and odr-use handling for a DeclRefExpr. More...
void | MarkMemberReferenced (MemberExpr *E)
| Perform reference-marking and odr-use handling for a MemberExpr. More...
void | MarkFunctionParmPackReferenced (FunctionParmPackExpr *E)
| Perform reference-marking and odr-use handling for a FunctionParmPackExpr. More...
void | MarkCaptureUsedInEnclosingContext (VarDecl *Capture, SourceLocation Loc, unsigned CapturingScopeIndex)
ExprResult | CheckLValueToRValueConversionOperand (Expr *E)
void | CleanupVarDeclMarking ()
bool | tryCaptureVariable (VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt)
| Try to capture the given variable. More...
bool | tryCaptureVariable (VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind=TryCapture_Implicit, SourceLocation EllipsisLoc=SourceLocation())
| Try to capture the given variable. More...
bool | NeedToCaptureVariable (VarDecl *Var, SourceLocation Loc)
| Checks if the variable must be captured. More...
QualType | getCapturedDeclRefType (VarDecl *Var, SourceLocation Loc)
| Given a variable, determine the type that a reference to that variable will have in the given scope. More...
void | MarkDeclarationsReferencedInType (SourceLocation Loc, QualType T)
| Mark all of the declarations referenced within a particular AST node as referenced. More...
void | MarkDeclarationsReferencedInExpr (Expr *E, bool SkipLocalVariables=false)
| Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced". More...
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. More...
bool | tryExprAsCall (Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads)
| Figure out if an expression could be turned into a call. More...
bool | DiagRuntimeBehavior (SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
| Conditionally issue a diagnostic based on the current evaluation context. More...
bool | DiagRuntimeBehavior (SourceLocation Loc, ArrayRef< const Stmt *> Stmts, const PartialDiagnostic &PD)
| Similar, but diagnostic is only produced if all the specified statements are reachable. More...
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. More...
bool | DiagnoseEmptyLookup (Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr *> Args=None, TypoExpr **Out=nullptr)
| Diagnose an empty lookup. More...
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. More...
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. More...
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. More...
NonOdrUseReason | getNonOdrUseReasonInCurrentContext (ValueDecl *D)
| If `D` cannot be odr-used in the current expression evaluation context, return a reason explaining why. More...
DeclRefExpr * | BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr)
DeclRefExpr * | BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, const CXXScopeSpec *SS=nullptr, NamedDecl *FoundD=nullptr, SourceLocation TemplateKWLoc=SourceLocation(), const TemplateArgumentListInfo *TemplateArgs=nullptr)
DeclRefExpr * | BuildDeclRefExpr (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. More...
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)
| Builds an expression which might be an implicit member expression. More...
ExprResult | BuildImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance, const Scope *S)
| Builds an implicit member access expression. More...
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. More...
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. More...
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. More...
ExprResult | BuildPredefinedExpr (SourceLocation Loc, PredefinedExpr::IdentKind IK)
ExprResult | ActOnPredefinedExpr (SourceLocation Loc, tok::TokenKind Kind)
ExprResult | ActOnIntegerConstant (SourceLocation Loc, uint64_t Val)
bool | CheckLoopHintExpr (Expr *E, SourceLocation Loc)
ExprResult | ActOnNumericConstant (const Token &Tok, Scope *UDLScope=nullptr)
ExprResult | ActOnCharacterConstant (const Token &Tok, Scope *UDLScope=nullptr)
ExprResult | ActOnParenExpr (SourceLocation L, SourceLocation R, Expr *E)
ExprResult | ActOnParenListExpr (SourceLocation L, SourceLocation R, MultiExprArg Val)
ExprResult | ActOnStringLiteral (ArrayRef< Token > StringToks, Scope *UDLScope=nullptr)
| ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e.g. More...
ExprResult | ActOnGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr *> ArgExprs)
ExprResult | CreateGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< TypeSourceInfo *> Types, ArrayRef< Expr *> Exprs)
ExprResult | CreateBuiltinUnaryOp (SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr)
ExprResult | BuildUnaryOp (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input)
ExprResult | ActOnUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input)
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. More...
QualType | CheckAddressOfOperand (ExprResult &Operand, SourceLocation OpLoc)
| CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designating an object. More...
ExprResult | CreateUnaryExprOrTypeTraitExpr (TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
| Build a sizeof or alignof expression given a type operand. More...
ExprResult | CreateUnaryExprOrTypeTraitExpr (Expr *E, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind)
| Build a sizeof or alignof expression given an expression operand. More...
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. More...
ExprResult | CheckPlaceholderExpr (Expr *E)
| Check for operands with placeholder types and complain if found. More...
bool | CheckVecStepExpr (Expr *E)
bool | CheckUnaryExprOrTypeTraitOperand (Expr *E, UnaryExprOrTypeTrait ExprKind)
| Check the constraints on expression operands to unary type expression and type traits. More...
bool | CheckUnaryExprOrTypeTraitOperand (QualType ExprType, SourceLocation OpLoc, SourceRange ExprRange, UnaryExprOrTypeTrait ExprKind)
| Check the constraints on operands to unary expression and type traits. More...
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. More...
ExprResult | ActOnPostfixUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Kind, Expr *Input)
ExprResult | ActOnArraySubscriptExpr (Scope *S, Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
ExprResult | CreateBuiltinArraySubscriptExpr (Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
ExprResult | ActOnOMPArraySectionExpr (Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLoc, Expr *Length, SourceLocation RBLoc)
ExprResult | BuildMemberReferenceExpr (Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, 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. More...
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 . More...
MemberExpr * | BuildMemberExpr (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)
MemberExpr * | BuildMemberExpr (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. More...
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. More...
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. More...
ExprResult | BuildCallExpr (Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false)
| BuildCallExpr - Handle a call to Fn with the specified array of arguments. More...
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. More...
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. More...
ExprResult | BuildVectorLiteral (SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo)
| Build an altivec or OpenCL literal. More...
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. More...
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`. More...
void | DiagnoseCommaOperator (const Expr *LHS, SourceLocation Loc)
ExprResult | ActOnConditionalOp (SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr)
| ActOnConditionalOp - Parse a ?: operation. More...
ExprResult | ActOnAddrLabel (SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl)
| ActOnAddrLabel - Parse the GNU address of label extension: "&&foo". More...
void | ActOnStartStmtExpr ()
ExprResult | ActOnStmtExpr (SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
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) More...
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 (SourceLocExpr::IdentKind Kind, SourceLocation BuiltinLoc, SourceLocation RPLoc)
ExprResult | BuildSourceLocExpr (SourceLocExpr::IdentKind Kind, 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. More...
void | ActOnBlockArguments (SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope)
| ActOnBlockArguments - This callback allows processing of block arguments. More...
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. More...
ExprResult | ActOnBlockStmtExpr (SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
| ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully completed. More...
ExprResult | ActOnConvertVectorExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
| __builtin_convertvector(...) More...
ExprResult | ActOnAsTypeExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
| __builtin_astype(...) More...
Decl * | ActOnStartNamespaceDef (Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, const ParsedAttributesView &AttrList, UsingDirectiveDecl *&UsingDecl)
| ActOnStartNamespaceDef - This is called at the start of a namespace definition. More...
void | ActOnFinishNamespaceDef (Decl *Dcl, SourceLocation RBrace)
| ActOnFinishNamespaceDef - This callback is called after a namespace is exited. More...
NamespaceDecl * | getStdNamespace () const
NamespaceDecl * | getOrCreateStdNamespace ()
| Retrieve the special "std" namespace, which may require us to implicitly define the namespace. More...
NamespaceDecl * | lookupStdExperimentalNamespace ()
CXXRecordDecl * | getStdBadAlloc () const
EnumDecl * | getStdAlignValT () const
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. More...
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. More...
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. More...
bool | isInitListConstructor (const FunctionDecl *Ctor)
| Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2. More...
Decl * | ActOnUsingDirective (Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList)
void | PushUsingDirective (Scope *S, UsingDirectiveDecl *UDir)
Decl * | ActOnNamespaceAliasDef (Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident)
void | HideUsingShadowDecl (Scope *S, UsingShadowDecl *Shadow)
| Hides a using shadow declaration. More...
bool | CheckUsingShadowDecl (UsingDecl *UD, NamedDecl *Target, const LookupResult &PreviousDecls, UsingShadowDecl *&PrevShadow)
| Determines whether to create a using shadow decl for a particular decl, given the set of decls existing prior to this using lookup. More...
UsingShadowDecl * | BuildUsingShadowDecl (Scope *S, UsingDecl *UD, NamedDecl *Target, UsingShadowDecl *PrevDecl)
| Builds a shadow declaration corresponding to a 'using' declaration. More...
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. More...
bool | CheckUsingDeclQualifier (SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc)
| Checks that the given nested-name qualifier used in a using decl in the current context is appropriately related to the current scope. More...
NamedDecl * | BuildUsingDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation)
| Builds a using declaration. More...
NamedDecl * | BuildUsingPackDecl (NamedDecl *InstantiatedFrom, ArrayRef< NamedDecl *> Expansions)
bool | CheckInheritingConstructorUsingDecl (UsingDecl *UD)
| Additional checks for a using declaration referring to a constructor name. More...
CXXConstructorDecl * | findInheritingConstructor (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. More...
Decl * | ActOnUsingDeclaration (Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList)
Decl * | ActOnAliasDeclaration (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, unsigned ConstructKind, SourceRange ParenRange)
| BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions. More...
ExprResult | BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
| Build a CXXConstructExpr whose constructor has already been resolved if it denotes an inherited constructor. More...
ExprResult | BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
ExprResult | BuildCXXDefaultInitExpr (SourceLocation Loc, FieldDecl *Field)
bool | CheckCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
| Instantiate or parse a C++ default argument expression as necessary. More...
ExprResult | BuildCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
| BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed. More...
void | FinalizeVarWithDestructor (VarDecl *VD, const RecordType *DeclInitType)
| FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable. More...
ImplicitExceptionSpecification | ComputeDefaultedDefaultCtorExceptionSpec (SourceLocation Loc, CXXMethodDecl *MD)
| Determine what sort of exception specification a defaulted copy constructor of a class will have. More...
ImplicitExceptionSpecification | ComputeDefaultedCopyCtorExceptionSpec (CXXMethodDecl *MD)
| Determine what sort of exception specification a defaulted default constructor of a class will have, and whether the parameter will be const. More...
ImplicitExceptionSpecification | ComputeDefaultedCopyAssignmentExceptionSpec (CXXMethodDecl *MD)
| Determine what sort of exception specification a defaulted copy assignment operator of a class will have, and whether the parameter will be const. More...
ImplicitExceptionSpecification | ComputeDefaultedMoveCtorExceptionSpec (CXXMethodDecl *MD)
| Determine what sort of exception specification a defaulted move constructor of a class will have. More...
ImplicitExceptionSpecification | ComputeDefaultedMoveAssignmentExceptionSpec (CXXMethodDecl *MD)
| Determine what sort of exception specification a defaulted move assignment operator of a class will have. More...
ImplicitExceptionSpecification | ComputeDefaultedDtorExceptionSpec (CXXMethodDecl *MD)
| Determine what sort of exception specification a defaulted destructor of a class will have. More...
ImplicitExceptionSpecification | ComputeInheritingCtorExceptionSpec (SourceLocation Loc, CXXConstructorDecl *CD)
| Determine what sort of exception specification an inheriting constructor of a class will have. More...
void | EvaluateImplicitExceptionSpec (SourceLocation Loc, FunctionDecl *FD)
| Evaluate the implicit exception specification for a defaulted special member function. More...
ExprResult | ActOnNoexceptSpec (SourceLocation NoexceptLoc, Expr *NoexceptExpr, ExceptionSpecificationType &EST)
| Check the given noexcept-specifier, convert its expression, and compute the appropriate ExceptionSpecificationType. More...
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. More...
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. More...
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). More...
bool | ShouldDeleteSpecialMember (CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI=nullptr, bool Diagnose=false)
| Determine if a special member function should have a deleted definition when it is defaulted. More...
void | DiagnoseDeletedDefaultedFunction (FunctionDecl *FD)
| Produce notes explaining why a defaulted function was defined as deleted. More...
CXXConstructorDecl * | DeclareImplicitDefaultConstructor (CXXRecordDecl *ClassDecl)
| Declare the implicit default constructor for the given class. More...
void | DefineImplicitDefaultConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
| DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default constructor. More...
CXXDestructorDecl * | DeclareImplicitDestructor (CXXRecordDecl *ClassDecl)
| Declare the implicit destructor for the given class. More...
void | DefineImplicitDestructor (SourceLocation CurrentLocation, CXXDestructorDecl *Destructor)
| DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default destructor. More...
void | AdjustDestructorExceptionSpec (CXXDestructorDecl *Destructor)
| Build an exception spec for destructors that don't have one. More...
void | DefineInheritingConstructor (SourceLocation UseLoc, CXXConstructorDecl *Constructor)
| Define the specified inheriting constructor. More...
CXXConstructorDecl * | DeclareImplicitCopyConstructor (CXXRecordDecl *ClassDecl)
| Declare the implicit copy constructor for the given class. More...
void | DefineImplicitCopyConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
| DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy constructor. More...
CXXConstructorDecl * | DeclareImplicitMoveConstructor (CXXRecordDecl *ClassDecl)
| Declare the implicit move constructor for the given class. More...
void | DefineImplicitMoveConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
| DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move constructor. More...
CXXMethodDecl * | DeclareImplicitCopyAssignment (CXXRecordDecl *ClassDecl)
| Declare the implicit copy assignment operator for the given class. More...
void | DefineImplicitCopyAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
| Defines an implicitly-declared copy assignment operator. More...
CXXMethodDecl * | DeclareImplicitMoveAssignment (CXXRecordDecl *ClassDecl)
| Declare the implicit move assignment operator for the given class. More...
void | DefineImplicitMoveAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
| Defines an implicitly-declared move assignment operator. More...
void | ForceDeclarationOfImplicitMembers (CXXRecordDecl *Class)
| Force the declaration of any implicitly-declared members of this class. More...
void | CheckImplicitSpecialMemberDeclaration (Scope *S, FunctionDecl *FD)
| Check a completed declaration of an implicit special member. More...
bool | isImplicitlyDeleted (FunctionDecl *FD)
| Determine whether the given function is an implicitly-deleted special member function. More...
bool | checkThisInStaticMemberFunctionType (CXXMethodDecl *Method)
| Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-qualifier-seq would be. More...
bool | checkThisInStaticMemberFunctionExceptionSpec (CXXMethodDecl *Method)
| Whether this' shows up in the exception specification of a static member function. More...
bool | checkThisInStaticMemberFunctionAttributes (CXXMethodDecl *Method)
| Check whether 'this' shows up in the attributes of the given static member function. More...
ExprResult | MaybeBindToTemporary (Expr *E)
| MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor, this will return CXXBindTemporaryExpr. More...
bool | CompleteConstructorCall (CXXConstructorDecl *Constructor, MultiExprArg ArgsPtr, SourceLocation Loc, SmallVectorImpl< Expr *> &ConvertedArgs, bool AllowExplicit=false, bool IsListInitialization=false)
| Given a constructor and the set of arguments provided for the constructor, convert the arguments and add any required default arguments to form a proper call to this constructor. More...
ParsedType | getInheritingConstructorName (CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo &Name)
| Handle the result of the special case name lookup for inheriting constructor declarations. More...
ParsedType | getConstructorName (IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, bool EnteringContext)
ParsedType | getDestructorName (SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectType, bool EnteringContext)
ParsedType | getDestructorTypeForDecltype (const DeclSpec &DS, ParsedType ObjectType)
void | CheckCompatibleReinterpretCast (QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range)
ExprResult | ActOnCXXNamedCast (SourceLocation OpLoc, tok::TokenKind Kind, SourceLocation LAngleBracketLoc, Declarator &D, SourceLocation RAngleBracketLoc, SourceLocation LParenLoc, Expr *E, SourceLocation RParenLoc)
| ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's. More...
ExprResult | BuildCXXNamedCast (SourceLocation OpLoc, tok::TokenKind Kind, TypeSourceInfo *Ty, Expr *E, SourceRange AngleBrackets, SourceRange Parens)
ExprResult | ActOnBuiltinBitCastExpr (SourceLocation KWLoc, Declarator &Dcl, ExprResult Operand, SourceLocation RParenLoc)
ExprResult | BuildBuiltinBitCastExpr (SourceLocation KWLoc, TypeSourceInfo *TSI, Expr *Operand, SourceLocation RParenLoc)
ExprResult | BuildCXXTypeId (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
| Build a C++ typeid expression with a type operand. More...
ExprResult | BuildCXXTypeId (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
| Build a C++ typeid expression with an expression operand. More...
ExprResult | ActOnCXXTypeid (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
| ActOnCXXTypeid - Parse typeid( something ). More...
ExprResult | BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
| Build a Microsoft __uuidof expression with a type operand. More...
ExprResult | BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
| Build a Microsoft __uuidof expression with an expression operand. More...
ExprResult | ActOnCXXUuidof (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
| ActOnCXXUuidof - Parse __uuidof( something ). More...
ExprResult | ActOnCXXFoldExpr (SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
| Handle a C++1z fold-expression: ( expr op ... op expr ). More...
ExprResult | BuildCXXFoldExpr (SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc, Optional< unsigned > NumExpansions)
ExprResult | BuildEmptyCXXFoldExpr (SourceLocation EllipsisLoc, BinaryOperatorKind Operator)
ExprResult | ActOnCXXThis (SourceLocation loc)
Expr * | BuildCXXThisExpr (SourceLocation Loc, QualType Type, bool IsImplicit)
| Build a CXXThisExpr and mark it referenced in the current context. More...
void | MarkThisReferenced (CXXThisExpr *This)
QualType | getCurrentThisType ()
| Try to retrieve the type of the 'this' pointer. More...
bool | CheckCXXThisCapture (SourceLocation Loc, bool Explicit=false, bool BuildAndDiagnose=true, const unsigned *const FunctionScopeIndexToStopAt=nullptr, bool ByCopy=false)
| Make sure the value of 'this' is actually available in the current context, if it is a potentially evaluated context. More...
bool | isThisOutsideMemberFunctionBody (QualType BaseType)
| Determine whether the given type is the type of *this that is used outside of the body of a member function for a type that is currently being defined. More...
ExprResult | ActOnCXXBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind)
| ActOnCXXBoolLiteral - Parse {true,false} literals. More...
ExprResult | ActOnObjCBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind)
| ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals. More...
ExprResult | ActOnObjCAvailabilityCheckExpr (llvm::ArrayRef< AvailabilitySpec > AvailSpecs, SourceLocation AtLoc, SourceLocation RParen)
ExprResult | ActOnCXXNullPtrLiteral (SourceLocation Loc)
| ActOnCXXNullPtrLiteral - Parse 'nullptr'. More...
ExprResult | ActOnCXXThrow (Scope *S, SourceLocation OpLoc, Expr *expr)
| ActOnCXXThrow - Parse throw expressions. More...
ExprResult | BuildCXXThrow (SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope)
bool | CheckCXXThrowOperand (SourceLocation ThrowLoc, QualType ThrowTy, Expr *E)
| CheckCXXThrowOperand - Validate the operand of a throw. More...
ExprResult | ActOnCXXTypeConstructExpr (ParsedType TypeRep, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization)
| ActOnCXXTypeConstructExpr - Parse construction of a specified type. More...
ExprResult | BuildCXXTypeConstructExpr (TypeSourceInfo *Type, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc, bool ListInitialization)
ExprResult | ActOnCXXNew (SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, Expr *Initializer)
| ActOnCXXNew - Parsed a C++ 'new' expression. More...
ExprResult | BuildCXXNew (SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, Optional< Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer)
bool | isUnavailableAlignedAllocationFunction (const FunctionDecl &FD) const
| Determine whether `FD` is an aligned allocation or deallocation function that is unavailable. More...
void | diagnoseUnavailableAlignedAllocation (const FunctionDecl &FD, SourceLocation Loc)
| Produce diagnostics if `FD` is an aligned allocation or deallocation function that is unavailable. More...
bool | CheckAllocatedType (QualType AllocType, SourceLocation Loc, SourceRange R)
| Checks that a type is suitable as the allocated type in a new-expression. More...
bool | FindAllocationFunctions (SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose=true)
| Finds the overloads of operator new and delete that are appropriate for the allocation. More...
void | DeclareGlobalNewDelete ()
| DeclareGlobalNewDelete - Declare the global forms of operator new and delete. More...
void | DeclareGlobalAllocationFunction (DeclarationName Name, QualType Return, ArrayRef< QualType > Params)
| DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't already exist. More...
bool | FindDeallocationFunction (SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true)
FunctionDecl * | FindUsualDeallocationFunction (SourceLocation StartLoc, bool CanProvideSize, bool Overaligned, DeclarationName Name)
FunctionDecl * | FindDeallocationFunctionForDestructor (SourceLocation StartLoc, CXXRecordDecl *RD)
ExprResult | ActOnCXXDelete (SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand)
| ActOnCXXDelete - Parsed a C++ 'delete' expression. More...
void | CheckVirtualDtorCall (CXXDestructorDecl *dtor, SourceLocation Loc, bool IsDelete, bool CallCanBeVirtual, bool WarnOnNonAbstractTypes, SourceLocation DtorLoc)
ExprResult | ActOnNoexceptExpr (SourceLocation KeyLoc, SourceLocation LParen, Expr *Operand, SourceLocation RParen)
ExprResult | BuildCXXNoexceptExpr (SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen)
ExprResult | ActOnTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< ParsedType > Args, SourceLocation RParenLoc)
| Parsed one of the type trait support pseudo-functions. More...
ExprResult | BuildTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo *> Args, SourceLocation RParenLoc)
ExprResult | ActOnArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen)
| ActOnArrayTypeTrait - Parsed one of the binary type trait support pseudo-functions. More...
ExprResult | BuildArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen)
ExprResult | ActOnExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
| ActOnExpressionTrait - Parsed one of the unary type trait support pseudo-functions. More...
ExprResult | BuildExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
ExprResult | ActOnStartCXXMemberReference (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor)
ExprResult | BuildPseudoDestructorExpr (Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
ExprResult | ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName)
ExprResult | ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, SourceLocation TildeLoc, const DeclSpec &DS)
Expr * | MaybeCreateExprWithCleanups (Expr *SubExpr)
| MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups, surround it with a ExprWithCleanups node. More...
Stmt * | MaybeCreateStmtWithCleanups (Stmt *SubStmt)
ExprResult | MaybeCreateExprWithCleanups (ExprResult SubExpr)
MaterializeTemporaryExpr * | CreateMaterializeTemporaryExpr (QualType T, Expr *Temporary, bool BoundToLvalueReference)
ExprResult | ActOnFinishFullExpr (Expr *Expr, bool DiscardedValue)
ExprResult | ActOnFinishFullExpr (Expr *Expr, SourceLocation CC, bool DiscardedValue, bool IsConstexpr=false)
StmtResult | ActOnFinishFullStmt (Stmt *Stmt)
bool | RequireCompleteDeclContext (CXXScopeSpec &SS, DeclContext *DC)
| Require that the context specified by SS be complete. More...
DeclContext * | computeDeclContext (QualType T)
| Compute the DeclContext that is associated with the given type. More...
DeclContext * | computeDeclContext (const CXXScopeSpec &SS, bool EnteringContext=false)
| Compute the DeclContext that is associated with the given scope specifier. More...
bool | isDependentScopeSpecifier (const CXXScopeSpec &SS)
CXXRecordDecl * | getCurrentInstantiationOf (NestedNameSpecifier *NNS)
| If the given nested name specifier refers to the current instantiation, return the declaration that corresponds to that current instantiation (C++0x [temp.dep.type]p1). More...
bool | ActOnCXXGlobalScopeSpecifier (SourceLocation CCLoc, CXXScopeSpec &SS)
| The parser has parsed a global nested-name-specifier '::'. More...
bool | ActOnSuperScopeSpecifier (SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS)
| The parser has parsed a '__super' nested-name-specifier. More...
bool | isAcceptableNestedNameSpecifier (const NamedDecl *SD, bool *CanCorrect=nullptr)
| Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier. More...
NamedDecl * | FindFirstQualifierInScope (Scope *S, NestedNameSpecifier *NNS)
| If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup for that identifier as a nested-name-specifier within the given scope, and return the result of that name lookup. More...
bool | isNonTypeNestedNameSpecifier (Scope *S, CXXScopeSpec &SS, NestedNameSpecInfo &IdInfo)
bool | BuildCXXNestedNameSpecifier (Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon=nullptr, bool OnlyNamespace=false)
| Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier. More...
bool | ActOnCXXNestedNameSpecifier (Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, bool ErrorRecoveryLookup=false, bool *IsCorrectedToColon=nullptr, bool OnlyNamespace=false)
| The parser has parsed a nested-name-specifier 'identifier::'. More...
ExprResult | ActOnDecltypeExpression (Expr *E)
| Process the expression contained within a decltype. More...
bool | ActOnCXXNestedNameSpecifierDecltype (CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc)
bool | IsInvalidUnlessNestedName (Scope *S, CXXScopeSpec &SS, NestedNameSpecInfo &IdInfo, bool EnteringContext)
| IsInvalidUnlessNestedName - This method is used for error recovery purposes to determine whether the specified identifier is only valid as a nested name specifier, for example a namespace name. More...
bool | ActOnCXXNestedNameSpecifier (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateName, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, SourceLocation CCLoc, bool EnteringContext)
| The parser has parsed a nested-name-specifier 'template[opt] template-name < template-args >::'. More...
void * | SaveNestedNameSpecifierAnnotation (CXXScopeSpec &SS)
| Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to reconstruct the given nested-name-specifier. More...
void | RestoreNestedNameSpecifierAnnotation (void *Annotation, SourceRange AnnotationRange, CXXScopeSpec &SS)
| Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure. More...
bool | ShouldEnterDeclaratorScope (Scope *S, const CXXScopeSpec &SS)
bool | ActOnCXXEnterDeclaratorScope (Scope *S, CXXScopeSpec &SS)
| ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global scope or nested-name-specifier) is parsed, part of a declarator-id. More...
void | ActOnCXXExitDeclaratorScope (Scope *S, const CXXScopeSpec &SS)
| ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclaratorScope(), is finished. More...
void | ActOnCXXEnterDeclInitializer (Scope *S, Decl *Dcl)
| ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration 'Dcl'. More...
void | ActOnCXXExitDeclInitializer (Scope *S, Decl *Dcl)
| ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaration 'Dcl'. More...
CXXRecordDecl * | createLambdaClosureType (SourceRange IntroducerRange, TypeSourceInfo *Info, bool KnownDependent, LambdaCaptureDefault CaptureDefault)
| Create a new lambda closure type. More...
CXXMethodDecl * | startLambdaDefinition (CXXRecordDecl *Class, SourceRange IntroducerRange, TypeSourceInfo *MethodType, SourceLocation EndLoc, ArrayRef< ParmVarDecl *> Params, ConstexprSpecKind ConstexprKind, Expr *TrailingRequiresClause)
| Start the definition of a lambda expression. More...
void | handleLambdaNumbering (CXXRecordDecl *Class, CXXMethodDecl *Method, Optional< std::tuple< unsigned, bool, Decl *>> Mangling=None)
| Number lambda for linkage purposes if necessary. More...
void | buildLambdaScope (sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, bool ExplicitParams, bool ExplicitResultType, bool Mutable)
| Endow the lambda scope info with the relevant properties. More...
ParsedType | actOnLambdaInitCaptureInitialization (SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, IdentifierInfo *Id, LambdaCaptureInitKind InitKind, Expr *&Init)
| Perform initialization analysis of the init-capture and perform any implicit conversions such as an lvalue-to-rvalue conversion if not being used to initialize a reference. More...
QualType | buildLambdaInitCaptureInitialization (SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions, IdentifierInfo *Id, bool DirectInit, Expr *&Init)
VarDecl * | createLambdaInitCaptureVarDecl (SourceLocation Loc, QualType InitCaptureType, SourceLocation EllipsisLoc, IdentifierInfo *Id, unsigned InitStyle, Expr *Init)
| Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purposes for a lambda init capture. More...
void | addInitCapture (sema::LambdaScopeInfo *LSI, VarDecl *Var)
| Add an init-capture to a lambda scope. More...
void | finishLambdaExplicitCaptures (sema::LambdaScopeInfo *LSI)
| Note that we have finished the explicit captures for the given lambda. More...
void | ActOnLambdaExplicitTemplateParameterList (SourceLocation LAngleLoc, ArrayRef< NamedDecl *> TParams, SourceLocation RAngleLoc)
| This is called after parsing the explicit template parameter list on a lambda (if it exists) in C++2a. More...
void | addLambdaParameters (ArrayRef< LambdaIntroducer::LambdaCapture > Captures, CXXMethodDecl *CallOperator, Scope *CurScope)
| Introduce the lambda parameters into scope. More...
void | deduceClosureReturnType (sema::CapturingScopeInfo &CSI)
| Deduce a block or lambda's return type based on the return statements present in the body. More...
void | ActOnStartOfLambdaDefinition (LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope)
| ActOnStartOfLambdaDefinition - This is called just before we start parsing the body of a lambda; it analyzes the explicit captures and arguments, and sets up various data-structures for the body of the lambda. More...
void | ActOnLambdaError (SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false)
| ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the information about the lambda. More...
ExprResult | ActOnLambdaExpr (SourceLocation StartLoc, Stmt *Body, Scope *CurScope)
| ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed. More...
bool | CaptureHasSideEffects (const sema::Capture &From)
| Does copying/destroying the captured variable have side effects? More...
bool | DiagnoseUnusedLambdaCapture (SourceRange CaptureRange, const sema::Capture &From)
| Diagnose if an explicit lambda capture is unused. More...
FieldDecl * | BuildCaptureField (RecordDecl *RD, const sema::Capture &Capture)
| Build a FieldDecl suitable to hold the given capture. More...
ExprResult | BuildCaptureInit (const sema::Capture &Capture, SourceLocation ImplicitCaptureLoc, bool IsOpenMPMapping=false)
| Initialize the given capture with a suitable expression. More...
ExprResult | BuildLambdaExpr (SourceLocation StartLoc, SourceLocation EndLoc, sema::LambdaScopeInfo *LSI)
| Complete a lambda-expression having processed and attached the lambda body. More...
QualType | getLambdaConversionFunctionResultType (const FunctionProtoType *CallOpType)
| Get the return type to use for a lambda's conversion function(s) to function pointer type, given the type of the call operator. More...
void | DefineImplicitLambdaToFunctionPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv)
| Define the "body" of the conversion from a lambda object to a function pointer. More...
void | DefineImplicitLambdaToBlockPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv)
| Define the "body" of the conversion from a lambda object to a block pointer. More...
ExprResult | BuildBlockForLambdaConversion (SourceLocation CurrentLocation, SourceLocation ConvLocation, CXXConversionDecl *Conv, Expr *Src)
bool | CheckConstraintExpression (Expr *CE, Token NextToken=Token(), bool *PossibleNonPrimary=nullptr, bool IsTrailingRequiresClause=false)
| Check whether the given expression is a valid constraint expression. More...
bool | IsDependentFunctionNameExpr (Expr *E)
| Check whether the given type-dependent expression will be the name of a function or another callable function-like entity (e.g. More...
const NormalizedConstraint * | getNormalizedAssociatedConstraints (NamedDecl *ConstrainedDecl, ArrayRef< const Expr *> AssociatedConstraints)
bool | IsAtLeastAsConstrained (NamedDecl *D1, ArrayRef< const Expr *> AC1, NamedDecl *D2, ArrayRef< const Expr *> AC2, bool &Result)
| Check whether the given declaration's associated constraints are at least as constrained than another declaration's according to the partial ordering of constraints. More...
bool | MaybeEmitAmbiguousAtomicConstraintsDiagnostic (NamedDecl *D1, ArrayRef< const Expr *> AC1, NamedDecl *D2, ArrayRef< const Expr *> AC2)
| If D1 was not at least as constrained as D2, but would've been if a pair of atomic constraints involved had been declared in a concept and not repeated in two separate places in code. More...
bool | CheckConstraintSatisfaction (const NamedDecl *Template, ArrayRef< const Expr *> ConstraintExprs, ArrayRef< TemplateArgument > TemplateArgs, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction)
| Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given template arguments. More...
bool | CheckConstraintSatisfaction (const Expr *ConstraintExpr, ConstraintSatisfaction &Satisfaction)
| Check whether the given non-dependent constraint expression is satisfied. More...
bool | CheckFunctionConstraints (const FunctionDecl *FD, ConstraintSatisfaction &Satisfaction, SourceLocation UsageLoc=SourceLocation())
| Check whether the given function decl's trailing requires clause is satisfied, if any. More...
bool | EnsureTemplateArgumentListConstraints (TemplateDecl *Template, ArrayRef< TemplateArgument > TemplateArgs, SourceRange TemplateIDRange)
| Ensure that the given template arguments satisfy the constraints associated with the given template, emitting a diagnostic if they do not. More...
void | DiagnoseUnsatisfiedConstraint (const ConstraintSatisfaction &Satisfaction, bool First=true)
| Emit diagnostics explaining why a constraint expression was deemed unsatisfied. More...
void | DiagnoseUnsatisfiedConstraint (const ASTConstraintSatisfaction &Satisfaction, bool First=true)
| Emit diagnostics explaining why a constraint expression was deemed unsatisfied. More...
void | DiagnoseUnsatisfiedIllFormedConstraint (SourceLocation DiagnosticLocation, StringRef Diagnostic)
| Emit diagnostics explaining why a constraint expression was deemed unsatisfied because it was ill-formed. More...
void | DiagnoseRedeclarationConstraintMismatch (SourceLocation Old, SourceLocation New)
ExprResult | ParseObjCStringLiteral (SourceLocation *AtLocs, ArrayRef< Expr *> Strings)
ExprResult | BuildObjCStringLiteral (SourceLocation AtLoc, StringLiteral *S)
ExprResult | BuildCXXMemberCallExpr (Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates)
Decl * | ActOnStartLinkageSpecification (Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc)
| ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification, including the language and (if present) the '{'. More...
Decl * | ActOnFinishLinkageSpecification (Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
| ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpec. More...
CXXRecordDecl * | getCurrentClass (Scope *S, const CXXScopeSpec *SS)
| Get the class that is directly named by the current context. More...
bool | isCurrentClassName (const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr)
| isCurrentClassName - Determine whether the identifier II is the name of the class type currently being defined. More...
bool | isCurrentClassNameTypo (IdentifierInfo *&II, const CXXScopeSpec *SS)
| Determine whether the identifier II is a typo for the name of the class type currently being defined. More...
bool | ActOnAccessSpecifier (AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, const ParsedAttributesView &Attrs)
| ActOnAccessSpecifier - Parsed an access specifier followed by a colon. More...
NamedDecl * | ActOnCXXMemberDeclarator (Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle)
| ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed. More...
void | ActOnStartCXXInClassMemberInitializer ()
| Enter a new C++ default initializer scope. More...
void | ActOnFinishCXXInClassMemberInitializer (Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
| This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template. More...
MemInitResult | ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr *> Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc)
| Handle a C++ member initializer using parentheses syntax. More...
MemInitResult | ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *InitList, SourceLocation EllipsisLoc)
| Handle a C++ member initializer using braced-init-list syntax. More...
MemInitResult | BuildMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc)
| Handle a C++ member initializer. More...
MemInitResult | BuildMemberInitializer (ValueDecl *Member, Expr *Init, SourceLocation IdLoc)
MemInitResult | BuildBaseInitializer (QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc)
MemInitResult | BuildDelegatingInitializer (TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl)
bool | SetDelegatingInitializer (CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer)
bool | SetCtorInitializers (CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer *> Initializers=None)
void | SetIvarInitializers (ObjCImplementationDecl *ObjCImplementation)
| SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whose ivars need be initialized. More...
void | MarkBaseAndMemberDestructorsReferenced (SourceLocation Loc, CXXRecordDecl *Record)
| MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of its members and bases as referenced. More...
void | LoadExternalVTableUses ()
| Load any externally-stored vtable uses. More...
void | MarkVTableUsed (SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false)
| Note that the vtable for the given class was used at the given location. More...
void | MarkVirtualMemberExceptionSpecsNeeded (SourceLocation Loc, const CXXRecordDecl *RD)
| Mark the exception specifications of all virtual member functions in the given class as needed. More...
void | MarkVirtualMembersReferenced (SourceLocation Loc, const CXXRecordDecl *RD, bool ConstexprOnly=false)
| MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced. More...
bool | DefineUsedVTables ()
| Define all of the vtables that have been used in this translation unit and reference any virtual members used by those vtables. More...
void | AddImplicitlyDeclaredMembersToClass (CXXRecordDecl *ClassDecl)
| AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions, such as the default constructor, copy constructor, or destructor, to the given C++ class (C++ [special]p1). More...
void | ActOnMemInitializers (Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer *> MemInits, bool AnyErrors)
| ActOnMemInitializers - Handle the member initializers for a constructor. More...
void | checkClassLevelDLLAttribute (CXXRecordDecl *Class)
| Check class-level dllimport/dllexport attribute. More...
void | checkClassLevelCodeSegAttribute (CXXRecordDecl *Class)
void | referenceDLLExportedClassMethods ()
void | propagateDLLAttrToBaseClassTemplate (CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc)
| Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibility. More...
void | inferGslPointerAttribute (NamedDecl *ND, CXXRecordDecl *UnderlyingRecord)
| Add gsl::Pointer attribute to std::container::iterator. More...
void | inferGslOwnerPointerAttribute (CXXRecordDecl *Record)
| Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types. More...
void | inferGslPointerAttribute (TypedefNameDecl *TD)
| Add [[gsl::Pointer]] attributes for std:: types. More...
void | CheckCompletedCXXClass (Scope *S, CXXRecordDecl *Record)
| Perform semantic checks on a class definition that has been completing, introducing implicitly-declared members, checking for abstract types, etc. More...
void | checkIllFormedTrivialABIStruct (CXXRecordDecl &RD)
| Check that the C++ class annoated with "trivial_abi" satisfies all the conditions that are needed for the attribute to have an effect. More...
void | ActOnFinishCXXMemberSpecification (Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &AttrList)
void | ActOnFinishCXXMemberDecls ()
| Perform any semantic analysis which needs to be delayed until all pending class member declarations have been parsed. More...
void | ActOnFinishCXXNonNestedClass ()
void | ActOnReenterCXXMethodParameter (Scope *S, ParmVarDecl *Param)
| This is used to implement the constant expression evaluation part of the attribute enable_if extension. More...
unsigned | ActOnReenterTemplateScope (Scope *S, Decl *Template)
void | ActOnStartDelayedMemberDeclarations (Scope *S, Decl *Record)
void | ActOnStartDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
| ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class, and we are now parsing those parts of the given Method declaration that could not be parsed earlier (C++ [class.mem]p2), such as default arguments. More...
void | ActOnDelayedCXXMethodParameter (Scope *S, Decl *Param)
| ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration. More...
void | ActOnFinishDelayedMemberDeclarations (Scope *S, Decl *Record)
void | ActOnFinishDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
| ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration for Method. More...
void | ActOnFinishDelayedMemberInitializers (Decl *Record)
void | MarkAsLateParsedTemplate (FunctionDecl *FD, Decl *FnD, CachedTokens &Toks)
void | UnmarkAsLateParsedTemplate (FunctionDecl *FD)
bool | IsInsideALocalClassWithinATemplateFunction ()
Decl * | ActOnStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc)
Decl * | BuildStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *AssertMessageExpr, SourceLocation RParenLoc, bool Failed)
FriendDecl * | CheckFriendTypeDecl (SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo)
| Perform semantic analysis of the given friend type declaration. More...
Decl * | ActOnFriendTypeDecl (Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
| Handle a friend type declaration. More...
NamedDecl * | ActOnFriendFunctionDecl (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
QualType | CheckConstructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
| CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructor declarator `D` with type `R`. More...
void | CheckConstructor (CXXConstructorDecl *Constructor)
| CheckConstructor - Checks a fully-formed constructor for well-formedness, issuing any diagnostics required. More...
QualType | CheckDestructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
| CheckDestructorDeclarator - Called by ActOnDeclarator to check the well-formednes of the destructor declarator `D` with type `R`. More...
bool | CheckDestructor (CXXDestructorDecl *Destructor)
| CheckDestructor - Checks a fully-formed destructor definition for well-formedness, issuing any diagnostics required. More...
void | CheckConversionDeclarator (Declarator &D, QualType &R, StorageClass &SC)
| CheckConversionDeclarator - Called by ActOnDeclarator to check the well-formednes of the conversion function declarator `D` with type `R`. More...
Decl * | ActOnConversionDeclarator (CXXConversionDecl *Conversion)
| ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ conversion function. More...
void | CheckDeductionGuideDeclarator (Declarator &D, QualType &R, StorageClass &SC)
| Check the validity of a declarator that we parsed for a deduction-guide. More...
void | CheckDeductionGuideTemplate (FunctionTemplateDecl *TD)
void | CheckExplicitlyDefaultedFunction (Scope *S, FunctionDecl *MD)
bool | CheckExplicitlyDefaultedSpecialMember (CXXMethodDecl *MD, CXXSpecialMember CSM)
void | CheckDelayedMemberExceptionSpecs ()
bool | CheckExplicitlyDefaultedComparison (Scope *S, FunctionDecl *MD, DefaultedComparisonKind DCK)
void | DeclareImplicitEqualityComparison (CXXRecordDecl *RD, FunctionDecl *Spaceship)
void | DefineDefaultedComparison (SourceLocation Loc, FunctionDecl *FD, DefaultedComparisonKind DCK)
CXXBaseSpecifier * | CheckBaseSpecifier (CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
| ActOnBaseSpecifier - Parsed a base specifier. More...
BaseResult | ActOnBaseSpecifier (Decl *classdecl, SourceRange SpecifierRange, ParsedAttributes &Attrs, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc)
| ActOnBaseSpecifier - Parsed a base specifier. More...
bool | AttachBaseSpecifiers (CXXRecordDecl *Class, MutableArrayRef< CXXBaseSpecifier *> Bases)
| Performs the actual work of attaching the given base class specifiers to a C++ class. More...
void | ActOnBaseSpecifiers (Decl *ClassDecl, MutableArrayRef< CXXBaseSpecifier *> Bases)
| ActOnBaseSpecifiers - Attach the given base specifiers to the class, after checking whether there are any duplicate base classes. More...
bool | IsDerivedFrom (SourceLocation Loc, QualType Derived, QualType Base)
| Determine whether the type `Derived` is a C++ class that is derived from the type `Base`. More...
bool | IsDerivedFrom (SourceLocation Loc, QualType Derived, QualType Base, CXXBasePaths &Paths)
| Determine whether the type `Derived` is a C++ class that is derived from the type `Base`. More...
void | BuildBasePathArray (const CXXBasePaths &Paths, CXXCastPath &BasePath)
bool | CheckDerivedToBaseConversion (QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath=nullptr, bool IgnoreAccess=false)
bool | CheckDerivedToBaseConversion (QualType Derived, QualType Base, unsigned InaccessibleBaseID, unsigned AmbigiousBaseConvID, SourceLocation Loc, SourceRange Range, DeclarationName Name, CXXCastPath *BasePath, bool IgnoreAccess=false)
| CheckDerivedToBaseConversion - Check whether the Derived-to-Base conversion (where Derived and Base are class types) is well-formed, meaning that the conversion is unambiguous (and that all of the base classes are accessible). More...
std::string | getAmbiguousPathsDisplayString (CXXBasePaths &Paths)
| Builds a string representing ambiguous paths from a specific derived class to different subobjects of the same base class. More...
bool | CheckOverridingFunctionAttributes (const CXXMethodDecl *New, const CXXMethodDecl *Old)
bool | CheckOverridingFunctionReturnType (const CXXMethodDecl *New, const CXXMethodDecl *Old)
| CheckOverridingFunctionReturnType - Checks whether the return types are covariant, according to C++ [class.virtual]p5. More...
bool | CheckOverridingFunctionExceptionSpec (const CXXMethodDecl *New, const CXXMethodDecl *Old)
| CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec. More...
bool | CheckPureMethod (CXXMethodDecl *Method, SourceRange InitRange)
| Mark the given method pure. More...
void | CheckOverrideControl (NamedDecl *D)
| CheckOverrideControl - Check C++11 override control semantics. More...
void | DiagnoseAbsenceOfOverrideControl (NamedDecl *D)
| DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of an overriding method. More...
bool | CheckIfOverriddenFunctionIsMarkedFinal (const CXXMethodDecl *New, const CXXMethodDecl *Old)
| CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4. More...
bool | SetMemberAccessSpecifier (NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS)
| SetMemberAccessSpecifier - Set the access specifier of a member. More...
AccessResult | CheckUnresolvedMemberAccess (UnresolvedMemberExpr *E, DeclAccessPair FoundDecl)
| Perform access-control checking on a previously-unresolved member access which has now been resolved to a member. More...
AccessResult | CheckUnresolvedLookupAccess (UnresolvedLookupExpr *E, DeclAccessPair FoundDecl)
AccessResult | CheckAllocationAccess (SourceLocation OperatorLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, bool Diagnose=true)
| Checks access to an overloaded operator new or delete. More...
AccessResult | CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, DeclAccessPair FoundDecl, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp=false)
| Checks access to a constructor. More...
AccessResult | CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, DeclAccessPair FoundDecl, const InitializedEntity &Entity, const PartialDiagnostic &PDiag)
| Checks access to a constructor. More...
AccessResult | CheckDestructorAccess (SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag, QualType objectType=QualType())
AccessResult | CheckFriendAccess (NamedDecl *D)
| Checks access to the target of a friend declaration. More...
AccessResult | CheckMemberAccess (SourceLocation UseLoc, CXXRecordDecl *NamingClass, DeclAccessPair Found)
| Checks access to a member. More...
AccessResult | CheckStructuredBindingMemberAccess (SourceLocation UseLoc, CXXRecordDecl *DecomposedClass, DeclAccessPair Field)
| Checks implicit access to a member in a structured binding. More...
AccessResult | CheckMemberOperatorAccess (SourceLocation Loc, Expr *ObjectExpr, Expr *ArgExpr, DeclAccessPair FoundDecl)
| Checks access to an overloaded member operator, including conversion operators. More...
AccessResult | CheckAddressOfMemberAccess (Expr *OvlExpr, DeclAccessPair FoundDecl)
AccessResult | CheckBaseClassAccess (SourceLocation AccessLoc, QualType Base, QualType Derived, const CXXBasePath &Path, unsigned DiagID, bool ForceCheck=false, bool ForceUnprivileged=false)
| Checks access for a hierarchy conversion. More...
void | CheckLookupAccess (const LookupResult &R)
| Checks access to all the declarations in the given result set. More...
bool | IsSimplyAccessible (NamedDecl *Decl, CXXRecordDecl *NamingClass, QualType BaseType)
| Checks access to Target from the given class. More...
bool | isMemberAccessibleForDeletion (CXXRecordDecl *NamingClass, DeclAccessPair Found, QualType ObjectType, SourceLocation Loc, const PartialDiagnostic &Diag)
| Is the given member accessible for the purposes of deciding whether to define a special member function as deleted? More...
bool | isMemberAccessibleForDeletion (CXXRecordDecl *NamingClass, DeclAccessPair Found, QualType ObjectType)
void | HandleDependentAccessCheck (const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs)
void | PerformDependentDiagnostics (const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
void | HandleDelayedAccessCheck (sema::DelayedDiagnostic &DD, Decl *Ctx)
bool | isAbstractType (SourceLocation Loc, QualType T)
bool | RequireNonAbstractType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
template<typename... Ts>
bool | RequireNonAbstractType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
void | DiagnoseAbstractType (const CXXRecordDecl *RD)
bool | CheckOverloadedOperatorDeclaration (FunctionDecl *FnDecl)
| CheckOverloadedOperatorDeclaration - Check whether the declaration of this overloaded operator is well-formed. More...
bool | CheckLiteralOperatorDeclaration (FunctionDecl *FnDecl)
| CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is well-formed. More...
void | FilterAcceptableTemplateNames (LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true)
bool | hasAnyAcceptableTemplateNames (LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true, bool AllowNonTemplateFunctions=false)
NamedDecl * | getAsTemplateNameDecl (NamedDecl *D, bool AllowFunctionTemplates=true, bool AllowDependent=true)
| Try to interpret the lookup result D as a template-name. More...
bool | LookupTemplateName (LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, SourceLocation TemplateKWLoc=SourceLocation(), AssumedTemplateKind *ATK=nullptr)
TemplateNameKind | isTemplateName (Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool &MemberOfUnknownSpecialization)
void | ActOnUndeclaredTypeTemplateName (Scope *S, TemplateTy &Name, TemplateNameKind &TNK, SourceLocation NameLoc, IdentifierInfo *&II)
| Try to resolve an undeclared template name as a type template. More...
bool | resolveAssumedTemplateNameAsType (Scope *S, TemplateName &Name, SourceLocation NameLoc, bool Diagnose=true)
bool | isDeductionGuideName (Scope *S, const IdentifierInfo &Name, SourceLocation NameLoc, ParsedTemplateTy *Template=nullptr)
| Determine whether a particular identifier might be the name in a C++1z deduction-guide declaration. More...
bool | DiagnoseUnknownTemplateName (const IdentifierInfo &II, SourceLocation IILoc, Scope *S, const CXXScopeSpec *SS, TemplateTy &SuggestedTemplate, TemplateNameKind &SuggestedKind)
bool | DiagnoseUninstantiableTemplate (SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain=true)
| Determine whether we would be unable to instantiate this template (because it either has no definition, or is in the process of being instantiated). More...
void | DiagnoseTemplateParameterShadow (SourceLocation Loc, Decl *PrevDecl)
| DiagnoseTemplateParameterShadow - Produce a diagnostic complaining that the template parameter 'PrevDecl' is being shadowed by a new declaration at location Loc. More...
TemplateDecl * | AdjustDeclIfTemplate (Decl *&Decl)
| AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference the templated declaration and return a pointer to the template declaration. More...
NamedDecl * | ActOnTypeParameter (Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg, bool HasTypeConstraint)
| ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed. More...
bool | ActOnTypeConstraint (const CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
bool | AttachTypeConstraint (NestedNameSpecifierLoc NS, DeclarationNameInfo NameInfo, ConceptDecl *NamedConcept, const TemplateArgumentListInfo *TemplateArgs, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
| Attach a type-constraint to a template parameter. More...
bool | AttachTypeConstraint (AutoTypeLoc TL, NonTypeTemplateParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
QualType | CheckNonTypeTemplateParameterType (TypeSourceInfo *&TSI, SourceLocation Loc)
| Check that the type of a non-type template parameter is well-formed. More...
QualType | CheckNonTypeTemplateParameterType (QualType T, SourceLocation Loc)
NamedDecl * | ActOnNonTypeTemplateParameter (Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg)
NamedDecl * | ActOnTemplateTemplateParameter (Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument DefaultArg)
| ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e.g. More...
TemplateParameterList * | ActOnTemplateParameterList (unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl *> Params, SourceLocation RAngleLoc, Expr *RequiresClause)
| ActOnTemplateParameterList - Builds a TemplateParameterList, optionally constrained by RequiresClause, that contains the template parameters in Params. More...
bool | CheckTemplateParameterList (TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody=nullptr)
| Checks the validity of a template parameter list, possibly considering the template parameter list from a previous declaration. More...
TemplateParameterList * | MatchTemplateParametersToScopeSpecifier (SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef< TemplateParameterList *> ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic=false)
| Match the given template parameter lists to the given scope specifier, returning the template parameter list that applies to the name. More...
DeclResult | CheckClassTemplate (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody=nullptr)
TemplateArgumentLoc | getTrivialTemplateArgumentLoc (const TemplateArgument &Arg, QualType NTTPType, SourceLocation Loc)
| Allocate a TemplateArgumentLoc where all locations have been initialized to the given location. More...
TemplateArgumentLoc | getIdentityTemplateArgumentLoc (Decl *Param, SourceLocation Location)
| Get a template argument mapping the given template parameter to itself, e.g. More...
void | translateTemplateArguments (const ASTTemplateArgsPtr &In, TemplateArgumentListInfo &Out)
| Translates template arguments as provided by the parser into template arguments used by semantic analysis. More...
ParsedTemplateArgument | ActOnTemplateTypeArgument (TypeResult ParsedType)
| Convert a parsed type into a parsed template argument. More...
void | NoteAllFoundTemplates (TemplateName Name)
QualType | CheckTemplateIdType (TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs)
TypeResult | ActOnTemplateIdType (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy Template, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, bool IsCtorOrDtorName=false, bool IsClassName=false)
TypeResult | ActOnTagTemplateIdType (TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc)
| Parsed an elaborated-type-specifier that refers to a template-id, such as `class` T::template apply<U>. More...
DeclResult | ActOnVarTemplateSpecialization (Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization)
DeclResult | CheckVarTemplateId (VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs)
ExprResult | CheckVarTemplateId (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, VarTemplateDecl *Template, SourceLocation TemplateLoc, const TemplateArgumentListInfo *TemplateArgs)
ExprResult | CheckConceptTemplateId (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &ConceptNameInfo, NamedDecl *FoundDecl, ConceptDecl *NamedConcept, const TemplateArgumentListInfo *TemplateArgs)
void | diagnoseMissingTemplateArguments (TemplateName Name, SourceLocation Loc)
ExprResult | BuildTemplateIdExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs)
ExprResult | BuildQualifiedTemplateIdExpr (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
TemplateNameKind | ActOnDependentTemplateName (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool AllowInjectedClassName=false)
| Form a dependent template name. More...
DeclResult | ActOnClassTemplateSpecialization (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody=nullptr)
bool | CheckTemplatePartialSpecializationArgs (SourceLocation Loc, TemplateDecl *PrimaryTemplate, unsigned NumExplicitArgs, ArrayRef< TemplateArgument > Args)
| Check the non-type template arguments of a class template partial specialization according to C++ [temp.class.spec]p9. More...
void | CheckTemplatePartialSpecialization (ClassTemplatePartialSpecializationDecl *Partial)
void | CheckTemplatePartialSpecialization (VarTemplatePartialSpecializationDecl *Partial)
Decl * | ActOnTemplateDeclarator (Scope *S, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
bool | CheckSpecializationInstantiationRedecl (SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPtOfInstantiation, bool &SuppressNew)
| Diagnose cases where we have an explicit template specialization before/after an explicit template instantiation, producing diagnostics for those cases where they are required and determining whether the new specialization/instantiation will have any effect. More...
bool | CheckDependentFunctionTemplateSpecialization (FunctionDecl *FD, const TemplateArgumentListInfo &ExplicitTemplateArgs, LookupResult &Previous)
| Perform semantic analysis for the given dependent function template specialization. More...
bool | CheckFunctionTemplateSpecialization (FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous, bool QualifiedFriend=false)
| Perform semantic analysis for the given function template specialization. More...
bool | CheckMemberSpecialization (NamedDecl *Member, LookupResult &Previous)
| Perform semantic analysis for the given non-template member specialization. More...
void | CompleteMemberSpecialization (NamedDecl *Member, LookupResult &Previous)
DeclResult | ActOnExplicitInstantiation (Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy Template, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, const ParsedAttributesView &Attr)
DeclResult | ActOnExplicitInstantiation (Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr)
DeclResult | ActOnExplicitInstantiation (Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D)
TemplateArgumentLoc | SubstDefaultTemplateArgumentIfAvailable (TemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, Decl *Param, SmallVectorImpl< TemplateArgument > &Converted, bool &HasDefaultArg)
| If the given template parameter has a default template argument, substitute into that default template argument and return the corresponding template argument. More...
bool | CheckTemplateArgument (NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl< TemplateArgument > &Converted, CheckTemplateArgumentKind CTAK=CTAK_Specified)
| Check that the given template argument corresponds to the given template parameter. More...
bool | CheckTemplateArgumentList (TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl< TemplateArgument > &Converted, bool UpdateArgsWithConversions=true, bool *ConstraintsNotSatisfied=nullptr)
| Check that the given template arguments can be be provided to the given template, converting the arguments along the way. More...
bool | CheckTemplateTypeArgument (TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &Converted)
bool | CheckTemplateArgument (TemplateTypeParmDecl *Param, TypeSourceInfo *Arg)
| Check a template argument against its corresponding template type parameter. More...
ExprResult | CheckTemplateArgument (NonTypeTemplateParmDecl *Param, QualType InstantiatedParamType, Expr *Arg, TemplateArgument &Converted, CheckTemplateArgumentKind CTAK=CTAK_Specified)
| Check a template argument against its corresponding non-type template parameter. More...
bool | CheckTemplateTemplateArgument (TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg)
| Check a template argument against its corresponding template template parameter. More...
ExprResult | BuildExpressionFromDeclTemplateArgument (const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc)
| Given a non-type template argument that refers to a declaration and the type of its corresponding non-type template parameter, produce an expression that properly refers to that declaration. More...
ExprResult | BuildExpressionFromIntegralTemplateArgument (const TemplateArgument &Arg, SourceLocation Loc)
| Construct a new expression that refers to the given integral template argument with the given source-location information. More...
bool | TemplateParameterListsAreEqual (TemplateParameterList *New, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation())
| Determine whether the given template parameter lists are equivalent. More...
bool | CheckTemplateDeclScope (Scope *S, TemplateParameterList *TemplateParams)
| Check whether a template can be declared within this scope. More...
TypeResult | ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc)
| Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type". More...
TypeResult | ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, SourceLocation TemplateLoc, TemplateTy TemplateName, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc)
| Called when the parser has parsed a C++ typename specifier that ends in a template-id, e.g., "typename MetaFun::template apply<T1, T2>". More...
QualType | CheckTypenameType (ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, TypeSourceInfo **TSI, bool DeducedTSTContext)
QualType | CheckTypenameType (ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext=true)
| Build the type that describes a C++ typename specifier, e.g., "typename T::type". More...
TypeSourceInfo * | RebuildTypeInCurrentInstantiation (TypeSourceInfo *T, SourceLocation Loc, DeclarationName Name)
| Rebuilds a type within the context of the current instantiation. More...
bool | RebuildNestedNameSpecifierInCurrentInstantiation (CXXScopeSpec &SS)
ExprResult | RebuildExprInCurrentInstantiation (Expr *E)
bool | RebuildTemplateParamsInCurrentInstantiation (TemplateParameterList *Params)
| Rebuild the template parameters now that we know we're in a current instantiation. More...
std::string | getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgumentList &Args)
| Produces a formatted string that describes the binding of template parameters to template arguments. More...
std::string | getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgument *Args, unsigned NumArgs)
Decl * | ActOnConceptDefinition (Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr)
RequiresExprBodyDecl * | ActOnStartRequiresExpr (SourceLocation RequiresKWLoc, ArrayRef< ParmVarDecl *> LocalParameters, Scope *BodyScope)
void | ActOnFinishRequiresExpr ()
concepts::Requirement * | ActOnSimpleRequirement (Expr *E)
concepts::Requirement * | ActOnTypeRequirement (SourceLocation TypenameKWLoc, CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo *TypeName, TemplateIdAnnotation *TemplateId)
concepts::Requirement * | ActOnCompoundRequirement (Expr *E, SourceLocation NoexceptLoc)
concepts::Requirement * | ActOnCompoundRequirement (Expr *E, SourceLocation NoexceptLoc, CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, unsigned Depth)
concepts::Requirement * | ActOnNestedRequirement (Expr *Constraint)
concepts::ExprRequirement * | BuildExprRequirement (Expr *E, bool IsSatisfied, SourceLocation NoexceptLoc, concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement)
concepts::ExprRequirement * | BuildExprRequirement (concepts::Requirement::SubstitutionDiagnostic *ExprSubstDiag, bool IsSatisfied, SourceLocation NoexceptLoc, concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement)
concepts::TypeRequirement * | BuildTypeRequirement (TypeSourceInfo *Type)
concepts::TypeRequirement * | BuildTypeRequirement (concepts::Requirement::SubstitutionDiagnostic *SubstDiag)
concepts::NestedRequirement * | BuildNestedRequirement (Expr *E)
concepts::NestedRequirement * | BuildNestedRequirement (concepts::Requirement::SubstitutionDiagnostic *SubstDiag)
ExprResult | ActOnRequiresExpr (SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, ArrayRef< ParmVarDecl *> LocalParameters, ArrayRef< concepts::Requirement *> Requirements, SourceLocation ClosingBraceLoc)
bool | isUnexpandedParameterPackPermitted ()
| Determine whether an unexpanded parameter pack might be permitted in this location. More...
bool | DiagnoseUnexpandedParameterPacks (SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef< UnexpandedParameterPack > Unexpanded)
| Diagnose unexpanded parameter packs. More...
bool | DiagnoseUnexpandedParameterPack (SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC)
| If the given type contains an unexpanded parameter pack, diagnose the error. More...
bool | DiagnoseUnexpandedParameterPack (Expr *E, UnexpandedParameterPackContext UPPC=UPPC_Expression)
| If the given expression contains an unexpanded parameter pack, diagnose the error. More...
bool | DiagnoseUnexpandedParameterPack (const CXXScopeSpec &SS, UnexpandedParameterPackContext UPPC)
| If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error. More...
bool | DiagnoseUnexpandedParameterPack (const DeclarationNameInfo &NameInfo, UnexpandedParameterPackContext UPPC)
| If the given name contains an unexpanded parameter pack, diagnose the error. More...
bool | DiagnoseUnexpandedParameterPack (SourceLocation Loc, TemplateName Template, UnexpandedParameterPackContext UPPC)
| If the given template name contains an unexpanded parameter pack, diagnose the error. More...
bool | DiagnoseUnexpandedParameterPack (TemplateArgumentLoc Arg, UnexpandedParameterPackContext UPPC)
| If the given template argument contains an unexpanded parameter pack, diagnose the error. More...
void | collectUnexpandedParameterPacks (TemplateArgument Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
| Collect the set of unexpanded parameter packs within the given template argument. More...
void | collectUnexpandedParameterPacks (TemplateArgumentLoc Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
| Collect the set of unexpanded parameter packs within the given template argument. More...
void | collectUnexpandedParameterPacks (QualType T, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
| Collect the set of unexpanded parameter packs within the given type. More...
void | collectUnexpandedParameterPacks (TypeLoc TL, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
| Collect the set of unexpanded parameter packs within the given type. More...
void | collectUnexpandedParameterPacks (NestedNameSpecifierLoc NNS, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
| Collect the set of unexpanded parameter packs within the given nested-name-specifier. More...
void | collectUnexpandedParameterPacks (const DeclarationNameInfo &NameInfo, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
| Collect the set of unexpanded parameter packs within the given name. More...
ParsedTemplateArgument | ActOnPackExpansion (const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc)
| Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion. More...
TypeResult | ActOnPackExpansion (ParsedType Type, SourceLocation EllipsisLoc)
| Invoked when parsing a type followed by an ellipsis, which creates a pack expansion. More...
TypeSourceInfo * | CheckPackExpansion (TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
| Construct a pack expansion type from the pattern of the pack expansion. More...
QualType | CheckPackExpansion (QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
| Construct a pack expansion type from the pattern of the pack expansion. More...
ExprResult | ActOnPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc)
| Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion. More...
ExprResult | CheckPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
| Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion. More...
bool | CheckParameterPacksForExpansion (SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, Optional< unsigned > &NumExpansions)
| Determine whether we could expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern. More...
Optional< unsigned > | getNumArgumentsInExpansion (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs)
| Determine the number of arguments in the given pack expansion type. More...
bool | containsUnexpandedParameterPacks (Declarator &D)
| Determine whether the given declarator contains any unexpanded parameter packs. More...
TemplateArgumentLoc | getTemplateArgumentPackExpansionPattern (TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, Optional< unsigned > &NumExpansions) const
| Returns the pattern of the pack expansion for a template argument. More...
Optional< unsigned > | getFullyPackExpandedSize (TemplateArgument Arg)
| Given a template argument that contains an unexpanded parameter pack, but which has already been substituted, attempt to determine the number of elements that will be produced once this argument is fully-expanded. More...
QualType | adjustCCAndNoReturn (QualType ArgFunctionType, QualType FunctionType, bool AdjustExceptionSpec=false)
| Adjust the type `ArgFunctionType` to match the calling convention, noreturn, and optionally the exception specification of `FunctionType`. More...
TemplateDeductionResult | DeduceTemplateArguments (ClassTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
| Perform template argument deduction to determine whether the given template arguments match the given class template partial specialization per C++ [temp.class.spec.match]. More...
TemplateDeductionResult | DeduceTemplateArguments (VarTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
| Perform template argument deduction to determine whether the given template arguments match the given variable template partial specialization per C++ [temp.class.spec.match]. More...
TemplateDeductionResult | SubstituteExplicitTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo &ExplicitTemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, SmallVectorImpl< QualType > &ParamTypes, QualType *FunctionType, sema::TemplateDeductionInfo &Info)
| Substitute the explicitly-provided template arguments into the given function template according to C++ [temp.arg.explicit]. More...
TemplateDeductionResult | FinishTemplateArgumentDeduction (FunctionTemplateDecl *FunctionTemplate, SmallVectorImpl< DeducedTemplateArgument > &Deduced, unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, SmallVectorImpl< OriginalCallArg > const *OriginalCallArgs=nullptr, bool PartialOverloading=false, llvm::function_ref< bool()> CheckNonDependent=[]{ return false;})
| Finish template argument deduction for a function template, checking the deduced template arguments for completeness and forming the function template specialization. More...
TemplateDeductionResult | DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr *> Args, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool PartialOverloading, llvm::function_ref< bool(ArrayRef< QualType >)> CheckNonDependent)
| Perform template argument deduction from a function call (C++ [temp.deduct.call]). More...
TemplateDeductionResult | DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ArgFunctionType, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool IsAddressOfFunction=false)
| Deduce template arguments when taking the address of a function template (C++ [temp.deduct.funcaddr]) or matching a specialization to a template. More...
TemplateDeductionResult | DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, QualType ToType, CXXConversionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
| Deduce template arguments for a templated conversion function (C++ [temp.deduct.conv]) and, if successful, produce a conversion function template specialization. More...
TemplateDeductionResult | DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool IsAddressOfFunction=false)
| Deduce template arguments for a function template when there is nothing to deduce against (C++0x [temp.arg.explicit]p3). More...
QualType | SubstAutoType (QualType TypeWithAuto, QualType Replacement)
| Substitute Replacement for `auto` in `TypeWithAuto`. More...
TypeSourceInfo * | SubstAutoTypeSourceInfo (TypeSourceInfo *TypeWithAuto, QualType Replacement)
| Substitute Replacement for auto in TypeWithAuto. More...
QualType | ReplaceAutoType (QualType TypeWithAuto, QualType Replacement)
| Completely replace the `auto` in `TypeWithAuto` by `Replacement`. More...
DeduceAutoResult | DeduceAutoType (TypeSourceInfo *AutoType, Expr *&Initializer, QualType &Result, Optional< unsigned > DependentDeductionDepth=None, bool IgnoreConstraints=false)
DeduceAutoResult | DeduceAutoType (TypeLoc AutoTypeLoc, Expr *&Initializer, QualType &Result, Optional< unsigned > DependentDeductionDepth=None, bool IgnoreConstraints=false)
| Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6) More...
void | DiagnoseAutoDeductionFailure (VarDecl *VDecl, Expr *Init)
bool | DeduceReturnType (FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true)
void | DeclareImplicitDeductionGuides (TemplateDecl *Template, SourceLocation Loc)
| Declare implicit deduction guides for a class template if we've not already done so. More...
QualType | DeduceTemplateSpecializationFromInitializer (TypeSourceInfo *TInfo, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Init)
QualType | deduceVarTypeFromInitializer (VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init)
TypeLoc | getReturnTypeLoc (FunctionDecl *FD) const
bool | DeduceFunctionTypeFromReturnExpr (FunctionDecl *FD, SourceLocation ReturnLoc, Expr *&RetExpr, AutoType *AT)
| Deduce the return type for a function from a returned expression, per C++1y [dcl.spec.auto]p6. More...
FunctionTemplateDecl * | getMoreSpecializedTemplate (FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, unsigned NumCallArguments2)
| Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]). More...
UnresolvedSetIterator | getMostSpecialized (UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplateSpecCandidateSet &FailedCandidates, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain=true, QualType TargetType=QualType())
| Retrieve the most specialized of the given function template specializations. More...
ClassTemplatePartialSpecializationDecl * | getMoreSpecializedPartialSpecialization (ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
| Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]). More...
bool | isMoreSpecializedThanPrimary (ClassTemplatePartialSpecializationDecl *T, sema::TemplateDeductionInfo &Info)
VarTemplatePartialSpecializationDecl * | getMoreSpecializedPartialSpecialization (VarTemplatePartialSpecializationDecl *PS1, VarTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
bool | isMoreSpecializedThanPrimary (VarTemplatePartialSpecializationDecl *T, sema::TemplateDeductionInfo &Info)
bool | isTemplateTemplateParameterAtLeastAsSpecializedAs (TemplateParameterList *PParam, TemplateDecl *AArg, SourceLocation Loc)
void | MarkUsedTemplateParameters (const Expr *E, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
| Mark which template parameters are used in a given expression. More...
void | MarkUsedTemplateParameters (const TemplateArgumentList &TemplateArgs, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
| Mark which template parameters can be deduced from a given template argument list. More...
void | MarkDeducedTemplateParameters (const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
MultiLevelTemplateArgumentList | getTemplateInstantiationArgs (NamedDecl *D, const TemplateArgumentList *Innermost=nullptr, bool RelativeToPrimary=false, const FunctionDecl *Pattern=nullptr)
| Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration. More...
llvm::DenseSet< Module * > & | getLookupModules ()
| Get the set of additional modules that should be checked during name lookup. More...
void | pushCodeSynthesisContext (CodeSynthesisContext Ctx)
void | popCodeSynthesisContext ()
bool | inTemplateInstantiation () const
| Determine whether we are currently performing template instantiation. More...
void | PrintContextStack ()
void | PrintInstantiationStack ()
| Prints the current instantiation stack through a series of notes. More...
void | PrintPragmaAttributeInstantiationPoint ()
Optional< sema::TemplateDeductionInfo * > | isSFINAEContext () const
| Determines whether we are currently in a context where template argument substitution failures are not considered errors. More...
bool | isUnevaluatedContext () const
| Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5. More...
void | PerformPendingInstantiations (bool LocalOnly=false)
| Performs template instantiation for all implicit template instantiations we have seen until this point. More...
TypeSourceInfo * | SubstType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, bool AllowDeducedTST=false)
| Perform substitution on the type T with a given set of template arguments. More...
QualType | SubstType (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
| Deprecated form of the above. More...
TypeSourceInfo * | SubstType (TypeLoc TL, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
TypeSourceInfo * | SubstFunctionDeclType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext, Qualifiers ThisTypeQuals)
| A form of SubstType intended specifically for instantiating the type of a FunctionDecl. More...
void | SubstExceptionSpec (FunctionDecl *New, const FunctionProtoType *Proto, const MultiLevelTemplateArgumentList &Args)
bool | SubstExceptionSpec (SourceLocation Loc, FunctionProtoType::ExceptionSpecInfo &ESI, SmallVectorImpl< QualType > &ExceptionStorage, const MultiLevelTemplateArgumentList &Args)
ParmVarDecl * | SubstParmVarDecl (ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, Optional< unsigned > NumExpansions, bool ExpectParameterPack)
bool | SubstParmTypes (SourceLocation Loc, ArrayRef< ParmVarDecl *> Params, const FunctionProtoType::ExtParameterInfo *ExtParamInfos, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< QualType > &ParamTypes, SmallVectorImpl< ParmVarDecl *> *OutParams, ExtParameterInfoBuilder &ParamInfos)
| Substitute the given template arguments into the given set of parameters, producing the set of parameter types that would be generated from such a substitution. More...
ExprResult | SubstExpr (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
bool | SubstExprs (ArrayRef< Expr *> Exprs, bool IsCall, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< Expr *> &Outputs)
| Substitute the given template arguments into a list of expressions, expanding pack expansions if required. More...
StmtResult | SubstStmt (Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs)
TemplateParameterList * | SubstTemplateParams (TemplateParameterList *Params, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
bool | SubstTemplateArguments (ArrayRef< TemplateArgumentLoc > Args, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateArgumentListInfo &Outputs)
Decl * | SubstDecl (Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
FunctionDecl * | SubstSpaceshipAsEqualEqual (CXXRecordDecl *RD, FunctionDecl *Spaceship)
| Substitute the name and return type of a defaulted 'operator<=>' to form an implicit 'operator=='. More...
ExprResult | SubstInitializer (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs, bool CXXDirectInit)
bool | SubstBaseSpecifiers (CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
| Perform substitution on the base class specifiers of the given class template specialization. More...
bool | InstantiateClass (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true)
| Instantiate the definition of a class from a given pattern. More...
bool | InstantiateEnum (SourceLocation PointOfInstantiation, EnumDecl *Instantiation, EnumDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
| Instantiate the definition of an enum from a given pattern. More...
bool | InstantiateInClassInitializer (SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
| Instantiate the definition of a field from the given pattern. More...
void | InstantiateAttrs (const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
void | InstantiateAttrsForDecl (const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
bool | usesPartialOrExplicitSpecialization (SourceLocation Loc, ClassTemplateSpecializationDecl *ClassTemplateSpec)
bool | InstantiateClassTemplateSpecialization (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK, bool Complain=true)
void | InstantiateClassMembers (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
| Instantiates the definitions of all of the member of the given class, which is an instantiation of a class template or a member class of a template. More...
void | InstantiateClassTemplateSpecializationMembers (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK)
| Instantiate the definitions of all of the members of the given class template specialization, which was named as part of an explicit instantiation. More...
NestedNameSpecifierLoc | SubstNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS, const MultiLevelTemplateArgumentList &TemplateArgs)
DeclarationNameInfo | SubstDeclarationNameInfo (const DeclarationNameInfo &NameInfo, const MultiLevelTemplateArgumentList &TemplateArgs)
| Do template substitution on declaration name info. More...
TemplateName | SubstTemplateName (NestedNameSpecifierLoc QualifierLoc, TemplateName Name, SourceLocation Loc, const MultiLevelTemplateArgumentList &TemplateArgs)
bool | Subst (const TemplateArgumentLoc *Args, unsigned NumArgs, TemplateArgumentListInfo &Result, const MultiLevelTemplateArgumentList &TemplateArgs)
void | InstantiateExceptionSpec (SourceLocation PointOfInstantiation, FunctionDecl *Function)
bool | CheckInstantiatedFunctionTemplateConstraints (SourceLocation PointOfInstantiation, FunctionDecl *Decl, ArrayRef< TemplateArgument > TemplateArgs, ConstraintSatisfaction &Satisfaction)
FunctionDecl * | InstantiateFunctionDeclaration (FunctionTemplateDecl *FTD, const TemplateArgumentList *Args, SourceLocation Loc)
| Instantiate (or find existing instantiation of) a function template with a given set of template arguments. More...
void | InstantiateFunctionDefinition (SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive=false, bool DefinitionRequired=false, bool AtEndOfTU=false)
| Instantiate the definition of the given function from its template. More...
VarTemplateSpecializationDecl * | BuildVarTemplateInstantiation (VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList &TemplateArgList, const TemplateArgumentListInfo &TemplateArgsInfo, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, void *InsertPos, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr)
VarTemplateSpecializationDecl * | CompleteVarTemplateSpecializationDecl (VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs)
| Instantiates a variable template specialization by completing it with appropriate type information and initializer. More...
void | BuildVariableInstantiation (VarDecl *NewVar, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs, LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, bool InstantiatingVarTemplate=false, VarTemplateSpecializationDecl *PrevVTSD=nullptr)
| BuildVariableInstantiation - Used after a new variable has been created. More...
VarDecl * | getVarTemplateSpecialization (VarTemplateDecl *VarTempl, const TemplateArgumentListInfo *TemplateArgs, const DeclarationNameInfo &MemberNameInfo, SourceLocation TemplateKWLoc)
void | InstantiateVariableInitializer (VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs)
| Instantiate the initializer of a variable. More...
void | InstantiateVariableDefinition (SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false, bool AtEndOfTU=false)
| Instantiate the definition of the given variable from its template. More...
void | InstantiateMemInitializers (CXXConstructorDecl *New, const CXXConstructorDecl *Tmpl, const MultiLevelTemplateArgumentList &TemplateArgs)
NamedDecl * | FindInstantiatedDecl (SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext=false)
| Find the instantiation of the given declaration within the current instantiation. More...
DeclContext * | FindInstantiatedContext (SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs)
| Finds the instantiation of the given declaration context within the current instantiation. More...
ObjCContainerKind | getObjCContainerKind () const
DeclResult | actOnObjCTypeParam (Scope *S, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, IdentifierInfo *paramName, SourceLocation paramLoc, SourceLocation colonLoc, ParsedType typeBound)
ObjCTypeParamList * | actOnObjCTypeParamList (Scope *S, SourceLocation lAngleLoc, ArrayRef< Decl *> typeParams, SourceLocation rAngleLoc)
void | popObjCTypeParamList (Scope *S, ObjCTypeParamList *typeParamList)
Decl * | ActOnStartClassInterface (Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
void | ActOnSuperClassOfClassInterface (Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange)
void | ActOnTypedefedProtocols (SmallVectorImpl< Decl *> &ProtocolRefs, SmallVectorImpl< SourceLocation > &ProtocolLocs, IdentifierInfo *SuperName, SourceLocation SuperLoc)
| ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualified super class and adds them to the list of the protocols. More...
Decl * | ActOnCompatibilityAlias (SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation)
| ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias declaration. More...
bool | CheckForwardProtocolDeclarationForCircularDependency (IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList)
Decl * | ActOnStartProtocolInterface (SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
Decl * | ActOnStartCategoryInterface (SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
Decl * | ActOnStartClassImplementation (SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &AttrList)
Decl * | ActOnStartCategoryImplementation (SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &AttrList)
| ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration and build an ObjCCategoryImplDecl object. More...
DeclGroupPtrTy | ActOnFinishObjCImplementation (Decl *ObjCImpDecl, ArrayRef< Decl *> Decls)
DeclGroupPtrTy | ActOnForwardClassDeclaration (SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef< ObjCTypeParamList *> TypeParamLists, unsigned NumElts)
DeclGroupPtrTy | ActOnForwardProtocolDeclaration (SourceLocation AtProtoclLoc, ArrayRef< IdentifierLocPair > IdentList, const ParsedAttributesView &attrList)
| ActOnForwardProtocolDeclaration - Handle @protocol foo;. More...
void | FindProtocolDeclaration (bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef< IdentifierLocPair > ProtocolId, SmallVectorImpl< Decl *> &Protocols)
| FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declared. More...
void | DiagnoseTypeArgsAndProtocols (IdentifierInfo *ProtocolId, SourceLocation ProtocolLoc, IdentifierInfo *TypeArgId, SourceLocation TypeArgLoc, bool SelectProtocolFirst=false)
void | actOnObjCTypeArgsOrProtocolQualifiers (Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef< IdentifierInfo *> identifiers, ArrayRef< SourceLocation > identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl< ParsedType > &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl< Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols)
| Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol qualifiers or type arguments, as appropriate. More...
TypeResult | actOnObjCProtocolQualifierType (SourceLocation lAngleLoc, ArrayRef< Decl *> protocols, ArrayRef< SourceLocation > protocolLocs, SourceLocation rAngleLoc)
| Build a an Objective-C protocol-qualified 'id' type where no base type was specified. More...
TypeResult | actOnObjCTypeArgsAndProtocolQualifiers (Scope *S, SourceLocation Loc, ParsedType BaseType, SourceLocation TypeArgsLAngleLoc, ArrayRef< ParsedType > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< Decl *> Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc)
| Build a specialized and/or protocol-qualified Objective-C type. More...
QualType | BuildObjCTypeParamType (const ObjCTypeParamDecl *Decl, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl *> Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
| Build an Objective-C type parameter type. More...
QualType | BuildObjCObjectType (QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo *> TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl *> Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
| Build an Objective-C object pointer type. More...
void | CheckObjCPropertyAttributes (Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass)
| Ensure attributes are consistent with type. More...
void | ProcessPropertyDecl (ObjCPropertyDecl *property)
| Process the specified property declaration and create decls for the setters and getters as needed. More...
void | DiagnosePropertyMismatch (ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty)
| DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a variety of inconsistencies. More...
void | DiagnoseClassExtensionDupMethods (ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
| DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension. More...
Decl * | ActOnAtEnd (Scope *S, SourceRange AtEnd, ArrayRef< Decl *> allMethods=None, ArrayRef< DeclGroupPtrTy > allTUVars=None)
Decl * | ActOnProperty (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
Decl * | ActOnPropertyImplDecl (Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool ImplKind, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind)
| ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property implementation declaration; declared as @synthesize or @dynamic. More...
Decl * | ActOnMethodDeclaration (Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, const ParsedAttributesView &AttrList, tok::ObjCKeywordKind MethodImplKind, bool isVariadic, bool MethodDefinition)
bool | CheckARCMethodDecl (ObjCMethodDecl *method)
| Check a method declaration for compatibility with the Objective-C ARC conventions. More...
bool | inferObjCARCLifetime (ValueDecl *decl)
void | deduceOpenCLAddressSpace (ValueDecl *decl)
bool | ConversionToObjCStringLiteralCheck (QualType DstType, Expr *&SrcExpr, bool Diagnose=true)
bool | checkInitMethod (ObjCMethodDecl *method, QualType receiverTypeIfCall)
| Check whether the given method, which must be in the 'init' family, is a valid member of that family. More...
void | CheckObjCMethodOverride (ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden)
| Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited. More...
void | CheckObjCMethodDirectOverrides (ObjCMethodDecl *method, ObjCMethodDecl *overridden)
void | CheckObjCMethodOverrides (ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC)
void | ActOnPragmaClangSection (SourceLocation PragmaLoc, PragmaClangSectionAction Action, PragmaClangSectionKind SecKind, StringRef SecName)
| ActOnPragmaClangSection - Called on well formed #pragma clang section. More...
void | ActOnPragmaOptionsAlign (PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc)
| ActOnPragmaOptionsAlign - Called on well formed #pragma options align. More...
void | ActOnPragmaPack (SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *Alignment)
| ActOnPragmaPack - Called on well formed #pragma pack(...). More...
void | DiagnoseNonDefaultPragmaPack (PragmaPackDiagnoseKind Kind, SourceLocation IncludeLoc)
void | DiagnoseUnterminatedPragmaPack ()
void | ActOnPragmaMSStruct (PragmaMSStructKind Kind)
| ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off]. More...
void | ActOnPragmaMSComment (SourceLocation CommentLoc, PragmaMSCommentKind Kind, StringRef Arg)
| ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg"). More...
void | ActOnPragmaMSPointersToMembers (LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc)
| ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation method[, general purpose representation]). More...
void | ActOnPragmaMSVtorDisp (PragmaMsStackAction Action, SourceLocation PragmaLoc, MSVtorDispMode Value)
| Called on well formed #pragma vtordisp(). More...
bool | UnifySection (StringRef SectionName, int SectionFlags, DeclaratorDecl *TheDecl)
bool | UnifySection (StringRef SectionName, int SectionFlags, SourceLocation PragmaSectionLocation)
void | ActOnPragmaMSSeg (SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName)
| Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg. More...
void | ActOnPragmaMSSection (SourceLocation PragmaLocation, int SectionFlags, StringLiteral *SegmentName)
| Called on well formed #pragma section(). More...
void | ActOnPragmaMSInitSeg (SourceLocation PragmaLocation, StringLiteral *SegmentName)
| Called on well-formed #pragma init_seg(). More...
void | ActOnPragmaDump (Scope *S, SourceLocation Loc, IdentifierInfo *II)
| Called on #pragma clang __debug dump II. More...
void | ActOnPragmaDetectMismatch (SourceLocation Loc, StringRef Name, StringRef Value)
| ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch. More...
void | ActOnPragmaUnused (const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc)
| ActOnPragmaUnused - Called on well-formed '#pragma unused'. More...
void | ActOnPragmaVisibility (const IdentifierInfo *VisType, SourceLocation PragmaLoc)
| ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... . More...
NamedDecl * | DeclClonePragmaWeak (NamedDecl *ND, IdentifierInfo *II, SourceLocation Loc)
void | DeclApplyPragmaWeak (Scope *S, NamedDecl *ND, WeakInfo &W)
void | ActOnPragmaWeakID (IdentifierInfo *WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc)
| ActOnPragmaWeakID - Called on well formed #pragma weak ident. More...
void | ActOnPragmaRedefineExtname (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
| ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname. More...
void | ActOnPragmaWeakAlias (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
| ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident. More...
void | ActOnPragmaFPContract (LangOptions::FPContractModeKind FPC)
| ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT and #pragma clang fp contract. More...
void | ActOnPragmaFEnvAccess (LangOptions::FEnvAccessModeKind FPC)
| ActOnPragmaFenvAccess - Called on well formed #pragma STDC FENV_ACCESS. More...
void | AddAlignmentAttributesForRecord (RecordDecl *RD)
| AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl, to handle '#pragma pack' and '#pragma options align'. More...
void | AddMsStructLayoutForRecord (RecordDecl *RD)
| AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record. More...
void | FreePackedContext ()
| FreePackedContext - Deallocate and null out PackContext. More...
void | PushNamespaceVisibilityAttr (const VisibilityAttr *Attr, SourceLocation Loc)
| PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute. More...
void | AddPushedVisibilityAttribute (Decl *RD)
| AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute. More...
void | PopPragmaVisibility (bool IsNamespaceEnd, SourceLocation EndLoc)
| PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' and visibility attributes on namespaces. More...
void | FreeVisContext ()
| FreeVisContext - Deallocate and null out VisContext. More...
void | AddCFAuditedAttribute (Decl *D)
| AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and, if so, consider adding the appropriate attribute. More...
void | ActOnPragmaAttributeAttribute (ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules)
void | ActOnPragmaAttributeEmptyPush (SourceLocation PragmaLoc, const IdentifierInfo *Namespace)
void | ActOnPragmaAttributePop (SourceLocation PragmaLoc, const IdentifierInfo *Namespace)
| Called on well-formed '#pragma clang attribute pop'. More...
void | AddPragmaAttributes (Scope *S, Decl *D)
| Adds the attributes that have been specified using the '#pragma clang attribute push' directives to the given declaration. More...
void | DiagnoseUnterminatedPragmaAttribute ()
void | ActOnPragmaOptimize (bool On, SourceLocation PragmaLoc)
| Called on well formed #pragma clang optimize. More...
SourceLocation | getOptimizeOffPragmaLocation () const
| Get the location for the currently active "\#pragma clang optimize off". If this location is invalid, then the state of the pragma is "on". More...
void | AddRangeBasedOptnone (FunctionDecl *FD)
| Only called on function definitions; if there is a pragma in scope with the effect of a range-based optnone, consider marking the function with attribute optnone. More...
void | AddOptnoneAttributeIfNoConflicts (FunctionDecl *FD, SourceLocation Loc)
| Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents the location causing the 'optnone' attribute to be added (usually because of a pragma). More...
void | AddAlignedAttr (Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion)
| AddAlignedAttr - Adds an aligned attribute to a particular declaration. More...
void | AddAlignedAttr (Decl *D, const AttributeCommonInfo &CI, TypeSourceInfo *T, bool IsPackExpansion)
void | AddAssumeAlignedAttr (Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE)
| AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration. More...
void | AddAllocAlignAttr (Decl *D, const AttributeCommonInfo &CI, Expr *ParamExpr)
| AddAllocAlignAttr - Adds an alloc_align attribute to a particular declaration. More...
void | AddAlignValueAttr (Decl *D, const AttributeCommonInfo &CI, Expr *E)
| AddAlignValueAttr - Adds an align_value attribute to a particular declaration. More...
void | AddLaunchBoundsAttr (Decl *D, const AttributeCommonInfo &CI, Expr *MaxThreads, Expr *MinBlocks)
| AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration. More...
void | AddModeAttr (Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name, bool InInstantiation=false)
| AddModeAttr - Adds a mode attribute to a particular declaration. More...
void | AddParameterABIAttr (Decl *D, const AttributeCommonInfo &CI, ParameterABI ABI)
void | AddXConsumedAttr (Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation)
void | addAMDGPUFlatWorkGroupSizeAttr (Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
| addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size attribute to a particular declaration. More...
void | addAMDGPUWavesPerEUAttr (Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
| addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a particular declaration. More...
bool | checkNSReturnsRetainedReturnType (SourceLocation loc, QualType type)
bool | ActOnCoroutineBodyStart (Scope *S, SourceLocation KwLoc, StringRef Keyword)
ExprResult | ActOnCoawaitExpr (Scope *S, SourceLocation KwLoc, Expr *E)
ExprResult | ActOnCoyieldExpr (Scope *S, SourceLocation KwLoc, Expr *E)
StmtResult | ActOnCoreturnStmt (Scope *S, SourceLocation KwLoc, Expr *E)
ExprResult | BuildResolvedCoawaitExpr (SourceLocation KwLoc, Expr *E, bool IsImplicit=false)
ExprResult | BuildUnresolvedCoawaitExpr (SourceLocation KwLoc, Expr *E, UnresolvedLookupExpr *Lookup)
ExprResult | BuildCoyieldExpr (SourceLocation KwLoc, Expr *E)
StmtResult | BuildCoreturnStmt (SourceLocation KwLoc, Expr *E, bool IsImplicit=false)
StmtResult | BuildCoroutineBodyStmt (CoroutineBodyStmt::CtorArgs)
bool | buildCoroutineParameterMoves (SourceLocation Loc)
VarDecl * | buildCoroutinePromise (SourceLocation Loc)
void | CheckCompletedCoroutineBody (FunctionDecl *FD, Stmt *&Body)
ClassTemplateDecl * | lookupCoroutineTraits (SourceLocation KwLoc, SourceLocation FuncLoc)
llvm::StringRef | getCurrentOpenCLExtension () const
std::string | getOpenCLExtensionsFromDeclExtMap (FunctionDecl *FD)
| Check if a function declaration `FD` associates with any extensions present in OpenCLDeclExtMap and if so return the extension(s) name(s). More...
std::string | getOpenCLExtensionsFromTypeExtMap (FunctionType *FT)
| Check if a function type `FT` associates with any extensions present in OpenCLTypeExtMap and if so return the extension(s) name(s). More...
template<typename T , typename MapT >
std::string | getOpenCLExtensionsFromExtMap (T *FT, MapT &Map)
| Find an extension in an appropriate extension map and return its name. More...
void | setCurrentOpenCLExtension (llvm::StringRef Ext)
void | setOpenCLExtensionForType (QualType T, llvm::StringRef Exts)
| Set OpenCL extensions for a type which can only be used when these OpenCL extensions are enabled. More...
void | setOpenCLExtensionForDecl (Decl *FD, llvm::StringRef Exts)
| Set OpenCL extensions for a declaration which can only be used when these OpenCL extensions are enabled. More...
void | setCurrentOpenCLExtensionForType (QualType T)
| Set current OpenCL extensions for a type which can only be used when these OpenCL extensions are enabled. More...
void | setCurrentOpenCLExtensionForDecl (Decl *FD)
| Set current OpenCL extensions for a declaration which can only be used when these OpenCL extensions are enabled. More...
bool | isOpenCLDisabledDecl (Decl *FD)
bool | checkOpenCLDisabledTypeDeclSpec (const DeclSpec &DS, QualType T)
| Check if type `T` corresponding to declaration specifier `DS` is disabled due to required OpenCL extensions being disabled. More...
bool | checkOpenCLDisabledDecl (const NamedDecl &D, const Expr &E)
| Check if declaration `D` used by expression `E` is disabled due to required OpenCL extensions being disabled. More...
bool | areMultiversionVariantFunctionsCompatible (const FunctionDecl *OldFD, const FunctionDecl *NewFD, const PartialDiagnostic &NoProtoDiagID, const PartialDiagnosticAt &NoteCausedDiagIDAt, const PartialDiagnosticAt &NoSupportDiagIDAt, const PartialDiagnosticAt &DiffDiagIDAt, bool TemplatesSupported, bool ConstexprSupported, bool CLinkageMayDiffer)
| Checks if the variant/multiversion functions are compatible. More...
void | tryCaptureOpenMPLambdas (ValueDecl *V)
| Function tries to capture lambda's captured variables in the OpenMP region before the original lambda is captured. More...
bool | isOpenMPCapturedByRef (const ValueDecl *D, unsigned Level, unsigned OpenMPCaptureLevel) const
| Return true if the provided declaration VD should be captured by reference. More...
VarDecl * | isOpenMPCapturedDecl (ValueDecl *D, bool CheckScopeInfo=false, unsigned StopAt=0)
| Check if the specified variable is used in one of the private clauses (private, firstprivate, lastprivate, reduction etc.) in OpenMP constructs. More...
ExprResult | getOpenMPCapturedExpr (VarDecl *Capture, ExprValueKind VK, ExprObjectKind OK, SourceLocation Loc)
void | startOpenMPLoop ()
| If the current region is a loop-based region, mark the start of the loop construct. More...
void | startOpenMPCXXRangeFor ()
| If the current region is a range loop-based region, mark the start of the loop construct. More...
bool | isOpenMPPrivateDecl (const ValueDecl *D, unsigned Level) const
| Check if the specified variable is used in 'private' clause. More...
void | setOpenMPCaptureKind (FieldDecl *FD, const ValueDecl *D, unsigned Level)
| Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.) for `FD` based on DSA for the provided corresponding captured declaration `D`. More...
bool | isOpenMPTargetCapturedDecl (const ValueDecl *D, unsigned Level) const
| Check if the specified variable is captured by 'target' directive. More...
ExprResult | PerformOpenMPImplicitIntegerConversion (SourceLocation OpLoc, Expr *Op)
void | StartOpenMPDSABlock (OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
| Called on start of new data sharing attribute block. More...
void | StartOpenMPClause (OpenMPClauseKind K)
| Start analysis of clauses. More...
void | EndOpenMPClause ()
| End analysis of clauses. More...
void | EndOpenMPDSABlock (Stmt *CurDirective)
| Called on end of data sharing attribute block. More...
void | ActOnOpenMPLoopInitialization (SourceLocation ForLoc, Stmt *Init)
| Check if the current region is an OpenMP loop region and if it is, mark loop control variable, used in `Init` for loop initialization, as private by default. More...
ExprResult | ActOnOpenMPIdExpression (Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind)
| Called on correct id-expression from the '#pragma omp threadprivate'. More...
DeclGroupPtrTy | ActOnOpenMPThreadprivateDirective (SourceLocation Loc, ArrayRef< Expr *> VarList)
| Called on well-formed '#pragma omp threadprivate'. More...
OMPThreadPrivateDecl * | CheckOMPThreadPrivateDecl (SourceLocation Loc, ArrayRef< Expr *> VarList)
| Builds a new OpenMPThreadPrivateDecl and checks its correctness. More...
DeclGroupPtrTy | ActOnOpenMPAllocateDirective (SourceLocation Loc, ArrayRef< Expr *> VarList, ArrayRef< OMPClause *> Clauses, DeclContext *Owner=nullptr)
| Called on well-formed '#pragma omp allocate'. More...
DeclGroupPtrTy | ActOnOpenMPRequiresDirective (SourceLocation Loc, ArrayRef< OMPClause *> ClauseList)
| Called on well-formed '#pragma omp requires'. More...
OMPRequiresDecl * | CheckOMPRequiresDecl (SourceLocation Loc, ArrayRef< OMPClause *> Clauses)
| Check restrictions on Requires directive. More...
QualType | ActOnOpenMPDeclareReductionType (SourceLocation TyLoc, TypeResult ParsedType)
| Check if the specified type is allowed to be used in 'omp declare reduction' construct. More...
DeclGroupPtrTy | ActOnOpenMPDeclareReductionDirectiveStart (Scope *S, DeclContext *DC, DeclarationName Name, ArrayRef< std::pair< QualType, SourceLocation >> ReductionTypes, AccessSpecifier AS, Decl *PrevDeclInScope=nullptr)
| Called on start of '#pragma omp declare reduction'. More...
void | ActOnOpenMPDeclareReductionCombinerStart (Scope *S, Decl *D)
| Initialize declare reduction construct initializer. More...
void | ActOnOpenMPDeclareReductionCombinerEnd (Decl *D, Expr *Combiner)
| Finish current declare reduction construct initializer. More...
VarDecl * | ActOnOpenMPDeclareReductionInitializerStart (Scope *S, Decl *D)
| Initialize declare reduction construct initializer. More...
void | ActOnOpenMPDeclareReductionInitializerEnd (Decl *D, Expr *Initializer, VarDecl *OmpPrivParm)
| Finish current declare reduction construct initializer. More...
DeclGroupPtrTy | ActOnOpenMPDeclareReductionDirectiveEnd (Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid)
| Called at the end of '#pragma omp declare reduction'. More...
TypeResult | ActOnOpenMPDeclareMapperVarDecl (Scope *S, Declarator &D)
| Check variable declaration in 'omp declare mapper' construct. More...
QualType | ActOnOpenMPDeclareMapperType (SourceLocation TyLoc, TypeResult ParsedType)
| Check if the specified type is allowed to be used in 'omp declare mapper' construct. More...
OMPDeclareMapperDecl * | ActOnOpenMPDeclareMapperDirectiveStart (Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType, SourceLocation StartLoc, DeclarationName VN, AccessSpecifier AS, Decl *PrevDeclInScope=nullptr)
| Called on start of '#pragma omp declare mapper'. More...
void | ActOnOpenMPDeclareMapperDirectiveVarDecl (OMPDeclareMapperDecl *DMD, Scope *S, QualType MapperType, SourceLocation StartLoc, DeclarationName VN)
| Build the mapper variable of '#pragma omp declare mapper'. More...
DeclGroupPtrTy | ActOnOpenMPDeclareMapperDirectiveEnd (OMPDeclareMapperDecl *D, Scope *S, ArrayRef< OMPClause *> ClauseList)
| Called at the end of '#pragma omp declare mapper'. More...
bool | ActOnStartOpenMPDeclareTargetDirective (SourceLocation Loc)
| Called on the start of target region i.e. '#pragma omp declare target'. More...
void | ActOnFinishOpenMPDeclareTargetDirective ()
| Called at the end of target region i.e. '#pragme omp end declare target'. More...
NamedDecl * | lookupOpenMPDeclareTargetName (Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, NamedDeclSetType &SameDirectiveDecls)
| Searches for the provided declaration name for OpenMP declare target directive. More...
void | ActOnOpenMPDeclareTargetName (NamedDecl *ND, SourceLocation Loc, OMPDeclareTargetDeclAttr::MapTypeTy MT, OMPDeclareTargetDeclAttr::DevTypeTy DT)
| Called on correct id-expression from the '#pragma omp declare target'. More...
void | checkDeclIsAllowedInOpenMPTarget (Expr *E, Decl *D, SourceLocation IdLoc=SourceLocation())
| Check declaration inside target region. More...
bool | isInOpenMPDeclareTargetContext () const
| Return true inside OpenMP declare target region. More...
bool | isInOpenMPTargetExecutionDirective () const
| Return true inside OpenMP target region. More...
void | ActOnOpenMPRegionStart (OpenMPDirectiveKind DKind, Scope *CurScope)
| Initialization of captured region for OpenMP region. More...
StmtResult | ActOnOpenMPRegionEnd (StmtResult S, ArrayRef< OMPClause *> Clauses)
| End of OpenMP region. More...
StmtResult | ActOnOpenMPExecutableDirective (OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
StmtResult | ActOnOpenMPParallelDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp parallel' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPForDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp for' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPForSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp for simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPSectionsDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp sections' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPSectionDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp section' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPSingleDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp single' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPMasterDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp master' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPCriticalDirective (const DeclarationNameInfo &DirName, ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp critical' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPParallelForDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp parallel for' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPParallelForSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPParallelMasterDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp parallel master' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPParallelSectionsDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTaskDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp task' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTaskyieldDirective (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp taskyield'. More...
StmtResult | ActOnOpenMPBarrierDirective (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp barrier'. More...
StmtResult | ActOnOpenMPTaskwaitDirective (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp taskwait'. More...
StmtResult | ActOnOpenMPTaskgroupDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp taskgroup'. More...
StmtResult | ActOnOpenMPFlushDirective (ArrayRef< OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp flush'. More...
StmtResult | ActOnOpenMPOrderedDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp ordered' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPAtomicDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp atomic' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp target' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetDataDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp target data' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetEnterDataDirective (ArrayRef< OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
| Called on well-formed '#pragma omp target enter data' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetExitDataDirective (ArrayRef< OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
| Called on well-formed '#pragma omp target exit data' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetParallelDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp target parallel' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetParallelForDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp target parallel for' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTeamsDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp teams' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPCancellationPointDirective (SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
| Called on well-formed '#pragma omp cancellation point'. More...
StmtResult | ActOnOpenMPCancelDirective (ArrayRef< OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
| Called on well-formed '#pragma omp cancel'. More...
StmtResult | ActOnOpenMPTaskLoopDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp taskloop' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTaskLoopSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp taskloop simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPMasterTaskLoopDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp master taskloop' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPMasterTaskLoopSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp master taskloop simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPParallelMasterTaskLoopDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp parallel master taskloop' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPParallelMasterTaskLoopSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp parallel master taskloop simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPDistributeDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp distribute' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetUpdateDirective (ArrayRef< OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
| Called on well-formed '#pragma omp target update'. More...
StmtResult | ActOnOpenMPDistributeParallelForDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp distribute parallel for' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPDistributeParallelForSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp distribute parallel for simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPDistributeSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp distribute simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetParallelForSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp target parallel for simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp target simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTeamsDistributeDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp teams distribute' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTeamsDistributeSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp teams distribute simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTeamsDistributeParallelForSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp teams distribute parallel for simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTeamsDistributeParallelForDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp teams distribute parallel for' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetTeamsDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed '#pragma omp target teams' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetTeamsDistributeDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp target teams distribute' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetTeamsDistributeParallelForDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp target teams distribute parallel for' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp target teams distribute parallel for simd' after parsing of the associated statement. More...
StmtResult | ActOnOpenMPTargetTeamsDistributeSimdDirective (ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
| Called on well-formed '#pragma omp target teams distribute simd' after parsing of the associated statement. More...
bool | CheckOpenMPLinearModifier (OpenMPLinearClauseKind LinKind, SourceLocation LinLoc)
| Checks correctness of linear modifiers. More...
bool | CheckOpenMPLinearDecl (const ValueDecl *D, SourceLocation ELoc, OpenMPLinearClauseKind LinKind, QualType Type)
| Checks that the specified declaration matches requirements for the linear decls. More...
DeclGroupPtrTy | ActOnOpenMPDeclareSimdDirective (DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef< Expr *> Uniforms, ArrayRef< Expr *> Aligneds, ArrayRef< Expr *> Alignments, ArrayRef< Expr *> Linears, ArrayRef< unsigned > LinModifiers, ArrayRef< Expr *> Steps, SourceRange SR)
| Called on well-formed '#pragma omp declare simd' after parsing of the associated method/function. More...
Optional< std::pair< FunctionDecl *, Expr * > > | checkOpenMPDeclareVariantFunction (DeclGroupPtrTy DG, Expr *VariantRef, SourceRange SR)
| Checks '#pragma omp declare variant' variant function and original functions after parsing of the associated method/function. More...
void | ActOnOpenMPDeclareVariantDirective (FunctionDecl *FD, Expr *VariantRef, SourceRange SR, ArrayRef< OMPCtxSelectorData > Data)
| Called on well-formed '#pragma omp declare variant' after parsing of the associated method/function. More...
OMPClause * | ActOnOpenMPSingleExprClause (OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
OMPClause * | ActOnOpenMPAllocatorClause (Expr *Allocator, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'allocator' clause. More...
OMPClause * | ActOnOpenMPIfClause (OpenMPDirectiveKind NameModifier, Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
| Called on well-formed 'if' clause. More...
OMPClause * | ActOnOpenMPFinalClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'final' clause. More...
OMPClause * | ActOnOpenMPNumThreadsClause (Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'num_threads' clause. More...
OMPClause * | ActOnOpenMPSafelenClause (Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'safelen' clause. More...
OMPClause * | ActOnOpenMPSimdlenClause (Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'simdlen' clause. More...
OMPClause * | ActOnOpenMPCollapseClause (Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'collapse' clause. More...
OMPClause * | ActOnOpenMPOrderedClause (SourceLocation StartLoc, SourceLocation EndLoc, SourceLocation LParenLoc=SourceLocation(), Expr *NumForLoops=nullptr)
| Called on well-formed 'ordered' clause. More...
OMPClause * | ActOnOpenMPGrainsizeClause (Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'grainsize' clause. More...
OMPClause * | ActOnOpenMPNumTasksClause (Expr *NumTasks, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'num_tasks' clause. More...
OMPClause * | ActOnOpenMPHintClause (Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'hint' clause. More...
OMPClause * | ActOnOpenMPSimpleClause (OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
OMPClause * | ActOnOpenMPDefaultClause (OpenMPDefaultClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'default' clause. More...
OMPClause * | ActOnOpenMPProcBindClause (llvm::omp::ProcBindKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'proc_bind' clause. More...
OMPClause * | ActOnOpenMPSingleExprWithArgClause (OpenMPClauseKind Kind, ArrayRef< unsigned > Arguments, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, ArrayRef< SourceLocation > ArgumentsLoc, SourceLocation DelimLoc, SourceLocation EndLoc)
OMPClause * | ActOnOpenMPScheduleClause (OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
| Called on well-formed 'schedule' clause. More...
OMPClause * | ActOnOpenMPClause (OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc)
OMPClause * | ActOnOpenMPNowaitClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'nowait' clause. More...
OMPClause * | ActOnOpenMPUntiedClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'untied' clause. More...
OMPClause * | ActOnOpenMPMergeableClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'mergeable' clause. More...
OMPClause * | ActOnOpenMPReadClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'read' clause. More...
OMPClause * | ActOnOpenMPWriteClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'write' clause. More...
OMPClause * | ActOnOpenMPUpdateClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'update' clause. More...
OMPClause * | ActOnOpenMPCaptureClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'capture' clause. More...
OMPClause * | ActOnOpenMPSeqCstClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'seq_cst' clause. More...
OMPClause * | ActOnOpenMPThreadsClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'threads' clause. More...
OMPClause * | ActOnOpenMPSIMDClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'simd' clause. More...
OMPClause * | ActOnOpenMPNogroupClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'nogroup' clause. More...
OMPClause * | ActOnOpenMPUnifiedAddressClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'unified_address' clause. More...
OMPClause * | ActOnOpenMPUnifiedSharedMemoryClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'unified_address' clause. More...
OMPClause * | ActOnOpenMPReverseOffloadClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'reverse_offload' clause. More...
OMPClause * | ActOnOpenMPDynamicAllocatorsClause (SourceLocation StartLoc, SourceLocation EndLoc)
| Called on well-formed 'dynamic_allocators' clause. More...
OMPClause * | ActOnOpenMPAtomicDefaultMemOrderClause (OpenMPAtomicDefaultMemOrderClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'atomic_default_mem_order' clause. More...
OMPClause * | ActOnOpenMPVarListClause (OpenMPClauseKind Kind, ArrayRef< Expr *> Vars, Expr *TailExpr, const OMPVarListLocTy &Locs, SourceLocation ColonLoc, CXXScopeSpec &ReductionOrMapperIdScopeSpec, DeclarationNameInfo &ReductionOrMapperId, int ExtraModifier, ArrayRef< OpenMPMapModifierKind > MapTypeModifiers, ArrayRef< SourceLocation > MapTypeModifiersLoc, bool IsMapTypeImplicit, SourceLocation DepLinMapLastLoc)
OMPClause * | ActOnOpenMPAllocateClause (Expr *Allocator, ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'allocate' clause. More...
OMPClause * | ActOnOpenMPPrivateClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'private' clause. More...
OMPClause * | ActOnOpenMPFirstprivateClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'firstprivate' clause. More...
OMPClause * | ActOnOpenMPLastprivateClause (ArrayRef< Expr *> VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'lastprivate' clause. More...
OMPClause * | ActOnOpenMPSharedClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'shared' clause. More...
OMPClause * | ActOnOpenMPReductionClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr *> UnresolvedReductions=llvm::None)
| Called on well-formed 'reduction' clause. More...
OMPClause * | ActOnOpenMPTaskReductionClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr *> UnresolvedReductions=llvm::None)
| Called on well-formed 'task_reduction' clause. More...
OMPClause * | ActOnOpenMPInReductionClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr *> UnresolvedReductions=llvm::None)
| Called on well-formed 'in_reduction' clause. More...
OMPClause * | ActOnOpenMPLinearClause (ArrayRef< Expr *> VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
| Called on well-formed 'linear' clause. More...
OMPClause * | ActOnOpenMPAlignedClause (ArrayRef< Expr *> VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
| Called on well-formed 'aligned' clause. More...
OMPClause * | ActOnOpenMPCopyinClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'copyin' clause. More...
OMPClause * | ActOnOpenMPCopyprivateClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'copyprivate' clause. More...
OMPClause * | ActOnOpenMPFlushClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'flush' pseudo clause. More...
OMPClause * | ActOnOpenMPDependClause (OpenMPDependClauseKind DepKind, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'depend' clause. More...
OMPClause * | ActOnOpenMPDeviceClause (Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'device' clause. More...
OMPClause * | ActOnOpenMPMapClause (ArrayRef< OpenMPMapModifierKind > MapTypeModifiers, ArrayRef< SourceLocation > MapTypeModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef< Expr *> VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr *> UnresolvedMappers=llvm::None)
| Called on well-formed 'map' clause. More...
OMPClause * | ActOnOpenMPNumTeamsClause (Expr *NumTeams, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'num_teams' clause. More...
OMPClause * | ActOnOpenMPThreadLimitClause (Expr *ThreadLimit, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'thread_limit' clause. More...
OMPClause * | ActOnOpenMPPriorityClause (Expr *Priority, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'priority' clause. More...
OMPClause * | ActOnOpenMPDistScheduleClause (OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
| Called on well-formed 'dist_schedule' clause. More...
OMPClause * | ActOnOpenMPDefaultmapClause (OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc)
| Called on well-formed 'defaultmap' clause. More...
OMPClause * | ActOnOpenMPToClause (ArrayRef< Expr *> VarList, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, const OMPVarListLocTy &Locs, ArrayRef< Expr *> UnresolvedMappers=llvm::None)
| Called on well-formed 'to' clause. More...
OMPClause * | ActOnOpenMPFromClause (ArrayRef< Expr *> VarList, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, const OMPVarListLocTy &Locs, ArrayRef< Expr *> UnresolvedMappers=llvm::None)
| Called on well-formed 'from' clause. More...
OMPClause * | ActOnOpenMPUseDevicePtrClause (ArrayRef< Expr *> VarList, const OMPVarListLocTy &Locs)
| Called on well-formed 'use_device_ptr' clause. More...
OMPClause * | ActOnOpenMPIsDevicePtrClause (ArrayRef< Expr *> VarList, const OMPVarListLocTy &Locs)
| Called on well-formed 'is_device_ptr' clause. More...
OMPClause * | ActOnOpenMPNontemporalClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
| Called on well-formed 'nontemporal' clause. More...
ExprResult | ImpCastExprToType (Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_RValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
| ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast. More...
ExprResult | IgnoredValueConversions (Expr *E)
| IgnoredValueConversions - Given that an expression's result is syntactically ignored, perform any conversions that are required. More...
ExprResult | UsualUnaryConversions (Expr *E)
| UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6.3). More...
ExprResult | CallExprUnaryConversions (Expr *E)
| CallExprUnaryConversions - a special case of an unary conversion performed on a function designator of a call expression. More...
ExprResult | DefaultFunctionArrayConversion (Expr *E, bool Diagnose=true)
| DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4). More...
ExprResult | DefaultFunctionArrayLvalueConversion (Expr *E, bool Diagnose=true)
ExprResult | DefaultLvalueConversion (Expr *E)
ExprResult | DefaultArgumentPromotion (Expr *E)
| DefaultArgumentPromotion (C99 6.5.2.2p6). More...
ExprResult | TemporaryMaterializationConversion (Expr *E)
| If `E` is a prvalue denoting an unmaterialized temporary, materialize it as an xvalue. More...
VariadicCallType | getVariadicCallType (FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn)
VarArgKind | isValidVarArgType (const QualType &Ty)
| Determine the degree of POD-ness for an expression. More...
void | checkVariadicArgument (const Expr *E, VariadicCallType CT)
| Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic if not. More...
bool | hasCStrMethod (const Expr *E)
| Check to see if a given expression could have '.c_str()' called on it. More...
bool | GatherArgumentsForCall (SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr *> Args, SmallVectorImpl< Expr *> &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false)
| GatherArgumentsForCall - Collector argument expressions for various form of call prototypes. More...
ExprResult | DefaultVariadicArgumentPromotion (Expr *E, VariadicCallType CT, FunctionDecl *FDecl)
| DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but will create a trap if the resulting type is not a POD type. More...
QualType | UsualArithmeticConversions (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, ArithConvKind ACK)
| UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6.3.1.8). More...
bool | DiagnoseAssignmentResult (AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr)
| DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specified by ConvTy. More...
bool | IsValueInFlagEnum (const EnumDecl *ED, const llvm::APInt &Val, bool AllowMask) const
| IsValueInFlagEnum - Determine if a value is allowed as part of a flag enum. More...
void | DiagnoseAssignmentEnum (QualType DstType, QualType SrcType, Expr *SrcExpr)
| DiagnoseAssignmentEnum - Warn if assignment to enum is a constant integer not in the range of enum values. More...
AssignConvertType | CheckAssignmentConstraints (SourceLocation Loc, QualType LHSType, QualType RHSType)
| CheckAssignmentConstraints - Perform type checking for assignment, argument passing, variable initialization, and function return values. More...
AssignConvertType | CheckAssignmentConstraints (QualType LHSType, ExprResult &RHS, CastKind &Kind, bool ConvertRHS=true)
| Check assignment constraints and optionally prepare for a conversion of the RHS to the LHS type. More...
AssignConvertType | CheckSingleAssignmentConstraints (QualType LHSType, ExprResult &RHS, bool Diagnose=true, bool DiagnoseCFAudited=false, bool ConvertRHS=true)
| Check assignment constraints for an assignment of RHS to LHSType. More...
AssignConvertType | CheckTransparentUnionArgumentConstraints (QualType ArgType, ExprResult &RHS)
bool | IsStringLiteralToNonConstPointerConversion (Expr *From, QualType ToType)
| Helper function to determine whether this is the (deprecated) C++ conversion from a string literal to a pointer to non-const char or non-const wchar_t (for narrow and wide string literals, respectively). More...
bool | CheckExceptionSpecCompatibility (Expr *From, QualType ToType)
ExprResult | PerformImplicitConversion (Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false)
| PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType. More...
ExprResult | PerformImplicitConversion (Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit, ImplicitConversionSequence &ICS)
ExprResult | PerformImplicitConversion (Expr *From, QualType ToType, const ImplicitConversionSequence &ICS, AssignmentAction Action, CheckedConversionKind CCK=CCK_ImplicitConversion)
| PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType using the pre-computed implicit conversion sequence ICS. More...
ExprResult | PerformImplicitConversion (Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK)
| PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType by following the standard conversion sequence SCS. More...
ExprResult | PerformQualificationConversion (Expr *E, QualType Ty, ExprValueKind VK=VK_RValue, CheckedConversionKind CCK=CCK_ImplicitConversion)
QualType | InvalidOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
| the following "Check" methods will return a valid/converted QualType or a null QualType (indicating an error diagnostic was issued). More...
QualType | InvalidLogicalVectorOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
QualType | CheckPointerToMemberOperands (ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation OpLoc, bool isIndirect)
QualType | CheckMultiplyDivideOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool IsDivide)
QualType | CheckRemainderOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false)
QualType | CheckAdditionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType *CompLHSTy=nullptr)
QualType | CheckSubtractionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=nullptr)
QualType | CheckShiftOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, bool IsCompAssign=false)
void | CheckPtrComparisonWithNullChar (ExprResult &E, ExprResult &NullE)
QualType | CheckCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
QualType | CheckBitwiseOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
QualType | CheckLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
QualType | CheckAssignmentOperands (Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType)
ExprResult | checkPseudoObjectIncDec (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opcode, Expr *Op)
| Check an increment or decrement of a pseudo-object expression. More...
ExprResult | checkPseudoObjectAssignment (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opcode, Expr *LHS, Expr *RHS)
ExprResult | checkPseudoObjectRValue (Expr *E)
Expr * | recreateSyntacticForm (PseudoObjectExpr *E)
| Given a pseudo-object expression, recreate what it looks like syntactically without the attendant OpaqueValueExprs. More...
QualType | CheckConditionalOperands (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc)
| Note that LHS is not null here, even if this is the gnu "x ?: y" extension. More...
QualType | CXXCheckConditionalOperands (ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc)
| Check the operands of ?: under C++ semantics. More...
QualType | CheckGNUVectorConditionalTypes (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
QualType | FindCompositePointerType (SourceLocation Loc, Expr *&E1, Expr *&E2, bool ConvertArgs=true)
| Find a merged pointer type and convert the two expressions to it. More...
QualType | FindCompositePointerType (SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool ConvertArgs=true)
QualType | FindCompositeObjCPointerType (ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
| FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types of the two input expressions. More...
bool | DiagnoseConditionalForNull (Expr *LHSExpr, Expr *RHSExpr, SourceLocation QuestionLoc)
| Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a pointer. More...
void | DiagnoseAlwaysNonNullPointer (Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range)
| Diagnose pointers that are always non-null. More...
QualType | CheckVectorOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversion)
| type checking for vector binary operators. More...
QualType | GetSignedVectorType (QualType V)
QualType | CheckVectorCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
| CheckVectorCompareOperands - vector comparisons are a clang extension that operates on extended vector types. More...
QualType | CheckVectorLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc)
bool | areLaxCompatibleVectorTypes (QualType srcType, QualType destType)
| Are the two types lax-compatible vector types? That is, given that one of them is a vector, do they have equal storage sizes, where the storage size is the number of elements times the element size? More...
bool | isLaxVectorConversion (QualType srcType, QualType destType)
| Is this a legal conversion between two types, one of which is known to be a vector type? More...
bool | CheckForConstantInitializer (Expr *e, QualType t)
| type checking declaration initializers (C99 6.7.8) More...
ReferenceCompareResult | CompareReferenceRelationship (SourceLocation Loc, QualType T1, QualType T2, ReferenceConversions *Conv=nullptr)
| CompareReferenceRelationship - Compare the two types T1 and T2 to determine whether they are reference-compatible, reference-related, or incompatible, for use in C++ initialization by reference (C++ [dcl.ref.init]p4). More...
ExprResult | checkUnknownAnyCast (SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path)
| Check a cast of an unknown-any type. More...
ExprResult | forceUnknownAnyToType (Expr *E, QualType ToType)
| Force an expression with unknown-type to an expression of the given type. More...
ExprResult | checkUnknownAnyArg (SourceLocation callLoc, Expr *result, QualType &paramType)
| Type-check an expression that's being passed to an __unknown_anytype parameter. More...
bool | CheckVectorCast (SourceRange R, QualType VectorTy, QualType Ty, CastKind &Kind)
ExprResult | prepareVectorSplat (QualType VectorTy, Expr *SplattedExpr)
| Prepare `SplattedExpr` for a vector splat operation, adding implicit casts if necessary. More...
ExprResult | CheckExtVectorCast (SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind)
ExprResult | BuildCXXFunctionalCastExpr (TypeSourceInfo *TInfo, QualType Type, SourceLocation LParenLoc, Expr *CastExpr, SourceLocation RParenLoc)
void | checkRetainCycles (ObjCMessageExpr *msg)
| checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle. More...
void | checkRetainCycles (Expr *receiver, Expr *argument)
| Check a property assign to see if it's likely to cause a retain cycle. More...
void | checkRetainCycles (VarDecl *Var, Expr *Init)
bool | checkUnsafeAssigns (SourceLocation Loc, QualType LHS, Expr *RHS)
| checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type. More...
void | checkUnsafeExprAssigns (SourceLocation Loc, Expr *LHS, Expr *RHS)
| checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expression. More...
ConditionResult | ActOnCondition (Scope *S, SourceLocation Loc, Expr *SubExpr, ConditionKind CK)
ConditionResult | ActOnConditionVariable (Decl *ConditionVar, SourceLocation StmtLoc, ConditionKind CK)
DeclResult | ActOnCXXConditionDeclaration (Scope *S, Declarator &D)
| ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statement. More...
ExprResult | CheckConditionVariable (VarDecl *ConditionVar, SourceLocation StmtLoc, ConditionKind CK)
| Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement. More...
ExprResult | CheckSwitchCondition (SourceLocation SwitchLoc, Expr *Cond)
ExprResult | CheckBooleanCondition (SourceLocation Loc, Expr *E, bool IsConstexpr=false)
| CheckBooleanCondition - Diagnose problems involving the use of the given expression as a boolean condition (e.g. More...
ExplicitSpecifier | ActOnExplicitBoolSpecifier (Expr *E)
| ActOnExplicitBoolSpecifier - Build an ExplicitSpecifier from an expression found in an explicit(bool) specifier. More...
bool | tryResolveExplicitSpecifier (ExplicitSpecifier &ExplicitSpec)
| tryResolveExplicitSpecifier - Attempt to resolve the explict specifier. More...
void | DiagnoseAssignmentAsCondition (Expr *E)
| DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition, warn if it's an assignment. More...
void | DiagnoseEqualityWithExtraParens (ParenExpr *ParenE)
| Redundant parentheses over an equality comparison can indicate that the user intended an assignment used as condition. More...
ExprResult | CheckCXXBooleanCondition (Expr *CondExpr, bool IsConstexpr=false)
| CheckCXXBooleanCondition - Returns true if conversion to bool is invalid. More...
void | ConvertIntegerToTypeWarnOnOverflow (llvm::APSInt &OldVal, unsigned NewWidth, bool NewSign, SourceLocation Loc, unsigned DiagID)
| ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have the specified width and sign. More...
bool | CheckObjCDeclScope (Decl *D)
| Checks that the Objective-C declaration is declared in the global scope. More...
ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, bool AllowFold=true)
| VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate diagnostics. More...
ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, unsigned DiagID, bool AllowFold=true)
ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result=nullptr)
ExprResult | VerifyBitField (SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth, bool *ZeroWidth=nullptr)
| VerifyBitField - verifies that a bit field expression is an ICE and has the correct width, and that the field type is valid. More...
void | PushForceCUDAHostDevice ()
| Increments our count of the number of times we've seen a pragma forcing functions to be host device. More...
bool | PopForceCUDAHostDevice ()
| Decrements our count of the number of times we've seen a pragma forcing functions to be host device. More...
void | markKnownEmitted (Sema &S, FunctionDecl *OrigCaller, FunctionDecl *OrigCallee, SourceLocation OrigLoc, const llvm::function_ref< bool(Sema &, FunctionDecl *)> IsKnownEmitted)
| Indicate that this function (and thus everything it transtively calls) will be codegen'ed, and emit any deferred diagnostics on this function and its (transitive) callees. More...
DeviceDiagBuilder | CUDADiagIfDeviceCode (SourceLocation Loc, unsigned DiagID)
| Creates a DeviceDiagBuilder that emits the diagnostic if the current context is "used as device code". More...
DeviceDiagBuilder | CUDADiagIfHostCode (SourceLocation Loc, unsigned DiagID)
| Creates a DeviceDiagBuilder that emits the diagnostic if the current context is "used as host code". More...
DeviceDiagBuilder | diagIfOpenMPDeviceCode (SourceLocation Loc, unsigned DiagID)
| Creates a DeviceDiagBuilder that emits the diagnostic if the current context is "used as device code". More...
DeviceDiagBuilder | diagIfOpenMPHostCode (SourceLocation Loc, unsigned DiagID)
| Creates a DeviceDiagBuilder that emits the diagnostic if the current context is "used as host code". More...
DeviceDiagBuilder | targetDiag (SourceLocation Loc, unsigned DiagID)
CUDAFunctionTarget | IdentifyCUDATarget (const FunctionDecl *D, bool IgnoreImplicitHDAttr=false)
| Determines whether the given function is a CUDA device/host/kernel/etc. More...
CUDAFunctionTarget | IdentifyCUDATarget (const ParsedAttributesView &Attrs)
CUDAFunctionTarget | CurrentCUDATarget ()
| Gets the CUDA target for the current context. More...
CUDAFunctionPreference | IdentifyCUDAPreference (const FunctionDecl *Caller, const FunctionDecl *Callee)
| Identifies relative preference of a given Caller/Callee combination, based on their host/device attributes. More...
bool | IsAllowedCUDACall (const FunctionDecl *Caller, const FunctionDecl *Callee)
| Determines whether Caller may invoke Callee, based on their CUDA host/device attributes. More...
void | maybeAddCUDAHostDeviceAttrs (FunctionDecl *FD, const LookupResult &Previous)
| May add implicit CUDAHostAttr and CUDADeviceAttr attributes to FD, depending on FD and the current compilation settings. More...
bool | CheckCUDACall (SourceLocation Loc, FunctionDecl *Callee)
| Check whether we're allowed to call Callee from the current context. More...
void | CUDASetLambdaAttrs (CXXMethodDecl *Method)
| Set device or host device attributes on the given lambda operator() method. More...
void | EraseUnwantedCUDAMatches (const FunctionDecl *Caller, SmallVectorImpl< std::pair< DeclAccessPair, FunctionDecl *>> &Matches)
| Finds a function in `Matches` with highest calling priority from `Caller` context and erases all functions with lower calling priority. More...
bool | inferCUDATargetForImplicitSpecialMember (CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose)
| Given a implicit special member, infer its CUDA target from the calls it needs to make to underlying base/field special members. More...
bool | isEmptyCudaConstructor (SourceLocation Loc, CXXConstructorDecl *CD)
bool | isEmptyCudaDestructor (SourceLocation Loc, CXXDestructorDecl *CD)
void | checkAllowedCUDAInitializer (VarDecl *VD)
void | checkCUDATargetOverload (FunctionDecl *NewFD, const LookupResult &Previous)
| Check whether NewFD is a valid overload for CUDA. More...
void | inheritCUDATargetAttrs (FunctionDecl *FD, const FunctionTemplateDecl &TD)
| Copies target attributes from the template TD to the function FD. More...
std::string | getCudaConfigureFuncName () const
| Returns the name of the launch configuration function. More...
SourceLocation | getLocationOfStringLiteralByte (const StringLiteral *SL, unsigned ByteNo) const
ExprResult | SemaBuiltinShuffleVector (CallExpr *TheCall)
| SemaBuiltinShuffleVector - Handle __builtin_shufflevector. More...
ExprResult | SemaConvertVectorExpr (Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
| SemaConvertVectorExpr - Handle __builtin_convertvector. More...
bool | FormatStringHasSArg (const StringLiteral *FExpr)
void | CheckFloatComparison (SourceLocation Loc, Expr *LHS, Expr *RHS)
| Check for comparisons of floating point operands using != and ==. More...
void | RegisterTypeTagForDatatype (const IdentifierInfo *ArgumentKind, uint64_t MagicValue, QualType Type, bool LayoutCompatible, bool MustBeNull)
| Register a magic integral constant to be used as a type tag. More...
IdentifierInfo * | getNullabilityKeyword (NullabilityKind nullability)
| Retrieve the keyword associated. More...
IdentifierInfo * | getNSErrorIdent ()
| Retrieve the identifier "NSError". More...
Scope * | getCurScope () const
| Retrieve the parser's current scope. More...
void | incrementMSManglingNumber () const
IdentifierInfo * | getSuperIdentifier () const
IdentifierInfo * | getFloat128Identifier () const
Decl * | getObjCDeclContext () const
DeclContext * | getCurLexicalContext () const
const DeclContext * | getCurObjCLexicalContext () const
void | DiagnoseMisalignedMembers ()
| Diagnoses the current set of gathered accesses. More...
void | DiscardMisalignedMemberAddress (const Type *T, Expr *E)
| This function checks if the expression is in the sef of potentially misaligned members and it is converted to some pointer type T with lower or equal alignment requirements. More...
void | RefersToMemberWithReducedAlignment (Expr *E, llvm::function_ref< void(Expr *, RecordDecl *, FieldDecl *, CharUnits)> Action)
| This function calls Action when it determines that E designates a misaligned member due to the packed attribute. More...
bool | isSelfExpr (Expr *RExpr)
| Private Helper predicate to check for 'self'. More...
bool | isSelfExpr (Expr *RExpr, const ObjCMethodDecl *Method)
ExprResult | BuildObjCNumericLiteral (SourceLocation AtLoc, Expr *Number)
| BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression. More...
ExprResult | ActOnObjCBoolLiteral (SourceLocation AtLoc, SourceLocation ValueLoc, bool Value)
ExprResult | BuildObjCArrayLiteral (SourceRange SR, MultiExprArg Elements)
ExprResult | BuildObjCBoxedExpr (SourceRange SR, Expr *ValueExpr)
| BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression. More...
ExprResult | BuildObjCSubscriptExpression (SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
| Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime. More...
ExprResult | BuildObjCDictionaryLiteral (SourceRange SR, MutableArrayRef< ObjCDictionaryElement > Elements)
ExprResult | BuildObjCEncodeExpression (SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
ExprResult | ParseObjCEncodeExpression (SourceLocation AtLoc, SourceLocation EncodeLoc, SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc)
ExprResult | ParseObjCSelectorExpression (Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors)
| ParseObjCSelectorExpression - Build selector expression for @selector. More...
ExprResult | ParseObjCProtocolExpression (IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc)
| ParseObjCProtocolExpression - Build protocol expression for @protocol. More...
ObjCMethodDecl * | LookupMethodInQualifiedType (Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
| LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type. More...
ObjCMethodDecl * | LookupMethodInObjectType (Selector Sel, QualType Ty, bool IsInstance)
| LookupMethodInType - Look up a method in an ObjCObjectType. More...
ExprResult | HandleExprPropertyRefExpr (const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
| HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface. More...
ExprResult | ActOnClassPropertyRefExpr (IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc)
ObjCMethodDecl * | tryCaptureObjCSelf (SourceLocation Loc)
| Try to capture an implicit reference to 'self'. More...
ObjCMessageKind | getObjCMessageKind (Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType)
ExprResult | ActOnSuperMessage (Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
ExprResult | BuildClassMessage (TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
| Build an Objective-C class message expression. More...
ExprResult | BuildClassMessageImplicit (QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
ExprResult | ActOnClassMessage (Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
ExprResult | BuildInstanceMessage (Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
| Build an Objective-C instance message expression. More...
ExprResult | BuildInstanceMessageImplicit (Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
ExprResult | ActOnInstanceMessage (Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
ExprResult | BuildObjCBridgedCast (SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr)
ExprResult | ActOnObjCBridgedCast (Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr)
void | CheckTollFreeBridgeCast (QualType castType, Expr *castExpr)
void | CheckObjCBridgeRelatedCast (QualType castType, Expr *castExpr)
bool | CheckTollFreeBridgeStaticCast (QualType castType, Expr *castExpr, CastKind &Kind)
bool | checkObjCBridgeRelatedComponents (SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose=true)
bool | CheckObjCBridgeRelatedConversions (SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose=true)
ARCConversionResult | CheckObjCConversion (SourceRange castRange, QualType castType, Expr *&op, CheckedConversionKind CCK, bool Diagnose=true, bool DiagnoseCFAudited=false, BinaryOperatorKind Opc=BO_PtrMemD)
| Checks for invalid conversions and casts between retainable pointers and other pointer kinds for ARC and Weak. More...
Expr * | stripARCUnbridgedCast (Expr *e)
| stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast. More...
void | diagnoseARCUnbridgedCast (Expr *e)
| Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly. More...
bool | CheckObjCARCUnavailableWeakConversion (QualType castType, QualType ExprType)
bool | CheckMessageArgumentTypes (const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK)
| CheckMessageArgumentTypes - Check types in an Obj-C message send. More...
QualType | getMessageSendResultType (const Expr *Receiver, QualType ReceiverType, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage)
| Determine the result of a message send expression based on the type of the receiver, the method expected to receive the message, and the form of the message send. More...
void | EmitRelatedResultTypeNote (const Expr *E)
| If the given expression involves a message send to a method with a related result type, emit a note describing what happened. More...
void | EmitRelatedResultTypeNoteForReturn (QualType destType)
| Given that we had incompatible pointer types in a return statement, check whether we're in a method with a related result type, and if so, emit a note describing what happened. More...

## Static Public Member Functions
static QualType | GetTypeFromParser (ParsedType Ty, TypeSourceInfo **TInfo=nullptr)
static int | getPrintable (int I)
static unsigned | getPrintable (unsigned I)
static bool | getPrintable (bool B)
static const char * | getPrintable (const char *S)
static StringRef | getPrintable (StringRef S)
static const std::string & | getPrintable (const std::string &S)
static const IdentifierInfo * | getPrintable (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. More...
static PrintingPolicy | getPrintingPolicy (const ASTContext &Ctx, const Preprocessor &PP)
| Retrieve a suitable printing policy for diagnostics. More...
static Scope * | getScopeForDeclContext (Scope *S, DeclContext *DC)
| Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope. More...
static void | MarkDeducedTemplateParameters (ASTContext &Ctx, const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
| Marks all of the template parameters that will be deduced by a call to the given function template. More...
static int | getOpenMPCaptureLevels (OpenMPDirectiveKind Kind)
| Return the number of captured regions created for an OpenMP directive. More...
static bool | isCast (CheckedConversionKind CCK)
static CastKind | ScalarTypeToBooleanCastKind (QualType ScalarTy)
| ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ScalarTy to the Boolean type. More...
static ConditionResult | ConditionError ()
static FormatStringType | GetFormatStringType (const FormatAttr *Format)
static bool | GetFormatNSStringIdx (const FormatAttr *Format, unsigned &Idx)
static bool | TooManyArguments (size_t NumParams, size_t NumArgs, bool PartialOverloading=false)
| To be used for checking whether the arguments being passed to function exceeds the number of parameters expected for it. More...

## Public Attributes
OpenCLOptions | OpenCLFeatures
FPOptions | FPFeatures
const LangOptions & | LangOpts
Preprocessor & | PP
ASTContext & | Context
ASTConsumer & | Consumer
DiagnosticsEngine & | Diags
SourceManager & | SourceMgr
bool | CollectStats
| Flag indicating whether or not to collect detailed statistics. More...
CodeCompleteConsumer * | CodeCompleter
| Code-completion consumer. More...
DeclContext * | CurContext
| CurContext - This is the current declaration context of parsing. More...
DeclContext * | OriginalLexicalContext
| Generally null except when we temporarily switch decl contexts, like in. More...
DeclarationName | VAListTagName
| VAListTagName - The declaration name corresponding to __va_list_tag. More...
bool | MSStructPragmaOn
LangOptions::PragmaMSPointersToMembersKind | MSPointerToMemberRepresentationMethod
| Controls member pointer representation format under the MS ABI. More...
SmallVector< Scope *, 2 > | CurrentSEHFinally
| Stack of active SEH __finally scopes. Can be empty. More...
SourceLocation | ImplicitMSInheritanceAttrLoc
| Source location for newly created implicit MSInheritanceAttrs. More...
llvm::SmallVector< TypoExpr *, 2 > | TypoExprs
| Holds TypoExprs that are created from `createDelayedTypo`. More...
PragmaClangSection | PragmaClangBSSSection
PragmaClangSection | PragmaClangDataSection
PragmaClangSection | PragmaClangRodataSection
PragmaClangSection | PragmaClangRelroSection
PragmaClangSection | PragmaClangTextSection
PragmaStack< MSVtorDispMode > | VtorDispStack
| Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI. More...
PragmaStack< unsigned > | PackStack
SmallVector< PackIncludeState, 8 > | PackIncludeStack
PragmaStack< StringLiteral * > | DataSegStack
PragmaStack< StringLiteral * > | BSSSegStack
PragmaStack< StringLiteral * > | ConstSegStack
PragmaStack< StringLiteral * > | CodeSegStack
FileNullabilityMap | NullabilityMap
| A mapping that describes the nullability we've seen in each header file. More...
StringLiteral * | CurInitSeg
| Last section used with #pragma init_seg. More...
SourceLocation | CurInitSegLoc
void * | VisContext
| VisContext - Manages the stack for #pragma GCC visibility. More...
SmallVector< PragmaAttributeGroup, 2 > | PragmaAttributeStack
const Decl * | PragmaAttributeCurrentTargetDecl
| The declaration that is currently receiving an attribute from the #pragma attribute stack. More...
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. More...
bool | IsBuildingRecoveryCallExpr
| Flag indicating if Sema is building a recovery call expression. More...
CleanupInfo | Cleanup
| Used to control the generation of ExprWithCleanups. More...
SmallVector< BlockDecl *, 8 > | ExprCleanupObjects
| ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current full expression. More...
MaybeODRUseExprSet | MaybeODRUseExprs
std::unique_ptr< sema::FunctionScopeInfo > | CachedFunctionScope
SmallVector< sema::FunctionScopeInfo *, 4 > | FunctionScopes
| Stack containing information about each of the nested function, block, and method scopes that are currently active. More...
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. More...
ExtVectorDeclsType | ExtVectorDecls
| ExtVectorDecls - This is a list all the extended vector types. More...
std::unique_ptr< CXXFieldCollector > | FieldCollector
| FieldCollector - Collects CXXFieldDecls during parsing of C++ classes. More...
NamedDeclSetType | UnusedPrivateFields
| Set containing all declared private fields that are not used. More...
llvm::SmallSetVector< const TypedefNameDecl *, 4 > | UnusedLocalTypedefNameCandidates
| Set containing all typedefs that are likely unused. More...
llvm::MapVector< FieldDecl *, DeleteLocs > | DeleteExprs
std::unique_ptr< RecordDeclSetTy > | PureVirtualClassDiagSet
| PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual functions. More...
llvm::SmallPtrSet< const Decl *, 4 > | ParsingInitForAutoVars
| ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the initializer. More...
TentativeDefinitionsType | TentativeDefinitions
| All the tentative definitions encountered in the TU. More...
SmallVector< VarDecl *, 4 > | ExternalDeclarations
| All the external declarations encoutered and used in the TU. More...
UnusedFileScopedDeclsType | UnusedFileScopedDecls
| The set of file scoped decls seen so far that have not been used and must warn if not used. More...
DelegatingCtorDeclsType | DelegatingCtorDecls
| All the delegating constructors seen so far in the file, used for cycle detection at the end of the TU. More...
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. More...
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. More...
LateParsedTemplateMapT | LateParsedTemplateMap
LateTemplateParserCB * | LateTemplateParser
LateTemplateParserCleanupCB * | LateTemplateParserCleanup
void * | OpaqueParser
class clang::Sema::DelayedDiagnostics | DelayedDiagnostics
bool | isConstantEvaluatedOverride
| Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextRecord object. More...
llvm::MapVector< IdentifierInfo *, WeakInfo > | WeakUndeclaredIdentifiers
| WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared. More...
llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > | ExtnameUndeclaredIdentifiers
| ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared. More...
SmallVector< Decl *, 2 > | WeakTopLevelDecl
| WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing of other Decls. More...
IdentifierResolver | IdResolver
Scope * | TUScope
| Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in the "ordinary" C decl namespace. More...
LazyDeclPtr | StdNamespace
| The C++ "std" namespace, where the standard library resides. More...
LazyDeclPtr | StdBadAlloc
| The C++ "std::bad_alloc" class, which is defined by the C++ standard library. More...
LazyDeclPtr | StdAlignValT
| The C++ "std::align_val_t" enum class, which is defined by the C++ standard library. More...
NamespaceDecl * | StdExperimentalNamespaceCache
| The C++ "std::experimental" namespace, where the experimental parts of the standard library resides. More...
ClassTemplateDecl * | StdInitializerList
| The C++ "std::initializer_list" template, which is defined in <initializer_list>. More...
ClassTemplateDecl * | StdCoroutineTraitsCache
| The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits> More...
RecordDecl * | CXXTypeInfoDecl
| The C++ "type_info" declaration, which is defined in <typeinfo>. More...
RecordDecl * | MSVCGuidDecl
| The MSVC "_GUID" struct, which is defined in MSVC header files. More...
std::unique_ptr< NSAPI > | NSAPIObj
| Caches identifiers/selectors for NSFoundation APIs. More...
ObjCInterfaceDecl * | NSNumberDecl
| The declaration of the Objective-C NSNumber class. More...
ObjCInterfaceDecl * | NSValueDecl
| The declaration of the Objective-C NSValue class. More...
QualType | NSNumberPointer
| Pointer to NSNumber type (NSNumber *). More...
QualType | NSValuePointer
| Pointer to NSValue type (NSValue *). More...
ObjCMethodDecl * | NSNumberLiteralMethods [NSAPI::NumNSNumberLiteralMethods]
| The Objective-C NSNumber methods used to create NSNumber literals. More...
ObjCInterfaceDecl * | NSStringDecl
| The declaration of the Objective-C NSString class. More...
QualType | NSStringPointer
| Pointer to NSString type (NSString *). More...
ObjCMethodDecl * | StringWithUTF8StringMethod
| The declaration of the stringWithUTF8String: method. More...
ObjCMethodDecl * | ValueWithBytesObjCTypeMethod
| The declaration of the valueWithBytes:objCType: method. More...
ObjCInterfaceDecl * | NSArrayDecl
| The declaration of the Objective-C NSArray class. More...
ObjCMethodDecl * | ArrayWithObjectsMethod
| The declaration of the arrayWithObjects:count: method. More...
ObjCInterfaceDecl * | NSDictionaryDecl
| The declaration of the Objective-C NSDictionary class. More...
ObjCMethodDecl * | DictionaryWithObjectsMethod
| The declaration of the dictionaryWithObjects:forKeys:count: method. More...
QualType | QIDNSCopying
| id<NSCopying> type. More...
Selector | RespondsToSelectorSel
| will hold 'respondsToSelector:' More...
bool | GlobalNewDeleteDeclared
| A flag to remember whether the implicit forms of operator new and delete have been declared. More...
bool | AllowAbstractFieldReference
| A flag to indicate that we're in a context that permits abstract references to fields. More...
SmallVector< ExpressionEvaluationContextRecord, 8 > | ExprEvalContexts
| A stack of expression evaluation contexts. More...
llvm::FoldingSet< SpecialMemberOverloadResultEntry > | SpecialMemberCache
| A cache of special member function overload resolution results for C++ records. More...
llvm::DenseMap< const EnumDecl *, llvm::APInt > | FlagBitsCache
| A cache of the flags available in enumerations with the flag_bits attribute. More...
TranslationUnitKind | TUKind
| The kind of translation unit we are processing. More...
llvm::BumpPtrAllocator | BumpAlloc
unsigned | NumSFINAEErrors
| The number of SFINAE diagnostics that have been trapped. More...
UnparsedDefaultArgInstantiationsMap | UnparsedDefaultArgInstantiations
| A mapping from parameters with unparsed default arguments to the set of instantiations of each parameter. More...
llvm::DenseMap< ParmVarDecl *, SourceLocation > | UnparsedDefaultArgLocs
llvm::MapVector< NamedDecl *, SourceLocation > | UndefinedButUsed
| UndefinedInternals - all the used, undefined objects which require a definition in this translation unit. More...
GlobalMethodPool | MethodPool
| Method Pool - allows efficient lookup when typechecking messages to "id". More...
llvm::MapVector< Selector, SourceLocation > | ReferencedSelectors
| Method selectors used in a @selector expression. More...
llvm::SmallVector< std::pair< SourceLocation, const BlockDecl * >, 1 > | ImplicitlyRetainedSelfLocs
| List of SourceLocations where 'self' is implicitly retained inside a block. More...
llvm::SmallPtrSet< SpecialMemberDecl, 4 > | SpecialMembersBeingDeclared
| The C++ special members which we are currently in the process of declaring. More...
llvm::SmallPtrSet< const NamedDecl *, 4 > | TypoCorrectedFunctionDefinitions
| The function definitions which were renamed as part of typo-correction to match their respective declarations. More...
llvm::SmallVector< QualType, 4 > | CurrentParameterCopyTypes
| Stack of types that correspond to the parameter entities that are currently being copy-initialized. More...
bool | WarnedStackExhausted = false
QualType | CXXThisTypeOverride
| When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-static member function. More...
SmallVector< VTableUse, 16 > | VTableUses
| The list of vtables that are required but have not yet been materialized. More...
llvm::DenseMap< CXXRecordDecl *, bool > | VTablesUsed
| The set of classes whose vtables have been used within this translation unit, and a bit that will be true if the vtable is required to be emitted (otherwise, it should be emitted only if needed by code generation). More...
bool | AccessCheckingSFINAE
| When true, access checking violations are treated as SFINAE failures rather than hard errors. More...
SmallVector< CodeSynthesisContext, 16 > | CodeSynthesisContexts
| List of active code synthesis contexts. More...
llvm::DenseSet< std::pair< Decl *, unsigned > > | InstantiatingSpecializations
| Specializations whose definitions are currently being instantiated. More...
llvm::DenseSet< QualType > | InstantiatedNonDependentTypes
| Non-dependent types used in templates that have already been instantiated by some template instantiation. More...
SmallVector< Module *, 16 > | CodeSynthesisContextLookupModules
| Extra modules inspected when performing a lookup during a template instantiation. More...
llvm::DenseSet< Module * > | LookupModulesCache
| Cache of additional modules that should be used for name lookup within the current template instantiation. More...
llvm::DenseMap< NamedDecl *, NamedDecl * > | VisibleNamespaceCache
| Map from the most recent declaration of a namespace to the most recent visible declaration of that namespace. More...
bool | InNonInstantiationSFINAEContext
| Whether we are in a SFINAE context that is not associated with template instantiation. More...
unsigned | NonInstantiationEntries
| The number of `CodeSynthesisContexts` that are not template instantiations and, therefore, should not be counted as part of the instantiation depth. More...
unsigned | LastEmittedCodeSynthesisContextDepth = 0
| The depth of the context stack at the point when the most recent error or warning was produced. More...
std::vector< std::unique_ptr< TemplateInstantiationCallback > > | TemplateInstCallbacks
| The template instantiation callbacks to trace or track instantiations (objects can be chained). More...
int | ArgumentPackSubstitutionIndex
| The current index into pack expansion arguments that will be used for substitution of parameter packs. More...
SuppressedDiagnosticsMap | SuppressedDiagnostics
LocalInstantiationScope * | CurrentInstantiationScope
| The current instantiation scope used to store local variables. More...
bool | DisableTypoCorrection
| Tracks whether we are in a context where typo correction is disabled. More...
unsigned | TyposCorrected
| The number of typos corrected by CorrectTypo. More...
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. More...
sema::AnalysisBasedWarnings | AnalysisWarnings
| Worker object for performing CFG-based warnings. More...
threadSafety::BeforeSet * | ThreadSafetyDeclCache
std::deque< PendingImplicitInstantiation > | PendingInstantiations
| The queue of implicit template instantiations that are required but have not yet been performed. More...
SmallVector< PendingImplicitInstantiation, 1 > | LateParsedInstantiations
| Queue of implicit template instantiations that cannot be performed eagerly. More...
std::deque< PendingImplicitInstantiation > | PendingLocalImplicitInstantiations
| The queue of implicit template instantiations that are required and must be performed within the current local scope. More...
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, std::vector< PartialDiagnosticAt > > | DeviceDeferredDiags
| Diagnostics that are emitted only if we discover that the given function must be codegen'ed. More...
llvm::DenseSet< FunctionDeclAndLoc > | LocsWithCUDACallDiags
| FunctionDecls and SourceLocations for which CheckCUDACall has emitted a (maybe deferred) "bad call" diagnostic. More...
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, FunctionDeclAndLoc > | DeviceKnownEmittedFns
| An inverse call graph, mapping known-emitted functions to one of their known-emitted callers (plus the location of the call). More...
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, llvm::MapVector< CanonicalDeclPtr< FunctionDecl >, SourceLocation > > | DeviceCallGraph
| A partial call graph maintained during CUDA/OpenMP device code compilation to support deferred diagnostics. More...
RecordDecl * | CFError = nullptr
| The struct behind the CFErrorRef pointer. More...
SmallVector< CXXRecordDecl *, 4 > | DelayedDllExportClasses
SmallVector< CXXMethodDecl *, 4 > | DelayedDllExportMemberFunctions

## Static Public Attributes
static const unsigned | kMac68kAlignmentSentinel = ~0U

## Friends
class | ArgumentPackSubstitutionRAII
class | Parser
class | InitializationSequence
class | ASTReader
class | ASTDeclReader
class | ASTWriter

## Name lookup
These routines provide name lookup that is used during semantic analysis to resolve the various kinds of names (identifiers, overloaded operator names, constructor names, etc.) into zero or more declarations within a particular scope. The major entry points are LookupName, which performs unqualified name lookup, and LookupQualifiedName, which performs qualified name lookup. All name lookup is performed based on some specific criteria, which specify what names will be visible to name lookup and how far name lookup should work. These criteria are important both for capturing language semantics (certain lookups will ignore certain names, for example) and for performance, since name lookup is often a bottleneck in the compilation of C++. Name lookup criteria is specified via the LookupCriteria enumeration. The results of name lookup can vary based on the kind of name lookup performed, the current language, and the translation unit. In C, for example, name lookup will either return nothing (no entity found) or a single declaration. In C++, name lookup can additionally refer to a set of overloaded functions or result in an ambiguity. All of the possible results of name lookup are captured by the LookupResult class, which provides the ability to distinguish among them.
enum | LookupNameKind { LookupOrdinaryName = 0, LookupTagName, LookupLabel, LookupMemberName, LookupOperatorName, LookupNestedNameSpecifierName, LookupNamespaceName, LookupUsingDeclName, LookupRedeclarationWithLinkage, LookupLocalFriendName, LookupObjCProtocolName, LookupObjCImplicitSelfParam, 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_StringTemplate }
| The possible outcomes of name lookup for a literal operator. More...
enum | FunctionEmissionStatus { FunctionEmissionStatus::Emitted, FunctionEmissionStatus::CUDADiscarded, FunctionEmissionStatus::OMPDiscarded, FunctionEmissionStatus::TemplateDiscarded, FunctionEmissionStatus::Unknown }
| Status of the function emission on the CUDA/HIP/OpenMP host/device attrs. More...
enum | CorrectTypoKind { CTK_NonError, CTK_ErrorRecovery }
typedef std::function< void(const TypoCorrection &)> | TypoDiagnosticGenerator
typedef std::function< ExprResult(Sema &, TypoExpr *, TypoCorrection)> | TypoRecoveryCallback
RedeclarationKind | forRedeclarationInCurContext ()
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. More...
NamedDecl * | LookupSingleName (Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=NotForRedeclaration)
| Look up a name, looking for a single declaration. More...
bool | LookupBuiltin (LookupResult &R)
| Lookup a builtin function, when name lookup would otherwise fail. More...
bool | LookupName (LookupResult &R, Scope *S, bool AllowBuiltinCreation=false)
| Perform unqualified name lookup starting from a given scope. More...
bool | LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
| Perform qualified name lookup into a given context. More...
bool | LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, CXXScopeSpec &SS)
| Performs qualified name lookup or special type of lookup for "__super::" scope specifier. More...
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. More...
ObjCProtocolDecl * | LookupProtocol (IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration)
| Find the protocol with the given name, if any. More...
bool | LookupInSuper (LookupResult &R, CXXRecordDecl *Class)
| Perform qualified name lookup into all base classes of the given class. More...
void | LookupOverloadedOperatorName (OverloadedOperatorKind Op, Scope *S, QualType T1, QualType T2, UnresolvedSetImpl &Functions)
LabelDecl * | LookupOrCreateLabel (IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation())
| LookupOrCreateLabel - Do a name lookup of a label with the specified name. More...
DeclContextLookupResult | LookupConstructors (CXXRecordDecl *Class)
| Look up the constructors for the given class. More...
CXXConstructorDecl * | LookupDefaultConstructor (CXXRecordDecl *Class)
| Look up the default constructor for the given class. More...
CXXConstructorDecl * | LookupCopyingConstructor (CXXRecordDecl *Class, unsigned Quals)
| Look up the copying constructor for the given class. More...
CXXMethodDecl * | LookupCopyingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
| Look up the copying assignment operator for the given class. More...
CXXConstructorDecl * | LookupMovingConstructor (CXXRecordDecl *Class, unsigned Quals)
| Look up the moving constructor for the given class. More...
CXXMethodDecl * | LookupMovingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
| Look up the moving assignment operator for the given class. More...
CXXDestructorDecl * | LookupDestructor (CXXRecordDecl *Class)
| Look for the destructor of the given class. More...
bool | checkLiteralOperatorId (const CXXScopeSpec &SS, const UnqualifiedId &Id)
LiteralOperatorLookupResult | LookupLiteralOperator (Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate, bool DiagnoseMissing)
| LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal, per C++11 [lex.ext]. More...
bool | isKnownName (StringRef name)
FunctionEmissionStatus | getEmissionStatus (FunctionDecl *Decl)
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. More...
TypoExpr * | CorrectTypoDelayed (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. More...
ExprResult | CorrectDelayedTyposInExpr (Expr *E, VarDecl *InitDecl=nullptr, 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. More...
ExprResult | CorrectDelayedTyposInExpr (Expr *E, llvm::function_ref< ExprResult(Expr *)> Filter)
ExprResult | CorrectDelayedTyposInExpr (ExprResult ER, VarDecl *InitDecl=nullptr, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
ExprResult | CorrectDelayedTyposInExpr (ExprResult ER, llvm::function_ref< ExprResult(Expr *)> Filter)
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. More...
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. More...
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. More...
bool | CheckRedeclarationModuleOwnership (NamedDecl *New, NamedDecl *Old)
| We've determined that `New` is a redeclaration of `Old`. More...
void | DiagnoseAmbiguousLookup (LookupResult &Result)
| Produce a diagnostic describing the ambiguity that resulted from name lookup. More...

## Code completion
enum | ParserCompletionContext { PCC_Namespace, PCC_Class, PCC_ObjCInterface, PCC_ObjCImplementation, PCC_ObjCInstanceVariableList, PCC_Template, PCC_MemberTemplate, PCC_Expression, PCC_Statement, PCC_ForInit, PCC_Condition, PCC_RecoveryInFunction, PCC_Type, PCC_ParenthesizedExpression, PCC_LocalDeclarationSpecifiers }
| Describes the context in which code completion occurs. More...
void | CodeCompleteModuleImport (SourceLocation ImportLoc, ModuleIdPath Path)
void | CodeCompleteOrdinaryName (Scope *S, ParserCompletionContext CompletionContext)
void | CodeCompleteDeclSpec (Scope *S, DeclSpec &DS, bool AllowNonIdentifiers, bool AllowNestedNameSpecifiers)
void | CodeCompleteExpression (Scope *S, const CodeCompleteExpressionData &Data)
| Perform code-completion in an expression context when we know what type we're looking for. More...
void | CodeCompleteExpression (Scope *S, QualType PreferredType, bool IsParenthesized=false)
void | CodeCompleteMemberReferenceExpr (Scope *S, Expr *Base, Expr *OtherOpBase, SourceLocation OpLoc, bool IsArrow, bool IsBaseExprStatement, QualType PreferredType)
void | CodeCompletePostfixExpression (Scope *S, ExprResult LHS, QualType PreferredType)
void | CodeCompleteTag (Scope *S, unsigned TagSpec)
void | CodeCompleteTypeQualifiers (DeclSpec &DS)
void | CodeCompleteFunctionQualifiers (DeclSpec &DS, Declarator &D, const VirtSpecifiers *VS=nullptr)
void | CodeCompleteBracketDeclarator (Scope *S)
void | CodeCompleteCase (Scope *S)
QualType | ProduceCallSignatureHelp (Scope *S, Expr *Fn, ArrayRef< Expr *> Args, SourceLocation OpenParLoc)
| Reports signatures for a call to CodeCompleteConsumer and returns the preferred type for the current argument. More...
QualType | ProduceConstructorSignatureHelp (Scope *S, QualType Type, SourceLocation Loc, ArrayRef< Expr *> Args, SourceLocation OpenParLoc)
QualType | ProduceCtorInitMemberSignatureHelp (Scope *S, Decl *ConstructorDecl, CXXScopeSpec SS, ParsedType TemplateTypeTy, ArrayRef< Expr *> ArgExprs, IdentifierInfo *II, SourceLocation OpenParLoc)
void | CodeCompleteInitializer (Scope *S, Decl *D)
void | CodeCompleteAfterIf (Scope *S)
void | CodeCompleteQualifiedId (Scope *S, CXXScopeSpec &SS, bool EnteringContext, bool IsUsingDeclaration, QualType BaseType, QualType PreferredType)
void | CodeCompleteUsing (Scope *S)
void | CodeCompleteUsingDirective (Scope *S)
void | CodeCompleteNamespaceDecl (Scope *S)
void | CodeCompleteNamespaceAliasDecl (Scope *S)
void | CodeCompleteOperatorName (Scope *S)
void | CodeCompleteConstructorInitializer (Decl *Constructor, ArrayRef< CXXCtorInitializer *> Initializers)
void | CodeCompleteLambdaIntroducer (Scope *S, LambdaIntroducer &Intro, bool AfterAmpersand)
void | CodeCompleteObjCAtDirective (Scope *S)
void | CodeCompleteObjCAtVisibility (Scope *S)
void | CodeCompleteObjCAtStatement (Scope *S)
void | CodeCompleteObjCAtExpression (Scope *S)
void | CodeCompleteObjCPropertyFlags (Scope *S, ObjCDeclSpec &ODS)
void | CodeCompleteObjCPropertyGetter (Scope *S)
void | CodeCompleteObjCPropertySetter (Scope *S)
void | CodeCompleteObjCPassingType (Scope *S, ObjCDeclSpec &DS, bool IsParameter)
void | CodeCompleteObjCMessageReceiver (Scope *S)
void | CodeCompleteObjCSuperMessage (Scope *S, SourceLocation SuperLoc, ArrayRef< IdentifierInfo *> SelIdents, bool AtArgumentExpression)
void | CodeCompleteObjCClassMessage (Scope *S, ParsedType Receiver, ArrayRef< IdentifierInfo *> SelIdents, bool AtArgumentExpression, bool IsSuper=false)
void | CodeCompleteObjCInstanceMessage (Scope *S, Expr *Receiver, ArrayRef< IdentifierInfo *> SelIdents, bool AtArgumentExpression, ObjCInterfaceDecl *Super=nullptr)
void | CodeCompleteObjCForCollection (Scope *S, DeclGroupPtrTy IterationVar)
void | CodeCompleteObjCSelector (Scope *S, ArrayRef< IdentifierInfo *> SelIdents)
void | CodeCompleteObjCProtocolReferences (ArrayRef< IdentifierLocPair > Protocols)
void | CodeCompleteObjCProtocolDecl (Scope *S)
void | CodeCompleteObjCInterfaceDecl (Scope *S)
void | CodeCompleteObjCSuperclass (Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void | CodeCompleteObjCImplementationDecl (Scope *S)
void | CodeCompleteObjCInterfaceCategory (Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void | CodeCompleteObjCImplementationCategory (Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void | CodeCompleteObjCPropertyDefinition (Scope *S)
void | CodeCompleteObjCPropertySynthesizeIvar (Scope *S, IdentifierInfo *PropertyName)
void | CodeCompleteObjCMethodDecl (Scope *S, Optional< bool > IsInstanceMethod, ParsedType ReturnType)
void | CodeCompleteObjCMethodDeclSelector (Scope *S, bool IsInstanceMethod, bool AtParameterName, ParsedType ReturnType, ArrayRef< IdentifierInfo *> SelIdents)
void | CodeCompleteObjCClassPropertyRefExpr (Scope *S, IdentifierInfo &ClassName, SourceLocation ClassNameLoc, bool IsBaseExprStatement)
void | CodeCompletePreprocessorDirective (bool InConditional)
void | CodeCompleteInPreprocessorConditionalExclusion (Scope *S)
void | CodeCompletePreprocessorMacroName (bool IsDefinition)
void | CodeCompletePreprocessorExpression ()
void | CodeCompletePreprocessorMacroArgument (Scope *S, IdentifierInfo *Macro, MacroInfo *MacroInfo, unsigned Argument)
void | CodeCompleteIncludedFile (llvm::StringRef Dir, bool IsAngled)
void | CodeCompleteNaturalLanguage ()
void | CodeCompleteAvailabilityPlatformName ()
void | GatherGlobalCodeCompletions (CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, SmallVectorImpl< CodeCompletionResult > &Results)

## Detailed Description

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

Definition at line 336 of file Sema.h.

## Member Typedef Documentation

## ◆ ADLCallKind

using clang::Sema::ADLCallKind = CallExpr::ADLCallKind

Definition at line 3126 of file Sema.h.

## ◆ AssociatedClassSet

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

Definition at line 3124 of file Sema.h.

## ◆ AssociatedNamespaceSet

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

Definition at line 3123 of file Sema.h.

## ◆ CapturedParamNameType

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

Definition at line 4235 of file Sema.h.

## ◆ DeclGroupPtrTy

typedef OpaquePtr<DeclGroupRef> clang::Sema::DeclGroupPtrTy

Definition at line 376 of file Sema.h.

## ◆ DelegatingCtorDeclsType

typedef LazyVector<CXXConstructorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadDelegatingConstructors, 2, 2> clang::Sema::DelegatingCtorDeclsType

Definition at line 694 of file Sema.h.

## ◆ DeleteExprLoc

typedef std::pair<SourceLocation, bool> clang::Sema::DeleteExprLoc

Delete-expressions to be analyzed at the end of translation unit.

This list contains class members, and locations of delete-expressions that could not be proven as to whether they mismatch with new-expression used in initializer of the field.

Definition at line 656 of file Sema.h.

## ◆ DeleteLocs

typedef llvm::SmallVector<DeleteExprLoc, 4> clang::Sema::DeleteLocs

Definition at line 657 of file Sema.h.

## ◆ ExtVectorDeclsType

typedef LazyVector<TypedefNameDecl *, ExternalSemaSource, &ExternalSemaSource::ReadExtVectorDecls, 2, 2> clang::Sema::ExtVectorDeclsType

Definition at line 632 of file Sema.h.

## ◆ GlobalMethodPool

typedef llvm::DenseMap<Selector, GlobalMethods> clang::Sema::GlobalMethodPool

Definition at line 1220 of file Sema.h.

## ◆ GlobalMethods

typedef std::pair<ObjCMethodList, ObjCMethodList> clang::Sema::GlobalMethods

Definition at line 1219 of file Sema.h.

## ◆ IdentifierSourceLocations

typedef llvm::DenseMap<IdentifierInfo *, SrcLocSet> clang::Sema::IdentifierSourceLocations

Definition at line 8518 of file Sema.h.

## ◆ LateInstantiatedAttrVec

typedef SmallVector<LateInstantiatedAttribute, 16> clang::Sema::LateInstantiatedAttrVec

Definition at line 8757 of file Sema.h.

## ◆ LateParsedTemplateMapT

typedef llvm::MapVector<const FunctionDecl *, std::unique_ptr<LateParsedTemplate> > clang::Sema::LateParsedTemplateMapT

Definition at line 716 of file Sema.h.

## ◆ LateTemplateParserCB

typedef void clang::Sema::LateTemplateParserCB(void *P, LateParsedTemplate &LPT)

Callback to the parser to parse templated functions when needed.

Definition at line 720 of file Sema.h.

## ◆ LateTemplateParserCleanupCB

typedef void clang::Sema::LateTemplateParserCleanupCB(void *P)

Definition at line 721 of file Sema.h.

## ◆ MaybeODRUseExprSet

using clang::Sema::MaybeODRUseExprSet = llvm::SmallPtrSet<Expr *, 2>

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.

This is cleared at the end of each full expression.

Definition at line 614 of file Sema.h.

## ◆ NamedDeclSetType

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

Definition at line 642 of file Sema.h.

## ◆ OMPCtxSelectorData

using clang::Sema::OMPCtxSelectorData = OpenMPCtxSelectorData<SmallVector<OMPCtxStringType, 4>, ExprResult>

Definition at line 9674 of file Sema.h.

## ◆ OMPCtxStringType

using clang::Sema::OMPCtxStringType = SmallString<8>

Struct to store the context selectors info for declare variant directive.

Definition at line 9672 of file Sema.h.

## ◆ ParsingClassState

typedef ProcessingContextState clang::Sema::ParsingClassState

Definition at line 4392 of file Sema.h.

## ◆ ParsingDeclState

typedef DelayedDiagnosticsState clang::Sema::ParsingDeclState

Definition at line 740 of file Sema.h.

## ◆ PendingImplicitInstantiation

typedef std::pair<ValueDecl *, SourceLocation> clang::Sema::PendingImplicitInstantiation

An entity for which implicit template instantiation is required.

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

Definition at line 8537 of file Sema.h.

## ◆ PoppedFunctionScopePtr

using clang::Sema::PoppedFunctionScopePtr = std::unique_ptr<sema::FunctionScopeInfo, PoppedFunctionScopeDeleter>

Definition at line 1486 of file Sema.h.

## ◆ ProcessingContextState

typedef DelayedDiagnosticsState clang::Sema::ProcessingContextState

Definition at line 741 of file Sema.h.

## ◆ RecordDeclSetTy

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

Definition at line 660 of file Sema.h.

## ◆ ReferenceConversions

using clang::Sema::ReferenceConversions = ReferenceConversionsScope::ReferenceConversions

Definition at line 10889 of file Sema.h.

## ◆ SelectorSet

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

Definition at line 3835 of file Sema.h.

## ◆ SkippedDefinitionContext

typedef void* clang::Sema::SkippedDefinitionContext

Definition at line 2677 of file Sema.h.

## ◆ SpecialMemberDecl

typedef llvm::PointerIntPair<CXXRecordDecl *, 3, CXXSpecialMember> clang::Sema::SpecialMemberDecl

Definition at line 1251 of file Sema.h.

## ◆ SrcLocSet

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

Definition at line 8517 of file Sema.h.

## ◆ SuppressedDiagnosticsMap

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

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

FIXME: Serialize this structure to the AST file.

Definition at line 8229 of file Sema.h.

## ◆ TemplateTy

typedef OpaquePtr<TemplateName> clang::Sema::TemplateTy

Definition at line 377 of file Sema.h.

## ◆ TentativeDefinitionsType

typedef LazyVector<VarDecl *, ExternalSemaSource, &ExternalSemaSource::ReadTentativeDefinitions, 2, 2> clang::Sema::TentativeDefinitionsType

Definition at line 676 of file Sema.h.

## ◆ TypeTagMagicValue

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

A pair of ArgumentKind identifier and magic value.

This uniquely identifies the magic value.

Definition at line 11841 of file Sema.h.

## ◆ TypeTy

typedef OpaquePtr<QualType> clang::Sema::TypeTy

Definition at line 378 of file Sema.h.

## ◆ TypoDiagnosticGenerator

typedef std::function<void(const TypoCorrection &)> clang::Sema::TypoDiagnosticGenerator

Definition at line 3536 of file Sema.h.

## ◆ TypoRecoveryCallback

typedef std::function<ExprResult(Sema &, TypoExpr *, TypoCorrection)> clang::Sema::TypoRecoveryCallback

Definition at line 3538 of file Sema.h.

## ◆ UnparsedDefaultArgInstantiationsMap

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

Definition at line 1186 of file Sema.h.

## ◆ UnusedFileScopedDeclsType

typedef LazyVector<const DeclaratorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2> clang::Sema::UnusedFileScopedDeclsType

Definition at line 686 of file Sema.h.

## ◆ VarsWithInheritedDSAType

using clang::Sema::VarsWithInheritedDSAType = llvm::SmallDenseMap<const ValueDecl *, const Expr *, 4>

Definition at line 9863 of file Sema.h.

## ◆ VTableUse

typedef std::pair<CXXRecordDecl*, SourceLocation> clang::Sema::VTableUse

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

Definition at line 6498 of file Sema.h.

## Member Enumeration Documentation

## ◆ AbstractDiagSelID

enum clang::Sema::AbstractDiagSelID

Enumerator
AbstractNone |
AbstractReturnType |
AbstractParamType |
AbstractVariableType |
AbstractFieldType |
AbstractIvarType |
AbstractSynthesizedIvarType |
AbstractArrayType |

Definition at line 6793 of file Sema.h.

## ◆ AccessResult

enum clang::Sema::AccessResult

Enumerator
AR_accessible |
AR_inaccessible |
AR_dependent |
AR_delayed |

Definition at line 6714 of file Sema.h.

## ◆ AllocationFunctionScope

enum clang::Sema::AllocationFunctionScope

The scope in which to find allocation functions.

Enumerator
AFS_Global | Only look for allocation functions in the global scope.
AFS_Class | Only look for allocation functions in the scope of the allocated class.
AFS_Both | Look for allocation functions in both the global scope and in the scope of the allocated class.

Definition at line 5724 of file Sema.h.

## ◆ ARCConversionResult

enum clang::Sema::ARCConversionResult

Enumerator
ACR_okay |
ACR_unbridged |
ACR_error |

Definition at line 10932 of file Sema.h.

## ◆ ArithConvKind

enum clang::Sema::ArithConvKind

Context in which we're performing a usual arithmetic conversion.

Enumerator
ACK_Arithmetic | An arithmetic operation.
ACK_BitwiseOp | A bitwise operation.
ACK_Comparison | A comparison.
ACK_Conditional | A conditional (?:) operator.
ACK_CompAssign | A compound assignment expression.

Definition at line 10575 of file Sema.h.

## ◆ AssignConvertType

enum clang::Sema::AssignConvertType

AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the assignment was allowed.

These checks are done for simple assignments, as well as initialization, return from function, argument passing, etc. The query is phrased in terms of a source and destination type.

Enumerator
Compatible | Compatible - the types are compatible according to the standard.
PointerToInt | PointerToInt - The assignment converts a pointer to an int, which we accept as an extension.
IntToPointer | IntToPointer - The assignment converts an int to a pointer, which we accept as an extension.
FunctionVoidPointer | FunctionVoidPointer - The assignment is between a function pointer and void*, which the standard doesn't allow, but we accept as an extension.
IncompatiblePointer | IncompatiblePointer - The assignment is between two pointers types that are not compatible, but we accept them as an extension.
IncompatiblePointerSign | IncompatiblePointerSign - The assignment is between two pointers types which point to integers which have a different sign, but are otherwise identical. This is a subset of the above, but broken out because it's by far the most common case of incompatible pointers.
CompatiblePointerDiscardsQualifiers | CompatiblePointerDiscardsQualifiers - The assignment discards c/v/r qualifiers, which we accept as an extension.
IncompatiblePointerDiscardsQualifiers | IncompatiblePointerDiscardsQualifiers - The assignment discards qualifiers that we don't permit to be discarded, like address spaces.
IncompatibleNestedPointerAddressSpaceMismatch | IncompatibleNestedPointerAddressSpaceMismatch - The assignment changes address spaces in nested pointer types which is not allowed. For instance, converting __private int ** to __generic int ** is illegal even though __private could be converted to __generic.
IncompatibleNestedPointerQualifiers | IncompatibleNestedPointerQualifiers - The assignment is between two nested pointer types, and the qualifiers other than the first two levels differ e.g. char ** -> const char **, but we accept them as an extension.
IncompatibleVectors | IncompatibleVectors - The assignment is between two vector types that have the same size, which we accept as an extension.
IntToBlockPointer | IntToBlockPointer - The assignment converts an int to a block pointer. We disallow this.
IncompatibleBlockPointer | IncompatibleBlockPointer - The assignment is between two block pointers types that are not compatible.
IncompatibleObjCQualifiedId | IncompatibleObjCQualifiedId - The assignment is between a qualified id type and something else (that is incompatible with it). For example, "id <XXX>" = "Foo *", where "Foo *" doesn't implement the XXX protocol.
IncompatibleObjCWeakRef | IncompatibleObjCWeakRef - Assigning a weak-unavailable object to an object with __weak qualifier.
Incompatible | Incompatible - We reject this conversion outright, it is invalid to represent it in the AST.

Definition at line 10601 of file Sema.h.

## ◆ AssignmentAction

enum clang::Sema::AssignmentAction

Enumerator
AA_Assigning |
AA_Passing |
AA_Returning |
AA_Converting |
AA_Initializing |
AA_Sending |
AA_Casting |
AA_Passing_CFAudited |

Definition at line 2894 of file Sema.h.

## ◆ AssumedTemplateKind

enum clang::Sema::AssumedTemplateKind
| strong

Enumerator
None | This is not assumed to be a template name.
FoundNothing | This is assumed to be a template name because lookup found nothing.
FoundFunctions | This is assumed to be a template name because lookup found one or more functions (but no function templates).

Definition at line 6845 of file Sema.h.

## ◆ AtomicArgumentOrder

enum clang::Sema::AtomicArgumentOrder
| strong

Enumerator
API |
AST |

Definition at line 4847 of file Sema.h.

## ◆ AvailabilityMergeKind

enum clang::Sema::AvailabilityMergeKind

Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability").

Enumerator
AMK_None | Don't merge availability attributes at all.
AMK_Redeclaration | Merge availability attributes for a redeclaration, which requires an exact match.
AMK_Override | Merge availability attributes for an override, which requires an exact match or a weakening of constraints.
AMK_ProtocolImplementation | Merge availability attributes for an implementation of a protocol requirement.

Definition at line 2791 of file Sema.h.

## ◆ AvailabilityPriority

enum clang::Sema::AvailabilityPriority : int

Describes the kind of priority given to an availability attribute.

The sum of priorities deteremines the final priority of the attribute. The final priority determines how the attribute will be merged. An attribute with a lower priority will always remove higher priority attributes for the specified platform when it is being applied. An attribute with a higher priority will not be applied if the declaration already has an availability attribute with a lower priority for the specified platform. The final prirority values are not expected to match the values in this enumeration, but instead should be treated as a plain integer value. This enumeration just names the priority weights that are used to calculate that final vaue.

Enumerator
AP_Explicit | The availability attribute was specified explicitly next to the declaration.
AP_PragmaClangAttribute | The availability attribute was applied using '#pragma clang attribute'.
AP_InferredFromOtherPlatform | The availability attribute for a specific platform was inferred from an availability attribute for another platform.

Definition at line 2817 of file Sema.h.

## ◆ BuildForRangeKind

enum clang::Sema::BuildForRangeKind

Enumerator
BFRK_Build | Initial building of a for-range statement.
BFRK_Rebuild | Instantiation or recovery rebuild of a for-range statement. Don't attempt any typo-correction.
BFRK_Check | Determining whether a for-range statement could be built. Avoid any unnecessary or irreversible actions.

Definition at line 4195 of file Sema.h.

## ◆ CallingConventionIgnoredReason

enum clang::Sema::CallingConventionIgnoredReason
| strong

Describes the reason a calling convention specification was ignored, used for diagnostics.

Enumerator
ForThisTarget |
VariadicFunction |
ConstructorDestructor |
BuiltinFunction |

Definition at line 12020 of file Sema.h.

## ◆ CCEKind

enum clang::Sema::CCEKind

Contexts in which a converted constant expression is required.

Enumerator
CCEK_CaseValue | Expression in a case label.
CCEK_Enumerator | Enumerator value with fixed underlying type.
CCEK_TemplateArg | Value of a non-type template parameter.
CCEK_NewExpr | Constant expression in a noptr-new-declarator.
CCEK_ConstexprIf | Condition in a constexpr if statement.
CCEK_ExplicitBool | Condition in an explicit(bool) specifier.

Definition at line 3005 of file Sema.h.

## ◆ CheckConstexprKind

enum clang::Sema::CheckConstexprKind
| strong

Enumerator
Diagnose | Diagnose issues that are non-constant or that are extensions.
CheckValid | Identify whether this function satisfies the formal rules for constexpr functions in the current lanugage mode (with no extensions).

Definition at line 2218 of file Sema.h.

## ◆ CheckedConversionKind

enum clang::Sema::CheckedConversionKind

The kind of conversion being performed.

Enumerator
CCK_ImplicitConversion | An implicit conversion.
CCK_CStyleCast | A C-style cast.
CCK_FunctionalCast | A functional-style cast.
CCK_OtherCast | A cast other than a C-style cast.
CCK_ForBuiltinOverloadedOp | A conversion for an operand of a builtin overloaded operator.

Definition at line 10456 of file Sema.h.

## ◆ CheckTemplateArgumentKind

enum clang::Sema::CheckTemplateArgumentKind

Specifies the context in which a particular template argument is being checked.

Enumerator
CTAK_Specified | The template argument was specified in the code or was instantiated with some deduced template arguments.
CTAK_Deduced | The template argument was deduced via template argument deduction.
CTAK_DeducedFromArrayBound | The template argument was deduced from an array bound via template argument deduction.

Definition at line 7143 of file Sema.h.

## ◆ ComparisonCategoryUsage

enum clang::Sema::ComparisonCategoryUsage
| strong

Enumerator
OperatorInExpression | The '<=>' operator was used in an expression and a builtin operator was selected.
DefaultedOperator | A defaulted 'operator<=>' needed the comparison category. This typically only applies to 'std::strong_ordering', due to the implicit fallback return value.

Definition at line 5081 of file Sema.h.

## ◆ ConditionKind

enum clang::Sema::ConditionKind
| strong

Enumerator
Boolean | A boolean condition, from 'if', 'while', 'for', or 'do'.
ConstexprIf | A constant boolean condition from 'if constexpr'.
Switch | An integral condition for a 'switch' statement.

Definition at line 11026 of file Sema.h.

## ◆ CopyElisionSemanticsKind

enum clang::Sema::CopyElisionSemanticsKind

Enumerator
CES_Strict |
CES_AllowParameters |
CES_AllowDifferentTypes |
CES_AllowExceptionVariables |
CES_FormerDefault |
CES_Default |
CES_AsIfByStdMove |

Definition at line 4246 of file Sema.h.

## ◆ CorrectTypoKind

enum clang::Sema::CorrectTypoKind

Enumerator
CTK_NonError |
CTK_ErrorRecovery |

Definition at line 3667 of file Sema.h.

## ◆ CUDAFunctionPreference

enum clang::Sema::CUDAFunctionPreference

Enumerator
CFP_Never |
CFP_WrongSide |
CFP_HostDevice |
CFP_SameSide |
CFP_Native |

Definition at line 11339 of file Sema.h.

## ◆ CUDAFunctionTarget

enum clang::Sema::CUDAFunctionTarget

Enumerator
CFT_Device |
CFT_Global |
CFT_Host |
CFT_HostDevice |
CFT_InvalidTarget |

Definition at line 11315 of file Sema.h.

## ◆ CXXSpecialMember

enum clang::Sema::CXXSpecialMember

Kinds of C++ special members.

Enumerator
CXXDefaultConstructor |
CXXCopyConstructor |
CXXMoveConstructor |
CXXCopyAssignment |
CXXMoveAssignment |
CXXDestructor |
CXXInvalid |

Definition at line 1240 of file Sema.h.

## ◆ DeduceAutoResult

enum clang::Sema::DeduceAutoResult

Result type of DeduceAutoType.

Enumerator
DAR_Succeeded |
DAR_Failed |
DAR_FailedAlreadyDiagnosed |

Definition at line 7886 of file Sema.h.

## ◆ DefaultedComparisonKind

enum clang::Sema::DefaultedComparisonKind : unsigned char
| strong

Kinds of defaulted comparison operator functions.

Enumerator
None | This is not a defaultable comparison operator.
Equal | This is an operator== that should be implemented as a series of subobject comparisons.
ThreeWay | This is an operator<=> that should be implemented as a series of subobject comparisons.
NotEqual | This is an operator!= that should be implemented as a rewrite in terms of a == comparison.
Relational | This is an <, <=, >, or >= that should be implemented as a rewrite in terms of a <=> comparison.

Definition at line 1259 of file Sema.h.

## ◆ ExpressionEvaluationContext

enum clang::Sema::ExpressionEvaluationContext
| strong

Describes how the expressions currently being parsed are evaluated at run-time, if at all.

Enumerator
Unevaluated | The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7), such as the subexpression of `sizeof`, where the type of the expression may be significant but no code will be generated to evaluate the value of the expression at run time.
UnevaluatedList | The current expression occurs within a braced-init-list within an unevaluated operand. This is mostly like a regular unevaluated context, except that we still instantiate constexpr functions that are referenced here so that we can perform narrowing checks correctly.
DiscardedStatement | The current expression occurs within a discarded statement. This behaves largely similarly to an unevaluated operand in preventing definitions from being required, but not in other ways.
UnevaluatedAbstract | The current expression occurs within an unevaluated operand that unconditionally permits abstract references to fields, such as a SIZE operator in MS-style inline assembly.
ConstantEvaluated | The current context is "potentially evaluated" in C++11 terms, but the expression is evaluated at compile-time (like the values of cases in a switch statement).
PotentiallyEvaluated | The current expression is potentially evaluated at run time, which means that code may be generated to evaluate the value of the expression at run time.
PotentiallyEvaluatedIfUsed | The current expression is potentially evaluated, but any declarations referenced inside that expression are only used if in fact the current expression is used. This value is used when parsing default function arguments, for which we would like to provide diagnostics (e.g., passing non-POD arguments through varargs) but do not want to mark declarations as "referenced" until the default argument is used.

Definition at line 995 of file Sema.h.

## ◆ FormatStringType

enum clang::Sema::FormatStringType

Enumerator
FST_Scanf |
FST_Printf |
FST_NSString |
FST_Strftime |
FST_Strfmon |
FST_Kprintf |
FST_FreeBSDKPrintf |
FST_OSTrace |
FST_OSLog |
FST_Unknown |

Definition at line 11730 of file Sema.h.

## ◆ ForRangeStatus

enum clang::Sema::ForRangeStatus

Enumerator
FRS_Success |
FRS_NoViableFunction |
FRS_DiagnosticIssued |

Definition at line 3324 of file Sema.h.

## ◆ FunctionEmissionStatus

enum clang::Sema::FunctionEmissionStatus
| strong

Status of the function emission on the CUDA/HIP/OpenMP host/device attrs.

Enumerator
Emitted |
CUDADiscarded |
OMPDiscarded |
TemplateDiscarded |
Unknown |

Definition at line 3642 of file Sema.h.

## ◆ IfExistsResult

enum clang::Sema::IfExistsResult

Describes the result of an "if-exists" condition check.

Enumerator
IER_Exists | The symbol exists.
IER_DoesNotExist | The symbol does not exist.
IER_Dependent | The name is a dependent name, so the results will differ from one instantiation to the next.
IER_Error | An error occurred.

Definition at line 4982 of file Sema.h.

## ◆ LiteralOperatorLookupResult

enum clang::Sema::LiteralOperatorLookupResult

The possible outcomes of name lookup for a literal operator.

Enumerator
LOLR_Error | The lookup resulted in an error.
LOLR_ErrorNoDiagnostic | The lookup found no match but no diagnostic was issued.
LOLR_Cooked | The lookup found a single 'cooked' literal operator, which expects a normal literal to be built and passed to it.
LOLR_Raw | The lookup found a single 'raw' literal operator, which expects a string literal containing the spelling of the literal token.
LOLR_Template | The lookup found an overload set of literal operator templates, which expect the characters of the spelling of the literal token to be passed as a non-type template argument pack.
LOLR_StringTemplate | The lookup found an overload set of literal operator templates, which expect the character type and characters of the spelling of the string literal token to be passed as template arguments.

Definition at line 3507 of file Sema.h.

## ◆ LookupNameKind

enum clang::Sema::LookupNameKind

Describes the kind of name lookup to perform.

Enumerator
LookupOrdinaryName | Ordinary name lookup, which finds ordinary names (functions, variables, typedefs, etc.) in C and most kinds of names (functions, variables, members, types, etc.) in C++.
LookupTagName | Tag name lookup, which finds the names of enums, classes, structs, and unions.
LookupLabel | Label name lookup.
LookupMemberName | Member name lookup, which finds the names of class/struct/union members.
LookupOperatorName | Look up of an operator name (e.g., operator+) for use with operator overloading. This lookup is similar to ordinary name lookup, but will ignore any declarations that are class members.
LookupNestedNameSpecifierName | Look up of a name that precedes the '::' scope resolution operator in C++. This lookup completely ignores operator, object, function, and enumerator names (C++ [basic.lookup.qual]p1).
LookupNamespaceName | Look up a namespace name within a C++ using directive or namespace alias definition, ignoring non-namespace names (C++ [basic.lookup.udir]p1).
LookupUsingDeclName | Look up all declarations in a scope with the given name, including resolved using declarations. This is appropriate for checking redeclarations for a using declaration.
LookupRedeclarationWithLinkage | Look up an ordinary name that is going to be redeclared as a name with linkage. This lookup ignores any declarations that are outside of the current scope unless they have linkage. See C99 6.2.2p4-5 and C++ [basic.link]p6.
LookupLocalFriendName | Look up a friend of a local class. This lookup does not look outside the innermost non-class scope. See C++11 [class.friend]p11.
LookupObjCProtocolName | Look up the name of an Objective-C protocol.
LookupObjCImplicitSelfParam | Look up implicit 'self' parameter of an objective-c method.
LookupOMPReductionName | Look up the name of an OpenMP user-defined reduction operation.
LookupOMPMapperName | Look up the name of an OpenMP user-defined mapper.
LookupAnyName | Look up any declaration with any name.

Definition at line 3431 of file Sema.h.

## ◆ MethodMatchStrategy

enum clang::Sema::MethodMatchStrategy

Enumerator
MMS_loose |
MMS_strict |

Definition at line 3932 of file Sema.h.

## ◆ MissingImportKind

enum clang::Sema::MissingImportKind
| strong

Kinds of missing import.

Note, the values of these enumerators correspond to select values in diagnostics.

Enumerator
Declaration |
Definition |
DefaultArgument |
ExplicitSpecialization |
PartialSpecialization |

Definition at line 2454 of file Sema.h.

## ◆ ModuleDeclKind

enum clang::Sema::ModuleDeclKind
| strong

Enumerator
Interface | 'export module X;'
Implementation | 'module X;'

Definition at line 2395 of file Sema.h.

## ◆ NameClassificationKind

enum clang::Sema::NameClassificationKind

Describes the result of the name lookup and resolution performed by `ClassifyName()`.

Enumerator
NC_Unknown | This name is not a type or template in this context, but might be something else.
NC_Error | Classification failed; an error has been produced.
NC_Keyword | The name has been typo-corrected to a keyword.
NC_Type | The name was classified as a type.
NC_NonType | The name was classified as a specific non-type, non-template declaration. ActOnNameClassifiedAsNonType should be called to convert the declaration to an expression.
NC_UndeclaredNonType | The name was classified as an ADL-only function name. ActOnNameClassifiedAsUndeclaredNonType should be called to convert the result to an expression.
NC_DependentNonType | The name denotes a member of a dependent type that could not be resolved. ActOnNameClassifiedAsDependentNonType should be called to convert the result to an expression.
NC_ContextIndependentExpr | The name was classified as a non-type, and an expression representing that name has been formed.
NC_TypeTemplate | The name was classified as a template whose specializations are types.
NC_VarTemplate | The name was classified as a variable template name.
NC_FunctionTemplate | The name was classified as a function template name.
NC_UndeclaredTemplate | The name was classified as an ADL-only function template name.
NC_Concept | The name was classified as a concept name.

Definition at line 1913 of file Sema.h.

## ◆ NonTagKind

enum clang::Sema::NonTagKind

Common ways to introduce type names without a tag for use in diagnostics.

Keep in sync with err_tag_reference_non_tag.

Enumerator
NTK_NonStruct |
NTK_NonClass |
NTK_NonUnion |
NTK_NonEnum |
NTK_Typedef |
NTK_TypeAlias |
NTK_Template |
NTK_TypeAliasTemplate |
NTK_TemplateTemplateArgument |

Definition at line 2516 of file Sema.h.

## ◆ NonTrivialCUnionContext

enum clang::Sema::NonTrivialCUnionContext

Enumerator
NTCUC_FunctionParam |
NTCUC_FunctionReturn |
NTCUC_DefaultInitializedObject |
NTCUC_AutoVar |
NTCUC_CopyInit |
NTCUC_Assignment |
NTCUC_CompoundLiteral |
NTCUC_BlockCapture |
NTCUC_LValueToRValueVolatile |

Definition at line 2266 of file Sema.h.

## ◆ NonTrivialCUnionKind

enum clang::Sema::NonTrivialCUnionKind

Enumerator
NTCUK_Init |
NTCUK_Destruct |
NTCUK_Copy |

Definition at line 2294 of file Sema.h.

## ◆ ObjCContainerKind

enum clang::Sema::ObjCContainerKind

Enumerator
OCK_None |
OCK_Interface |
OCK_Protocol |
OCK_Category |
OCK_ClassExtension |
OCK_Implementation |
OCK_CategoryImplementation |

Definition at line 8861 of file Sema.h.

## ◆ ObjCLiteralKind

enum clang::Sema::ObjCLiteralKind

Enumerator
LK_Array |
LK_Dictionary |
LK_Numeric |
LK_Boxed |
LK_String |
LK_Block |
LK_None |

Definition at line 3105 of file Sema.h.

## ◆ ObjCMessageKind

enum clang::Sema::ObjCMessageKind

Describes the kind of message expression indicated by a message send that starts with an identifier.

Enumerator
ObjCSuperMessage | The message is sent to 'super'.
ObjCInstanceMessage | The message is an instance message.
ObjCClassMessage | The message is a class message, and the identifier is a type name.

Definition at line 9137 of file Sema.h.

## ◆ ObjCSpecialMethodKind

enum clang::Sema::ObjCSpecialMethodKind

Enumerator
OSMK_None |
OSMK_Alloc |
OSMK_New |
OSMK_Copy |
OSMK_RetainingInit |
OSMK_NonRetainingInit |

Definition at line 9073 of file Sema.h.

## ◆ ObjCSubscriptKind

enum clang::Sema::ObjCSubscriptKind

Enumerator
OS_Array |
OS_Dictionary |
OS_Error |

Definition at line 3096 of file Sema.h.

## ◆ OverloadKind

enum clang::Sema::OverloadKind

C++ Overloading.

Enumerator
Ovl_Overload | This is a legitimate overload: the existing declarations are functions or function templates with different signatures.
Ovl_Match | This is not an overload because the signature exactly matches an existing declaration.
Ovl_NonFunction | This is not an overload because the lookup results contain a non-function.

Definition at line 2906 of file Sema.h.

## ◆ ParserCompletionContext

enum clang::Sema::ParserCompletionContext

Describes the context in which code completion occurs.

Enumerator
PCC_Namespace | Code completion occurs at top-level or namespace context.
PCC_Class | Code completion occurs within a class, struct, or union.
PCC_ObjCInterface | Code completion occurs within an Objective-C interface, protocol, or category.
PCC_ObjCImplementation | Code completion occurs within an Objective-C implementation or category implementation.
PCC_ObjCInstanceVariableList | Code completion occurs within the list of instance variables in an Objective-C interface, protocol, category, or implementation.
PCC_Template | Code completion occurs following one or more template headers.
PCC_MemberTemplate | Code completion occurs following one or more template headers within a class.
PCC_Expression | Code completion occurs within an expression.
PCC_Statement | Code completion occurs within a statement, which may also be an expression or a declaration.
PCC_ForInit | Code completion occurs at the beginning of the initialization statement (or expression) in a for loop.
PCC_Condition | Code completion occurs within the condition of an if, while, switch, or for statement.
PCC_RecoveryInFunction | Code completion occurs within the body of a function on a recovery path, where we do not have a specific handle on our position in the grammar.
PCC_Type | Code completion occurs where only a type is permitted.
PCC_ParenthesizedExpression | Code completion occurs in a parenthesized expression, which might also be a type cast.
PCC_LocalDeclarationSpecifiers | Code completion occurs within a sequence of declaration specifiers within a function, method, or block.

Definition at line 11454 of file Sema.h.

## ◆ PragmaClangSectionAction

enum clang::Sema::PragmaClangSectionAction

Enumerator
PCSA_Set |
PCSA_Clear |

Definition at line 435 of file Sema.h.

## ◆ PragmaClangSectionKind

enum clang::Sema::PragmaClangSectionKind

pragma clang section kind

Enumerator
PCSK_Invalid |
PCSK_BSS |
PCSK_Data |
PCSK_Rodata |
PCSK_Text |
PCSK_Relro |

Definition at line 426 of file Sema.h.

## ◆ PragmaMsStackAction

enum clang::Sema::PragmaMsStackAction

Enumerator
PSK_Reset |
PSK_Set |
PSK_Push |
PSK_Pop |
PSK_Show |
PSK_Push_Set |
PSK_Pop_Set |

Definition at line 456 of file Sema.h.

## ◆ PragmaOptionsAlignKind

enum clang::Sema::PragmaOptionsAlignKind

Enumerator
POAK_Native |
POAK_Natural |
POAK_Packed |
POAK_Power |
POAK_Mac68k |
POAK_Reset |

Definition at line 9270 of file Sema.h.

## ◆ PragmaPackDiagnoseKind

enum clang::Sema::PragmaPackDiagnoseKind
| strong

Enumerator
NonDefaultStateAtInclude |
ChangedStateAtExit |

Definition at line 9292 of file Sema.h.

## ◆ PragmaSectionKind

enum clang::Sema::PragmaSectionKind

Enumerator
PSK_DataSeg |
PSK_BSSSeg |
PSK_ConstSeg |
PSK_CodeSeg |

Definition at line 9321 of file Sema.h.

## ◆ RedeclarationKind

enum clang::Sema::RedeclarationKind

Specifies whether (or how) name lookup is being performed for a redeclaration (vs.

a reference).

Enumerator
NotForRedeclaration | The lookup is a reference to this name that is not for the purpose of redeclaring the name.
ForVisibleRedeclaration | The lookup results will be used for redeclaration of a name, if an entity by that name already exists and is visible.
ForExternalRedeclaration | The lookup results will be used for redeclaration of a name with external linkage; non-visible lookup results with external linkage may also be found.

Definition at line 3482 of file Sema.h.

## ◆ ReferenceCompareResult

enum clang::Sema::ReferenceCompareResult

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).

Enumerator
Ref_Incompatible | Ref_Incompatible - The two types are incompatible, so direct reference binding is not possible.
Ref_Related | Ref_Related - The two types are reference-related, which means that their unqualified forms (T1 and T2) are either the same or T1 is a base class of T2.
Ref_Compatible | Ref_Compatible - The two types are reference-compatible.

Definition at line 10861 of file Sema.h.

## ◆ ResultTypeCompatibilityKind

enum clang::Sema::ResultTypeCompatibilityKind

Describes the compatibility of a result type with its method.

Enumerator
RTC_Compatible |
RTC_Incompatible |
RTC_Unknown |

Definition at line 9257 of file Sema.h.

## ◆ RetainOwnershipKind

enum clang::Sema::RetainOwnershipKind
| strong

Enumerator
NS |
CF |
OS |

Definition at line 9497 of file Sema.h.

## ◆ ReuseLambdaContextDecl_t

enum clang::Sema::ReuseLambdaContextDecl_t

Enumerator
ReuseLambdaContextDecl |

Definition at line 4437 of file Sema.h.

## ◆ TagUseKind

enum clang::Sema::TagUseKind

Enumerator
TUK_Reference |
TUK_Declaration |
TUK_Definition |
TUK_Friend |

Definition at line 2537 of file Sema.h.

## ◆ TemplateDeductionResult

enum clang::Sema::TemplateDeductionResult

Describes the result of template argument deduction.

The TemplateDeductionResult enumeration describes the result of template argument deduction, as returned from DeduceTemplateArguments(). The separate TemplateDeductionInfo structure provides additional information about the results of template argument deduction, e.g., the deduced template argument list (if successful) or the specific template parameters or deduced arguments that were involved in the failure.

Enumerator
TDK_Success | Template argument deduction was successful.
TDK_Invalid | The declaration was invalid; do nothing.
TDK_InstantiationDepth | Template argument deduction exceeded the maximum template instantiation depth (which has already been diagnosed).
TDK_Incomplete | Template argument deduction did not deduce a value for every template parameter.
TDK_IncompletePack | Template argument deduction did not deduce a value for every expansion of an expanded template parameter pack.
TDK_Inconsistent | Template argument deduction produced inconsistent deduced values for the given template parameter.
TDK_Underqualified | Template argument deduction failed due to inconsistent cv-qualifiers on a template parameter type that would otherwise be deduced, e.g., we tried to deduce T in "const T" but were given a non-const "X".
TDK_SubstitutionFailure | Substitution of the deduced template argument values resulted in an error.
TDK_DeducedMismatch | After substituting deduced template arguments, a dependent parameter type did not match the corresponding argument.
TDK_DeducedMismatchNested | After substituting deduced template arguments, an element of a dependent parameter type did not match the corresponding element of the corresponding argument (when deducing from an initializer list).
TDK_NonDeducedMismatch | A non-depnedent component of the parameter did not match the corresponding component of the argument.
TDK_TooManyArguments | When performing template argument deduction for a function template, there were too many call arguments.
TDK_TooFewArguments | When performing template argument deduction for a function template, there were too few call arguments.
TDK_InvalidExplicitArguments | The explicitly-specified template arguments were not valid template arguments for the given template.
TDK_NonDependentConversionFailure | Checking non-dependent argument conversions failed.
TDK_ConstraintsNotSatisfied | The deduced arguments did not satisfy the constraints associated with the template.
TDK_MiscellaneousDeductionFailure | Deduction failed; that's all we know.
TDK_CUDATargetMismatch | CUDA Target attributes do not match.

Definition at line 7752 of file Sema.h.

## ◆ TemplateNameKindForDiagnostics

enum clang::Sema::TemplateNameKindForDiagnostics
| strong

Describes the detailed kind of a template name. Used in diagnostics.

Enumerator
ClassTemplate |
FunctionTemplate |
VarTemplate |
AliasTemplate |
TemplateTemplateParam |
Concept |
DependentTemplate |

Definition at line 2109 of file Sema.h.

## ◆ TemplateParameterListEqualKind

enum clang::Sema::TemplateParameterListEqualKind

Enumeration describing how template parameter lists are compared for equality.

Enumerator
TPL_TemplateMatch | We are matching the template parameter lists of two templates that might be redeclarations. template<typename T> struct X; template<typename T> struct X;
TPL_TemplateTemplateParmMatch | We are matching the template parameter lists of two template template parameters as part of matching the template parameter lists of two templates that might be redeclarations. template<template<int I> class TT> struct X; template<template<int Value> class Other> struct X;
TPL_TemplateTemplateArgumentMatch | We are matching the template parameter lists of a template template argument against the template parameter lists of a template template parameter. template<template<int Value> class Metafun> struct X; template<int Value> struct integer_c; X<integer_c> xic;

Definition at line 7227 of file Sema.h.

## ◆ TemplateParamListContext

enum clang::Sema::TemplateParamListContext

The context in which we are checking a template parameter list.

Enumerator
TPC_ClassTemplate |
TPC_VarTemplate |
TPC_FunctionTemplate |
TPC_ClassTemplateMember |
TPC_FriendClassTemplate |
TPC_FriendFunctionTemplate |
TPC_FriendFunctionTemplateDefinition |
TPC_TypeAliasTemplate |

Definition at line 6962 of file Sema.h.

## ◆ TrivialABIHandling

enum clang::Sema::TrivialABIHandling

Enumerator
TAH_IgnoreTrivialABI | The triviality of a method unaffected by "trivial_abi".
TAH_ConsiderTrivialABI | The triviality of a method affected by "trivial_abi".

Definition at line 2598 of file Sema.h.

## ◆ TryCaptureKind

enum clang::Sema::TryCaptureKind

Enumerator
TryCapture_Implicit |
TryCapture_ExplicitByVal |
TryCapture_ExplicitByRef |

Definition at line 4479 of file Sema.h.

## ◆ TUFragmentKind

enum clang::Sema::TUFragmentKind

Enumerator
Global | The global module fragment, between 'module;' and a module-declaration.
Normal | A normal translation unit fragment. For a non-module unit, this is the entire translation unit. Otherwise, it runs from the module-declaration to the private-module-fragment (if any) or the end of the TU (if not).
Private | The private module fragment, between 'module :private;' and the end of the translation unit.

Definition at line 1442 of file Sema.h.

## ◆ UnexpandedParameterPackContext

enum clang::Sema::UnexpandedParameterPackContext

The context in which an unexpanded parameter pack is being diagnosed.

Note that the values of this enumeration line up with the first argument to the `err_unexpanded_parameter_pack` diagnostic.

Enumerator
UPPC_Expression | An arbitrary expression.
UPPC_BaseType | The base type of a class type.
UPPC_DeclarationType | The type of an arbitrary declaration.
UPPC_DataMemberType | The type of a data member.
UPPC_BitFieldWidth | The size of a bit-field.
UPPC_StaticAssertExpression | The expression in a static assertion.
UPPC_FixedUnderlyingType | The fixed underlying type of an enumeration.
UPPC_EnumeratorValue | The enumerator value.
UPPC_UsingDeclaration | A using declaration.
UPPC_FriendDeclaration | A friend declaration.
UPPC_DeclarationQualifier | A declaration qualifier.
UPPC_Initializer | An initializer.
UPPC_DefaultArgument | A default argument.
UPPC_NonTypeTemplateParameterType | The type of a non-type template parameter.
UPPC_ExceptionType | The type of an exception.
UPPC_PartialSpecialization | Partial specialization.
UPPC_IfExists | Microsoft __if_exists.
UPPC_IfNotExists | Microsoft __if_not_exists.
UPPC_Lambda | Lambda expression.
UPPC_Block | Block expression,.
UPPC_TypeConstraint | A type constraint,.

Definition at line 7399 of file Sema.h.

## ◆ VarArgKind

enum clang::Sema::VarArgKind

Enumerator
VAK_Valid |
VAK_ValidInCXX11 |
VAK_Undefined |
VAK_MSVCUndefined |
VAK_Invalid |

Definition at line 10541 of file Sema.h.

## ◆ VariadicCallType

enum clang::Sema::VariadicCallType

Enumerator
VariadicFunction |
VariadicBlock |
VariadicMethod |
VariadicConstructor |
VariadicDoesNotApply |

Definition at line 10527 of file Sema.h.

## Constructor & Destructor Documentation

## ◆ Sema()

Sema::Sema | ( | Preprocessor & | pp,
|  | ASTContext & | ctxt,
|  | ASTConsumer & | consumer,
|  | TranslationUnitKind | TUKind = `TU_Complete`,
|  | CodeCompleteConsumer * | CompletionConsumer = `nullptr`
| ) |  |

Definition at line 145 of file Sema.cpp.

## ◆ ~Sema()

Sema::~Sema | ( |  | ) |

Definition at line 377 of file Sema.cpp.

References Consumer, Context, FreeVisContext(), FunctionScopes, clang::ASTContext::getExternalSource(), Node, clang::sema::SemaPPCallbacks::reset(), clang::threadSafety::threadSafetyCleanup(), ThreadSafetyDeclCache, and VisContext.

## Member Function Documentation

## ◆ ActOnAbortSEHFinallyBlock()

void Sema::ActOnAbortSEHFinallyBlock | ( |  | ) |

Definition at line 4226 of file SemaStmt.cpp.

## ◆ ActOnAccessSpecifier()

bool Sema::ActOnAccessSpecifier | ( | AccessSpecifier | Access,
|  | SourceLocation | ASLoc,
|  | SourceLocation | ColonLoc,
|  | const ParsedAttributesView & | Attrs
| ) |  |

ActOnAccessSpecifier - Parsed an access specifier followed by a colon.

Definition at line 2957 of file SemaDeclCXX.cpp.

References clang::AS_none, and clang::AccessSpecDecl::Create().

## ◆ ActOnAddrLabel()

ExprResult Sema::ActOnAddrLabel | ( | SourceLocation | OpLoc,
|  | SourceLocation | LabLoc,
|  | LabelDecl * | TheDecl
| ) |  |

ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".

Definition at line 13893 of file SemaExpr.cpp.

References clang::Decl::markUsed().

## ◆ ActOnAliasDeclaration()

Decl * Sema::ActOnAliasDeclaration | ( | Scope * | CurScope,
|  | AccessSpecifier | AS,
|  | MultiTemplateParamsArg | TemplateParams,
|  | SourceLocation | UsingLoc,
|  | UnqualifiedId & | Name,
|  | const ParsedAttributesView & | AttrList,
|  | TypeResult | Type,
|  | Decl * | DeclFromDeclSpec
| ) |  |

Definition at line 12123 of file SemaDeclCXX.cpp.

## ◆ ActOnArraySubscriptExpr()

ExprResult Sema::ActOnArraySubscriptExpr | ( | Scope * | S,
|  | Expr * | Base,
|  | SourceLocation | LLoc,
|  | Expr * | Idx,
|  | SourceLocation | RLoc
| ) |  |

Definition at line 4452 of file SemaExpr.cpp.

## ◆ ActOnArrayTypeTrait()

ExprResult Sema::ActOnArrayTypeTrait | ( | ArrayTypeTrait | ATT,
|  | SourceLocation | KWLoc,
|  | ParsedType | LhsTy,
|  | Expr * | DimExpr,
|  | SourceLocation | RParen
| ) |  |

ActOnArrayTypeTrait - Parsed one of the binary type trait support pseudo-functions.

Definition at line 5296 of file SemaExprCXX.cpp.

References BuildArrayTypeTrait(), Context, clang::ASTContext::getTrivialTypeSourceInfo(), and GetTypeFromParser().

Referenced by TypeTraitArity().

## ◆ ActOnAsTypeExpr()

ExprResult Sema::ActOnAsTypeExpr | ( | Expr * | E,
|  | ParsedType | ParsedDestTy,
|  | SourceLocation | BuiltinLoc,
|  | SourceLocation | RParenLoc
| ) |  |

__builtin_astype(...)

ActOnAsTypeExpr - create a new asType (bitcast) from the arguments.

__builtin_astype( value, dst type )

Definition at line 5876 of file SemaExpr.cpp.

References clang::Expr::getType(), clang::OK_Ordinary, and clang::VK_RValue.

## ◆ ActOnAtEnd()

Decl * Sema::ActOnAtEnd | ( | Scope * | S,
|  | SourceRange | AtEnd,
|  | ArrayRef< Decl *> | allMethods = `None`,
|  | ArrayRef< DeclGroupPtrTy > | allTUVars = `None`
| ) |  |

Check for instance method of the same name with incompatible types

The following allows us to typecheck messages to "id".

Check for class method of the same name with incompatible types

Definition at line 3903 of file SemaDeclObjC.cpp.

## ◆ ActOnAttributedStmt()

StmtResult Sema::ActOnAttributedStmt | ( | SourceLocation | AttrLoc,
|  | ArrayRef< const Attr *> | Attrs,
|  | Stmt * | SubStmt
| ) |  |

Definition at line 540 of file SemaStmt.cpp.

References clang::AttributedStmt::Create().

Referenced by clang::TreeTransform< Derived >::RebuildAttributedStmt().

## ◆ ActOnBaseSpecifier()

BaseResult Sema::ActOnBaseSpecifier | ( | Decl * | classdecl,
|  | SourceRange | SpecifierRange,
|  | ParsedAttributes & | Attributes,
|  | bool | Virtual,
|  | AccessSpecifier | Access,
|  | ParsedType | basetype,
|  | SourceLocation | BaseLoc,
|  | SourceLocation | EllipsisLoc
| ) |  |

ActOnBaseSpecifier - Parsed a base specifier.

A base specifier is one entry in the base class list of a class specifier, for example: class foo : public bar, virtual private baz { 'public bar' and 'virtual private baz' are each base-specifiers.

Definition at line 2555 of file SemaDeclCXX.cpp.

References Diag(), clang::SourceRange::getBegin(), clang::AttributeCommonInfo::IgnoredAttribute, clang::SourceLocation::isInvalid(), clang::Decl::setInvalidDecl(), clang::CXXRecordDecl::setIsParsingBaseSpecifiers(), and clang::AttributeCommonInfo::UnknownAttribute.

## ◆ ActOnBaseSpecifiers()

void Sema::ActOnBaseSpecifiers | ( | Decl * | ClassDecl,
|  | MutableArrayRef< CXXBaseSpecifier *> | Bases
| ) |  |

ActOnBaseSpecifiers - Attach the given base specifiers to the class, after checking whether there are any duplicate base classes.

Definition at line 2733 of file SemaDeclCXX.cpp.

## ◆ ActOnBinOp()

ExprResult Sema::ActOnBinOp | ( | Scope * | S,
|  | SourceLocation | TokLoc,
|  | tok::TokenKind | Kind,
|  | Expr * | LHSExpr,
|  | Expr * | RHSExpr
| ) |  |

Definition at line 13407 of file SemaExpr.cpp.

References DiagnoseBinOpPrecedence().

Referenced by clang::Parser::ParseConstraintLogicalAndExpression(), and clang::Parser::ParseConstraintLogicalOrExpression().

## ◆ ActOnBlockArguments()

void Sema::ActOnBlockArguments | ( | SourceLocation | CaretLoc,
|  | Declarator & | ParamInfo,
|  | Scope * | CurScope
| ) |  |

ActOnBlockArguments - This callback allows processing of block arguments.

If there are no arguments, this is still invoked.

Definition at line 14238 of file SemaExpr.cpp.

References clang::Qualifiers::addConst(), clang::BlockLiteralContext, clang::Declarator::getContext(), clang::Declarator::getIdentifier(), clang::TypeSourceInfo::getType(), clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.

## ◆ ActOnBlockError()

void Sema::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.

Definition at line 14355 of file SemaExpr.cpp.

## ◆ ActOnBlockStart()

void Sema::ActOnBlockStart | ( | SourceLocation | CaretLoc,
|  | Scope * | CurScope
| ) |  |

ActOnBlockStart - This callback is invoked when a block literal is started.

Definition at line 14209 of file SemaExpr.cpp.

References clang::BlockDecl::Create().

## ◆ ActOnBlockStmtExpr()

ExprResult Sema::ActOnBlockStmtExpr | ( | SourceLocation | CaretLoc,
|  | Stmt * | Body,
|  | Scope * | CurScope
| ) |  |

ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully completed.

^(int x){...}

Definition at line 14367 of file SemaExpr.cpp.

References Diag(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, and clang::sema::BlockScopeInfo::TheDecl.

## ◆ ActOnBreakStmt()

StmtResult Sema::ActOnBreakStmt | ( | SourceLocation | BreakLoc,
|  | Scope * | CurScope
| ) |  |

Definition at line 2955 of file SemaStmt.cpp.

## ◆ ActOnBuiltinBitCastExpr()

ExprResult Sema::ActOnBuiltinBitCastExpr | ( | SourceLocation | KWLoc,
|  | Declarator & | Dcl,
|  | ExprResult | Operand,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 335 of file SemaCast.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::Declarator::isInvalidType().

Referenced by TypeTraitArity().

## ◆ ActOnBuiltinOffsetOf()

ExprResult Sema::ActOnBuiltinOffsetOf | ( | Scope * | S,
|  | SourceLocation | BuiltinLoc,
|  | SourceLocation | TypeLoc,
|  | ParsedType | ParsedArgTy,
|  | ArrayRef< OffsetOfComponent > | Components,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 14146 of file SemaExpr.cpp.

## ◆ ActOnCallExpr()

ExprResult Sema::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.

This provides the location of the left/right parens and a list of comma locations.

Definition at line 5708 of file SemaExpr.cpp.

References Diag(), clang::Expr::getExprLoc(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ ActOnCapScopeReturnStmt()

StmtResult Sema::ActOnCapScopeReturnStmt | ( | SourceLocation | ReturnLoc,
|  | Expr * | RetValExp
| ) |  |

ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes.

Definition at line 3261 of file SemaStmt.cpp.

References clang::sema::LambdaScopeInfo::CallOperator, clang::ReturnStmt::Create(), clang::ActionResult< PtrTy, CompressInvalid >::get(), hasDeducedReturnType(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::sema::CapturingScopeInfo::ReturnType, and clang::StmtError().

## ◆ ActOnCapturedRegionEnd()

StmtResult Sema::ActOnCapturedRegionEnd | ( | Stmt * | S | ) |

Definition at line 4441 of file SemaStmt.cpp.

## ◆ ActOnCapturedRegionError()

void Sema::ActOnCapturedRegionError | ( |  | ) |

Definition at line 4426 of file SemaStmt.cpp.

References clang::Decl::setInvalidDecl(), and clang::sema::CapturedRegionScopeInfo::TheRecordDecl.

## ◆ ActOnCapturedRegionStart() [1/2]

void Sema::ActOnCapturedRegionStart | ( | SourceLocation | Loc,
|  | Scope * | CurScope,
|  | CapturedRegionKind | Kind,
|  | unsigned | NumParams
| ) |  |

Definition at line 4338 of file SemaStmt.cpp.

References clang::CapturedDecl::castToDeclContext().

## ◆ ActOnCapturedRegionStart() [2/2]

void Sema::ActOnCapturedRegionStart | ( | SourceLocation | Loc,
|  | Scope * | CurScope,
|  | CapturedRegionKind | Kind,
|  | ArrayRef< CapturedParamNameType > | Params,
|  | unsigned | OpenMPCaptureLevel = `0`
| ) |  |

Definition at line 4367 of file SemaStmt.cpp.

References clang::CapturedDecl::castToDeclContext().

## ◆ ActOnCaseExpr()

ExprResult Sema::ActOnCaseExpr | ( | SourceLocation | CaseLoc,
|  | ExprResult | Val
| ) |  |

Definition at line 424 of file SemaStmt.cpp.

References CheckConvertedConstantExpression(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::isDependentType(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

Referenced by clang::Parser::ParseCaseExpression().

## ◆ ActOnCaseStmt()

StmtResult Sema::ActOnCaseStmt | ( | SourceLocation | CaseLoc,
|  | ExprResult | LHS,
|  | SourceLocation | DotDotDotLoc,
|  | ExprResult | RHS,
|  | SourceLocation | ColonLoc
| ) |  |

Definition at line 474 of file SemaStmt.cpp.

References clang::CaseStmt::Create(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isUnset(), and clang::StmtError().

## ◆ ActOnCaseStmtBody()

void Sema::ActOnCaseStmtBody | ( | Stmt * | CaseStmt,
|  | Stmt * | SubStmt
| ) |  |

ActOnCaseStmtBody - This installs a statement as the body of a case.

Definition at line 499 of file SemaStmt.cpp.

## ◆ ActOnCastExpr()

ExprResult Sema::ActOnCastExpr | ( | Scope * | S,
|  | SourceLocation | LParenLoc,
|  | Declarator & | D,
|  | ParsedType & | Ty,
|  | SourceLocation | RParenLoc,
|  | Expr * | CastExpr
| ) |  |

Definition at line 6774 of file SemaExpr.cpp.

References clang::CPlusPlus, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::ParenExpr::getSubExpr(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::QualType::getTypePtr(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Declarator::isInvalidType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Type::isVectorType(), and clang::Type::isVoidType().

Referenced by TypeTraitArity().

## ◆ ActOnCharacterConstant()

ExprResult Sema::ActOnCharacterConstant | ( | const Token & | Tok,
|  | Scope * | UDLScope = `nullptr`
| ) |  |

Definition at line 3390 of file SemaExpr.cpp.

References clang::ExprError(), clang::Token::getKind(), and clang::Token::getLocation().

## ◆ ActOnChooseExpr()

ExprResult Sema::ActOnChooseExpr | ( | SourceLocation | BuiltinLoc,
|  | Expr * | CondExpr,
|  | Expr * | LHSExpr,
|  | Expr * | RHSExpr,
|  | SourceLocation | RPLoc
| ) |  |

Definition at line 14165 of file SemaExpr.cpp.

References clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::OK_Ordinary, and clang::VK_RValue.

Referenced by clang::TreeTransform< Derived >::RebuildChooseExpr().

## ◆ ActOnClassMessage()

ExprResult Sema::ActOnClassMessage | ( | Scope * | S,
|  | ParsedType | Receiver,
|  | Selector | Sel,
|  | SourceLocation | LBracLoc,
|  | ArrayRef< SourceLocation > | SelectorLocs,
|  | SourceLocation | RBracLoc,
|  | MultiExprArg | Args
| ) |  |

Definition at line 2623 of file SemaExprObjC.cpp.

References clang::ExprError(), and clang::QualType::isNull().

## ◆ ActOnClassPropertyRefExpr()

ExprResult Sema::ActOnClassPropertyRefExpr | ( | IdentifierInfo & | receiverName,
|  | IdentifierInfo & | propertyName,
|  | SourceLocation | receiverNameLoc,
|  | SourceLocation | propertyNameLoc
| ) |  |

Definition at line 2032 of file SemaExprObjC.cpp.

References Diag(), clang::ExprError(), clang::QualType::isNull(), and clang::IdentifierInfo::isStr().

## ◆ ActOnClassTemplateSpecialization()

DeclResult Sema::ActOnClassTemplateSpecialization | ( | Scope * | S,
|  | unsigned | TagSpec,
|  | TagUseKind | TUK,
|  | SourceLocation | KWLoc,
|  | SourceLocation | ModulePrivateLoc,
|  | CXXScopeSpec & | SS,
|  | TemplateIdAnnotation & | TemplateId,
|  | const ParsedAttributesView & | Attr,
|  | MultiTemplateParamsArg | TemplateParameterLists,
|  | SkipBodyInfo * | SkipBody = `nullptr`
| ) |  |

Definition at line 7942 of file SemaTemplate.cpp.

References clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::RAngleLoc, and clang::TemplateIdAnnotation::TemplateNameLoc.

## ◆ ActOnCoawaitExpr()

ExprResult Sema::ActOnCoawaitExpr | ( | Scope * | S,
|  | SourceLocation | KwLoc,
|  | Expr * | E
| ) |  |

Definition at line 693 of file SemaCoroutine.cpp.

Referenced by BuildNonArrayForRange().

## ◆ ActOnComment()

void Sema::ActOnComment | ( | SourceRange | Comment | ) |

Definition at line 1916 of file Sema.cpp.

References clang::ASTContext::addComment(), clang::LangOptions::CommentOpts, Context, clang::FixItHint::CreateReplacement(), Diag(), clang::SourceRange::getBegin(), clang::RawComment::getKind(), clang::SourceLocation::getLocWithOffset(), clang::RawComment::isAlmostTrailingComment(), clang::SourceManager::isInSystemHeader(), LangOpts, clang::RawComment::RCK_OrdinaryBCPL, clang::RawComment::RCK_OrdinaryC, and SourceMgr.

## ◆ ActOnCompatibilityAlias()

Decl * Sema::ActOnCompatibilityAlias | ( | SourceLocation | AtLoc,
|  | IdentifierInfo * | AliasName,
|  | SourceLocation | AliasLocation,
|  | IdentifierInfo * | ClassName,
|  | SourceLocation | ClassLocation
| ) |  |

ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias declaration.

It sets up the alias relationships.

Definition at line 1132 of file SemaDeclObjC.cpp.

References clang::Type::castAs(), CheckObjCDeclScope(), Context, clang::ObjCCompatibleAliasDecl::Create(), CurContext, Diag(), forRedeclarationInCurContext(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), clang::Type::isObjCObjectType(), LookupOrdinaryName, LookupSingleName(), PushOnScopeChains(), and TUScope.

## ◆ ActOnCompoundLiteral()

ExprResult Sema::ActOnCompoundLiteral | ( | SourceLocation | LParenLoc,
|  | ParsedType | Ty,
|  | SourceLocation | RParenLoc,
|  | Expr * | InitExpr
| ) |  |

Definition at line 6159 of file SemaExpr.cpp.

## ◆ ActOnCompoundRequirement() [1/2]

concepts::Requirement * Sema::ActOnCompoundRequirement | ( | Expr * | E,
|  | SourceLocation | NoexceptLoc
| ) |  |

Definition at line 8373 of file SemaExprCXX.cpp.

References BuildExprRequirement().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnCompoundRequirement() [2/2]

concepts::Requirement * Sema::ActOnCompoundRequirement | ( | Expr * | E,
|  | SourceLocation | NoexceptLoc,
|  | CXXScopeSpec & | SS,
|  | TemplateIdAnnotation * | TypeConstraint,
|  | unsigned | Depth
| ) |  |

Definition at line 8379 of file SemaExprCXX.cpp.

References ActOnTypeConstraint(), BuildExprRequirement(), Context, clang::TemplateParameterList::Create(), clang::TemplateTypeParmDecl::Create(), CurContext, clang::IdentifierTable::get(), and clang::ASTContext::Idents.

## ◆ ActOnCompoundStmt()

StmtResult Sema::ActOnCompoundStmt | ( | SourceLocation | L,
|  | SourceLocation | R,
|  | ArrayRef< Stmt *> | Elts,
|  | bool | isStmtExpr
| ) |  |

Definition at line 388 of file SemaStmt.cpp.

References clang::C99, clang::CPlusPlus, clang::CompoundStmt::Create(), Diag(), and clang::Decl::getLocation().

## ◆ ActOnConceptDefinition()

Decl * Sema::ActOnConceptDefinition | ( | Scope * | S,
|  | MultiTemplateParamsArg | TemplateParameterLists,
|  | IdentifierInfo * | Name,
|  | SourceLocation | NameLoc,
|  | Expr * | ConstraintExpr
| ) |  |

Definition at line 8319 of file SemaTemplate.cpp.

## ◆ ActOnCondition()

Sema::ConditionResult Sema::ActOnCondition | ( | Scope * | S,
|  | SourceLocation | Loc,
|  | Expr * | SubExpr,
|  | ConditionKind | CK
| ) |  |

Definition at line 17431 of file SemaExpr.cpp.

## ◆ ActOnConditionalOp()

ExprResult Sema::ActOnConditionalOp | ( | SourceLocation | QuestionLoc,
|  | SourceLocation | ColonLoc,
|  | Expr * | CondExpr,
|  | Expr * | LHSExpr,
|  | Expr * | RHSExpr
| ) |  |

ActOnConditionalOp - Parse a ?: operation.

Note that 'LHS' may be null in the case of a the GNU conditional expr extension.

Definition at line 7914 of file SemaExpr.cpp.

References clang::CPlusPlus, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getValueKind(), clang::Expr::hasPlaceholderType(), clang::Expr::isGLValue(), clang::Expr::isOrdinaryOrBitFieldObject(), clang::Expr::isTypeDependent(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().

Referenced by checkOpenMPLoop(), and clang::Parser::ParseConstraintLogicalOrExpression().

## ◆ ActOnConditionVariable()

Sema::ConditionResult Sema::ActOnConditionVariable | ( | Decl * | ConditionVar,
|  | SourceLocation | StmtLoc,
|  | ConditionKind | CK
| ) |  |

Definition at line 3618 of file SemaExprCXX.cpp.

References CheckConditionVariable(), ConditionError(), ConstexprIf, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and MakeFullExpr().

## ◆ ActOnConstantExpression()

ExprResult Sema::ActOnConstantExpression | ( | ExprResult | Res | ) |

Definition at line 16779 of file SemaExpr.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().

Referenced by clang::Parser::ParseConstantExpressionInExprEvalContext().

## ◆ ActOnContinueStmt()

StmtResult Sema::ActOnContinueStmt | ( | SourceLocation | ContinueLoc,
|  | Scope * | CurScope
| ) |  |

Definition at line 2943 of file SemaStmt.cpp.

## ◆ ActOnConversionDeclarator()

Decl * Sema::ActOnConversionDeclarator | ( | CXXConversionDecl * | Conversion | ) |

ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ conversion function.

This routine is responsible for recording the conversion function in the C++ class, if possible.

Definition at line 10226 of file SemaDeclCXX.cpp.

References clang::Decl::getDeclContext().

## ◆ ActOnConvertVectorExpr()

ExprResult Sema::ActOnConvertVectorExpr | ( | Expr * | E,
|  | ParsedType | ParsedDestTy,
|  | SourceLocation | BuiltinLoc,
|  | SourceLocation | RParenLoc
| ) |  |

__builtin_convertvector(...)

ActOnConvertVectorExpr - create a new convert-vector expression from the provided arguments.

__builtin_convertvector( value, dst type )

Definition at line 5897 of file SemaExpr.cpp.

## ◆ ActOnCoreturnStmt()

StmtResult Sema::ActOnCoreturnStmt | ( | Scope * | S,
|  | SourceLocation | KwLoc,
|  | Expr * | E
| ) |  |

Definition at line 847 of file SemaCoroutine.cpp.

## ◆ ActOnCoroutineBodyStart()

bool Sema::ActOnCoroutineBodyStart | ( | Scope * | S,
|  | SourceLocation | KwLoc,
|  | StringRef | Keyword
| ) |  |

Definition at line 600 of file SemaCoroutine.cpp.

References checkCoroutineContext().

## ◆ ActOnCoyieldExpr()

ExprResult Sema::ActOnCoyieldExpr | ( | Scope * | S,
|  | SourceLocation | KwLoc,
|  | Expr * | E
| ) |  |

Definition at line 792 of file SemaCoroutine.cpp.

## ◆ ActOnCUDAExecConfigExpr()

ExprResult Sema::ActOnCUDAExecConfigExpr | ( | Scope * | S,
|  | SourceLocation | LLLLoc,
|  | MultiExprArg | ExecConfig,
|  | SourceLocation | GGGLoc
| ) |  |

Definition at line 40 of file SemaCUDA.cpp.

## ◆ ActOnCXXBoolLiteral()

ExprResult Sema::ActOnCXXBoolLiteral | ( | SourceLocation | OpLoc,
|  | tok::TokenKind | Kind
| ) |  |

ActOnCXXBoolLiteral - Parse {true,false} literals.

Definition at line 707 of file SemaExprCXX.cpp.

Referenced by clang::Sema::ImplicitExceptionSpecification::getExceptionSpec().

## ◆ ActOnCXXCatchBlock()

StmtResult Sema::ActOnCXXCatchBlock | ( | SourceLocation | CatchLoc,
|  | Decl * | ExDecl,
|  | Stmt * | HandlerBlock
| ) |  |

ActOnCXXCatchBlock - Takes an exception declaration and a handler block and creates a proper catch handler from them.

Definition at line 3962 of file SemaStmt.cpp.

## ◆ ActOnCXXConditionDeclaration()

DeclResult Sema::ActOnCXXConditionDeclaration | ( | Scope * | S,
|  | Declarator & | D
| ) |  |

ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statement.

e.g: "if (int x = f()) {...}"

Definition at line 16692 of file SemaDeclCXX.cpp.

References Diag(), clang::Declarator::getDeclSpec(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), and clang::DeclSpec::SCS_typedef.

## ◆ ActOnCXXDelete()

ExprResult Sema::ActOnCXXDelete | ( | SourceLocation | StartLoc,
|  | bool | UseGlobal,
|  | bool | ArrayForm,
|  | Expr * | ExE
| ) |  |

ActOnCXXDelete - Parsed a C++ 'delete' expression.

ActOnCXXDelete - Parsed a C++ 'delete' expression (C++ 5.3.5), as in:

::delete ptr;

or

delete [] ptr;

Definition at line 3222 of file SemaExprCXX.cpp.

References AA_Passing, clang::AS_public, clang::Type::castAs(), CheckDestructorAccess(), CheckVirtualDtorCall(), Context, clang::FixItHint::CreateInsertion(), clang::ASTContext::DeclarationNames, clang::Default, DefaultLvalueConversion(), Diag(), DiagnoseUseOfDecl(), doesUsualArrayDeleteWantSize(), clang::ExprError(), FindDeallocationFunction(), FindUsualDeallocationFunction(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::Qualifiers::getAddressSpaceAttributePrintValue(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::CXXRecordDecl::getDestructor(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::FunctionDecl::getParamDecl(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasCVRQualifiers(), clang::CXXRecordDecl::hasIrrelevantDestructor(), hasNewExtendedAlignment(), ImpCastExprToType(), clang::Type::isArrayType(), isCompleteType(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isSFINAEContext(), clang::Type::isVoidType(), LookupDestructor(), clang::DeclAccessPair::make(), MarkFunctionReferenced(), clang::ast_matchers::match(), PDiag(), PerformContextualImplicitConversion(), PerformImplicitConversion(), clang::Qualifiers::removeCVRQualifiers(), RequireCompleteType(), clang::Result, and clang::ASTContext::VoidTy.

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnCXXEnterDeclaratorScope()

bool Sema::ActOnCXXEnterDeclaratorScope | ( | Scope * | S,
|  | CXXScopeSpec & | SS
| ) |  |

ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global scope or nested-name-specifier) is parsed, part of a declarator-id.

After this method is called, according to [C++ 3.4.3p3], names should be looked up in the declarator-id's scope, until the declarator is parsed and ActOnCXXExitDeclaratorScope is called. The 'SS' should be a non-empty valid CXXScopeSpec.

Definition at line 1069 of file SemaCXXScopeSpec.cpp.

## ◆ ActOnCXXEnterDeclInitializer()

void Sema::ActOnCXXEnterDeclInitializer | ( | Scope * | S,
|  | Decl * | D
| ) |  |

ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration 'Dcl'.

Invoked when we are about to parse an initializer for the declaration 'Dcl'.

After this method is called, according to [C++ 3.4.1p13], if 'Dcl' is a static data member of class X, names should be looked up in the scope of class X.

After this method is called, according to [C++ 3.4.1p13], if 'Dcl' is a static data member of class X, names should be looked up in the scope of class X. If the declaration had a scope specifier, a scope will have been created and passed in for this purpose. Otherwise, S will be null.

Definition at line 16656 of file SemaDeclCXX.cpp.

References clang::Decl::getDeclContext(), clang::Decl::isInvalidDecl(), isNonlocalVariable(), and clang::Decl::isOutOfLine().

## ◆ ActOnCXXExitDeclaratorScope()

void Sema::ActOnCXXExitDeclaratorScope | ( | Scope * | S,
|  | const CXXScopeSpec & | SS
| ) |  |

ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclaratorScope(), is finished.

'SS' is the same CXXScopeSpec that was passed to ActOnCXXEnterDeclaratorScope as well. Used to indicate that names should revert to being looked up in the defining scope.

Definition at line 1096 of file SemaCXXScopeSpec.cpp.

## ◆ ActOnCXXExitDeclInitializer()

void Sema::ActOnCXXExitDeclInitializer | ( | Scope * | S,
|  | Decl * | Dcl
| ) |  |

ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaration 'Dcl'.

Invoked after we are finished parsing an initializer for the declaration D.

Definition at line 16677 of file SemaDeclCXX.cpp.

References clang::Decl::isInvalidDecl(), isNonlocalVariable(), and clang::Decl::isOutOfLine().

## ◆ ActOnCXXFoldExpr()

ExprResult Sema::ActOnCXXFoldExpr | ( | SourceLocation | LParenLoc,
|  | Expr * | LHS,
|  | tok::TokenKind | Operator,
|  | SourceLocation | EllipsisLoc,
|  | Expr * | RHS,
|  | SourceLocation | RParenLoc
| ) |  |

Handle a C++1z fold-expression: ( expr op ... op expr ).

Definition at line 1160 of file SemaTemplateVariadic.cpp.

References CheckFoldOperand(), clang::Expr::containsUnexpandedParameterPack(), Diag(), clang::Stmt::getSourceRange(), and clang::None.

## ◆ ActOnCXXForRangeDecl()

void Sema::ActOnCXXForRangeDecl | ( | Decl * | D | ) |

Definition at line 12412 of file SemaDecl.cpp.

References Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::DeclaratorDecl::getOuterLocStart(), clang::VarDecl::getStorageClass(), clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_PrivateExtern, clang::SC_Register, clang::SC_Static, clang::VarDecl::setCXXForRangeDecl(), and clang::Decl::setInvalidDecl().

## ◆ ActOnCXXForRangeIdentifier()

StmtResult Sema::ActOnCXXForRangeIdentifier | ( | Scope * | S,
|  | SourceLocation | IdentLoc,
|  | IdentifierInfo * | Ident,
|  | ParsedAttributes & | Attrs,
|  | SourceLocation | AttrEnd
| ) |  |

Definition at line 12455 of file SemaDecl.cpp.

## ◆ ActOnCXXForRangeStmt()

StmtResult Sema::ActOnCXXForRangeStmt | ( | Scope * | S,
|  | SourceLocation | ForLoc,
|  | SourceLocation | CoawaitLoc,
|  | Stmt * | InitStmt,
|  | Stmt * | First,
|  | SourceLocation | ColonLoc,
|  | Expr * | Range,
|  | SourceLocation | RParenLoc,
|  | BuildForRangeKind | Kind
| ) |  |

ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.

C++11 [stmt.ranged]: A range-based for statement is equivalent to

{ auto && __range = range-init; for ( auto __begin = begin-expr, __end = end-expr; __begin != __end; ++__begin ) { for-range-declaration = *__begin; statement } }

The body of the loop is not available yet, since it cannot be analysed until we have determined the type of the for-range-declaration.

Definition at line 2093 of file SemaStmt.cpp.

## ◆ ActOnCXXGlobalScopeSpecifier()

bool Sema::ActOnCXXGlobalScopeSpecifier | ( | SourceLocation | CCLoc,
|  | CXXScopeSpec & | SS
| ) |  |

The parser has parsed a global nested-name-specifier '::'.

Parameters

  CCLoc | The location of the '::'.
  SS | The nested-name-specifier, which will be updated in-place to reflect the parsed nested-name-specifier.

Returns
  true if an error occurred, false otherwise.

Definition at line 272 of file SemaCXXScopeSpec.cpp.

References Context, and clang::CXXScopeSpec::MakeGlobal().

## ◆ ActOnCXXMemberDeclarator()

NamedDecl * Sema::ActOnCXXMemberDeclarator | ( | Scope * | S,
|  | AccessSpecifier | AS,
|  | Declarator & | D,
|  | MultiTemplateParamsArg | TemplateParameterLists,
|  | Expr * | BW,
|  | const VirtSpecifiers & | VS,
|  | InClassInitStyle | InitStyle
| ) |  |

ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed.

'AS' is the access specifier, 'BW' specifies the bitfield width if there is one, 'InitExpr' specifies the initializer if one has been parsed, and 'InitStyle' is set if an in-class initializer is present (but parsing it has been deferred).

Definition at line 3154 of file SemaDeclCXX.cpp.

References clang::Declarator::getDeclSpec().

## ◆ ActOnCXXNamedCast()

ExprResult Sema::ActOnCXXNamedCast | ( | SourceLocation | OpLoc,
|  | tok::TokenKind | Kind,
|  | SourceLocation | LAngleBracketLoc,
|  | Declarator & | D,
|  | SourceLocation | RAngleBracketLoc,
|  | SourceLocation | LParenLoc,
|  | Expr * | E,
|  | SourceLocation | RParenLoc
| ) |  |

ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's.

Definition at line 235 of file SemaCast.cpp.

References clang::ExprError(), clang::Expr::getType(), and clang::Declarator::isInvalidType().

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ ActOnCXXNestedNameSpecifier() [1/2]

bool Sema::ActOnCXXNestedNameSpecifier | ( | Scope * | S,
|  | NestedNameSpecInfo & | IdInfo,
|  | bool | EnteringContext,
|  | CXXScopeSpec & | SS,
|  | bool | ErrorRecoveryLookup = `false`,
|  | bool * | IsCorrectedToColon = `nullptr`,
|  | bool | OnlyNamespace = `false`
| ) |  |

The parser has parsed a nested-name-specifier 'identifier::'.

Parameters

  S | The scope in which this nested-name-specifier occurs.
  IdInfo | Parser information about an identifier in the nested-name-spec.
  EnteringContext | Whether we're entering the context nominated by this nested-name-specifier.
  SS | The nested-name-specifier, which is both an input parameter (the nested-name-specifier before this type) and an output parameter (containing the full nested-name-specifier, including this new type).
  ErrorRecoveryLookup | If true, then this method is called to improve error recovery. In this case do not emit error message.
  IsCorrectedToColon | If not null, suggestions to replace '::' -> ':' are allowed. The bool value pointed by this parameter is set to 'true' if the identifier is treated as if it was followed by ':', not '::'.
  OnlyNamespace | If true, only considers namespaces in lookup.

Returns
  true if an error occurred, false otherwise.

Definition at line 833 of file SemaCXXScopeSpec.cpp.

## ◆ ActOnCXXNestedNameSpecifier() [2/2]

bool Sema::ActOnCXXNestedNameSpecifier | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | TemplateTy | TemplateName,
|  | SourceLocation | TemplateNameLoc,
|  | SourceLocation | LAngleLoc,
|  | ASTTemplateArgsPtr | TemplateArgs,
|  | SourceLocation | RAngleLoc,
|  | SourceLocation | CCLoc,
|  | bool | EnteringContext
| ) |  |

The parser has parsed a nested-name-specifier 'template[opt] template-name < template-args >::'.

Parameters

  S | The scope in which this nested-name-specifier occurs.
  SS | The nested-name-specifier, which is both an input parameter (the nested-name-specifier before this type) and an output parameter (containing the full nested-name-specifier, including this new type).
  TemplateKWLoc | the location of the 'template' keyword, if any.
  TemplateName | the template name.
  TemplateNameLoc | The location of the template name.
  LAngleLoc | The location of the opening angle bracket ('<').
  TemplateArgs | The template arguments.
  RAngleLoc | The location of the closing angle bracket ('>').
  CCLoc | The location of the '::'.
  EnteringContext | Whether we're entering the context of the nested-name-specifier.

Returns
  true if an error occurred, false otherwise.

Definition at line 888 of file SemaCXXScopeSpec.cpp.

## ◆ ActOnCXXNestedNameSpecifierDecltype()

bool Sema::ActOnCXXNestedNameSpecifierDecltype | ( | CXXScopeSpec & | SS,
|  | const DeclSpec & | DS,
|  | SourceLocation | ColonColonLoc
| ) |  |

Definition at line 846 of file SemaCXXScopeSpec.cpp.

References BuildDecltypeType(), Context, Diag(), clang::CXXScopeSpec::Extend(), getLangOpts(), clang::DeclSpec::getRepAsExpr(), clang::TypeLocBuilder::getTypeLocInContext(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::CXXScopeSpec::isInvalid(), clang::TypeLocBuilder::push(), clang::TypeSpecTypeLoc::setNameLoc(), clang::DeclSpec::TST_decltype, and clang::DeclSpec::TST_error.

## ◆ ActOnCXXNew()

ExprResult Sema::ActOnCXXNew | ( | SourceLocation | StartLoc,
|  | bool | UseGlobal,
|  | SourceLocation | PlacementLParen,
|  | MultiExprArg | PlacementArgs,
|  | SourceLocation | PlacementRParen,
|  | SourceRange | TypeIdParens,
|  | Declarator & | D,
|  | Expr * | Initializer
| ) |  |

ActOnCXXNew - Parsed a C++ 'new' expression.

Parsed a C++ 'new' expression (C++ 5.3.4).

E.g.:

new (memory) int[size][4]

or

::new Foo(23, "hello")

Parameters

  StartLoc | The first location of the expression.
  UseGlobal | True if 'new' was prefixed with '::'.
  PlacementLParen | Opening paren of the placement arguments.
  PlacementArgs | Placement new arguments.
  PlacementRParen | Closing paren of the placement arguments.
  TypeIdParens | If the type is in parens, the source range.
  D | The type to be allocated, as well as array dimensions.
  Initializer | The initializing expression or initializer-list, or null if there is none.

Definition at line 1650 of file SemaExprCXX.cpp.

References clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, CCEK_NewExpr, CheckConvertedConstantExpression(), Context, Diag(), clang::Declarator::DropFirstTypeObject(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Declarator::getDeclSpec(), clang::TargetInfo::getIntWidth(), getLangOpts(), clang::Declarator::getNumTypeObjects(), clang::ASTContext::getSizeType(), clang::Declarator::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::Declarator::getTypeObject(), clang::DeclSpec::hasAutoTypeSpec(), clang::DeclaratorChunk::ArrayTypeInfo::hasStatic, clang::Declarator::isInvalidType(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::Loc, clang::DeclaratorChunk::ArrayTypeInfo::NumElts, and VerifyIntegerConstantExpression().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnCXXNullPtrLiteral()

ExprResult Sema::ActOnCXXNullPtrLiteral | ( | SourceLocation | Loc | ) |

ActOnCXXNullPtrLiteral - Parse 'nullptr'.

Definition at line 716 of file SemaExprCXX.cpp.

## ◆ ActOnCXXThis()

ExprResult Sema::ActOnCXXThis | ( | SourceLocation | loc | ) |

C++ 9.3.2: In the body of a non-static member function, the keyword this is a non-lvalue expression whose value is the address of the object for which the function is called.

Definition at line 1258 of file SemaExprCXX.cpp.

References BuildCXXThisExpr(), Diag(), getCurrentThisType(), and clang::QualType::isNull().

Referenced by diagReturnOnAllocFailure().

## ◆ ActOnCXXThrow()

ExprResult Sema::ActOnCXXThrow | ( | Scope * | S,
|  | SourceLocation | OpLoc,
|  | Expr * | expr
| ) |  |

ActOnCXXThrow - Parse throw expressions.

Definition at line 722 of file SemaExprCXX.cpp.

## ◆ ActOnCXXTryBlock()

StmtResult Sema::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.

Definition at line 4079 of file SemaStmt.cpp.

References clang::CUDA, Diag(), clang::sema::FunctionScopeInfo::FirstSEHTryLoc, clang::CXXCatchStmt::getBeginLoc(), clang::CXXCatchStmt::getExceptionDecl(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), and clang::StmtError().

## ◆ ActOnCXXTypeConstructExpr()

ExprResult Sema::ActOnCXXTypeConstructExpr | ( | ParsedType | TypeRep,
|  | SourceLocation | LParenOrBraceLoc,
|  | MultiExprArg | exprs,
|  | SourceLocation | RParenOrBraceLoc,
|  | bool | ListInitialization
| ) |  |

ActOnCXXTypeConstructExpr - Parse construction of a specified type.

Parse construction of a specified type.

Can be interpreted either as function-style casting ("int(x)") or class type construction ("ClassType(x,y,z)") or creation of a value-initialized type ("int()").

Definition at line 1297 of file SemaExprCXX.cpp.

References BuildCXXTypeConstructExpr(), Context, CorrectDelayedTyposInExpr(), clang::ExprError(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), and clang::Result.

## ◆ ActOnCXXTypeid()

ExprResult Sema::ActOnCXXTypeid | ( | SourceLocation | OpLoc,
|  | SourceLocation | LParenLoc,
|  | bool | isType,
|  | void * | TyOrExpr,
|  | SourceLocation | RParenLoc
| ) |  |

ActOnCXXTypeid - Parse typeid( something ).

ActOnCXXTypeidOfType - Parse typeid( type-id ) or typeid (expression);.

Definition at line 539 of file SemaExprCXX.cpp.

References Diag(), clang::ExprError(), and clang::LookupResult::getAsSingle().

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ ActOnCXXUuidof()

ExprResult Sema::ActOnCXXUuidof | ( | SourceLocation | OpLoc,
|  | SourceLocation | LParenLoc,
|  | bool | isType,
|  | void * | TyOrExpr,
|  | SourceLocation | RParenLoc
| ) |  |

ActOnCXXUuidof - Parse __uuidof( something ).

ActOnCXXUuidof - Parse __uuidof( type-id ) or __uuidof (expression);.

Definition at line 673 of file SemaExprCXX.cpp.

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ ActOnDeclarator()

Decl * Sema::ActOnDeclarator | ( | Scope * | S,
|  | Declarator & | D
| ) |  |

Definition at line 5406 of file SemaDecl.cpp.

## ◆ ActOnDeclStmt()

StmtResult Sema::ActOnDeclStmt | ( | DeclGroupPtrTy | Decl,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Definition at line 72 of file SemaStmt.cpp.

References clang::OpaquePtr< PtrTy >::get(), clang::DeclGroupRef::isNull(), and clang::StmtError().

Referenced by clang::CoroutineStmtBuilder::buildDependentStatements(), and noteMemberDeclaredHere().

## ◆ ActOnDecltypeExpression()

ExprResult Sema::ActOnDecltypeExpression | ( | Expr * | E | ) |

Process the expression contained within a decltype.

For such expressions, certain semantic checks on temporaries are delayed until this point, and are omitted for the 'topmost' call in the decltype expression. If the topmost call bound a temporary, strip that temporary off the expression.

Definition at line 6812 of file SemaExprCXX.cpp.

References ActOnParenExpr(), CheckCallReturnType(), CheckPlaceholderExpr(), CheckUnevaluatedOperand(), Context, clang::Sema::ExpressionEvaluationContextRecord::EK_Decltype, clang::Sema::ExpressionEvaluationContextRecord::EK_Other, clang::ExprError(), ExprEvalContexts, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::CallExpr::getBeginLoc(), clang::CallExpr::getCallReturnType(), clang::CallExpr::getDirectCallee(), getLangOpts(), clang::CXXBindTemporaryExpr::getSubExpr(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Result.

## ◆ ActOnDecompositionDeclarator()

NamedDecl * Sema::ActOnDecompositionDeclarator | ( | Scope * | S,
|  | Declarator & | D,
|  | MultiTemplateParamsArg | TemplateParamLists
| ) |  |

Definition at line 687 of file SemaDeclCXX.cpp.

## ◆ ActOnDefaultCtorInitializers()

void Sema::ActOnDefaultCtorInitializers | ( | Decl * | CDtorDecl | ) |

Definition at line 5518 of file SemaDeclCXX.cpp.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnDefaultStmt()

StmtResult Sema::ActOnDefaultStmt | ( | SourceLocation | DefaultLoc,
|  | SourceLocation | ColonLoc,
|  | Stmt * | SubStmt,
|  | Scope * | CurScope
| ) |  |

Definition at line 504 of file SemaStmt.cpp.

References Diag().

## ◆ ActOnDefs()

void Sema::ActOnDefs | ( | Scope * | S,
|  | Decl * | TagD,
|  | SourceLocation | DeclStart,
|  | IdentifierInfo * | ClassName,
|  | SmallVectorImpl< Decl *> & | Decls
| ) |  |

Called whenever @defs(ClassName) is encountered in the source.

Inserts the instance variables of ClassName into Decls.

Definition at line 4981 of file SemaDeclObjC.cpp.

## ◆ ActOnDelayedCXXMethodParameter()

void Sema::ActOnDelayedCXXMethodParameter | ( | Scope * | S,
|  | Decl * | ParamD
| ) |  |

ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration.

We're (re-)introducing the given function parameter into scope for use in parsing later parts of the method declaration. For example, we could see an ActOnParamDefaultArgument event for this parameter.

Definition at line 9714 of file SemaDeclCXX.cpp.

References clang::Scope::AddDecl(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::hasUnparsedDefaultArg(), and clang::ParmVarDecl::setDefaultArg().

## ◆ actOnDelayedExceptionSpecification()

void Sema::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).

The exception-specification was parsed after the method itself was declared.

Definition at line 17259 of file SemaDeclCXX.cpp.

## ◆ ActOnDependentIdExpression()

ExprResult Sema::ActOnDependentIdExpression | ( | const CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | const DeclarationNameInfo & | NameInfo,
|  | bool | isAddressOfOperand,
|  | const TemplateArgumentListInfo * | TemplateArgs
| ) |  |

ActOnDependentIdExpression - Handle a dependent id-expression that was just parsed.

This is only possible with an explicit scope specifier naming a dependent type.

Definition at line 671 of file SemaTemplate.cpp.

References clang::CXXDependentScopeMemberExpr::Create(), and clang::CXXScopeSpec::getScopeRep().

## ◆ ActOnDependentMemberExpr()

ExprResult Sema::ActOnDependentMemberExpr | ( | Expr * | Base,
|  | QualType | BaseType,
|  | bool | IsArrow,
|  | SourceLocation | OpLoc,
|  | const CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | NamedDecl * | FirstQualifierInScope,
|  | const DeclarationNameInfo & | NameInfo,
|  | const TemplateArgumentListInfo * | TemplateArgs
| ) |  |

Definition at line 480 of file SemaExprMember.cpp.

References clang::CXXDependentScopeMemberExpr::Create(), Diag(), clang::ExprError(), clang::Type::getAs(), clang::DeclarationNameInfo::getName(), clang::PointerType::getPointeeType(), clang::DeclarationNameInfo::getSourceRange(), clang::Stmt::getSourceRange(), clang::DeclarationName::isDependentName(), clang::Type::isDependentType(), and clang::Type::isRecordType().

## ◆ ActOnDependentTag()

TypeResult Sema::ActOnDependentTag | ( | Scope * | S,
|  | unsigned | TagSpec,
|  | TagUseKind | TUK,
|  | const CXXScopeSpec & | SS,
|  | IdentifierInfo * | Name,
|  | SourceLocation | TagLoc,
|  | SourceLocation | NameLoc
| ) |  |

Definition at line 10036 of file SemaTemplate.cpp.

## ◆ ActOnDependentTemplateName()

TemplateNameKind Sema::ActOnDependentTemplateName | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | const UnqualifiedId & | Name,
|  | ParsedType | ObjectType,
|  | bool | EnteringContext,
|  | TemplateTy & | Result,
|  | bool | AllowInjectedClassName = `false`
| ) |  |

Form a dependent template name.

This action forms a dependent template name given the template name and its (presumably dependent) scope specifier. For example, given "MetaFun::template apply", the scope specifier `SS` will be "MetaFun::", `TemplateKWLoc` contains the location of the "template" keyword, and "apply" is the `Name`.

Definition at line 4579 of file SemaTemplate.cpp.

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnDesignatedInitializer()

ExprResult Sema::ActOnDesignatedInitializer | ( | Designation & | Desig,
|  | SourceLocation | EqualOrColonLoc,
|  | bool | GNUSyntax,
|  | ExprResult | Init
| ) |  |

Definition at line 3126 of file SemaInit.cpp.

References clang::Designator::ArrayDesignator, clang::Designator::FieldDesignator, clang::Designation::getDesignator(), clang::Designator::getDotLoc(), clang::Designator::getField(), clang::Designator::getFieldLoc(), clang::Designator::getKind(), and clang::Designation::getNumDesignators().

Referenced by CheckArrayDesignatorSyntax(), and clang::TreeTransform< Derived >::RebuildDesignatedInitExpr().

## ◆ ActOnDocumentableDecl()

void Sema::ActOnDocumentableDecl | ( | Decl * | D | ) |

Should be called on all declarations that might have attached documentation comments.

Definition at line 13054 of file SemaDecl.cpp.

## ◆ ActOnDocumentableDecls()

void Sema::ActOnDocumentableDecls | ( | ArrayRef< Decl *> | Group | ) |

Definition at line 13058 of file SemaDecl.cpp.

## ◆ ActOnDoStmt()

StmtResult Sema::ActOnDoStmt | ( | SourceLocation | DoLoc,
|  | Stmt * | Body,
|  | SourceLocation | WhileLoc,
|  | SourceLocation | CondLParen,
|  | Expr * | Cond,
|  | SourceLocation | CondRParen
| ) |  |

Definition at line 1336 of file SemaStmt.cpp.

References clang::C99, clang::CPlusPlus, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::StmtError().

## ◆ ActOnDuplicateDefinition()

bool Sema::ActOnDuplicateDefinition | ( | DeclSpec & | DS,
|  | Decl * | Prev,
|  | SkipBodyInfo & | SkipBody
| ) |  |

Perform ODR-like check for C/ObjC when merging tag types from modules.

Differently from C++, actually parse the body and reject / error out in case of a structural mismatch.

Definition at line 15797 of file SemaDecl.cpp.

References clang::Sema::SkipBodyInfo::New, and clang::Sema::SkipBodyInfo::Previous.

## ◆ ActOnEmptyDeclaration()

Decl * Sema::ActOnEmptyDeclaration | ( | Scope * | S,
|  | const ParsedAttributesView & | AttrList,
|  | SourceLocation | SemiLoc
| ) |  |

Handle a C++11 empty-declaration and attribute-declaration.

Definition at line 15385 of file SemaDeclCXX.cpp.

References clang::EmptyDecl::Create().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnEndOfTranslationUnit()

void Sema::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.

Definition at line 975 of file Sema.cpp.

References ActOnEndOfTranslationUnitFragment(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::begin(), CheckDelayedMemberExceptionSpecs(), CheckDelegatingCtorCycles(), checkUndefinedButUsed(), clang::LangOptions::CMK_ModuleInterface, DelayedDllExportClasses, DelayedDllExportMemberFunctions, DelayedEquivalentExceptionSpecChecks, DelayedOverridingExceptionSpecChecks, Diag(), DiagnoseUnterminatedPragmaAttribute(), DiagnoseUnterminatedPragmaPack(), DiagnoseUseOfUnimplementedSelectors(), Diags, clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::end(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::erase(), clang::ExpectedVariableOrFunction, clang::Preprocessor::getCurrentModule(), clang::Sema::DelayedDiagnostics::getCurrentPool(), clang::Preprocessor::getHeaderSearchInfo(), getLangOpts(), clang::HeaderSearch::getModuleMap(), getSourceManager(), clang::Module::GlobalModuleFragment, clang::DiagnosticsEngine::hasErrorOccurred(), clang::Preprocessor::isCodeCompletionEnabled(), clang::DiagnosticsEngine::isIgnored(), clang::Preprocessor::isIncrementalProcessingEnabled(), LangOpts, LateParsedInstantiations, LateTemplateParserCleanup, LoadExternalWeakUndeclaredIdentifiers(), LookupOrdinaryName, LookupSingleName(), clang::Normal, OpaqueParser, PendingInstantiations, PP, clang::Module::PrivateModuleFragment, clang::ExternalSemaSource::ReadUndefinedButUsed(), ShouldRemoveFromUnused(), clang::TU_Module, clang::TU_Prefix, TUKind, TUScope, UndefinedButUsed, UnusedFileScopedDecls, and WeakUndeclaredIdentifiers.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnEndOfTranslationUnitFragment()

void Sema::ActOnEndOfTranslationUnitFragment | ( | TUFragmentKind | Kind | ) |

Definition at line 905 of file Sema.cpp.

References DefineUsedVTables(), LangOpts, LateParsedInstantiations, PendingInstantiations, PerformPendingInstantiations(), and clang::ExternalSemaSource::ReadPendingInstantiations().

Referenced by ActOnEndOfTranslationUnit().

## ◆ ActOnEnumBody()

void Sema::ActOnEnumBody | ( | SourceLocation | EnumLoc,
|  | SourceRange | BraceRange,
|  | Decl * | EnumDecl,
|  | ArrayRef< Decl *> | Elements,
|  | Scope * | S,
|  | const ParsedAttributesView & | Attr
| ) |  |

Definition at line 17497 of file SemaDecl.cpp.

Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition().

## ◆ ActOnEnumConstant()

Decl * Sema::ActOnEnumConstant | ( | Scope * | S,
|  | Decl * | EnumDecl,
|  | Decl * | LastEnumConstant,
|  | SourceLocation | IdLoc,
|  | IdentifierInfo * | Id,
|  | const ParsedAttributesView & | Attrs,
|  | SourceLocation | EqualLoc,
|  | Expr * | Val
| ) |  |

Definition at line 17246 of file SemaDecl.cpp.

## ◆ ActOnExceptionDeclarator()

Decl * Sema::ActOnExceptionDeclarator | ( | Scope * | S,
|  | Declarator & | D
| ) |  |

ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler.

Definition at line 15527 of file SemaDeclCXX.cpp.

References clang::Declarator::getIdentifierLoc(), and clang::Declarator::isInvalidType().

## ◆ ActOnExitFunctionContext()

void Sema::ActOnExitFunctionContext | ( |  | ) |

Definition at line 1398 of file SemaDecl.cpp.

## ◆ ActOnExplicitBoolSpecifier()

ExplicitSpecifier Sema::ActOnExplicitBoolSpecifier | ( | Expr * | E | ) |

ActOnExplicitBoolSpecifier - Build an ExplicitSpecifier from an expression found in an explicit(bool) specifier.

Definition at line 12446 of file SemaDeclCXX.cpp.

References clang::Expr::isTypeDependent(), and clang::Unresolved.

## ◆ ActOnExplicitInstantiation() [1/3]

DeclResult Sema::ActOnExplicitInstantiation | ( | Scope * | S,
|  | SourceLocation | ExternLoc,
|  | SourceLocation | TemplateLoc,
|  | unsigned | TagSpec,
|  | SourceLocation | KWLoc,
|  | const CXXScopeSpec & | SS,
|  | TemplateTy | Template,
|  | SourceLocation | TemplateNameLoc,
|  | SourceLocation | LAngleLoc,
|  | ASTTemplateArgsPtr | TemplateArgs,
|  | SourceLocation | RAngleLoc,
|  | const ParsedAttributesView & | Attr
| ) |  |

Definition at line 9219 of file SemaTemplate.cpp.

## ◆ ActOnExplicitInstantiation() [2/3]

DeclResult Sema::ActOnExplicitInstantiation | ( | Scope * | S,
|  | SourceLocation | ExternLoc,
|  | SourceLocation | TemplateLoc,
|  | unsigned | TagSpec,
|  | SourceLocation | KWLoc,
|  | CXXScopeSpec & | SS,
|  | IdentifierInfo * | Name,
|  | SourceLocation | NameLoc,
|  | const ParsedAttributesView & | Attr
| ) |  |

Definition at line 9519 of file SemaTemplate.cpp.

## ◆ ActOnExplicitInstantiation() [3/3]

DeclResult Sema::ActOnExplicitInstantiation | ( | Scope * | S,
|  | SourceLocation | ExternLoc,
|  | SourceLocation | TemplateLoc,
|  | Declarator & | D
| ) |  |

Definition at line 9633 of file SemaTemplate.cpp.

## ◆ ActOnExpressionTrait()

ExprResult Sema::ActOnExpressionTrait | ( | ExpressionTrait | OET,
|  | SourceLocation | KWLoc,
|  | Expr * | Queried,
|  | SourceLocation | RParen
| ) |  |

ActOnExpressionTrait - Parsed one of the unary type trait support pseudo-functions.

Definition at line 5385 of file SemaExprCXX.cpp.

References BuildExpressionTrait(), clang::ExprError(), and clang::Result.

Referenced by TypeTraitArity().

## ◆ ActOnExprStmt()

StmtResult Sema::ActOnExprStmt | ( | ExprResult | Arg,
|  | bool | DiscardedValue = `true`
| ) |  |

Definition at line 45 of file SemaStmt.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::StmtError().

## ◆ ActOnExprStmtError()

StmtResult Sema::ActOnExprStmtError | ( |  | ) |

Definition at line 62 of file SemaStmt.cpp.

References clang::StmtError().

## ◆ ActOnField()

Decl * Sema::ActOnField | ( | 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.

Definition at line 16011 of file SemaDecl.cpp.

## ◆ ActOnFields()

void Sema::ActOnFields | ( | Scope * | S,
|  | SourceLocation | RecLoc,
|  | Decl * | TagDecl,
|  | ArrayRef< Decl *> | Fields,
|  | SourceLocation | LBrac,
|  | SourceLocation | RBrac,
|  | const ParsedAttributesView & | AttrList
| ) |  |

A field cannot be an Objective-c object

Definition at line 16550 of file SemaDecl.cpp.

## ◆ ActOnFileScopeAsmDecl()

Decl * Sema::ActOnFileScopeAsmDecl | ( | Expr * | expr,
|  | SourceLocation | AsmLoc,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 17733 of file SemaDecl.cpp.

References clang::FileScopeAsmDecl::Create(), and clang::ast_matchers::expr.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnFinishCXXInClassMemberInitializer()

void Sema::ActOnFinishCXXInClassMemberInitializer | ( | Decl * | D,
|  | SourceLocation | InitLoc,
|  | Expr * | InitExpr
| ) |  |

This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template.

Such actions are deferred until the class is complete.

Definition at line 3894 of file SemaDeclCXX.cpp.

References clang::InitializationKind::CreateCopy(), clang::InitializationKind::CreateDirectList(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), clang::Stmt::getEndLoc(), clang::FieldDecl::getInClassInitStyle(), clang::ValueDecl::getType(), clang::ICIS_ListInit, clang::ICIS_NoInit, clang::InitializedEntity::InitializeMemberFromDefaultMemberInitializer(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::FieldDecl::removeInClassInitializer(), clang::FieldDecl::setInClassInitializer(), and clang::Decl::setInvalidDecl().

Referenced by InstantiateInClassInitializer().

## ◆ ActOnFinishCXXMemberDecls()

void Sema::ActOnFinishCXXMemberDecls | ( |  | ) |

Perform any semantic analysis which needs to be delayed until all pending class member declarations have been parsed.

Definition at line 12965 of file SemaDeclCXX.cpp.

References checkForMultipleExportedDefaultConstructors().

## ◆ ActOnFinishCXXMemberSpecification()

void Sema::ActOnFinishCXXMemberSpecification | ( | Scope * | S,
|  | SourceLocation | RLoc,
|  | Decl * | TagDecl,
|  | SourceLocation | LBrac,
|  | SourceLocation | RBrac,
|  | const ParsedAttributesView & | AttrList
| ) |  |

Definition at line 9469 of file SemaDeclCXX.cpp.

References Diag().

## ◆ ActOnFinishCXXNonNestedClass()

void Sema::ActOnFinishCXXNonNestedClass | ( |  | ) |

Definition at line 12977 of file SemaDeclCXX.cpp.

References DefineImplicitSpecialMember(), and clang::TSK_ExplicitInstantiationDefinition.

## ◆ ActOnFinishDelayedAttribute()

void Sema::ActOnFinishDelayedAttribute | ( | Scope * | S,
|  | Decl * | D,
|  | ParsedAttributes & | Attrs
| ) |  |

ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is delayed.

When we finish delayed parsing of an attribute, we must attach it to the relevant Decl.

Definition at line 14229 of file SemaDecl.cpp.

## ◆ ActOnFinishDelayedCXXMethodDeclaration()

void Sema::ActOnFinishDelayedCXXMethodDeclaration | ( | Scope * | S,
|  | Decl * | MethodD
| ) |  |

ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration for Method.

The method declaration is now considered finished. There may be a separate ActOnStartOfFunctionDef action later (not necessarily immediately!) for this method, if it was also defined inside the class body.

Definition at line 9736 of file SemaDeclCXX.cpp.

References clang::Decl::isInvalidDecl().

## ◆ ActOnFinishDelayedMemberDeclarations()

void Sema::ActOnFinishDelayedMemberDeclarations | ( | Scope * | S,
|  | Decl * | Record
| ) |  |

Definition at line 9681 of file SemaDeclCXX.cpp.

## ◆ ActOnFinishDelayedMemberInitializers()

void Sema::ActOnFinishDelayedMemberInitializers | ( | Decl * | Record | ) |

Definition at line 12677 of file SemaDeclCXX.cpp.

## ◆ ActOnFinishExportDecl()

Decl * Sema::ActOnFinishExportDecl | ( | Scope * | S,
|  | Decl * | ExportDecl,
|  | SourceLocation | RBraceLoc
| ) |  |

Complete the definition of an export declaration.

Definition at line 689 of file SemaModule.cpp.

References checkExportedDecl(), diagExportedUnnamedDecl(), clang::Decl::isInvalidDecl(), and clang::SourceLocation::isValid().

## ◆ ActOnFinishFullExpr() [1/2]

ExprResult clang::Sema::ActOnFinishFullExpr | ( | Expr * | Expr,
|  | bool | DiscardedValue
| ) |  |
| inline

Definition at line 5849 of file Sema.h.

References getCurrentInstantiationOf(), and clang::Expr::getExprLoc().

Referenced by CheckConvertedConstantExpression(), checkOpenMPLoop(), checkTupleLikeDecomposition(), diagReturnOnAllocFailure(), FinishOpenMPLinearClause(), and noteMemberDeclaredHere().

## ◆ ActOnFinishFullExpr() [2/2]

ExprResult Sema::ActOnFinishFullExpr | ( | Expr * | Expr,
|  | SourceLocation | CC,
|  | bool | DiscardedValue,
|  | bool | IsConstexpr = `false`
| ) |  |

Definition at line 8186 of file SemaExprCXX.cpp.

References CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckPlaceholderExpr(), Context, CorrectDelayedTyposInExpr(), CurContext, DiagnoseUnexpandedParameterPack(), DiagnoseUnusedExprResult(), clang::ExprError(), forceUnknownAnyToType(), clang::ActionResult< PtrTy, CompressInvalid >::get(), getCurLambda(), getLangOpts(), clang::ASTContext::getObjCIdType(), clang::DeclContext::getParent(), IgnoredValueConversions(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::isLambdaCallOperator(), MaybeCreateExprWithCleanups(), and clang::ASTContext::UnknownAnyTy.

## ◆ ActOnFinishFullStmt()

StmtResult Sema::ActOnFinishFullStmt | ( | Stmt * | Stmt | ) |

Definition at line 8280 of file SemaExprCXX.cpp.

References MaybeCreateStmtWithCleanups(), and clang::StmtError().

Referenced by diagReturnOnAllocFailure().

## ◆ ActOnFinishFunctionBody() [1/2]

Decl * Sema::ActOnFinishFunctionBody | ( | Decl * | Decl,
|  | Stmt * | Body
| ) |  |

Definition at line 13860 of file SemaDecl.cpp.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnFinishFunctionBody() [2/2]

Decl * Sema::ActOnFinishFunctionBody | ( | Decl * | Decl,
|  | Stmt * | Body,
|  | bool | IsInstantiation
| ) |  |

Definition at line 13908 of file SemaDecl.cpp.

References clang::CPlusPlus14, Diag(), clang::Type::getAs(), clang::Decl::getAsFunction(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::isLambdaCallOperator(), clang::Type::isUndeducedType(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::FunctionDecl::setWillHaveBody().

## ◆ ActOnFinishFunctionDeclarationDeclarator()

void Sema::ActOnFinishFunctionDeclarationDeclarator | ( | Declarator & | D | ) |

Called after parsing a function declarator belonging to a function declaration.

Definition at line 17415 of file SemaDeclCXX.cpp.

References clang::TemplateParameterList::Create(), clang::Declarator::getTemplateParameterLists(), and clang::Declarator::setInventedTemplateParameterList().

## ◆ ActOnFinishInlineFunctionDef()

void Sema::ActOnFinishInlineFunctionDef | ( | FunctionDecl * | D | ) |

Definition at line 13425 of file SemaDecl.cpp.

## ◆ ActOnFinishKNRParamDeclarations()

void Sema::ActOnFinishKNRParamDeclarations | ( | Scope * | S,
|  | Declarator & | D,
|  | SourceLocation | LocAfterDecls
| ) |  |

Definition at line 13376 of file SemaDecl.cpp.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnFinishLinkageSpecification()

Decl * Sema::ActOnFinishLinkageSpecification | ( | Scope * | S,
|  | Decl * | LinkageSpec,
|  | SourceLocation | RBraceLoc
| ) |  |

ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpec.

If RBraceLoc is valid, it's the position of the closing '}' brace in a linkage specification that uses braces.

Definition at line 15374 of file SemaDeclCXX.cpp.

References clang::SourceLocation::isValid(), and clang::LinkageSpecDecl::setRBraceLoc().

## ◆ ActOnFinishNamespaceDef()

void Sema::ActOnFinishNamespaceDef | ( | Decl * | Dcl,
|  | SourceLocation | RBrace
| ) |  |

ActOnFinishNamespaceDef - This callback is called after a namespace is exited.

Decl is the DeclTy returned by ActOnStartNamespaceDef.

Definition at line 10614 of file SemaDeclCXX.cpp.

References clang::Decl::hasAttr(), clang::Decl::setModuleOwnershipKind(), clang::NamespaceDecl::setRBraceLoc(), and clang::Decl::VisibleWhenImported.

## ◆ ActOnFinishObjCImplementation()

Sema::DeclGroupPtrTy Sema::ActOnFinishObjCImplementation | ( | Decl * | ObjCImpDecl,
|  | ArrayRef< Decl *> | Decls
| ) |  |

Definition at line 2092 of file SemaDeclObjC.cpp.

References BuildDeclaratorGroup(), clang::Decl::getDeclContext(), clang::DeclContext::isFileContext(), and clang::Decl::setTopLevelDeclInObjCContainer().

## ◆ ActOnFinishOfCompoundStmt()

void Sema::ActOnFinishOfCompoundStmt | ( |  | ) |

Definition at line 380 of file SemaStmt.cpp.

## ◆ ActOnFinishOpenMPDeclareTargetDirective()

void Sema::ActOnFinishOpenMPDeclareTargetDirective | ( |  | ) |

Called at the end of target region i.e. '#pragme omp end declare target'.

Definition at line 16811 of file SemaOpenMP.cpp.

## ◆ ActOnFinishRequiresExpr()

void Sema::ActOnFinishRequiresExpr | ( |  | ) |

Definition at line 8533 of file SemaExprCXX.cpp.

References CurContext, and clang::DeclContext::getLexicalParent().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnFinishSEHFinallyBlock()

StmtResult Sema::ActOnFinishSEHFinallyBlock | ( | SourceLocation | Loc,
|  | Stmt * | Block
| ) |  |

Definition at line 4230 of file SemaStmt.cpp.

References clang::SEHFinallyStmt::Create().

## ◆ ActOnFinishSwitchStmt()

StmtResult Sema::ActOnFinishSwitchStmt | ( | SourceLocation | SwitchLoc,
|  | Stmt * | Switch,
|  | Stmt * | Body
| ) |  |

Definition at line 847 of file SemaStmt.cpp.

References clang::SwitchStmt::getCond(), clang::Expr::getType(), GetTypeBeforeIntegralPromotion(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::SwitchStmt::setBody(), and clang::StmtError().

## ◆ ActOnFinishTrailingRequiresClause()

ExprResult Sema::ActOnFinishTrailingRequiresClause | ( | ExprResult | ConstraintExpr | ) |

Definition at line 3885 of file SemaDeclCXX.cpp.

References clang::ExprError(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ ActOnForEachDeclStmt()

void Sema::ActOnForEachDeclStmt | ( | DeclGroupPtrTy | Decl | ) |

Definition at line 82 of file SemaStmt.cpp.

References clang::ast_matchers::decl, Diag(), clang::OpaquePtr< PtrTy >::get(), clang::QualType::getLocalQualifiers(), clang::Decl::getLocation(), clang::Qualifiers::getObjCLifetime(), clang::DeclGroupRef::getSingleDecl(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), clang::DeclGroupRef::isNull(), clang::DeclGroupRef::isSingleDecl(), clang::Qualifiers::OCL_Strong, clang::VarDecl::setARCPseudoStrong(), clang::VarDecl::setInit(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), and clang::QualType::withConst().

## ◆ ActOnForEachLValueExpr()

StmtResult Sema::ActOnForEachLValueExpr | ( | Expr * | E | ) |

In an Objective C collection iteration statement: for (x in y) x can be an arbitrary l-value expression.

Bind it up as a full-expression.

Definition at line 1813 of file SemaStmt.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::StmtError().

## ◆ ActOnForStmt()

StmtResult Sema::ActOnForStmt | ( | SourceLocation | ForLoc,
|  | SourceLocation | LParenLoc,
|  | Stmt * | First,
|  | ConditionResult | Second,
|  | FullExprArg | Third,
|  | SourceLocation | RParenLoc,
|  | Stmt * | Body
| ) |  |

Definition at line 1763 of file SemaStmt.cpp.

References Diag(), clang::Sema::FullExprArg::get(), clang::Sema::ConditionResult::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::VarDecl::hasLocalStorage(), clang::Sema::ConditionResult::isInvalid(), clang::VarDecl::isLocalVarDecl(), clang::Sema::FullExprArg::release(), and clang::StmtError().

## ◆ ActOnForwardClassDeclaration()

Sema::DeclGroupPtrTy Sema::ActOnForwardClassDeclaration | ( | SourceLocation | Loc,
|  | IdentifierInfo ** | IdentList,
|  | SourceLocation * | IdentLocs,
|  | ArrayRef< ObjCTypeParamList *> | TypeParamLists,
|  | unsigned | NumElts
| ) |  |

Definition at line 3036 of file SemaDeclObjC.cpp.

References BuildDeclaratorGroup(), CheckObjCDeclScope(), checkTypeParamListConsistency(), Context, clang::ObjCInterfaceDecl::Create(), CurContext, Diag(), forRedeclarationInCurContext(), clang::ObjCInterfaceDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ObjCTypeParamList::getSourceRange(), clang::ObjCInterfaceDecl::getTypeParamList(), clang::TypedefNameDecl::getUnderlyingType(), clang::Type::isObjCObjectType(), LookupOrdinaryName, LookupSingleName(), PushOnScopeChains(), clang::ObjCContainerDecl::setAtEndRange(), tryMatchRecordTypes(), and TUScope.

## ◆ ActOnForwardProtocolDeclaration()

Sema::DeclGroupPtrTy Sema::ActOnForwardProtocolDeclaration | ( | SourceLocation | AtProtoclLoc,
|  | ArrayRef< IdentifierLocPair > | IdentList,
|  | const ParsedAttributesView & | attrList
| ) |  |

ActOnForwardProtocolDeclaration - Handle @protocol foo;.

Definition at line 1769 of file SemaDeclObjC.cpp.

References AddPragmaAttributes(), BuildDeclaratorGroup(), CheckObjCDeclScope(), Context, clang::ObjCProtocolDecl::Create(), CurContext, forRedeclarationInCurContext(), LookupProtocol(), mergeDeclAttributes(), ProcessDeclAttributeList(), PushOnScopeChains(), and TUScope.

## ◆ ActOnFriendFunctionDecl()

NamedDecl * Sema::ActOnFriendFunctionDecl | ( | Scope * | S,
|  | Declarator & | D,
|  | MultiTemplateParamsArg | TemplateParams
| ) |  |

Definition at line 15968 of file SemaDeclCXX.cpp.

References Diag(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifierLoc(), clang::DeclarationNameInfo::getName(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), clang::DeclSpec::isFriendSpecified(), clang::Type::isFunctionType(), and clang::DeclSpec::SCS_unspecified.

## ◆ ActOnFriendTypeDecl()

Decl * Sema::ActOnFriendTypeDecl | ( | Scope * | S,
|  | const DeclSpec & | DS,
|  | MultiTemplateParamsArg | TempParams
| ) |  |

Handle a friend type declaration.

This works in tandem with ActOnTag.

Notes on friend class templates:

We generally treat friend class declarations as if they were declaring a class. So, for example, the elaborated type specifier in a friend declaration is required to obey the restrictions of a class-head (i.e. no typedefs in the scope chain), template parameters are required to match up with simple template-ids, &c. However, unlike when declaring a template specialization, it's okay to refer to a template specialization without an empty template parameter declaration, e.g. friend class A<T>::B<unsigned>; We permit this as a special case; if there are any template parameters present at all, require proper matching, i.e. template <> template <class T> friend class A<int>::B;

Definition at line 15877 of file SemaDeclCXX.cpp.

References clang::FriendTemplateDecl::Create(), Diag(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getConstSpecLoc(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getUnalignedSpecLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::Type::isElaboratedTypeSpecifier(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::isInvalidType(), clang::MemberContext, clang::DeclSpec::SCS_unspecified, clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, clang::DeclSpec::TQ_unaligned, and clang::DeclSpec::TQ_volatile.

## ◆ ActOnFunctionDeclarator()

NamedDecl * Sema::ActOnFunctionDeclarator | ( | Scope * | S,
|  | Declarator & | D,
|  | DeclContext * | DC,
|  | TypeSourceInfo * | TInfo,
|  | LookupResult & | Previous,
|  | MultiTemplateParamsArg | TemplateParamLists,
|  | bool & | AddToScope
| ) |  |

Definition at line 8662 of file SemaDecl.cpp.

## ◆ ActOnGCCAsmStmt()

StmtResult Sema::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
| ) |  |

Definition at line 241 of file SemaStmtAsm.cpp.

References clang::StringLiteral::isAscii().

## ◆ ActOnGenericSelectionExpr()

ExprResult Sema::ActOnGenericSelectionExpr | ( | SourceLocation | KeyLoc,
|  | SourceLocation | DefaultLoc,
|  | SourceLocation | RParenLoc,
|  | Expr * | ControllingExpr,
|  | ArrayRef< ParsedType > | ArgTypes,
|  | ArrayRef< Expr *> | ArgExprs
| ) |  |

Definition at line 1517 of file SemaExpr.cpp.

## ◆ ActOnGlobalModuleFragmentDecl()

Sema::DeclGroupPtrTy Sema::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.

Parameters

  ModuleLoc | The location of the 'module' keyword.

Definition at line 58 of file SemaModule.cpp.

References clang::Module::GlobalModuleFragment.

Referenced by ActOnStartOfTranslationUnit().

## ◆ ActOnGNUNullExpr()

ExprResult Sema::ActOnGNUNullExpr | ( | SourceLocation | TokenLoc | ) |

Definition at line 14673 of file SemaExpr.cpp.

## ◆ ActOnGotoStmt()

StmtResult Sema::ActOnGotoStmt | ( | SourceLocation | GotoLoc,
|  | SourceLocation | LabelLoc,
|  | LabelDecl * | TheDecl
| ) |  |

Definition at line 2899 of file SemaStmt.cpp.

References clang::Decl::markUsed().

## ◆ ActOnIdExpression()

ExprResult Sema::ActOnIdExpression | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | UnqualifiedId & | Id,
|  | bool | HasTrailingLParen,
|  | bool | IsAddressOfOperand,
|  | CorrectionCandidateCallback * | CCC = `nullptr`,
|  | bool | IsInlineAsmIdentifier = `false`,
|  | Token * | KeywordReplacement = `nullptr`
| ) |  |

Definition at line 2276 of file SemaExpr.cpp.

References clang::ExprError(), and clang::CXXScopeSpec::isInvalid().

Referenced by HandleAddressSpaceTypeAttribute(), HandleExtVectorTypeAttr(), and HandleVectorSizeAttr().

## ◆ ActOnIfStmt()

StmtResult Sema::ActOnIfStmt | ( | SourceLocation | IfLoc,
|  | bool | IsConstexpr,
|  | Stmt * | InitStmt,
|  | ConditionResult | Cond,
|  | Stmt * | ThenVal,
|  | SourceLocation | ElseLoc,
|  | Stmt * | ElseVal
| ) |  |

Definition at line 563 of file SemaStmt.cpp.

References clang::Sema::ConditionResult::isInvalid().

## ◆ ActOnIndirectGotoStmt()

StmtResult Sema::ActOnIndirectGotoStmt | ( | SourceLocation | GotoLoc,
|  | SourceLocation | StarLoc,
|  | Expr * | DestExp
| ) |  |

Definition at line 2908 of file SemaStmt.cpp.

References clang::Expr::getType(), and clang::Expr::isTypeDependent().

## ◆ ActOnInitializerError()

void Sema::ActOnInitializerError | ( | Decl * | D | ) |

ActOnInitializerError - Given that there was an error parsing an initializer for the given declaration, try to return to some form of sanity.

Definition at line 12128 of file SemaDecl.cpp.

References clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), and clang::Decl::setInvalidDecl().

## ◆ ActOnInitList()

ExprResult Sema::ActOnInitList | ( | SourceLocation | LBraceLoc,
|  | MultiExprArg | InitArgList,
|  | SourceLocation | RBraceLoc
| ) |  |

Definition at line 6272 of file SemaExpr.cpp.

References clang::C99, clang::CPlusPlus, clang::CPlusPlus2a, Diag(), clang::SourceLocation::isInvalid(), and clang::SourceLocation::isValid().

Referenced by CheckArrayDesignatorSyntax().

## ◆ ActOnInstanceMessage()

ExprResult Sema::ActOnInstanceMessage | ( | Scope * | S,
|  | Expr * | Receiver,
|  | Selector | Sel,
|  | SourceLocation | LBracLoc,
|  | ArrayRef< SourceLocation > | SelectorLocs,
|  | SourceLocation | RBracLoc,
|  | MultiExprArg | Args
| ) |  |

Definition at line 3264 of file SemaExprObjC.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ ActOnIntegerConstant()

ExprResult Sema::ActOnIntegerConstant | ( | SourceLocation | Loc,
|  | uint64_t | Val
| ) |  |

Definition at line 3447 of file SemaExpr.cpp.

Referenced by checkArrayLikeDecomposition(), checkOpenMPLoop(), and FinishOpenMPLinearClause().

## ◆ ActOnIvar()

Decl * Sema::ActOnIvar | ( | Scope * | S,
|  | SourceLocation | DeclStart,
|  | Declarator & | D,
|  | Expr * | BitfieldWidth,
|  | tok::ObjCKeywordKind | Visibility
| ) |  |

ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDecl object for it.

Definition at line 16402 of file SemaDecl.cpp.

## ◆ ActOnLabelStmt()

StmtResult Sema::ActOnLabelStmt | ( | SourceLocation | IdentLoc,
|  | LabelDecl * | TheDecl,
|  | SourceLocation | ColonLoc,
|  | Stmt * | SubStmt
| ) |  |

Definition at line 517 of file SemaStmt.cpp.

References Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), and clang::LabelDecl::getStmt().

Referenced by clang::TreeTransform< Derived >::RebuildLabelStmt().

## ◆ ActOnLambdaError()

void Sema::ActOnLambdaError | ( | SourceLocation | StartLoc,
|  | Scope * | CurScope,
|  | bool | IsInstantiation = `false`
| ) |  |

ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the information about the lambda.

Definition at line 1240 of file SemaLambda.cpp.

References clang::RecordDecl::fields(), clang::Decl::getLocation(), clang::sema::LambdaScopeInfo::Lambda, and clang::Decl::setInvalidDecl().

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ ActOnLambdaExplicitTemplateParameterList()

void Sema::ActOnLambdaExplicitTemplateParameterList | ( | SourceLocation | LAngleLoc,
|  | ArrayRef< NamedDecl *> | TParams,
|  | SourceLocation | RAngleLoc
| ) |  |

This is called after parsing the explicit template parameter list on a lambda (if it exists) in C++2a.

Definition at line 521 of file SemaLambda.cpp.

References clang::sema::LambdaScopeInfo::ExplicitTemplateParamsRange, clang::InventedTemplateParameterInfo::NumExplicitTemplateParams, and clang::InventedTemplateParameterInfo::TemplateParams.

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ ActOnLambdaExpr()

ExprResult Sema::ActOnLambdaExpr | ( | SourceLocation | StartLoc,
|  | Stmt * | Body,
|  | Scope * | CurScope
| ) |  |

ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed.

Definition at line 1538 of file SemaLambda.cpp.

References clang::sema::LambdaScopeInfo::CallOperator, and clang::Stmt::getEndLoc().

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ actOnLambdaInitCaptureInitialization()

ParsedType clang::Sema::actOnLambdaInitCaptureInitialization | ( | SourceLocation | Loc,
|  | bool | ByRef,
|  | SourceLocation | EllipsisLoc,
|  | IdentifierInfo * | Id,
|  | LambdaCaptureInitKind | InitKind,
|  | Expr *& | Init
| ) |  |
| inline

Perform initialization analysis of the init-capture and perform any implicit conversions such as an lvalue-to-rvalue conversion if not being used to initialize a reference.

Definition at line 6097 of file Sema.h.

## ◆ ActOnLastBitfield()

void Sema::ActOnLastBitfield | ( | SourceLocation | DeclLoc,
|  | SmallVectorImpl< Decl *> & | AllIvarDecls
| ) |  |

ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions.

For every class @interface and class extension @interface, if the last ivar is a bitfield of any type, then add an implicit `char :0` ivar to the end of that interface.

Definition at line 16516 of file SemaDecl.cpp.

References clang::FieldDecl::isBitField(), and clang::FieldDecl::isZeroLengthBitField().

## ◆ ActOnMemberAccessExpr()

ExprResult Sema::ActOnMemberAccessExpr | ( | Scope * | S,
|  | Expr * | Base,
|  | SourceLocation | OpLoc,
|  | tok::TokenKind | OpKind,
|  | CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | UnqualifiedId & | Id,
|  | Decl * | ObjCImpDecl
| ) |  |

The main callback when the parser finds something like expression .

[nested-name-specifier] identifier expression -> [nested-name-specifier] identifier where 'identifier' encompasses a fairly broad spectrum of possibilities, including destructor and operator references.

Parameters

  OpKind | either tok::arrow or tok::period
  ObjCImpDecl | the current Objective-C @implementation decl; this is an ugly hack around the fact that Objective-C @implementations aren't properly put in the context chain

Definition at line 1697 of file SemaExprMember.cpp.

References Diag(), clang::ExprError(), clang::SourceRange::getBegin(), clang::UnqualifiedId::getKind(), clang::UnqualifiedId::getSourceRange(), clang::IK_ConstructorName, clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().

## ◆ ActOnMemInitializer() [1/2]

MemInitResult Sema::ActOnMemInitializer | ( | Decl * | ConstructorD,
|  | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | IdentifierInfo * | MemberOrBase,
|  | ParsedType | TemplateTypeTy,
|  | const DeclSpec & | DS,
|  | SourceLocation | IdLoc,
|  | SourceLocation | LParenLoc,
|  | ArrayRef< Expr *> | Args,
|  | SourceLocation | RParenLoc,
|  | SourceLocation | EllipsisLoc
| ) |  |

Handle a C++ member initializer using parentheses syntax.

Definition at line 4011 of file SemaDeclCXX.cpp.

## ◆ ActOnMemInitializer() [2/2]

MemInitResult Sema::ActOnMemInitializer | ( | Decl * | ConstructorD,
|  | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | IdentifierInfo * | MemberOrBase,
|  | ParsedType | TemplateTypeTy,
|  | const DeclSpec & | DS,
|  | SourceLocation | IdLoc,
|  | Expr * | InitList,
|  | SourceLocation | EllipsisLoc
| ) |  |

Handle a C++ member initializer using braced-init-list syntax.

Definition at line 3995 of file SemaDeclCXX.cpp.

## ◆ ActOnMemInitializers()

void Sema::ActOnMemInitializers | ( | Decl * | ConstructorDecl,
|  | SourceLocation | ColonLoc,
|  | ArrayRef< CXXCtorInitializer *> | MemInits,
|  | bool | AnyErrors
| ) |  |

ActOnMemInitializers - Handle the member initializers for a constructor.

Definition at line 5328 of file SemaDeclCXX.cpp.

References Diag(), GetKeyForMember(), clang::CXXCtorInitializer::isAnyMemberInitializer(), and clang::CXXCtorInitializer::setSourceOrder().

## ◆ ActOnMethodDeclaration()

Decl * Sema::ActOnMethodDeclaration | ( | Scope * | S,
|  | SourceLocation | BeginLoc,
|  | SourceLocation | EndLoc,
|  | tok::TokenKind | MethodType,
|  | ObjCDeclSpec & | ReturnQT,
|  | ParsedType | ReturnType,
|  | ArrayRef< SourceLocation > | SelectorLocs,
|  | Selector | Sel,
|  | ObjCArgInfo * | ArgInfo,
|  | DeclaratorChunk::ParamInfo * | CParamInfo,
|  | unsigned | CNumArgs,
|  | const ParsedAttributesView & | AttrList,
|  | tok::ObjCKeywordKind | MethodImplKind,
|  | bool | isVariadic,
|  | bool | MethodDefinition
| ) |  |

Definition at line 4583 of file SemaDeclObjC.cpp.

## ◆ ActOnModuleBegin()

void Sema::ActOnModuleBegin | ( | SourceLocation | DirectiveLoc,
|  | Module * | Mod
| ) |  |

The parsed has entered a submodule.

Definition at line 438 of file SemaModule.cpp.

References checkModuleImportContext(), clang::Decl::Visible, and clang::Decl::VisibleWhenImported.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnModuleDecl()

Sema::DeclGroupPtrTy Sema::ActOnModuleDecl | ( | SourceLocation | StartLoc,
|  | SourceLocation | ModuleLoc,
|  | ModuleDeclKind | MDK,
|  | ModuleIdPath | Path,
|  | bool | IsFirstDecl
| ) |  |

The parser has processed a module-declaration that begins the definition of a module interface or implementation.

Definition at line 91 of file SemaModule.cpp.

References clang::Module::AllVisible, clang::LangOptions::CMK_HeaderModule, clang::LangOptions::CMK_ModuleInterface, clang::LangOptions::CMK_ModuleMap, clang::LangOptions::CMK_None, clang::FixItHint::CreateInsertion(), Diag(), clang::Module::GlobalModuleFragment, clang::SourceLocation::isValid(), and clang::Module::Module().

## ◆ ActOnModuleEnd()

void Sema::ActOnModuleEnd | ( | SourceLocation | DirectiveLoc,
|  | Module * | Mod
| ) |  |

The parser has left a submodule.

Definition at line 462 of file SemaModule.cpp.

References clang::Decl::Unowned.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnModuleImport() [1/2]

DeclResult Sema::ActOnModuleImport | ( | SourceLocation | StartLoc,
|  | SourceLocation | ExportLoc,
|  | SourceLocation | ImportLoc,
|  | ModuleIdPath | Path
| ) |  |

The parser has processed a module import declaration.

Parameters

  StartLoc | The location of the first token in the declaration. This could be the location of an '@', 'export', or 'import'.
  ExportLoc | The location of the 'export' keyword, if any.
  ImportLoc | The location of the 'import' keyword.
  Path | The module access path.

Definition at line 307 of file SemaModule.cpp.

References clang::Module::AllVisible.

## ◆ ActOnModuleImport() [2/2]

DeclResult Sema::ActOnModuleImport | ( | SourceLocation | StartLoc,
|  | SourceLocation | ExportLoc,
|  | SourceLocation | ImportLoc,
|  | Module * | M,
|  | ModuleIdPath | Path = `{}`
| ) |  |

Definition at line 341 of file SemaModule.cpp.

References checkModuleImportContext(), clang::ImportDecl::Create(), Diag(), clang::Module::getFullModuleName(), clang::Module::getTopLevelModuleName(), and clang::Module::Parent.

## ◆ ActOnModuleInclude()

void Sema::ActOnModuleInclude | ( | SourceLocation | DirectiveLoc,
|  | Module * | Mod
| ) |  |

The parser has processed a module import translated from a #include or similar preprocessing directive.

Definition at line 404 of file SemaModule.cpp.

References checkModuleImportContext().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnMSAsmStmt()

StmtResult Sema::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
| ) |  |

Definition at line 885 of file SemaStmtAsm.cpp.

## ◆ ActOnMSDependentExistsStmt()

StmtResult Sema::ActOnMSDependentExistsStmt | ( | SourceLocation | KeywordLoc,
|  | bool | IsIfExists,
|  | CXXScopeSpec & | SS,
|  | UnqualifiedId & | Name,
|  | Stmt * | Nested
| ) |  |

Definition at line 4260 of file SemaStmt.cpp.

## ◆ ActOnMSVCUnknownTypeName()

ParsedType Sema::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.

In these situations, we automatically form a DependentTypeName that will retry lookup in a related scope during instantiation.

Definition at line 556 of file SemaDecl.cpp.

References synthesizeCurrentNestedNameSpecifier().

## ◆ ActOnNameClassifiedAsDependentNonType()

ExprResult Sema::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.

Definition at line 1211 of file SemaDecl.cpp.

## ◆ ActOnNameClassifiedAsNonType()

ExprResult Sema::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.

Definition at line 1221 of file SemaDecl.cpp.

## ◆ ActOnNameClassifiedAsUndeclaredNonType()

ExprResult Sema::ActOnNameClassifiedAsUndeclaredNonType | ( | IdentifierInfo * | Name,
|  | SourceLocation | NameLoc
| ) |  |

Act on the result of classifying a name as an undeclared (ADL-only) non-type declaration.

Definition at line 1202 of file SemaDecl.cpp.

## ◆ ActOnNamespaceAliasDef()

Decl * Sema::ActOnNamespaceAliasDef | ( | Scope * | CurScope,
|  | SourceLocation | NamespaceLoc,
|  | SourceLocation | AliasLoc,
|  | IdentifierInfo * | Alias,
|  | CXXScopeSpec & | SS,
|  | SourceLocation | IdentLoc,
|  | IdentifierInfo * | Ident
| ) |  |

Definition at line 12279 of file SemaDeclCXX.cpp.

References clang::LookupResult::clear(), clang::NamespaceAliasDecl::Create(), Diag(), clang::LookupResult::empty(), clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), getNamespaceDecl(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getRepresentativeDecl(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::isAmbiguous(), clang::LookupResult::isSingleResult(), clang::Decl::isTemplateParameter(), and TryNamespaceTypoCorrection().

## ◆ ActOnNestedRequirement()

concepts::Requirement * Sema::ActOnNestedRequirement | ( | Expr * | Constraint | ) |

Definition at line 8482 of file SemaExprCXX.cpp.

References BuildNestedRequirement().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnNoexceptExpr()

ExprResult Sema::ActOnNoexceptExpr | ( | SourceLocation | KeyLoc,
|  | SourceLocation | LParen,
|  | Expr * | Operand,
|  | SourceLocation | RParen
| ) |  |

Definition at line 7511 of file SemaExprCXX.cpp.

References BuildCXXNoexceptExpr().

## ◆ ActOnNoexceptSpec()

ExprResult clang::Sema::ActOnNoexceptSpec | ( | SourceLocation | NoexceptLoc,
|  | Expr * | NoexceptExpr,
|  | ExceptionSpecificationType & | EST
| ) |  |

Check the given noexcept-specifier, convert its expression, and compute the appropriate ExceptionSpecificationType.

Definition at line 79 of file SemaExceptionSpec.cpp.

References clang::ASTContext::BoolTy, CheckBooleanCondition(), Context, clang::ConstantExpr::Create(), clang::EST_DependentNoexcept, clang::EST_NoexceptFalse, clang::EST_NoexceptTrue, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Result, and VerifyIntegerConstantExpression().

## ◆ ActOnNonTypeTemplateParameter()

NamedDecl * Sema::ActOnNonTypeTemplateParameter | ( | Scope * | S,
|  | Declarator & | D,
|  | unsigned | Depth,
|  | unsigned | Position,
|  | SourceLocation | EqualLoc,
|  | Expr * | DefaultArg
| ) |  |

Definition at line 1281 of file SemaTemplate.cpp.

## ◆ ActOnNullStmt()

StmtResult Sema::ActOnNullStmt | ( | SourceLocation | SemiLoc,
|  | bool | HasLeadingEmptyMacro = `false`
| ) |  |

Definition at line 67 of file SemaStmt.cpp.

## ◆ ActOnNumericConstant()

ExprResult Sema::ActOnNumericConstant | ( | const Token & | Tok,
|  | Scope * | UDLScope = `nullptr`
| ) |  |

Definition at line 3513 of file SemaExpr.cpp.

References clang::ExprError(), clang::Token::getLength(), and clang::Token::getLocation().

## ◆ ActOnObjCAtCatchStmt()

StmtResult Sema::ActOnObjCAtCatchStmt | ( | SourceLocation | AtLoc,
|  | SourceLocation | RParen,
|  | Decl * | Parm,
|  | Stmt * | Body
| ) |  |

Definition at line 3843 of file SemaStmt.cpp.

References clang::Decl::isInvalidDecl(), and clang::StmtError().

## ◆ ActOnObjCAtFinallyStmt()

StmtResult Sema::ActOnObjCAtFinallyStmt | ( | SourceLocation | AtLoc,
|  | Stmt * | Body
| ) |  |

Definition at line 3854 of file SemaStmt.cpp.

## ◆ ActOnObjCAtSynchronizedOperand()

ExprResult Sema::ActOnObjCAtSynchronizedOperand | ( | SourceLocation | atLoc,
|  | Expr * | operand
| ) |  |

Definition at line 3914 of file SemaStmt.cpp.

References Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjCObjectPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Type::isVoidType(), and clang::ast_matchers::pointerType.

## ◆ ActOnObjCAtSynchronizedStmt()

StmtResult Sema::ActOnObjCAtSynchronizedStmt | ( | SourceLocation | AtLoc,
|  | Expr * | SynchExpr,
|  | Stmt * | SynchBody
| ) |  |

Definition at line 3952 of file SemaStmt.cpp.

## ◆ ActOnObjCAtThrowStmt()

StmtResult Sema::ActOnObjCAtThrowStmt | ( | SourceLocation | AtLoc,
|  | Expr * | Throw,
|  | Scope * | CurScope
| ) |  |

Definition at line 3896 of file SemaStmt.cpp.

References Diag(), clang::Scope::getParent(), clang::Scope::isAtCatchScope(), and clang::StmtError().

## ◆ ActOnObjCAtTryStmt()

StmtResult Sema::ActOnObjCAtTryStmt | ( | SourceLocation | AtLoc,
|  | Stmt * | Try,
|  | MultiStmtArg | Catch,
|  | Stmt * | Finally
| ) |  |

Definition at line 3859 of file SemaStmt.cpp.

References clang::ObjCAtTryStmt::Create(), and Diag().

## ◆ ActOnObjCAutoreleasePoolStmt()

StmtResult Sema::ActOnObjCAutoreleasePoolStmt | ( | SourceLocation | AtLoc,
|  | Stmt * | Body
| ) |  |

Definition at line 3970 of file SemaStmt.cpp.

## ◆ ActOnObjCAvailabilityCheckExpr()

ExprResult Sema::ActOnObjCAvailabilityCheckExpr | ( | llvm::ArrayRef< AvailabilitySpec > | AvailSpecs,
|  | SourceLocation | AtLoc,
|  | SourceLocation | RParen
| ) |  |

Definition at line 18128 of file SemaExpr.cpp.

References clang::AvailabilitySpec::getPlatform(), and clang::AvailabilitySpec::getVersion().

## ◆ ActOnObjCBoolLiteral() [1/2]

ExprResult Sema::ActOnObjCBoolLiteral | ( | SourceLocation | OpLoc,
|  | tok::TokenKind | Kind
| ) |  |

ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.

Definition at line 18109 of file SemaExpr.cpp.

## ◆ ActOnObjCBoolLiteral() [2/2]

ExprResult Sema::ActOnObjCBoolLiteral | ( | SourceLocation | AtLoc,
|  | SourceLocation | ValueLoc,
|  | bool | Value
| ) |  |

Definition at line 367 of file SemaExprObjC.cpp.

## ◆ ActOnObjCBridgedCast()

ExprResult Sema::ActOnObjCBridgedCast | ( | Scope * | S,
|  | SourceLocation | LParenLoc,
|  | ObjCBridgeCastKind | Kind,
|  | SourceLocation | BridgeKeywordLoc,
|  | ParsedType | Type,
|  | SourceLocation | RParenLoc,
|  | Expr * | SubExpr
| ) |  |

Definition at line 4597 of file SemaExprObjC.cpp.

References clang::OBC_Bridge.

## ◆ ActOnObjCContainerFinishDefinition()

void Sema::ActOnObjCContainerFinishDefinition | ( |  | ) |

Definition at line 15883 of file SemaDecl.cpp.

## ◆ ActOnObjCContainerStartDefinition()

Decl * Sema::ActOnObjCContainerStartDefinition | ( | Decl * | IDecl | ) |

Definition at line 15807 of file SemaDecl.cpp.

Referenced by ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), and ActOnStartProtocolInterface().

## ◆ ActOnObjCExceptionDecl()

Decl * Sema::ActOnObjCExceptionDecl | ( | Scope * | S,
|  | Declarator & | D
| ) |  |

Definition at line 5068 of file SemaDeclObjC.cpp.

## ◆ ActOnObjCForCollectionStmt()

StmtResult Sema::ActOnObjCForCollectionStmt | ( | SourceLocation | ForColLoc,
|  | Stmt * | First,
|  | Expr * | collection,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 1902 of file SemaStmt.cpp.

References Diag(), clang::Type::getContainedAutoType(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::VarDecl::hasLocalStorage(), clang::Decl::isInvalidDecl(), and clang::StmtError().

## ◆ ActOnObjCInstanceType()

ParsedType Sema::ActOnObjCInstanceType | ( | SourceLocation | Loc | ) |

The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration.

Return the appropriate type.

Definition at line 6055 of file SemaType.cpp.

## ◆ actOnObjCProtocolQualifierType()

TypeResult Sema::actOnObjCProtocolQualifierType | ( | SourceLocation | lAngleLoc,
|  | ArrayRef< Decl *> | protocols,
|  | ArrayRef< SourceLocation > | protocolLocs,
|  | SourceLocation | rAngleLoc
| ) |  |

Build a an Objective-C protocol-qualified 'id' type where no base type was specified.

Definition at line 1099 of file SemaType.cpp.

References clang::Result.

## ◆ ActOnObjCReenterContainerContext()

void Sema::ActOnObjCReenterContainerContext | ( | DeclContext * | DC | ) |

Definition at line 15894 of file SemaDecl.cpp.

Referenced by clang::Parser::TryAnnotateOptionalCXXScopeToken().

## ◆ ActOnObjCTemporaryExitContainerContext()

void Sema::ActOnObjCTemporaryExitContainerContext | ( | DeclContext * | DC | ) |

Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs.

Must be followed by a call to

See also
  ActOnObjCReenterContainerContext

Definition at line 15888 of file SemaDecl.cpp.

Referenced by clang::Parser::TryAnnotateOptionalCXXScopeToken().

## ◆ actOnObjCTypeArgsAndProtocolQualifiers()

TypeResult Sema::actOnObjCTypeArgsAndProtocolQualifiers | ( | Scope * | S,
|  | SourceLocation | Loc,
|  | ParsedType | BaseType,
|  | SourceLocation | TypeArgsLAngleLoc,
|  | ArrayRef< ParsedType > | TypeArgs,
|  | SourceLocation | TypeArgsRAngleLoc,
|  | SourceLocation | ProtocolLAngleLoc,
|  | ArrayRef< Decl *> | Protocols,
|  | ArrayRef< SourceLocation > | ProtocolLocs,
|  | SourceLocation | ProtocolRAngleLoc
| ) |  |

Build a specialized and/or protocol-qualified Objective-C type.

Definition at line 1138 of file SemaType.cpp.

## ◆ actOnObjCTypeArgsOrProtocolQualifiers()

void Sema::actOnObjCTypeArgsOrProtocolQualifiers | ( | Scope * | S,
|  | ParsedType | baseType,
|  | SourceLocation | lAngleLoc,
|  | ArrayRef< IdentifierInfo *> | identifiers,
|  | ArrayRef< SourceLocation > | identifierLocs,
|  | SourceLocation | rAngleLoc,
|  | SourceLocation & | typeArgsLAngleLoc,
|  | SmallVectorImpl< ParsedType > & | typeArgs,
|  | SourceLocation & | typeArgsRAngleLoc,
|  | SourceLocation & | protocolLAngleLoc,
|  | SmallVectorImpl< Decl *> & | protocols,
|  | SourceLocation & | protocolRAngleLoc,
|  | bool | warnOnIncompleteProtocols
| ) |  |

Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol qualifiers or type arguments, as appropriate.

Definition at line 1405 of file SemaDeclObjC.cpp.

## ◆ actOnObjCTypeParam()

DeclResult Sema::actOnObjCTypeParam | ( | Scope * | S,
|  | ObjCTypeParamVariance | variance,
|  | SourceLocation | varianceLoc,
|  | unsigned | index,
|  | IdentifierInfo * | paramName,
|  | SourceLocation | paramLoc,
|  | SourceLocation | colonLoc,
|  | ParsedType | typeBound
| ) |  |

Definition at line 665 of file SemaDeclObjC.cpp.

## ◆ actOnObjCTypeParamList()

ObjCTypeParamList * Sema::actOnObjCTypeParamList | ( | Scope * | S,
|  | SourceLocation | lAngleLoc,
|  | ArrayRef< Decl *> | typeParams,
|  | SourceLocation | rAngleLoc
| ) |  |

Definition at line 769 of file SemaDeclObjC.cpp.

## ◆ ActOnOMPArraySectionExpr()

ExprResult Sema::ActOnOMPArraySectionExpr | ( | Expr * | Base,
|  | SourceLocation | LBLoc,
|  | Expr * | LowerBound,
|  | SourceLocation | ColonLoc,
|  | Expr * | Length,
|  | SourceLocation | RBLoc
| ) |  |

Definition at line 4586 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isNonOverloadPlaceholderType(), clang::Type::isPlaceholderType(), clang::Type::isSpecificPlaceholderType(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().

## ◆ ActOnOpenMPAlignedClause()

OMPClause * Sema::ActOnOpenMPAlignedClause | ( | ArrayRef< Expr *> | VarList,
|  | Expr * | Alignment,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | ColonLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'aligned' clause.

Definition at line 14611 of file SemaOpenMP.cpp.

References Diag(), clang::QualType::getCanonicalType(), clang::QualType::getNonReferenceType(), getPrivateItem(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Type::isArrayType(), and clang::Type::isPointerType().

## ◆ ActOnOpenMPAllocateClause()

OMPClause * Sema::ActOnOpenMPAllocateClause | ( | Expr * | Allocator,
|  | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | ColonLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'allocate' clause.

Definition at line 17194 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPAllocateDirective()

Sema::DeclGroupPtrTy Sema::ActOnOpenMPAllocateDirective | ( | SourceLocation | Loc,
|  | ArrayRef< Expr *> | VarList,
|  | ArrayRef< OMPClause *> | Clauses,
|  | DeclContext * | Owner = `nullptr`
| ) |  |

Called on well-formed '#pragma omp allocate'.

Definition at line 2711 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPAllocatorClause()

OMPClause * Sema::ActOnOpenMPAllocatorClause | ( | Expr * | Allocator,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'allocator' clause.

Definition at line 11786 of file SemaOpenMP.cpp.

References DSAStack, findOMPAllocatorHandleT(), and clang::Expr::getExprLoc().

## ◆ ActOnOpenMPAtomicDefaultMemOrderClause()

OMPClause * Sema::ActOnOpenMPAtomicDefaultMemOrderClause | ( | OpenMPAtomicDefaultMemOrderClauseKind | Kind,
|  | SourceLocation | KindLoc,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'atomic_default_mem_order' clause.

Definition at line 11998 of file SemaOpenMP.cpp.

References Diag(), getListOfPossibleValues(), clang::getOpenMPClauseName(), and clang::OMPC_ATOMIC_DEFAULT_MEM_ORDER_unknown.

## ◆ ActOnOpenMPAtomicDirective()

StmtResult Sema::ActOnOpenMPAtomicDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp atomic' after parsing of the associated statement.

Definition at line 8816 of file SemaOpenMP.cpp.

References clang::C, Diag(), clang::First, clang::Stmt::getBeginLoc(), clang::CapturedStmt::getCapturedStmt(), clang::Expr::getExprLoc(), clang::BinaryOperator::getExprLoc(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::getOpenMPClauseName(), clang::BinaryOperator::getOperatorLoc(), clang::BinaryOperator::getRHS(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::isInstantiationDependent(), clang::Expr::isLValue(), clang::Type::isScalarType(), clang::OMPC_unknown, clang::StmtError(), V, and X.

## ◆ ActOnOpenMPBarrierDirective()

StmtResult Sema::ActOnOpenMPBarrierDirective | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp barrier'.

Definition at line 8463 of file SemaOpenMP.cpp.

References clang::OMPBarrierDirective::Create().

## ◆ ActOnOpenMPCancelDirective()

StmtResult Sema::ActOnOpenMPCancelDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | OpenMPDirectiveKind | CancelRegion
| ) |  |

Called on well-formed '#pragma omp cancel'.

Definition at line 9580 of file SemaOpenMP.cpp.

References clang::OMPCancelDirective::Create(), Diag(), DSAStack, and clang::StmtError().

## ◆ ActOnOpenMPCancellationPointDirective()

StmtResult Sema::ActOnOpenMPCancellationPointDirective | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | OpenMPDirectiveKind | CancelRegion
| ) |  |

Called on well-formed '#pragma omp cancellation point'.

Definition at line 9565 of file SemaOpenMP.cpp.

References clang::OMPCancellationPointDirective::Create(), Diag(), DSAStack, and clang::StmtError().

## ◆ ActOnOpenMPCaptureClause()

OMPClause * Sema::ActOnOpenMPCaptureClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'capture' clause.

Definition at line 12355 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPClause()

OMPClause * Sema::ActOnOpenMPClause | ( | OpenMPClauseKind | Kind,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Definition at line 12221 of file SemaOpenMP.cpp.

References clang::OMPC_device_type, clang::OMPC_match, clang::OMPC_threadprivate, clang::OMPC_uniform, and clang::OMPC_unknown.

## ◆ ActOnOpenMPCollapseClause()

OMPClause * Sema::ActOnOpenMPCollapseClause | ( | Expr * | NumForLoops,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'collapse' clause.

Definition at line 11807 of file SemaOpenMP.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ ActOnOpenMPCopyinClause()

OMPClause * Sema::ActOnOpenMPCopyinClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'copyin' clause.

Definition at line 14686 of file SemaOpenMP.cpp.

References Diag(), DSAStack, clang::Expr::getExprLoc(), clang::getOpenMPClauseName(), and clang::Stmt::getSourceRange().

## ◆ ActOnOpenMPCopyprivateClause()

OMPClause * Sema::ActOnOpenMPCopyprivateClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'copyprivate' clause.

Definition at line 14780 of file SemaOpenMP.cpp.

References Diag(), DSAStack, clang::getOpenMPClauseName(), getPrivateItem(), clang::ValueDecl::getType(), clang::Type::isAnyPointerType(), clang::Type::isVariablyModifiedType(), clang::OMPC_unknown, and reportOriginalDsa().

## ◆ ActOnOpenMPCriticalDirective()

StmtResult Sema::ActOnOpenMPCriticalDirective | ( | const DeclarationNameInfo & | DirName,
|  | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp critical' after parsing of the associated statement.

Definition at line 8231 of file SemaOpenMP.cpp.

References clang::C, Diag(), clang::Expr::EvaluateKnownConstInt(), clang::DeclarationNameInfo::getName(), clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::StmtError().

## ◆ ActOnOpenMPDeclareMapperDirectiveEnd()

Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareMapperDirectiveEnd | ( | OMPDeclareMapperDecl * | D,
|  | Scope * | S,
|  | ArrayRef< OMPClause *> | ClauseList
| ) |  |

Called at the end of '#pragma omp declare mapper'.

Definition at line 16538 of file SemaOpenMP.cpp.

References clang::OMPDeclareMapperDecl::CreateClauses().

## ◆ ActOnOpenMPDeclareMapperDirectiveStart()

OMPDeclareMapperDecl * Sema::ActOnOpenMPDeclareMapperDirectiveStart | ( | Scope * | S,
|  | DeclContext * | DC,
|  | DeclarationName | Name,
|  | QualType | MapperType,
|  | SourceLocation | StartLoc,
|  | DeclarationName | VN,
|  | AccessSpecifier | AS,
|  | Decl * | PrevDeclInScope = `nullptr`
| ) |  |

Called on start of '#pragma omp declare mapper'.

Definition at line 16445 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPDeclareMapperDirectiveVarDecl()

void Sema::ActOnOpenMPDeclareMapperDirectiveVarDecl | ( | OMPDeclareMapperDecl * | DMD,
|  | Scope * | S,
|  | QualType | MapperType,
|  | SourceLocation | StartLoc,
|  | DeclarationName | VN
| ) |  |

Build the mapper variable of '#pragma omp declare mapper'.

Definition at line 16523 of file SemaOpenMP.cpp.

References clang::DeclContext::addDecl(), buildDeclRefExpr(), buildVarDecl(), clang::DeclarationName::getAsString(), and clang::OMPDeclareMapperDecl::setMapperVarRef().

## ◆ ActOnOpenMPDeclareMapperType()

QualType Sema::ActOnOpenMPDeclareMapperType | ( | SourceLocation | TyLoc,
|  | TypeResult | ParsedType
| ) |  |

Check if the specified type is allowed to be used in 'omp declare mapper' construct.

Definition at line 16429 of file SemaOpenMP.cpp.

References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().

## ◆ ActOnOpenMPDeclareMapperVarDecl()

TypeResult Sema::ActOnOpenMPDeclareMapperVarDecl | ( | Scope * | S,
|  | Declarator & | D
| ) |  |

Check variable declaration in 'omp declare mapper' construct.

Definition at line 16415 of file SemaOpenMP.cpp.

References clang::TypeSourceInfo::getType(), and clang::Declarator::isInvalidType().

## ◆ ActOnOpenMPDeclareReductionCombinerEnd()

void Sema::ActOnOpenMPDeclareReductionCombinerEnd | ( | Decl * | D,
|  | Expr * | Combiner
| ) |  |

Finish current declare reduction construct initializer.

Definition at line 16319 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPDeclareReductionCombinerStart()

void Sema::ActOnOpenMPDeclareReductionCombinerStart | ( | Scope * | S,
|  | Decl * | D
| ) |  |

Initialize declare reduction construct initializer.

Definition at line 16272 of file SemaOpenMP.cpp.

References buildDeclRefExpr(), buildVarDecl(), and clang::Decl::getLocation().

## ◆ ActOnOpenMPDeclareReductionDirectiveEnd()

Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareReductionDirectiveEnd | ( | Scope * | S,
|  | DeclGroupPtrTy | DeclReductions,
|  | bool | IsValid
| ) |  |

Called at the end of '#pragma omp declare reduction'.

Definition at line 16401 of file SemaOpenMP.cpp.

References clang::OpaquePtr< PtrTy >::get(), and clang::Decl::setInvalidDecl().

## ◆ ActOnOpenMPDeclareReductionDirectiveStart()

Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareReductionDirectiveStart | ( | Scope * | S,
|  | DeclContext * | DC,
|  | DeclarationName | Name,
|  | ArrayRef< std::pair< QualType, SourceLocation >> | ReductionTypes,
|  | AccessSpecifier | AS,
|  | Decl * | PrevDeclInScope = `nullptr`
| ) |  |

Called on start of '#pragma omp declare reduction'.

Definition at line 16190 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPDeclareReductionInitializerEnd()

void Sema::ActOnOpenMPDeclareReductionInitializerEnd | ( | Decl * | D,
|  | Expr * | Initializer,
|  | VarDecl * | OmpPrivParm
| ) |  |

Finish current declare reduction construct initializer.

Definition at line 16380 of file SemaOpenMP.cpp.

References clang::OMPDeclareReductionDecl::CallInit, clang::OMPDeclareReductionDecl::CopyInit, clang::OMPDeclareReductionDecl::DirectInit, clang::VarDecl::getInit(), clang::VarDecl::hasInit(), and clang::VarDecl::isDirectInit().

## ◆ ActOnOpenMPDeclareReductionInitializerStart()

VarDecl * Sema::ActOnOpenMPDeclareReductionInitializerStart | ( | Scope * | S,
|  | Decl * | D
| ) |  |

Initialize declare reduction construct initializer.

Returns
  omp_priv variable.

Definition at line 16333 of file SemaOpenMP.cpp.

References buildDeclRefExpr(), buildVarDecl(), and clang::Decl::getLocation().

## ◆ ActOnOpenMPDeclareReductionType()

QualType Sema::ActOnOpenMPDeclareReductionType | ( | SourceLocation | TyLoc,
|  | TypeResult | ParsedType
| ) |  |

Check if the specified type is allowed to be used in 'omp declare reduction' construct.

Definition at line 16158 of file SemaOpenMP.cpp.

References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().

## ◆ ActOnOpenMPDeclareSimdDirective()

Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective | ( | DeclGroupPtrTy | DG,
|  | OMPDeclareSimdDeclAttr::BranchStateTy | BS,
|  | Expr * | Simdlen,
|  | ArrayRef< Expr *> | Uniforms,
|  | ArrayRef< Expr *> | Aligneds,
|  | ArrayRef< Expr *> | Alignments,
|  | ArrayRef< Expr *> | Linears,
|  | ArrayRef< unsigned > | LinModifiers,
|  | ArrayRef< Expr *> | Steps,
|  | SourceRange | SR
| ) |  |

Called on well-formed '#pragma omp declare simd' after parsing of the associated method/function.

Definition at line 4995 of file SemaOpenMP.cpp.

References clang::Expr::containsUnexpandedParameterPack(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::Decl::getCanonicalDecl(), getCanonicalDecl(), clang::VarDecl::getCanonicalDecl(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::getOpenMPClauseName(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getTypePtrOrNull(), clang::Type::hasIntegerRepresentation(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isArrayType(), clang::Expr::isInstantiationDependent(), clang::Type::isPointerType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::OMPC_uniform, and Step.

## ◆ ActOnOpenMPDeclareTargetName()

void Sema::ActOnOpenMPDeclareTargetName | ( | NamedDecl * | ND,
|  | SourceLocation | Loc,
|  | OMPDeclareTargetDeclAttr::MapTypeTy | MT,
|  | OMPDeclareTargetDeclAttr::DevTypeTy | DT
| ) |  |

Called on correct id-expression from the '#pragma omp declare target'.

Definition at line 16854 of file SemaOpenMP.cpp.

References Diag(), clang::Decl::isReferenced(), and clang::Decl::isUsed().

## ◆ ActOnOpenMPDeclareVariantDirective()

void Sema::ActOnOpenMPDeclareVariantDirective | ( | FunctionDecl * | FD,
|  | Expr * | VariantRef,
|  | SourceRange | SR,
|  | ArrayRef< OMPCtxSelectorData > | Data
| ) |  |

Called on well-formed '#pragma omp declare variant' after parsing of the associated method/function.

Parameters

  FD | Function declaration to which declare variant directive is applied to.
  VariantRef | Expression that references the variant function, which must be used instead of the original one, specified in `DG`.
  Data | Set of context-specific data for the specified context selector.

Definition at line 5500 of file SemaOpenMP.cpp.

References clang::Expr::containsUnexpandedParameterPack(), clang::Expr::getExprLoc(), clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::OMP_CTX_SET_unknown, clang::OMP_CTX_unknown, and pow.

## ◆ ActOnOpenMPDefaultClause()

OMPClause * Sema::ActOnOpenMPDefaultClause | ( | OpenMPDefaultClauseKind | Kind,
|  | SourceLocation | KindLoc,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'default' clause.

Definition at line 11952 of file SemaOpenMP.cpp.

References Diag(), DSAStack, getListOfPossibleValues(), clang::getOpenMPClauseName(), and clang::OMPC_DEFAULT_unknown.

## ◆ ActOnOpenMPDefaultmapClause()

OMPClause * Sema::ActOnOpenMPDefaultmapClause | ( | OpenMPDefaultmapClauseModifier | M,
|  | OpenMPDefaultmapClauseKind | Kind,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | MLoc,
|  | SourceLocation | KindLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'defaultmap' clause.

Definition at line 16735 of file SemaOpenMP.cpp.

References Diag(), DSAStack, clang::getOpenMPClauseName(), clang::getOpenMPSimpleClauseTypeName(), clang::OMPC_DEFAULTMAP_MODIFIER_unknown, and clang::OMPC_DEFAULTMAP_unknown.

## ◆ ActOnOpenMPDependClause()

OMPClause * Sema::ActOnOpenMPDependClause | ( | OpenMPDependClauseKind | DepKind,
|  | SourceLocation | DepLoc,
|  | SourceLocation | ColonLoc,
|  | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'depend' clause.

Definition at line 14904 of file SemaOpenMP.cpp.

References Diag(), DSAStack, getListOfPossibleValues(), clang::getOpenMPClauseName(), and clang::OMPC_DEPEND_unknown.

## ◆ ActOnOpenMPDeviceClause()

OMPClause * Sema::ActOnOpenMPDeviceClause | ( | Expr * | Device,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'device' clause.

Definition at line 15085 of file SemaOpenMP.cpp.

References buildPreInits(), DSAStack, getOpenMPCaptureRegionForClause(), and isNonNegativeIntegerValue().

## ◆ ActOnOpenMPDistributeDirective()

StmtResult Sema::ActOnOpenMPDistributeDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp distribute' after parsing of the associated statement.

Definition at line 9941 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), checkOpenMPLoop(), clang::OMPDistributeDirective::Create(), DSAStack, getCollapseNumberExpr(), and clang::StmtError().

## ◆ ActOnOpenMPDistributeParallelForDirective()

StmtResult Sema::ActOnOpenMPDistributeParallelForDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp distribute parallel for' after parsing of the associated statement.

Definition at line 9966 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), checkOpenMPLoop(), clang::OMPDistributeParallelForDirective::Create(), DSAStack, clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPDistributeParallelForSimdDirective()

StmtResult Sema::ActOnOpenMPDistributeParallelForSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp distribute parallel for simd' after parsing of the associated statement.

Definition at line 10010 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPDistributeParallelForSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPDistributeSimdDirective()

StmtResult Sema::ActOnOpenMPDistributeSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp distribute simd' after parsing of the associated statement.

Definition at line 10067 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPDistributeSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPDistScheduleClause()

OMPClause * Sema::ActOnOpenMPDistScheduleClause | ( | OpenMPDistScheduleClauseKind | Kind,
|  | Expr * | ChunkSize,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | KindLoc,
|  | SourceLocation | CommaLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'dist_schedule' clause.

Definition at line 16681 of file SemaOpenMP.cpp.

References clang::Expr::containsUnexpandedParameterPack(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), clang::getOpenMPClauseName(), clang::getOpenMPSimpleClauseTypeName(), clang::Expr::isInstantiationDependent(), clang::Expr::isIntegerConstantExpr(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::OMPC_DIST_SCHEDULE_unknown, and clang::Result.

## ◆ ActOnOpenMPDynamicAllocatorsClause()

OMPClause * Sema::ActOnOpenMPDynamicAllocatorsClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'dynamic_allocators' clause.

Definition at line 12395 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPExecutableDirective()

StmtResult Sema::ActOnOpenMPExecutableDirective | ( | OpenMPDirectiveKind | Kind,
|  | const DeclarationNameInfo & | DirName,
|  | OpenMPDirectiveKind | CancelRegion,
|  | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Definition at line 4459 of file SemaOpenMP.cpp.

References checkCancelRegion(), checkNestingOfRegions(), DSAStack, and clang::StmtError().

## ◆ ActOnOpenMPFinalClause()

OMPClause * Sema::ActOnOpenMPFinalClause | ( | Expr * | Condition,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'final' clause.

Definition at line 11542 of file SemaOpenMP.cpp.

References buildPreInits(), clang::Expr::containsUnexpandedParameterPack(), DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), getOpenMPCaptureRegionForClause(), clang::Expr::isInstantiationDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().

## ◆ ActOnOpenMPFirstprivateClause()

OMPClause * Sema::ActOnOpenMPFirstprivateClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'firstprivate' clause.

Definition at line 12726 of file SemaOpenMP.cpp.

References DSAStack, clang::QualType::getNonReferenceType(), getPrivateItem(), clang::ValueDecl::getType(), Inits, and clang::SourceLocation::isInvalid().

## ◆ ActOnOpenMPFlushClause()

OMPClause * Sema::ActOnOpenMPFlushClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'flush' pseudo clause.

Definition at line 14893 of file SemaOpenMP.cpp.

References OMPFlushClause::Create().

## ◆ ActOnOpenMPFlushDirective()

StmtResult Sema::ActOnOpenMPFlushDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp flush'.

Definition at line 8489 of file SemaOpenMP.cpp.

References clang::OMPFlushDirective::Create().

## ◆ ActOnOpenMPForDirective()

StmtResult Sema::ActOnOpenMPForDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp for' after parsing of the associated statement.

Definition at line 8060 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), clang::OMPForDirective::Create(), DSAStack, FinishOpenMPLinearClause(), getCollapseNumberExpr(), getOrderedNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, and clang::StmtError().

## ◆ ActOnOpenMPForSimdDirective()

StmtResult Sema::ActOnOpenMPForSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp for simd' after parsing of the associated statement.

Definition at line 8095 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPForSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), getCollapseNumberExpr(), getOrderedNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, and clang::StmtError().

## ◆ ActOnOpenMPFromClause()

OMPClause * Sema::ActOnOpenMPFromClause | ( | ArrayRef< Expr *> | VarList,
|  | CXXScopeSpec & | MapperIdScopeSpec,
|  | DeclarationNameInfo & | MapperId,
|  | const OMPVarListLocTy & | Locs,
|  | ArrayRef< Expr *> | UnresolvedMappers = `llvm::None`
| ) |  |

Called on well-formed 'from' clause.

Definition at line 17010 of file SemaOpenMP.cpp.

References checkMappableExpressionList(), OMPFromClause::Create(), DSAStack, and clang::OMPVarListLocTy::StartLoc.

## ◆ ActOnOpenMPGrainsizeClause()

OMPClause * Sema::ActOnOpenMPGrainsizeClause | ( | Expr * | Size,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'grainsize' clause.

Definition at line 16626 of file SemaOpenMP.cpp.

References DSAStack, and isNonNegativeIntegerValue().

## ◆ ActOnOpenMPHintClause()

OMPClause * Sema::ActOnOpenMPHintClause | ( | Expr * | Hint,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'hint' clause.

Definition at line 16668 of file SemaOpenMP.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ ActOnOpenMPIdExpression()

ExprResult Sema::ActOnOpenMPIdExpression | ( | Scope * | CurScope,
|  | CXXScopeSpec & | ScopeSpec,
|  | const DeclarationNameInfo & | Id,
|  | OpenMPDirectiveKind | Kind
| ) |  |

Called on correct id-expression from the '#pragma omp threadprivate'.

Definition at line 2370 of file SemaOpenMP.cpp.

References Diag(), clang::LookupResult::empty(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::LookupResult::getFoundDecl(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::VarDecl::hasGlobalStorage(), clang::LookupResult::isAmbiguous(), clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticLocal(), clang::VarDecl::isThisDeclarationADefinition(), and clang::LookupResult::suppressDiagnostics().

## ◆ ActOnOpenMPIfClause()

OMPClause * Sema::ActOnOpenMPIfClause | ( | OpenMPDirectiveKind | NameModifier,
|  | Expr * | Condition,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | NameModifierLoc,
|  | SourceLocation | ColonLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'if' clause.

Definition at line 11508 of file SemaOpenMP.cpp.

References buildPreInits(), clang::Expr::containsUnexpandedParameterPack(), DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), getOpenMPCaptureRegionForClause(), clang::Expr::isInstantiationDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().

## ◆ ActOnOpenMPInReductionClause()

OMPClause * Sema::ActOnOpenMPInReductionClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | ColonLoc,
|  | SourceLocation | EndLoc,
|  | CXXScopeSpec & | ReductionIdScopeSpec,
|  | const DeclarationNameInfo & | ReductionId,
|  | ArrayRef< Expr *> | UnresolvedReductions = `llvm::None`
| ) |  |

Called on well-formed 'in_reduction' clause.

Definition at line 14302 of file SemaOpenMP.cpp.

References actOnOMPReductionKindClause(), clang::OMPInReductionClause::Create(), and DSAStack.

## ◆ ActOnOpenMPIsDevicePtrClause()

OMPClause * Sema::ActOnOpenMPIsDevicePtrClause | ( | ArrayRef< Expr *> | VarList,
|  | const OMPVarListLocTy & | Locs
| ) |  |

Called on well-formed 'is_device_ptr' clause.

Definition at line 17112 of file SemaOpenMP.cpp.

References OMPIsDevicePtrClause::Create(), Diag(), DSAStack, clang::Expr::getExprLoc(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), getPrivateItem(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Type::isArrayType(), clang::isOpenMPPrivate(), clang::Type::isPointerType(), and reportOriginalDsa().

## ◆ ActOnOpenMPLastprivateClause()

OMPClause * Sema::ActOnOpenMPLastprivateClause | ( | ArrayRef< Expr *> | VarList,
|  | OpenMPLastprivateModifier | LPKind,
|  | SourceLocation | LPKindLoc,
|  | SourceLocation | ColonLoc,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'lastprivate' clause.

Definition at line 13004 of file SemaOpenMP.cpp.

References Diag(), getListOfPossibleValues(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), getPrivateItem(), clang::ValueDecl::getType(), clang::Type::isScalarType(), clang::SourceLocation::isValid(), clang::OMPC_LASTPRIVATE_unknown, and rejectConstNotMutableType().

## ◆ ActOnOpenMPLinearClause()

OMPClause * Sema::ActOnOpenMPLinearClause | ( | ArrayRef< Expr *> | VarList,
|  | Expr * | Step,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | OpenMPLinearClauseKind | LinKind,
|  | SourceLocation | LinLoc,
|  | SourceLocation | ColonLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'linear' clause.

Definition at line 14373 of file SemaOpenMP.cpp.

References buildCapture(), buildDeclRefExpr(), buildVarDecl(), CalcStep, clang::Expr::containsUnexpandedParameterPack(), Diag(), DSAStack, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAttrs(), clang::Stmt::getBeginLoc(), clang::QualType::getCanonicalType(), clang::DeclRefExpr::getDecl(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), getPrivateItem(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::Expr::IgnoreParens(), Inits, clang::Expr::isInstantiationDependent(), clang::Expr::isIntegerConstantExpr(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Expr::isValueDependent(), Privates, reportOriginalDsa(), clang::Result, and Step.

## ◆ ActOnOpenMPLoopInitialization()

void Sema::ActOnOpenMPLoopInitialization | ( | SourceLocation | ForLoc,
|  | Stmt * | Init
| ) |  |

Check if the current region is an OpenMP loop region and if it is, mark loop control variable, used in `Init` for loop initialization, as private by default.

Parameters

  Init | First part of the for loop.

Definition at line 6839 of file SemaOpenMP.cpp.

References buildCapture(), buildDeclRefExpr(), DSAStack, clang::Decl::getCanonicalDecl(), and clang::isOpenMPLoopDirective().

## ◆ ActOnOpenMPMapClause()

OMPClause * Sema::ActOnOpenMPMapClause | ( | ArrayRef< OpenMPMapModifierKind > | MapTypeModifiers,
|  | ArrayRef< SourceLocation > | MapTypeModifiersLoc,
|  | CXXScopeSpec & | MapperIdScopeSpec,
|  | DeclarationNameInfo & | MapperId,
|  | OpenMPMapClauseKind | MapType,
|  | bool | IsMapTypeImplicit,
|  | SourceLocation | MapLoc,
|  | SourceLocation | ColonLoc,
|  | ArrayRef< Expr *> | VarList,
|  | const OMPVarListLocTy & | Locs,
|  | ArrayRef< Expr *> | UnresolvedMappers = `llvm::None`
| ) |  |

Called on well-formed 'map' clause.

Definition at line 16117 of file SemaOpenMP.cpp.

References checkMappableExpressionList(), OMPMapClause::Create(), Diag(), DSAStack, OMPMapClause::NumberOfModifiers, clang::OMPC_MAP_MODIFIER_unknown, and clang::OMPVarListLocTy::StartLoc.

## ◆ ActOnOpenMPMasterDirective()

StmtResult Sema::ActOnOpenMPMasterDirective | ( | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp master' after parsing of the associated statement.

Definition at line 8218 of file SemaOpenMP.cpp.

References clang::OMPMasterDirective::Create(), and clang::StmtError().

## ◆ ActOnOpenMPMasterTaskLoopDirective()

StmtResult Sema::ActOnOpenMPMasterTaskLoopDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp master taskloop' after parsing of the associated statement.

Definition at line 9733 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), checkGrainsizeNumTasksClauses(), checkOpenMPLoop(), checkReductionClauseWithNogroup(), clang::OMPMasterTaskLoopDirective::Create(), DSAStack, getCollapseNumberExpr(), and clang::StmtError().

## ◆ ActOnOpenMPMasterTaskLoopSimdDirective()

StmtResult Sema::ActOnOpenMPMasterTaskLoopSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp master taskloop simd' after parsing of the associated statement.

Definition at line 9769 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkGrainsizeNumTasksClauses(), checkOpenMPLoop(), checkReductionClauseWithNogroup(), checkSimdlenSafelenSpecified(), clang::OMPMasterTaskLoopSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, and clang::StmtError().

## ◆ ActOnOpenMPMergeableClause()

OMPClause * Sema::ActOnOpenMPMergeableClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'mergeable' clause.

Definition at line 12335 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPNogroupClause()

OMPClause * Sema::ActOnOpenMPNogroupClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'nogroup' clause.

Definition at line 12375 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPNontemporalClause()

OMPClause * Sema::ActOnOpenMPNontemporalClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'nontemporal' clause.

Definition at line 17255 of file SemaOpenMP.cpp.

References OMPNontemporalClause::Create(), Diag(), DSAStack, clang::getOpenMPClauseName(), and getPrivateItem().

## ◆ ActOnOpenMPNowaitClause()

OMPClause * Sema::ActOnOpenMPNowaitClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'nowait' clause.

Definition at line 12324 of file SemaOpenMP.cpp.

References DSAStack.

## ◆ ActOnOpenMPNumTasksClause()

OMPClause * Sema::ActOnOpenMPNumTasksClause | ( | Expr * | NumTasks,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'num_tasks' clause.

Definition at line 16647 of file SemaOpenMP.cpp.

References DSAStack, and isNonNegativeIntegerValue().

## ◆ ActOnOpenMPNumTeamsClause()

OMPClause * Sema::ActOnOpenMPNumTeamsClause | ( | Expr * | NumTeams,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'num_teams' clause.

Definition at line 16552 of file SemaOpenMP.cpp.

References buildPreInits(), DSAStack, getOpenMPCaptureRegionForClause(), and isNonNegativeIntegerValue().

## ◆ ActOnOpenMPNumThreadsClause()

OMPClause * Sema::ActOnOpenMPNumThreadsClause | ( | Expr * | NumThreads,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'num_threads' clause.

Definition at line 11658 of file SemaOpenMP.cpp.

References buildPreInits(), DSAStack, getOpenMPCaptureRegionForClause(), and isNonNegativeIntegerValue().

## ◆ ActOnOpenMPOrderedClause()

OMPClause * Sema::ActOnOpenMPOrderedClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | SourceLocation | LParenLoc = `SourceLocation()`,
|  | Expr * | NumForLoops = `nullptr`
| ) |  |

Called on well-formed 'ordered' clause.

Definition at line 11824 of file SemaOpenMP.cpp.

References clang::OMPOrderedClause::Create(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::SourceLocation::isValid().

## ◆ ActOnOpenMPOrderedDirective()

StmtResult Sema::ActOnOpenMPOrderedDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp ordered' after parsing of the associated statement.

Definition at line 8496 of file SemaOpenMP.cpp.

References clang::C, clang::OMPOrderedDirective::Create(), Diag(), DSAStack, clang::OMPClause::getBeginLoc(), clang::getOpenMPClauseName(), clang::isOpenMPSimdDirective(), and clang::StmtError().

## ◆ ActOnOpenMPParallelDirective()

StmtResult Sema::ActOnOpenMPParallelDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp parallel' after parsing of the associated statement.

Definition at line 5590 of file SemaOpenMP.cpp.

References clang::OMPParallelDirective::Create(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPParallelForDirective()

StmtResult Sema::ActOnOpenMPParallelForDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.

Definition at line 8290 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), clang::OMPParallelForDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), getCollapseNumberExpr(), getOrderedNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPParallelForSimdDirective()

StmtResult Sema::ActOnOpenMPParallelForSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement.

Definition at line 8334 of file SemaOpenMP.cpp.

References clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPParallelForSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), getCollapseNumberExpr(), getOrderedNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPParallelMasterDirective()

StmtResult Sema::ActOnOpenMPParallelMasterDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp parallel master' after parsing of the associated statement.

Definition at line 8378 of file SemaOpenMP.cpp.

References clang::OMPParallelMasterDirective::Create(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPParallelMasterTaskLoopDirective()

StmtResult Sema::ActOnOpenMPParallelMasterTaskLoopDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp parallel master taskloop' after parsing of the associated statement.

Definition at line 9818 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), checkGrainsizeNumTasksClauses(), checkOpenMPLoop(), checkReductionClauseWithNogroup(), clang::OMPParallelMasterTaskLoopDirective::Create(), DSAStack, clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPParallelMasterTaskLoopSimdDirective()

StmtResult Sema::ActOnOpenMPParallelMasterTaskLoopSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp parallel master taskloop simd' after parsing of the associated statement.

Definition at line 9873 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkGrainsizeNumTasksClauses(), checkOpenMPLoop(), checkReductionClauseWithNogroup(), checkSimdlenSafelenSpecified(), clang::OMPParallelMasterTaskLoopSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPParallelSectionsDirective()

StmtResult Sema::ActOnOpenMPParallelSectionsDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.

Definition at line 8400 of file SemaOpenMP.cpp.

References clang::C, clang::OMPParallelSectionsDirective::Create(), Diag(), DSAStack, clang::Stmt::getBeginLoc(), clang::CapturedStmt::getCapturedStmt(), and clang::StmtError().

## ◆ ActOnOpenMPPriorityClause()

OMPClause * Sema::ActOnOpenMPPriorityClause | ( | Expr * | Priority,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'priority' clause.

Definition at line 16606 of file SemaOpenMP.cpp.

References DSAStack, isNonNegativeIntegerValue(), and Priority.

## ◆ ActOnOpenMPPrivateClause()

OMPClause * Sema::ActOnOpenMPPrivateClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'private' clause.

Definition at line 12566 of file SemaOpenMP.cpp.

References Diag(), DSAStack, clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), getPrivateItem(), clang::ValueDecl::getType(), clang::Type::isAnyPointerType(), clang::isOpenMPTaskingDirective(), clang::Type::isVariablyModifiedType(), clang::OMPC_unknown, rejectConstNotMutableType(), and reportOriginalDsa().

## ◆ ActOnOpenMPProcBindClause()

OMPClause * Sema::ActOnOpenMPProcBindClause | ( | llvm::omp::ProcBindKind | Kind,
|  | SourceLocation | KindLoc,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'proc_bind' clause.

Definition at line 11981 of file SemaOpenMP.cpp.

References Diag(), getListOfPossibleValues(), and clang::getOpenMPClauseName().

## ◆ ActOnOpenMPReadClause()

OMPClause * Sema::ActOnOpenMPReadClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'read' clause.

Definition at line 12340 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPReductionClause()

OMPClause * Sema::ActOnOpenMPReductionClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | ColonLoc,
|  | SourceLocation | EndLoc,
|  | CXXScopeSpec & | ReductionIdScopeSpec,
|  | const DeclarationNameInfo & | ReductionId,
|  | ArrayRef< Expr *> | UnresolvedReductions = `llvm::None`
| ) |  |

Called on well-formed 'reduction' clause.

Definition at line 14262 of file SemaOpenMP.cpp.

References actOnOMPReductionKindClause(), clang::OMPReductionClause::Create(), and DSAStack.

## ◆ ActOnOpenMPRegionEnd()

StmtResult Sema::ActOnOpenMPRegionEnd | ( | StmtResult | S,
|  | ArrayRef< OMPClause *> | Clauses
| ) |  |

End of OpenMP region.

Parameters

  S | Statement associated with the current OpenMP region.
  Clauses | List of clauses for the current OpenMP region.

Returns
  Statement for finished OpenMP region.

Definition at line 3844 of file SemaOpenMP.cpp.

References clang::C, clang::OMPClause::children(), Diag(), DSAStack, clang::OMPClauseWithPreInit::get(), clang::OMPClauseWithPostUpdate::get(), clang::OMPClause::getClauseKind(), clang::OMPScheduleClause::getFirstScheduleModifier(), clang::OMPScheduleClause::getFirstScheduleModifierLoc(), clang::getOpenMPCaptureRegions(), clang::OMPScheduleClause::getSecondScheduleModifier(), clang::OMPScheduleClause::getSecondScheduleModifierLoc(), clang::isOpenMPPrivate(), clang::isOpenMPSimdDirective(), clang::isOpenMPTaskingDirective(), clang::isOpenMPWorksharingDirective(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::StmtError().

## ◆ ActOnOpenMPRegionStart()

void Sema::ActOnOpenMPRegionStart | ( | OpenMPDirectiveKind | DKind,
|  | Scope * | CurScope
| ) |  |

Initialization of captured region for OpenMP region.

Definition at line 3299 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPRequiresDirective()

Sema::DeclGroupPtrTy Sema::ActOnOpenMPRequiresDirective | ( | SourceLocation | Loc,
|  | ArrayRef< OMPClause *> | ClauseList
| ) |  |

Called on well-formed '#pragma omp requires'.

Definition at line 2780 of file SemaOpenMP.cpp.

References Diag(), and DSAStack.

## ◆ ActOnOpenMPReverseOffloadClause()

OMPClause * Sema::ActOnOpenMPReverseOffloadClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'reverse_offload' clause.

Definition at line 12390 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPSafelenClause()

OMPClause * Sema::ActOnOpenMPSafelenClause | ( | Expr * | Length,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'safelen' clause.

Definition at line 11716 of file SemaOpenMP.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ ActOnOpenMPScheduleClause()

OMPClause * Sema::ActOnOpenMPScheduleClause | ( | OpenMPScheduleClauseModifier | M1,
|  | OpenMPScheduleClauseModifier | M2,
|  | OpenMPScheduleClauseKind | Kind,
|  | Expr * | ChunkSize,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | M1Loc,
|  | SourceLocation | M2Loc,
|  | SourceLocation | KindLoc,
|  | SourceLocation | CommaLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'schedule' clause.

Definition at line 12134 of file SemaOpenMP.cpp.

References checkScheduleModifiers(), clang::Expr::containsUnexpandedParameterPack(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), getListOfPossibleValues(), clang::getOpenMPClauseName(), clang::getOpenMPSimpleClauseTypeName(), clang::Expr::isInstantiationDependent(), clang::Expr::isIntegerConstantExpr(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::OMPC_SCHEDULE_MODIFIER_last, clang::OMPC_SCHEDULE_MODIFIER_unknown, clang::OMPC_SCHEDULE_unknown, and clang::Result.

## ◆ ActOnOpenMPSectionDirective()

StmtResult Sema::ActOnOpenMPSectionDirective | ( | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp section' after parsing of the associated statement.

Definition at line 8172 of file SemaOpenMP.cpp.

References clang::OMPSectionDirective::Create(), DSAStack, and clang::StmtError().

## ◆ ActOnOpenMPSectionsDirective()

StmtResult Sema::ActOnOpenMPSectionsDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp sections' after parsing of the associated statement.

Definition at line 8134 of file SemaOpenMP.cpp.

References clang::C, clang::OMPSectionsDirective::Create(), Diag(), DSAStack, clang::Stmt::getBeginLoc(), clang::CapturedStmt::getCapturedStmt(), and clang::StmtError().

## ◆ ActOnOpenMPSeqCstClause()

OMPClause * Sema::ActOnOpenMPSeqCstClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'seq_cst' clause.

Definition at line 12360 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPSharedClause()

OMPClause * Sema::ActOnOpenMPSharedClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'shared' clause.

Definition at line 13188 of file SemaOpenMP.cpp.

References buildCapture(), clang::OMPSharedClause::Create(), Diag(), DSAStack, clang::getOpenMPClauseName(), getPrivateItem(), clang::Expr::IgnoreParens(), clang::OMPC_unknown, and reportOriginalDsa().

## ◆ ActOnOpenMPSIMDClause()

OMPClause * Sema::ActOnOpenMPSIMDClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'simd' clause.

Definition at line 12370 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPSimdDirective()

StmtResult Sema::ActOnOpenMPSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp simd' after parsing of the associated statement.

Definition at line 8021 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), getCollapseNumberExpr(), getOrderedNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, and clang::StmtError().

## ◆ ActOnOpenMPSimdlenClause()

OMPClause * Sema::ActOnOpenMPSimdlenClause | ( | Expr * | Length,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'simdlen' clause.

Definition at line 11729 of file SemaOpenMP.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ ActOnOpenMPSimpleClause()

OMPClause * Sema::ActOnOpenMPSimpleClause | ( | OpenMPClauseKind | Kind,
|  | unsigned | Argument,
|  | SourceLocation | ArgumentLoc,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Definition at line 11849 of file SemaOpenMP.cpp.

References clang::OMPC_device_type, clang::OMPC_match, clang::OMPC_threadprivate, clang::OMPC_uniform, and clang::OMPC_unknown.

## ◆ ActOnOpenMPSingleDirective()

StmtResult Sema::ActOnOpenMPSingleDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp single' after parsing of the associated statement.

Definition at line 8187 of file SemaOpenMP.cpp.

References clang::OMPSingleDirective::Create(), Diag(), clang::OMPClause::getBeginLoc(), clang::OMPClause::getClauseKind(), and clang::StmtError().

## ◆ ActOnOpenMPSingleExprClause()

OMPClause * Sema::ActOnOpenMPSingleExprClause | ( | OpenMPClauseKind | Kind,
|  | Expr * | Expr,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Definition at line 10697 of file SemaOpenMP.cpp.

References clang::OMPC_device_type, clang::OMPC_match, clang::OMPC_threadprivate, clang::OMPC_uniform, and clang::OMPC_unknown.

## ◆ ActOnOpenMPSingleExprWithArgClause()

OMPClause * Sema::ActOnOpenMPSingleExprWithArgClause | ( | OpenMPClauseKind | Kind,
|  | ArrayRef< unsigned > | Arguments,
|  | Expr * | Expr,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | ArrayRef< SourceLocation > | ArgumentsLoc,
|  | SourceLocation | DelimLoc,
|  | SourceLocation | EndLoc
| ) |  |

Definition at line 12013 of file SemaOpenMP.cpp.

References Modifier, clang::OMPC_device_type, clang::OMPC_match, clang::OMPC_threadprivate, clang::OMPC_uniform, and clang::OMPC_unknown.

## ◆ ActOnOpenMPTargetDataDirective()

StmtResult Sema::ActOnOpenMPTargetDataDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp target data' after parsing of the associated statement.

Definition at line 9412 of file SemaOpenMP.cpp.

References clang::OMPTargetDataDirective::Create(), Diag(), hasClauses(), and clang::StmtError().

## ◆ ActOnOpenMPTargetDirective()

StmtResult Sema::ActOnOpenMPTargetDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp target' after parsing of the associated statement.

Definition at line 9249 of file SemaOpenMP.cpp.

References DSAStack, clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), clang::Stmt::IgnoreContainers(), clang::isOpenMPTeamsDirective(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetEnterDataDirective()

StmtResult Sema::ActOnOpenMPTargetEnterDataDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | Stmt * | AStmt
| ) |  |

Called on well-formed '#pragma omp target enter data' after parsing of the associated statement.

Definition at line 9437 of file SemaOpenMP.cpp.

References clang::OMPTargetEnterDataDirective::Create(), Diag(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), hasClauses(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetExitDataDirective()

StmtResult Sema::ActOnOpenMPTargetExitDataDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | Stmt * | AStmt
| ) |  |

Called on well-formed '#pragma omp target exit data' after parsing of the associated statement.

Definition at line 9474 of file SemaOpenMP.cpp.

References clang::OMPTargetExitDataDirective::Create(), Diag(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), hasClauses(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetParallelDirective()

StmtResult Sema::ActOnOpenMPTargetParallelDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp target parallel' after parsing of the associated statement.

Definition at line 9315 of file SemaOpenMP.cpp.

References clang::OMPTargetParallelDirective::Create(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetParallelForDirective()

StmtResult Sema::ActOnOpenMPTargetParallelForDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp target parallel for' after parsing of the associated statement.

Definition at line 9345 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), clang::OMPTargetParallelForDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), getOrderedNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetParallelForSimdDirective()

StmtResult Sema::ActOnOpenMPTargetParallelForSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp target parallel for simd' after parsing of the associated statement.

Definition at line 10123 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPTargetParallelForSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), getOrderedNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetSimdDirective()

StmtResult Sema::ActOnOpenMPTargetSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp target simd' after parsing of the associated statement.

Definition at line 10178 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPTargetSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), getOrderedNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetTeamsDirective()

StmtResult Sema::ActOnOpenMPTargetTeamsDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp target teams' after parsing of the associated statement.

Definition at line 10452 of file SemaOpenMP.cpp.

References clang::OMPTargetTeamsDirective::Create(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetTeamsDistributeDirective()

StmtResult Sema::ActOnOpenMPTargetTeamsDistributeDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp target teams distribute' after parsing of the associated statement.

Definition at line 10483 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), checkOpenMPLoop(), clang::OMPTargetTeamsDistributeDirective::Create(), DSAStack, clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetTeamsDistributeParallelForDirective()

StmtResult Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp target teams distribute parallel for' after parsing of the associated statement.

Definition at line 10526 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), clang::OMPTargetTeamsDistributeParallelForDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective()

StmtResult Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp target teams distribute parallel for simd' after parsing of the associated statement.

Definition at line 10581 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetTeamsDistributeSimdDirective()

StmtResult Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp target teams distribute simd' after parsing of the associated statement.

Definition at line 10640 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPTargetTeamsDistributeSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTargetUpdateDirective()

StmtResult Sema::ActOnOpenMPTargetUpdateDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | Stmt * | AStmt
| ) |  |

Called on well-formed '#pragma omp target update'.

Definition at line 9510 of file SemaOpenMP.cpp.

References clang::OMPTargetUpdateDirective::Create(), Diag(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), hasClauses(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTaskDirective()

StmtResult Sema::ActOnOpenMPTaskDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp task' after parsing of the associated statement.

Definition at line 8438 of file SemaOpenMP.cpp.

References clang::OMPTaskDirective::Create(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTaskgroupDirective()

StmtResult Sema::ActOnOpenMPTaskgroupDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp taskgroup'.

Definition at line 8473 of file SemaOpenMP.cpp.

References clang::OMPTaskgroupDirective::Create(), and clang::StmtError().

## ◆ ActOnOpenMPTaskLoopDirective()

StmtResult Sema::ActOnOpenMPTaskLoopDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp taskloop' after parsing of the associated statement.

Definition at line 9648 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), checkGrainsizeNumTasksClauses(), checkOpenMPLoop(), checkReductionClauseWithNogroup(), clang::OMPTaskLoopDirective::Create(), DSAStack, getCollapseNumberExpr(), and clang::StmtError().

## ◆ ActOnOpenMPTaskLoopSimdDirective()

StmtResult Sema::ActOnOpenMPTaskLoopSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp taskloop simd' after parsing of the associated statement.

Definition at line 9684 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkGrainsizeNumTasksClauses(), checkOpenMPLoop(), checkReductionClauseWithNogroup(), checkSimdlenSafelenSpecified(), clang::OMPTaskLoopSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, and clang::StmtError().

## ◆ ActOnOpenMPTaskReductionClause()

OMPClause * Sema::ActOnOpenMPTaskReductionClause | ( | ArrayRef< Expr *> | VarList,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | ColonLoc,
|  | SourceLocation | EndLoc,
|  | CXXScopeSpec & | ReductionIdScopeSpec,
|  | const DeclarationNameInfo & | ReductionId,
|  | ArrayRef< Expr *> | UnresolvedReductions = `llvm::None`
| ) |  |

Called on well-formed 'task_reduction' clause.

Definition at line 14282 of file SemaOpenMP.cpp.

References actOnOMPReductionKindClause(), clang::OMPTaskReductionClause::Create(), and DSAStack.

## ◆ ActOnOpenMPTaskwaitDirective()

StmtResult Sema::ActOnOpenMPTaskwaitDirective | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp taskwait'.

Definition at line 8468 of file SemaOpenMP.cpp.

References clang::OMPTaskwaitDirective::Create().

## ◆ ActOnOpenMPTaskyieldDirective()

StmtResult Sema::ActOnOpenMPTaskyieldDirective | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp taskyield'.

Definition at line 8458 of file SemaOpenMP.cpp.

References clang::OMPTaskyieldDirective::Create().

## ◆ ActOnOpenMPTeamsDirective()

StmtResult Sema::ActOnOpenMPTeamsDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed '#pragma omp teams' after parsing of the associated statement.

Definition at line 9543 of file SemaOpenMP.cpp.

References clang::OMPTeamsDirective::Create(), DSAStack, clang::CapturedStmt::getCapturedDecl(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTeamsDistributeDirective()

StmtResult Sema::ActOnOpenMPTeamsDistributeDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp teams distribute' after parsing of the associated statement.

Definition at line 10234 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), checkOpenMPLoop(), clang::OMPTeamsDistributeDirective::Create(), DSAStack, clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTeamsDistributeParallelForDirective()

StmtResult Sema::ActOnOpenMPTeamsDistributeParallelForDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp teams distribute parallel for' after parsing of the associated statement.

Definition at line 10403 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), checkOpenMPLoop(), clang::OMPTeamsDistributeParallelForDirective::Create(), DSAStack, clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTeamsDistributeParallelForSimdDirective()

StmtResult Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp teams distribute parallel for simd' after parsing of the associated statement.

Definition at line 10341 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPTeamsDistributeParallelForSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPTeamsDistributeSimdDirective()

StmtResult Sema::ActOnOpenMPTeamsDistributeSimdDirective | ( | ArrayRef< OMPClause *> | Clauses,
|  | Stmt * | AStmt,
|  | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | VarsWithInheritedDSAType & | VarsWithImplicitDSA
| ) |  |

Called on well-formed '#pragma omp teams distribute simd' after parsing of the associated statement.

Definition at line 10279 of file SemaOpenMP.cpp.

References clang::OMPLoopDirective::HelperExprs::builtAll(), clang::C, checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::OMPTeamsDistributeSimdDirective::Create(), DSAStack, FinishOpenMPLinearClause(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedStmt(), getCollapseNumberExpr(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::CapturedDecl::setNothrow(), and clang::StmtError().

## ◆ ActOnOpenMPThreadLimitClause()

OMPClause * Sema::ActOnOpenMPThreadLimitClause | ( | Expr * | ThreadLimit,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'thread_limit' clause.

Definition at line 16579 of file SemaOpenMP.cpp.

References buildPreInits(), DSAStack, getOpenMPCaptureRegionForClause(), and isNonNegativeIntegerValue().

## ◆ ActOnOpenMPThreadprivateDirective()

Sema::DeclGroupPtrTy Sema::ActOnOpenMPThreadprivateDirective | ( | SourceLocation | Loc,
|  | ArrayRef< Expr *> | VarList
| ) |  |

Called on well-formed '#pragma omp threadprivate'.

Definition at line 2498 of file SemaOpenMP.cpp.

References clang::Stmt::children(), Diag(), clang::DeclRefExpr::getBeginLoc(), clang::DeclRefExpr::getDecl(), and clang::Stmt::getSourceRange().

## ◆ ActOnOpenMPThreadsClause()

OMPClause * Sema::ActOnOpenMPThreadsClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'threads' clause.

Definition at line 12365 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPToClause()

OMPClause * Sema::ActOnOpenMPToClause | ( | ArrayRef< Expr *> | VarList,
|  | CXXScopeSpec & | MapperIdScopeSpec,
|  | DeclarationNameInfo & | MapperId,
|  | const OMPVarListLocTy & | Locs,
|  | ArrayRef< Expr *> | UnresolvedMappers = `llvm::None`
| ) |  |

Called on well-formed 'to' clause.

Definition at line 16993 of file SemaOpenMP.cpp.

References checkMappableExpressionList(), OMPToClause::Create(), DSAStack, and clang::OMPVarListLocTy::StartLoc.

## ◆ ActOnOpenMPUnifiedAddressClause()

OMPClause * Sema::ActOnOpenMPUnifiedAddressClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'unified_address' clause.

Definition at line 12380 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPUnifiedSharedMemoryClause()

OMPClause * Sema::ActOnOpenMPUnifiedSharedMemoryClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'unified_address' clause.

Definition at line 12385 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPUntiedClause()

OMPClause * Sema::ActOnOpenMPUntiedClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'untied' clause.

Definition at line 12330 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPUpdateClause()

OMPClause * Sema::ActOnOpenMPUpdateClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'update' clause.

Definition at line 12350 of file SemaOpenMP.cpp.

## ◆ ActOnOpenMPUseDevicePtrClause()

OMPClause * Sema::ActOnOpenMPUseDevicePtrClause | ( | ArrayRef< Expr *> | VarList,
|  | const OMPVarListLocTy & | Locs
| ) |  |

Called on well-formed 'use_device_ptr' clause.

Definition at line 17027 of file SemaOpenMP.cpp.

References buildCapture(), buildDeclRefExpr(), buildVarDecl(), OMPUseDevicePtrClause::Create(), Diag(), DSAStack, clang::Decl::getAttrs(), clang::Expr::getExprLoc(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), getPrivateItem(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttrs(), clang::Expr::IgnoreParens(), Inits, and clang::Type::isPointerType().

## ◆ ActOnOpenMPVarListClause()

OMPClause * Sema::ActOnOpenMPVarListClause | ( | OpenMPClauseKind | Kind,
|  | ArrayRef< Expr *> | Vars,
|  | Expr * | TailExpr,
|  | const OMPVarListLocTy & | Locs,
|  | SourceLocation | ColonLoc,
|  | CXXScopeSpec & | ReductionOrMapperIdScopeSpec,
|  | DeclarationNameInfo & | ReductionOrMapperId,
|  | int | ExtraModifier,
|  | ArrayRef< OpenMPMapModifierKind > | MapTypeModifiers,
|  | ArrayRef< SourceLocation > | MapTypeModifiersLoc,
|  | bool | IsMapTypeImplicit,
|  | SourceLocation | DepLinMapLastLoc
| ) |  |

Definition at line 12400 of file SemaOpenMP.cpp.

References clang::OMPVarListLocTy::EndLoc, clang::OMPVarListLocTy::LParenLoc, clang::OMPC_DEPEND_unknown, clang::OMPC_device_type, clang::OMPC_LASTPRIVATE_unknown, clang::OMPC_LINEAR_unknown, clang::OMPC_MAP_unknown, clang::OMPC_match, clang::OMPC_threadprivate, clang::OMPC_uniform, clang::OMPC_unknown, and clang::OMPVarListLocTy::StartLoc.

## ◆ ActOnOpenMPWriteClause()

OMPClause * Sema::ActOnOpenMPWriteClause | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc
| ) |  |

Called on well-formed 'write' clause.

Definition at line 12345 of file SemaOpenMP.cpp.

## ◆ ActOnPackExpansion() [1/3]

ParsedTemplateArgument Sema::ActOnPackExpansion | ( | const ParsedTemplateArgument & | Arg,
|  | SourceLocation | EllipsisLoc
| ) |  |

Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion.

Parameters

  Arg | The template argument preceding the ellipsis, which may already be invalid.
  EllipsisLoc | The location of the ellipsis.

Definition at line 529 of file SemaTemplateVariadic.cpp.

References clang::TemplateName::containsUnexpandedParameterPack(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ParsedTemplateArgument::getAsExpr(), clang::ParsedTemplateArgument::getAsTemplate(), clang::ParsedTemplateArgument::getAsType(), clang::CXXScopeSpec::getBeginLoc(), clang::ParsedTemplateArgument::getKind(), clang::ParsedTemplateArgument::getLocation(), clang::ParsedTemplateArgument::getScopeSpec(), clang::ParsedTemplateArgument::getTemplatePackExpansion(), clang::ParsedTemplateArgument::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXScopeSpec::isValid(), clang::ParsedTemplateArgument::NonType, clang::Result, clang::SourceRange::setBegin(), clang::ParsedTemplateArgument::Template, and clang::ParsedTemplateArgument::Type.

Referenced by CheckArrayDesignatorSyntax(), and TypeTraitArity().

## ◆ ActOnPackExpansion() [2/3]

TypeResult Sema::ActOnPackExpansion | ( | ParsedType | Type,
|  | SourceLocation | EllipsisLoc
| ) |  |

Invoked when parsing a type followed by an ellipsis, which creates a pack expansion.

Parameters

  Type | The type preceding the ellipsis, which will become the pattern of the pack expansion.
  EllipsisLoc | The location of the ellipsis.

Definition at line 568 of file SemaTemplateVariadic.cpp.

References clang::TypeSourceInfo::getType(), and clang::None.

## ◆ ActOnPackExpansion() [3/3]

ExprResult Sema::ActOnPackExpansion | ( | Expr * | Pattern,
|  | SourceLocation | EllipsisLoc
| ) |  |

Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.

Parameters

  Pattern | The expression preceding the ellipsis, which will become the pattern of the pack expansion.
  EllipsisLoc | The location of the ellipsis.

Definition at line 620 of file SemaTemplateVariadic.cpp.

References clang::None.

## ◆ ActOnParamDeclarator()

Decl * Sema::ActOnParamDeclarator | ( | Scope * | S,
|  | Declarator & | D
| ) |  |

ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into function prototype scope.

Definition at line 13130 of file SemaDecl.cpp.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnParamDefaultArgument()

void Sema::ActOnParamDefaultArgument | ( | Decl * | param,
|  | SourceLocation | EqualLoc,
|  | Expr * | DefaultArg
| ) |  |

ActOnParamDefaultArgument - Check whether the default argument provided for a function parameter is well-formed.

If so, attach it to the parameter declaration.

Definition at line 299 of file SemaDeclCXX.cpp.

References clang::CPlusPlus, Diag(), clang::Stmt::getSourceRange(), clang::VarDecl::isParameterPack(), and clang::Decl::setInvalidDecl().

## ◆ ActOnParamDefaultArgumentError()

void Sema::ActOnParamDefaultArgumentError | ( | Decl * | param,
|  | SourceLocation | EqualLoc
| ) |  |

ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the parameter param failed.

Definition at line 357 of file SemaDeclCXX.cpp.

References clang::ParmVarDecl::setDefaultArg(), and clang::Decl::setInvalidDecl().

## ◆ ActOnParamUnparsedDefaultArgument()

void Sema::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.

Note that this default argument will be parsed later.

Definition at line 344 of file SemaDeclCXX.cpp.

References clang::ParmVarDecl::setUnparsedDefaultArg().

## ◆ ActOnParenExpr()

ExprResult Sema::ActOnParenExpr | ( | SourceLocation | L,
|  | SourceLocation | R,
|  | Expr * | E
| ) |  |

Definition at line 3850 of file SemaExpr.cpp.

Referenced by ActOnDecltypeExpression(), buildCounterUpdate(), and TypeTraitArity().

## ◆ ActOnParenListExpr()

ExprResult Sema::ActOnParenListExpr | ( | SourceLocation | L,
|  | SourceLocation | R,
|  | MultiExprArg | Val
| ) |  |

Definition at line 6947 of file SemaExpr.cpp.

References clang::ParenListExpr::Create().

Referenced by clang::Parser::ParseUnqualifiedId(), and clang::InitializationSequence::Perform().

## ◆ ActOnPopScope()

void Sema::ActOnPopScope | ( | SourceLocation | Loc,
|  | Scope * | S
| ) |  |

Scope actions.

Definition at line 1896 of file SemaDecl.cpp.

Referenced by clang::Parser::ExitScope().

## ◆ ActOnPostfixUnaryOp()

ExprResult Sema::ActOnPostfixUnaryOp | ( | Scope * | S,
|  | SourceLocation | OpLoc,
|  | tok::TokenKind | Kind,
|  | Expr * | Input
| ) |  |

Definition at line 4410 of file SemaExpr.cpp.

## ◆ ActOnPragmaAttributeAttribute()

void Sema::ActOnPragmaAttributeAttribute | ( | ParsedAttr & | Attribute,
|  | SourceLocation | PragmaLoc,
|  | attr::ParsedSubjectMatchRuleSet | Rules
| ) |  |

Definition at line 653 of file SemaAttr.cpp.

References clang::FixItHint::CreateRemoval(), Diag(), clang::ParsedAttr::getMatchRules(), clang::attr::getSubjectMatchRuleSpelling(), LangOpts, PragmaAttributeStack, and clang::ParsedAttr::setIsPragmaClangAttribute().

## ◆ ActOnPragmaAttributeEmptyPush()

void Sema::ActOnPragmaAttributeEmptyPush | ( | SourceLocation | PragmaLoc,
|  | const IdentifierInfo * | Namespace
| ) |  |

Definition at line 765 of file SemaAttr.cpp.

References PragmaAttributeStack.

## ◆ ActOnPragmaAttributePop()

void Sema::ActOnPragmaAttributePop | ( | SourceLocation | PragmaLoc,
|  | const IdentifierInfo * | Namespace
| ) |  |

Called on well-formed '#pragma clang attribute pop'.

Definition at line 772 of file SemaAttr.cpp.

References Diag(), and PragmaAttributeStack.

## ◆ ActOnPragmaClangSection()

void Sema::ActOnPragmaClangSection | ( | SourceLocation | PragmaLoc,
|  | PragmaClangSectionAction | Action,
|  | PragmaClangSectionKind | SecKind,
|  | StringRef | SecName
| ) |  |

ActOnPragmaClangSection - Called on well formed #pragma clang section.

Definition at line 256 of file SemaAttr.cpp.

References PragmaClangBSSSection, PragmaClangDataSection, PragmaClangRelroSection, PragmaClangRodataSection, PragmaClangTextSection, clang::Sema::PragmaClangSection::PragmaLocation, clang::Sema::PragmaClangSection::SectionName, and clang::Sema::PragmaClangSection::Valid.

## ◆ ActOnPragmaDetectMismatch()

void Sema::ActOnPragmaDetectMismatch | ( | SourceLocation | Loc,
|  | StringRef | Name,
|  | StringRef | Value
| ) |  |

ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.

Definition at line 402 of file SemaAttr.cpp.

## ◆ ActOnPragmaDump()

void Sema::ActOnPragmaDump | ( | Scope * | S,
|  | SourceLocation | Loc,
|  | IdentifierInfo * | II
| ) |  |

Called on #pragma clang __debug dump II.

Definition at line 5528 of file SemaLookup.cpp.

## ◆ ActOnPragmaFEnvAccess()

void Sema::ActOnPragmaFEnvAccess | ( | LangOptions::FEnvAccessModeKind | FPC | ) |

ActOnPragmaFenvAccess - Called on well formed #pragma STDC FENV_ACCESS.

Definition at line 943 of file SemaAttr.cpp.

References clang::LangOptions::FEA_Off, clang::LangOptions::FEA_On, FPFeatures, clang::FPOptions::setAllowFEnvAccess(), and clang::FPOptions::setDisallowFEnvAccess().

## ◆ ActOnPragmaFPContract()

void Sema::ActOnPragmaFPContract | ( | LangOptions::FPContractModeKind | FPC | ) |

ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT and #pragma clang fp contract.

Definition at line 929 of file SemaAttr.cpp.

References clang::LangOptions::FPC_Fast, clang::LangOptions::FPC_Off, clang::LangOptions::FPC_On, FPFeatures, clang::FPOptions::setAllowFPContractAcrossStatement(), clang::FPOptions::setAllowFPContractWithinStatement(), and clang::FPOptions::setDisallowFPContract().

## ◆ ActOnPragmaMSComment()

void Sema::ActOnPragmaMSComment | ( | SourceLocation | CommentLoc,
|  | PragmaMSCommentKind | Kind,
|  | StringRef | Arg
| ) |  |

ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").

Definition at line 394 of file SemaAttr.cpp.

References clang::DeclContext::addDecl(), Consumer, Context, clang::PragmaCommentDecl::Create(), clang::ASTContext::getTranslationUnitDecl(), and clang::ASTConsumer::HandleTopLevelDecl().

## ◆ ActOnPragmaMSInitSeg()

void Sema::ActOnPragmaMSInitSeg | ( | SourceLocation | PragmaLocation,
|  | StringLiteral * | SegmentName
| ) |  |

Called on well-formed #pragma init_seg().

Definition at line 544 of file SemaAttr.cpp.

References CurInitSeg, CurInitSegLoc, and clang::StringLiteral::getString().

## ◆ ActOnPragmaMSPointersToMembers()

void Sema::ActOnPragmaMSPointersToMembers | ( | LangOptions::PragmaMSPointersToMembersKind | Kind,
|  | SourceLocation | PragmaLoc
| ) |  |

ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation method[, general purpose representation]).

Definition at line 410 of file SemaAttr.cpp.

References ImplicitMSInheritanceAttrLoc, and MSPointerToMemberRepresentationMethod.

## ◆ ActOnPragmaMSSection()

void Sema::ActOnPragmaMSSection | ( | SourceLocation | PragmaLocation,
|  | int | SectionFlags,
|  | StringLiteral * | SegmentName
| ) |  |

Called on well formed #pragma section().

Called on well formed #pragma bss_seg().

Definition at line 539 of file SemaAttr.cpp.

References clang::StringLiteral::getString(), and UnifySection().

## ◆ ActOnPragmaMSSeg()

void Sema::ActOnPragmaMSSeg | ( | SourceLocation | PragmaLocation,
|  | PragmaMsStackAction | Action,
|  | llvm::StringRef | StackSlotLabel,
|  | StringLiteral * | SegmentName,
|  | llvm::StringRef | PragmaName
| ) |  |

Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.

Called on well formed #pragma bss_seg().

Definition at line 512 of file SemaAttr.cpp.

## ◆ ActOnPragmaMSStruct()

void Sema::ActOnPragmaMSStruct | ( | PragmaMSStructKind | Kind | ) |

ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].

Definition at line 390 of file SemaAttr.cpp.

References MSStructPragmaOn, and clang::PMSST_ON.

## ◆ ActOnPragmaMSVtorDisp()

void Sema::ActOnPragmaMSVtorDisp | ( | PragmaMsStackAction | Action,
|  | SourceLocation | PragmaLoc,
|  | MSVtorDispMode | Value
| ) |  |

Called on well formed #pragma vtordisp().

Definition at line 417 of file SemaAttr.cpp.

References clang::Sema::PragmaStack< ValueType >::Act(), Diag(), PSK_Pop, clang::Sema::PragmaStack< ValueType >::Stack, and VtorDispStack.

## ◆ ActOnPragmaOptimize()

void Sema::ActOnPragmaOptimize | ( | bool | On,
|  | SourceLocation | PragmaLoc
| ) |  |

Called on well formed #pragma clang optimize.

Definition at line 849 of file SemaAttr.cpp.

References OptimizeOffPragmaLocation.

## ◆ ActOnPragmaOptionsAlign()

void Sema::ActOnPragmaOptionsAlign | ( | PragmaOptionsAlignKind | Kind,
|  | SourceLocation | PragmaLoc
| ) |  |

ActOnPragmaOptionsAlign - Called on well formed #pragma options align.

Definition at line 205 of file SemaAttr.cpp.

References clang::Sema::PragmaStack< ValueType >::Act(), Context, clang::Sema::PragmaStack< ValueType >::CurrentValue, Diag(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::hasAlignMac68kSupport(), kMac68kAlignmentSentinel, PackStack, POAK_Mac68k, POAK_Native, POAK_Natural, POAK_Packed, POAK_Power, POAK_Reset, PSK_Pop, PSK_Push_Set, PSK_Reset, and clang::Sema::PragmaStack< ValueType >::Stack.

## ◆ ActOnPragmaPack()

void Sema::ActOnPragmaPack | ( | SourceLocation | PragmaLoc,
|  | PragmaMsStackAction | Action,
|  | StringRef | SlotLabel,
|  | Expr * | Alignment
| ) |  |

ActOnPragmaPack - Called on well formed #pragma pack(...).

Definition at line 289 of file SemaAttr.cpp.

References clang::Sema::PragmaStack< ValueType >::Act(), Context, clang::Sema::PragmaStack< ValueType >::CurrentValue, Diag(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), kMac68kAlignmentSentinel, PackStack, PSK_Pop, PSK_Show, and clang::Sema::PragmaStack< ValueType >::Stack.

## ◆ ActOnPragmaRedefineExtname()

void Sema::ActOnPragmaRedefineExtname | ( | IdentifierInfo * | WeakName,
|  | IdentifierInfo * | AliasName,
|  | SourceLocation | PragmaLoc,
|  | SourceLocation | WeakNameLoc,
|  | SourceLocation | AliasNameLoc
| ) |  |

ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname.

Definition at line 17745 of file SemaDecl.cpp.

## ◆ ActOnPragmaUnused()

void Sema::ActOnPragmaUnused | ( | const Token & | Identifier,
|  | Scope * | curScope,
|  | SourceLocation | PragmaLoc
| ) |  |

ActOnPragmaUnused - Called on well-formed '#pragma unused'.

Definition at line 553 of file SemaAttr.cpp.

## ◆ ActOnPragmaVisibility()

void Sema::ActOnPragmaVisibility | ( | const IdentifierInfo * | VisType,
|  | SourceLocation | PragmaLoc
| ) |  |

ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .

Definition at line 914 of file SemaAttr.cpp.

References Diag(), clang::IdentifierInfo::getName(), PopPragmaVisibility(), and PushPragmaVisibility().

## ◆ ActOnPragmaWeakAlias()

void Sema::ActOnPragmaWeakAlias | ( | IdentifierInfo * | WeakName,
|  | IdentifierInfo * | AliasName,
|  | SourceLocation | PragmaLoc,
|  | SourceLocation | WeakNameLoc,
|  | SourceLocation | AliasNameLoc
| ) |  |

ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.

Definition at line 17786 of file SemaDecl.cpp.

## ◆ ActOnPragmaWeakID()

void Sema::ActOnPragmaWeakID | ( | IdentifierInfo * | WeakName,
|  | SourceLocation | PragmaLoc,
|  | SourceLocation | WeakNameLoc
| ) |  |

ActOnPragmaWeakID - Called on well formed #pragma weak ident.

Definition at line 17772 of file SemaDecl.cpp.

## ◆ ActOnPredefinedExpr()

ExprResult Sema::ActOnPredefinedExpr | ( | SourceLocation | Loc,
|  | tok::TokenKind | Kind
| ) |  |

Definition at line 3373 of file SemaExpr.cpp.

References clang::PredefinedExpr::Func, clang::PredefinedExpr::FuncDName, clang::PredefinedExpr::FuncSig, clang::PredefinedExpr::Function, clang::PredefinedExpr::LFuncSig, clang::PredefinedExpr::LFunction, and clang::PredefinedExpr::PrettyFunction.

## ◆ ActOnPrivateModuleFragmentDecl()

Sema::DeclGroupPtrTy Sema::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.

Parameters

  ModuleLoc | The location of the 'module' keyword.
  PrivateLoc | The location of the 'private' keyword.

Definition at line 246 of file SemaModule.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::Module::GlobalModuleFragment, clang::Module::ModuleInterfaceUnit, clang::Module::ModuleMapModule, clang::Normal, and clang::Module::PrivateModuleFragment.

## ◆ ActOnProperty()

Decl * Sema::ActOnProperty | ( | Scope * | S,
|  | SourceLocation | AtLoc,
|  | SourceLocation | LParenLoc,
|  | FieldDeclarator & | FD,
|  | ObjCDeclSpec & | ODS,
|  | Selector | GetterSel,
|  | Selector | SetterSel,
|  | tok::ObjCKeywordKind | MethodImplKind,
|  | DeclContext * | lexicalDC = `nullptr`
| ) |  |

Definition at line 177 of file SemaObjCProperty.cpp.

## ◆ ActOnPropertyImplDecl()

Decl * Sema::ActOnPropertyImplDecl | ( | Scope * | S,
|  | SourceLocation | AtLoc,
|  | SourceLocation | PropertyLoc,
|  | bool | ImplKind,
|  | IdentifierInfo * | PropertyId,
|  | IdentifierInfo * | PropertyIvar,
|  | SourceLocation | PropertyIvarLoc,
|  | ObjCPropertyQueryKind | QueryKind
| ) |  |

ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property implementation declaration; declared as @synthesize or @dynamic.

Definition at line 1085 of file SemaObjCProperty.cpp.

## ◆ ActOnPseudoDestructorExpr() [1/2]

ExprResult Sema::ActOnPseudoDestructorExpr | ( | Scope * | S,
|  | Expr * | Base,
|  | SourceLocation | OpLoc,
|  | tok::TokenKind | OpKind,
|  | CXXScopeSpec & | SS,
|  | UnqualifiedId & | FirstTypeName,
|  | SourceLocation | CCLoc,
|  | SourceLocation | TildeLoc,
|  | UnqualifiedId & | SecondTypeName
| ) |  |

Definition at line 7256 of file SemaExprCXX.cpp.

References ActOnTemplateIdType(), BuildPseudoDestructorExpr(), CheckArrow(), computeDeclContext(), Context, clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::UnqualifiedId::getKind(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), getTypeName(), clang::UnqualifiedId::Identifier, clang::IK_Identifier, clang::IK_TemplateId, clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::CXXScopeSpec::isSet(), isSFINAEContext(), clang::TemplateIdAnnotation::LAngleLoc, clang::OpaquePtr< QualType >::make(), clang::TemplateIdAnnotation::Name, clang::TemplateIdAnnotation::NumArgs, clang::TemplateIdAnnotation::RAngleLoc, clang::UnqualifiedId::StartLocation, clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, clang::TemplateIdAnnotation::TemplateKWLoc, and clang::TemplateIdAnnotation::TemplateNameLoc.

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ ActOnPseudoDestructorExpr() [2/2]

ExprResult Sema::ActOnPseudoDestructorExpr | ( | Scope * | S,
|  | Expr * | Base,
|  | SourceLocation | OpLoc,
|  | tok::TokenKind | OpKind,
|  | SourceLocation | TildeLoc,
|  | const DeclSpec & | DS
| ) |  |

Definition at line 7401 of file SemaExprCXX.cpp.

References BuildDecltypeType(), BuildPseudoDestructorExpr(), CheckArrow(), Context, clang::ExprError(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getTypeSpecTypeLoc(), and clang::TypeSpecTypeLoc::setNameLoc().

## ◆ ActOnPureSpecifier()

void Sema::ActOnPureSpecifier | ( | Decl * | D,
|  | SourceLocation | PureSpecLoc
| ) |  |

Definition at line 16631 of file SemaDeclCXX.cpp.

References Diag(), clang::Decl::getFriendObjectKind(), and clang::Decl::getLocation().

## ◆ ActOnReenterCXXMethodParameter()

void Sema::ActOnReenterCXXMethodParameter | ( | Scope * | S,
|  | ParmVarDecl * | Param
| ) |  |

This is used to implement the constant expression evaluation part of the attribute enable_if extension.

There is nothing in standard C++ which would require reentering parameters.

Definition at line 9689 of file SemaDeclCXX.cpp.

References clang::Scope::AddDecl(), and clang::NamedDecl::getDeclName().

## ◆ ActOnReenterFunctionContext()

void Sema::ActOnReenterFunctionContext | ( | Scope * | S,
|  | Decl * | D
| ) |  |

Push the parameters of D, which must be a function, into scope.

Definition at line 1374 of file SemaDecl.cpp.

## ◆ ActOnReenterTemplateScope()

unsigned Sema::ActOnReenterTemplateScope | ( | Scope * | S,
|  | Decl * | Template
| ) |  |

Definition at line 9623 of file SemaDeclCXX.cpp.

References clang::Scope::AddDecl(), and clang::CXXRecordDecl::getDescribedClassTemplate().

## ◆ ActOnRequiresExpr()

ExprResult Sema::ActOnRequiresExpr | ( | SourceLocation | RequiresKWLoc,
|  | RequiresExprBodyDecl * | Body,
|  | ArrayRef< ParmVarDecl *> | LocalParameters,
|  | ArrayRef< concepts::Requirement *> | Requirements,
|  | SourceLocation | ClosingBraceLoc
| ) |  |

Definition at line 8540 of file SemaExprCXX.cpp.

References Context, and clang::RequiresExpr::Create().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnReturnStmt()

StmtResult Sema::ActOnReturnStmt | ( | SourceLocation | ReturnLoc,
|  | Expr * | RetValExp,
|  | Scope * | CurScope
| ) |  |

Definition at line 3577 of file SemaStmt.cpp.

References clang::Scope::addNRVOCandidate(), CheckJumpOutOfSEHFinally(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Scope::getFnParent(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Scope::setNoNRVO(), and clang::StmtError().

## ◆ ActOnSEHExceptBlock()

StmtResult Sema::ActOnSEHExceptBlock | ( | SourceLocation | Loc,
|  | Expr * | FilterExpr,
|  | Stmt * | Block
| ) |  |

Definition at line 4210 of file SemaStmt.cpp.

References clang::SEHExceptStmt::Create(), Diag(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isDependentType(), clang::Type::isIntegerType(), and clang::StmtError().

## ◆ ActOnSEHLeaveStmt()

StmtResult Sema::ActOnSEHLeaveStmt | ( | SourceLocation | Loc,
|  | Scope * | CurScope
| ) |  |

Definition at line 4237 of file SemaStmt.cpp.

References CheckJumpOutOfSEHFinally(), Diag(), clang::Scope::getParent(), clang::Scope::isSEHTryScope(), and clang::StmtError().

## ◆ ActOnSEHTryBlock()

StmtResult Sema::ActOnSEHTryBlock | ( | bool | IsCXXTry,
|  | SourceLocation | TryLoc,
|  | Stmt * | TryBlock,
|  | Stmt * | Handler
| ) |  |

Definition at line 4175 of file SemaStmt.cpp.

References Diag(), clang::sema::FunctionScopeInfo::FirstCXXTryLoc, clang::DeclContext::getParent(), clang::DeclContext::isFunctionOrMethod(), clang::SourceLocation::isValid(), clang::sema::FunctionScopeInfo::setHasSEHTry(), and clang::FunctionDecl::setUsesSEHTry().

## ◆ ActOnSimpleRequirement()

concepts::Requirement * Sema::ActOnSimpleRequirement | ( | Expr * | E | ) |

Definition at line 8336 of file SemaExprCXX.cpp.

References BuildExprRequirement().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnSizeofParameterPackExpr()

ExprResult Sema::ActOnSizeofParameterPackExpr | ( | Scope * | S,
|  | SourceLocation | OpLoc,
|  | IdentifierInfo & | Name,
|  | SourceLocation | NameLoc,
|  | SourceLocation | RParenLoc
| ) |  |

Called when an expression computing the size of a parameter pack is parsed.

template<typename ...Types> struct count {
static const unsigned value = sizeof...(Types);
};

Parameters

  OpLoc | The location of the "sizeof" keyword.
  Name | The name of the parameter pack whose size will be determined.
  NameLoc | The source location of the name of the parameter pack.
  RParenLoc | The location of the closing parentheses.

Definition at line 978 of file SemaTemplateVariadic.cpp.

## ◆ ActOnSkippedFunctionBody()

Decl * Sema::ActOnSkippedFunctionBody | ( | Decl * | Decl | ) |

Definition at line 13850 of file SemaDecl.cpp.

References clang::Decl::getAsFunction().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnSourceLocExpr()

ExprResult Sema::ActOnSourceLocExpr | ( | SourceLocExpr::IdentKind | Kind,
|  | SourceLocation | BuiltinLoc,
|  | SourceLocation | RPLoc
| ) |  |

Definition at line 14691 of file SemaExpr.cpp.

## ◆ ActOnStartCategoryImplementation()

Decl * Sema::ActOnStartCategoryImplementation | ( | SourceLocation | AtCatImplLoc,
|  | IdentifierInfo * | ClassName,
|  | SourceLocation | ClassLoc,
|  | IdentifierInfo * | CatName,
|  | SourceLocation | CatLoc,
|  | const ParsedAttributesView & | Attrs
| ) |  |

ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration and build an ObjCCategoryImplDecl object.

Check that class of this category is already completely declared.

Check that CatName, category name, is not used in another implementation.

Definition at line 1893 of file SemaDeclObjC.cpp.

References ActOnObjCContainerStartDefinition(), clang::DeclContext::addDecl(), AddPragmaAttributes(), CheckObjCDeclScope(), Context, clang::ObjCCategoryDecl::Create(), clang::ObjCCategoryImplDecl::Create(), CurContext, Diag(), DiagnoseObjCImplementedDeprecations(), clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::NamedDecl::getDeclName(), clang::ObjCCategoryDecl::getImplementation(), clang::Decl::getLocation(), getObjCInterfaceDecl(), clang::ASTContext::getObjCInterfaceType(), clang::Decl::hasAttr(), clang::ObjCInterfaceDecl::hasDefinition(), ProcessDeclAttributeList(), RequireCompleteType(), clang::ObjCCategoryDecl::setImplementation(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), and TUScope.

## ◆ ActOnStartCategoryInterface()

Decl * Sema::ActOnStartCategoryInterface | ( | SourceLocation | AtInterfaceLoc,
|  | IdentifierInfo * | ClassName,
|  | SourceLocation | ClassLoc,
|  | ObjCTypeParamList * | typeParamList,
|  | IdentifierInfo * | CategoryName,
|  | SourceLocation | CategoryLoc,
|  | Decl *const * | ProtoRefs,
|  | unsigned | NumProtoRefs,
|  | const SourceLocation * | ProtoLocs,
|  | SourceLocation | EndProtoLoc,
|  | const ParsedAttributesView & | AttrList
| ) |  |

Check that class of this category is already completely declared.

Check for duplicate interface declaration for this category

Definition at line 1797 of file SemaDeclObjC.cpp.

References ActOnObjCContainerStartDefinition(), clang::DeclContext::addDecl(), AddPragmaAttributes(), Category, CheckObjCDeclScope(), checkTypeParamListConsistency(), Context, clang::ObjCCategoryDecl::Create(), CurContext, Diag(), diagnoseUseOfProtocols(), clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::ObjCInterfaceDecl::getImplementation(), clang::ObjCTypeParamList::getLAngleLoc(), clang::Decl::getLocation(), getObjCInterfaceDecl(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCTypeParamList::getSourceRange(), clang::ObjCInterfaceDecl::getTypeParamList(), clang::ObjCCategoryDecl::IsClassExtension(), clang::ObjCInterfaceDecl::mergeClassExtensionProtocolList(), Previous, ProcessDeclAttributeList(), RequireCompleteType(), clang::Decl::setInvalidDecl(), clang::ObjCCategoryDecl::setProtocolList(), and TUScope.

## ◆ ActOnStartClassImplementation()

Decl * Sema::ActOnStartClassImplementation | ( | SourceLocation | AtClassImplLoc,
|  | IdentifierInfo * | ClassName,
|  | SourceLocation | ClassLoc,
|  | IdentifierInfo * | SuperClassname,
|  | SourceLocation | SuperClassLoc,
|  | const ParsedAttributesView & | AttrList
| ) |  |

Definition at line 1959 of file SemaDeclObjC.cpp.

References ActOnObjCContainerStartDefinition(), AddPragmaAttributes(), CheckObjCDeclScope(), Context, CorrectTypo(), clang::ObjCInterfaceDecl::Create(), clang::ObjCImplementationDecl::Create(), CTK_NonError, CurContext, clang::declaresSameEntity(), Diag(), DiagnoseObjCImplementedDeprecations(), diagnoseTypo(), forRedeclarationInCurContext(), clang::TypoCorrection::getCorrectionDeclAs(), clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getImplementation(), clang::Decl::getLocation(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Decl::hasAttr(), clang::ObjCInterfaceDecl::hasDefinition(), LookupOrdinaryName, LookupSingleName(), PDiag(), ProcessDeclAttributeList(), PushOnScopeChains(), RequireCompleteType(), clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::ObjCInterfaceDecl::setImplementation(), clang::Decl::setInvalidDecl(), clang::ObjCInterfaceDecl::setSuperClass(), clang::ObjCInterfaceDecl::startDefinition(), and TUScope.

## ◆ ActOnStartClassInterface()

Decl * Sema::ActOnStartClassInterface | ( | Scope * | S,
|  | SourceLocation | AtInterfaceLoc,
|  | IdentifierInfo * | ClassName,
|  | SourceLocation | ClassLoc,
|  | ObjCTypeParamList * | typeParamList,
|  | IdentifierInfo * | SuperName,
|  | SourceLocation | SuperLoc,
|  | ArrayRef< ParsedType > | SuperTypeArgs,
|  | SourceRange | SuperTypeArgsRange,
|  | Decl *const * | ProtoRefs,
|  | unsigned | NumProtoRefs,
|  | const SourceLocation * | ProtoLocs,
|  | SourceLocation | EndProtoLoc,
|  | const ParsedAttributesView & | AttrList
| ) |  |

Definition at line 975 of file SemaDeclObjC.cpp.

## ◆ ActOnStartCXXInClassMemberInitializer()

void Sema::ActOnStartCXXInClassMemberInitializer | ( |  | ) |

Enter a new C++ default initializer scope.

After calling this, the caller must call ActOnFinishCXXInClassMemberInitializer, even if parsing or instantiating the initializer failed.

Definition at line 3865 of file SemaDeclCXX.cpp.

Referenced by InstantiateInClassInitializer().

## ◆ ActOnStartCXXMemberDeclarations()

void Sema::ActOnStartCXXMemberDeclarations | ( | Scope * | S,
|  | Decl * | TagDecl,
|  | SourceLocation | FinalLoc,
|  | bool | IsFinalSpelledSealed,
|  | SourceLocation | LBraceLoc
| ) |  |

ActOnStartCXXMemberDeclarations - Invoked when we have parsed a C++ record definition's base-specifiers clause and are starting its member declarations.

Definition at line 15817 of file SemaDecl.cpp.

## ◆ ActOnStartCXXMemberReference()

ExprResult Sema::ActOnStartCXXMemberReference | ( | Scope * | S,
|  | Expr * | Base,
|  | SourceLocation | OpLoc,
|  | tok::TokenKind | OpKind,
|  | ParsedType & | ObjectType,
|  | bool & | MayBePseudoDestructor
| ) |  |

Definition at line 6944 of file SemaExprCXX.cpp.

References CheckPlaceholderExpr(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::OpaquePtr< QualType >::make(), MaybeConvertParenListExprToParenExpr(), and clang::Result.

## ◆ ActOnStartDelayedCXXMethodDeclaration()

void Sema::ActOnStartDelayedCXXMethodDeclaration | ( | Scope * | S,
|  | Decl * | MethodD
| ) |  |

ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class, and we are now parsing those parts of the given Method declaration that could not be parsed earlier (C++ [class.mem]p2), such as default arguments.

This action should enter the scope of the given Method declaration as if we had just parsed the qualified method name. However, it should not bring the parameters into scope; that will be performed by ActOnDelayedCXXMethodParameter.

Definition at line 9706 of file SemaDeclCXX.cpp.

## ◆ ActOnStartDelayedMemberDeclarations()

void Sema::ActOnStartDelayedMemberDeclarations | ( | Scope * | S,
|  | Decl * | Record
| ) |  |

Definition at line 9674 of file SemaDeclCXX.cpp.

## ◆ ActOnStartExportDecl()

Decl * Sema::ActOnStartExportDecl | ( | Scope * | S,
|  | SourceLocation | ExportLoc,
|  | SourceLocation | LBraceLoc
| ) |  |

We have parsed the start of an export declaration, including the '{' (if present).

Definition at line 523 of file SemaModule.cpp.

## ◆ ActOnStartFunctionDeclarationDeclarator()

void Sema::ActOnStartFunctionDeclarationDeclarator | ( | Declarator & | D,
|  | unsigned | TemplateParameterDepth
| ) |  |

Called before parsing a function declarator belonging to a function declaration.

Definition at line 17390 of file SemaDeclCXX.cpp.

References clang::Declarator::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::TemplateParameterList::getDepth(), clang::Declarator::getIdentifierLoc(), and clang::Declarator::getTemplateParameterLists().

## ◆ ActOnStartLinkageSpecification()

Decl * Sema::ActOnStartLinkageSpecification | ( | Scope * | S,
|  | SourceLocation | ExternLoc,
|  | Expr * | LangStr,
|  | SourceLocation | LBraceLoc
| ) |  |

ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification, including the language and (if present) the '{'.

ExternLoc is the location of the 'extern', Lang is the language string literal. LBraceLoc, if valid, provides the location of the '{' brace. Otherwise, this linkage specification does not have any braces.

Definition at line 15338 of file SemaDeclCXX.cpp.

References clang::LinkageSpecDecl::Create(), Diag(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::StringLiteral::getString(), clang::StringLiteral::isAscii(), clang::LinkageSpecDecl::lang_c, and clang::LinkageSpecDecl::lang_cxx.

## ◆ ActOnStartNamespaceDef()

Decl * Sema::ActOnStartNamespaceDef | ( | Scope * | NamespcScope,
|  | SourceLocation | InlineLoc,
|  | SourceLocation | NamespaceLoc,
|  | SourceLocation | IdentLoc,
|  | IdentifierInfo * | II,
|  | SourceLocation | LBrace,
|  | const ParsedAttributesView & | AttrList,
|  | UsingDirectiveDecl *& | UD
| ) |  |

ActOnStartNamespaceDef - This is called at the start of a namespace definition.

Definition at line 10461 of file SemaDeclCXX.cpp.

References clang::NamespaceDecl::Create(), Diag(), DiagnoseNamespaceInlineMismatch(), clang::NamespaceDecl::getAnonymousNamespace(), clang::Scope::getParent(), clang::LookupResult::getRepresentativeDecl(), clang::NamespaceDecl::isInline(), clang::LookupResult::isSingleResult(), clang::IdentifierInfo::isStr(), clang::SourceLocation::isValid(), and Parent.

## ◆ ActOnStartOfCompoundStmt()

void Sema::ActOnStartOfCompoundStmt | ( | bool | IsStmtExpr | ) |

Definition at line 376 of file SemaStmt.cpp.

Referenced by clang::Sema::CompoundScopeRAII::CompoundScopeRAII().

## ◆ ActOnStartOfFunctionDef() [1/2]

Decl * Sema::ActOnStartOfFunctionDef | ( | Scope * | S,
|  | Declarator & | D,
|  | MultiTemplateParamsArg | TemplateParamLists,
|  | SkipBodyInfo * | SkipBody = `nullptr`
| ) |  |

Definition at line 13413 of file SemaDecl.cpp.

References clang::FDK_Definition, clang::Scope::getParent(), clang::Declarator::isFunctionDeclarator(), and clang::Declarator::setFunctionDefinitionKind().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ActOnStartOfFunctionDef() [2/2]

Decl * Sema::ActOnStartOfFunctionDef | ( | Scope * | S,
|  | Decl * | D,
|  | SkipBodyInfo * | SkipBody = `nullptr`
| ) |  |

Definition at line 13634 of file SemaDecl.cpp.

References Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), clang::Attr::getLocation(), clang::isGenericLambdaCallOperatorSpecialization(), clang::isLambdaCallOperator(), clang::FunctionDecl::isLateTemplateParsed(), RebuildLambdaScopeInfo(), clang::Decl::setInvalidDecl(), clang::FunctionDecl::setWillHaveBody(), clang::Sema::SkipBodyInfo::ShouldSkip, and clang::FunctionDecl::willHaveBody().

## ◆ ActOnStartOfLambdaDefinition()

void Sema::ActOnStartOfLambdaDefinition | ( | LambdaIntroducer & | Intro,
|  | Declarator & | ParamInfo,
|  | Scope * | CurScope
| ) |  |

ActOnStartOfLambdaDefinition - This is called just before we start parsing the body of a lambda; it analyzes the explicit captures and arguments, and sets up various data-structures for the body of the lambda.

Definition at line 886 of file SemaLambda.cpp.

References clang::Declarator::getNumTypeObjects(), clang::Scope::getTemplateParamParent(), and clang::InventedTemplateParameterInfo::NumExplicitTemplateParams.

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ ActOnStartOfObjCMethodDef()

void Sema::ActOnStartOfObjCMethodDef | ( | Scope * | FnBodyScope,
|  | Decl * | D
| ) |  |

ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST.

Definition at line 361 of file SemaDeclObjC.cpp.

References CheckParmsForFunctionDef(), Context, clang::ObjCMethodDecl::createImplicitParams(), clang::declaresSameEntity(), Diag(), DiagnoseObjCImplementedDeprecations(), ExprEvalContexts, clang::LangOptions::GCOnly, clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), clang::TypoCorrection::getCorrectionDeclAs(), getCurFunction(), getCurMethodDecl(), clang::Decl::getDeclContext(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::ObjCInterfaceDecl::getSuperClass(), clang::Decl::hasAttr(), HasExplicitOwnershipAttr(), ImplicitlyRetainedSelfLocs, clang::Type::isDependentType(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), clang::ObjCMethodDecl::isInstanceMethod(), clang::Decl::isInvalidDecl(), clang::Type::isVoidType(), clang::LangOptions::NonGC, clang::sema::FunctionScopeInfo::ObjCIsDesignatedInit, clang::sema::FunctionScopeInfo::ObjCIsSecondaryInit, clang::sema::FunctionScopeInfo::ObjCShouldCallSuper, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, clang::ObjCMethodDecl::parameters(), PushDeclContext(), PushExpressionEvaluationContext(), PushFunctionScope(), PushOnScopeChains(), RequireCompleteType(), and clang::Decl::setInvalidDecl().

## ◆ ActOnStartOfSwitchStmt()

StmtResult Sema::ActOnStartOfSwitchStmt | ( | SourceLocation | SwitchLoc,
|  | Stmt * | InitStmt,
|  | ConditionResult | Cond
| ) |  |

Definition at line 726 of file SemaStmt.cpp.

References clang::SwitchStmt::Create(), Diag(), clang::Sema::ConditionResult::get(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isIntegralOrEnumerationType(), clang::Sema::ConditionResult::isInvalid(), clang::Expr::isKnownToHaveBooleanValue(), and clang::Expr::isTypeDependent().

## ◆ ActOnStartOfTranslationUnit()

void Sema::ActOnStartOfTranslationUnit | ( |  | ) |

This is called before the very first declaration in the translation unit is parsed.

Note that the ASTContext may have already injected some declarations.

Definition at line 893 of file Sema.cpp.

References ActOnGlobalModuleFragmentDecl(), clang::LangOptions::CMK_ModuleInterface, clang::LangOptions::CMK_None, getLangOpts(), clang::SourceManager::getLocForStartOfFile(), clang::SourceManager::getMainFileID(), and SourceMgr.

Referenced by clang::Parser::ParseFirstTopLevelDecl().

## ◆ ActOnStartOpenMPDeclareTargetDirective()

bool Sema::ActOnStartOpenMPDeclareTargetDirective | ( | SourceLocation | Loc | ) |

Called on the start of target region i.e. '#pragma omp declare target'.

Definition at line 16795 of file SemaOpenMP.cpp.

References Diag(), clang::DeclContext::isExternCContext(), clang::DeclContext::isExternCXXContext(), and clang::DeclContext::isFileContext().

## ◆ ActOnStartProtocolInterface()

Decl * Sema::ActOnStartProtocolInterface | ( | SourceLocation | AtProtoInterfaceLoc,
|  | IdentifierInfo * | ProtocolName,
|  | SourceLocation | ProtocolLoc,
|  | Decl *const * | ProtoRefNames,
|  | unsigned | NumProtoRefs,
|  | const SourceLocation * | ProtoLocs,
|  | SourceLocation | EndProtoLoc,
|  | const ParsedAttributesView & | AttrList
| ) |  |

Check then save referenced protocols.

Definition at line 1207 of file SemaDeclObjC.cpp.

References ActOnObjCContainerStartDefinition(), AddPragmaAttributes(), CheckForwardProtocolDeclarationForCircularDependency(), CheckObjCDeclScope(), Context, clang::ObjCProtocolDecl::Create(), CurContext, Diag(), diagnoseUseOfProtocols(), forRedeclarationInCurContext(), clang::ObjCProtocolDecl::getDefinition(), getLangOpts(), clang::Decl::getLocation(), LookupProtocol(), mergeDeclAttributes(), ProcessDeclAttributeList(), PushOnScopeChains(), clang::ObjCList< T >::set(), clang::ObjCProtocolDecl::setProtocolList(), and TUScope.

## ◆ ActOnStartRequiresExpr()

RequiresExprBodyDecl * Sema::ActOnStartRequiresExpr | ( | SourceLocation | RequiresKWLoc,
|  | ArrayRef< ParmVarDecl *> | LocalParameters,
|  | Scope * | BodyScope
| ) |  |

Definition at line 8504 of file SemaExprCXX.cpp.

References CheckShadow(), Context, clang::RequiresExprBodyDecl::Create(), CurContext, Diag(), PushDeclContext(), and PushOnScopeChains().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnStartSEHFinallyBlock()

void Sema::ActOnStartSEHFinallyBlock | ( |  | ) |

Definition at line 4222 of file SemaStmt.cpp.

## ◆ ActOnStartStmtExpr()

void Sema::ActOnStartStmtExpr | ( |  | ) |

Definition at line 13901 of file SemaExpr.cpp.

## ◆ ActOnStartTrailingRequiresClause()

void Sema::ActOnStartTrailingRequiresClause | ( | Scope * | S,
|  | Declarator & | D
| ) |  |

Definition at line 3871 of file SemaDeclCXX.cpp.

References clang::Declarator::getFunctionTypeInfo(), and clang::Declarator::isFunctionDeclarator().

## ◆ ActOnStaticAssertDeclaration()

Decl * Sema::ActOnStaticAssertDeclaration | ( | SourceLocation | StaticAssertLoc,
|  | Expr * | AssertExpr,
|  | Expr * | AssertMessageExpr,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 15578 of file SemaDeclCXX.cpp.

## ◆ ActOnStmtExpr()

ExprResult Sema::ActOnStmtExpr | ( | SourceLocation | LPLoc,
|  | Stmt * | SubStmt,
|  | SourceLocation | RPLoc
| ) |  |

Definition at line 13914 of file SemaExpr.cpp.

## ◆ ActOnStmtExprError()

void Sema::ActOnStmtExprError | ( |  | ) |

Definition at line 13905 of file SemaExpr.cpp.

## ◆ ActOnStmtExprResult()

ExprResult Sema::ActOnStmtExprResult | ( | ExprResult | E | ) |

Definition at line 13952 of file SemaExpr.cpp.

References clang::interp::Cast(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::InitializedEntity::InitializeStmtExprResult(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Expr::isTypeDependent().

## ◆ ActOnStringLiteral()

ExprResult Sema::ActOnStringLiteral | ( | ArrayRef< Token > | StringToks,
|  | Scope * | UDLScope = `nullptr`
| ) |  |

ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e.g.

"foo" "bar" L"baz").

"foo" "bar" L"baz"). The result string has to handle string concatenation ([C99 5.1.1.2, translation phase #6]), so it may come from multiple tokens. However, the common case is that StringToks points to one string.

Definition at line 1733 of file SemaExpr.cpp.

References clang::ExprError(), and clang::format::Tok.

## ◆ ActOnSuperClassOfClassInterface()

void Sema::ActOnSuperClassOfClassInterface | ( | Scope * | S,
|  | SourceLocation | AtInterfaceLoc,
|  | ObjCInterfaceDecl * | IDecl,
|  | IdentifierInfo * | ClassName,
|  | SourceLocation | ClassLoc,
|  | IdentifierInfo * | SuperName,
|  | SourceLocation | SuperLoc,
|  | ArrayRef< ParsedType > | SuperTypeArgs,
|  | SourceRange | SuperTypeArgsRange
| ) |  |

Definition at line 541 of file SemaDeclObjC.cpp.

Referenced by diagnoseUseOfProtocols().

## ◆ ActOnSuperMessage()

ExprResult Sema::ActOnSuperMessage | ( | Scope * | S,
|  | SourceLocation | SuperLoc,
|  | Selector | Sel,
|  | SourceLocation | LBracLoc,
|  | ArrayRef< SourceLocation > | SelectorLocs,
|  | SourceLocation | RBracLoc,
|  | MultiExprArg | Args
| ) |  |

Definition at line 2255 of file SemaExprObjC.cpp.

## ◆ ActOnSuperScopeSpecifier()

bool Sema::ActOnSuperScopeSpecifier | ( | SourceLocation | SuperLoc,
|  | SourceLocation | ColonColonLoc,
|  | CXXScopeSpec & | SS
| ) |  |

The parser has parsed a '__super' nested-name-specifier.

Parameters

  SuperLoc | The location of the '__super' keyword.
  ColonColonLoc | The location of the '::'.
  SS | The nested-name-specifier, which will be updated in-place to reflect the parsed nested-name-specifier.

Returns
  true if an error occurred, false otherwise.

Definition at line 278 of file SemaCXXScopeSpec.cpp.

## ◆ ActOnTag()

Decl * Sema::ActOnTag | ( | Scope * | S,
|  | unsigned | TagSpec,
|  | TagUseKind | TUK,
|  | SourceLocation | KWLoc,
|  | CXXScopeSpec & | SS,
|  | IdentifierInfo * | Name,
|  | SourceLocation | NameLoc,
|  | const ParsedAttributesView & | Attrs,
|  | AccessSpecifier | AS,
|  | SourceLocation | ModulePrivateLoc,
|  | MultiTemplateParamsArg | TemplateParameterLists,
|  | bool & | OwnedDecl,
|  | bool & | IsDependent,
|  | SourceLocation | ScopedEnumKWLoc,
|  | bool | ScopedEnumUsesClassTag,
|  | TypeResult | UnderlyingType,
|  | bool | IsTypeSpecifier,
|  | bool | IsTemplateParamOrArg,
|  | SkipBodyInfo * | SkipBody = `nullptr`
| ) |  |

This is invoked when we see 'struct foo' or 'struct {'.

In the former case, Name will be non-null. In the later case, Name will be null. TagSpec indicates what kind of tag this is. TUK indicates whether this is a reference/declaration/definition of a tag.

Parameters

  IsTypeSpecifier | `true` if this is a type-specifier (or trailing-type-specifier) other than one in an alias-declaration.
  SkipBody | If non-null, will be set to indicate if the caller should skip the definition of this tag and treat it as if it were a declaration.

Create a new tag decl in C/ObjC. Since the ODR-like semantics for ObjC/C implemented asks for structural equivalence checking, the returned decl here is passed back to the parser, allowing the tag body to be parsed.

Definition at line 14847 of file SemaDecl.cpp.

## ◆ ActOnTagDefinitionError()

void Sema::ActOnTagDefinitionError | ( | Scope * | S,
|  | Decl * | TagDecl
| ) |  |

ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a tag.

Definition at line 15899 of file SemaDecl.cpp.

## ◆ ActOnTagFinishDefinition()

void Sema::ActOnTagFinishDefinition | ( | Scope * | S,
|  | Decl * | TagDecl,
|  | SourceRange | BraceRange
| ) |  |

ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration, class, struct, or union).

Definition at line 15854 of file SemaDecl.cpp.

## ◆ ActOnTagFinishSkippedDefinition()

void Sema::ActOnTagFinishSkippedDefinition | ( | SkippedDefinitionContext | Context | ) |

Definition at line 1325 of file SemaDecl.cpp.

## ◆ ActOnTagStartDefinition()

void Sema::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).

Definition at line 15783 of file SemaDecl.cpp.

## ◆ ActOnTagStartSkippedDefinition()

Sema::SkippedDefinitionContext Sema::ActOnTagStartSkippedDefinition | ( | Scope * | S,
|  | Decl * | TD
| ) |  |

Invoked when we enter a tag definition that we're skipping.

Definition at line 1311 of file SemaDecl.cpp.

## ◆ ActOnTagTemplateIdType()

TypeResult Sema::ActOnTagTemplateIdType | ( | TagUseKind | TUK,
|  | TypeSpecifierType | TagSpec,
|  | SourceLocation | TagLoc,
|  | CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | TemplateTy | TemplateD,
|  | SourceLocation | TemplateLoc,
|  | SourceLocation | LAngleLoc,
|  | ASTTemplateArgsPtr | TemplateArgsIn,
|  | SourceLocation | RAngleLoc
| ) |  |

Parsed an elaborated-type-specifier that refers to a template-id, such as `class` T::template apply<U>.

Definition at line 3759 of file SemaTemplate.cpp.

References clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::TypeWithKeyword::getKeywordForTagTypeKind(), and clang::TypeWithKeyword::getTagTypeKindForTypeSpec().

## ◆ ActOnTemplateDeclarator()

Decl * Sema::ActOnTemplateDeclarator | ( | Scope * | S,
|  | MultiTemplateParamsArg | TemplateParameterLists,
|  | Declarator & | D
| ) |  |

Definition at line 8311 of file SemaTemplate.cpp.

## ◆ ActOnTemplatedFriendTag()

Decl * Sema::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.

Definition at line 15743 of file SemaDeclCXX.cpp.

## ◆ ActOnTemplateIdType()

TypeResult Sema::ActOnTemplateIdType | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | TemplateTy | Template,
|  | IdentifierInfo * | TemplateII,
|  | SourceLocation | TemplateIILoc,
|  | SourceLocation | LAngleLoc,
|  | ASTTemplateArgsPtr | TemplateArgs,
|  | SourceLocation | RAngleLoc,
|  | bool | IsCtorOrDtorName = `false`,
|  | bool | IsClassName = `false`
| ) |  |

Definition at line 3655 of file SemaTemplate.cpp.

Referenced by ActOnPseudoDestructorExpr().

## ◆ ActOnTemplateParameterList()

TemplateParameterList * Sema::ActOnTemplateParameterList | ( | unsigned | Depth,
|  | SourceLocation | ExportLoc,
|  | SourceLocation | TemplateLoc,
|  | SourceLocation | LAngleLoc,
|  | ArrayRef< NamedDecl *> | Params,
|  | SourceLocation | RAngleLoc,
|  | Expr * | RequiresClause
| ) |  |

ActOnTemplateParameterList - Builds a TemplateParameterList, optionally constrained by RequiresClause, that contains the template parameters in Params.

Definition at line 1502 of file SemaTemplate.cpp.

References clang::TemplateParameterList::Create(), Diag(), and clang::SourceLocation::isValid().

## ◆ ActOnTemplateTemplateParameter()

NamedDecl * Sema::ActOnTemplateTemplateParameter | ( | Scope * | S,
|  | SourceLocation | TmpLoc,
|  | TemplateParameterList * | Params,
|  | SourceLocation | EllipsisLoc,
|  | IdentifierInfo * | Name,
|  | SourceLocation | NameLoc,
|  | unsigned | Depth,
|  | unsigned | Position,
|  | SourceLocation | EqualLoc,
|  | ParsedTemplateArgument | Default
| ) |  |

ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e.g.

T in template <template <typename> class T> class array) has been parsed. S is the current scope.

Definition at line 1421 of file SemaTemplate.cpp.

## ◆ ActOnTemplateTypeArgument()

ParsedTemplateArgument Sema::ActOnTemplateTypeArgument | ( | TypeResult | ParsedType | ) |

Convert a parsed type into a parsed template argument.

This is mostly trivial, except that we may have parsed a C++17 deduced class template specialization type, in which case we should form a template template argument instead of a type template argument.

Definition at line 923 of file SemaTemplate.cpp.

References clang::CXXScopeSpec::Adopt(), clang::CPlusPlus17, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TypeLoc::getAs(), clang::TypeSourceInfo::getTypeLoc(), and clang::QualType::isNull().

## ◆ ActOnTranslationUnitScope()

void Sema::ActOnTranslationUnitScope | ( | Scope * | S | ) |

Definition at line 87 of file Sema.cpp.

Referenced by clang::Parser::Initialize().

## ◆ ActOnTypeConstraint()

bool Sema::ActOnTypeConstraint | ( | const CXXScopeSpec & | SS,
|  | TemplateIdAnnotation * | TypeConstraint,
|  | TemplateTypeParmDecl * | ConstrainedParameter,
|  | SourceLocation | EllipsisLoc
| ) |  |

Definition at line 1053 of file SemaTemplate.cpp.

References Diag(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsTemplateDecl(), clang::TemplateParameterList::getMinRequiredArguments(), clang::TemplateDecl::getTemplateParameters(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXScopeSpec::isSet(), clang::ConceptDecl::isTypeConcept(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, makeTemplateArgumentListInfo(), clang::TemplateIdAnnotation::Template, and clang::TemplateIdAnnotation::TemplateNameLoc.

Referenced by ActOnCompoundRequirement().

## ◆ ActOnTypedefDeclarator()

NamedDecl * Sema::ActOnTypedefDeclarator | ( | Scope * | S,
|  | Declarator & | D,
|  | DeclContext * | DC,
|  | TypeSourceInfo * | TInfo,
|  | LookupResult & | Previous
| ) |  |

Definition at line 5914 of file SemaDecl.cpp.

## ◆ ActOnTypedefedProtocols()

void Sema::ActOnTypedefedProtocols | ( | SmallVectorImpl< Decl *> & | ProtocolRefs,
|  | SmallVectorImpl< SourceLocation > & | ProtocolLocs,
|  | IdentifierInfo * | SuperName,
|  | SourceLocation | SuperLoc
| ) |  |

ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualified super class and adds them to the list of the protocols.

Definition at line 1105 of file SemaDeclObjC.cpp.

References clang::Type::getAs(), clang::Type::isObjCObjectType(), LookupOrdinaryName, LookupSingleName(), and TUScope.

## ◆ ActOnTypedefNameDecl()

NamedDecl * Sema::ActOnTypedefNameDecl | ( | Scope * | S,
|  | DeclContext * | DC,
|  | TypedefNameDecl * | NewTD,
|  | 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;'.

Definition at line 6001 of file SemaDecl.cpp.

## ◆ ActOnTypeName()

TypeResult Sema::ActOnTypeName | ( | Scope * | S,
|  | Declarator & | D
| ) |  |

Definition at line 6026 of file SemaType.cpp.

References clang::AliasDeclContext, clang::AliasTemplateContext, clang::Declarator::getContext(), clang::Declarator::getIdentifier(), clang::Declarator::isInvalidType(), and clang::ObjCParameterContext.

Referenced by clang::Parser::ParseUnqualifiedId(), and TypeTraitArity().

## ◆ ActOnTypenameType() [1/2]

TypeResult Sema::ActOnTypenameType | ( | Scope * | S,
|  | SourceLocation | TypenameLoc,
|  | const CXXScopeSpec & | SS,
|  | const IdentifierInfo & | II,
|  | SourceLocation | IdLoc
| ) |  |

Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".

Parameters

  S | The scope in which this typename type occurs.
  TypenameLoc | the location of the 'typename' keyword
  SS | the nested-name-specifier following the typename (e.g., 'T::').
  II | the identifier we're retrieving (e.g., 'type' in the example).
  IdLoc | the location of the identifier.

Definition at line 10068 of file SemaTemplate.cpp.

References clang::FixItHint::CreateRemoval(), Diag(), clang::Scope::getTemplateParamParent(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXScopeSpec::isInvalid(), and clang::SourceLocation::isValid().

Referenced by ActOnTypeRequirement(), and clang::Parser::TryAnnotateTypeOrScopeToken().

## ◆ ActOnTypenameType() [2/2]

TypeResult Sema::ActOnTypenameType | ( | Scope * | S,
|  | SourceLocation | TypenameLoc,
|  | const CXXScopeSpec & | SS,
|  | SourceLocation | TemplateLoc,
|  | TemplateTy | TemplateName,
|  | IdentifierInfo * | TemplateII,
|  | SourceLocation | TemplateIILoc,
|  | SourceLocation | LAngleLoc,
|  | ASTTemplateArgsPtr | TemplateArgs,
|  | SourceLocation | RAngleLoc
| ) |  |

Called when the parser has parsed a C++ typename specifier that ends in a template-id, e.g., "typename MetaFun::template apply<T1, T2>".

Parameters

  S | The scope in which this typename type occurs.
  TypenameLoc | the location of the 'typename' keyword
  SS | the nested-name-specifier following the typename (e.g., 'T::').
  TemplateLoc | the location of the 'template' keyword, if any.
  TemplateName | The template name.
  TemplateII | The identifier used to name the template.
  TemplateIILoc | The location of the template name.
  LAngleLoc | The location of the opening angle bracket ('<').
  TemplateArgs | The template arguments.
  RAngleLoc | The location of the closing angle bracket ('>').

Definition at line 10092 of file SemaTemplate.cpp.

References clang::FixItHint::CreateRemoval(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::CXXScopeSpec::getScopeRep(), clang::Scope::getTemplateParamParent(), and clang::SourceLocation::isValid().

## ◆ ActOnTypeParameter()

NamedDecl * Sema::ActOnTypeParameter | ( | Scope * | S,
|  | bool | Typename,
|  | SourceLocation | EllipsisLoc,
|  | SourceLocation | KeyLoc,
|  | IdentifierInfo * | ParamName,
|  | SourceLocation | ParamNameLoc,
|  | unsigned | Depth,
|  | unsigned | Position,
|  | SourceLocation | EqualLoc,
|  | ParsedType | DefaultArg,
|  | bool | HasTypeConstraint
| ) |  |

ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed.

Typename specifies whether the keyword "typename" was used to declare the type parameter (otherwise, "class" was used), and KeyLoc is the location of the "class" or "typename" keyword. ParamName is the name of the parameter (NULL indicates an unnamed template parameter) and ParamNameLoc is the location of the parameter name (if any). If the type parameter has a default argument, it will be added later via ActOnTypeParameterDefault.

Definition at line 978 of file SemaTemplate.cpp.

## ◆ ActOnTypeRequirement()

concepts::Requirement * Sema::ActOnTypeRequirement | ( | SourceLocation | TypenameKWLoc,
|  | CXXScopeSpec & | SS,
|  | SourceLocation | NameLoc,
|  | IdentifierInfo * | TypeName,
|  | TemplateIdAnnotation * | TemplateId
| ) |  |

Definition at line 8343 of file SemaExprCXX.cpp.

References ActOnTypenameType(), BuildTypeRequirement(), CheckTypenameType(), Context, clang::ETK_Typename, clang::TemplateIdAnnotation::getTemplateArgs(), GetTypeFromParser(), clang::CXXScopeSpec::getWithLocInContext(), clang::QualType::isNull(), clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::Name, clang::TemplateIdAnnotation::NumArgs, clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateIdAnnotation::Template, clang::TemplateIdAnnotation::TemplateKWLoc, and clang::TemplateIdAnnotation::TemplateNameLoc.

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ActOnTypeTrait()

ExprResult Sema::ActOnTypeTrait | ( | TypeTrait | Kind,
|  | SourceLocation | KWLoc,
|  | ArrayRef< ParsedType > | Args,
|  | SourceLocation | RParenLoc
| ) |  |

Parsed one of the type trait support pseudo-functions.

Definition at line 5070 of file SemaExprCXX.cpp.

References BuildTypeTrait(), Context, clang::ASTContext::getTrivialTypeSourceInfo(), and GetTypeFromParser().

Referenced by TypeTraitArity().

## ◆ ActOnUnaryExprOrTypeTraitExpr()

ExprResult Sema::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.

Definition at line 4356 of file SemaExpr.cpp.

References clang::ExprError(), and clang::OpaquePtr< QualType >::getFromOpaquePtr().

## ◆ ActOnUnaryOp()

ExprResult Sema::ActOnUnaryOp | ( | Scope * | S,
|  | SourceLocation | OpLoc,
|  | tok::TokenKind | Op,
|  | Expr * | Input
| ) |  |

Definition at line 13887 of file SemaExpr.cpp.

References ConvertTokenKindToUnaryOpcode().

Referenced by clang::Parser::ParseExpression().

## ◆ ActOnUndeclaredTypeTemplateName()

void Sema::ActOnUndeclaredTypeTemplateName | ( | Scope * | S,
|  | TemplateTy & | Name,
|  | TemplateNameKind & | TNK,
|  | SourceLocation | NameLoc,
|  | IdentifierInfo *& | II
| ) |  |

Try to resolve an undeclared template name as a type template.

Sets II to the identifier corresponding to the template name, and updates Name to a corresponding (typo-corrected) type template name and TNK to the corresponding kind, if possible.

Definition at line 3602 of file SemaTemplate.cpp.

## ◆ ActOnUninitializedDecl()

void Sema::ActOnUninitializedDecl | ( | Decl * | dcl | ) |

Definition at line 12170 of file SemaDecl.cpp.

References Diag(), and clang::Type::isUndeducedType().

## ◆ ActOnUsingDeclaration()

Decl * Sema::ActOnUsingDeclaration | ( | Scope * | CurScope,
|  | AccessSpecifier | AS,
|  | SourceLocation | UsingLoc,
|  | SourceLocation | TypenameLoc,
|  | CXXScopeSpec & | SS,
|  | UnqualifiedId & | Name,
|  | SourceLocation | EllipsisLoc,
|  | const ParsedAttributesView & | AttrList
| ) |  |

Definition at line 11089 of file SemaDeclCXX.cpp.

## ◆ ActOnUsingDirective()

Decl * Sema::ActOnUsingDirective | ( | Scope * | CurScope,
|  | SourceLocation | UsingLoc,
|  | SourceLocation | NamespcLoc,
|  | CXXScopeSpec & | SS,
|  | SourceLocation | IdentLoc,
|  | IdentifierInfo * | NamespcName,
|  | const ParsedAttributesView & | AttrList
| ) |  |

Definition at line 10993 of file SemaDeclCXX.cpp.

References clang::LookupResult::addDecl(), clang::LookupResult::clear(), clang::UsingDirectiveDecl::Create(), clang::Scope::DeclScope, Diag(), clang::LookupResult::empty(), clang::DeclContext::Encloses(), clang::LookupResult::getAsSingle(), clang::Scope::getFlags(), clang::NestedNameSpecifier::getKind(), clang::Scope::getParent(), clang::DeclContext::getParent(), clang::LookupResult::getRepresentativeDecl(), clang::CXXScopeSpec::getScopeRep(), clang::NestedNameSpecifier::Global, clang::LookupResult::isAmbiguous(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::IdentifierInfo::isStr(), clang::Scope::isTemplateParamScope(), clang::SourceLocation::isValid(), clang::LookupResult::resolveKind(), and TryNamespaceTypoCorrection().

## ◆ ActOnVAArg()

ExprResult Sema::ActOnVAArg | ( | SourceLocation | BuiltinLoc,
|  | Expr * | E,
|  | ParsedType | Ty,
|  | SourceLocation | RPLoc
| ) |  |

Definition at line 14552 of file SemaExpr.cpp.

## ◆ ActOnVariableDeclarator()

NamedDecl * Sema::ActOnVariableDeclarator | ( | Scope * | S,
|  | Declarator & | D,
|  | DeclContext * | DC,
|  | TypeSourceInfo * | TInfo,
|  | LookupResult & | Previous,
|  | MultiTemplateParamsArg | TemplateParamLists,
|  | bool & | AddToScope,
|  | ArrayRef< BindingDecl *> | Bindings = `None`
| ) |  |

Definition at line 6641 of file SemaDecl.cpp.

## ◆ ActOnVarTemplateSpecialization()

DeclResult Sema::ActOnVarTemplateSpecialization | ( | Scope * | S,
|  | Declarator & | D,
|  | TypeSourceInfo * | DI,
|  | SourceLocation | TemplateKWLoc,
|  | TemplateParameterList * | TemplateParams,
|  | StorageClass | SC,
|  | bool | IsPartialSpecialization
| ) |  |

Definition at line 4038 of file SemaTemplate.cpp.

References clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), clang::Declarator::getName(), clang::IK_TemplateId, makeTemplateArgumentListInfo(), and clang::UnqualifiedId::TemplateId.

## ◆ ActOnWhileStmt()

StmtResult Sema::ActOnWhileStmt | ( | SourceLocation | WhileLoc,
|  | ConditionResult | Cond,
|  | Stmt * | Body
| ) |  |

Definition at line 1316 of file SemaStmt.cpp.

References clang::WhileStmt::Create(), clang::Sema::ConditionResult::get(), clang::Sema::ConditionResult::isInvalid(), and clang::StmtError().

## ◆ AddAlignedAttr() [1/2]

void clang::Sema::AddAlignedAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | Expr * | E,
|  | bool | IsPackExpansion
| ) |  |

AddAlignedAttr - Adds an aligned attribute to a particular declaration.

## ◆ AddAlignedAttr() [2/2]

void clang::Sema::AddAlignedAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | TypeSourceInfo * | T,
|  | bool | IsPackExpansion
| ) |  |

## ◆ AddAlignmentAttributesForRecord()

void Sema::AddAlignmentAttributesForRecord | ( | RecordDecl * | RD | ) |

AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl, to handle '#pragma pack' and '#pragma options align'.

Definition at line 50 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, clang::Sema::PragmaStack< ValueType >::CurrentPragmaLocation, clang::Sema::PragmaStack< ValueType >::CurrentValue, kMac68kAlignmentSentinel, PackIncludeStack, and PackStack.

## ◆ AddAlignValueAttr()

void clang::Sema::AddAlignValueAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | Expr * | E
| ) |  |

AddAlignValueAttr - Adds an align_value attribute to a particular declaration.

## ◆ AddAllocAlignAttr()

void clang::Sema::AddAllocAlignAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | Expr * | ParamExpr
| ) |  |

AddAllocAlignAttr - Adds an alloc_align attribute to a particular declaration.

## ◆ addAMDGPUFlatWorkGroupSizeAttr()

void clang::Sema::addAMDGPUFlatWorkGroupSizeAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | Expr * | Min,
|  | Expr * | Max
| ) |  |

addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size attribute to a particular declaration.

## ◆ addAMDGPUWavesPerEUAttr()

void clang::Sema::addAMDGPUWavesPerEUAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | Expr * | Min,
|  | Expr * | Max
| ) |  |

addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a particular declaration.

## ◆ AddAnyMethodToGlobalPool()

void Sema::AddAnyMethodToGlobalPool | ( | Decl * | D | ) |

AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.

Definition at line 328 of file SemaDeclObjC.cpp.

References AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), and clang::ObjCMethodDecl::isInstanceMethod().

## ◆ AddArgumentDependentLookupCandidates()

void Sema::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.

This routine performs argument-dependent name lookup based on the given function name (which may also be an operator name) and adds all of the overload candidates found by ADL to the overload candidate set (C++ [basic.lookup.argdep]).

Definition at line 9235 of file SemaOverload.cpp.

## ◆ AddAssumeAlignedAttr()

void clang::Sema::AddAssumeAlignedAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | Expr * | E,
|  | Expr * | OE
| ) |  |

AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration.

## ◆ AddBuiltinCandidate()

void Sema::AddBuiltinCandidate | ( | QualType * | ParamTys,
|  | ArrayRef< Expr *> | Args,
|  | OverloadCandidateSet & | CandidateSet,
|  | bool | IsAssignmentOperator = `false`,
|  | unsigned | NumContextualBoolArguments = `0`
| ) |  |

AddBuiltinCandidate - Add a candidate for a built-in operator.

ResultTy and ParamTys are the result and parameter types of the built-in candidate, respectively. Args and NumArgs are the arguments being passed to the candidate. IsAssignmentOperator should be true when this built-in candidate is an assignment operator. NumContextualBoolArguments is the number of arguments (at the beginning of the argument list) that will be contextually converted to bool.

Definition at line 7586 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::AS_none, clang::OverloadCandidate::BuiltinParamTypes, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::OverloadCandidate::IgnoreObjectArgument, clang::OverloadCandidate::IsSurrogate, clang::DeclAccessPair::make(), Unevaluated, and clang::OverloadCandidate::Viable.

## ◆ AddBuiltinOperatorCandidates()

void Sema::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.

For example, if the operator is a binary '+', this routine might add "int operator+(int, int)" to cover integer addition.

Definition at line 9039 of file SemaOverload.cpp.

References clang::Qualifiers::addConst(), and CollectVRQualifiers().

Referenced by FindConditionalOverload().

## ◆ AddCFAuditedAttribute()

void Sema::AddCFAuditedAttribute | ( | Decl * | D | ) |

AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and, if so, consider adding the appropriate attribute.

Definition at line 582 of file SemaAttr.cpp.

References clang::Decl::addAttr(), clang::AttributeCommonInfo::AS_Pragma, Context, clang::Lexer::findLocationAfterToken(), clang::SourceRange::getBegin(), clang::CharSourceRange::getCharRange(), clang::SourceRange::getEnd(), getLangOpts(), clang::Preprocessor::getPragmaARCCFCodeAuditedInfo(), getSourceManager(), clang::attr::getSubjectMatchRuleSpelling(), clang::CharSourceRange::getTokenRange(), clang::Decl::hasAttr(), clang::SourceLocation::isValid(), PP, and clang::Result.

## ◆ AddConversionCandidate()

void Sema::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]).

From is the expression we're converting from, and ToType is the type that we're eventually trying to convert to (which may or may not be the same type as the type that the conversion function produces).

Definition at line 7123 of file SemaOverload.cpp.

Referenced by collectViableConversionCandidates(), FindConversionForRefInit(), IsUserDefinedConversion(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

## ◆ addExternalSource()

void Sema::addExternalSource | ( | ExternalSemaSource * | E | ) |

Registers an external source.

If an external source already exists, creates a multiplex external source and appends to it.

Parameters

  [in] | E | - A non-null external sema source.

Definition at line 462 of file Sema.cpp.

## ◆ AddFactoryMethodToGlobalPool()

void clang::Sema::AddFactoryMethodToGlobalPool | ( | ObjCMethodDecl * | Method,
|  | bool | impl = `false`
| ) |  |
| inline

AddFactoryMethodToGlobalPool - Same as above, but for factory methods.

Definition at line 4025 of file Sema.h.

Referenced by AddAnyMethodToGlobalPool(), and ProcessPropertyDecl().

## ◆ AddFunctionCandidates()

void Sema::AddFunctionCandidates | ( | const UnresolvedSetImpl & | Fns,
|  | 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.

Definition at line 6614 of file SemaOverload.cpp.

References clang::UnresolvedSetImpl::begin(), clang::UnresolvedSetImpl::end(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::NamedDecl::getUnderlyingDecl(), clang::QualType::isNull(), clang::Type::isPointerType(), and clang::Expr::Classification::makeSimpleLValue().

## ◆ AddImplicitlyDeclaredMembersToClass()

void Sema::AddImplicitlyDeclaredMembersToClass | ( | CXXRecordDecl * | ClassDecl | ) |

AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions, such as the default constructor, copy constructor, or destructor, to the given C++ class (C++ [special]p1).

This routine can only be executed just before the definition of the class is complete.

Definition at line 9535 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::hasInheritedConstructor(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), and clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor().

## ◆ addImplicitTypedef()

void Sema::addImplicitTypedef | ( | StringRef | Name,
|  | QualType | T
| ) |  |

Definition at line 210 of file Sema.cpp.

Referenced by Initialize().

## ◆ addInitCapture()

void Sema::addInitCapture | ( | sema::LambdaScopeInfo * | LSI,
|  | VarDecl * | Var
| ) |  |

Add an init-capture to a lambda scope.

Definition at line 879 of file SemaLambda.cpp.

References clang::sema::CapturingScopeInfo::addCapture(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::VarDecl::isInitCapture(), and clang::Type::isReferenceType().

## ◆ AddInitializerToDecl()

void Sema::AddInitializerToDecl | ( | Decl * | RealDecl,
|  | Expr * | Init,
|  | bool | DirectInit
| ) |  |

AddInitializerToDecl - Adds the initializer Init to the declaration dcl.

If DirectInit is true, this is C++ direct initialization rather than copy initialization.

Definition at line 11689 of file SemaDecl.cpp.

References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasExternalStorage(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDecl(), clang::VarDecl::isStaticDataMember(), clang::Type::isUndeducedType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::Decl::setInvalidDecl().

Referenced by buildCaptureDecl(), checkOpenMPLoop(), FinishForRangeVarDecl(), and noteMemberDeclaredHere().

## ◆ AddInstanceMethodToGlobalPool()

void clang::Sema::AddInstanceMethodToGlobalPool | ( | ObjCMethodDecl * | Method,
|  | bool | impl = `false`
| ) |  |
| inline

AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool.

This allows us to efficiently associate a selector with a method declaraation for purposes of typechecking messages sent to "id" (where the class of the object is unknown).

Definition at line 4020 of file Sema.h.

Referenced by AddAnyMethodToGlobalPool(), and ProcessPropertyDecl().

## ◆ AddKnownFunctionAttributes()

void Sema::AddKnownFunctionAttributes | ( | FunctionDecl * | FD | ) |

Adds any function attributes that we know a priori based on the declaration of this function.

These attributes can apply both to implicitly-declared builtins (like __builtin___printf_chk) or to library-declared functions like NSLog or printf.

We need to check for duplicate attributes both here and where user-written attributes are applied to declarations.

Definition at line 14364 of file SemaDecl.cpp.

References clang::FunctionDecl::getBuiltinID(), and clang::Decl::isInvalidDecl().

## ◆ addLambdaParameters()

void Sema::addLambdaParameters | ( | ArrayRef< LambdaIntroducer::LambdaCapture > | Captures,
|  | CXXMethodDecl * | CallOperator,
|  | Scope * | CurScope
| ) |  |

Introduce the lambda parameters into scope.

Definition at line 538 of file SemaLambda.cpp.

References Diag(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), and clang::FunctionDecl::getParamDecl().

## ◆ AddLaunchBoundsAttr()

void clang::Sema::AddLaunchBoundsAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | Expr * | MaxThreads,
|  | Expr * | MinBlocks
| ) |  |

AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration.

## ◆ AddMemberOperatorCandidates()

void Sema::AddMemberOperatorCandidates | ( | OverloadedOperatorKind | Op,
|  | SourceLocation | OpLoc,
|  | ArrayRef< Expr *> | Args,
|  | OverloadCandidateSet & | CandidateSet,
|  | OverloadCandidateParamOrder | PO = `{}`
| ) |  |

Add overload candidates for overloaded operators that are member functions.

Add the overloaded operator candidates that are member functions for the operator Op that was used in an operator expression such as "x Op y". , Args/NumArgs provides the operator arguments, and CandidateSet will store the added overload candidates. (C++ [over.match.oper]).

Definition at line 7535 of file SemaOverload.cpp.

## ◆ AddMethodCandidate() [1/2]

void Sema::AddMethodCandidate | ( | DeclAccessPair | FoundDecl,
|  | QualType | ObjectType,
|  | Expr::Classification | ObjectClassification,
|  | ArrayRef< Expr *> | Args,
|  | OverloadCandidateSet & | CandidateSet,
|  | bool | SuppressUserConversions = `false`,
|  | OverloadCandidateParamOrder | PO = `{}`
| ) |  |

AddMethodCandidate - Adds a named decl (which is some kind of method) as a method candidate to the given overload set.

Definition at line 6684 of file SemaOverload.cpp.

References clang::DeclAccessPair::getDecl(), and clang::Decl::getDeclContext().

## ◆ AddMethodCandidate() [2/2]

void Sema::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 = `None`,
|  | 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`).

For example, in a call `o.f(a1,a2)`, `Object` will contain `o` and `Args` will contain both `a1` and `a2`. If `SuppressUserConversions`, then don't allow user-defined conversions via constructors or conversion operators.

Definition at line 6718 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::OverloadCandidate::FoundDecl, clang::Type::getAs(), clang::ValueDecl::getType(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::OverloadCandidateSet::isNewCandidate(), and Unevaluated.

## ◆ AddMethodTemplateCandidate()

void Sema::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.

Definition at line 6871 of file SemaOverload.cpp.

## ◆ addMethodToGlobalList()

void Sema::addMethodToGlobalList | ( | ObjCMethodList * | List,
|  | ObjCMethodDecl * | Method
| ) |  |

Add the given method to the list of globally-known methods.

Definition at line 3290 of file SemaDeclObjC.cpp.

Referenced by updateOutOfDateSelector().

## ◆ AddModeAttr()

void clang::Sema::AddModeAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | IdentifierInfo * | Name,
|  | bool | InInstantiation = `false`
| ) |  |

AddModeAttr - Adds a mode attribute to a particular declaration.

## ◆ AddMsStructLayoutForRecord()

void Sema::AddMsStructLayoutForRecord | ( | RecordDecl * | RD | ) |

AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.

Definition at line 76 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, clang::Sema::PragmaStack< ValueType >::CurrentValue, getLangOpts(), MSStructPragmaOn, and VtorDispStack.

## ◆ AddNonMemberOperatorCandidates()

void Sema::AddNonMemberOperatorCandidates | ( | const UnresolvedSetImpl & | Fns,
|  | 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.

Definition at line 7487 of file SemaOverload.cpp.

References clang::UnresolvedSetImpl::begin(), clang::UnresolvedSetImpl::end(), clang::OverloadCandidateSet::getRewriteInfo(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::NamedDecl::getUnderlyingDecl(), clang::OverloadCandidateSet::OperatorRewriteInfo::isAcceptableCandidate(), and clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed().

## ◆ AddOptnoneAttributeIfNoConflicts()

void Sema::AddOptnoneAttributeIfNoConflicts | ( | FunctionDecl * | FD,
|  | SourceLocation | Loc
| ) |  |

Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents the location causing the 'optnone' attribute to be added (usually because of a pragma).

Definition at line 863 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, and clang::Decl::hasAttr().

Referenced by AddRangeBasedOptnone().

## ◆ AddOverloadCandidate()

void Sema::AddOverloadCandidate | ( | FunctionDecl * | Function,
|  | DeclAccessPair | FoundDecl,
|  | ArrayRef< Expr *> | Args,
|  | OverloadCandidateSet & | CandidateSet,
|  | bool | SuppressUserConversions = `false`,
|  | bool | PartialOverloading = `false`,
|  | bool | AllowExplicit = `true`,
|  | bool | AllowExplicitConversions = `false`,
|  | ADLCallKind | IsADLCandidate = `ADLCallKind::NotADL`,
|  | ConversionSequenceList | EarlyConversions = `None`,
|  | OverloadCandidateParamOrder | PO = `{}`
| ) |  |

AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given function call arguments.

If `SuppressUserConversions`, then don't allow user-defined conversions via constructors or conversion operators.

Parameters

  PartialOverloading | true if we are performing "partial" overloading based on an incomplete set of function arguments. This feature is used by code completion.

Definition at line 6124 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::CSK_Operator, clang::Type::getAs(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::OverloadCandidateSet::getKind(), clang::ValueDecl::getType(), IsAcceptableNonMemberOperatorCandidate(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::CXXConstructorDecl::isMoveConstructor(), clang::OverloadCandidateSet::isNewCandidate(), clang::Expr::Classification::makeSimpleLValue(), and Unevaluated.

Referenced by IsInitializerListConstructorConversion(), IsUserDefinedConversion(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

## ◆ AddOverloadedCallCandidates()

void Sema::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.

Definition at line 12350 of file SemaOverload.cpp.

References AddOverloadedCallCandidate(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::Expr::getExprLoc(), clang::OverloadExpr::getName(), clang::OverloadExpr::hasExplicitTemplateArgs(), and clang::UnresolvedLookupExpr::requiresADL().

## ◆ AddOverriddenMethods()

bool Sema::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.

Definition at line 7945 of file SemaDecl.cpp.

## ◆ AddParameterABIAttr()

void clang::Sema::AddParameterABIAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | ParameterABI | ABI
| ) |  |

## ◆ AddPragmaAttributes()

void Sema::AddPragmaAttributes | ( | Scope * | S,
|  | Decl * | D
| ) |  |

Adds the attributes that have been specified using the '#pragma clang attribute push' directives to the given declaration.

Definition at line 807 of file SemaAttr.cpp.

References clang::ParsedAttributesView::addAtEnd(), clang::ParsedAttr::appliesToDecl(), clang::ParsedAttr::isPragmaClangAttribute(), PragmaAttributeCurrentTargetDecl, PragmaAttributeStack, and ProcessDeclAttributeList().

Referenced by ActOnForwardProtocolDeclaration(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), and ActOnStartProtocolInterface().

## ◆ AddPushedVisibilityAttribute()

void Sema::AddPushedVisibilityAttribute | ( | Decl * | RD | ) |

AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute.

Definition at line 880 of file SemaAttr.cpp.

References clang::NamedDecl::getExplicitVisibility(), VisContext, and clang::NamedDecl::VisibilityForValue.

## ◆ AddRangeBasedOptnone()

void Sema::AddRangeBasedOptnone | ( | FunctionDecl * | FD | ) |

Only called on function definitions; if there is a pragma in scope with the effect of a range-based optnone, consider marking the function with attribute optnone.

Definition at line 856 of file SemaAttr.cpp.

References AddOptnoneAttributeIfNoConflicts(), clang::SourceLocation::isValid(), and OptimizeOffPragmaLocation.

## ◆ AddSurrogateCandidate()

void Sema::AddSurrogateCandidate | ( | CXXConversionDecl * | Conversion,
|  | DeclAccessPair | FoundDecl,
|  | CXXRecordDecl * | ActingContext,
|  | const FunctionProtoType * | Proto,
|  | Expr * | Object,
|  | ArrayRef< Expr *> | Args,
|  | OverloadCandidateSet & | CandidateSet
| ) |  |

AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given `Object` to a function pointer via the conversion function `Conversion`, and then attempts to call it with the given arguments (C++ [over.call.object]p2-4).

Proto is the type of function that we'll eventually be calling.

Definition at line 7380 of file SemaOverload.cpp.

## ◆ AddTemplateConversionCandidate()

void Sema::AddTemplateConversionCandidate | ( | FunctionTemplateDecl * | FunctionTemplate,
|  | DeclAccessPair | FoundDecl,
|  | CXXRecordDecl * | ActingDC,
|  | 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]).

Definition at line 7326 of file SemaOverload.cpp.

Referenced by collectViableConversionCandidates(), FindConversionForRefInit(), IsUserDefinedConversion(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

## ◆ AddTemplateOverloadCandidate()

void Sema::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 = `{}`
| ) |  |

Add a C++ function template specialization as a candidate in the candidate set, using template argument deduction to produce an appropriate function template specialization.

Definition at line 6943 of file SemaOverload.cpp.

Referenced by IsInitializerListConstructorConversion(), IsUserDefinedConversion(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

## ◆ AddXConsumedAttr()

void clang::Sema::AddXConsumedAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | RetainOwnershipKind | K,
|  | bool | IsTemplateInstantiation
| ) |  |

## ◆ adjustCCAndNoReturn()

QualType Sema::adjustCCAndNoReturn | ( | QualType | ArgFunctionType,
|  | QualType | FunctionType,
|  | bool | AdjustExceptionSpec = `false`
| ) |  |

Adjust the type `ArgFunctionType` to match the calling convention, noreturn, and optionally the exception specification of `FunctionType`.

Deduction often wants to ignore these properties when matching function types.

Definition at line 4041 of file SemaTemplateDeduction.cpp.

References clang::Type::castAs(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionProtoType::getExtProtoInfo(), clang::FunctionProtoType::hasExceptionSpec(), and clang::QualType::isNull().

## ◆ adjustContextForLocalExternDecl()

bool Sema::adjustContextForLocalExternDecl | ( | DeclContext *& | DC | ) |
| static

Adjust the `DeclContext` for a function or variable that might be a function-local external declaration.

Definition at line 6510 of file SemaDecl.cpp.

References clang::DeclContext::getParent(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), and clang::DeclContext::isFunctionOrMethod().

Referenced by clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ AdjustDeclIfTemplate()

TemplateDecl * Sema::AdjustDeclIfTemplate | ( | Decl *& | D | ) |

AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference the templated declaration and return a pointer to the template declaration.

Otherwise, do nothing to D and return null.

Definition at line 847 of file SemaTemplate.cpp.

## ◆ AdjustDestructorExceptionSpec()

void Sema::AdjustDestructorExceptionSpec | ( | CXXDestructorDecl * | Destructor | ) |

Build an exception spec for destructors that don't have one.

C++11 says that user-defined destructors with no exception spec get one that looks as if the destructor was implicitly declared.

Definition at line 13007 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), clang::CPlusPlus11, clang::EST_Unevaluated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::ValueDecl::getType(), clang::DeclContext::isDependentContext(), clang::ValueDecl::setType(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, and clang::FunctionProtoType::ExceptionSpecInfo::Type.

Referenced by clang::TemplateDeclInstantiator::InitMethodInstantiation().

## ◆ adjustMemberFunctionCC()

void Sema::adjustMemberFunctionCC | ( | QualType & | T,
|  | bool | IsStatic,
|  | bool | IsCtorOrDtor,
|  | SourceLocation | Loc
| ) |  |

Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly.

This handles method types formed from function type typedefs and typename template arguments.

Definition at line 7289 of file SemaType.cpp.

References clang::FunctionType::getCallConv().

## ◆ areLaxCompatibleVectorTypes()

bool Sema::areLaxCompatibleVectorTypes | ( | QualType | srcTy,
|  | QualType | destTy
| ) |  |

Are the two types lax-compatible vector types? That is, given that one of them is a vector, do they have equal storage sizes, where the storage size is the number of elements times the element size?

This will also return false if either of the types is neither a vector nor a real type.

Definition at line 6631 of file SemaExpr.cpp.

References breakDownVectorType(), clang::Type::isExtVectorType(), clang::Type::isScalarType(), and clang::Type::isVectorType().

Referenced by TryReinterpretCast().

## ◆ AreMultipleMethodsInGlobalPool()

bool Sema::AreMultipleMethodsInGlobalPool | ( | Selector | Sel,
|  | ObjCMethodDecl * | BestMethod,
|  | SourceRange | R,
|  | bool | receiverIdOrClass,
|  | SmallVectorImpl< ObjCMethodDecl *> & | Methods
| ) |  |

Definition at line 3522 of file SemaDeclObjC.cpp.

References DiagnoseMultipleMethodInGlobalPool(), clang::ObjCMethodList::getNext(), clang::Decl::hasAttr(), clang::ObjCMethodList::hasMoreThanOneDecl(), clang::ObjCMethodDecl::isInstanceMethod(), MethodPool, and ReadMethodPool().

## ◆ areMultiversionVariantFunctionsCompatible()

bool Sema::areMultiversionVariantFunctionsCompatible | ( | const FunctionDecl * | OldFD,
|  | const FunctionDecl * | NewFD,
|  | const PartialDiagnostic & | NoProtoDiagID,
|  | const PartialDiagnosticAt & | NoteCausedDiagIDAt,
|  | const PartialDiagnosticAt & | NoSupportDiagIDAt,
|  | const PartialDiagnosticAt & | DiffDiagIDAt,
|  | bool | TemplatesSupported,
|  | bool | ConstexprSupported,
|  | bool | CLinkageMayDiffer
| ) |  |

Checks if the variant/multiversion functions are compatible.

Definition at line 9851 of file SemaDecl.cpp.

## ◆ ArgumentDependentLookup()

void Sema::ArgumentDependentLookup | ( | DeclarationName | Name,
|  | SourceLocation | Loc,
|  | ArrayRef< Expr *> | Args,
|  | ADLResult & | Functions
| ) |  |

Definition at line 3551 of file SemaLookup.cpp.

## ◆ AtomicPropertySetterGetterRules()

void Sema::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.

Definition at line 2177 of file SemaObjCProperty.cpp.

References bool, clang::FixItHint::CreateInsertion(), Diag(), clang::ObjCPropertyImplDecl::Dynamic, clang::ObjCImplDecl::FindPropertyImplDecl(), clang::TypeLoc::getBeginLoc(), clang::ObjCContainerDecl::getClassMethod(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::ObjCPropertyDecl::getLParenLoc(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::ObjCPropertyDecl::getQueryKind(), clang::ObjCPropertyDecl::getSetterName(), clang::TypeSourceInfo::getTypeLoc(), clang::ObjCPropertyDecl::getTypeSourceInfo(), clang::ObjCPropertyDecl::isClassProperty(), clang::SourceLocation::isInvalid(), clang::ObjCMethodDecl::isSynthesizedAccessorStub(), clang::SourceLocation::isValid(), clang::ObjCInterfaceDecl::known_extensions(), clang::LangOptions::NonGC, clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::ObjCPropertyDecl::OBJC_PR_nonatomic, clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCContainerDecl::properties(), and clang::Property.

## ◆ AttachBaseSpecifiers()

bool Sema::AttachBaseSpecifiers | ( | CXXRecordDecl * | Class,
|  | MutableArrayRef< CXXBaseSpecifier *> | Bases
| ) |  |

Performs the actual work of attaching the given base class specifiers to a C++ class.

Definition at line 2627 of file SemaDeclCXX.cpp.

Referenced by SubstBaseSpecifiers().

## ◆ AttachTypeConstraint() [1/2]

bool Sema::AttachTypeConstraint | ( | NestedNameSpecifierLoc | NS,
|  | DeclarationNameInfo | NameInfo,
|  | ConceptDecl * | NamedConcept,
|  | const TemplateArgumentListInfo * | TemplateArgs,
|  | TemplateTypeParmDecl * | ConstrainedParameter,
|  | SourceLocation | EllipsisLoc
| ) |  |

Attach a type-constraint to a template parameter.

Returns
  true if an error occured. This can happen if the immediately-declared constraint could not be formed (e.g. incorrect number of arguments for the named concept).

Definition at line 1139 of file SemaTemplate.cpp.

References clang::ASTTemplateArgumentListInfo::Create().

Referenced by CopyTypeConstraintFromAutoType(), InventTemplateParameter(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ AttachTypeConstraint() [2/2]

bool Sema::AttachTypeConstraint | ( | AutoTypeLoc | TL,
|  | NonTypeTemplateParmDecl * | ConstrainedParameter,
|  | SourceLocation | EllipsisLoc
| ) |  |

Definition at line 1175 of file SemaTemplate.cpp.

References clang::Auto, Diag(), formImmediatelyDeclaredConstraint(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::AutoTypeLoc::getArgLoc(), clang::AutoTypeLoc::getAutoKeyword(), clang::TypeLoc::getBeginLoc(), clang::AutoTypeLoc::getConceptNameInfo(), clang::AutoTypeLoc::getLAngleLoc(), clang::Decl::getLocation(), clang::AutoTypeLoc::getNamedConcept(), clang::AutoTypeLoc::getNestedNameSpecifierLoc(), clang::AutoTypeLoc::getNumArgs(), clang::AutoTypeLoc::getRAngleLoc(), clang::TypeLoc::getSourceRange(), clang::TypeLoc::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::NonTypeTemplateParmDecl::setPlaceholderTypeConstraint(), and clang::VK_RValue.

## ◆ BuildAddressSpaceAttr() [1/2]

QualType Sema::BuildAddressSpaceAttr | ( | QualType & | T,
|  | LangAS | ASIdx,
|  | Expr * | AddrSpace,
|  | SourceLocation | AttrLoc
| ) |  |

BuildAddressSpaceAttr - Builds a DependentAddressSpaceType if an expression is uninstantiated.

If instantiated it will apply the appropriate address space to the type. This function allows dependent template variables to be used in conjunction with the address_space attribute

Definition at line 6113 of file SemaType.cpp.

References DiagnoseMultipleAddrSpaceAttributes(), clang::QualType::getAddressSpace(), and clang::Expr::isValueDependent().

Referenced by HandleAddressSpaceTypeAttribute().

## ◆ BuildAddressSpaceAttr() [2/2]

QualType Sema::BuildAddressSpaceAttr | ( | QualType & | T,
|  | Expr * | AddrSpace,
|  | SourceLocation | AttrLoc
| ) |  |

Same as above, but constructs the AddressSpace index if not provided.

Definition at line 6136 of file SemaType.cpp.

References BuildAddressSpaceIndex().

## ◆ BuildAnonymousStructOrUnion()

Decl * Sema::BuildAnonymousStructOrUnion | ( | Scope * | S,
|  | DeclSpec & | DS,
|  | AccessSpecifier | AS,
|  | RecordDecl * | Record,
|  | const PrintingPolicy & | Policy
| ) |  |

BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union.

Anonymous unions are a C++ feature (C++ [class.union]) and a C11 feature; anonymous structures are a C11 feature and GNU C++ extension.

Definition at line 4835 of file SemaDecl.cpp.

## ◆ BuildAnonymousStructUnionMemberReference()

ExprResult Sema::BuildAnonymousStructUnionMemberReference | ( | const CXXScopeSpec & | SS,
|  | SourceLocation | nameLoc,
|  | IndirectFieldDecl * | indirectField,
|  | DeclAccessPair | FoundDecl = `DeclAccessPair::make(nullptr, AS_none)`,
|  | Expr * | baseObjectExpr = `nullptr`,
|  | SourceLocation | opLoc = `SourceLocation()`
| ) |  |

Definition at line 803 of file SemaExprMember.cpp.

References clang::IndirectFieldDecl::chain_begin(), clang::IndirectFieldDecl::chain_end(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAccess(), clang::NamedDecl::getDeclName(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::IndirectFieldDecl::getVarDecl(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPointerType(), clang::Type::isRecordType(), and clang::DeclAccessPair::make().

## ◆ BuildArrayType()

QualType Sema::BuildArrayType | ( | QualType | T,
|  | ArrayType::ArraySizeModifier | ASM,
|  | Expr * | ArraySize,
|  | unsigned | Quals,
|  | SourceRange | Brackets,
|  | DeclarationName | Entity
| ) |  |

Build an array type.

Parameters

  T | The type of each element in the array.
  ASM | C99 array size modifier (e.g., '*', 'static').
  ArraySize | Expression describing the size of the array.
  Brackets | The range from the opening '[' to the closing ']'.
  Entity | The name of the entity that involves the array type, if known.

Returns
  A suitable array type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 2194 of file SemaType.cpp.

References clang::CPlusPlus, Diag(), clang::SourceRange::getBegin(), getPrintableNameForEntity(), clang::Type::isIncompleteArrayType(), clang::Type::isReferenceType(), and clang::Type::isVoidType().

## ◆ BuildArrayTypeTrait()

ExprResult Sema::BuildArrayTypeTrait | ( | ArrayTypeTrait | ATT,
|  | SourceLocation | KWLoc,
|  | TypeSourceInfo * | TSInfo,
|  | Expr * | DimExpr,
|  | SourceLocation | RParen
| ) |  |

Definition at line 5363 of file SemaExprCXX.cpp.

References Context, EvaluateArrayTypeTrait(), clang::ASTContext::getSizeType(), clang::TypeSourceInfo::getType(), and clang::Type::isDependentType().

Referenced by ActOnArrayTypeTrait().

## ◆ BuildAtomicExpr()

ExprResult Sema::BuildAtomicExpr | ( | SourceRange | CallRange,
|  | SourceRange | ExprRange,
|  | SourceLocation | RParenLoc,
|  | MultiExprArg | Args,
|  | AtomicExpr::AtomicOp | Op,
|  | AtomicArgumentOrder | ArgOrder = `AtomicArgumentOrder::API`
| ) |  |

Definition at line 4644 of file SemaChecking.cpp.

References clang::Type::castAs(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::SourceRange::getEnd(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isAtomicType(), clang::QualType::isConstQualified(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPointerType(), clang::QualType::isTriviallyCopyableType(), clang::interp::Load(), clang::opencl_constant, and clang::ast_matchers::pointerType.

## ◆ BuildAtomicType()

QualType Sema::BuildAtomicType | ( | QualType | T,
|  | SourceLocation | Loc
| ) |  |

Definition at line 8520 of file SemaType.cpp.

References clang::QualType::hasQualifiers(), clang::Type::isArrayType(), clang::Type::isAtomicType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isReferenceType(), and clang::QualType::isTriviallyCopyableType().

## ◆ BuildBaseInitializer()

MemInitResult Sema::BuildBaseInitializer | ( | QualType | BaseType,
|  | TypeSourceInfo * | BaseTInfo,
|  | Expr * | Init,
|  | CXXRecordDecl * | ClassDecl,
|  | SourceLocation | EllipsisLoc
| ) |  |

Definition at line 4378 of file SemaDeclCXX.cpp.

References clang::Type::containsUnexpandedParameterPack(), Diag(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::TypeLoc::getLocalSourceRange(), clang::Stmt::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), and clang::SourceLocation::isValid().

## ◆ BuildBasePathArray()

void Sema::BuildBasePathArray | ( | const CXXBasePaths & | Paths,
|  | CXXCastPath & | BasePath
| ) |  |

Definition at line 2809 of file SemaDeclCXX.cpp.

## ◆ BuildBinOp()

ExprResult Sema::BuildBinOp | ( | Scope * | S,
|  | SourceLocation | OpLoc,
|  | BinaryOperatorKind | Opc,
|  | Expr * | LHSExpr,
|  | Expr * | RHSExpr
| ) |  |

Definition at line 13462 of file SemaExpr.cpp.

References BuildOverloadedBinOp(), CorrectDelayedTyposInBinOp(), clang::CPlusPlus, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::Expr::getType(), clang::BinaryOperator::isAssignmentOp(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isOverloadableType(), clang::Expr::isTypeDependent(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().

Referenced by buildCounterInit(), buildCounterUpdate(), checkOpenMPLoop(), EvaluateBinaryTypeTrait(), and LookupMethodInReceiverType().

## ◆ BuildBlockForLambdaConversion()

ExprResult Sema::BuildBlockForLambdaConversion | ( | SourceLocation | CurrentLocation,
|  | SourceLocation | ConvLocation,
|  | CXXConversionDecl * | Conv,
|  | Expr * | Src
| ) |  |

Definition at line 1866 of file SemaLambda.cpp.

References clang::CXXMethodDecl::getParent(), and clang::DeclContext::lookup().

## ◆ BuildBlockPointerType()

QualType Sema::BuildBlockPointerType | ( | QualType | T,
|  | SourceLocation | Loc,
|  | DeclarationName | Entity
| ) |  |

Build a block pointer type.

Parameters

  T | The type to which we'll be building a block pointer.
  Loc | The source location, used for diagnostics.
  Entity | The name of the entity that involves the block pointer type, if known.

Returns
  A suitable block pointer type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 2699 of file SemaType.cpp.

References checkQualifiedFunction(), deduceOpenCLPointeeAddrSpace(), Diag(), clang::Type::isFunctionType(), and clang::OpenCL.

## ◆ BuildBuiltinBitCastExpr()

ExprResult Sema::BuildBuiltinBitCastExpr | ( | SourceLocation | KWLoc,
|  | TypeSourceInfo * | TSI,
|  | Expr * | Operand,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 347 of file SemaCast.cpp.

References clang::ExprError(), clang::TypeLoc::getBeginLoc(), clang::TypeLoc::getEndLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), and clang::Expr::isTypeDependent().

## ◆ BuildBuiltinOffsetOf()

ExprResult Sema::BuildBuiltinOffsetOf | ( | SourceLocation | BuiltinLoc,
|  | TypeSourceInfo * | TInfo,
|  | ArrayRef< OffsetOfComponent > | Components,
|  | SourceLocation | RParenLoc
| ) |  |

__builtin_offsetof(type, a.b[123][456].c)

Definition at line 13983 of file SemaExpr.cpp.

## ◆ BuildCallExpr()

ExprResult Sema::BuildCallExpr | ( | Scope * | Scope,
|  | Expr * | Fn,
|  | SourceLocation | LParenLoc,
|  | MultiExprArg | ArgExprs,
|  | SourceLocation | RParenLoc,
|  | Expr * | ExecConfig = `nullptr`,
|  | bool | IsExecConfig = `false`
| ) |  |

BuildCallExpr - Handle a call to Fn with the specified array of arguments.

This provides the location of the left/right parens and a list of comma locations.

Definition at line 5734 of file SemaExpr.cpp.

References checkArgsForPlaceholders(), clang::CPlusPlus, clang::CallExpr::Create(), clang::FixItHint::CreateRemoval(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

Referenced by buildMemcpyForAssignmentOp(), BuildRecoveryCallExpr(), checkTupleLikeDecomposition(), diagReturnOnAllocFailure(), and tryToRecoverWithCall().

## ◆ BuildCallToMemberFunction()

ExprResult Sema::BuildCallToMemberFunction | ( | Scope * | S,
|  | Expr * | MemExprE,
|  | SourceLocation | LParenLoc,
|  | MultiExprArg | Args,
|  | SourceLocation | RParenLoc
| ) |  |

BuildCallToMemberFunction - Build a call to a member function.

MemExpr is the expression that refers to the member function (and includes the object parameter), Args/NumArgs are the arguments to the function call (not including the object parameter). The caller needs to validate that the member expression refers to a non-static member function or an overloaded member function.

Definition at line 13766 of file SemaOverload.cpp.

References clang::Expr::getType().

Referenced by tryExprAsCall().

## ◆ BuildCallToObjectOfClassType()

ExprResult Sema::BuildCallToObjectOfClassType | ( | Scope * | S,
|  | Expr * | Obj,
|  | SourceLocation | LParenLoc,
|  | MultiExprArg | Args,
|  | SourceLocation | RParenLoc
| ) |  |

BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over.call.object]), which can end up invoking an overloaded function call operator (`operator()`) or performing a user-defined conversion on the object argument.

Definition at line 14048 of file SemaOverload.cpp.

References checkArgPlaceholdersForOverload(), checkPlaceholderForOverload(), clang::OverloadCandidateSet::CSK_Operator, clang::ExprError(), and clang::ActionResult< PtrTy, CompressInvalid >::get().

## ◆ BuildCaptureField()

FieldDecl * Sema::BuildCaptureField | ( | RecordDecl * | RD,
|  | const sema::Capture & | Capture
| ) |  |

Build a FieldDecl suitable to hold the given capture.

Create a field within the lambda class or captured statement record for the given capture.

Definition at line 1606 of file SemaLambda.cpp.

References clang::sema::Capture::getCaptureType(), clang::sema::Capture::getLocation(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::sema::Capture::getVariable(), and clang::sema::Capture::isVariableCapture().

## ◆ BuildCaptureInit()

ExprResult Sema::BuildCaptureInit | ( | const sema::Capture & | Capture,
|  | SourceLocation | ImplicitCaptureLoc,
|  | bool | IsOpenMPMapping = `false`
| ) |  |

Initialize the given capture with a suitable expression.

Definition at line 1474 of file SemaLambda.cpp.

References clang::VarDecl::getInit(), clang::sema::Capture::getLocation(), clang::sema::Capture::getVariable(), clang::sema::Capture::isInitCapture(), clang::SourceLocation::isValid(), and clang::sema::Capture::isVLATypeCapture().

## ◆ BuildClassMessage()

ExprResult Sema::BuildClassMessage | ( | TypeSourceInfo * | ReceiverTypeInfo,
|  | QualType | ReceiverType,
|  | SourceLocation | SuperLoc,
|  | Selector | Sel,
|  | ObjCMethodDecl * | Method,
|  | SourceLocation | LBracLoc,
|  | ArrayRef< SourceLocation > | SelectorLocs,
|  | SourceLocation | RBracLoc,
|  | MultiExprArg | ArgsIn,
|  | bool | isImplicit = `false`
| ) |  |

Build an Objective-C class message expression.

This routine takes care of both normal class messages and class messages to the superclass.

Parameters

  ReceiverTypeInfo | Type source information that describes the receiver of this message. This may be NULL, in which case we are sending to the superclass and `SuperLoc` must be a valid source location.
  ReceiverType | The type of the object receiving the message. When `ReceiverTypeInfo` is non-NULL, this is the same type as that refers to. For a superclass send, this is the type of the superclass.
  SuperLoc | The location of the "super" keyword in a superclass message.
  Sel | The selector to which the message is being sent.
  Method | The method that this class message is invoking, if already known.
  LBracLoc | The location of the opening square bracket ']'.
  RBracLoc | The location of the closing square bracket ']'.
  ArgsIn | The message arguments.

Definition at line 2479 of file SemaExprObjC.cpp.

References clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), Diag(), clang::SourceRange::getBegin(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), clang::SourceLocation::isInvalid(), and clang::SourceLocation::isValid().

Referenced by clang::TreeTransform< Derived >::RebuildObjCMessageExpr().

## ◆ BuildClassMessageImplicit()

ExprResult Sema::BuildClassMessageImplicit | ( | QualType | ReceiverType,
|  | bool | isSuperReceiver,
|  | SourceLocation | Loc,
|  | Selector | Sel,
|  | ObjCMethodDecl * | Method,
|  | MultiExprArg | Args
| ) |  |

Definition at line 2306 of file SemaExprObjC.cpp.

References clang::QualType::isNull().

Referenced by LookupMethodInReceiverType().

## ◆ BuildCompoundLiteralExpr()

ExprResult Sema::BuildCompoundLiteralExpr | ( | SourceLocation | LParenLoc,
|  | TypeSourceInfo * | TInfo,
|  | SourceLocation | RParenLoc,
|  | Expr * | LiteralExpr
| ) |  |

Definition at line 6173 of file SemaExpr.cpp.

References clang::TypeSourceInfo::getType(), and clang::Type::isArrayType().

## ◆ BuildCoreturnStmt()

StmtResult Sema::BuildCoreturnStmt | ( | SourceLocation | KwLoc,
|  | Expr * | E,
|  | bool | IsImplicit = `false`
| ) |  |

Definition at line 855 of file SemaCoroutine.cpp.

References buildPromiseCall(), checkCoroutineContext(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::InitializedEntity::InitializeResult(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPlaceholderType(), clang::Type::isSpecificPlaceholderType(), clang::Type::isVoidType(), and clang::StmtError().

Referenced by diagReturnOnAllocFailure().

## ◆ BuildCoroutineBodyStmt()

StmtResult Sema::BuildCoroutineBodyStmt | ( | CoroutineBodyStmt::CtorArgs | Args | ) |

Definition at line 1563 of file SemaCoroutine.cpp.

References clang::CoroutineBodyStmt::Create().

## ◆ buildCoroutineParameterMoves()

bool Sema::buildCoroutineParameterMoves | ( | SourceLocation | Loc | ) |

Definition at line 1525 of file SemaCoroutine.cpp.

References buildVarDecl(), castForMoving(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::FunctionDecl::parameters(), and clang::VK_LValue.

## ◆ buildCoroutinePromise()

VarDecl * Sema::buildCoroutinePromise | ( | SourceLocation | Loc | ) |

Definition at line 481 of file SemaCoroutine.cpp.

References clang::Type::isDependentType().

## ◆ BuildCoyieldExpr()

ExprResult Sema::BuildCoyieldExpr | ( | SourceLocation | KwLoc,
|  | Expr * | E
| ) |  |

Definition at line 813 of file SemaCoroutine.cpp.

References checkCoroutineContext(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Type::isPlaceholderType().

## ◆ BuildCStyleCastExpr()

ExprResult Sema::BuildCStyleCastExpr | ( | SourceLocation | LParenLoc,
|  | TypeSourceInfo * | Ty,
|  | SourceLocation | RParenLoc,
|  | Expr * | Op
| ) |  |

Definition at line 2881 of file SemaCast.cpp.

References clang::CStyleCastExpr::Create(), DiagnoseCastQual(), clang::ExprError(), clang::Stmt::getEndLoc(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), and clang::TypeSourceInfo::getTypeLoc().

Referenced by buildPostUpdate().

## ◆ BuildCXXConstructExpr() [1/3]

ExprResult Sema::BuildCXXConstructExpr | ( | SourceLocation | ConstructLoc,
|  | QualType | DeclInitType,
|  | NamedDecl * | FoundDecl,
|  | CXXConstructorDecl * | Constructor,
|  | MultiExprArg | Exprs,
|  | bool | HadMultipleCandidates,
|  | bool | IsListInitialization,
|  | bool | IsStdInitListInitialization,
|  | bool | RequiresZeroInit,
|  | unsigned | ConstructKind,
|  | SourceRange | ParenRange
| ) |  |

BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.

Parameters

  ConstructKind | - a CXXConstructExpr::ConstructionKind

Definition at line 14564 of file SemaDeclCXX.cpp.

Referenced by CopyObject(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), and PerformImplicitConversion().

## ◆ BuildCXXConstructExpr() [2/3]

ExprResult Sema::BuildCXXConstructExpr | ( | SourceLocation | ConstructLoc,
|  | QualType | DeclInitType,
|  | CXXConstructorDecl * | Constructor,
|  | bool | Elidable,
|  | MultiExprArg | ExprArgs,
|  | bool | HadMultipleCandidates,
|  | bool | IsListInitialization,
|  | bool | IsStdInitListInitialization,
|  | bool | RequiresZeroInit,
|  | unsigned | ConstructKind,
|  | SourceRange | ParenRange
| ) |  |

Build a CXXConstructExpr whose constructor has already been resolved if it denotes an inherited constructor.

BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.

Definition at line 14628 of file SemaDeclCXX.cpp.

References clang::CXXConstructExpr::Create(), clang::CUDA, clang::declaresSameEntity(), clang::ExprError(), clang::Type::getAsCXXRecordDecl(), clang::Type::getBaseElementTypeUnsafe(), and clang::CXXMethodDecl::getParent().

## ◆ BuildCXXConstructExpr() [3/3]

ExprResult Sema::BuildCXXConstructExpr | ( | SourceLocation | ConstructLoc,
|  | QualType | DeclInitType,
|  | NamedDecl * | FoundDecl,
|  | CXXConstructorDecl * | Constructor,
|  | bool | Elidable,
|  | MultiExprArg | Exprs,
|  | bool | HadMultipleCandidates,
|  | bool | IsListInitialization,
|  | bool | IsStdInitListInitialization,
|  | bool | RequiresZeroInit,
|  | unsigned | ConstructKind,
|  | SourceRange | ParenRange
| ) |  |

Definition at line 14602 of file SemaDeclCXX.cpp.

## ◆ BuildCXXDefaultArgExpr()

ExprResult Sema::BuildCXXDefaultArgExpr | ( | SourceLocation | CallLoc,
|  | FunctionDecl * | FD,
|  | ParmVarDecl * | Param
| ) |  |

BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed.

Definition at line 5051 of file SemaExpr.cpp.

References clang::CXXDefaultArgExpr::Create(), and clang::ExprError().

Referenced by CopyObject().

## ◆ BuildCXXDefaultInitExpr()

ExprResult Sema::BuildCXXDefaultInitExpr | ( | SourceLocation | Loc,
|  | FieldDecl * | Field
| ) |  |

Definition at line 14654 of file SemaDeclCXX.cpp.

References clang::CXXDefaultInitExpr::Create(), clang::FieldDecl::getInClassInitializer(), and clang::FieldDecl::hasInClassInitializer().

Referenced by CollectFieldInitializer().

## ◆ BuildCXXFoldExpr()

ExprResult Sema::BuildCXXFoldExpr | ( | SourceLocation | LParenLoc,
|  | Expr * | LHS,
|  | BinaryOperatorKind | Operator,
|  | SourceLocation | EllipsisLoc,
|  | Expr * | RHS,
|  | SourceLocation | RParenLoc,
|  | Optional< unsigned > | NumExpansions
| ) |  |

Definition at line 1206 of file SemaTemplateVariadic.cpp.

## ◆ BuildCXXForRangeStmt()

StmtResult Sema::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.

Definition at line 2356 of file SemaStmt.cpp.

## ◆ BuildCXXFunctionalCastExpr()

ExprResult Sema::BuildCXXFunctionalCastExpr | ( | TypeSourceInfo * | TInfo,
|  | QualType | Type,
|  | SourceLocation | LParenLoc,
|  | Expr * | CastExpr,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 2907 of file SemaCast.cpp.

References clang::CXXFunctionalCastExpr::Create(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getEndLoc(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), and clang::SourceLocation::isValid().

Referenced by BuildCXXTypeConstructExpr().

## ◆ BuildCXXMemberCallExpr()

ExprResult Sema::BuildCXXMemberCallExpr | ( | Expr * | Exp,
|  | NamedDecl * | FoundDecl,
|  | CXXConversionDecl * | Method,
|  | bool | HadMultipleCandidates
| ) |  |

Definition at line 7424 of file SemaExprCXX.cpp.

Referenced by diagnoseNoViableConversion(), clang::InitializationSequence::Perform(), and recordConversion().

## ◆ BuildCXXNamedCast()

ExprResult Sema::BuildCXXNamedCast | ( | SourceLocation | OpLoc,
|  | tok::TokenKind | Kind,
|  | TypeSourceInfo * | Ty,
|  | Expr * | E,
|  | SourceRange | AngleBrackets,
|  | SourceRange | Parens
| ) |  |

Definition at line 258 of file SemaCast.cpp.

References clang::CXXConstCastExpr::Create(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getEnd(), clang::TypeSourceInfo::getType(), clang::QualType::getTypePtr(), and clang::Type::isDependentType().

Referenced by castForMoving(), and CastForMoving().

## ◆ BuildCXXNestedNameSpecifier()

bool Sema::BuildCXXNestedNameSpecifier | ( | Scope * | S,
|  | NestedNameSpecInfo & | IdInfo,
|  | bool | EnteringContext,
|  | CXXScopeSpec & | SS,
|  | NamedDecl * | ScopeLookupResult,
|  | bool | ErrorRecoveryLookup,
|  | bool * | IsCorrectedToColon = `nullptr`,
|  | bool | OnlyNamespace = `false`
| ) |  |

Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier.

Parameters

  S | Scope in which the nested-name-specifier occurs.
  IdInfo | Parser information about an identifier in the nested-name-spec.
  EnteringContext | If true, enter the context specified by the nested-name-specifier.
  SS | Optional nested name specifier preceding the identifier.
  ScopeLookupResult | Provides the result of name lookup within the scope of the nested-name-specifier that was computed at template definition time.
  ErrorRecoveryLookup | Specifies if the method is called to improve error recovery and what kind of recovery is performed.
  IsCorrectedToColon | If not null, suggestion of replace '::' -> ':' are allowed. The bool value pointed by this parameter is set to 'true' if the identifier is treated as if it was followed by ':', not '::'.
  OnlyNamespace | If true, only considers namespaces in lookup.

This routine differs only slightly from ActOnCXXNestedNameSpecifier, in that it contains an extra parameter `ScopeLookupResult`, which provides the result of name lookup within the scope of the nested-name-specifier that was computed at template definition time.

If ErrorRecoveryLookup is true, then this call is used to improve error recovery. This means that it should not emit diagnostics, it should just return true on failure. It also means it should only return a valid scope if it knows that the result is correct. It should not return in a dependent context, for example. Nor will it extend `SS` with the scope specifier.

Definition at line 483 of file SemaCXXScopeSpec.cpp.

## ◆ BuildCXXNew()

ExprResult Sema::BuildCXXNew | ( | SourceRange | Range,
|  | bool | UseGlobal,
|  | SourceLocation | PlacementLParen,
|  | MultiExprArg | PlacementArgs,
|  | SourceLocation | PlacementRParen,
|  | SourceRange | TypeIdParens,
|  | QualType | AllocType,
|  | TypeSourceInfo * | AllocTypeInfo,
|  | Optional< Expr *> | ArraySize,
|  | SourceRange | DirectInitRange,
|  | Expr * | Initializer
| ) |  |

Definition at line 1771 of file SemaExprCXX.cpp.

References clang::CXXNewExpr::CallInit, clang::SourceRange::getBegin(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Initializer, Inits, clang::SourceRange::isValid(), clang::CXXNewExpr::ListInit, and clang::CXXNewExpr::NoInit.

## ◆ BuildCXXNoexceptExpr()

ExprResult Sema::BuildCXXNoexceptExpr | ( | SourceLocation | KeyLoc,
|  | Expr * | Operand,
|  | SourceLocation | RParen
| ) |  |

Definition at line 7485 of file SemaExprCXX.cpp.

References clang::ASTContext::BoolTy, canThrow(), CanThrow(), CheckPlaceholderExpr(), CheckUnevaluatedOperand(), Context, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Expr::HasSideEffects(), inTemplateInstantiation(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

Referenced by ActOnNoexceptExpr(), and clang::TreeTransform< Derived >::RebuildCXXNoexceptExpr().

## ◆ BuildCXXThisExpr()

Expr * Sema::BuildCXXThisExpr | ( | SourceLocation | Loc,
|  | QualType | Type,
|  | bool | IsImplicit
| ) |  |

Build a CXXThisExpr and mark it referenced in the current context.

Definition at line 1269 of file SemaExprCXX.cpp.

References Context, MarkThisReferenced(), and clang::interp::This().

Referenced by ActOnCXXThis().

## ◆ BuildCXXThrow()

ExprResult Sema::BuildCXXThrow | ( | SourceLocation | OpLoc,
|  | Expr * | Ex,
|  | bool | IsThrownVarInScope
| ) |  |

Definition at line 758 of file SemaExprCXX.cpp.

References clang::CUDA, Diag(), and clang::Expr::isTypeDependent().

## ◆ BuildCXXTypeConstructExpr()

ExprResult Sema::BuildCXXTypeConstructExpr | ( | TypeSourceInfo * | Type,
|  | SourceLocation | LParenLoc,
|  | MultiExprArg | Exprs,
|  | SourceLocation | RParenLoc,
|  | bool | ListInitialization
| ) |  |

Definition at line 1322 of file SemaExprCXX.cpp.

References BuildCXXFunctionalCastExpr(), Context, clang::CXXUnresolvedConstructExpr::Create(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::InitializationKind::CreateValue(), DeduceTemplateSpecializationFromInitializer(), Diag(), clang::ExprError(), clang::ASTContext::getBaseElementType(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::Type::getContainedDeducedType(), clang::SourceRange::getEnd(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Expr::hasAnyTypeDependentArguments(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isVoidType(), clang::InitializationSequence::Perform(), RequireCompleteType(), and clang::Result.

Referenced by ActOnCXXTypeConstructExpr().

## ◆ BuildCXXTypeId() [1/2]

ExprResult Sema::BuildCXXTypeId | ( | QualType | TypeInfoType,
|  | SourceLocation | TypeidLoc,
|  | TypeSourceInfo * | Operand,
|  | SourceLocation | RParenLoc
| ) |  |

Build a C++ typeid expression with a type operand.

Definition at line 437 of file SemaExprCXX.cpp.

## ◆ BuildCXXTypeId() [2/2]

ExprResult Sema::BuildCXXTypeId | ( | QualType | TypeInfoType,
|  | SourceLocation | TypeidLoc,
|  | Expr * | Operand,
|  | SourceLocation | RParenLoc
| ) |  |

Build a C++ typeid expression with an expression operand.

Definition at line 465 of file SemaExprCXX.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getType(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPlaceholderType(), clang::CXXRecordDecl::isPolymorphic(), and clang::Expr::isTypeDependent().

## ◆ BuildCXXUuidof() [1/2]

ExprResult Sema::BuildCXXUuidof | ( | QualType | TypeInfoType,
|  | SourceLocation | TypeidLoc,
|  | TypeSourceInfo * | Operand,
|  | SourceLocation | RParenLoc
| ) |  |

Build a Microsoft __uuidof expression with a type operand.

Definition at line 628 of file SemaExprCXX.cpp.

References Diag(), clang::ExprError(), clang::TypeSourceInfo::getType(), getUuidAttrOfType(), and clang::Type::isDependentType().

## ◆ BuildCXXUuidof() [2/2]

ExprResult Sema::BuildCXXUuidof | ( | QualType | TypeInfoType,
|  | SourceLocation | TypeidLoc,
|  | Expr * | Operand,
|  | SourceLocation | RParenLoc
| ) |  |

Build a Microsoft __uuidof expression with an expression operand.

Definition at line 648 of file SemaExprCXX.cpp.

References clang::Expr::getType(), clang::Type::isDependentType(), and clang::Expr::isNullPointerConstant().

## ◆ BuildDeclarationNameExpr() [1/2]

ExprResult Sema::BuildDeclarationNameExpr | ( | const CXXScopeSpec & | SS,
|  | LookupResult & | R,
|  | bool | NeedsADL,
|  | bool | AcceptInvalidDecl = `false`
| ) |  |

Definition at line 3036 of file SemaExpr.cpp.

References CheckDeclInExpr(), clang::UnresolvedLookupExpr::Create(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::LookupResult::getFoundDecl(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNameLoc(), clang::LookupResult::getRepresentativeDecl(), clang::LookupResult::isSingleResult(), ShouldLookupResultBeMultiVersionOverload(), and clang::LookupResult::suppressDiagnostics().

Referenced by attemptRecovery(), BuildRecoveryCallExpr(), checkTupleLikeDecomposition(), diagReturnOnAllocFailure(), and isTupleLike().

## ◆ BuildDeclarationNameExpr() [2/2]

ExprResult Sema::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.

Definition at line 3075 of file SemaExpr.cpp.

References CheckDeclInExpr(), clang::CPlusPlus, Diag(), diagnoseUncapturableValueReference(), clang::ExprError(), clang::XRayInstrKind::Function, clang::Type::getAs(), clang::Decl::getKind(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::CXXScopeSpec::getRange(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::QualType::hasQualifiers(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Type::isVoidType(), clang::VK_LValue, and clang::VK_RValue.

## ◆ BuildDeclaratorGroup()

Sema::DeclGroupPtrTy Sema::BuildDeclaratorGroup | ( | MutableArrayRef< Decl *> | Group | ) |

BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necessary semantic checking.

Definition at line 13016 of file SemaDecl.cpp.

References clang::Type::getContainedDeducedType(), clang::DeducedType::getDeducedType(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), and clang::QualType::isNull().

Referenced by ActOnFinishObjCImplementation(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), and clang::Parser::ParseTopLevelDecl().

## ◆ BuildDeclRefExpr() [1/3]

DeclRefExpr * Sema::BuildDeclRefExpr | ( | ValueDecl * | D,
|  | QualType | Ty,
|  | ExprValueKind | VK,
|  | SourceLocation | Loc,
|  | const CXXScopeSpec * | SS = `nullptr`
| ) |  |

Definition at line 1868 of file SemaExpr.cpp.

References clang::NamedDecl::getDeclName().

Referenced by buildDeclareReductionRef(), buildMemcpyForAssignmentOp(), buildUserDefinedMapperRef(), CheckConditionVariable(), checkMemberDecomposition(), checkTupleLikeDecomposition(), diagReturnOnAllocFailure(), and noteMemberDeclaredHere().

## ◆ BuildDeclRefExpr() [2/3]

DeclRefExpr * Sema::BuildDeclRefExpr | ( | ValueDecl * | D,
|  | QualType | Ty,
|  | ExprValueKind | VK,
|  | const DeclarationNameInfo & | NameInfo,
|  | const CXXScopeSpec * | SS = `nullptr`,
|  | NamedDecl * | FoundD = `nullptr`,
|  | SourceLocation | TemplateKWLoc = `SourceLocation()`,
|  | const TemplateArgumentListInfo * | TemplateArgs = `nullptr`
| ) |  |

Definition at line 1876 of file SemaExpr.cpp.

References clang::CXXScopeSpec::getWithLocInContext().

## ◆ BuildDeclRefExpr() [3/3]

DeclRefExpr * Sema::BuildDeclRefExpr | ( | 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.

Definition at line 1911 of file SemaExpr.cpp.

References clang::DeclRefExpr::Create(), and clang::DeclarationNameInfo::getLoc().

## ◆ BuildDecltypeType()

QualType Sema::BuildDecltypeType | ( | Expr * | E,
|  | SourceLocation | Loc,
|  | bool | AsUnevaluated = `true`
| ) |  |

If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building a type for decltype(auto).

Definition at line 8471 of file SemaType.cpp.

References clang::Expr::hasPlaceholderType(), and clang::Expr::HasSideEffects().

Referenced by ActOnCXXNestedNameSpecifierDecltype(), and ActOnPseudoDestructorExpr().

## ◆ BuildDelegatingInitializer()

MemInitResult Sema::BuildDelegatingInitializer | ( | TypeSourceInfo * | TInfo,
|  | Expr * | Init,
|  | CXXRecordDecl * | ClassDecl
| ) |  |

Definition at line 4321 of file SemaDeclCXX.cpp.

References clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::Stmt::getEndLoc(), clang::TypeLoc::getLocalSourceRange(), clang::Stmt::getSourceRange(), clang::TypeDecl::getTypeForDecl(), clang::TypeSourceInfo::getTypeLoc(), clang::InitializedEntity::InitializeDelegation(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ BuildDependentDeclRefExpr()

ExprResult Sema::BuildDependentDeclRefExpr | ( | const CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | const DeclarationNameInfo & | NameInfo,
|  | const TemplateArgumentListInfo * | TemplateArgs
| ) |  |

Definition at line 715 of file SemaTemplate.cpp.

References clang::CXXScopeSpec::getWithLocInContext().

## ◆ BuildEmptyCXXFoldExpr()

ExprResult Sema::BuildEmptyCXXFoldExpr | ( | SourceLocation | EllipsisLoc,
|  | BinaryOperatorKind | Operator
| ) |  |

Definition at line 1216 of file SemaTemplateVariadic.cpp.

## ◆ BuildExceptionDeclaration()

VarDecl * Sema::BuildExceptionDeclaration | ( | Scope * | S,
|  | TypeSourceInfo * | TInfo,
|  | SourceLocation | StartLoc,
|  | SourceLocation | Loc,
|  | IdentifierInfo * | Name
| ) |  |

Perform semantic analysis for the variable declaration that occurs within a C++ catch clause, returning the newly-created variable.

Definition at line 15400 of file SemaDeclCXX.cpp.

## ◆ BuildExpressionFromDeclTemplateArgument()

ExprResult Sema::BuildExpressionFromDeclTemplateArgument | ( | const TemplateArgument & | Arg,
|  | QualType | ParamType,
|  | SourceLocation | Loc
| ) |  |

Given a non-type template argument that refers to a declaration and the type of its corresponding non-type template parameter, produce an expression that properly refers to that declaration.

Definition at line 7207 of file SemaTemplate.cpp.

References clang::Type::isArrayType().

## ◆ BuildExpressionFromIntegralTemplateArgument()

ExprResult Sema::BuildExpressionFromIntegralTemplateArgument | ( | const TemplateArgument & | Arg,
|  | SourceLocation | Loc
| ) |  |

Construct a new expression that refers to the given integral template argument with the given source-location information.

This routine takes care of the mapping from an integral template argument (which may have any integral type) to the appropriate literal value.

Definition at line 7312 of file SemaTemplate.cpp.

References clang::CharacterLiteral::Ascii, clang::Type::getAs(), clang::TemplateArgument::getIntegralType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::Integral, clang::Type::isAnyCharacterType(), clang::Type::isChar16Type(), clang::Type::isChar32Type(), clang::Type::isChar8Type(), clang::Type::isWideCharType(), clang::CharacterLiteral::UTF16, clang::CharacterLiteral::UTF32, clang::CharacterLiteral::UTF8, and clang::CharacterLiteral::Wide.

## ◆ BuildExpressionTrait()

ExprResult Sema::BuildExpressionTrait | ( | ExpressionTrait | OET,
|  | SourceLocation | KWLoc,
|  | Expr * | Queried,
|  | SourceLocation | RParen
| ) |  |

Definition at line 5406 of file SemaExprCXX.cpp.

References clang::ASTContext::BoolTy, CheckPlaceholderExpr(), Context, EvaluateExpressionTrait(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPlaceholderType(), and clang::Expr::isTypeDependent().

Referenced by ActOnExpressionTrait().

## ◆ BuildExprRequirement() [1/2]

concepts::ExprRequirement * Sema::BuildExprRequirement | ( | Expr * | E,
|  | bool | IsSatisfied,
|  | SourceLocation | NoexceptLoc,
|  | concepts::ExprRequirement::ReturnTypeRequirement | ReturnTypeRequirement
| ) |  |

Definition at line 8418 of file SemaExprCXX.cpp.

Referenced by ActOnCompoundRequirement(), ActOnSimpleRequirement(), and clang::TreeTransform< Derived >::RebuildExprRequirement().

## ◆ BuildExprRequirement() [2/2]

concepts::ExprRequirement * Sema::BuildExprRequirement | ( | concepts::Requirement::SubstitutionDiagnostic * | ExprSubstDiag,
|  | bool | IsSatisfied,
|  | SourceLocation | NoexceptLoc,
|  | concepts::ExprRequirement::ReturnTypeRequirement | ReturnTypeRequirement
| ) |  |

Definition at line 8462 of file SemaExprCXX.cpp.

References Context.

## ◆ BuildExtVectorType()

QualType Sema::BuildExtVectorType | ( | QualType | T,
|  | Expr * | ArraySize,
|  | SourceLocation | AttrLoc
| ) |  |

Build an ext-vector type.

Run the required checks for the extended vector type.

Definition at line 2456 of file SemaType.cpp.

References Diag(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegerType(), clang::Type::isRealFloatingType(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().

Referenced by HandleExtVectorTypeAttr().

## ◆ BuildFieldReferenceExpr()

ExprResult Sema::BuildFieldReferenceExpr | ( | Expr * | BaseExpr,
|  | bool | IsArrow,
|  | SourceLocation | OpLoc,
|  | const CXXScopeSpec & | SS,
|  | FieldDecl * | Field,
|  | DeclAccessPair | FoundDecl,
|  | const DeclarationNameInfo & | MemberNameInfo
| ) |  |

Definition at line 1768 of file SemaExprMember.cpp.

Referenced by checkMemberDecomposition().

## ◆ BuildForRangeBeginEndCall()

Sema::ForRangeStatus Sema::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.

If the given LookupResult is non-empty, it is assumed to describe a member which will be invoked. Otherwise, the function will be found via argument dependent lookup. CallExpr is set to a valid expression and FRS_Success returned on success, otherwise CallExpr is set to ExprError() and some non-success value is returned.

Definition at line 14527 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::clear(), clang::OverloadCandidateSet::CSK_Normal, clang::LookupResult::empty(), and clang::Expr::getType().

Referenced by BuildNonArrayForRange().

## ◆ BuildFunctionType()

QualType Sema::BuildFunctionType | ( | QualType | T,
|  | MutableArrayRef< QualType > | ParamTypes,
|  | SourceLocation | Loc,
|  | DeclarationName | Entity,
|  | const FunctionProtoType::ExtProtoInfo & | EPI
| ) |  |

Build a function type.

This routine checks the function type according to C++ rules and under the assumption that the result type and parameter types have just been instantiated from a template. It therefore duplicates some of the behavior of GetTypeForDeclarator, but in a much simpler form that is only suitable for this narrow use case.

Parameters

  T | The return type of the function.
  ParamTypes | The parameter types of the function. This array will be modified to account for adjustments to the types of the function parameters.
  Loc | The location of the entity whose type involves this function type or, if there is no such entity, the location of the type that will have function type.
  Entity | The name of the entity that involves the function type, if known.
  EPI | Extra information about the function type. Usually this will be taken from an existing function with the same prototype.

Returns
  A suitable function type, if there are no errors. The unqualified type will always be a FunctionProtoType. Otherwise, returns a NULL type.

Definition at line 2594 of file SemaType.cpp.

## ◆ BuildIfStmt()

StmtResult Sema::BuildIfStmt | ( | SourceLocation | IfLoc,
|  | bool | IsConstexpr,
|  | Stmt * | InitStmt,
|  | ConditionResult | Cond,
|  | Stmt * | ThenVal,
|  | SourceLocation | ElseLoc,
|  | Stmt * | ElseVal
| ) |  |

Definition at line 589 of file SemaStmt.cpp.

References clang::IfStmt::Create(), clang::Sema::ConditionResult::get(), clang::Sema::ConditionResult::isInvalid(), and clang::StmtError().

## ◆ BuildImplicitMemberExpr()

ExprResult Sema::BuildImplicitMemberExpr | ( | const CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | LookupResult & | R,
|  | const TemplateArgumentListInfo * | TemplateArgs,
|  | bool | IsKnownInstance,
|  | const Scope * | S
| ) |  |

Builds an implicit member access expression.

The current context is known to be an instance method, and the given unqualified lookup set is known to contain only instance members, at least one of which is from an appropriate type.

Definition at line 1846 of file SemaExprMember.cpp.

References clang::LookupResult::empty(), clang::SourceRange::getBegin(), clang::LookupResult::getNameLoc(), clang::CXXScopeSpec::getRange(), clang::LookupResult::isAmbiguous(), clang::QualType::isNull(), and clang::SourceRange::isValid().

## ◆ BuildInitList()

ExprResult Sema::BuildInitList | ( | SourceLocation | LBraceLoc,
|  | MultiExprArg | InitArgList,
|  | SourceLocation | RBraceLoc
| ) |  |

Definition at line 6340 of file SemaExpr.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

Referenced by clang::TreeTransform< Derived >::RebuildInitList().

## ◆ BuildInstanceMessage()

ExprResult Sema::BuildInstanceMessage | ( | Expr * | Receiver,
|  | QualType | ReceiverType,
|  | SourceLocation | SuperLoc,
|  | Selector | Sel,
|  | ObjCMethodDecl * | Method,
|  | SourceLocation | LBracLoc,
|  | ArrayRef< SourceLocation > | SelectorLocs,
|  | SourceLocation | RBracLoc,
|  | MultiExprArg | ArgsIn,
|  | bool | isImplicit = `false`
| ) |  |

Build an Objective-C instance message expression.

This routine takes care of both normal instance messages and instance messages to the superclass instance.

Parameters

  Receiver | The expression that computes the object that will receive this message. This may be empty, in which case we are sending to the superclass instance and `SuperLoc` must be a valid source location.
  ReceiverType | The (static) type of the object receiving the message. When a `Receiver` expression is provided, this is the same type as that expression. For a superclass instance send, this is a pointer to the type of the superclass.
  SuperLoc | The location of the "super" keyword in a superclass instance message.
  Sel | The selector to which the message is being sent.
  Method | The method that this instance message is invoking, if already known.
  LBracLoc | The location of the opening square bracket ']'.
  RBracLoc | The location of the closing square bracket ']'.
  ArgsIn | The message arguments.

Definition at line 2702 of file SemaExprObjC.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::SourceLocation::isInvalid(), and clang::SourceLocation::isValid().

Referenced by clang::TreeTransform< Derived >::RebuildObjCMessageExpr().

## ◆ BuildInstanceMessageImplicit()

ExprResult Sema::BuildInstanceMessageImplicit | ( | Expr * | Receiver,
|  | QualType | ReceiverType,
|  | SourceLocation | Loc,
|  | Selector | Sel,
|  | ObjCMethodDecl * | Method,
|  | MultiExprArg | Args
| ) |  |

Definition at line 2644 of file SemaExprObjC.cpp.

Referenced by LookupMethodInReceiverType().

## ◆ BuildIvarRefExpr()

ExprResult Sema::BuildIvarRefExpr | ( | Scope * | S,
|  | SourceLocation | Loc,
|  | ObjCIvarDecl * | IV
| ) |  |

Definition at line 2680 of file SemaExpr.cpp.

References clang::ExprError(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMethodDecl::isInstanceMethod(), and clang::Decl::isInvalidDecl().

## ◆ BuildLambdaExpr()

ExprResult Sema::BuildLambdaExpr | ( | SourceLocation | StartLoc,
|  | SourceLocation | EndLoc,
|  | sema::LambdaScopeInfo * | LSI
| ) |  |

Complete a lambda-expression having processed and attached the lambda body.

Definition at line 1652 of file SemaLambda.cpp.

References addBlockPointerConversion(), addFunctionPointerConversion(), clang::sema::LambdaScopeInfo::CallOperator, clang::sema::LambdaScopeInfo::CaptureDefaultLoc, clang::sema::CapturingScopeInfo::Captures, clang::sema::LambdaScopeInfo::Cleanup, clang::sema::LambdaScopeInfo::ContainsUnexpandedParameterPack, clang::LambdaExpr::Create(), clang::FixItHint::CreateInsertion(), Diag(), clang::sema::LambdaScopeInfo::ExplicitCaptureRanges, clang::sema::LambdaScopeInfo::ExplicitParams, clang::ExprError(), clang::RecordDecl::fields(), clang::SourceRange::getBegin(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::sema::Capture::getEllipsisLoc(), clang::SourceRange::getEnd(), clang::Decl::getLocation(), clang::sema::Capture::getLocation(), clang::sema::Capture::getVariable(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::if(), clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::sema::LambdaScopeInfo::IntroducerRange, clang::sema::Capture::isBlockCapture(), clang::sema::Capture::isCopyCapture(), clang::CXXRecordDecl::isGenericLambda(), clang::sema::Capture::isInitCapture(), clang::sema::Capture::isInvalid(), clang::sema::Capture::isNonODRUsed(), clang::sema::Capture::isODRUsed(), clang::sema::Capture::isThisCapture(), clang::SourceRange::isValid(), clang::sema::Capture::isVariableCapture(), clang::sema::Capture::isVLATypeCapture(), clang::sema::LambdaScopeInfo::Lambda, clang::LCD_ByCopy, clang::LCD_None, clang::LCK_ByCopy, clang::LCK_ByRef, clang::LCK_StarThis, clang::LCK_This, clang::LCK_VLAType, mapImplicitCaptureStyle(), clang::sema::LambdaScopeInfo::NumExplicitCaptures, and clang::Decl::setLexicalDeclContext().

## ◆ buildLambdaInitCaptureInitialization()

QualType Sema::buildLambdaInitCaptureInitialization | ( | SourceLocation | Loc,
|  | bool | ByRef,
|  | SourceLocation | EllipsisLoc,
|  | Optional< unsigned > | NumExpansions,
|  | IdentifierInfo * | Id,
|  | bool | DirectInit,
|  | Expr *& | Init
| ) |  |

Definition at line 786 of file SemaLambda.cpp.

## ◆ buildLambdaScope()

void Sema::buildLambdaScope | ( | sema::LambdaScopeInfo * | LSI,
|  | CXXMethodDecl * | CallOperator,
|  | SourceRange | IntroducerRange,
|  | LambdaCaptureDefault | CaptureDefault,
|  | SourceLocation | CaptureDefaultLoc,
|  | bool | ExplicitParams,
|  | bool | ExplicitResultType,
|  | bool | Mutable
| ) |  |

Endow the lambda scope info with the relevant properties.

Definition at line 482 of file SemaLambda.cpp.

References clang::sema::LambdaScopeInfo::CallOperator, clang::sema::LambdaScopeInfo::CaptureDefaultLoc, clang::sema::LambdaScopeInfo::ExplicitParams, clang::DeclaratorDecl::getBeginLoc(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::sema::LambdaScopeInfo::IntroducerRange, clang::Type::isDependentType(), clang::Type::isVoidType(), clang::sema::LambdaScopeInfo::Lambda, clang::LCD_ByCopy, clang::LCD_ByRef, clang::sema::LambdaScopeInfo::Mutable, and clang::sema::CapturingScopeInfo::ReturnType.

## ◆ BuildLiteralOperatorCall()

ExprResult Sema::BuildLiteralOperatorCall | ( | LookupResult & | R,
|  | DeclarationNameInfo & | SuffixInfo,
|  | ArrayRef< Expr *> | Args,
|  | SourceLocation | LitEndLoc,
|  | TemplateArgumentListInfo * | TemplateArgs = `nullptr`
| ) |  |

BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to a literal operator described by the provided lookup results.

Definition at line 14444 of file SemaOverload.cpp.

References clang::LookupResult::asUnresolvedSet(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Normal, clang::ExprError(), clang::DeclarationNameInfo::getCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::getInfo(), clang::DeclarationNameInfo::getLoc(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, and clang::OR_Success.

Referenced by BuildCookedLiteralOperatorCall().

## ◆ BuildMemberExpr() [1/2]

MemberExpr * Sema::BuildMemberExpr | ( | 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`
| ) |  |

Definition at line 896 of file SemaExprMember.cpp.

## ◆ BuildMemberExpr() [2/2]

MemberExpr * Sema::BuildMemberExpr | ( | 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`
| ) |  |

Definition at line 909 of file SemaExprMember.cpp.

## ◆ BuildMemberInitializer()

MemInitResult Sema::BuildMemberInitializer | ( | ValueDecl * | Member,
|  | Expr * | Init,
|  | SourceLocation | IdLoc
| ) |  |

Definition at line 4245 of file SemaDeclCXX.cpp.

References clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::SourceRange::getEnd(), clang::Stmt::getEndLoc(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::InitializedEntity::InitializeMember(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), and clang::Expr::isTypeDependent().

## ◆ BuildMemberPointerType()

QualType Sema::BuildMemberPointerType | ( | QualType | T,
|  | QualType | Class,
|  | SourceLocation | Loc,
|  | DeclarationName | Entity
| ) |  |

Build a member pointer type `T` Class::*.

Parameters

  T | the type to which the member pointer refers.
  Class | the class type into which the member pointer points.
  Loc | the location where this type begins
  Entity | the name of the entity that will have this member pointer type

Returns
  a member pointer type, if successful, or a NULL type if there was an error.

Definition at line 2648 of file SemaType.cpp.

References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, Diag(), clang::DeclarationName::getNameKind(), getPrintableNameForEntity(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isRecordType(), clang::Type::isReferenceType(), and clang::Type::isVoidType().

## ◆ BuildMemberReferenceExpr() [1/2]

ExprResult Sema::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`
| ) |  |

Definition at line 744 of file SemaExprMember.cpp.

References clang::ExprError(), clang::Type::getAs(), clang::Type::isDependentType(), clang::CXXScopeSpec::isSet(), and LookupMemberExprInRecord().

Referenced by BuildImplicitMemberInitializer(), checkTupleLikeDecomposition(), clang::TreeTransform< Derived >::RebuildCXXDependentScopeMemberExpr(), and clang::TreeTransform< Derived >::RebuildUnresolvedMemberExpr().

## ◆ BuildMemberReferenceExpr() [2/2]

ExprResult Sema::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`
| ) |  |

Definition at line 972 of file SemaExprMember.cpp.

References clang::Type::castAs(), clang::UnresolvedMemberExpr::Create(), clang::FixItHint::CreateReplacement(), Diag(), clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclarationNameInfo::getLoc(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getNameLoc(), clang::Stmt::getSourceRange(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Sema::ActOnMemberAccessExtraArgs::Id, clang::Expr::IgnoreImpCasts(), clang::LookupResult::isAmbiguous(), IsInFnTryBlockHandler(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::LookupResult::isOverloadedResult(), clang::Type::isPointerType(), clang::Expr::isRValue(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isUnresolvableResult(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Sema::ActOnMemberAccessExtraArgs::ObjCImpDecl, clang::Sema::ActOnMemberAccessExtraArgs::S, clang::LookupResult::setBaseObjectType(), and clang::LookupResult::suppressDiagnostics().

## ◆ BuildMemInitializer()

MemInitResult Sema::BuildMemInitializer | ( | Decl * | ConstructorD,
|  | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | IdentifierInfo * | MemberOrBase,
|  | ParsedType | TemplateTypeTy,
|  | const DeclSpec & | DS,
|  | SourceLocation | IdLoc,
|  | Expr * | Init,
|  | SourceLocation | EllipsisLoc
| ) |  |

Handle a C++ member initializer.

Definition at line 4073 of file SemaDeclCXX.cpp.

References Diag(), clang::ETK_None, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::LookupResult::getAsSingle(), clang::SourceRange::getEnd(), clang::CXXMethodDecl::getParent(), clang::DeclSpec::getRepAsExpr(), clang::Stmt::getSourceRange(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isAmbiguous(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceLocation::isValid(), clang::LookupResult::suppressDiagnostics(), clang::TST_decltype, and clang::TST_decltype_auto.

## ◆ BuildMicrosoftCAnonymousStruct()

Decl * Sema::BuildMicrosoftCAnonymousStruct | ( | Scope * | S,
|  | DeclSpec & | DS,
|  | RecordDecl * | Record
| ) |  |

BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure.

Ref: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx Example:

struct A { int a; }; struct B { struct A; int b; };

void foo() { B var; var.a = 3; }

Definition at line 5116 of file SemaDecl.cpp.

## ◆ BuildModuleInclude()

void Sema::BuildModuleInclude | ( | SourceLocation | DirectiveLoc,
|  | Module * | Mod
| ) |  |

Definition at line 409 of file SemaModule.cpp.

References clang::ImportDecl::CreateImplicit(), clang::Decl::getTranslationUnitDecl(), and clang::TU_Module.

## ◆ BuildMSDependentExistsStmt()

StmtResult Sema::BuildMSDependentExistsStmt | ( | SourceLocation | KeywordLoc,
|  | bool | IsIfExists,
|  | NestedNameSpecifierLoc | QualifierLoc,
|  | DeclarationNameInfo | NameInfo,
|  | Stmt * | Nested
| ) |  |

Definition at line 4248 of file SemaStmt.cpp.

## ◆ BuildNestedRequirement() [1/2]

concepts::NestedRequirement * Sema::BuildNestedRequirement | ( | Expr * | E | ) |

Definition at line 8487 of file SemaExprCXX.cpp.

References CheckConstraintSatisfaction(), Context, clang::Stmt::getSourceRange(), and clang::Expr::isInstantiationDependent().

Referenced by ActOnNestedRequirement(), and clang::TreeTransform< Derived >::RebuildNestedRequirement().

## ◆ BuildNestedRequirement() [2/2]

concepts::NestedRequirement * Sema::BuildNestedRequirement | ( | concepts::Requirement::SubstitutionDiagnostic * | SubstDiag | ) |

Definition at line 8498 of file SemaExprCXX.cpp.

References Context.

## ◆ BuildObjCArrayLiteral()

ExprResult Sema::BuildObjCArrayLiteral | ( | SourceRange | SR,
|  | MultiExprArg | Elements
| ) |  |

Definition at line 793 of file SemaExprObjC.cpp.

References clang::ExprError(), clang::SourceRange::getBegin(), LK_Array, and LookupObjCInterfaceDeclForLiteral().

## ◆ BuildObjCAtThrowStmt()

StmtResult Sema::BuildObjCAtThrowStmt | ( | SourceLocation | AtLoc,
|  | Expr * | Throw
| ) |  |

Definition at line 3870 of file SemaStmt.cpp.

References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjCObjectPointerType(), clang::Type::isVoidType(), and clang::StmtError().

## ◆ BuildObjCBoxedExpr()

ExprResult Sema::BuildObjCBoxedExpr | ( | SourceRange | SR,
|  | Expr * | ValueExpr
| ) |  |

BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression.

The type of the expression will either be "NSNumber *", "NSString *" or "NSValue *" depending on the type of ValueType, which is allowed to be a built-in numeric type, "char *", "const char *" or C structure with attribute 'objc_boxable'.

Definition at line 500 of file SemaExprObjC.cpp.

References clang::Expr::isTypeDependent().

## ◆ BuildObjCBridgedCast()

ExprResult Sema::BuildObjCBridgedCast | ( | SourceLocation | LParenLoc,
|  | ObjCBridgeCastKind | Kind,
|  | SourceLocation | BridgeKeywordLoc,
|  | TypeSourceInfo * | TSInfo,
|  | Expr * | SubExpr
| ) |  |

Definition at line 4486 of file SemaExprObjC.cpp.

References clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateReplacement(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::Type::isBlockPointerType(), clang::Type::isCARCBridgableType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjCARCBridgableType(), clang::Expr::isTypeDependent(), maybeUndoReclaimObject(), clang::OBC_Bridge, clang::OBC_BridgeRetained, and clang::OBC_BridgeTransfer.

## ◆ BuildObjCDictionaryLiteral()

ExprResult Sema::BuildObjCDictionaryLiteral | ( | SourceRange | SR,
|  | MutableArrayRef< ObjCDictionaryElement > | Elements
| ) |  |

Definition at line 897 of file SemaExprObjC.cpp.

References clang::ExprError(), clang::SourceRange::getBegin(), LK_Dictionary, and LookupObjCInterfaceDeclForLiteral().

## ◆ BuildObjCEncodeExpression()

ExprResult Sema::BuildObjCEncodeExpression | ( | SourceLocation | AtLoc,
|  | TypeSourceInfo * | EncodedTypeInfo,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 1072 of file SemaExprObjC.cpp.

References clang::TypeSourceInfo::getType(), and clang::Type::isDependentType().

Referenced by clang::TreeTransform< Derived >::RebuildObjCEncodeExpr().

## ◆ BuildObjCExceptionDecl()

VarDecl * Sema::BuildObjCExceptionDecl | ( | TypeSourceInfo * | TInfo,
|  | QualType | ExceptionType,
|  | SourceLocation | StartLoc,
|  | SourceLocation | IdLoc,
|  | IdentifierInfo * | Id,
|  | bool | Invalid = `false`
| ) |  |

Build a type-check a new Objective-C exception variable declaration.

Definition at line 5022 of file SemaDeclObjC.cpp.

References clang::Type::castAs(), clang::VarDecl::Create(), CurContext, clang::Default, Diag(), clang::QualType::getAddressSpace(), clang::ObjCObjectPointerType::getInterfaceType(), getLangOpts(), inferObjCARCLifetime(), clang::Type::isDependentType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedIdType(), clang::SC_None, clang::VarDecl::setExceptionVariable(), and clang::Decl::setInvalidDecl().

## ◆ BuildObjCNumericLiteral()

ExprResult Sema::BuildObjCNumericLiteral | ( | SourceLocation | AtLoc,
|  | Expr * | Number
| ) |  |

BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression.

Type of the expression will be "NSNumber *" or "id" if NSNumber is unavailable.

Type of the expression will be "NSNumber *".

Definition at line 316 of file SemaExprObjC.cpp.

References clang::CharacterLiteral::Ascii, clang::Expr::getType(), and clang::CharacterLiteral::UTF8.

Referenced by CheckObjCCollectionLiteralElement().

## ◆ BuildObjCObjectType()

QualType Sema::BuildObjCObjectType | ( | QualType | BaseType,
|  | SourceLocation | Loc,
|  | SourceLocation | TypeArgsLAngleLoc,
|  | ArrayRef< TypeSourceInfo *> | TypeArgs,
|  | SourceLocation | TypeArgsRAngleLoc,
|  | SourceLocation | ProtocolLAngleLoc,
|  | ArrayRef< ObjCProtocolDecl *> | Protocols,
|  | ArrayRef< SourceLocation > | ProtocolLocs,
|  | SourceLocation | ProtocolRAngleLoc,
|  | bool | FailOnError = `false`
| ) |  |

Build an Objective-C object pointer type.

Definition at line 1063 of file SemaType.cpp.

References applyObjCTypeArgs(), clang::QualType::isNull(), and clang::Result.

## ◆ BuildObjCStringLiteral()

ExprResult Sema::BuildObjCStringLiteral | ( | SourceLocation | AtLoc,
|  | StringLiteral * | S
| ) |  |

Definition at line 81 of file SemaExprObjC.cpp.

Referenced by CheckObjCCollectionLiteralElement().

## ◆ BuildObjCSubscriptExpression()

ExprResult Sema::BuildObjCSubscriptExpression | ( | SourceLocation | RB,
|  | Expr * | BaseExpr,
|  | Expr * | IndexExpr,
|  | ObjCMethodDecl * | getterMethod,
|  | ObjCMethodDecl * | setterMethod
| ) |  |

Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime.

Definition at line 763 of file SemaExprObjC.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Expr::isTypeDependent().

## ◆ BuildObjCTypeParamType()

QualType Sema::BuildObjCTypeParamType | ( | const ObjCTypeParamDecl * | Decl,
|  | SourceLocation | ProtocolLAngleLoc,
|  | ArrayRef< ObjCProtocolDecl *> | Protocols,
|  | ArrayRef< SourceLocation > | ProtocolLocs,
|  | SourceLocation | ProtocolRAngleLoc,
|  | bool | FailOnError = `false`
| ) |  |

Build an Objective-C type parameter type.

Definition at line 1040 of file SemaType.cpp.

References clang::TypeDecl::getTypeForDecl(), and clang::Result.

## ◆ BuildOverloadedArrowExpr()

ExprResult Sema::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.

Definition at line 14328 of file SemaOverload.cpp.

References checkPlaceholderForOverload(), clang::ExprError(), clang::Expr::getExprLoc(), clang::Expr::getType(), and clang::Type::isRecordType().

## ◆ BuildOverloadedCallExpr()

ExprResult Sema::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.

If overload resolution succeeds, returns the call expression produced by overload resolution. Otherwise, emits diagnostics and returns ExprError.

Definition at line 12814 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::CSK_Normal, FinishOverloadedCallExpr(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), and markUnaddressableCandidatesUnviable().

## ◆ buildOverloadedCallSet()

bool Sema::buildOverloadedCallSet | ( | Scope * | S,
|  | Expr * | Fn,
|  | UnresolvedLookupExpr * | ULE,
|  | MultiExprArg | Args,
|  | SourceLocation | RParenLoc,
|  | OverloadCandidateSet * | CandidateSet,
|  | ExprResult * | Result
| ) |  |

Constructs and populates an OverloadedCandidateSet from the given function.

Returns
  true when an the ExprResult output parameter has been set.

Definition at line 12640 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::BestViableFunction(), checkArgPlaceholdersForOverload(), clang::CPlusPlus, clang::CallExpr::Create(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadCandidateSet::empty(), clang::ExprError(), clang::Stmt::getBeginLoc(), clang::OverloadExpr::getQualifier(), clang::Decl::isImplicit(), clang::OR_No_Viable_Function, and clang::UnresolvedLookupExpr::requiresADL().

## ◆ BuildParenType()

QualType Sema::BuildParenType | ( | QualType | T | ) |

Build a paren type including `T`.

Definition at line 1892 of file SemaType.cpp.

Referenced by clang::TreeTransform< Derived >::RebuildParenType().

## ◆ BuildParmVarDeclForTypedef()

ParmVarDecl * Sema::BuildParmVarDeclForTypedef | ( | DeclContext * | DC,
|  | SourceLocation | Loc,
|  | QualType | T
| ) |  |

Synthesizes a variable for a parameter arising from a typedef.

Definition at line 13238 of file SemaDecl.cpp.

References clang::ParmVarDecl::Create().

Referenced by clang::TemplateDeclInstantiator::SubstFunctionType().

## ◆ BuildPointerType()

QualType Sema::BuildPointerType | ( | QualType | T,
|  | SourceLocation | Loc,
|  | DeclarationName | Entity
| ) |  |

Build a pointer type.

Parameters

  T | The type to which we'll be building a pointer.
  Loc | The location of the entity whose type involves this pointer type or, if there is no such entity, the location of the type that will have pointer type.
  Entity | The name of the entity that involves the pointer type, if known.

Returns
  A suitable pointer type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 2038 of file SemaType.cpp.

References checkQualifiedFunction(), deduceOpenCLPointeeAddrSpace(), Diag(), getPrintableNameForEntity(), inferARCLifetimeForPointee(), clang::Type::isFunctionType(), clang::Type::isObjCObjectType(), and clang::Type::isReferenceType().

## ◆ BuildPossibleImplicitMemberExpr()

ExprResult Sema::BuildPossibleImplicitMemberExpr | ( | const CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | LookupResult & | R,
|  | const TemplateArgumentListInfo * | TemplateArgs,
|  | const Scope * | S
| ) |  |

Builds an expression which might be an implicit member expression.

Definition at line 235 of file SemaExprMember.cpp.

Referenced by attemptRecovery(), and BuildRecoveryCallExpr().

## ◆ BuildPredefinedExpr()

ExprResult Sema::BuildPredefinedExpr | ( | SourceLocation | Loc,
|  | PredefinedExpr::IdentKind | IK
| ) |  |

Definition at line 3320 of file SemaExpr.cpp.

References Diag().

## ◆ BuildPseudoDestructorExpr()

ExprResult Sema::BuildPseudoDestructorExpr | ( | Expr * | Base,
|  | SourceLocation | OpLoc,
|  | tok::TokenKind | OpKind,
|  | const CXXScopeSpec & | SS,
|  | TypeSourceInfo * | ScopeType,
|  | SourceLocation | CCLoc,
|  | SourceLocation | TildeLoc,
|  | PseudoDestructorTypeStorage | DestroyedType
| ) |  |

Definition at line 7137 of file SemaExprCXX.cpp.

References canRecoverDotPseudoDestructorCallsOnPointerObjects(), CheckArrow(), Context, clang::FixItHint::CreateReplacement(), Diag(), clang::ExprError(), clang::SourceRange::getBegin(), getLangOpts(), clang::TypeLoc::getLocalSourceRange(), clang::QualType::getObjCLifetime(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::PseudoDestructorTypeStorage::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isDependentType(), clang::Type::isPointerType(), clang::Type::isScalarType(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::Qualifiers::OCL_None, and clang::Result.

Referenced by ActOnPseudoDestructorExpr().

## ◆ BuildQualifiedDeclarationNameExpr()

ExprResult Sema::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.

There's a large number of things which don't need to be done along this path.

Definition at line 2527 of file SemaExpr.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::LookupResult::empty(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclarationNameInfo::getEndLoc(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getResultKind(), clang::CXXScopeSpec::getScopeRep(), clang::LookupResult::isAmbiguous(), and clang::LookupResult::NotFoundInCurrentInstantiation.

## ◆ BuildQualifiedTemplateIdExpr()

ExprResult Sema::BuildQualifiedTemplateIdExpr | ( | CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | const DeclarationNameInfo & | NameInfo,
|  | const TemplateArgumentListInfo * | TemplateArgs
| ) |  |

Definition at line 4533 of file SemaTemplate.cpp.

References Diag(), clang::LookupResult::empty(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::LookupResult::isAmbiguous(), and clang::SourceLocation::isValid().

## ◆ BuildQualifiedType() [1/2]

QualType Sema::BuildQualifiedType | ( | QualType | T,
|  | SourceLocation | Loc,
|  | Qualifiers | Qs,
|  | const DeclSpec * | DS = `nullptr`
| ) |  |

Definition at line 1800 of file SemaType.cpp.

References Diag(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::DeclSpec::getRestrictSpecLoc(), clang::Qualifiers::hasRestrict(), clang::Type::isAnyPointerType(), clang::Type::isDependentType(), clang::Type::isIncompleteOrObjectType(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isReferenceType(), clang::Qualifiers::removeConst(), clang::Qualifiers::removeRestrict(), and clang::Qualifiers::removeVolatile().

Referenced by checkMemberDecomposition().

## ◆ BuildQualifiedType() [2/2]

QualType Sema::BuildQualifiedType | ( | QualType | T,
|  | SourceLocation | Loc,
|  | unsigned | CVRA,
|  | const DeclSpec * | DS = `nullptr`
| ) |  |

Definition at line 1847 of file SemaType.cpp.

References clang::Qualifiers::addCVRQualifiers(), clang::Qualifiers::fromCVRMask(), clang::DeclSpec::getAtomicSpecLoc(), clang::QualType::getSplitUnqualifiedType(), clang::Type::isAtomicType(), clang::QualType::isNull(), clang::Type::isReferenceType(), clang::SplitQualType::Quals, clang::Qualifiers::setUnaligned(), Split, clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_unaligned, clang::DeclSpec::TQ_volatile, and clang::SplitQualType::Ty.

## ◆ BuildReadPipeType()

QualType Sema::BuildReadPipeType | ( | QualType | T,
|  | SourceLocation | Loc
| ) |  |

Build a Read-only Pipe type.

Parameters

  T | The type to which we'll be building a Pipe.
  Loc | We do not use it for now.

Returns
  A suitable pipe type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 2141 of file SemaType.cpp.

## ◆ BuildReferenceType()

QualType Sema::BuildReferenceType | ( | QualType | T,
|  | bool | SpelledAsLValue,
|  | SourceLocation | Loc,
|  | DeclarationName | Entity
| ) |  |

Build a reference type.

Parameters

  T | The type to which we'll be building a reference.
  Loc | The location of the entity whose type involves this reference type or, if there is no such entity, the location of the type that will have reference type.
  Entity | The name of the entity that involves the reference type, if known.

Returns
  A suitable reference type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 2081 of file SemaType.cpp.

Referenced by castForMoving(), CastForMoving(), and checkTupleLikeDecomposition().

## ◆ BuildResolvedCallExpr()

ExprResult Sema::BuildResolvedCallExpr | ( | Expr * | Fn,
|  | NamedDecl * | NDecl,
|  | SourceLocation | LParenLoc,
|  | ArrayRef< Expr *> | Args,
|  | SourceLocation | RParenLoc,
|  | Expr * | Config = `nullptr`,
|  | bool | IsExecConfig = `false`,
|  | ADLCallKind | UsesADL = `ADLCallKind::NotADL`
| ) |  |

BuildResolvedCallExpr - Build a call to a resolved expression, i.e.

an expression not of `OverloadTy`. The expression should unary-convert to an expression of function-pointer or block-pointer type.

Parameters

  NDecl | the declaration being called, if available

Definition at line 5911 of file SemaExpr.cpp.

References Diag(), clang::ExprError(), clang::FunctionDecl::getBuiltinID(), clang::Expr::getExprLoc(), and clang::Decl::hasAttr().

Referenced by FinishOverloadedCallExpr().

## ◆ BuildResolvedCoawaitExpr()

ExprResult Sema::BuildResolvedCoawaitExpr | ( | SourceLocation | KwLoc,
|  | Expr * | E,
|  | bool | IsImplicit = `false`
| ) |  |

Definition at line 751 of file SemaCoroutine.cpp.

References checkCoroutineContext(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Type::isPlaceholderType().

## ◆ BuildReturnStmt()

StmtResult Sema::BuildReturnStmt | ( | SourceLocation | ReturnLoc,
|  | Expr * | RetValExp
| ) |  |

Definition at line 3601 of file SemaStmt.cpp.

References Diag(), clang::Stmt::getSourceRange(), and clang::StmtError().

Referenced by diagReturnOnAllocFailure(), and noteMemberDeclaredHere().

## ◆ BuildSourceLocExpr()

ExprResult Sema::BuildSourceLocExpr | ( | SourceLocExpr::IdentKind | Kind,
|  | SourceLocation | BuiltinLoc,
|  | SourceLocation | RPLoc,
|  | DeclContext * | ParentContext
| ) |  |

Definition at line 14697 of file SemaExpr.cpp.

## ◆ BuildStaticAssertDeclaration()

Decl * Sema::BuildStaticAssertDeclaration | ( | SourceLocation | StaticAssertLoc,
|  | Expr * | AssertExpr,
|  | StringLiteral * | AssertMessageExpr,
|  | SourceLocation | RParenLoc,
|  | bool | Failed
| ) |  |

Definition at line 15592 of file SemaDeclCXX.cpp.

References CheckConstraintSatisfaction(), clang::StaticAssertDecl::Create(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Stmt::printPretty().

## ◆ BuildStdInitializerList()

QualType Sema::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.

Returns
  The instantiated template, or null on error.

Definition at line 10902 of file SemaDeclCXX.cpp.

References clang::TemplateArgumentListInfo::addArgument(), and LookupStdInitializerList().

## ◆ BuildSynthesizedThreeWayComparison()

ExprResult Sema::BuildSynthesizedThreeWayComparison | ( | SourceLocation | OpLoc,
|  | const UnresolvedSetImpl & | Fns,
|  | Expr * | LHS,
|  | Expr * | RHS,
|  | FunctionDecl * | DefaultedFn
| ) |  |

Definition at line 13497 of file SemaOverload.cpp.

## ◆ BuildTemplateIdExpr()

ExprResult Sema::BuildTemplateIdExpr | ( | const CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | LookupResult & | R,
|  | bool | RequiresADL,
|  | const TemplateArgumentListInfo * | TemplateArgs
| ) |  |

Definition at line 4471 of file SemaTemplate.cpp.

References clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::UnresolvedLookupExpr::Create(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::LookupResult::getFoundDecl(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNameLoc(), clang::LookupResult::isAmbiguous(), and clang::LookupResult::suppressDiagnostics().

Referenced by BuildRecoveryCallExpr().

## ◆ BuildTypeofExprType()

QualType Sema::BuildTypeofExprType | ( | Expr * | E,
|  | SourceLocation | Loc
| ) |  |

Definition at line 8387 of file SemaType.cpp.

References Diag(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::Expr::isTypeDependent(), and clang::Expr::refersToBitField().

## ◆ BuildTypeRequirement() [1/2]

concepts::TypeRequirement * Sema::BuildTypeRequirement | ( | TypeSourceInfo * | Type | ) |

Definition at line 8472 of file SemaExprCXX.cpp.

References Context.

Referenced by ActOnTypeRequirement(), and clang::TreeTransform< Derived >::RebuildTypeRequirement().

## ◆ BuildTypeRequirement() [2/2]

concepts::TypeRequirement * Sema::BuildTypeRequirement | ( | concepts::Requirement::SubstitutionDiagnostic * | SubstDiag | ) |

Definition at line 8477 of file SemaExprCXX.cpp.

References Context.

## ◆ BuildTypeTrait()

ExprResult Sema::BuildTypeTrait | ( | TypeTrait | Kind,
|  | SourceLocation | KWLoc,
|  | ArrayRef< TypeSourceInfo *> | Args,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 5045 of file SemaExprCXX.cpp.

References CheckUnaryTypeTraitTypeCompleteness(), Context, clang::TypeTraitExpr::Create(), evaluateTypeTrait(), clang::ExprError(), clang::ASTContext::getLogicalOperationType(), clang::Result, and clang::UTT_Last.

Referenced by ActOnTypeTrait().

## ◆ BuildUnaryOp()

ExprResult Sema::BuildUnaryOp | ( | Scope * | S,
|  | SourceLocation | OpLoc,
|  | UnaryOperatorKind | Opc,
|  | Expr * | Input
| ) |  |

Definition at line 13839 of file SemaExpr.cpp.

References clang::CPlusPlus, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::UnaryOperator::getOverloadedOperator(), clang::Expr::getType(), clang::UnaryOperator::isIncrementDecrementOp(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isOverloadableType(), and clang::OO_None.

Referenced by LookupMethodInReceiverType().

## ◆ BuildUnaryTransformType()

QualType Sema::BuildUnaryTransformType | ( | QualType | BaseType,
|  | UnaryTransformType::UTTKind | UKind,
|  | SourceLocation | Loc
| ) |  |

Definition at line 8485 of file SemaType.cpp.

References Diag(), clang::UnaryTransformType::EnumUnderlyingType, clang::Type::getAs(), clang::EnumDecl::getIntegerType(), clang::Decl::getLocation(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Type::isIncompleteType(), and clang::QualType::isNull().

## ◆ BuildUnresolvedCoawaitExpr()

ExprResult Sema::BuildUnresolvedCoawaitExpr | ( | SourceLocation | KwLoc,
|  | Expr * | E,
|  | UnresolvedLookupExpr * | Lookup
| ) |  |

Definition at line 713 of file SemaCoroutine.cpp.

References checkCoroutineContext(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Type::isPlaceholderType().

## ◆ BuildUsingDeclaration()

NamedDecl * Sema::BuildUsingDeclaration | ( | Scope * | S,
|  | AccessSpecifier | AS,
|  | SourceLocation | UsingLoc,
|  | bool | HasTypenameKeyword,
|  | SourceLocation | TypenameLoc,
|  | CXXScopeSpec & | SS,
|  | DeclarationNameInfo | NameInfo,
|  | SourceLocation | EllipsisLoc,
|  | const ParsedAttributesView & | AttrList,
|  | bool | IsInstantiation
| ) |  |

Builds a using declaration.

Parameters

  IsInstantiation | - Whether this call arises from an instantiation of an unresolved using declaration. We treat the lookup differently for these declarations.

Definition at line 11555 of file SemaDeclCXX.cpp.

References clang::DeclarationName::CXXConstructorName, clang::DeclarationNameInfo::getLoc(), clang::CXXScopeSpec::isInvalid(), and clang::DeclarationNameInfo::setName().

## ◆ BuildUsingPackDecl()

NamedDecl * Sema::BuildUsingPackDecl | ( | NamedDecl * | InstantiatedFrom,
|  | ArrayRef< NamedDecl *> | Expansions
| ) |  |

Definition at line 11813 of file SemaDeclCXX.cpp.

References clang::UsingPackDecl::Create().

## ◆ BuildUsingShadowDecl()

UsingShadowDecl * Sema::BuildUsingShadowDecl | ( | Scope * | S,
|  | UsingDecl * | UD,
|  | NamedDecl * | Target,
|  | UsingShadowDecl * | PrevDecl
| ) |  |

Builds a shadow declaration corresponding to a 'using' declaration.

Definition at line 11359 of file SemaDeclCXX.cpp.

References clang::ConstructorUsingShadowDecl::Create(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::UsingDecl::getQualifier(), isVirtualDirectBase(), and clang::Target.

## ◆ BuildVAArgExpr()

ExprResult Sema::BuildVAArgExpr | ( | SourceLocation | BuiltinLoc,
|  | Expr * | E,
|  | TypeSourceInfo * | TInfo,
|  | SourceLocation | RPLoc
| ) |  |

Definition at line 14559 of file SemaExpr.cpp.

References clang::CUDA, Diag(), clang::ExprError(), and clang::Stmt::getBeginLoc().

## ◆ BuildVariableInstantiation()

void Sema::BuildVariableInstantiation | ( | VarDecl * | NewVar,
|  | VarDecl * | OldVar,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | LateInstantiatedAttrVec * | LateAttrs,
|  | DeclContext * | Owner,
|  | LocalInstantiationScope * | StartingScope,
|  | bool | InstantiatingVarTemplate = `false`,
|  | VarTemplateSpecializationDecl * | PrevDeclForVarTemplateSpecialization = `nullptr`
| ) |  |

BuildVariableInstantiation - Used after a new variable has been created.

Sets basic variable data and decides whether to postpone the variable instantiation.

Definition at line 4764 of file SemaTemplateInstantiateDecl.cpp.

References clang::DeclContext::addHiddenDecl(), ForExternalRedeclaration, clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDescribedVarTemplate(), clang::VarDecl::getInitStyle(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::VarDecl::getTSCSpec(), clang::NamedDecl::hasLinkage(), clang::VarDecl::isConstexpr(), clang::VarDecl::isCXXForRangeDecl(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFunctionOrMethod(), clang::VarDecl::isInitCapture(), clang::Decl::isLocalExternDecl(), clang::VarDecl::isObjCForDecl(), clang::VarDecl::isOutOfLine(), clang::VarDecl::isPreviousDeclInSameBlockScope(), clang::Decl::isReferenced(), clang::VarDecl::isStaticDataMember(), clang::Decl::isUsed(), LookupOrdinaryName, LookupRedeclarationWithLinkage, clang::DeclContext::makeDeclVisibleInContext(), Previous, clang::Decl::setAccess(), clang::VarDecl::setConstexpr(), clang::VarDecl::setCXXForRangeDecl(), clang::VarDecl::setInitCapture(), clang::VarDecl::setInitStyle(), clang::VarDecl::setInstantiationOfStaticDataMember(), clang::Decl::setIsUsed(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::VarDecl::setObjCForDecl(), clang::VarDecl::setPreviousDeclInSameBlockScope(), clang::Decl::setReferenced(), clang::VarDecl::setTSCSpec(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.

Referenced by clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

## ◆ BuildVarTemplateInstantiation()

VarTemplateSpecializationDecl * Sema::BuildVarTemplateInstantiation | ( | VarTemplateDecl * | VarTemplate,
|  | VarDecl * | FromVar,
|  | const TemplateArgumentList & | TemplateArgList,
|  | const TemplateArgumentListInfo & | TemplateArgsInfo,
|  | SmallVectorImpl< TemplateArgument > & | Converted,
|  | SourceLocation | PointOfInstantiation,
|  | void * | InsertPos,
|  | LateInstantiatedAttrVec * | LateAttrs = `nullptr`,
|  | LocalInstantiationScope * | StartingScope = `nullptr`
| ) |  |

Definition at line 4687 of file SemaTemplateInstantiateDecl.cpp.

References clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), clang::Decl::getDeclContext(), clang::VarDecl::getDescribedVarTemplate(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::Sema::InstantiatingTemplate::isInvalid(), and clang::Decl::isInvalidDecl().

## ◆ BuildVectorLiteral()

ExprResult Sema::BuildVectorLiteral | ( | SourceLocation | LParenLoc,
|  | SourceLocation | RParenLoc,
|  | Expr * | E,
|  | TypeSourceInfo * | TInfo
| ) |  |

Build an altivec or OpenCL literal.

Definition at line 6848 of file SemaExpr.cpp.

References clang::VectorType::AltiVecVector, clang::Type::castAs(), Diag(), clang::ExprError(), clang::VectorType::GenericVector, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::VectorType::getElementType(), clang::Expr::getExprLoc(), clang::VectorType::getNumElements(), clang::TypeSourceInfo::getType(), clang::VectorType::getVectorKind(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isVectorType(), and clang::OpenCL.

## ◆ BuildVectorType()

QualType Sema::BuildVectorType | ( | QualType | T,
|  | Expr * | VecSize,
|  | SourceLocation | AttrLoc
| ) |  |

Definition at line 2401 of file SemaType.cpp.

References Diag(), clang::Type::isBooleanType(), clang::Type::isBuiltinType(), clang::Type::isDependentType(), clang::Type::isIntegerType(), clang::Type::isRealFloatingType(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().

Referenced by HandleVectorSizeAttr().

## ◆ BuildWritePipeType()

QualType Sema::BuildWritePipeType | ( | QualType | T,
|  | SourceLocation | Loc
| ) |  |

Build a Write-only Pipe type.

Parameters

  T | The type to which we'll be building a Pipe.
  Loc | We do not use it for now.

Returns
  A suitable pipe type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 2153 of file SemaType.cpp.

## ◆ CallExprUnaryConversions()

ExprResult Sema::CallExprUnaryConversions | ( | Expr * | E | ) |

CallExprUnaryConversions - a special case of an unary conversion performed on a function designator of a call expression.

Definition at line 705 of file SemaExpr.cpp.

References clang::Expr::getType(), and clang::Type::isFunctionType().

## ◆ canDelayFunctionBody()

bool Sema::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.

This will be `false` if we may need the body of the function in the middle of parsing an expression (where it's impractical to switch to parsing a different function), for instance, if it's constexpr in C++11 or has an 'auto' return type in C++14. These cases are essentially bugs.

Definition at line 13808 of file SemaDecl.cpp.

References clang::DeclaratorChunk::Function, clang::Declarator::getDeclSpec(), clang::Declarator::getNumTypeObjects(), clang::Declarator::getTypeObject(), clang::DeclSpec::hasAutoTypeSpec(), clang::DeclSpec::hasConstexprSpecifier(), clang::QualType::isNull(), and clang::Type::isUndeducedType().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ canFullyTypeCheckRedeclaration()

bool Sema::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`.

If not, we can generally still perform a best-effort check.

Parameters

  NewD | The new declaration.
  OldD | The old declaration.
  NewT | The portion of the type of the new declaration to check.
  OldT | The portion of the type of the old declaration to check.

Definition at line 9734 of file SemaDecl.cpp.

References clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), and clang::Decl::isLocalExternDecl().

## ◆ CanPerformAggregateInitializationForOverloadResolution()

bool Sema::CanPerformAggregateInitializationForOverloadResolution | ( | const InitializedEntity & | Entity,
|  | InitListExpr * | From
| ) |  |

Determine whether we can perform aggregate initialization for the purposes of overload resolution.

Definition at line 3093 of file SemaInit.cpp.

References clang::InitializedEntity::getType().

Referenced by TryListConversion().

## ◆ CanPerformCopyInitialization()

bool Sema::CanPerformCopyInitialization | ( | const InitializedEntity & | Entity,
|  | ExprResult | Init
| ) |  |

Definition at line 9593 of file SemaInit.cpp.

References clang::InitializationKind::CreateCopy(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

Referenced by TryListConversion().

## ◆ canSkipFunctionBody()

bool Sema::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.

This will be `false` only if we may need the body of the function in order to parse the rest of the program (for instance, if it is `constexpr` in C++11 or has an 'auto' return type in C++14).

Definition at line 13832 of file SemaDecl.cpp.

References clang::Decl::getAsFunction().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ canThrow()

CanThrowResult clang::Sema::canThrow | ( | const Stmt * | E | ) |

Definition at line 1112 of file SemaExceptionSpec.cpp.

References clang::CT_Can, and clang::Stmt::getStmtClass().

Referenced by BuildCXXNoexceptExpr(), clang::canSubStmtsThrow(), clang::canVarDeclThrow(), checkEscapingByref(), EvaluateBinaryTypeTrait(), and evaluateTypeTrait().

## ◆ CanUseDecl()

bool Sema::CanUseDecl | ( | NamedDecl * | D,
|  | bool | TreatUnavailableAsInvalid
| ) |  |

Determine whether the use of this declaration is valid, without emitting diagnostics.

Definition at line 54 of file SemaExpr.cpp.

References clang::AR_Unavailable, and clang::Decl::getAvailability().

Referenced by canRecoverDotPseudoDestructorCallsOnPointerObjects().

## ◆ CaptureHasSideEffects()

bool Sema::CaptureHasSideEffects | ( | const sema::Capture & | From | ) |

Does copying/destroying the captured variable have side effects?

Definition at line 1561 of file SemaLambda.cpp.

References clang::VarDecl::getInit(), clang::sema::Capture::getVariable(), clang::Expr::HasSideEffects(), and clang::sema::Capture::isInitCapture().

## ◆ CheckAdditionOperands()

QualType Sema::CheckAdditionOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | BinaryOperatorKind | Opc,
|  | QualType * | CompLHSTy = `nullptr`
| ) |  |

Definition at line 9715 of file SemaExpr.cpp.

References checkArithmeticNull(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::Type::isAnyPointerType(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isNullPointerConstant(), clang::Type::isObjCObjectPointerType(), and clang::Type::isPointerType().

## ◆ checkAddressOfFunctionIsAvailable()

bool Sema::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.

Returns false if taking the address of the function is illegal.

Definition at line 9994 of file SemaOverload.cpp.

References checkAddressOfFunctionIsAvailable().

Referenced by FinishOverloadedCallExpr(), isExprAnUnaddressableFunction(), IsStandardConversion(), markUnaddressableCandidatesUnviable(), and clang::InitializationSequence::Perform().

## ◆ CheckAddressOfMemberAccess()

Sema::AccessResult Sema::CheckAddressOfMemberAccess | ( | Expr * | OvlExpr,
|  | DeclAccessPair | FoundDecl
| ) |  |

Definition at line 1802 of file SemaAccess.cpp.

References AR_accessible, clang::AS_none, clang::AS_public, clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::DeclAccessPair::getAccess(), and clang::OverloadExpr::getNamingClass().

Referenced by clang::InitializationSequence::Perform().

## ◆ CheckAddressOfOperand()

QualType Sema::CheckAddressOfOperand | ( | ExprResult & | OrigOp,
|  | SourceLocation | OpLoc
| ) |  |

CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designating an object.

If it is an lvalue, the object cannot be declared with storage class register or be a bit field. Note: The usual conversions are not applied to the operand of the & operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue. In C++, the operand might be an overloaded function name, in which case we allow the '&' but retain the overloaded-function type.

Definition at line 12405 of file SemaExpr.cpp.

References Diag(), and clang::ActionResult< PtrTy, CompressInvalid >::get().

## ◆ CheckAlignasUnderalignment()

void clang::Sema::CheckAlignasUnderalignment | ( | Decl * | D | ) |

Referenced by clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ CheckAllocatedType()

bool Sema::CheckAllocatedType | ( | QualType | AllocType,
|  | SourceLocation | Loc,
|  | SourceRange | R
| ) |  |

Checks that a type is suitable as the allocated type in a new-expression.

Definition at line 2186 of file SemaExprCXX.cpp.

References Context, clang::Default, Diag(), clang::QualType::getAddressSpace(), clang::Qualifiers::getAddressSpaceAttributePrintValue(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getBaseElementType(), getLangOpts(), clang::QualType::getObjCLifetime(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isObjCLifetimeType(), clang::Type::isReferenceType(), clang::Type::isVariablyModifiedType(), clang::Qualifiers::OCL_None, RequireCompleteType(), and RequireNonAbstractType().

## ◆ CheckAllocationAccess()

Sema::AccessResult Sema::CheckAllocationAccess | ( | SourceLocation | OperatorLoc,
|  | SourceRange | PlacementRange,
|  | CXXRecordDecl * | NamingClass,
|  | DeclAccessPair | FoundDecl,
|  | bool | Diagnose = `true`
| ) |  |

Checks access to an overloaded operator new or delete.

Definition at line 1698 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, and clang::DeclAccessPair::getAccess().

Referenced by resolveAllocationOverload().

## ◆ checkAllowedCUDAInitializer()

void Sema::checkAllowedCUDAInitializer | ( | VarDecl * | VD | ) |

Definition at line 489 of file SemaCUDA.cpp.

References CFT_Host, CFT_HostDevice, Context, Diag(), clang::Type::getAsCXXRecordDecl(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasGlobalStorage(), clang::VarDecl::hasInit(), IdentifyCUDATarget(), clang::Expr::isConstantInitializer(), isEmptyCudaConstructor(), isEmptyCudaDestructor(), clang::Decl::isInvalidDecl(), clang::Type::isReferenceType(), clang::VarDecl::isStaticLocal(), LangOpts, and clang::Decl::setInvalidDecl().

## ◆ CheckARCMethodDecl()

bool Sema::CheckARCMethodDecl | ( | ObjCMethodDecl * | method | ) |

Check a method declaration for compatibility with the Objective-C ARC conventions.

Definition at line 224 of file SemaDeclObjC.cpp.

References clang::Decl::addAttr(), checkInitMethod(), Context, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getReturnTypeSourceRange(), clang::ObjCMethodDecl::getSelectorLoc(), clang::Decl::hasAttr(), clang::ASTContext::hasSameType(), clang::SourceRange::isInvalid(), clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, and clang::ASTContext::VoidTy.

Referenced by ProcessPropertyDecl().

## ◆ CheckAssignmentConstraints() [1/2]

Sema::AssignConvertType Sema::CheckAssignmentConstraints | ( | SourceLocation | Loc,
|  | QualType | LHSType,
|  | QualType | RHSType
| ) |  |

CheckAssignmentConstraints - Perform type checking for assignment, argument passing, variable initialization, and function return values.

C99 6.5.16.

Definition at line 8246 of file SemaExpr.cpp.

References clang::VK_RValue.

Referenced by DiagnosePropertyAccessorMismatch().

## ◆ CheckAssignmentConstraints() [2/2]

Sema::AssignConvertType Sema::CheckAssignmentConstraints | ( | QualType | LHSType,
|  | ExprResult & | RHS,
|  | CastKind & | Kind,
|  | bool | ConvertRHS = `true`
| ) |  |

Check assignment constraints and optionally prepare for a conversion of the RHS to the LHS type.

CheckAssignmentConstraints (C99 6.5.16) - This routine currently has code to accommodate several GCC extensions when type checking pointers.

The conversion is prepared for if ConvertRHS is true.

Here are some objectionable examples that GCC considers warnings:

int a, *pint; short *pshort; struct foo *pfoo;

pint = pshort; // warning: assignment from incompatible pointer type a = pint; // warning: assignment makes integer from pointer without a cast pint = a; // warning: assignment makes pointer from integer without a cast pint = pfoo; // warning: assignment from incompatible pointer type

As a result, the code for dealing with pointers is more complex than the C99 spec dictates.

Sets 'Kind' for any result kind except Incompatible.

Definition at line 8285 of file SemaExpr.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get().

## ◆ CheckAssignmentOperands()

QualType Sema::CheckAssignmentOperands | ( | Expr * | LHSExpr,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | QualType | CompoundType
| ) |  |

Definition at line 11995 of file SemaExpr.cpp.

References CheckForModifiableLvalue(), CheckIdentityFieldAssignment(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::hasPlaceholderType(), isEnabled(), clang::Type::isHalfType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), and clang::OpenCL.

## ◆ CheckAttrNoArgs()

bool clang::Sema::CheckAttrNoArgs | ( | const ParsedAttr & | CurrAttr | ) |

Referenced by handleFunctionTypeAttr().

## ◆ CheckAttrTarget()

bool clang::Sema::CheckAttrTarget | ( | const ParsedAttr & | CurrAttr | ) |

Referenced by handleFunctionTypeAttr().

## ◆ CheckBaseClassAccess()

Sema::AccessResult Sema::CheckBaseClassAccess | ( | SourceLocation | AccessLoc,
|  | QualType | Base,
|  | QualType | Derived,
|  | const CXXBasePath & | Path,
|  | unsigned | DiagID,
|  | bool | ForceCheck = `false`,
|  | bool | ForceUnprivileged = `false`
| ) |  |

Checks access for a hierarchy conversion.

Parameters

  ForceCheck | true if this check should be performed even if access control is disabled; some things rely on this for semantics
  ForceUnprivileged | true if this check should proceed as if the context had no special privileges

Definition at line 1826 of file SemaAccess.cpp.

References clang::CXXBasePath::Access, AR_accessible, clang::AS_public, and clang::Type::castAs().

## ◆ CheckBaseSpecifier()

CXXBaseSpecifier * Sema::CheckBaseSpecifier | ( | CXXRecordDecl * | Class,
|  | SourceRange | SpecifierRange,
|  | bool | Virtual,
|  | AccessSpecifier | Access,
|  | TypeSourceInfo * | TInfo,
|  | SourceLocation | EllipsisLoc
| ) |  |

ActOnBaseSpecifier - Parsed a base specifier.

Check the validity of a C++ base class specifier.

Returns
  a new CXXBaseSpecifier if well-formed, emits diagnostics and returns NULL otherwise.

Definition at line 2414 of file SemaDeclCXX.cpp.

References clang::Type::containsUnexpandedParameterPack(), Diag(), findCircularInheritance(), clang::Type::getAsCXXRecordDecl(), clang::TypeLoc::getBeginLoc(), clang::CXXRecordDecl::getCanonicalDecl(), clang::Decl::getLocation(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), clang::TagDecl::isUnion(), and clang::SourceLocation::isValid().

Referenced by SubstBaseSpecifiers().

## ◆ CheckBitwiseOperands()

QualType Sema::CheckBitwiseOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | BinaryOperatorKind | Opc
| ) |  |
| inline

Definition at line 11416 of file SemaExpr.cpp.

References checkArithmeticNull(), diagnoseLogicalNotOnLHSofCheck(), diagnoseXorMisusedAsPow(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::QualType::isNull().

## ◆ CheckBooleanCondition()

ExprResult Sema::CheckBooleanCondition | ( | SourceLocation | Loc,
|  | Expr * | E,
|  | bool | IsConstexpr = `false`
| ) |  |

CheckBooleanCondition - Diagnose problems involving the use of the given expression as a boolean condition (e.g.

in an if statement). Also performs the standard function and array decays, possibly changing the input variable.

Parameters

  Loc | - A location associated with the condition, e.g. the 'if' keyword.

Returns
  true iff there were any errors

Definition at line 17400 of file SemaExpr.cpp.

References CheckBoolLikeConversion(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isScalarType(), and clang::Expr::isTypeDependent().

Referenced by ActOnNoexceptSpec(), and CheckConditionVariable().

## ◆ CheckCallingConvAttr()

bool clang::Sema::CheckCallingConvAttr | ( | const ParsedAttr & | attr,
|  | CallingConv & | CC,
|  | const FunctionDecl * | FD = `nullptr`
| ) |  |

Referenced by getCCForDeclaratorChunk(), and handleFunctionTypeAttr().

## ◆ CheckCallReturnType()

bool Sema::CheckCallReturnType | ( | QualType | ReturnType,
|  | SourceLocation | Loc,
|  | CallExpr * | CE,
|  | FunctionDecl * | FD
| ) |  |

CheckCallReturnType - Checks that a call expression's return type is complete.

Returns true on failure. The location passed in is the location that best represents the call.

Definition at line 17272 of file SemaExpr.cpp.

References clang::Type::isIncompleteType(), and clang::Type::isVoidType().

Referenced by ActOnDecltypeExpression().

## ◆ CheckCaseExpression()

bool Sema::CheckCaseExpression | ( | Expr * | E | ) |

Definition at line 18099 of file SemaExpr.cpp.

References clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().

## ◆ CheckCastAlign()

void Sema::CheckCastAlign | ( | Expr * | Op,
|  | QualType | T,
|  | SourceRange | TRange
| ) |  |

CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment requirements.

Definition at line 13398 of file SemaChecking.cpp.

References clang::Type::getAs(), clang::SourceRange::getBegin(), clang::PointerType::getPointeeType(), clang::Expr::getType(), clang::Type::isDependentType(), and clang::Type::isIncompleteType().

## ◆ CheckCategoryVsClassMethodMatches()

void Sema::CheckCategoryVsClassMethodMatches | ( | ObjCCategoryImplDecl * | CatIMPDecl | ) |

CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those implemented in its primary class and warns each time an exact match is found.

Definition at line 2917 of file SemaDeclObjC.cpp.

References clang::ObjCContainerDecl::class_methods(), clang::ObjCCategoryImplDecl::getCategoryDecl(), clang::ObjCCategoryDecl::getClassInterface(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCContainerDecl::instance_methods(), clang::ObjCInterfaceDecl::lookupMethod(), and MatchAllMethodDeclarations().

## ◆ checkClassLevelCodeSegAttribute()

void Sema::checkClassLevelCodeSegAttribute | ( | CXXRecordDecl * | Class | ) |

Definition at line 5880 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::methods().

## ◆ checkClassLevelDLLAttribute()

void Sema::checkClassLevelDLLAttribute | ( | CXXRecordDecl * | Class | ) |

Check class-level dllimport/dllexport attribute.

The caller must ensure that referenceDLLExportedClassMethods is called some point later when all outer classes of Class are complete.

Definition at line 5891 of file SemaDeclCXX.cpp.

References clang::getDLLAttr().

Referenced by dllExportImportClassTemplateSpecialization().

## ◆ CheckClassTemplate()

DeclResult Sema::CheckClassTemplate | ( | Scope * | S,
|  | unsigned | TagSpec,
|  | TagUseKind | TUK,
|  | SourceLocation | KWLoc,
|  | CXXScopeSpec & | SS,
|  | IdentifierInfo * | Name,
|  | SourceLocation | NameLoc,
|  | const ParsedAttributesView & | Attr,
|  | TemplateParameterList * | TemplateParams,
|  | AccessSpecifier | AS,
|  | SourceLocation | ModulePrivateLoc,
|  | SourceLocation | FriendLoc,
|  | unsigned | NumOuterTemplateParamLists,
|  | TemplateParameterList ** | OuterTemplateParamLists,
|  | SkipBodyInfo * | SkipBody = `nullptr`
| ) |  |

Definition at line 1524 of file SemaTemplate.cpp.

## ◆ CheckCompareOperands()

QualType Sema::CheckCompareOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | BinaryOperatorKind | Opc
| ) |  |

Definition at line 10758 of file SemaExpr.cpp.

References checkArithmeticNull(), checkArithmeticOrEnumeralCompare(), clang::CPlusPlus, diagnoseLogicalNotOnLHSofCheck(), diagnoseTautologicalComparison(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::isArithmeticType(), clang::Type::isEnumeralType(), clang::BinaryOperator::isEqualityOp(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), clang::Type::isPointerType(), and clang::BinaryOperator::isRelationalOp().

## ◆ CheckComparisonCategoryType()

QualType Sema::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.

Returns
  The type of the comparison category type corresponding to the specified Kind, or a null type if an error occurs

Definition at line 10687 of file SemaDeclCXX.cpp.

References clang::CPlusPlus, and clang::NestedNameSpecifier::Create().

Referenced by checkArithmeticOrEnumeralThreeWayCompare().

## ◆ CheckCompatibleReinterpretCast()

void Sema::CheckCompatibleReinterpretCast | ( | QualType | SrcType,
|  | QualType | DestType,
|  | bool | IsDereference,
|  | SourceRange | Range
| ) |  |

Definition at line 1807 of file SemaCast.cpp.

References clang::Type::getAs(), clang::SourceRange::getBegin(), and clang::Type::getPointeeType().

Referenced by CheckIndirectionOperand(), and TryReinterpretCast().

## ◆ CheckCompletedCoroutineBody()

void Sema::CheckCompletedCoroutineBody | ( | FunctionDecl * | FD,
|  | Stmt *& | Body
| ) |  |

Definition at line 958 of file SemaCoroutine.cpp.

References clang::sema::FunctionScopeInfo::CoroutinePromise, Diag(), clang::sema::FunctionScopeInfo::FirstCoroutineStmtLoc, clang::sema::FunctionScopeInfo::FirstReturnLoc, clang::sema::FunctionScopeInfo::getFirstCoroutineStmtKeyword(), clang::sema::FunctionScopeInfo::isCoroutine(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), and clang::Decl::setInvalidDecl().

## ◆ CheckCompletedCXXClass()

void Sema::CheckCompletedCXXClass | ( | Scope * | S,
|  | CXXRecordDecl * | Record
| ) |  |

Perform semantic checks on a class definition that has been completing, introducing implicitly-declared members, checking for abstract types, etc.

Parameters

  S | The scope in which the class was parsed. Null if we didn't just parse a class definition.
  Record | The completed class.

Definition at line 6323 of file SemaDeclCXX.cpp.

References clang::AS_public, clang::DeclContextLookupResult::begin(), CheckAbstractClassUsage(), Diag(), clang::DeclContextLookupResult::end(), clang::RecordDecl::fields(), clang::Decl::getAccess(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDestructor(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::TagDecl::getTagKind(), clang::NamedDecl::getUnderlyingDecl(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasUserDeclaredConstructor(), clang::CXXRecordDecl::isAbstract(), clang::CXXRecordDecl::isAggregate(), clang::TagDecl::isDependentType(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::isLambda(), clang::CXXRecordDecl::isPolymorphic(), clang::CXXMethodDecl::isVirtual(), and clang::DeclContext::lookup().

## ◆ CheckCompleteDecompositionDeclaration()

void Sema::CheckCompleteDecompositionDeclaration | ( | DecompositionDecl * | DD | ) |

Definition at line 1415 of file SemaDeclCXX.cpp.

References clang::DecompositionDecl::bindings(), clang::ValueDecl::getType(), and clang::Type::isDependentType().

## ◆ CheckCompleteVariableDeclaration()

void Sema::CheckCompleteVariableDeclaration | ( | VarDecl * | VD | ) |

Definition at line 12484 of file SemaDecl.cpp.

References Diag(), clang::QualType::DK_nontrivial_c_struct, clang::Decl::getDeclContext(), clang::VarDecl::getDescribedVarTemplate(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::DeclContext::getRedeclContext(), clang::VarDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::VarDecl::hasInit(), clang::NamedDecl::hasLinkage(), clang::VarDecl::hasLocalStorage(), clang::Type::isBlockPointerType(), clang::Expr::isConstantInitializer(), clang::QualType::isDestructedType(), clang::NamedDecl::isExternallyVisible(), clang::DeclContext::isFileContext(), clang::VarDecl::isInline(), clang::Decl::isInvalidDecl(), clang::isTemplateInstantiation(), clang::VarDecl::isThisDeclarationADefinition(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, and clang::Decl::setInvalidDecl().

## ◆ CheckConceptTemplateId()

ExprResult Sema::CheckConceptTemplateId | ( | const CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | const DeclarationNameInfo & | ConceptNameInfo,
|  | NamedDecl * | FoundDecl,
|  | ConceptDecl * | NamedConcept,
|  | const TemplateArgumentListInfo * | TemplateArgs
| ) |  |

Definition at line 4431 of file SemaTemplate.cpp.

## ◆ CheckConditionalOperands()

QualType Sema::CheckConditionalOperands | ( | ExprResult & | Cond,
|  | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | ExprValueKind & | VK,
|  | ExprObjectKind & | OK,
|  | SourceLocation | QuestionLoc
| ) |  |

Note that LHS is not null here, even if this is the gnu "x ?: y" extension.

In that case, LHS = cond. C99 6.5.15

Definition at line 7452 of file SemaExpr.cpp.

References checkBlockType(), checkCondition(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalVoidType(), checkPointerIntegerMismatch(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::QualType::getUnqualifiedType(), clang::Type::isArithmeticType(), clang::Type::isBlockPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Type::isVoidType(), clang::OK_Ordinary, clang::OpenCL, OpenCLCheckVectorConditional(), unsupportedTypeConversion(), and clang::VK_RValue.

## ◆ CheckConditionVariable()

ExprResult Sema::CheckConditionVariable | ( | VarDecl * | ConditionVar,
|  | SourceLocation | StmtLoc,
|  | ConditionKind | CK
| ) |  |

Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement.

Definition at line 3631 of file SemaExprCXX.cpp.

References Boolean, BuildDeclRefExpr(), CheckBooleanCondition(), CheckSwitchCondition(), ConstexprIf, Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Decl::isInvalidDecl(), Switch, and clang::VK_LValue.

Referenced by ActOnConditionVariable().

## ◆ CheckConflictingOverridingMethod()

void Sema::CheckConflictingOverridingMethod | ( | ObjCMethodDecl * | Method,
|  | ObjCMethodDecl * | Overridden,
|  | bool | IsProtocolMethodDecl
| ) |  |

Definition at line 2573 of file SemaDeclObjC.cpp.

References CheckMethodOverrideParam(), CheckMethodOverrideReturn(), Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().

## ◆ CheckConstexprFunctionDefinition()

bool Sema::CheckConstexprFunctionDefinition | ( | const FunctionDecl * | FD,
|  | CheckConstexprKind | Kind
| ) |  |

Definition at line 1686 of file SemaDeclCXX.cpp.

References clang::CXXMethodDecl::begin_overridden_methods(), CheckConstexprDestructorSubobjects(), CheckConstexprFunctionBody(), CheckConstexprParameterTypes(), CheckConstexprReturnType(), Diag(), clang::FunctionDecl::getBody(), clang::CXXMethodDecl::getCanonicalDecl(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), getRecordDiagFromTagKind(), clang::TagDecl::getTagKind(), clang::CXXMethodDecl::isInstance(), clang::CXXMethodDecl::isVirtual(), and clang::CXXRecordDecl::vbases().

## ◆ CheckConstraintExpression()

bool Sema::CheckConstraintExpression | ( | Expr * | CE,
|  | Token | NextToken = `Token()`,
|  | bool * | PossibleNonPrimary = `nullptr`,
|  | bool | IsTrailingRequiresClause = `false`
| ) |  |

Check whether the given expression is a valid constraint expression.

A diagnostic is emitted if it is not, false is returned, and PossibleNonPrimary will be set to true if the failure might be due to a non-primary expression being used as an atomic constraint.

Definition at line 32 of file SemaConcept.cpp.

References clang::getBinOpPrecedence(), clang::Token::getKind(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Token::is(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isSpecificBuiltinType(), clang::Expr::isTypeDependent(), and clang::prec::LogicalAnd.

Referenced by clang::Parser::ParseConstraintExpression(), clang::Parser::ParseConstraintLogicalAndExpression(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ CheckConstraintSatisfaction() [1/2]

bool Sema::CheckConstraintSatisfaction | ( | const NamedDecl * | Template,
|  | ArrayRef< const Expr *> | ConstraintExprs,
|  | ArrayRef< TemplateArgument > | TemplateArgs,
|  | SourceRange | TemplateIDRange,
|  | ConstraintSatisfaction & | Satisfaction
| ) |  |

Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given template arguments.

Parameters

  Template | the template-like entity that triggered the constraints check (either a concept or a constrained entity).
  ConstraintExprs | a list of constraint expressions, treated as if they were 'AND'ed together.
  TemplateArgs | the list of template arguments to substitute into the constraint expression.
  TemplateIDRange | The source range of the template id that caused the constraints check.
  Satisfaction | if true is returned, will contain details of the satisfaction, with enough information to diagnose an unsatisfied expression.

Returns
  true if an error occurred and satisfaction could not be checked, false otherwise.

Definition at line 274 of file SemaConcept.cpp.

References clang::ConstraintSatisfaction::IsSatisfied, and clang::ConstraintSatisfaction::Profile().

Referenced by BuildNestedRequirement(), CheckDeducedArgumentConstraints(), and CheckDeducedPlaceholderConstraints().

## ◆ CheckConstraintSatisfaction() [2/2]

bool Sema::CheckConstraintSatisfaction | ( | const Expr * | ConstraintExpr,
|  | ConstraintSatisfaction & | Satisfaction
| ) |  |

Check whether the given non-dependent constraint expression is satisfied.

Returns false and updates Satisfaction with the satisfaction verdict if successful, emits a diagnostic and returns true if an error occured and satisfaction could not be determined.

Returns
  true if an error occurred, false otherwise.

Definition at line 315 of file SemaConcept.cpp.

References calculateConstraintSatisfaction().

## ◆ CheckConstructor()

void Sema::CheckConstructor | ( | CXXConstructorDecl * | Constructor | ) |

CheckConstructor - Checks a fully-formed constructor for well-formedness, issuing any diagnostics required.

Returns true if the constructor declarator is invalid.

Definition at line 9846 of file SemaDeclCXX.cpp.

References clang::Decl::getDeclContext(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::ParmVarDecl::hasDefaultArg(), clang::Decl::isInvalidDecl(), clang::Decl::setInvalidDecl(), and clang::TSK_ImplicitInstantiation.

## ◆ CheckConstructorAccess() [1/2]

Sema::AccessResult Sema::CheckConstructorAccess | ( | SourceLocation | Loc,
|  | CXXConstructorDecl * | D,
|  | DeclAccessPair | FoundDecl,
|  | const InitializedEntity & | Entity,
|  | bool | IsCopyBindingRefToTemp = `false`
| ) |  |

Checks access to a constructor.

Definition at line 1613 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, clang::InitializedEntity::EK_Base, clang::InitializedEntity::EK_LambdaCapture, clang::InitializedEntity::EK_Member, clang::DeclAccessPair::getAccess(), clang::InitializedEntity::getBaseSpecifier(), clang::InitializedEntity::getCapturedVarName(), clang::InitializedEntity::getDecl(), clang::InitializedEntity::getKind(), clang::CXXBaseSpecifier::getType(), clang::InitializedEntity::getType(), clang::ValueDecl::getType(), and clang::InitializedEntity::isInheritedVirtualBase().

Referenced by CheckCXX98CompatAccessibleCopy(), CopyObject(), clang::InitializationSequence::Perform(), and PerformConstructorInitialization().

## ◆ CheckConstructorAccess() [2/2]

Sema::AccessResult Sema::CheckConstructorAccess | ( | SourceLocation | Loc,
|  | CXXConstructorDecl * | D,
|  | DeclAccessPair | FoundDecl,
|  | const InitializedEntity & | Entity,
|  | const PartialDiagnostic & | PDiag
| ) |  |

Checks access to a constructor.

Definition at line 1656 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, clang::InitializedEntity::EK_Base, clang::InitializedEntity::EK_Delegating, clang::DeclAccessPair::getAccess(), clang::DeclAccessPair::getDecl(), clang::InitializedEntity::getKind(), clang::InitializedEntity::getParent(), clang::DeclContext::getParent(), and clang::CXXMethodDecl::getParent().

## ◆ CheckConstructorDeclarator()

QualType Sema::CheckConstructorDeclarator | ( | Declarator & | D,
|  | QualType | R,
|  | StorageClass & | SC
| ) |  |

CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructor declarator `D` with type `R`.

If there are any errors in the declarator, this routine will emit diagnostics and set the invalid bit to true. In any case, the type will be updated to reflect a well-formed type for the constructor and returned.

Definition at line 9783 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), checkMethodTypeQualifiers(), clang::FixItHint::CreateRemoval(), Diag(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclSpec::getRestrictSpecLoc(), clang::FunctionType::getReturnType(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getVirtualSpecLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::DeclaratorChunk::FunctionTypeInfo::hasRefQualifier(), clang::Declarator::isInvalidType(), clang::DeclSpec::isVirtualSpecified(), clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierIsLValueRef, clang::SC_None, clang::SC_Static, and clang::Declarator::setInvalidType().

## ◆ CheckConversionDeclarator()

void Sema::CheckConversionDeclarator | ( | Declarator & | D,
|  | QualType & | R,
|  | StorageClass & | SC
| ) |  |

CheckConversionDeclarator - Called by ActOnDeclarator to check the well-formednes of the conversion function declarator `D` with type `R`.

If there are any errors in the declarator, this routine will emit diagnostics and return true. Otherwise, it will return false. Either way, the type `R` will be updated to reflect a well-formed type for the conversion operator.

Definition at line 10060 of file SemaDeclCXX.cpp.

References clang::frontend::After, clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::Type::castAs(), clang::UnqualifiedId::ConversionFunctionId, clang::CPlusPlus11, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateInsertionFromRange(), clang::FixItHint::CreateRemoval(), Diag(), extendLeft(), extendRight(), clang::DeclaratorChunk::FunctionTypeInfo::freeParams(), clang::DeclaratorChunk::Function, clang::SourceRange::getBegin(), clang::Declarator::getDeclSpec(), clang::TypeLoc::getEndLoc(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getName(), clang::TypeLoc::getSourceRange(), clang::UnqualifiedId::getSourceRange(), clang::DeclSpec::getStorageClassSpecLoc(), clang::CharSourceRange::getTokenRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isArrayType(), clang::Declarator::isInvalidType(), clang::SourceRange::isValid(), clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pipe, clang::DeclaratorChunk::Pointer, clang::DeclaratorChunk::Reference, clang::SC_None, clang::SC_Static, clang::Declarator::setInvalidType(), and clang::Declarator::type_objects().

## ◆ CheckConvertedConstantExpression() [1/2]

ExprResult Sema::CheckConvertedConstantExpression | ( | Expr * | From,
|  | QualType | T,
|  | llvm::APSInt & | Value,
|  | CCEKind | CCE
| ) |  |

Definition at line 5668 of file SemaOverload.cpp.

References CheckConvertedConstantExpression(), clang::Type::isIntegralOrEnumerationType(), and V.

Referenced by ActOnCXXNew(), and CheckCXXBooleanCondition().

## ◆ CheckConvertedConstantExpression() [2/2]

ExprResult Sema::CheckConvertedConstantExpression | ( | Expr * | From,
|  | QualType | T,
|  | APValue & | Value,
|  | CCEKind | CCE
| ) |  |

Definition at line 5663 of file SemaOverload.cpp.

References CheckConvertedConstantExpression().

## ◆ CheckCUDACall()

bool Sema::CheckCUDACall | ( | SourceLocation | Loc,
|  | FunctionDecl * | Callee
| ) |  |

Check whether we're allowed to call Callee from the current context.

- If the call is never allowed in a semantically-correct program (CFP_Never), emits an error and returns false.

- If the call is allowed in semantically-correct programs, but only if it's never codegen'ed (CFP_WrongSide), creates a deferred diagnostic to be emitted if and when the caller is codegen'ed, and returns true.

  Will only create deferred diagnostics for a given SourceLocation once, so you can safely call this multiple times without generating duplicate deferred errors.

- Otherwise, returns true without emitting any diagnostics.

Definition at line 659 of file SemaCUDA.cpp.

References clang::CUDA, CurContext, Emitted, ExprEvalContexts, getEmissionStatus(), getLangOpts(), markKnownEmitted(), and shouldIgnoreInHostDeviceCheck().

## ◆ checkCUDATargetOverload()

void Sema::checkCUDATargetOverload | ( | FunctionDecl * | NewFD,
|  | const LookupResult & | Previous
| ) |  |

Check whether NewFD is a valid overload for CUDA.

Emits diagnostics and invalidates NewFD if not.

Definition at line 748 of file SemaCUDA.cpp.

References CFT_Global, CFT_HostDevice, clang::CUDA, Diag(), clang::Decl::getAsFunction(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), IdentifyCUDATarget(), IsOverload(), and clang::Decl::setInvalidDecl().

## ◆ CheckCXXBooleanCondition()

ExprResult Sema::CheckCXXBooleanCondition | ( | Expr * | CondExpr,
|  | bool | IsConstexpr = `false`
| ) |  |

CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.

CheckCXXBooleanCondition - Returns true if a conversion to bool is invalid.

Definition at line 3669 of file SemaExprCXX.cpp.

References clang::ASTContext::BoolTy, CCEK_ConstexprIf, CheckConvertedConstantExpression(), Context, clang::Expr::isValueDependent(), and PerformContextuallyConvertToBool().

Referenced by CXXCheckConditionalOperands().

## ◆ CheckCXXDefaultArgExpr()

bool Sema::CheckCXXDefaultArgExpr | ( | SourceLocation | CallLoc,
|  | FunctionDecl * | FD,
|  | ParmVarDecl * | Param
| ) |  |

Instantiate or parse a C++ default argument expression as necessary.

Return true on error.

Definition at line 4926 of file SemaExpr.cpp.

References Diag(), clang::DeclaratorDecl::getBeginLoc(), clang::Decl::getDeclContext(), clang::MultiLevelTemplateArgumentList::getInnermost(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUnparsedDefaultArg(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::runWithSufficientStackSpace(), and clang::Decl::setInvalidDecl().

Referenced by checkForMultipleExportedDefaultConstructors().

## ◆ CheckCXXDefaultArguments()

void Sema::CheckCXXDefaultArguments | ( | FunctionDecl * | FD | ) |

CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-formed according to C++ [dcl.fct.default].

Definition at line 1529 of file SemaDeclCXX.cpp.

References Diag(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ParmVarDecl::hasDefaultArg(), clang::Decl::isInvalidDecl(), clang::VarDecl::isParameterPack(), and clang::ParmVarDecl::setDefaultArg().

## ◆ CheckCXXThisCapture()

bool Sema::CheckCXXThisCapture | ( | SourceLocation | Loc,
|  | bool | Explicit = `false`,
|  | bool | BuildAndDiagnose = `true`,
|  | const unsigned *const | FunctionScopeIndexToStopAt = `nullptr`,
|  | bool | ByCopy = `false`
| ) |  |

Make sure the value of 'this' is actually available in the current context, if it is a potentially evaluated context.

Parameters

  Loc | The location at which the capture of 'this' occurs.
  Explicit | Whether 'this' is explicitly captured in a lambda capture list.
  FunctionScopeIndexToStopAt | If non-null, it points to the index of the FunctionScopeInfo stack beyond which we do not attempt to capture. This is useful when enclosing lambdas must speculatively capture 'this' that may or may not be used in certain specializations of a nested generic lambda (depending on whether the name resolves to a non-static member function or a static function).

Returns
  returns 'true' if failed, 'false' if success.

Definition at line 1146 of file SemaExprCXX.cpp.

References clang::sema::CapturingScopeInfo::addThisCapture(), clang::sema::LambdaScopeInfo::CallOperator, clang::Qualifiers::CVRMask, Diag(), FunctionScopes, getCurrentThisType(), clang::Type::getPointeeType(), clang::sema::CapturingScopeInfo::ImpCap_Block, clang::sema::CapturingScopeInfo::ImpCap_CapturedRegion, clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::isGenericLambdaCallOperatorSpecialization(), isUnevaluatedContext(), and clang::QualType::removeLocalCVRQualifiers().

Referenced by MarkThisReferenced(), and tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs().

## ◆ CheckCXXThrowOperand()

bool Sema::CheckCXXThrowOperand | ( | SourceLocation | ThrowLoc,
|  | QualType | ThrowTy,
|  | Expr * | E
| ) |  |

CheckCXXThrowOperand - Validate the operand of a throw.

Definition at line 863 of file SemaExprCXX.cpp.

References clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Expr::getExprLoc(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::CXXRecordDecl::hasIrrelevantDestructor(), and clang::Type::isVoidType().

## ◆ checkDeclIsAllowedInOpenMPTarget()

void Sema::checkDeclIsAllowedInOpenMPTarget | ( | Expr * | E,
|  | Decl * | D,
|  | SourceLocation | IdLoc = `SourceLocation()`
| ) |  |

Check declaration inside target region.

Definition at line 16929 of file SemaOpenMP.cpp.

References checkValueDeclInTarget(), Diag(), DSAStack, clang::Stmt::getBeginLoc(), clang::Decl::getLocation(), clang::Decl::getSourceRange(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), and reportOriginalDsa().

Referenced by MarkExprReferenced().

## ◆ CheckDeductionGuideDeclarator()

void Sema::CheckDeductionGuideDeclarator | ( | Declarator & | D,
|  | QualType & | R,
|  | StorageClass & | SC
| ) |  |

Check the validity of a declarator that we parsed for a deduction-guide.

These aren't actually declarators in the grammar, so we need to check that the user didn't specify any pieces that are not part of the deduction-guide grammar.

Definition at line 10303 of file SemaDeclCXX.cpp.

References clang::DeclSpec::ClearStorageClassSpecs(), Diag(), clang::DeclaratorChunk::Function, clang::OpaquePtr< PtrTy >::get(), clang::UnionOpaquePtr< T >::get(), clang::TypeLoc::getAs(), clang::TemplateName::getAsTemplateDecl(), clang::DeclSpec::getBeginLoc(), clang::UnqualifiedId::getBeginLoc(), clang::Decl::getDeclContext(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifierLoc(), clang::Decl::getLocation(), clang::Declarator::getMutableDeclSpec(), clang::Declarator::getName(), clang::DeclContext::getRedeclContext(), clang::Declarator::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Declarator::isInvalidType(), clang::DeclaratorChunk::Paren, clang::SC_None, clang::UnqualifiedId::TemplateName, and clang::Declarator::type_objects().

## ◆ CheckDeductionGuideTemplate()

void Sema::CheckDeductionGuideTemplate | ( | FunctionTemplateDecl * | TD | ) |

Definition at line 4015 of file SemaTemplate.cpp.

References Diag(), clang::Decl::getLocation(), clang::TemplateDecl::getTemplateParameters(), hasVisibleDefaultArgument(), and noteNonDeducibleParameters().

## ◆ CheckDelayedMemberExceptionSpecs()

void Sema::CheckDelayedMemberExceptionSpecs | ( |  | ) |

Definition at line 8249 of file SemaDeclCXX.cpp.

References clang::Equivalent.

Referenced by ActOnEndOfTranslationUnit().

## ◆ CheckDelegatingCtorCycles()

void Sema::CheckDelegatingCtorCycles | ( |  | ) |

Definition at line 17055 of file SemaDeclCXX.cpp.

Referenced by ActOnEndOfTranslationUnit().

## ◆ CheckDependentFunctionTemplateSpecialization()

bool Sema::CheckDependentFunctionTemplateSpecialization | ( | FunctionDecl * | FD,
|  | const TemplateArgumentListInfo & | ExplicitTemplateArgs,
|  | LookupResult & | Previous
| ) |  |

Perform semantic analysis for the given dependent function template specialization.

The only possible way to get a dependent function template specialization is with a friend declaration, like so:

template \<class T> void foo(T);
template \<class T> class A {
friend void foo<>(T);
};

There really isn't any useful analysis we can do here, so we just store the information.

Definition at line 8601 of file SemaTemplate.cpp.

References Diag(), clang::LookupResult::Filter::done(), clang::LookupResult::empty(), clang::LookupResult::Filter::erase(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::DeclContext::getRedeclContext(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::Filter::hasNext(), clang::DeclContext::InEnclosingNamespaceSetOf(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), P, and clang::FunctionDecl::setDependentTemplateSpecialization().

## ◆ CheckDerivedToBaseConversion() [1/2]

bool Sema::CheckDerivedToBaseConversion | ( | QualType | Derived,
|  | QualType | Base,
|  | SourceLocation | Loc,
|  | SourceRange | Range,
|  | CXXCastPath * | BasePath = `nullptr`,
|  | bool | IgnoreAccess = `false`
| ) |  |

Definition at line 2910 of file SemaDeclCXX.cpp.

Referenced by CheckPointerToMemberOperands(), getCastAwayConstnessCastKind(), clang::InitializationSequence::Perform(), and PerformImplicitConversion().

## ◆ CheckDerivedToBaseConversion() [2/2]

bool Sema::CheckDerivedToBaseConversion | ( | QualType | Derived,
|  | QualType | Base,
|  | unsigned | InaccessibleBaseID,
|  | unsigned | AmbigiousBaseConvID,
|  | SourceLocation | Loc,
|  | SourceRange | Range,
|  | DeclarationName | Name,
|  | CXXCastPath * | BasePath,
|  | bool | IgnoreAccess = `false`
| ) |  |

CheckDerivedToBaseConversion - Check whether the Derived-to-Base conversion (where Derived and Base are class types) is well-formed, meaning that the conversion is unambiguous (and that all of the base classes are accessible).

Returns true and emits a diagnostic if the code is ill-formed, returns false otherwise. Loc is the location where this routine should point to if there is an error, and Range is the source range to highlight if there is an error.

If either InaccessibleBaseID or AmbigiousBaseConvID are 0, then the diagnostic for the respective type of error will be suppressed, but the check for ill-formed code will still be performed.

Definition at line 2828 of file SemaDeclCXX.cpp.

## ◆ CheckDestructor()

bool Sema::CheckDestructor | ( | CXXDestructorDecl * | Destructor | ) |

CheckDestructor - Checks a fully-formed destructor definition for well-formedness, issuing any diagnostics required.

Returns true on error.

Definition at line 9883 of file SemaDeclCXX.cpp.

References clang::declaresSameEntity(), Diag(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getLocation(), clang::CXXDestructorDecl::getOperatorDelete(), clang::CXXMethodDecl::getParent(), clang::Decl::isImplicit(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::CXXMethodDecl::isVirtual(), clang::CXXDestructorDecl::setOperatorDelete(), and clang::interp::This().

## ◆ CheckDestructorAccess()

Sema::AccessResult Sema::CheckDestructorAccess | ( | SourceLocation | Loc,
|  | CXXDestructorDecl * | Dtor,
|  | const PartialDiagnostic & | PDiag,
|  | QualType | objectType = `QualType()`
| ) |  |

Definition at line 1589 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, clang::Decl::getAccess(), clang::CXXMethodDecl::getParent(), and clang::QualType::isNull().

Referenced by ActOnCXXDelete(), checkDestructorReference(), MaybeBindToTemporary(), and clang::InitializationSequence::Perform().

## ◆ CheckDestructorDeclarator()

QualType Sema::CheckDestructorDeclarator | ( | Declarator & | D,
|  | QualType | R,
|  | StorageClass & | SC
| ) |  |

CheckDestructorDeclarator - Called by ActOnDeclarator to check the well-formednes of the destructor declarator `D` with type `R`.

If there are any errors in the declarator, this routine will emit diagnostics and set the declarator to invalid. Even if this happens, will be updated to reflect a well-formed type for the destructor and returned.

Definition at line 9938 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), checkMethodTypeQualifiers(), clang::FixItHint::CreateRemoval(), clang::UnqualifiedId::DestructorName, Diag(), clang::DeclaratorChunk::FunctionTypeInfo::freeParams(), clang::FTIHasNonVoidParameters(), clang::Type::getAs(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getName(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::DeclaratorChunk::FunctionTypeInfo::hasRefQualifier(), clang::DeclSpec::hasTypeSpecifier(), clang::Declarator::isInvalidType(), clang::DeclaratorChunk::FunctionTypeInfo::isVariadic, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierIsLValueRef, clang::RQ_None, clang::SC_None, clang::SC_Static, clang::Declarator::setInvalidType(), and clang::FunctionProtoType::ExtProtoInfo::Variadic.

## ◆ CheckDistantExceptionSpec()

bool clang::Sema::CheckDistantExceptionSpec | ( | QualType | T | ) |

CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function with an exception specification.

This means that it is invalid to add another level of indirection.

Definition at line 176 of file SemaExceptionSpec.cpp.

References clang::CPlusPlus17, clang::Type::getAs(), getLangOpts(), clang::Type::getPointeeType(), and clang::FunctionProtoType::hasExceptionSpec().

## ◆ CheckEnableIf()

EnableIfAttr * Sema::CheckEnableIf | ( | FunctionDecl * | Function,
|  | ArrayRef< Expr *> | Args,
|  | bool | MissingImplicitThis = `false`
| ) |  |

Check the enable_if expressions on the given function.

Returns the first failing attribute, or NULL if they were all successful.

Definition at line 6513 of file SemaOverload.cpp.

References convertArgsForAvailabilityChecks(), and clang::Decl::specific_attrs().

Referenced by checkDirectCallValidity().

## ◆ CheckEnumConstant()

EnumConstantDecl * Sema::CheckEnumConstant | ( | EnumDecl * | Enum,
|  | EnumConstantDecl * | LastEnumConst,
|  | SourceLocation | IdLoc,
|  | IdentifierInfo * | Id,
|  | Expr * | val
| ) |  |

Definition at line 17044 of file SemaDecl.cpp.

Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition().

## ◆ CheckEnumRedeclaration()

bool Sema::CheckEnumRedeclaration | ( | SourceLocation | EnumLoc,
|  | bool | IsScoped,
|  | QualType | EnumUnderlyingTy,
|  | bool | IsFixed,
|  | const EnumDecl * | Prev
| ) |  |

Check whether this is a valid redeclaration of a previous enumeration.

Returns
  true if the redeclaration was invalid.

Definition at line 14570 of file SemaDecl.cpp.

References Diag(), clang::EnumDecl::getIntegerType(), clang::Decl::getLocation(), clang::Type::isDependentType(), clang::EnumDecl::isFixed(), and clang::EnumDecl::isScoped().

## ◆ CheckEnumUnderlyingType()

bool Sema::CheckEnumUnderlyingType | ( | TypeSourceInfo * | TI | ) |

Check that this is a valid underlying type for an enum declaration.

Definition at line 14553 of file SemaDecl.cpp.

References Diag(), clang::Type::getAs(), clang::TypeLoc::getBeginLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), and clang::Type::isDependentType().

## ◆ CheckEquivalentExceptionSpec() [1/3]

bool clang::Sema::CheckEquivalentExceptionSpec | ( | FunctionDecl * | Old,
|  | FunctionDecl * | New
| ) |  |

Definition at line 279 of file SemaExceptionSpec.cpp.

References clang::Type::castAs(), clang::CheckEquivalentExceptionSpecImpl(), Context, clang::CPlusPlus17, clang::FixItHint::CreateInsertion(), DelayedEquivalentExceptionSpecChecks, Diag(), clang::EST_BasicNoexcept, clang::EST_DependentNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::EST_MSAny, clang::EST_NoexceptFalse, clang::EST_NoexceptTrue, clang::EST_None, clang::EST_NoThrow, clang::EST_Unevaluated, clang::EST_Uninstantiated, clang::EST_Unparsed, clang::FunctionProtoType::exceptions(), clang::exceptionSpecNotKnownYet(), clang::TypeLoc::getAs(), clang::Type::getAs(), clang::FunctionDecl::getBuiltinID(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::FunctionProtoType::getNoexceptExpr(), clang::FunctionProtoType::getParamTypes(), getPrintingPolicy(), clang::FunctionType::getReturnType(), clang::ASTContext::getSourceManager(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::hasImplicitExceptionSpec(), clang::TypeLoc::IgnoreParens(), clang::FunctionDecl::isExternC(), clang::SourceManager::isInSystemHeader(), clang::SourceLocation::isInvalid(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::SourceLocation::isValid(), PDiag(), clang::Stmt::printPretty(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), and clang::FunctionProtoType::ExtProtoInfo::withExceptionSpec().

Referenced by clang::CheckSpecForTypesEquivalent().

## ◆ CheckEquivalentExceptionSpec() [2/3]

bool clang::Sema::CheckEquivalentExceptionSpec | ( | const FunctionProtoType * | Old,
|  | SourceLocation | OldLoc,
|  | const FunctionProtoType * | New,
|  | SourceLocation | NewLoc
| ) |  |

CheckEquivalentExceptionSpec - Check if the two types have equivalent exception specifications.

Exception specifications are equivalent if they allow exactly the same set of exception types. It does not matter how that is achieved. See C++ [except.spec]p2.

Definition at line 477 of file SemaExceptionSpec.cpp.

References clang::CheckEquivalentExceptionSpecImpl(), getLangOpts(), PDiag(), and clang::Result.

## ◆ CheckEquivalentExceptionSpec() [3/3]

bool clang::Sema::CheckEquivalentExceptionSpec | ( | const PartialDiagnostic & | DiagID,
|  | const PartialDiagnostic & | NoteID,
|  | const FunctionProtoType * | Old,
|  | SourceLocation | OldLoc,
|  | const FunctionProtoType * | New,
|  | SourceLocation | NewLoc
| ) |  |

Definition at line 653 of file SemaExceptionSpec.cpp.

References clang::CheckEquivalentExceptionSpecImpl(), and getLangOpts().

## ◆ CheckExceptionSpecCompatibility()

bool clang::Sema::CheckExceptionSpecCompatibility | ( | Expr * | From,
|  | QualType | ToType
| ) |  |

Definition at line 907 of file SemaExceptionSpec.cpp.

References CheckExceptionSpecSubset(), clang::SourceRange::getBegin(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::GetUnderlyingFunction(), clang::FunctionProtoType::hasDependentExceptionSpec(), and PDiag().

Referenced by clang::InitializationSequence::Perform(), and PerformImplicitConversion().

## ◆ checkExceptionSpecification()

void Sema::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.

Definition at line 17210 of file SemaDeclCXX.cpp.

References collectUnexpandedParameterPacks(), DiagnoseUnexpandedParameterPacks(), clang::EST_Dynamic, clang::FunctionProtoType::ExceptionSpecInfo::Exceptions, clang::Type::getCanonicalTypeUnqualified(), clang::Expr::getType(), clang::isComputedNoexcept(), clang::Expr::isTypeDependent(), and clang::FunctionProtoType::ExceptionSpecInfo::Type.

## ◆ CheckExceptionSpecSubset()

bool clang::Sema::CheckExceptionSpecSubset | ( | const PartialDiagnostic & | DiagID,
|  | const PartialDiagnostic & | NestedDiagID,
|  | const PartialDiagnostic & | NoteID,
|  | const PartialDiagnostic & | NoThrowDiagID,
|  | const FunctionProtoType * | Superset,
|  | SourceLocation | SuperLoc,
|  | const FunctionProtoType * | Subset,
|  | SourceLocation | SubLoc
| ) |  |

CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subset (or equivalent) of the first function type.

This is used by override and pointer assignment checks.

Definition at line 752 of file SemaExceptionSpec.cpp.

References clang::FunctionProtoType::canThrow(), CheckParamExceptionSpec(), clang::CT_Can, clang::CT_Cannot, Diag(), clang::EST_DependentNoexcept, clang::EST_Dynamic, clang::EST_NoThrow, clang::FunctionProtoType::exceptions(), clang::Type::getAs(), clang::PartialDiagnostic::getDiagID(), clang::FunctionProtoType::getExceptionSpecType(), getLangOpts(), handlerCanCatch(), clang::isUnresolvedExceptionSpec(), clang::SourceLocation::isValid(), and ResolveExceptionSpec().

Referenced by CheckExceptionSpecCompatibility(), and CheckOverridingFunctionExceptionSpec().

## ◆ CheckExplicitlyDefaultedComparison()

bool Sema::CheckExplicitlyDefaultedComparison | ( | Scope * | S,
|  | FunctionDecl * | MD,
|  | DefaultedComparisonKind | DCK
| ) |  |

Definition at line 7945 of file SemaDeclCXX.cpp.

References clang::FunctionDecl::DefaultedFunctionInfo::Create(), clang::Decl::getLexicalDeclContext(), clang::FunctionDecl::getOverloadedOperator(), lookupOperatorsForDefaultedComparison(), clang::None, and clang::FunctionDecl::setDefaultedFunctionInfo().

## ◆ CheckExplicitlyDefaultedFunction()

void Sema::CheckExplicitlyDefaultedFunction | ( | Scope * | S,
|  | FunctionDecl * | MD
| ) |  |

Definition at line 6915 of file SemaDeclCXX.cpp.

References clang::Decl::getDeclContext(), clang::DeclContext::isDependentContext(), clang::FunctionDecl::isExplicitlyDefaulted(), and clang::Decl::setInvalidDecl().

## ◆ CheckExplicitlyDefaultedSpecialMember()

bool Sema::CheckExplicitlyDefaultedSpecialMember | ( | CXXMethodDecl * | MD,
|  | CXXSpecialMember | CSM
| ) |  |

Definition at line 6931 of file SemaDeclCXX.cpp.

References Diag(), clang::First, clang::Type::getAs(), clang::CXXMethodDecl::getCanonicalDecl(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getSourceRange(), clang::ValueDecl::getType(), clang::CXXRecordDecl::implicitCopyAssignmentHasConstParam(), clang::CXXRecordDecl::implicitCopyConstructorHasConstParam(), clang::TagDecl::isDependentType(), clang::FunctionDecl::isExplicitlyDefaulted(), and clang::FunctionDecl::isVariadic().

## ◆ CheckExtraCXXDefaultArguments()

void Sema::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.

This routine should be invoked for every declarator that is not a function declaration or definition.

Definition at line 376 of file SemaDeclCXX.cpp.

References clang::DeclaratorChunk::ParamInfo::DefaultArgTokens, Diag(), clang::DeclaratorChunk::Fun, clang::DeclaratorChunk::Function, clang::ParmVarDecl::getDefaultArg(), clang::Decl::getLocation(), clang::Declarator::getNumTypeObjects(), clang::Stmt::getSourceRange(), clang::Declarator::getTypeObject(), clang::ParmVarDecl::hasUnparsedDefaultArg(), clang::Declarator::isFunctionDeclarationContext(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::DeclaratorChunk::Paren, and clang::ParmVarDecl::setDefaultArg().

## ◆ CheckExtVectorCast()

ExprResult Sema::CheckExtVectorCast | ( | SourceRange | R,
|  | QualType | DestTy,
|  | Expr * | CastExpr,
|  | CastKind & | Kind
| ) |  |

Definition at line 6739 of file SemaExpr.cpp.

References clang::Expr::getType(), and clang::Type::isExtVectorType().

Referenced by DiagnoseBadFunctionCast().

## ◆ CheckFieldDecl()

FieldDecl * Sema::CheckFieldDecl | ( | DeclarationName | Name,
|  | QualType | T,
|  | TypeSourceInfo * | TInfo,
|  | RecordDecl * | Record,
|  | SourceLocation | Loc,
|  | bool | Mutable,
|  | Expr * | BitWidth,
|  | InClassInitStyle | InitStyle,
|  | SourceLocation | TSSL,
|  | AccessSpecifier | AS,
|  | NamedDecl * | PrevDecl,
|  | Declarator * | D = `nullptr`
| ) |  |

Build a new FieldDecl and check its well-formedness.

This routine builds a new FieldDecl given the fields name, type, record, etc. `PrevDecl` should refer to any previous declaration with the same name and in the same scope as the field to be created.

Returns
  a new FieldDecl.

Todo:
  The Declarator argument is a hack. It will be removed once

Definition at line 16126 of file SemaDecl.cpp.

Referenced by clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ CheckFloatComparison()

void Sema::CheckFloatComparison | ( | SourceLocation | Loc,
|  | Expr * | LHS,
|  | Expr * | RHS
| ) |  |

Check for comparisons of floating point operands using != and ==.

Issue a warning if these are no self-comparisons, as they are not likely to do what the programmer intended.

Definition at line 10130 of file SemaChecking.cpp.

References Diag(), clang::ASTContext::getCanonicalType(), clang::Type::getCanonicalTypeInternal(), clang::ASTContext::getIntWidth(), clang::ASTContext::getLangOpts(), clang::EnumDecl::getNumNegativeBits(), clang::EnumDecl::getNumPositiveBits(), clang::Stmt::getSourceRange(), clang::QualType::getTypePtr(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isCanonicalUnqualified(), clang::EnumDecl::isFixed(), clang::BuiltinType::isInteger(), clang::BuiltinType::isUnsignedInteger(), max(), and min().

Referenced by checkArithmeticOrEnumeralCompare().

## ◆ CheckForConstantInitializer()

bool Sema::CheckForConstantInitializer | ( | Expr * | e,
|  | QualType | t
| ) |  |

type checking declaration initializers (C99 6.7.8)

Definition at line 10889 of file SemaDecl.cpp.

References clang::Expr::isConstantInitializer().

## ◆ CheckForFunctionRedefinition()

void Sema::CheckForFunctionRedefinition | ( | FunctionDecl * | FD,
|  | const FunctionDecl * | EffectiveDefinition = `nullptr`,
|  | SkipBodyInfo * | SkipBody = `nullptr`
| ) |  |

Definition at line 13485 of file SemaDecl.cpp.

References canRedefineFunction(), clang::declaresSameEntity(), Diag(), clang::Decl::FOK_None, clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::NamedDecl::getFormalLinkage(), clang::Decl::getFriendObjectKind(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::FunctionDecl::getStorageClass(), clang::GNUMode, clang::InternalLinkage, clang::NamedDecl::isCXXClassMember(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isInlined(), clang::FunctionDecl::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::Sema::SkipBodyInfo::Previous, clang::Redeclarable< decl_type >::redecls(), clang::SC_Extern, clang::Decl::setInvalidDecl(), and clang::Sema::SkipBodyInfo::ShouldSkip.

Referenced by clang::Parser::ParseTopLevelDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ CheckForwardProtocolDeclarationForCircularDependency()

bool Sema::CheckForwardProtocolDeclarationForCircularDependency | ( | IdentifierInfo * | PName,
|  | SourceLocation & | PLoc,
|  | SourceLocation | PrevLoc,
|  | const ObjCList< ObjCProtocolDecl > & | PList
| ) |  |

Definition at line 1180 of file SemaDeclObjC.cpp.

References clang::ObjCList< T >::begin(), Diag(), clang::ObjCList< T >::end(), and LookupProtocol().

Referenced by ActOnStartProtocolInterface().

## ◆ CheckFriendAccess()

Sema::AccessResult Sema::CheckFriendAccess | ( | NamedDecl * | D | ) |

Checks access to the target of a friend declaration.

Definition at line 1771 of file SemaAccess.cpp.

References clang::transformer::access(), AR_accessible, clang::AS_public, clang::Decl::getAccess(), and clang::Decl::getAsFunction().

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ CheckFriendTypeDecl()

FriendDecl * Sema::CheckFriendTypeDecl | ( | SourceLocation | LocStart,
|  | SourceLocation | FriendLoc,
|  | TypeSourceInfo * | TSInfo
| ) |  |

Perform semantic analysis of the given friend type declaration.

Returns
  A friend declaration that.

Definition at line 15671 of file SemaDeclCXX.cpp.

References clang::CPlusPlus11, clang::FriendDecl::Create(), clang::FixItHint::CreateInsertion(), Diag(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::TagDecl::getKindName(), clang::TypeLoc::getLocalSourceRange(), clang::TagDecl::getTagKind(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), and clang::Type::isElaboratedTypeSpecifier().

## ◆ CheckFunctionConstraints()

bool Sema::CheckFunctionConstraints | ( | const FunctionDecl * | FD,
|  | ConstraintSatisfaction & | Satisfaction,
|  | SourceLocation | UsageLoc = `SourceLocation()`
| ) |  |

Check whether the given function decl's trailing requires clause is satisfied, if any.

Returns false and updates Satisfaction with the satisfaction verdict if successful, emits a diagnostic and returns true if an error occured and satisfaction could not be determined.

Returns
  true if an error occurred, false otherwise.

Definition at line 324 of file SemaConcept.cpp.

References CheckConstraintSatisfaction(), clang::Decl::getLocation(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::Expr::isInstantiationDependent(), and clang::SourceLocation::isValid().

## ◆ CheckFunctionDeclaration()

bool Sema::CheckFunctionDeclaration | ( | Scope * | S,
|  | FunctionDecl * | NewFD,
|  | LookupResult & | Previous,
|  | bool | IsMemberSpecialization
| ) |  |

Perform semantic checking of a new function declaration.

Performs semantic analysis of the new function declaration NewFD. This routine performs all semantic checking that does not require the actual declarator involved in the declaration, and is used both for the declaration of functions as they are parsed (called via ActOnDeclarator) and for the declaration of functions that have been instantiated via C++ template instantiation (called via InstantiateDecl).

Parameters

  IsMemberSpecialization | whether this new function declaration is a member specialization (that replaces any definition provided by the previous declaration).

This sets NewFD->isInvalidDecl() to true if there was an error.

Returns
  true if the function declaration is a redeclaration.

Definition at line 10368 of file SemaDecl.cpp.

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ CheckFunctionOrTemplateParamDeclarator()

void Sema::CheckFunctionOrTemplateParamDeclarator | ( | Scope * | S,
|  | Declarator & | D
| ) |  |

Common checks for a parameter-declaration that should apply to both function parameters and non-type template parameters.

Definition at line 13091 of file SemaDecl.cpp.

## ◆ CheckFunctionReturnType()

bool Sema::CheckFunctionReturnType | ( | QualType | T,
|  | SourceLocation | Loc
| ) |  |

Definition at line 2503 of file SemaType.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isHalfType(), clang::Type::isObjCObjectType(), and clang::QualType::isVolatileQualified().

## ◆ CheckFunctionTemplateSpecialization()

bool Sema::CheckFunctionTemplateSpecialization | ( | FunctionDecl * | FD,
|  | TemplateArgumentListInfo * | ExplicitTemplateArgs,
|  | LookupResult & | Previous,
|  | bool | QualifiedFriend = `false`
| ) |  |

Perform semantic analysis for the given function template specialization.

This routine performs all of the semantic analysis required for an explicit function template specialization. On successful completion, the function declaration `FD` will become a function template specialization.

Parameters

  FD | the function declaration, which will be updated to become a function template specialization.
  ExplicitTemplateArgs | the explicitly-provided template arguments, if any. Note that this may be valid info even when 0 arguments are explicitly provided as in, e.g., `void` sort<>(char*, char*); as it anyway contains info on the angle brackets locations.
  Previous | the set of declarations that may be specialized by this function specialization.
  QualifiedFriend | whether this is a lookup for a qualified friend declaration with no explicit template argument list that might be befriending a function template specialization.

Definition at line 8664 of file SemaTemplate.cpp.

References clang::Qualifiers::addConst(), clang::LookupResult::begin(), clang::Type::castAs(), clang::LookupResult::end(), clang::Decl::getDeclContext(), clang::FunctionProtoType::getExtProtoInfo(), clang::Decl::getLocation(), clang::DeclContext::getRedeclContext(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::DeclContext::InEnclosingNamespaceSetOf(), clang::CXXMethodDecl::isConst(), clang::FunctionDecl::isConstexpr(), and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ CheckGNUVectorConditionalTypes()

QualType Sema::CheckGNUVectorConditionalTypes | ( | ExprResult & | Cond,
|  | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | QuestionLoc
| ) |  |

Definition at line 5765 of file SemaExprCXX.cpp.

References ACK_Conditional, CheckVectorOperands(), Context, DefaultFunctionArrayLvalueConversion(), Diag(), clang::VectorType::GenericVector, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::QualType::getCanonicalType(), clang::VectorType::getNumElements(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::ASTContext::getVectorType(), clang::ASTContext::hasSameType(), ImpCastExprToType(), clang::Type::isEnumeralType(), and UsualArithmeticConversions().

Referenced by CXXCheckConditionalOperands().

## ◆ CheckIfOverriddenFunctionIsMarkedFinal()

bool Sema::CheckIfOverriddenFunctionIsMarkedFinal | ( | const CXXMethodDecl * | New,
|  | const CXXMethodDecl * | Old
| ) |  |

CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4.

CheckIfOverriddenFunctionIsMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4.

Definition at line 3064 of file SemaDeclCXX.cpp.

References Diag(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), and clang::Decl::getLocation().

## ◆ checkIllFormedTrivialABIStruct()

void Sema::checkIllFormedTrivialABIStruct | ( | CXXRecordDecl & | RD | ) |

Check that the C++ class annoated with "trivial_abi" satisfies all the conditions that are needed for the attribute to have an effect.

Definition at line 9425 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::bases(), canPassInRegisters(), Diag(), clang::Decl::dropAttr(), clang::RecordDecl::fields(), clang::Type::getAs(), clang::Decl::getAttr(), clang::Type::getBaseElementTypeUnsafe(), clang::QualType::getObjCLifetime(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::CXXRecordDecl::isPolymorphic(), clang::isTemplateInstantiation(), and clang::Qualifiers::OCL_Weak.

## ◆ CheckImplementationIvars()

void Sema::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.

Check case of non-existing @interface decl. (legacy objective-c @implementation decl without an @interface decl). Add implementations's ivar to the synthesize class's ivar list.

Definition at line 2110 of file SemaDeclObjC.cpp.

References clang::DeclContext::addDecl(), Context, Diag(), clang::Stmt::getBeginLoc(), clang::FieldDecl::getBitWidth(), clang::FieldDecl::getBitWidthValue(), clang::ObjCImplDecl::getClassInterface(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getIvarDecl(), clang::Decl::getLocation(), clang::ObjCImplementationDecl::getSuperClass(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::FieldDecl::isBitField(), clang::ObjCInterfaceDecl::isImplicitInterfaceDecl(), clang::ObjCRuntime::isNonFragile(), clang::ObjCInterfaceDecl::ivar_begin(), clang::ObjCInterfaceDecl::ivar_end(), LangOpts, clang::DeclContext::makeDeclVisibleInContext(), clang::LangOptions::ObjCRuntime, clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), clang::Decl::setLexicalDeclContext(), and clang::ObjCInterfaceDecl::visible_extensions().

## ◆ CheckImplicitSpecialMemberDeclaration()

void Sema::CheckImplicitSpecialMemberDeclaration | ( | Scope * | S,
|  | FunctionDecl * | FD
| ) |  |

Check a completed declaration of an implicit special member.

Definition at line 12543 of file SemaDeclCXX.cpp.

## ◆ CheckInheritingConstructorUsingDecl()

bool Sema::CheckInheritingConstructorUsingDecl | ( | UsingDecl * | UD | ) |

Additional checks for a using declaration referring to a constructor name.

Definition at line 11827 of file SemaDeclCXX.cpp.

References Diag(), findDirectBaseWithType(), clang::NestedNameSpecifier::getAsType(), clang::UsingDecl::getNameInfo(), clang::UsingDecl::getQualifier(), clang::DeclarationNameInfo::getSourceRange(), clang::UsingDecl::getUsingLoc(), clang::UsingDecl::hasTypename(), clang::CXXBaseSpecifier::setInheritConstructors(), and clang::Decl::setInvalidDecl().

## ◆ checkInitializerLifetime()

void Sema::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.

Definition at line 7323 of file SemaInit.cpp.

References clang::InitializedEntity::allocateManglingNumber(), Diag(), DiagnoseNarrowingInInitList(), clang::SourceRange::getBegin(), clang::InitializedEntity::getDecl(), clang::NamedDecl::getDeclName(), getEntityLifetime(), clang::MaterializeTemporaryExpr::getExtendingDecl(), clang::Decl::getLocation(), clang::InitializedEntity::getParent(), clang::InitializedEntity::getType(), clang::ValueDecl::getType(), clang::Expr::isGLValue(), clang::Decl::isImplicit(), clang::Type::isReferenceType(), clang::SourceLocation::isValid(), nextPathEntryRange(), pathContainsInit(), pathOnlyInitializesGslPointer(), shouldLifetimeExtendThroughPath(), visitLocalsRetainedByInitializer(), and visitLocalsRetainedByReferenceBinding().

Referenced by CollectFieldInitializer().

## ◆ checkInitMethod()

bool Sema::checkInitMethod | ( | ObjCMethodDecl * | method,
|  | QualType | receiverTypeIfCall
| ) |  |

Check whether the given method, which must be in the 'init' family, is a valid member of that family.

Parameters

  receiverTypeIfCall | - if null, check this as if declaring it; if non-null, check this as if making a call to it with the given receiver type

Returns
  true to indicate that there was an error and appropriate actions were taken

Definition at line 41 of file SemaDeclObjC.cpp.

References clang::Decl::addAttr(), clang::Type::castAs(), Context, Diag(), clang::ObjCMethodDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::ObjCObjectType::getInterface(), clang::Decl::getLocation(), getObjectType(), clang::ObjCMethodDecl::getReturnType(), getSourceManager(), clang::ObjCInterfaceDecl::hasDefinition(), clang::SourceManager::isInSystemHeader(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::ObjCObjectType::isObjCClass(), clang::ObjCObjectType::isObjCId(), clang::ObjCInterfaceDecl::isSuperClassOf(), and clang::Decl::setInvalidDecl().

Referenced by CheckARCMethodDecl().

## ◆ CheckInstantiatedFunctionTemplateConstraints()

bool Sema::CheckInstantiatedFunctionTemplateConstraints | ( | SourceLocation | PointOfInstantiation,
|  | FunctionDecl * | Decl,
|  | ArrayRef< TemplateArgument > | TemplateArgs,
|  | ConstraintSatisfaction & | Satisfaction
| ) |  |

Definition at line 4229 of file SemaTemplateInstantiateDecl.cpp.

References addInstantiatedParametersToScope(), CheckConstraintSatisfaction(), clang::TemplateDecl::getAssociatedConstraints(), clang::FunctionDecl::getPointOfInstantiation(), clang::FunctionDecl::getPrimaryTemplate(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::ConstraintSatisfaction::IsSatisfied, and clang::FunctionDecl::isTemplateInstantiation().

## ◆ CheckLiteralKind()

Sema::ObjCLiteralKind Sema::CheckLiteralKind | ( | Expr * | FromE | ) |

Definition at line 10267 of file SemaExpr.cpp.

References clang::Stmt::getStmtClass(), and clang::Expr::IgnoreParenImpCasts().

Referenced by checkUnsafeAssignLiteral(), and diagnoseObjCLiteralComparison().

## ◆ CheckLiteralOperatorDeclaration()

bool Sema::CheckLiteralOperatorDeclaration | ( | FunctionDecl * | FnDecl | ) |

CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is well-formed.

If so, returns false; otherwise, emits appropriate diagnostics and returns true.

Definition at line 15167 of file SemaDeclCXX.cpp.

References checkLiteralOperatorTemplateParameterList(), Diag(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::DeclContext::getExternCContext(), clang::Decl::getLocation(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getPrimaryTemplate(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::FunctionDecl::isExternC(), clang::Type::isSpecificBuiltinType(), and clang::FunctionDecl::param_size().

## ◆ checkLiteralOperatorId()

bool Sema::checkLiteralOperatorId | ( | const CXXScopeSpec & | SS,
|  | const UnqualifiedId & | Id
| ) |  |

Definition at line 407 of file SemaExprCXX.cpp.

## ◆ CheckLogicalOperands()

QualType Sema::CheckLogicalOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | BinaryOperatorKind | Opc
| ) |  |
| inline

Definition at line 11458 of file SemaExpr.cpp.

References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::SourceLocation::isMacroID().

## ◆ CheckLookupAccess()

void Sema::CheckLookupAccess | ( | const LookupResult & | R | ) |

Checks access to all the declarations in the given result set.

Definition at line 1861 of file SemaAccess.cpp.

References clang::AS_public, clang::LookupResult::begin(), clang::LookupResult::end(), and clang::LookupResult::getNamingClass().

Referenced by clang::LookupResult::setFindLocalExtern().

## ◆ CheckLoopHintExpr()

bool Sema::CheckLoopHintExpr | ( | Expr * | E,
|  | SourceLocation | Loc
| ) |  |

Definition at line 3485 of file SemaExpr.cpp.

References Diag(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isBooleanType(), clang::Type::isCharType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Expr::isValueDependent().

## ◆ CheckLValueToRValueConversionOperand()

ExprResult Sema::CheckLValueToRValueConversionOperand | ( | Expr * | E | ) |

Definition at line 16756 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isVolatileQualified(), clang::NOUR_Constant, NTCUC_LValueToRValueVolatile, and rebuildPotentialResultsAsNonOdrUsed().

## ◆ CheckMain()

void Sema::CheckMain | ( | FunctionDecl * | FD,
|  | const DeclSpec & | D
| ) |  |

Definition at line 10714 of file SemaDecl.cpp.

References clang::Type::castAs(), clang::CC_C, clang::FixItHint::CreateRemoval(), clang::CSK_unspecified, Diag(), clang::DeclSpec::getConstexprSpecLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::Decl::getLocation(), clang::DeclSpec::getNoreturnSpecLoc(), clang::FunctionDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpecLoc(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::Type::isFunctionType(), clang::FunctionDecl::isInlineSpecified(), clang::DeclSpec::isNoreturnSpecified(), clang::OpenCL, clang::SC_Static, clang::FunctionDecl::setConstexprKind(), and clang::Decl::setInvalidDecl().

## ◆ CheckMemberAccess()

Sema::AccessResult Sema::CheckMemberAccess | ( | SourceLocation | UseLoc,
|  | CXXRecordDecl * | NamingClass,
|  | DeclAccessPair | Found
| ) |  |

Checks access to a member.

Definition at line 1718 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, and clang::DeclAccessPair::getAccess().

## ◆ CheckMemberOperatorAccess()

Sema::AccessResult Sema::CheckMemberOperatorAccess | ( | SourceLocation | OpLoc,
|  | Expr * | ObjectExpr,
|  | Expr * | ArgExpr,
|  | DeclAccessPair | Found
| ) |  |

Checks access to an overloaded member operator, including conversion operators.

Definition at line 1750 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, clang::Type::castAs(), clang::DeclAccessPair::getAccess(), clang::RecordType::getDecl(), and clang::Expr::getType().

Referenced by diagnoseNoViableConversion(), clang::InitializationSequence::Perform(), and recordConversion().

## ◆ CheckMemberPointerConversion()

bool Sema::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.

This routine checks for ambiguous or virtual or inaccessible base-to-derived member pointer conversions for which IsMemberPointerConversion has already returned true. It returns true and produces a diagnostic if there was an error, or returns false otherwise.

Definition at line 3100 of file SemaOverload.cpp.

References clang::Type::getAs(), clang::Expr::getType(), and clang::Expr::isNullPointerConstant().

Referenced by PerformImplicitConversion().

## ◆ CheckMemberSpecialization()

bool Sema::CheckMemberSpecialization | ( | NamedDecl * | Member,
|  | LookupResult & | Previous
| ) |  |

Perform semantic analysis for the given non-template member specialization.

This routine performs all of the semantic analysis required for an explicit member function specialization. On successful completion, the function declaration `FD` will become a member function specialization.

Parameters

  Member | the member declaration, which will be updated to become a specialization.
  Previous | the set of declarations, one of which may be specialized by this function specialization; the set will be modified to contain the redeclared member.

Definition at line 8899 of file SemaTemplate.cpp.

References clang::LookupResult::begin(), clang::LookupResult::empty(), and clang::LookupResult::end().

## ◆ CheckMessageArgumentTypes()

bool Sema::CheckMessageArgumentTypes | ( | const Expr * | Receiver,
|  | QualType | ReceiverType,
|  | MultiExprArg | Args,
|  | Selector | Sel,
|  | ArrayRef< SourceLocation > | SelectorLocs,
|  | ObjCMethodDecl * | Method,
|  | bool | isClassMessage,
|  | bool | isSuperMessage,
|  | SourceLocation | lbrac,
|  | SourceLocation | rbrac,
|  | SourceRange | RecRange,
|  | QualType & | ReturnType,
|  | ExprValueKind & | VK
| ) |  |

CheckMessageArgumentTypes - Check types in an Obj-C message send.

Parameters

  | Method | - May be null.
  [out] | ReturnType | - The return type of the send.

Returns
  true iff there were any incompatible types.

Definition at line 1587 of file SemaExprObjC.cpp.

References clang::FixItHint::CreateReplacement(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Selector::getAsString(), clang::SourceRange::getBegin(), clang::ObjCMethodDecl::getSelector(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::SourceRange::isInvalid(), clang::Decl::isInvalidDecl(), and clang::Selector::isUnarySelector().

## ◆ CheckMicrosoftIfExistsSymbol() [1/2]

Sema::IfExistsResult Sema::CheckMicrosoftIfExistsSymbol | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | const DeclarationNameInfo & | TargetNameInfo
| ) |  |

Definition at line 8287 of file SemaExprCXX.cpp.

References clang::LookupResult::Ambiguous, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::DeclarationNameInfo::getName(), clang::LookupResult::getResultKind(), IER_Dependent, IER_DoesNotExist, IER_Exists, clang::DeclarationName::isDependentName(), LookupAnyName, LookupParsedName(), NotForRedeclaration, clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, and clang::LookupResult::suppressDiagnostics().

## ◆ CheckMicrosoftIfExistsSymbol() [2/2]

Sema::IfExistsResult Sema::CheckMicrosoftIfExistsSymbol | ( | Scope * | S,
|  | SourceLocation | KeywordLoc,
|  | bool | IsIfExists,
|  | CXXScopeSpec & | SS,
|  | UnqualifiedId & | Name
| ) |  |

Definition at line 8322 of file SemaExprCXX.cpp.

## ◆ checkMSInheritanceAttrOnDefinition()

bool clang::Sema::checkMSInheritanceAttrOnDefinition | ( | CXXRecordDecl * | RD,
|  | SourceRange | Range,
|  | bool | BestCase,
|  | MSInheritanceModel | SemanticSpelling
| ) |  |

## ◆ CheckMSVCRTEntryPoint()

void Sema::CheckMSVCRTEntryPoint | ( | FunctionDecl * | FD | ) |

Definition at line 10869 of file SemaDecl.cpp.

References clang::Type::castAs(), Diag(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::ValueDecl::getType(), clang::Type::isFunctionType(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::setHasImplicitReturnZero(), and clang::Decl::setInvalidDecl().

## ◆ CheckMultiplyDivideOperands()

QualType Sema::CheckMultiplyDivideOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | bool | IsCompAssign,
|  | bool | IsDivide
| ) |  |

Definition at line 9400 of file SemaExpr.cpp.

References checkArithmeticNull(), DiagnoseBadDivideOrRemainderValues(), DiagnoseDivisionSizeofPointerOrArray(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::QualType::isNull().

## ◆ CheckNonDependentConversions()

bool Sema::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 [temp.deduct.call]p10.

Definition at line 7020 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::allocateConversionSequences(), clang::OverloadCandidateSet::getLocation(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Type::isDependentType(), clang::QualType::isNull(), min(), clang::Reversed, TryCopyInitialization(), TryObjectArgumentInitialization(), and Unevaluated.

## ◆ checkNonTrivialCUnion()

void Sema::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.

Definition at line 11665 of file SemaDecl.cpp.

References clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), and clang::QualType::hasNonTrivialToPrimitiveDestructCUnion().

Referenced by markEscapingByrefs().

## ◆ checkNonTrivialCUnionInInitializer()

void Sema::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.

Definition at line 11416 of file SemaDecl.cpp.

References clang::Expr::getType(), clang::Decl::hasAttr(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), and clang::SourceLocation::isValid().

## ◆ CheckNontrivialField()

bool Sema::CheckNontrivialField | ( | FieldDecl * | FD | ) |

Definition at line 16327 of file SemaDecl.cpp.

References clang::CPlusPlus, clang::ValueDecl::getType(), clang::Type::isDependentType(), and clang::Decl::isInvalidDecl().

## ◆ CheckNonTypeTemplateParameterType() [1/2]

QualType Sema::CheckNonTypeTemplateParameterType | ( | TypeSourceInfo *& | TSI,
|  | SourceLocation | Loc
| ) |  |

Check that the type of a non-type template parameter is well-formed.

Returns
  the (possibly-promoted) parameter type if valid; otherwise, produces a diagnostic and returns a NULL type.

Definition at line 1212 of file SemaTemplate.cpp.

References clang::TypeSourceInfo::getType(), and clang::Type::isUndeducedType().

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ CheckNonTypeTemplateParameterType() [2/2]

QualType Sema::CheckNonTypeTemplateParameterType | ( | QualType | T,
|  | SourceLocation | Loc
| ) |  |

Definition at line 1226 of file SemaTemplate.cpp.

References Diag(), clang::QualType::getUnqualifiedType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isIntegralOrEnumerationType(), clang::Type::isMemberPointerType(), clang::Type::isNullPtrType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::Type::isUndeducedType(), and clang::Type::isVariablyModifiedType().

## ◆ checkNSReturnsRetainedReturnType()

bool clang::Sema::checkNSReturnsRetainedReturnType | ( | SourceLocation | loc,
|  | QualType | type
| ) |  |

Referenced by handleFunctionTypeAttr().

## ◆ CheckObjCARCUnavailableWeakConversion()

bool Sema::CheckObjCARCUnavailableWeakConversion | ( | QualType | castType,
|  | QualType | ExprType
| ) |  |

Definition at line 4432 of file SemaExprObjC.cpp.

Referenced by DiagnoseBadFunctionCast(), and PerformImplicitConversion().

## ◆ CheckObjCBridgeRelatedCast()

void Sema::CheckObjCBridgeRelatedCast | ( | QualType | castType,
|  | Expr * | castExpr
| ) |  |

Definition at line 4039 of file SemaExprObjC.cpp.

References ACTC_coreFoundation, ACTC_retainable, clang::ast_matchers::castExpr, classifyTypeForARCConversion(), clang::Stmt::getBeginLoc(), and clang::Expr::getType().

## ◆ checkObjCBridgeRelatedComponents()

bool Sema::checkObjCBridgeRelatedComponents | ( | SourceLocation | Loc,
|  | QualType | DestType,
|  | QualType | SrcType,
|  | ObjCInterfaceDecl *& | RelatedClass,
|  | ObjCMethodDecl *& | ClassMethod,
|  | ObjCMethodDecl *& | InstanceMethod,
|  | TypedefNameDecl *& | TDNDecl,
|  | bool | CfToNs,
|  | bool | Diagnose = `true`
| ) |  |

Definition at line 4077 of file SemaExprObjC.cpp.

References Diag(), clang::Decl::getBeginLoc(), clang::TypeDecl::getBeginLoc(), clang::LookupResult::getFoundDecl(), LookupOrdinaryName, ObjCBridgeRelatedAttrFromType(), and clang::Target.

## ◆ CheckObjCBridgeRelatedConversions()

bool Sema::CheckObjCBridgeRelatedConversions | ( | SourceLocation | Loc,
|  | QualType | DestType,
|  | QualType | SrcType,
|  | Expr *& | SrcExpr,
|  | bool | Diagnose = `true`
| ) |  |

Definition at line 4151 of file SemaExprObjC.cpp.

References ACTC_coreFoundation, ACTC_retainable, classifyTypeForARCConversion(), clang::FixItHint::CreateInsertion(), Diag(), clang::Selector::getAsString(), clang::Decl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::TypeDecl::getBeginLoc(), clang::Stmt::getEndLoc(), clang::NamedDecl::getNameAsString(), and clang::ObjCMethodDecl::getSelector().

Referenced by clang::InitializationSequence::InitializeFrom().

## ◆ CheckObjCConversion()

Sema::ARCConversionResult Sema::CheckObjCConversion | ( | SourceRange | castRange,
|  | QualType | castType,
|  | Expr *& | op,
|  | CheckedConversionKind | CCK,
|  | bool | Diagnose = `true`,
|  | bool | DiagnoseCFAudited = `false`,
|  | BinaryOperatorKind | Opc = `BO_PtrMemD`
| ) |  |

Checks for invalid conversions and casts between retainable pointers and other pointer kinds for ARC and Weak.

Definition at line 4246 of file SemaExprObjC.cpp.

References ACTC_none, ACTC_retainable, classifyTypeForARCConversion(), Diag(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Expr::getExprLoc(), clang::QualType::getObjCLifetime(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::QualType::getTypePtr(), isAnyCLike(), clang::Type::isIntegralType(), clang::SourceRange::isValid(), and clang::Qualifiers::OCL_None.

Referenced by CheckKeyForObjCARCConversion(), and PerformImplicitConversion().

## ◆ CheckObjCDeclScope()

bool Sema::CheckObjCDeclScope | ( | Decl * | D | ) |

Checks that the Objective-C declaration is declared in the global scope.

Emits an error and marks the declaration as invalid if it's not declared in the global scope.

Definition at line 4962 of file SemaDeclObjC.cpp.

References CurContext, Diag(), getCurLexicalContext(), clang::Decl::getLocation(), clang::DeclContext::getRedeclContext(), and clang::Decl::setInvalidDecl().

Referenced by ActOnCompatibilityAlias(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), and ActOnStartProtocolInterface().

## ◆ CheckObjCForCollectionOperand()

ExprResult Sema::CheckObjCForCollectionOperand | ( | SourceLocation | forLoc,
|  | Expr * | collection
| ) |  |

Definition at line 1827 of file SemaStmt.cpp.

References Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::ObjCObjectType::getInterface(), clang::ObjCObjectPointerType::getObjectType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::ast_matchers::pointerType, and clang::ObjCProtocolQualifiers< T >::qual_empty().

## ◆ CheckObjCMethodDirectOverrides()

void Sema::CheckObjCMethodDirectOverrides | ( | ObjCMethodDecl * | method,
|  | ObjCMethodDecl * | overridden
| ) |  |

Definition at line 4348 of file SemaDeclObjC.cpp.

References Diag(), clang::Decl::getAttr(), clang::Decl::getDeclContext(), and clang::Decl::getLocation().

Referenced by CheckObjCMethodOverrides().

## ◆ CheckObjCMethodOverride()

void Sema::CheckObjCMethodOverride | ( | ObjCMethodDecl * | NewMethod,
|  | const ObjCMethodDecl * | Overridden
| ) |  |

Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited.

Definition at line 135 of file SemaDeclObjC.cpp.

References Context, Diag(), diagnoseNoescape(), clang::Decl::getDeclContext(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getReturnTypeSourceRange(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().

## ◆ CheckObjCMethodOverrides()

void Sema::CheckObjCMethodOverrides | ( | ObjCMethodDecl * | ObjCMethod,
|  | ObjCInterfaceDecl * | CurrentClass,
|  | ResultTypeCompatibilityKind | RTC
| ) |  |

Definition at line 4360 of file SemaDeclObjC.cpp.

References CheckObjCMethodDirectOverrides(), clang::Decl::getDeclContext(), clang::ObjCMethodDecl::getSelector(), and MethodPool.

Referenced by ProcessPropertyDecl().

## ◆ CheckObjCPropertyAttributes()

void Sema::CheckObjCPropertyAttributes | ( | Decl * | PropertyPtrTy,
|  | SourceLocation | Loc,
|  | unsigned & | Attributes,
|  | bool | propertyInPrimaryClass
| ) |  |

Ensure attributes are consistent with type.

Parameters

  [in,out] | Attributes | The attributes to check; they will be modified to be consistent with `PropertyTy`.

Definition at line 2617 of file SemaObjCProperty.cpp.

References Context, Diag(), clang::ObjCDeclSpec::DQ_PR_assign, clang::ObjCDeclSpec::DQ_PR_atomic, clang::ObjCDeclSpec::DQ_PR_copy, clang::ObjCDeclSpec::DQ_PR_nonatomic, clang::ObjCDeclSpec::DQ_PR_readonly, clang::ObjCDeclSpec::DQ_PR_readwrite, clang::ObjCDeclSpec::DQ_PR_retain, clang::ObjCDeclSpec::DQ_PR_setter, clang::ObjCDeclSpec::DQ_PR_strong, clang::ObjCDeclSpec::DQ_PR_unsafe_unretained, clang::ObjCDeclSpec::DQ_PR_weak, clang::LangOptions::GCOnly, getLangOpts(), getOwnershipRule(), clang::ObjCPropertyDecl::getType(), clang::Decl::hasAttr(), clang::Decl::isInvalidDecl(), clang::LangOptions::NonGC, clang::NonNull, clang::ObjCPropertyDecl::OBJC_PR_strong, clang::Decl::setInvalidDecl(), and clang::ObjCPropertyDecl::setPropertyAttributes().

## ◆ CheckOMPRequiresDecl()

OMPRequiresDecl * Sema::CheckOMPRequiresDecl | ( | SourceLocation | Loc,
|  | ArrayRef< OMPClause *> | Clauses
| ) |  |

Check restrictions on Requires directive.

For target specific clauses, the requires directive cannot be specified after the handling of any of the target regions in the current compilation unit.

Definition at line 2795 of file SemaOpenMP.cpp.

References clang::OMPRequiresDecl::Create(), Diag(), DSAStack, and clang::getOpenMPClauseName().

## ◆ CheckOMPThreadPrivateDecl()

OMPThreadPrivateDecl * Sema::CheckOMPThreadPrivateDecl | ( | SourceLocation | Loc,
|  | ArrayRef< Expr *> | VarList
| ) |  |

Builds a new OpenMPThreadPrivateDecl and checks its correctness.

Definition at line 2538 of file SemaOpenMP.cpp.

## ◆ checkOpenCLDisabledDecl()

bool Sema::checkOpenCLDisabledDecl | ( | const NamedDecl & | D,
|  | const Expr & | E
| ) |  |

Check if declaration `D` used by expression `E` is disabled due to required OpenCL extensions being disabled.

If so, emit diagnostics.

Returns
  true if type is disabled.

Definition at line 2339 of file Sema.cpp.

References clang::Stmt::getBeginLoc(), clang::NamedDecl::getIdentifier(), and clang::Decl::getSourceRange().

## ◆ checkOpenCLDisabledTypeDeclSpec()

bool Sema::checkOpenCLDisabledTypeDeclSpec | ( | const DeclSpec & | DS,
|  | QualType | T
| ) |  |

Check if type `T` corresponding to declaration specifier `DS` is disabled due to required OpenCL extensions being disabled.

If so, emit diagnostics.

Returns
  true if type is disabled.

Definition at line 2315 of file Sema.cpp.

References clang::Type::castAs(), clang::QualType::getCanonicalType(), clang::QualType::getTypePtr(), clang::DeclSpec::getTypeSpecTypeLoc(), and clang::Type::isExtVectorType().

## ◆ checkOpenMPDeclareVariantFunction()

Optional< std::pair< FunctionDecl *, Expr * > > Sema::checkOpenMPDeclareVariantFunction | ( | Sema::DeclGroupPtrTy | DG,
|  | Expr * | VariantRef,
|  | SourceRange | SR
| ) |  |

Checks '#pragma omp declare variant' variant function and original functions after parsing of the associated method/function.

Parameters

  DG | Function declaration to which declare variant directive is applied to.
  VariantRef | Expression that references the variant function, which must be used instead of the original one, specified in `DG`.

Returns
  None, if the function/variant function are not compatible with the pragma, pair of original function/variant ref expression otherwise.

Definition at line 5268 of file SemaOpenMP.cpp.

References Diag(), clang::OpaquePtr< PtrTy >::get(), clang::SourceRange::getBegin(), clang::Decl::getLocation(), and clang::None.

## ◆ CheckOpenMPLinearDecl()

bool Sema::CheckOpenMPLinearDecl | ( | const ValueDecl * | D,
|  | SourceLocation | ELoc,
|  | OpenMPLinearClauseKind | LinKind,
|  | QualType | Type
| ) |  |

Checks that the specified declaration matches requirements for the linear decls.

Definition at line 14332 of file SemaOpenMP.cpp.

References Diag(), clang::QualType::getCanonicalType(), clang::QualType::getNonReferenceType(), clang::getOpenMPSimpleClauseTypeName(), clang::QualType::getTypePtrOrNull(), clang::QualType::getUnqualifiedType(), clang::Type::isReferenceType(), and rejectConstNotMutableType().

## ◆ CheckOpenMPLinearModifier()

bool Sema::CheckOpenMPLinearModifier | ( | OpenMPLinearClauseKind | LinKind,
|  | SourceLocation | LinLoc
| ) |  |

Checks correctness of linear modifiers.

Definition at line 14322 of file SemaOpenMP.cpp.

References Diag(), and clang::OMPC_LINEAR_unknown.

Referenced by parseDeclareSimdClauses().

## ◆ CheckOverload()

Sema::OverloadKind Sema::CheckOverload | ( | Scope * | S,
|  | FunctionDecl * | New,
|  | const LookupResult & | Old,
|  | NamedDecl *& | Match,
|  | bool | NewIsUsingDecl
| ) |  |

Determine whether the given New declaration is an overload of the declarations in Old.

This routine returns Ovl_Match or Ovl_NonFunction if New and Old cannot be overloaded, e.g., if New has the same signature as some function in Old (C++ 1.3.10) or if the Old declarations aren't functions (or function templates) at all. When it does return Ovl_Match or Ovl_NonFunction, MatchedDecl will point to the decl that New cannot be overloaded with. This decl may be a UsingShadowDecl on top of the underlying declaration.

Example: Given the following input:

void f(int, float); // #1 void f(int, int); // #2 int f(int, int); // #3

When we process #1, there is no previous declaration of "f", so IsOverload will not be used.

When we process #2, Old contains only the FunctionDecl for #1. By comparing the parameter types, we see that #1 and #2 are overloaded (since they have different signatures), so this routine returns Ovl_Overload; MatchedDecl is unchanged.

When we process #3, Old is an overload set containing #1 and #2. We compare the signatures of #3 to #1 (they're overloaded, so we do nothing) and then #3 to #2. Since the signatures of #3 and #2 are identical (return types of functions are not part of the signature), IsOverload returns Ovl_Match and MatchedDecl will be set to point to the FunctionDecl for #2.

'NewIsUsingShadowDecl' indicates that 'New' is being introduced into a class by a using declaration. The rules for whether to hide shadow declarations ignore some properties which otherwise figure into a function template's signature.

Definition at line 1027 of file SemaOverload.cpp.

References clang::LookupResult::addAllDecls(), clang::LookupResult::begin(), clang::LookupResult::end(), clang::Decl::getAsFunction(), clang::LookupResult::getAsSingle(), clang::FunctionDecl::getDependentSpecializationInfo(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getFriendObjectKind(), clang::LookupResult::getLookupKind(), clang::DeclaratorDecl::getQualifier(), clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::Decl::setInvalidDecl(), and clang::LookupResult::Temporary.

## ◆ CheckOverloadedOperatorDeclaration()

bool Sema::CheckOverloadedOperatorDeclaration | ( | FunctionDecl * | FnDecl | ) |

CheckOverloadedOperatorDeclaration - Check whether the declaration of this overloaded operator is well-formed.

If so, returns false; otherwise, emits appropriate diagnostics and returns true.

Definition at line 14987 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::Type::isSpecificBuiltinType(), clang::NUM_OVERLOADED_OPERATORS, and clang::FunctionDecl::parameters().

## ◆ CheckOverrideControl()

void Sema::CheckOverrideControl | ( | NamedDecl * | D | ) |

CheckOverrideControl - Check C++11 override control semantics.

Definition at line 2968 of file SemaDeclCXX.cpp.

References clang::FixItHint::CreateRemoval(), Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::Decl::hasAttr(), clang::Type::isDependentType(), clang::CXXMethodDecl::isInstance(), clang::Decl::isInvalidDecl(), clang::CXXMethodDecl::isVirtual(), clang::Decl::setInvalidDecl(), and clang::CXXMethodDecl::size_overridden_methods().

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ CheckOverridingFunctionAttributes()

bool Sema::CheckOverridingFunctionAttributes | ( | const CXXMethodDecl * | New,
|  | const CXXMethodDecl * | Old
| ) |  |

Definition at line 16456 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), Diag(), clang::Decl::getAttr(), clang::FunctionType::getCallConv(), clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExtParameterInfo(), clang::Decl::getLocation(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getStorageClass(), clang::ValueDecl::getType(), clang::FunctionProtoType::hasExtParameterInfos(), clang::FunctionType::ExtParameterInfo::isNoEscape(), and clang::SC_Static.

## ◆ CheckOverridingFunctionExceptionSpec()

bool clang::Sema::CheckOverridingFunctionExceptionSpec | ( | const CXXMethodDecl * | New,
|  | const CXXMethodDecl * | Old
| ) |  |

CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec.

Definition at line 947 of file SemaExceptionSpec.cpp.

References clang::Type::castAs(), CheckExceptionSpecSubset(), DelayedOverridingExceptionSpecChecks, clang::EST_Unparsed, clang::exceptionSpecNotKnownYet(), getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::TagDecl::isDependentType(), and PDiag().

## ◆ CheckOverridingFunctionReturnType()

bool Sema::CheckOverridingFunctionReturnType | ( | const CXXMethodDecl * | New,
|  | const CXXMethodDecl * | Old
| ) |  |

CheckOverridingFunctionReturnType - Checks whether the return types are covariant, according to C++ [class.virtual]p5.

Both types must be pointers or references to classes.

Definition at line 16504 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), and clang::ValueDecl::getType().

## ◆ CheckPackExpansion() [1/3]

TypeSourceInfo * Sema::CheckPackExpansion | ( | TypeSourceInfo * | Pattern,
|  | SourceLocation | EllipsisLoc,
|  | Optional< unsigned > | NumExpansions
| ) |  |

Construct a pack expansion type from the pattern of the pack expansion.

Definition at line 583 of file SemaTemplateVariadic.cpp.

References clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::QualType::isNull(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushFullCopy(), clang::Result, and clang::PackExpansionTypeLoc::setEllipsisLoc().

Referenced by SubstParmVarDecl(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ CheckPackExpansion() [2/3]

QualType Sema::CheckPackExpansion | ( | QualType | Pattern,
|  | SourceRange | PatternRange,
|  | SourceLocation | EllipsisLoc,
|  | Optional< unsigned > | NumExpansions
| ) |  |

Construct a pack expansion type from the pattern of the pack expansion.

Definition at line 600 of file SemaTemplateVariadic.cpp.

References clang::Type::containsUnexpandedParameterPack(), Diag(), and clang::Type::getContainedDeducedType().

## ◆ CheckPackExpansion() [3/3]

ExprResult Sema::CheckPackExpansion | ( | Expr * | Pattern,
|  | SourceLocation | EllipsisLoc,
|  | Optional< unsigned > | NumExpansions
| ) |  |

Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.

Parameters

  Pattern | The expression preceding the ellipsis, which will become the pattern of the pack expansion.
  EllipsisLoc | The location of the ellipsis.

Definition at line 624 of file SemaTemplateVariadic.cpp.

References clang::Expr::containsUnexpandedParameterPack(), Diag(), clang::ExprError(), and clang::Stmt::getSourceRange().

## ◆ CheckParameter()

ParmVarDecl * Sema::CheckParameter | ( | DeclContext * | DC,
|  | SourceLocation | StartLoc,
|  | SourceLocation | NameLoc,
|  | IdentifierInfo * | Name,
|  | QualType | T,
|  | TypeSourceInfo * | TSInfo,
|  | StorageClass | SC
| ) |  |

Definition at line 13293 of file SemaDecl.cpp.

Referenced by SubstParmVarDecl().

## ◆ CheckParameterPacksForExpansion()

bool Sema::CheckParameterPacksForExpansion | ( | SourceLocation | EllipsisLoc,
|  | SourceRange | PatternRange,
|  | ArrayRef< UnexpandedParameterPack > | Unexpanded,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | bool & | ShouldExpand,
|  | bool & | RetainExpansion,
|  | Optional< unsigned > & | NumExpansions
| ) |  |

Determine whether we could expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern.

Parameters

  EllipsisLoc | The location of the ellipsis that identifies the pack expansion.
  PatternRange | The source range that covers the entire pattern of the pack expansion.
  Unexpanded | The set of unexpanded parameter packs within the pattern.
  ShouldExpand | Will be set to `true` if the transformer should expand the corresponding pack expansions into separate arguments. When set, `NumExpansions` must also be set.
  RetainExpansion | Whether the caller should add an unexpanded pack expansion after all of the expanded arguments. This is used when extending explicitly-specified template argument packs per C++0x [temp.arg.explicit]p9.
  NumExpansions | The number of separate arguments that will be in the expanded form of the corresponding pack expansion. This is both an input and an output parameter, which can be set by the caller if the number of expansions is known a priori (e.g., due to a prior substitution) and will be set by the callee when the number of expansions is known. The callee must set this value when `ShouldExpand` is `true`; it may set this value in other cases.

Returns
  true if an error occurred (e.g., because the parameter packs are to be instantiated with arguments of different lengths), false otherwise. If false, `ShouldExpand` (and possibly `NumExpansions`) must be set.

Definition at line 645 of file SemaTemplateVariadic.cpp.

References Depth.

Referenced by SubstBaseSpecifiers(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ CheckParamExceptionSpec()

bool clang::Sema::CheckParamExceptionSpec | ( | const PartialDiagnostic & | DiagID,
|  | const PartialDiagnostic & | NoteID,
|  | const FunctionProtoType * | Target,
|  | SourceLocation | TargetLoc,
|  | const FunctionProtoType * | Source,
|  | SourceLocation | SourceLoc
| ) |  |

CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalent exception specs.

This is part of the assignment and override compatibility check. We do not check the parameters of parameter function pointers recursively, as no sane programmer would even be able to write such a function type.

Definition at line 877 of file SemaExceptionSpec.cpp.

References clang::CheckSpecForTypesEquivalent(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::FunctionType::getReturnType(), and PDiag().

Referenced by CheckExceptionSpecSubset().

## ◆ CheckParmsForFunctionDef()

bool Sema::CheckParmsForFunctionDef | ( | ArrayRef< ParmVarDecl *> | Parameters,
|  | bool | CheckParameterNames
| ) |  |

Helpers for dealing with blocks and functions.

CheckParmsForFunctionDef - Check that the parameters of the given function are appropriate for the definition of a function.

This takes care of any checks that cannot be performed on the declaration itself, e.g., that the types of each of the function parameters are complete.

Definition at line 13308 of file SemaChecking.cpp.

References Diag(), diagnoseArrayStarInParamType(), clang::Decl::getLocation(), clang::DeclContext::getParent(), clang::Attr::getSpelling(), and clang::DeclContext::isFunctionOrMethod().

Referenced by ActOnStartOfObjCMethodDef().

## ◆ checkPartialSpecializationVisibility()

void Sema::checkPartialSpecializationVisibility | ( | SourceLocation | Loc,
|  | NamedDecl * | Spec
| ) |  |

We've found a use of a template specialization that would select a partial specialization.

Check whether a template partial specialization that we've discovered is hidden, and produce suitable diagnostics if so.

Check that the partial specialization is visible, and diagnose if not.

Definition at line 10808 of file SemaTemplate.cpp.

References clang::Decl::getLocation().

## ◆ CheckPlaceholderExpr()

ExprResult Sema::CheckPlaceholderExpr | ( | Expr * | E | ) |

Check for operands with placeholder types and complain if found.

Returns ExprError() if there was an error and no recovery was possible.

Definition at line 17989 of file SemaExpr.cpp.

References clang::CPlusPlus, clang::DeclarationName::CXXDestructorName, diagnoseUnknownAnyExpr(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::BuiltinType::getKind(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParens(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().

Referenced by ActOnDecltypeExpression(), ActOnFinishFullExpr(), ActOnStartCXXMemberReference(), BuildCXXNoexceptExpr(), BuildExpressionTrait(), checkArgsForPlaceholders(), CheckArrow(), CheckCommaOperands(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckObjCCollectionLiteralElement(), checkPlaceholderForOverload(), getCastAwayConstnessCastKind(), IgnoredValueConversions(), and clang::InitializationSequence::InitializeFrom().

## ◆ CheckPointerConversion()

bool Sema::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.

This routine checks for ambiguous or inaccessible derived-to-base pointer conversions for which IsPointerConversion has already returned true. It returns true and produces a diagnostic if there was an error, or returns false otherwise.

Definition at line 2972 of file SemaOverload.cpp.

References clang::Expr::getType(), clang::Type::isAnyPointerType(), and clang::Expr::isNullPointerConstant().

Referenced by PerformImplicitConversion().

## ◆ CheckPointerToMemberOperands()

QualType Sema::CheckPointerToMemberOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | ExprValueKind & | VK,
|  | SourceLocation | OpLoc,
|  | bool | isIndirect
| ) |  |

Definition at line 5424 of file SemaExprCXX.cpp.

References clang::ASTContext::BoundMemberTy, CheckDerivedToBaseConversion(), Context, clang::FixItHint::CreateReplacement(), DefaultLvalueConversion(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::MemberPointerType::getClass(), clang::ASTContext::getCVRQualifiedType(), clang::QualType::getCVRQualifiers(), getLangOpts(), clang::MemberPointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::ASTContext::hasSameUnqualifiedType(), ImpCastExprToType(), IsDerivedFrom(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), RequireCompleteType(), clang::Result, clang::RQ_LValue, clang::RQ_None, clang::RQ_RValue, TemporaryMaterializationConversion(), clang::VK_LValue, and clang::VK_RValue.

## ◆ checkPseudoObjectAssignment()

ExprResult Sema::checkPseudoObjectAssignment | ( | Scope * | S,
|  | SourceLocation | OpLoc,
|  | BinaryOperatorKind | Opcode,
|  | Expr * | LHS,
|  | Expr * | RHS
| ) |  |

Definition at line 1589 of file SemaPseudoObject.cpp.

References clang::Expr::isTypeDependent().

## ◆ checkPseudoObjectIncDec()

ExprResult Sema::checkPseudoObjectIncDec | ( | Scope * | S,
|  | SourceLocation | OpLoc,
|  | UnaryOperatorKind | Opcode,
|  | Expr * | Op
| ) |  |

Check an increment or decrement of a pseudo-object expression.

Definition at line 1560 of file SemaPseudoObject.cpp.

References clang::Expr::isTypeDependent().

## ◆ checkPseudoObjectRValue()

ExprResult Sema::checkPseudoObjectRValue | ( | Expr * | E | ) |

Definition at line 1535 of file SemaPseudoObject.cpp.

References clang::Expr::IgnoreParens().

## ◆ CheckPtrComparisonWithNullChar()

void Sema::CheckPtrComparisonWithNullChar | ( | ExprResult & | E,
|  | ExprResult & | NullE
| ) |  |

Definition at line 10731 of file SemaExpr.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get().

## ◆ CheckPureMethod()

bool Sema::CheckPureMethod | ( | CXXMethodDecl * | Method,
|  | SourceRange | InitRange
| ) |  |

Mark the given method pure.

Parameters

  Method | the method to be marked pure.
  InitRange | the source range that covers the "0" initializer.

Definition at line 16615 of file SemaDeclCXX.cpp.

References Diag(), clang::NamedDecl::getDeclName(), clang::SourceRange::getEnd(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::CXXMethodDecl::isVirtual(), clang::FunctionDecl::setPure(), and clang::FunctionDecl::setRangeEnd().

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ CheckQualifiedFunctionForTypeId()

bool Sema::CheckQualifiedFunctionForTypeId | ( | QualType | T,
|  | SourceLocation | Loc
| ) |  |

Definition at line 2001 of file SemaType.cpp.

References Diag(), clang::Qualifiers::empty(), clang::Type::getAs(), getFunctionQualifiersAsString(), clang::FunctionProtoType::getMethodQuals(), clang::FunctionProtoType::getRefQualifier(), and clang::RQ_None.

## ◆ CheckQualifiedMemberReference()

bool Sema::CheckQualifiedMemberReference | ( | Expr * | BaseExpr,
|  | QualType | BaseType,
|  | const CXXScopeSpec & | SS,
|  | const LookupResult & | R
| ) |  |

Definition at line 549 of file SemaExprMember.cpp.

References clang::LookupResult::begin(), DiagnoseQualifiedMemberReference(), clang::LookupResult::end(), getCanonicalDecl(), clang::CXXRecordDecl::getCanonicalDecl(), clang::TypoCorrection::getCorrectionDecl(), clang::RecordType::getDecl(), clang::LookupResult::getLookupNameInfo(), clang::DeclContext::getParent(), clang::LookupResult::getRepresentativeDecl(), clang::Type::isDependentType(), clang::CXXRecordDecl::isProvablyNotDerivedFrom(), clang::DeclContext::isRecord(), and clang::DeclContext::isTransparentContext().

## ◆ CheckRedeclarationModuleOwnership()

bool Sema::CheckRedeclarationModuleOwnership | ( | NamedDecl * | New,
|  | NamedDecl * | Old
| ) |  |

We've determined that `New` is a redeclaration of `Old`.

Check that they have compatible owning modules.

Definition at line 1533 of file SemaDecl.cpp.

References Diag(), clang::Decl::getFriendObjectKind(), clang::Module::getFullModuleName(), clang::Decl::getLocation(), clang::Decl::getOwningModule(), clang::Decl::getOwningModuleForLinkage(), clang::Module::isModulePurview(), clang::Module::Kind, clang::Module::Parent, clang::Module::PrivateModuleFragment, clang::Decl::setInvalidDecl(), and clang::Decl::setLocalOwningModule().

## ◆ CheckRegparmAttr()

bool clang::Sema::CheckRegparmAttr | ( | const ParsedAttr & | attr,
|  | unsigned & | value
| ) |  |

Referenced by handleFunctionTypeAttr().

## ◆ CheckRemainderOperands()

QualType Sema::CheckRemainderOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | bool | IsCompAssign = `false`
| ) |  |

Definition at line 9426 of file SemaExpr.cpp.

References checkArithmeticNull(), DiagnoseBadDivideOrRemainderValues(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::QualType::isNull().

## ◆ checkRetainCycles() [1/3]

void Sema::checkRetainCycles | ( | ObjCMessageExpr * | msg | ) |

checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle.

Check a message send to see if it's likely to cause a retain cycle.

Definition at line 14098 of file SemaChecking.cpp.

References diagnoseRetainCycle(), findCapturingExpr(), findRetainCycleOwner(), clang::ObjCMessageExpr::getArg(), clang::ObjCMessageExpr::getInstanceReceiver(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMessageExpr::getNumArgs(), clang::ObjCMessageExpr::getReceiverKind(), clang::ObjCMessageExpr::getSelector(), clang::ObjCMessageExpr::getSuperLoc(), clang::ObjCMessageExpr::Instance, clang::ObjCMessageExpr::isInstanceMessage(), isSetterLikeSelector(), clang::ObjCMethodDecl::parameters(), and clang::ObjCMessageExpr::SuperInstance.

Referenced by LookupMethodInReceiverType().

## ◆ checkRetainCycles() [2/3]

void Sema::checkRetainCycles | ( | Expr * | receiver,
|  | Expr * | argument
| ) |  |

Check a property assign to see if it's likely to cause a retain cycle.

Definition at line 14128 of file SemaChecking.cpp.

References diagnoseRetainCycle(), findCapturingExpr(), and findRetainCycleOwner().

## ◆ checkRetainCycles() [3/3]

void Sema::checkRetainCycles | ( | VarDecl * | Var,
|  | Expr * | Init
| ) |  |

Definition at line 14137 of file SemaChecking.cpp.

References considerVariable(), diagnoseRetainCycle(), findCapturingExpr(), clang::Decl::getLocation(), and clang::VarDecl::getSourceRange().

## ◆ checkSectionName()

bool clang::Sema::checkSectionName | ( | SourceLocation | LiteralLoc,
|  | StringRef | Str
| ) |  |

## ◆ CheckShadow() [1/2]

void Sema::CheckShadow | ( | NamedDecl * | D,
|  | NamedDecl * | ShadowedDecl,
|  | const LookupResult & | R
| ) |  |

Diagnose variable or built-in function shadowing.

Implements -Wshadow.

This method is called whenever a VarDecl is added to a "useful" scope.

Parameters

  ShadowedDecl | the declaration that is shadowed by the given variable
  R | the lookup of the name

Definition at line 7341 of file SemaDecl.cpp.

References clang::DeclContext::Encloses(), clang::DeclContext::Equals(), getCaptureLocation(), clang::Decl::getDeclContext(), clang::getLambdaAwareParentOfDeclContext(), clang::DeclContext::getLexicalParent(), clang::DeclContext::getParent(), clang::DeclContext::getRedeclContext(), clang::isLambdaCallOperator(), clang::DeclContext::isRecord(), and clang::LCD_None.

Referenced by ActOnStartRequiresExpr().

## ◆ CheckShadow() [2/2]

void Sema::CheckShadow | ( | Scope * | S,
|  | VarDecl * | D
| ) |  |

Check -Wshadow without the advantage of a previous lookup.

Definition at line 7464 of file SemaDecl.cpp.

## ◆ CheckShadowingDeclModification()

void Sema::CheckShadowingDeclModification | ( | Expr * | E,
|  | SourceLocation | Loc
| ) |  |

Warn if 'E', which is an expression that is about to be modified, refers to a shadowing declaration.

Check if 'E', which is an expression that is about to be modified, refers to a constructor parameter that shadows a field.

Definition at line 7477 of file SemaDecl.cpp.

References clang::CPlusPlus, Diag(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), and clang::Expr::IgnoreParenImpCasts().

Referenced by CheckForModifiableLvalue().

## ◆ CheckShiftOperands()

QualType Sema::CheckShiftOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | BinaryOperatorKind | Opc,
|  | bool | IsCompAssign = `false`
| ) |  |

Definition at line 10099 of file SemaExpr.cpp.

References clang::VectorType::AltiVecBool, checkArithmeticNull(), checkVectorShift(), DiagnoseBadShiftValues(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::hasIntegerRepresentation(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and isScopedEnumerationType().

## ◆ CheckSingleAssignmentConstraints()

Sema::AssignConvertType Sema::CheckSingleAssignmentConstraints | ( | QualType | LHSType,
|  | ExprResult & | RHS,
|  | bool | Diagnose = `true`,
|  | bool | DiagnoseCFAudited = `false`,
|  | bool | ConvertRHS = `true`
| ) |  |

Check assignment constraints for an assignment of RHS to LHSType.

Parameters

  LHSType | The destination type for the assignment.
  RHS | The source expression for the assignment.
  Diagnose | If `true`, diagnostics may be produced when checking for assignability. If a diagnostic is produced, `RHS` will be set to ExprError(). Note that this function may still return without producing a diagnostic, even for an invalid assignment.
  DiagnoseCFAudited | If `true`, the target is a function parameter in an audited Core Foundation API and does not need to be checked for ARC retain issues.
  ConvertRHS | If `true`, `RHS` will be updated to model the conversions necessary to perform the assignment. If `false`, `Diagnose` must also be `false`.

Definition at line 8668 of file SemaExpr.cpp.

References clang::CPlusPlus, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::QualType::getUnqualifiedType(), clang::Type::isAtomicType(), clang::ImplicitConversionSequence::isFailure(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isRecordType(), and TryImplicitConversion().

Referenced by checkObjCCollectionLiteralElement(), IsStandardConversion(), LookupMethodInReceiverType(), and clang::InitializationSequence::Perform().

## ◆ CheckSpecializationInstantiationRedecl()

bool Sema::CheckSpecializationInstantiationRedecl | ( | SourceLocation | NewLoc,
|  | TemplateSpecializationKind | NewTSK,
|  | NamedDecl * | PrevDecl,
|  | TemplateSpecializationKind | PrevTSK,
|  | SourceLocation | PrevPointOfInstantiation,
|  | bool & | HasNoEffect
| ) |  |

Diagnose cases where we have an explicit template specialization before/after an explicit template instantiation, producing diagnostics for those cases where they are required and determining whether the new specialization/instantiation will have any effect.

Parameters

  NewLoc | the location of the new explicit specialization or instantiation.
  NewTSK | the kind of the new explicit specialization or instantiation.
  PrevDecl | the previous declaration of the entity.
  PrevTSK | the kind of the old explicit specialization or instantiatin.
  PrevPointOfInstantiation | if valid, indicates where the previus declaration was instantiated (either implicitly or explicitly).
  HasNoEffect | will be set to true to indicate that the new specialization or instantiation has no effect and should be ignored.

Returns
  true if there was an error that should prevent the introduction of the new declaration into the AST, false otherwise.

Definition at line 8422 of file SemaTemplate.cpp.

References Diag(), DiagLocForExplicitInstantiation(), clang::Decl::getLocation(), clang::Decl::getPreviousDecl(), getTemplateSpecializationKind(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), StripImplicitInstantiation(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by InstantiateClassMembers(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

## ◆ checkSpecializationVisibility()

void Sema::checkSpecializationVisibility | ( | SourceLocation | Loc,
|  | NamedDecl * | Spec
| ) |  |

We've found a use of a templated declaration that would trigger an implicit instantiation.

Check that any relevant explicit specializations and partial specializations are visible, and diagnose if not.

Definition at line 10799 of file SemaTemplate.cpp.

Referenced by DoMarkVarDeclReferenced().

## ◆ CheckSpecifiedExceptionType()

bool clang::Sema::CheckSpecifiedExceptionType | ( | QualType & | T,
|  | SourceRange | Range
| ) |  |

CheckSpecifiedExceptionType - Check if the given type is valid in an exception specification.

Incomplete types, or pointers to incomplete types other than void are not allowed.

Parameters

  [in,out] | T | The exception type. This will be decayed to a pointer type when the input is an array or a function type.

Definition at line 116 of file SemaExceptionSpec.cpp.

References clang::Type::castAs(), Context, Diag(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::SourceRange::getBegin(), getLangOpts(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isRecordType(), clang::Type::isVoidType(), and RequireCompleteType().

## ◆ CheckStaticArrayArgument()

void Sema::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.

C99 6.7.5.3p7: If the keyword static also appears within the [ and ] of the array type derivation, then for each call to the function, the value of the corresponding actual argument shall provide access to the first element of an array with at least as many elements as specified by the size expression.

Definition at line 5388 of file SemaExpr.cpp.

References clang::CPlusPlus, and clang::ParmVarDecl::getOriginalType().

## ◆ CheckStaticLocalForDllExport()

void Sema::CheckStaticLocalForDllExport | ( | VarDecl * | VD | ) |

Check if VD needs to be dllexport/dllimport due to being in a dllexport/import function.

Definition at line 12718 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::getDLLAttr(), clang::Decl::getParentFunctionOrMethod(), and clang::VarDecl::isStaticLocal().

Referenced by clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ checkStringLiteralArgumentAttr()

bool Sema::checkStringLiteralArgumentAttr | ( | const ParsedAttr & | AL,
|  | unsigned | ArgNum,
|  | StringRef & | Str,
|  | SourceLocation * | ArgLocation = `nullptr`
| ) |  |

Check if the argument `ArgNum` of `Attr` is a ASCII string literal.

If not emit an error and return false. If the argument is an identifier it will emit an error with a fixit hint and treat it as if it was a string literal.

Definition at line 367 of file SemaDeclAttr.cpp.

References clang::AANT_ArgumentString, clang::FixItHint::CreateInsertion(), Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Stmt::getBeginLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::Expr::IgnoreParenCasts(), clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.

## ◆ CheckStructuredBindingMemberAccess()

Sema::AccessResult Sema::CheckStructuredBindingMemberAccess | ( | SourceLocation | UseLoc,
|  | CXXRecordDecl * | DecomposedClass,
|  | DeclAccessPair | Field
| ) |  |

Checks implicit access to a member in a structured binding.

Definition at line 1734 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, and clang::DeclAccessPair::getAccess().

Referenced by checkMemberDecomposition().

## ◆ CheckSubscriptingKind()

Sema::ObjCSubscriptKind Sema::CheckSubscriptingKind | ( | Expr * | FromE | ) |

CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being done.

Definition at line 1053 of file SemaPseudoObject.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::Type::getAs(), clang::RecordType::getDecl(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isBlockPointerType(), clang::Type::isIncompleteType(), clang::Type::isIntegralOrEnumerationType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), and clang::Type::isVoidPointerType().

Referenced by CheckKeyForObjCARCConversion().

## ◆ CheckSubtractionOperands()

QualType Sema::CheckSubtractionOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | QualType * | CompLHSTy = `nullptr`
| ) |  |

Definition at line 9810 of file SemaExpr.cpp.

References checkArithmeticNull(), checkArithmeticOnObjCPointer(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::QualType::isNull().

## ◆ CheckSwitchCondition()

ExprResult Sema::CheckSwitchCondition | ( | SourceLocation | SwitchLoc,
|  | Expr * | Cond
| ) |  |

Definition at line 662 of file SemaStmt.cpp.

Referenced by CheckConditionVariable().

## ◆ checkTargetAttr()

bool clang::Sema::checkTargetAttr | ( | SourceLocation | LiteralLoc,
|  | StringRef | Str
| ) |  |

## ◆ CheckTemplateArgument() [1/3]

bool Sema::CheckTemplateArgument | ( | NamedDecl * | Param,
|  | TemplateArgumentLoc & | Arg,
|  | NamedDecl * | Template,
|  | SourceLocation | TemplateLoc,
|  | SourceLocation | RAngleLoc,
|  | unsigned | ArgumentPackIndex,
|  | SmallVectorImpl< TemplateArgument > & | Converted,
|  | CheckTemplateArgumentKind | CTAK = `CTAK_Specified`
| ) |  |

Check that the given template argument corresponds to the given template parameter.

Parameters

  Param | The template parameter against which the argument will be checked.
  Arg | The template argument, which may be updated due to conversions.
  Template | The template in which the template argument resides.
  TemplateLoc | The location of the template name for the template whose argument list we're matching.
  RAngleLoc | The location of the right angle bracket ('>') that closes the template argument list.
  ArgumentPackIndex | The index into the argument pack where this argument will be placed. Only valid if the parameter is a parameter pack.
  Converted | The checked, converted argument will be added to the end of this small vector.
  CTAK | Describes how we arrived at this particular template argument: explicitly written, deduced, etc.

Returns
  true on error, false otherwise.

Definition at line 5097 of file SemaTemplate.cpp.

References clang::CXXScopeSpec::Adopt(), clang::DependentScopeDeclRefExpr::Create(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TemplateArgumentLoc::getArgument(), clang::Type::getAs(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::Decl::getDeclContext(), clang::TemplateArgument::getKind(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::TemplateArgument::Integral, clang::DeclContext::isDependentContext(), clang::Type::isInstantiationDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::QualType::isNull(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgumentList::OnStack, clang::TemplateArgument::Template, and clang::TemplateArgument::TemplateExpansion.

Referenced by ConvertDeducedTemplateArgument().

## ◆ CheckTemplateArgument() [2/3]

bool Sema::CheckTemplateArgument | ( | TemplateTypeParmDecl * | Param,
|  | TypeSourceInfo * | ArgInfo
| ) |  |

Check a template argument against its corresponding template type parameter.

This routine implements the semantics of C++ [temp.arg.type]. It returns true if an error occurred, and false otherwise.

Definition at line 5954 of file SemaTemplate.cpp.

References Diag(), clang::SourceRange::getBegin(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), and clang::Type::isVariablyModifiedType().

## ◆ CheckTemplateArgument() [3/3]

ExprResult Sema::CheckTemplateArgument | ( | NonTypeTemplateParmDecl * | Param,
|  | QualType | ParamType,
|  | Expr * | Arg,
|  | TemplateArgument & | Converted,
|  | CheckTemplateArgumentKind | CTAK = `CTAK_Specified`
| ) |  |

Check a template argument against its corresponding non-type template parameter.

This routine implements the semantics of C++ [temp.arg.nontype]. If an error occurred, it returns ExprError(); otherwise, it returns the converted template argument. `ParamType` is the type of the non-type template parameter after it has been instantiated.

Definition at line 6562 of file SemaTemplate.cpp.

References clang::CPlusPlus17, Depth, clang::Stmt::getBeginLoc(), clang::TemplateParmPosition::getDepth(), clang::Expr::isTypeDependent(), and clang::Type::isUndeducedType().

## ◆ CheckTemplateArgumentList()

bool Sema::CheckTemplateArgumentList | ( | TemplateDecl * | Template,
|  | SourceLocation | TemplateLoc,
|  | TemplateArgumentListInfo & | TemplateArgs,
|  | bool | PartialTemplateArgs,
|  | SmallVectorImpl< TemplateArgument > & | Converted,
|  | bool | UpdateArgsWithConversions = `true`,
|  | bool * | ConstraintsNotSatisfied = `nullptr`
| ) |  |

Check that the given template arguments can be be provided to the given template, converting the arguments along the way.

Check that the given template argument list is well-formed for specializing the given template.

Parameters

  Template | The template to which the template arguments are being provided.
  TemplateLoc | The location of the template name in the source.
  TemplateArgs | The list of template arguments. If the template is a template template parameter, this function may extend the set of template arguments to also include substituted, defaulted template arguments.
  PartialTemplateArgs | True if the list of template arguments is intentionally partial, e.g., because we're checking just the initial set of template arguments.
  Converted | Will receive the converted, canonicalized template arguments.
  UpdateArgsWithConversions | If `true`, update `TemplateArgs` to contain the converted forms of the template arguments as written. Otherwise, `TemplateArgs` will not be modified.
  ConstraintsNotSatisfied | If provided, and an error occured, will receive true if the cause for the error is the associated constraints of the template not being satisfied by the template arguments.

Returns
  true if an error occurred, false otherwise.

Definition at line 5415 of file SemaTemplate.cpp.

References clang::TemplateParameterList::begin(), clang::TemplateArgument::CreatePackCopy(), clang::TemplateParameterList::end(), getExpandedPackSize(), clang::NamedDecl::getMostRecentDecl(), clang::TemplateArgumentListInfo::getRAngleLoc(), and clang::TemplateArgumentListInfo::size().

Referenced by CheckDeducedPlaceholderConstraints(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

## ◆ CheckTemplateDeclScope()

bool Sema::CheckTemplateDeclScope | ( | Scope * | S,
|  | TemplateParameterList * | TemplateParams
| ) |  |

Check whether a template can be declared within this scope.

If the template declaration is valid in this scope, returns false. Otherwise, issues a diagnostic and returns true.

Definition at line 7641 of file SemaTemplate.cpp.

References clang::Scope::DeclScope, Diag(), clang::Scope::getEntity(), clang::DeclContext::getExternCContext(), clang::Scope::getFlags(), clang::Scope::getParent(), clang::DeclContext::getRedeclContext(), clang::TemplateParameterList::getSourceRange(), clang::TemplateParameterList::getTemplateLoc(), clang::DeclContext::isExternCContext(), clang::DeclContext::isFileContext(), and clang::Scope::TemplateParamScope.

## ◆ CheckTemplateIdType()

QualType Sema::CheckTemplateIdType | ( | TemplateName | Template,
|  | SourceLocation | TemplateLoc,
|  | TemplateArgumentListInfo & | TemplateArgs
| ) |  |

Definition at line 3407 of file SemaTemplate.cpp.

Referenced by lookupStdTypeTraitMember().

## ◆ CheckTemplateParameterList()

bool Sema::CheckTemplateParameterList | ( | TemplateParameterList * | NewParams,
|  | TemplateParameterList * | OldParams,
|  | TemplateParamListContext | TPC,
|  | SkipBodyInfo * | SkipBody = `nullptr`
| ) |  |

Checks the validity of a template parameter list, possibly considering the template parameter list from a previous declaration.

If an "old" template parameter list is provided, it must be equivalent (per TemplateParameterListsAreEqual) to the "new" template parameter list.

Parameters

  NewParams | Template parameter list for a new template declaration. This template parameter list will be updated with any default arguments that are carried through from the previous template parameter list.
  OldParams | If provided, template parameter list from a previous declaration of the same template. Default template arguments will be merged from the old template parameter list to the new template parameter list.
  TPC | Describes the context in which we are checking the given template parameter list.
  SkipBody | If we might have already made a prior merged definition of this template visible, the corresponding body-skipping information. Default argument redefinition is not an error when skipping such a body, because (under the ODR) we can assume the default arguments are the same as the prior merged definition.

Returns
  true if an error occurred, false otherwise.

Definition at line 2429 of file SemaTemplate.cpp.

References clang::TemplateParameterList::begin(), DiagnoseDefaultTemplateArgument(), clang::TemplateParameterList::end(), clang::TemplateTypeParmDecl::getDefaultArgumentLoc(), clang::TemplateTypeParmDecl::hasDefaultArgument(), hasVisibleDefaultArgument(), and clang::Sema::SkipBodyInfo::ShouldSkip.

Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ CheckTemplatePartialSpecialization() [1/2]

void Sema::CheckTemplatePartialSpecialization | ( | ClassTemplatePartialSpecializationDecl * | Partial | ) |

Definition at line 4005 of file SemaTemplate.cpp.

References checkTemplatePartialSpecialization().

Referenced by clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().

## ◆ CheckTemplatePartialSpecialization() [2/2]

void Sema::CheckTemplatePartialSpecialization | ( | VarTemplatePartialSpecializationDecl * | Partial | ) |

Definition at line 4010 of file SemaTemplate.cpp.

References checkTemplatePartialSpecialization().

## ◆ CheckTemplatePartialSpecializationArgs()

bool Sema::CheckTemplatePartialSpecializationArgs | ( | SourceLocation | TemplateNameLoc,
|  | TemplateDecl * | PrimaryTemplate,
|  | unsigned | NumExplicit,
|  | ArrayRef< TemplateArgument > | TemplateArgs
| ) |  |

Check the non-type template arguments of a class template partial specialization according to C++ [temp.class.spec]p9.

Parameters

  TemplateNameLoc | the location of the template name.
  PrimaryTemplate | the template parameters of the primary class template.
  NumExplicit | the number of explicitly-specified template arguments.
  TemplateArgs | the template arguments of the class template partial specialization.

Returns
  `true` if there was an error, `false` otherwise.

Definition at line 7917 of file SemaTemplate.cpp.

References CheckNonTypeTemplatePartialSpecializationArgs(), clang::Decl::getDeclContext(), clang::TemplateParameterList::getParam(), clang::TemplateDecl::getTemplateParameters(), clang::DeclContext::isDependentContext(), and clang::TemplateParameterList::size().

Referenced by clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().

## ◆ CheckTemplateTemplateArgument()

bool Sema::CheckTemplateTemplateArgument | ( | TemplateTemplateParmDecl * | Param,
|  | TemplateParameterList * | Params,
|  | TemplateArgumentLoc & | Arg
| ) |  |

Check a template argument against its corresponding template template parameter.

This routine implements the semantics of C++ [temp.arg.template]. It returns true if an error occurred, and false otherwise.

Definition at line 7104 of file SemaTemplate.cpp.

## ◆ CheckTemplateTypeArgument()

bool Sema::CheckTemplateTypeArgument | ( | TemplateTypeParmDecl * | Param,
|  | TemplateArgumentLoc & | Arg,
|  | SmallVectorImpl< TemplateArgument > & | Converted
| ) |  |

Definition at line 4686 of file SemaTemplate.cpp.

References clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getKind(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

## ◆ checkThisInStaticMemberFunctionAttributes()

bool Sema::checkThisInStaticMemberFunctionAttributes | ( | CXXMethodDecl * | Method | ) |

Check whether 'this' shows up in the attributes of the given static member function.

Returns
  true if an error occurred.

Definition at line 17163 of file SemaDeclCXX.cpp.

## ◆ checkThisInStaticMemberFunctionExceptionSpec()

bool Sema::checkThisInStaticMemberFunctionExceptionSpec | ( | CXXMethodDecl * | Method | ) |

Whether this' shows up in the exception specification of a static member function.

Definition at line 17121 of file SemaDeclCXX.cpp.

References clang::TypeLoc::getAs(), clang::TypeSourceInfo::getTypeLoc(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), and clang::DeclaratorDecl::getTypeSourceInfo().

## ◆ checkThisInStaticMemberFunctionType()

bool Sema::checkThisInStaticMemberFunctionType | ( | CXXMethodDecl * | Method | ) |

Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-qualifier-seq would be.

Returns
  true if an error occurred.

Definition at line 17084 of file SemaDeclCXX.cpp.

References clang::TypeLoc::getAs(), clang::TypeSourceInfo::getTypeLoc(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), and clang::DeclaratorDecl::getTypeSourceInfo().

## ◆ CheckTollFreeBridgeCast()

void Sema::CheckTollFreeBridgeCast | ( | QualType | castType,
|  | Expr * | castExpr
| ) |  |

Definition at line 3989 of file SemaExprObjC.cpp.

References ACTC_coreFoundation, ACTC_retainable, clang::ast_matchers::castExpr, classifyTypeForARCConversion(), and clang::Expr::getType().

## ◆ CheckTollFreeBridgeStaticCast()

bool Sema::CheckTollFreeBridgeStaticCast | ( | QualType | castType,
|  | Expr * | castExpr,
|  | CastKind & | Kind
| ) |  |

Definition at line 4060 of file SemaExprObjC.cpp.

References ACTC_coreFoundation, ACTC_retainable, classifyTypeForARCConversion(), and clang::Expr::getType().

Referenced by TryStaticCast().

## ◆ CheckTransparentUnionArgumentConstraints()

Sema::AssignConvertType Sema::CheckTransparentUnionArgumentConstraints | ( | QualType | ArgType,
|  | ExprResult & | RHS
| ) |  |

Definition at line 8616 of file SemaExpr.cpp.

References clang::Type::castAs(), clang::RecordDecl::fields(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsUnionType(), clang::RecordType::getDecl(), clang::PointerType::getPointeeType(), clang::Decl::hasAttr(), clang::interp::InitField(), clang::Type::isPointerType(), and clang::Type::isVoidType().

Referenced by clang::InitializationSequence::Perform(), and PerformImplicitConversion().

## ◆ CheckTypedefForVariablyModifiedType()

void Sema::CheckTypedefForVariablyModifiedType | ( | Scope * | S,
|  | TypedefNameDecl * | D
| ) |  |

Definition at line 5961 of file SemaDecl.cpp.

## ◆ CheckTypenameType() [1/2]

QualType Sema::CheckTypenameType | ( | ElaboratedTypeKeyword | Keyword,
|  | SourceLocation | KeywordLoc,
|  | NestedNameSpecifierLoc | QualifierLoc,
|  | const IdentifierInfo & | II,
|  | SourceLocation | IILoc,
|  | TypeSourceInfo ** | TSI,
|  | bool | DeducedTSTContext
| ) |  |

Definition at line 10225 of file SemaTemplate.cpp.

References clang::QualType::isNull().

Referenced by ActOnTypeRequirement(), and clang::TreeTransform< Derived >::RebuildDependentNameType().

## ◆ CheckTypenameType() [2/2]

QualType Sema::CheckTypenameType | ( | ElaboratedTypeKeyword | Keyword,
|  | SourceLocation | KeywordLoc,
|  | NestedNameSpecifierLoc | QualifierLoc,
|  | const IdentifierInfo & | II,
|  | SourceLocation | IILoc,
|  | bool | DeducedTSTContext = `true`
| ) |  |

Build the type that describes a C++ typename specifier, e.g., "typename T::type".

Definition at line 10256 of file SemaTemplate.cpp.

References clang::CXXScopeSpec::Adopt(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), and clang::NestedNameSpecifier::isDependent().

## ◆ CheckUnaryExprOrTypeTraitOperand() [1/2]

bool Sema::CheckUnaryExprOrTypeTraitOperand | ( | Expr * | E,
|  | UnaryExprOrTypeTrait | ExprKind
| ) |  |

Check the constraints on expression operands to unary type expression and type traits.

Completes any types necessary and validates the constraints on the operand expression. The logic mostly mirrors the type-based overload, but may modify the expression as it completes the type for that expression through template instantiation, etc.

Definition at line 3944 of file SemaExpr.cpp.

References CheckExtensionTraitOperandType(), CheckVecStepTraitOperandType(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isReferenceType(), clang::UETT_AlignOf, clang::UETT_PreferredAlignOf, clang::UETT_SizeOf, and clang::UETT_VecStep.

## ◆ CheckUnaryExprOrTypeTraitOperand() [2/2]

bool Sema::CheckUnaryExprOrTypeTraitOperand | ( | QualType | ExprType,
|  | SourceLocation | OpLoc,
|  | SourceRange | ExprRange,
|  | UnaryExprOrTypeTrait | ExprKind
| ) |  |

Check the constraints on operands to unary expression and type traits.

This will complete any types necessary, and validate the various constraints on those operands.

The UsualUnaryConversions() function is not called by this routine. C99 6.3.2.1p[2-4] all state: Except when it is the operand of the sizeof operator ...

C++ [expr.sizeof]p4 The lvalue-to-rvalue, array-to-pointer, and function-to-pointer standard conversions are not applied to the operand of sizeof.

This policy is followed for all of the unary trait expressions.

Definition at line 4046 of file SemaExpr.cpp.

References clang::Type::getAs(), clang::Type::getPointeeType(), clang::Type::isDependentType(), clang::UETT_AlignOf, clang::UETT_OpenMPRequiredSimdAlign, and clang::UETT_PreferredAlignOf.

## ◆ CheckUnevaluatedOperand()

ExprResult Sema::CheckUnevaluatedOperand | ( | Expr * | E | ) |

Definition at line 7646 of file SemaExprCXX.cpp.

References CheckUnusedVolatileAssignment().

Referenced by ActOnDecltypeExpression(), and BuildCXXNoexceptExpr().

## ◆ checkUnknownAnyArg()

ExprResult Sema::checkUnknownAnyArg | ( | SourceLocation | callLoc,
|  | Expr * | result,
|  | QualType & | paramType
| ) |  |

Type-check an expression that's being passed to an __unknown_anytype parameter.

Definition at line 17921 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParens(), clang::InitializedEntity::InitializeParameter(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ checkUnknownAnyCast()

ExprResult Sema::checkUnknownAnyCast | ( | SourceRange | TypeRange,
|  | QualType | CastType,
|  | Expr * | CastExpr,
|  | CastKind & | CastKind,
|  | ExprValueKind & | VK,
|  | CXXCastPath & | Path
| ) |  |

Check a cast of an unknown-any type.

We intentionally only trigger this for C-style casts.

Definition at line 17897 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::Expr::getValueKind(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::Type::isVoidType().

Referenced by DiagnoseBadFunctionCast(), and TryAddressSpaceCast().

## ◆ CheckUnresolvedLookupAccess()

Sema::AccessResult Sema::CheckUnresolvedLookupAccess | ( | UnresolvedLookupExpr * | E,
|  | DeclAccessPair | FoundDecl
| ) |  |

Definition at line 1530 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, clang::DeclAccessPair::getAccess(), and clang::UnresolvedLookupExpr::getNamingClass().

Referenced by FinishOverloadedCallExpr().

## ◆ CheckUnresolvedMemberAccess()

Sema::AccessResult Sema::CheckUnresolvedMemberAccess | ( | UnresolvedMemberExpr * | E,
|  | DeclAccessPair | Found
| ) |  |

Perform access-control checking on a previously-unresolved member access which has now been resolved to a member.

Definition at line 1546 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, clang::Type::castAs(), clang::DeclAccessPair::getAccess(), clang::UnresolvedMemberExpr::getBaseType(), clang::PointerType::getPointeeType(), and clang::UnresolvedMemberExpr::isArrow().

## ◆ checkUnsafeAssigns()

bool Sema::checkUnsafeAssigns | ( | SourceLocation | Loc,
|  | QualType | LHS,
|  | Expr * | RHS
| ) |  |

checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type.

Definition at line 14194 of file SemaChecking.cpp.

References checkUnsafeAssignObject(), clang::QualType::getObjCLifetime(), LT, clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Weak.

## ◆ checkUnsafeExprAssigns()

void Sema::checkUnsafeExprAssigns | ( | SourceLocation | Loc,
|  | Expr * | LHS,
|  | Expr * | RHS
| ) |  |

checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expression.

Definition at line 14207 of file SemaChecking.cpp.

References clang::cast(), checkUnsafeAssignObject(), Diag(), clang::ObjCPropertyRefExpr::getExplicitProperty(), clang::QualType::getObjCLifetime(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ObjCPropertyDecl::getType(), clang::Expr::IgnoreParens(), clang::ObjCPropertyRefExpr::isImplicitProperty(), clang::QualType::isNull(), clang::Type::isObjCRetainableType(), LT, clang::ObjCPropertyDecl::OBJC_PR_assign, clang::ObjCPropertyDecl::OBJC_PR_weak, clang::Qualifiers::OCL_None, and clang::Qualifiers::OCL_Weak.

Referenced by LookupMethodInReceiverType().

## ◆ checkUnusedDeclAttributes()

void clang::Sema::checkUnusedDeclAttributes | ( | Declarator & | D | ) |

## ◆ CheckUnusedVolatileAssignment()

void Sema::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.

Definition at line 15265 of file SemaExpr.cpp.

References clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::QualType::isVolatileQualified(), and clang::transformer::remove().

Referenced by CheckUnevaluatedOperand(), EvaluateBinaryTypeTrait(), and IgnoredValueConversions().

## ◆ CheckUsingDeclQualifier()

bool Sema::CheckUsingDeclQualifier | ( | SourceLocation | UsingLoc,
|  | bool | HasTypename,
|  | const CXXScopeSpec & | SS,
|  | const DeclarationNameInfo & | NameInfo,
|  | SourceLocation | NameLoc
| ) |  |

Checks that the given nested-name qualifier used in a using decl in the current context is appropriately related to the current scope.

If an error is found, diagnoses it and returns true.

Definition at line 11935 of file SemaDeclCXX.cpp.

References clang::CPlusPlus11, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), clang::frontend::FixIt, clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclarationNameInfo::getEndLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::DeclContext::isDependentContext(), clang::DeclContext::isRecord(), clang::LookupResult::setHideTags(), and clang::LookupResult::suppressDiagnostics().

## ◆ CheckUsingDeclRedeclaration()

bool Sema::CheckUsingDeclRedeclaration | ( | SourceLocation | UsingLoc,
|  | bool | HasTypenameKeyword,
|  | const CXXScopeSpec & | SS,
|  | SourceLocation | NameLoc,
|  | const LookupResult & | Prev
| ) |  |

Checks that the given using declaration is not an invalid redeclaration.

Note that this is checking only for the using decl itself, not for any ill-formedness among the UsingShadowDecls.

Definition at line 11857 of file SemaDeclCXX.cpp.

References clang::LookupResult::begin(), Diag(), clang::LookupResult::end(), clang::CXXScopeSpec::getScopeRep(), and clang::NestedNameSpecifier::isDependent().

## ◆ CheckUsingShadowDecl()

bool Sema::CheckUsingShadowDecl | ( | UsingDecl * | Using,
|  | NamedDecl * | Orig,
|  | const LookupResult & | Previous,
|  | 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.

Definition at line 11191 of file SemaDeclCXX.cpp.

References clang::LookupResult::begin(), clang::CPlusPlus11, Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::NestedNameSpecifierLoc::getBeginLoc(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::DeclContext::getParent(), clang::UsingDecl::getQualifier(), clang::UsingDecl::getQualifierLoc(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::NamedDecl::getUnderlyingDecl(), clang::RecordDecl::isAnonymousStructOrUnion(), IsEquivalentForUsingDecl(), clang::RecordDecl::isInjectedClassName(), clang::Decl::setInvalidDecl(), and clang::Target.

## ◆ checkVarDeclRedefinition()

bool Sema::checkVarDeclRedefinition | ( | VarDecl * | Old,
|  | VarDecl * | New
| ) |  |

We've just determined that `Old` and `New` both appear to be definitions of the same variable.

Either diagnose or fix the problem.

Definition at line 4278 of file SemaDecl.cpp.

References clang::VarDecl::demoteThisDefinitionToDeclaration(), Diag(), clang::Decl::getDeclContext(), clang::VarDecl::getDescribedVarTemplate(), clang::NamedDecl::getFormalLinkage(), clang::Decl::getLocation(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::InternalLinkage, clang::DeclContext::isDependentContext(), clang::VarDecl::isInline(), and clang::Decl::setInvalidDecl().

## ◆ CheckVariableDeclaration()

bool Sema::CheckVariableDeclaration | ( | VarDecl * | NewVD,
|  | LookupResult & | Previous
| ) |  |

Perform semantic checking on a newly-created variable declaration.

This routine performs all of the type-checking required for a variable declaration once it has been built. It is used both to check variables after they have been parsed and their declarators have been translated into a declaration, and to check variables that have been instantiated from a template.

Sets NewVD->isInvalidDecl() if an error was encountered.

Returns true if the variable declaration is a redeclaration.

Definition at line 7858 of file SemaDecl.cpp.

References checkForConflictWithNonVisibleExternC(), clang::LookupResult::empty(), clang::Decl::isInvalidDecl(), and clang::LookupResult::setShadowed().

## ◆ CheckVariableDeclarationType()

void Sema::CheckVariableDeclarationType | ( | VarDecl * | NewVD | ) |

Definition at line 7616 of file SemaDecl.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Decl::hasAttrs(), clang::Decl::isInvalidDecl(), clang::Type::isObjCObjectType(), and clang::Type::isUndeducedType().

Referenced by noteMemberDeclaredHere().

## ◆ checkVariadicArgument()

void Sema::checkVariadicArgument | ( | const Expr * | E,
|  | VariadicCallType | CT
| ) |  |

Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic if not.

Definition at line 878 of file SemaExpr.cpp.

References Diag(), clang::QualType::DK_nontrivial_c_struct, clang::Stmt::getBeginLoc(), clang::Expr::getType(), clang::QualType::isDestructedType(), clang::Type::isObjCObjectType(), and clang::Type::isRecordType().

## ◆ CheckVarTemplateId() [1/2]

DeclResult Sema::CheckVarTemplateId | ( | VarTemplateDecl * | Template,
|  | SourceLocation | TemplateLoc,
|  | SourceLocation | TemplateNameLoc,
|  | const TemplateArgumentListInfo & | TemplateArgs
| ) |  |

Definition at line 4245 of file SemaTemplate.cpp.

References clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::VarTemplateDecl::findSpecialization(), clang::VarTemplateDecl::getTemplatedDecl(), and clang::TemplateArgumentList::OnStack.

## ◆ CheckVarTemplateId() [2/2]

ExprResult Sema::CheckVarTemplateId | ( | const CXXScopeSpec & | SS,
|  | const DeclarationNameInfo & | NameInfo,
|  | VarTemplateDecl * | Template,
|  | SourceLocation | TemplateLoc,
|  | const TemplateArgumentListInfo * | TemplateArgs
| ) |  |

Definition at line 4400 of file SemaTemplate.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclarationNameInfo::getLoc(), clang::VarDecl::getTemplateSpecializationKind(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::VarDecl::setTemplateSpecializationKind(), and clang::TSK_ImplicitInstantiation.

## ◆ CheckVecStepExpr()

bool Sema::CheckVecStepExpr | ( | Expr * | E | ) |

Definition at line 4151 of file SemaExpr.cpp.

References clang::Expr::IgnoreParens(), clang::Expr::isTypeDependent(), and clang::UETT_VecStep.

## ◆ CheckVectorCast()

bool Sema::CheckVectorCast | ( | SourceRange | R,
|  | QualType | VectorTy,
|  | QualType | Ty,
|  | CastKind & | Kind
| ) |  |

Definition at line 6686 of file SemaExpr.cpp.

References clang::Type::isIntegralType(), and clang::Type::isVectorType().

Referenced by DiagnoseBadFunctionCast().

## ◆ CheckVectorCompareOperands()

QualType Sema::CheckVectorCompareOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | BinaryOperatorKind | Opc
| ) |  |

CheckVectorCompareOperands - vector comparisons are a clang extension that operates on extended vector types.

Instead of producing an IntTy result, like a scalar comparison, a vector comparison produces a vector of integer types.

Definition at line 11240 of file SemaExpr.cpp.

References clang::VectorType::AltiVecVector, clang::Type::castAs(), Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::VectorType::getVectorKind(), and clang::QualType::isNull().

## ◆ CheckVectorLogicalOperands()

QualType Sema::CheckVectorLogicalOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc
| ) |  |

Definition at line 11394 of file SemaExpr.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Type::hasFloatingRepresentation(), and clang::QualType::isNull().

## ◆ CheckVectorOperands()

QualType Sema::CheckVectorOperands | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | bool | IsCompAssign,
|  | bool | AllowBothBool,
|  | bool | AllowBoolConversion
| ) |  |

type checking for vector binary operators.

Definition at line 9132 of file SemaExpr.cpp.

References clang::VectorType::AltiVecBool, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::VectorType::getVectorKind(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

Referenced by CheckGNUVectorConditionalTypes(), CXXCheckConditionalOperands(), and OpenCLCheckVectorConditional().

## ◆ CheckVirtualDtorCall()

void Sema::CheckVirtualDtorCall | ( | CXXDestructorDecl * | dtor,
|  | SourceLocation | Loc,
|  | bool | IsDelete,
|  | bool | CallCanBeVirtual,
|  | bool | WarnOnNonAbstractTypes,
|  | SourceLocation | DtorLoc
| ) |  |

Definition at line 3573 of file SemaExprCXX.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::QualType::getAsStringInternal(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), getPrintingPolicy(), getSourceManager(), clang::CXXMethodDecl::getThisType(), clang::Decl::hasAttr(), clang::CXXRecordDecl::isAbstract(), clang::SourceManager::isInSystemHeader(), clang::CXXRecordDecl::isPolymorphic(), isUnevaluatedContext(), and clang::CXXMethodDecl::isVirtual().

Referenced by ActOnCXXDelete().

## ◆ ClassifyName()

Sema::NameClassification Sema::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.

This routine is used by the parser to resolve identifiers and help direct parsing. When the identifier cannot be found, this routine will attempt to correct the typo and classify based on the resulting name.

Parameters

  S | The scope in which we're performing name lookup.
  SS | The nested-name-specifier that precedes the name.
  Name | The identifier. If typo correction finds an alternative name, this pointer parameter will be updated accordingly.
  NameLoc | The location of the identifier.
  NextToken | The token following the identifier. Used to help disambiguate the name.
  CCC | The correction callback, if typo correction is desired.

Definition at line 849 of file SemaDecl.cpp.

## ◆ CleanupVarDeclMarking()

void Sema::CleanupVarDeclMarking | ( |  | ) |

Definition at line 16792 of file SemaExpr.cpp.

References MarkVarDeclODRUsed().

Referenced by MaybeCreateExprWithCleanups(), and MaybeCreateStmtWithCleanups().

## ◆ clearDelayedTypo()

void Sema::clearDelayedTypo | ( | TypoExpr * | TE | ) |

Clears the state of the given TypoExpr.

Definition at line 5524 of file SemaLookup.cpp.

## ◆ CodeCompleteAfterIf()

void Sema::CodeCompleteAfterIf | ( | Scope * | S | ) |

Definition at line 5300 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteAvailabilityPlatformName()

void Sema::CodeCompleteAvailabilityPlatformName | ( |  | ) |

Definition at line 8801 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteBracketDeclarator()

void Sema::CodeCompleteBracketDeclarator | ( | Scope * | S | ) |

Definition at line 4985 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteCase()

void Sema::CodeCompleteCase | ( | Scope * | S | ) |

Definition at line 4989 of file SemaCodeComplete.cpp.

References clang::Type::castAs(), clang::SwitchStmt::getCond(), clang::EnumDecl::getDefinition(), clang::CaseStmt::getLHS(), clang::SwitchCase::getNextSwitchCase(), clang::SwitchStmt::getSwitchCaseList(), clang::Expr::getType(), clang::Expr::IgnoreImplicit(), clang::Expr::IgnoreParenCasts(), clang::Sema::CodeCompleteExpressionData::IntegralConstantExpression, and clang::Type::isEnumeralType().

## ◆ CodeCompleteConstructorInitializer()

void Sema::CodeCompleteConstructorInitializer | ( | Decl * | Constructor,
|  | ArrayRef< CXXCtorInitializer *> | Initializers
| ) |  |

Definition at line 5586 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteDeclSpec()

void Sema::CodeCompleteDeclSpec | ( | Scope * | S,
|  | DeclSpec & | DS,
|  | bool | AllowNonIdentifiers,
|  | bool | AllowNestedNameSpecifiers
| ) |  |

Definition at line 4176 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteExpression() [1/2]

void Sema::CodeCompleteExpression | ( | Scope * | S,
|  | const CodeCompleteExpressionData & | Data
| ) |  |

Perform code-completion in an expression context when we know what type we're looking for.

Definition at line 4358 of file SemaCodeComplete.cpp.

Referenced by clang::Parser::ParseAssignmentExpression().

## ◆ CodeCompleteExpression() [2/2]

void Sema::CodeCompleteExpression | ( | Scope * | S,
|  | QualType | PreferredType,
|  | bool | IsParenthesized = `false`
| ) |  |

Definition at line 4429 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteFunctionQualifiers()

void Sema::CodeCompleteFunctionQualifiers | ( | DeclSpec & | DS,
|  | Declarator & | D,
|  | const VirtSpecifiers * | VS = `nullptr`
| ) |  |

Definition at line 4963 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteIncludedFile()

void Sema::CodeCompleteIncludedFile | ( | llvm::StringRef | Dir,
|  | bool | IsAngled
| ) |  |

Definition at line 8667 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteInitializer()

void Sema::CodeCompleteInitializer | ( | Scope * | S,
|  | Decl * | D
| ) |  |

Definition at line 5285 of file SemaCodeComplete.cpp.

References clang::ValueDecl::getType(), clang::Sema::CodeCompleteExpressionData::IgnoreDecls, and clang::Sema::CodeCompleteExpressionData::PreferredType.

## ◆ CodeCompleteInPreprocessorConditionalExclusion()

void Sema::CodeCompleteInPreprocessorConditionalExclusion | ( | Scope * | S | ) |

Definition at line 8596 of file SemaCodeComplete.cpp.

References clang::Scope::getFnParent(), PCC_Namespace, and PCC_RecoveryInFunction.

## ◆ CodeCompleteLambdaIntroducer()

void Sema::CodeCompleteLambdaIntroducer | ( | Scope * | S,
|  | LambdaIntroducer & | Intro,
|  | bool | AfterAmpersand
| ) |  |

Definition at line 5746 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteMemberReferenceExpr()

void Sema::CodeCompleteMemberReferenceExpr | ( | Scope * | S,
|  | Expr * | Base,
|  | Expr * | OtherOpBase,
|  | SourceLocation | OpLoc,
|  | bool | IsArrow,
|  | bool | IsBaseExprStatement,
|  | QualType | PreferredType
| ) |  |

Definition at line 4722 of file SemaCodeComplete.cpp.

References clang::CodeCompletionContext::CCC_ArrowMemberAccess, clang::CodeCompletionContext::CCC_DotMemberAccess, clang::CodeCompletionContext::CCC_ObjCPropertyAccess, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isObjCObjectOrInterfaceType(), clang::Type::isObjCObjectPointerType(), and clang::CodeCompletionContext::setPreferredType().

## ◆ CodeCompleteModuleImport()

void Sema::CodeCompleteModuleImport | ( | SourceLocation | ImportLoc,
|  | ModuleIdPath | Path
| ) |  |

Definition at line 4035 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteNamespaceAliasDecl()

void Sema::CodeCompleteNamespaceAliasDecl | ( | Scope * | S | ) |

Definition at line 5536 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteNamespaceDecl()

void Sema::CodeCompleteNamespaceDecl | ( | Scope * | S | ) |

Definition at line 5488 of file SemaCodeComplete.cpp.

References clang::Scope::getEntity(), and clang::Scope::getParent().

## ◆ CodeCompleteNaturalLanguage()

void Sema::CodeCompleteNaturalLanguage | ( |  | ) |

Definition at line 8795 of file SemaCodeComplete.cpp.

References clang::CodeCompletionContext::CCC_NaturalLanguage, and HandleCodeCompleteResults().

## ◆ CodeCompleteObjCAtDirective()

void Sema::CodeCompleteObjCAtDirective | ( | Scope * | S | ) |

Definition at line 5885 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCAtExpression()

void Sema::CodeCompleteObjCAtExpression | ( | Scope * | S | ) |

Definition at line 6045 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCAtStatement()

void Sema::CodeCompleteObjCAtStatement | ( | Scope * | S | ) |

Definition at line 6033 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCAtVisibility()

void Sema::CodeCompleteObjCAtVisibility | ( | Scope * | S | ) |

Definition at line 6022 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCClassMessage()

void Sema::CodeCompleteObjCClassMessage | ( | Scope * | S,
|  | ParsedType | Receiver,
|  | ArrayRef< IdentifierInfo *> | SelIdents,
|  | bool | AtArgumentExpression,
|  | bool | IsSuper = `false`
| ) |  |

Definition at line 6830 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCClassPropertyRefExpr()

void Sema::CodeCompleteObjCClassPropertyRefExpr | ( | Scope * | S,
|  | IdentifierInfo & | ClassName,
|  | SourceLocation | ClassNameLoc,
|  | bool | IsBaseExprStatement
| ) |  |

Definition at line 4863 of file SemaCodeComplete.cpp.

References clang::CodeCompletionContext::CCC_ObjCPropertyAccess.

## ◆ CodeCompleteObjCForCollection()

void Sema::CodeCompleteObjCForCollection | ( | Scope * | S,
|  | DeclGroupPtrTy | IterationVar
| ) |  |

Definition at line 7022 of file SemaCodeComplete.cpp.

References clang::DeclGroupRef::begin(), clang::DeclGroupRef::end(), End, clang::OpaquePtr< PtrTy >::get(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::Sema::CodeCompleteExpressionData::IgnoreDecls, and clang::Sema::CodeCompleteExpressionData::ObjCCollection.

## ◆ CodeCompleteObjCImplementationCategory()

void Sema::CodeCompleteObjCImplementationCategory | ( | Scope * | S,
|  | IdentifierInfo * | ClassName,
|  | SourceLocation | ClassNameLoc
| ) |  |

Definition at line 7274 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCImplementationDecl()

void Sema::CodeCompleteObjCImplementationDecl | ( | Scope * | S | ) |

Definition at line 7221 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCInstanceMessage()

void Sema::CodeCompleteObjCInstanceMessage | ( | Scope * | S,
|  | Expr * | Receiver,
|  | ArrayRef< IdentifierInfo *> | SelIdents,
|  | bool | AtArgumentExpression,
|  | ObjCInterfaceDecl * | Super = `nullptr`
| ) |  |

Definition at line 6865 of file SemaCodeComplete.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ CodeCompleteObjCInterfaceCategory()

void Sema::CodeCompleteObjCInterfaceCategory | ( | Scope * | S,
|  | IdentifierInfo * | ClassName,
|  | SourceLocation | ClassNameLoc
| ) |  |

Definition at line 7239 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCInterfaceDecl()

void Sema::CodeCompleteObjCInterfaceDecl | ( | Scope * | S | ) |

Definition at line 7178 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCMessageReceiver()

void Sema::CodeCompleteObjCMessageReceiver | ( | Scope * | S | ) |

Definition at line 6623 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCMethodDecl()

void Sema::CodeCompleteObjCMethodDecl | ( | Scope * | S,
|  | Optional< bool > | IsInstanceMethod,
|  | ParsedType | ReturnType
| ) |  |

Definition at line 8180 of file SemaCodeComplete.cpp.

References clang::CodeCompletionContext::CCC_Other, FindImplementableMethods(), clang::Scope::getEntity(), HandleCodeCompleteResults(), and clang::DeclContext::isObjCContainer().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ CodeCompleteObjCMethodDeclSelector()

void Sema::CodeCompleteObjCMethodDeclSelector | ( | Scope * | S,
|  | bool | IsInstanceMethod,
|  | bool | AtParameterName,
|  | ParsedType | ReturnType,
|  | ArrayRef< IdentifierInfo *> | SelIdents
| ) |  |

Definition at line 8353 of file SemaCodeComplete.cpp.

References clang::Selector::isNull().

## ◆ CodeCompleteObjCPassingType()

void Sema::CodeCompleteObjCPassingType | ( | Scope * | S,
|  | ObjCDeclSpec & | DS,
|  | bool | IsParameter
| ) |  |

Definition at line 6358 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCPropertyDefinition()

void Sema::CodeCompleteObjCPropertyDefinition | ( | Scope * | S | ) |

Definition at line 7315 of file SemaCodeComplete.cpp.

References clang::CodeCompletionContext::CCC_Other.

## ◆ CodeCompleteObjCPropertyFlags()

void Sema::CodeCompleteObjCPropertyFlags | ( | Scope * | S,
|  | ObjCDeclSpec & | ODS
| ) |  |

Definition at line 6087 of file SemaCodeComplete.cpp.

References clang::ObjCDeclSpec::getPropertyAttributes().

## ◆ CodeCompleteObjCPropertyGetter()

void Sema::CodeCompleteObjCPropertyGetter | ( | Scope * | S | ) |

Definition at line 6305 of file SemaCodeComplete.cpp.

References Category.

## ◆ CodeCompleteObjCPropertySetter()

void Sema::CodeCompleteObjCPropertySetter | ( | Scope * | S | ) |

Definition at line 6331 of file SemaCodeComplete.cpp.

References Category.

## ◆ CodeCompleteObjCPropertySynthesizeIvar()

void Sema::CodeCompleteObjCPropertySynthesizeIvar | ( | Scope * | S,
|  | IdentifierInfo * | PropertyName
| ) |  |

Definition at line 7352 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCProtocolDecl()

void Sema::CodeCompleteObjCProtocolDecl | ( | Scope * | S | ) |

Definition at line 7140 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCProtocolReferences()

void Sema::CodeCompleteObjCProtocolReferences | ( | ArrayRef< IdentifierLocPair > | Protocols | ) |

Definition at line 7113 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCSelector()

void Sema::CodeCompleteObjCSelector | ( | Scope * | S,
|  | ArrayRef< IdentifierInfo *> | SelIdents
| ) |  |

Definition at line 7038 of file SemaCodeComplete.cpp.

References clang::Selector::isNull().

## ◆ CodeCompleteObjCSuperclass()

void Sema::CodeCompleteObjCSuperclass | ( | Scope * | S,
|  | IdentifierInfo * | ClassName,
|  | SourceLocation | ClassNameLoc
| ) |  |

Definition at line 7196 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteObjCSuperMessage()

void Sema::CodeCompleteObjCSuperMessage | ( | Scope * | S,
|  | SourceLocation | SuperLoc,
|  | ArrayRef< IdentifierInfo *> | SelIdents,
|  | bool | AtArgumentExpression
| ) |  |

Definition at line 6660 of file SemaCodeComplete.cpp.

References clang::ObjCInterfaceDecl::getSuperClass().

## ◆ CodeCompleteOperatorName()

void Sema::CodeCompleteOperatorName | ( | Scope * | S | ) |

Definition at line 5553 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteOrdinaryName()

void Sema::CodeCompleteOrdinaryName | ( | Scope * | S,
|  | ParserCompletionContext | CompletionContext
| ) |  |

Definition at line 4083 of file SemaCodeComplete.cpp.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ CodeCompletePostfixExpression()

void Sema::CodeCompletePostfixExpression | ( | Scope * | S,
|  | ExprResult | LHS,
|  | QualType | PreferredType
| ) |  |

Definition at line 4435 of file SemaCodeComplete.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ CodeCompletePreprocessorDirective()

void Sema::CodeCompletePreprocessorDirective | ( | bool | InConditional | ) |

Definition at line 8438 of file SemaCodeComplete.cpp.

## ◆ CodeCompletePreprocessorExpression()

void Sema::CodeCompletePreprocessorExpression | ( |  | ) |

Definition at line 8628 of file SemaCodeComplete.cpp.

## ◆ CodeCompletePreprocessorMacroArgument()

void Sema::CodeCompletePreprocessorMacroArgument | ( | Scope * | S,
|  | IdentifierInfo * | Macro,
|  | MacroInfo * | MacroInfo,
|  | unsigned | Argument
| ) |  |

Definition at line 8653 of file SemaCodeComplete.cpp.

## ◆ CodeCompletePreprocessorMacroName()

void Sema::CodeCompletePreprocessorMacroName | ( | bool | IsDefinition | ) |

Definition at line 8601 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteQualifiedId()

void Sema::CodeCompleteQualifiedId | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | bool | EnteringContext,
|  | bool | IsUsingDeclaration,
|  | QualType | BaseType,
|  | QualType | PreferredType
| ) |  |

Definition at line 5359 of file SemaCodeComplete.cpp.

References clang::CodeCompletionContext::CCC_Symbol, clang::Scope::getEntity(), HandleCodeCompleteResults(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::CodeCompletionContext::setCXXScopeSpecifier(), and clang::CodeCompletionContext::setIsUsingDeclaration().

## ◆ CodeCompleteTag()

void Sema::CodeCompleteTag | ( | Scope * | S,
|  | unsigned | TagSpec
| ) |  |

Definition at line 4887 of file SemaCodeComplete.cpp.

References clang::CodeCompletionContext::CCC_ClassOrStructTag, clang::CodeCompletionContext::CCC_EnumTag, clang::CodeCompletionContext::CCC_Other, clang::CodeCompletionContext::CCC_UnionTag, ContextKind, clang::DeclSpec::TST_class, clang::DeclSpec::TST_enum, clang::DeclSpec::TST_interface, clang::DeclSpec::TST_struct, and clang::DeclSpec::TST_union.

## ◆ CodeCompleteTypeQualifiers()

void Sema::CodeCompleteTypeQualifiers | ( | DeclSpec & | DS | ) |

Definition at line 4952 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteUsing()

void Sema::CodeCompleteUsing | ( | Scope * | S | ) |

Definition at line 5438 of file SemaCodeComplete.cpp.

## ◆ CodeCompleteUsingDirective()

void Sema::CodeCompleteUsingDirective | ( | Scope * | S | ) |

Definition at line 5468 of file SemaCodeComplete.cpp.

## ◆ CollectIvarsToConstructOrDestruct()

void Sema::CollectIvarsToConstructOrDestruct | ( | ObjCInterfaceDecl * | OI,
|  | SmallVectorImpl< ObjCIvarDecl *> & | Ivars
| ) |  |

CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.

Definition at line 5126 of file SemaDeclObjC.cpp.

References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), clang::ASTContext::getBaseElementType(), clang::ObjCIvarDecl::getNextIvar(), and clang::Type::isRecordType().

## ◆ CollectMultipleMethodsInGlobalPool()

bool Sema::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.

- Returns instance or factory methods in global method pool for given selector. It checks the desired kind first, if none is found, and parameter checkTheOther is set, it then checks the other kind. If no such method or only one method is found, function returns false; otherwise, it returns true.

Definition at line 3483 of file SemaDeclObjC.cpp.

References FilterMethodsByTypeBound(), clang::ObjCMethodList::getNext(), MethodPool, and ReadMethodPool().

## ◆ collectUnexpandedParameterPacks() [1/6]

void Sema::collectUnexpandedParameterPacks | ( | TemplateArgument | Arg,
|  | SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded
| ) |  |

Collect the set of unexpanded parameter packs within the given template argument.

Parameters

  Arg | The template argument that will be traversed to find unexpanded parameter packs.

Definition at line 491 of file SemaTemplateVariadic.cpp.

Referenced by SubstBaseSpecifiers(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ collectUnexpandedParameterPacks() [2/6]

void Sema::collectUnexpandedParameterPacks | ( | TemplateArgumentLoc | Arg,
|  | SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded
| ) |  |

Collect the set of unexpanded parameter packs within the given template argument.

Parameters

  Arg | The template argument that will be traversed to find unexpanded parameter packs.

Definition at line 497 of file SemaTemplateVariadic.cpp.

## ◆ collectUnexpandedParameterPacks() [3/6]

void Sema::collectUnexpandedParameterPacks | ( | QualType | T,
|  | SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded
| ) |  |

Collect the set of unexpanded parameter packs within the given type.

Parameters

  T | The type that will be traversed to find unexpanded parameter packs.

Definition at line 503 of file SemaTemplateVariadic.cpp.

## ◆ collectUnexpandedParameterPacks() [4/6]

void Sema::collectUnexpandedParameterPacks | ( | TypeLoc | TL,
|  | SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded
| ) |  |

Collect the set of unexpanded parameter packs within the given type.

Parameters

  TL | The type that will be traversed to find unexpanded parameter packs.

Definition at line 508 of file SemaTemplateVariadic.cpp.

## ◆ collectUnexpandedParameterPacks() [5/6]

void Sema::collectUnexpandedParameterPacks | ( | NestedNameSpecifierLoc | NNS,
|  | SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded
| ) |  |

Collect the set of unexpanded parameter packs within the given nested-name-specifier.

Parameters

  NNS | The nested-name-specifier that will be traversed to find unexpanded parameter packs.

Definition at line 513 of file SemaTemplateVariadic.cpp.

## ◆ collectUnexpandedParameterPacks() [6/6]

void Sema::collectUnexpandedParameterPacks | ( | const DeclarationNameInfo & | NameInfo,
|  | SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded
| ) |  |

Collect the set of unexpanded parameter packs within the given name.

Parameters

  NameInfo | The name that will be traversed to find unexpanded parameter packs.

Definition at line 520 of file SemaTemplateVariadic.cpp.

## ◆ CompareReferenceRelationship()

Sema::ReferenceCompareResult Sema::CompareReferenceRelationship | ( | SourceLocation | Loc,
|  | QualType | OrigT1,
|  | QualType | OrigT2,
|  | ReferenceConversions * | ConvOut = `nullptr`
| ) |  |

CompareReferenceRelationship - Compare the two types T1 and T2 to determine whether they are reference-compatible, reference-related, or incompatible, for use in C++ initialization by reference (C++ [dcl.ref.init]p4).

Neither type can be a reference type, and the first type (T1) is the pointee type of the reference type being initialized.

Definition at line 4431 of file SemaOverload.cpp.

References clang::Type::isReferenceType().

Referenced by CXXCheckConditionalOperands(), FindConversionForRefInit(), TryListConversion(), TryLValueToRValueCast(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), and TryRefInitWithConversionFunction().

## ◆ CompleteConstructorCall()

bool Sema::CompleteConstructorCall | ( | CXXConstructorDecl * | Constructor,
|  | MultiExprArg | ArgsPtr,
|  | SourceLocation | Loc,
|  | SmallVectorImpl< Expr *> & | ConvertedArgs,
|  | bool | AllowExplicit = `false`,
|  | bool | IsListInitialization = `false`
| ) |  |

Given a constructor and the set of arguments provided for the constructor, convert the arguments and add any required default arguments to form a proper call to this constructor.

Returns
  true if an error occurred, false otherwise.

Definition at line 14783 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), clang::FunctionProtoType::getNumParams(), and clang::ValueDecl::getType().

Referenced by CopyObject(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), and PerformImplicitConversion().

## ◆ completeExprArrayBound()

void Sema::completeExprArrayBound | ( | Expr * | E | ) |

Definition at line 7821 of file SemaType.cpp.

References clang::Expr::getExprLoc(), clang::Expr::IgnoreParens(), clang::isTemplateInstantiation(), clang::runWithSufficientStackSpace(), clang::Expr::setType(), and clang::TSK_ImplicitInstantiation.

Referenced by AdjustFunctionParmAndArgTypesForDeduction().

## ◆ CompleteMemberSpecialization()

void Sema::CompleteMemberSpecialization | ( | NamedDecl * | Member,
|  | LookupResult & | Previous
| ) |  |

Definition at line 9078 of file SemaTemplate.cpp.

References completeMemberSpecializationImpl(), clang::Decl::getCanonicalDecl(), and clang::Decl::getLocation().

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ CompleteVarTemplateSpecializationDecl()

VarTemplateSpecializationDecl * Sema::CompleteVarTemplateSpecializationDecl | ( | VarTemplateSpecializationDecl * | VarSpec,
|  | VarDecl * | PatternDecl,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Instantiates a variable template specialization by completing it with appropriate type information and initializer.

Definition at line 4736 of file SemaTemplateInstantiateDecl.cpp.

References clang::NamedDecl::getDeclName(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::VarDecl::isThisDeclarationADefinition(), clang::VarTemplateSpecializationDecl::setCompleteDefinition(), and clang::ValueDecl::setType().

## ◆ computeDeclContext() [1/2]

DeclContext * Sema::computeDeclContext | ( | QualType | T | ) |

Compute the DeclContext that is associated with the given type.

Parameters

  T | the type for which we are attempting to find a DeclContext.

Returns
  the declaration context represented by the type T, or NULL if the declaration context cannot be computed (e.g., because it is dependent and not the current instantiation).

Definition at line 53 of file SemaCXXScopeSpec.cpp.

References CurContext, clang::Type::getAs(), getCurrentInstantiationOf(), and clang::Type::isDependentType().

Referenced by ActOnPseudoDestructorExpr(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), LookupMemberExprInRecord(), clang::TreeTransform< Derived >::RebuildDependentNameType(), TryNamespaceTypoCorrection(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ computeDeclContext() [2/2]

DeclContext * Sema::computeDeclContext | ( | const CXXScopeSpec & | SS,
|  | bool | EnteringContext = `false`
| ) |  |

Compute the DeclContext that is associated with the given scope specifier.

Parameters

  SS | the C++ scope specifier as it appears in the source
  EnteringContext | when true, we will be entering the context of this scope specifier, so we can retrieve the declaration context of a class template or class template partial specialization even if it is not the current instantiation.

Returns
  the declaration context represented by the scope specifier `SS`, or NULL if the declaration context cannot be computed (e.g., because it is dependent and not the current instantiation).

Definition at line 74 of file SemaCXXScopeSpec.cpp.

References Context, diagnoseMissingImport(), clang::Type::getAs(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getAsType(), clang::ASTContext::getCanonicalType(), getCurrentInstantiationOf(), clang::TagType::getDecl(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::NamespaceAliasDecl::getNamespace(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTranslationUnitDecl(), clang::NestedNameSpecifier::Global, clang::ASTContext::hasSameType(), hasVisibleDeclaration(), clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::isDependent(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), isSFINAEContext(), clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, PartialSpecialization, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

## ◆ ComputeDefaultedCopyAssignmentExceptionSpec()

ImplicitExceptionSpecification clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpec | ( | CXXMethodDecl * | MD | ) |

Determine what sort of exception specification a defaulted copy assignment operator of a class will have, and whether the parameter will be const.

## ◆ ComputeDefaultedCopyCtorExceptionSpec()

ImplicitExceptionSpecification clang::Sema::ComputeDefaultedCopyCtorExceptionSpec | ( | CXXMethodDecl * | MD | ) |

Determine what sort of exception specification a defaulted default constructor of a class will have, and whether the parameter will be const.

## ◆ ComputeDefaultedDefaultCtorExceptionSpec()

ImplicitExceptionSpecification clang::Sema::ComputeDefaultedDefaultCtorExceptionSpec | ( | SourceLocation | Loc,
|  | CXXMethodDecl * | MD
| ) |  |

Determine what sort of exception specification a defaulted copy constructor of a class will have.

## ◆ ComputeDefaultedDtorExceptionSpec()

ImplicitExceptionSpecification clang::Sema::ComputeDefaultedDtorExceptionSpec | ( | CXXMethodDecl * | MD | ) |

Determine what sort of exception specification a defaulted destructor of a class will have.

## ◆ ComputeDefaultedMoveAssignmentExceptionSpec()

ImplicitExceptionSpecification clang::Sema::ComputeDefaultedMoveAssignmentExceptionSpec | ( | CXXMethodDecl * | MD | ) |

Determine what sort of exception specification a defaulted move assignment operator of a class will have.

## ◆ ComputeDefaultedMoveCtorExceptionSpec()

ImplicitExceptionSpecification clang::Sema::ComputeDefaultedMoveCtorExceptionSpec | ( | CXXMethodDecl * | MD | ) |

Determine what sort of exception specification a defaulted move constructor of a class will have.

## ◆ ComputeInheritingCtorExceptionSpec()

ImplicitExceptionSpecification clang::Sema::ComputeInheritingCtorExceptionSpec | ( | SourceLocation | Loc,
|  | CXXConstructorDecl * | CD
| ) |  |

Determine what sort of exception specification an inheriting constructor of a class will have.

## ◆ computeNRVO()

void Sema::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.

Each of the variables that is subject to the named return value optimization will be marked as NRVO variables in the AST, and any return statement that has a marked NRVO variable as its NRVO candidate can use the named return value optimization.

This function applies a very simplistic algorithm for NRVO: if every return statement in the scope of a variable has the same NRVO candidate, that candidate is an NRVO variable.

Definition at line 13797 of file SemaDecl.cpp.

References clang::sema::FunctionScopeInfo::Returns.

## ◆ ConditionError()

static ConditionResult clang::Sema::ConditionError | ( |  | ) |
| inline static

Definition at line 11024 of file Sema.h.

Referenced by ActOnConditionVariable().

## ◆ containsUnexpandedParameterPacks()

bool Sema::containsUnexpandedParameterPacks | ( | Declarator & | D | ) |

Determine whether the given declarator contains any unexpanded parameter packs.

This routine is used by the parser to disambiguate function declarators with an ellipsis prior to the ')', e.g.,

void f(T...);

To determine whether we have an (unnamed) function parameter pack or a variadic function.

Returns
  true if the declarator contains any unexpanded parameter packs, false otherwise.

Definition at line 835 of file SemaTemplateVariadic.cpp.

References clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::NestedNameSpecifier::containsUnexpandedParameterPack(), clang::Expr::containsUnexpandedParameterPack(), clang::Type::containsUnexpandedParameterPack(), clang::EST_Dynamic, clang::DeclaratorChunk::FunctionTypeInfo::Exceptions, clang::DeclaratorChunk::Fun, clang::DeclaratorChunk::Function, clang::OpaquePtr< PtrTy >::get(), clang::TypoCorrection::getCorrectionDecl(), clang::Declarator::getDeclSpec(), clang::DeclaratorChunk::FunctionTypeInfo::getExceptionSpecType(), clang::DeclaratorChunk::FunctionTypeInfo::getNumExceptions(), clang::Declarator::getNumTypeObjects(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getRepAsType(), clang::CXXScopeSpec::getScopeRep(), clang::Declarator::getTrailingRequiresClause(), clang::DeclaratorChunk::FunctionTypeInfo::getTrailingReturnType(), clang::ValueDecl::getType(), clang::Declarator::getTypeObject(), clang::DeclSpec::getTypeSpecType(), clang::DeclaratorChunk::FunctionTypeInfo::hasTrailingReturnType(), clang::isComputedNoexcept(), clang::QualType::isNull(), clang::Decl::isParameterPack(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::Mem, clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::FunctionTypeInfo::NoexceptExpr, clang::DeclaratorChunk::ArrayTypeInfo::NumElts, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pipe, clang::DeclaratorChunk::Pointer, clang::DeclaratorChunk::Reference, clang::DeclaratorChunk::MemberPointerTypeInfo::Scope(), clang::TST_Accum, clang::TST_atomic, clang::TST_auto, clang::TST_auto_type, clang::TST_bool, clang::TST_char, clang::TST_char16, clang::TST_char32, clang::TST_char8, clang::TST_class, clang::TST_decimal128, clang::TST_decimal32, clang::TST_decimal64, clang::TST_decltype, clang::TST_decltype_auto, clang::TST_double, clang::TST_enum, clang::TST_error, clang::TST_float, clang::TST_float128, clang::TST_Float16, clang::TST_Fract, clang::TST_half, clang::TST_int, clang::TST_int128, clang::TST_interface, clang::TST_struct, clang::TST_typename, clang::TST_typeofExpr, clang::TST_typeofType, clang::TST_underlyingType, clang::TST_union, clang::TST_unknown_anytype, clang::TST_unspecified, clang::TST_void, clang::TST_wchar, and clang::DeclaratorChunk::TypeAndRange::Ty.

## ◆ ConversionToObjCStringLiteralCheck()

bool Sema::ConversionToObjCStringLiteralCheck | ( | QualType | DstType,
|  | Expr *& | SrcExpr,
|  | bool | Diagnose = `true`
| ) |  |

Definition at line 14705 of file SemaExpr.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::Type::getAs(), clang::StringLiteral::getBeginLoc(), clang::NamedDecl::getIdentifier(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::Expr::IgnoreParenImpCasts(), clang::StringLiteral::isAscii(), clang::ObjCObjectPointerType::isObjCIdType(), and clang::IdentifierInfo::isStr().

Referenced by clang::InitializationSequence::InitializeFrom().

## ◆ ConvertArgumentsForCall()

bool Sema::ConvertArgumentsForCall | ( | CallExpr * | Call,
|  | Expr * | Fn,
|  | FunctionDecl * | FDecl,
|  | const FunctionProtoType * | Proto,
|  | ArrayRef< Expr *> | Args,
|  | SourceLocation | RParenLoc,
|  | bool | IsExecConfig = `false`
| ) |  |

ConvertArgumentsForCall - Converts the arguments specified in Args/NumArgs to the parameter types of the function FDecl with function prototype Proto.

Call is the call expression itself, and Fn is the function expression. For a C++ member function, this routine does not attempt to convert the object argument. Returns true if the call is ill-formed.

Definition at line 5148 of file SemaExpr.cpp.

References clang::FunctionDecl::getBuiltinID().

## ◆ ConvertDeclToDeclGroup()

Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup | ( | Decl * | Ptr,
|  | Decl * | OwnedType = `nullptr`
| ) |  |

Definition at line 55 of file SemaDecl.cpp.

References clang::DeclGroupRef::Create().

Referenced by clang::CoroutineStmtBuilder::buildDependentStatements(), noteMemberDeclaredHere(), and clang::Parser::ParseTopLevelDecl().

## ◆ ConvertIntegerToTypeWarnOnOverflow()

void clang::Sema::ConvertIntegerToTypeWarnOnOverflow | ( | llvm::APSInt & | OldVal,
|  | unsigned | NewWidth,
|  | bool | NewSign,
|  | SourceLocation | Loc,
|  | unsigned | DiagID
| ) |  |

ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have the specified width and sign.

If an overflow occurs, detect it and emit the specified diagnostic.

## ◆ CorrectDelayedTyposInExpr() [1/4]

ExprResult Sema::CorrectDelayedTyposInExpr | ( | Expr * | E,
|  | VarDecl * | InitDecl = `nullptr`,
|  | 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.

Parameters

  E | The Expr to check for TypoExprs.
  InitDecl | A VarDecl to avoid because the Expr being corrected is its initializer.
  Filter | A function applied to a newly rebuilt Expr to determine if it is an acceptable/usable result from a single combination of typo corrections. As long as the filter returns ExprError, different combinations of corrections will be tried until all are exhausted.

Definition at line 8166 of file SemaExprCXX.cpp.

References ExprEvalContexts, clang::tooling::Filter, clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Result.

Referenced by ActOnCXXTypeConstructExpr(), ActOnFinishFullExpr(), checkArgsForPlaceholders(), CheckArrayDesignatorSyntax(), CorrectDelayedTyposInBinOp(), FinishForRangeVarDecl(), clang::Parser::ParseConstraintExpression(), clang::Parser::ParseConstraintLogicalAndExpression(), clang::Parser::ParseConstraintLogicalOrExpression(), and clang::Parser::ParseUnqualifiedId().

## ◆ CorrectDelayedTyposInExpr() [2/4]

ExprResult clang::Sema::CorrectDelayedTyposInExpr | ( | Expr * | E,
|  | llvm::function_ref< ExprResult(Expr *)> | Filter
| ) |  |
| inline

Definition at line 3712 of file Sema.h.

References clang::tooling::Filter.

## ◆ CorrectDelayedTyposInExpr() [3/4]

ExprResult clang::Sema::CorrectDelayedTyposInExpr | ( | ExprResult | ER,
|  | VarDecl * | InitDecl = `nullptr`,
|  | llvm::function_ref< ExprResult(Expr *)> | Filter = `[](Expr *E) -> ExprResult { return E; }`
| ) |  |
| inline

Definition at line 3718 of file Sema.h.

References clang::tooling::Filter, clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ CorrectDelayedTyposInExpr() [4/4]

ExprResult clang::Sema::CorrectDelayedTyposInExpr | ( | ExprResult | ER,
|  | llvm::function_ref< ExprResult(Expr *)> | Filter
| ) |  |
| inline

Definition at line 3725 of file Sema.h.

References clang::tooling::Filter, Id, and IsStatic.

## ◆ CorrectTypo()

TypoCorrection Sema::CorrectTypo | ( | const DeclarationNameInfo & | TypoName,
|  | 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.

Parameters

  TypoName | the `DeclarationNameInfo` structure that contains the name that was present in the source code along with its location.
  LookupKind | the name-lookup criteria used to search for the name.
  S | the scope in which name lookup occurs.
  SS | the nested-name-specifier that precedes the name we're looking for, if present.
  CCC | A CorrectionCandidateCallback object that provides further validation of typo correction candidates. It also provides flags for determining the set of keywords permitted.
  MemberContext | if non-NULL, the context in which to look for a member access expression.
  EnteringContext | whether we're entering the context described by the nested-name-specifier SS.
  OPT | when non-NULL, the search for visible declarations will also walk the protocols in the qualified interfaces of `OPT`.

Returns
  a `TypoCorrection` containing the corrected name if the typo along with information such as the `NamedDecl` where the corrected name was declared, and any additional `NestedNameSpecifier` needed to access it (C++ only). The `TypoCorrection` is empty if there is no correction.

Definition at line 4999 of file SemaLookup.cpp.

References clang::CorrectionCandidateCallback::WantObjCSuper, and clang::CorrectionCandidateCallback::WantRemainingKeywords.

Referenced by ActOnStartClassImplementation(), FindProtocolDeclaration(), LookupMemberExpr(), and TryNamespaceTypoCorrection().

## ◆ CorrectTypoDelayed()

TypoExpr * Sema::CorrectTypoDelayed | ( | const DeclarationNameInfo & | TypoName,
|  | 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.

Parameters

  TypoName | the `DeclarationNameInfo` structure that contains the name that was present in the source code along with its location.
  LookupKind | the name-lookup criteria used to search for the name.
  S | the scope in which name lookup occurs.
  SS | the nested-name-specifier that precedes the name we're looking for, if present.
  CCC | A CorrectionCandidateCallback object that provides further validation of typo correction candidates. It also provides flags for determining the set of keywords permitted.
  TDG | A TypoDiagnosticGenerator functor that will be used to print diagnostics when the actual typo correction is attempted.
  TRC | A TypoRecoveryCallback functor that will be used to build an Expr from a typo correction candidate.
  MemberContext | if non-NULL, the context in which to look for a member access expression.
  EnteringContext | whether we're entering the context described by the nested-name-specifier SS.
  OPT | when non-NULL, the search for visible declarations will also walk the protocols in the qualified interfaces of `OPT`.

Returns
  a new `TypoExpr` that will later be replaced in the AST with an Expr representing the result of performing typo correction, or nullptr if typo correction is not possible. If nullptr is returned, no diagnostics will be emitted and it is the responsibility of the caller to emit any that are needed.

Definition at line 5134 of file SemaLookup.cpp.

## ◆ CreateBuiltinArraySubscriptExpr()

ExprResult Sema::CreateBuiltinArraySubscriptExpr | ( | Expr * | Base,
|  | SourceLocation | LLoc,
|  | Expr * | Idx,
|  | SourceLocation | RLoc
| ) |  |

Definition at line 4734 of file SemaExpr.cpp.

Referenced by checkArrayLikeDecomposition().

## ◆ CreateBuiltinBinOp()

ExprResult Sema::CreateBuiltinBinOp | ( | SourceLocation | OpLoc,
|  | BinaryOperatorKind | Opc,
|  | Expr * | LHSExpr,
|  | Expr * | RHSExpr
| ) |  |

CreateBuiltinBinOp - Creates a new built-in binary operation with operator `Opc` at location `TokLoc`.

This routine only supports built-in operations; ActOnBinOp handles overloaded operators.

Definition at line 12920 of file SemaExpr.cpp.

References CheckCommaOperands(), checkObjCPointerIntrospection(), CorrectDelayedTyposInBinOp(), clang::CPlusPlus, clang::CPlusPlus11, clang::InitializationKind::CreateDirectList(), Diag(), DiagnoseSelfAssignment(), clang::ExprError(), clang::LangOptions::FPE_Ignore, clang::LangOptions::FPR_ToNearest, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsCXXRecordDecl(), clang::Stmt::getBeginLoc(), clang::Stmt::getEndLoc(), clang::Expr::getType(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isAtomicType(), clang::Type::isBlockPointerType(), clang::Type::isImageType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isPipeType(), clang::Type::isRealFloatingType(), clang::Type::isSamplerT(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), isVector(), clang::OK_ObjCProperty, clang::OK_Ordinary, RecordModifiableNonNullParam(), and clang::VK_RValue.

Referenced by buildCounterUpdate(), and buildPostUpdate().

## ◆ CreateBuiltinUnaryOp()

ExprResult Sema::CreateBuiltinUnaryOp | ( | SourceLocation | OpLoc,
|  | UnaryOperatorKind | Opc,
|  | Expr * | InputExpr
| ) |  |

Definition at line 13578 of file SemaExpr.cpp.

References CheckIncrementDecrementOperand(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::UnaryOperator::isArithmeticOp(), clang::Type::isAtomicType(), clang::Type::isBlockPointerType(), clang::Type::isImageType(), clang::UnaryOperator::isIncrementDecrementOp(), isOverflowingIntegerType(), clang::Type::isPipeType(), clang::Type::isSamplerT(), clang::OK_Ordinary, clang::OpenCL, and clang::VK_RValue.

Referenced by buildCapture(), buildCaptureDecl(), checkComplexDecomposition(), and diagReturnOnAllocFailure().

## ◆ CreateCapturedStmtRecordDecl()

RecordDecl * Sema::CreateCapturedStmtRecordDecl | ( | CapturedDecl *& | CD,
|  | SourceLocation | Loc,
|  | unsigned | NumParams
| ) |  |

Definition at line 4272 of file SemaStmt.cpp.

References clang::CPlusPlus, clang::CXXRecordDecl::Create(), clang::DeclContext::getParent(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), and clang::DeclContext::isRecord().

## ◆ CreateGenericSelectionExpr()

ExprResult Sema::CreateGenericSelectionExpr | ( | SourceLocation | KeyLoc,
|  | SourceLocation | DefaultLoc,
|  | SourceLocation | RParenLoc,
|  | Expr * | ControllingExpr,
|  | ArrayRef< TypeSourceInfo *> | Types,
|  | ArrayRef< Expr *> | Exprs
| ) |  |

Definition at line 1543 of file SemaExpr.cpp.

## ◆ createImplicitModuleImportForErrorRecovery()

void Sema::createImplicitModuleImportForErrorRecovery | ( | SourceLocation | Loc,
|  | Module * | Mod
| ) |  |

Create an implicit import of the given module at the given source location, for error recovery, if possible.

This routine is typically used when an entity found by name lookup is actually hidden within a module that we know about but the user has forgotten to import.

Definition at line 502 of file SemaModule.cpp.

References clang::DeclContext::addDecl(), clang::Module::AllVisible, clang::ImportDecl::CreateImplicit(), and clang::Decl::getTranslationUnitDecl().

## ◆ createLambdaClosureType()

CXXRecordDecl * Sema::createLambdaClosureType | ( | SourceRange | IntroducerRange,
|  | TypeSourceInfo * | Info,
|  | bool | KnownDependent,
|  | LambdaCaptureDefault | CaptureDefault
| ) |  |

Create a new lambda closure type.

Definition at line 241 of file SemaLambda.cpp.

References clang::CXXRecordDecl::CreateLambda(), getGenericLambdaTemplateParameterList(), clang::DeclContext::getParent(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), and clang::DeclContext::isRecord().

## ◆ createLambdaInitCaptureVarDecl()

VarDecl * Sema::createLambdaInitCaptureVarDecl | ( | SourceLocation | Loc,
|  | QualType | InitCaptureType,
|  | SourceLocation | EllipsisLoc,
|  | IdentifierInfo * | Id,
|  | unsigned | InitStyle,
|  | Expr * | Init
| ) |  |

Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purposes for a lambda init capture.

CodeGen handles emission of lambda captures, ignoring these dummy variables appropriately.

Definition at line 851 of file SemaLambda.cpp.

## ◆ CreateMaterializeTemporaryExpr()

MaterializeTemporaryExpr * Sema::CreateMaterializeTemporaryExpr | ( | QualType | T,
|  | Expr * | Temporary,
|  | bool | BoundToLvalueReference
| ) |  |

Definition at line 7698 of file SemaInit.cpp.

Referenced by DiagnoseBadFunctionCast(), getCastAwayConstnessCastKind(), ImpCastExprToType(), clang::InitializationSequence::Perform(), and TryConstCast().

## ◆ CreateOverloadedArraySubscriptExpr()

ExprResult Sema::CreateOverloadedArraySubscriptExpr | ( | SourceLocation | LLoc,
|  | SourceLocation | RLoc,
|  | Expr * | Base,
|  | Expr * | Idx
| ) |  |

Definition at line 13590 of file SemaOverload.cpp.

## ◆ CreateOverloadedBinOp()

ExprResult Sema::CreateOverloadedBinOp | ( | SourceLocation | OpLoc,
|  | BinaryOperatorKind | Opc,
|  | const UnresolvedSetImpl & | Fns,
|  | Expr * | LHS,
|  | Expr * | RHS,
|  | bool | PerformADL = `true`,
|  | bool | AllowRewrittenCandidates = `true`,
|  | FunctionDecl * | DefaultedFn = `nullptr`
| ) |  |

Create a binary operation that may resolve to an overloaded operator.

Parameters

  OpLoc | The location of the operator itself (e.g., '+').
  Opc | The BinaryOperatorKind that describes this operator.
  Fns | The set of non-member functions that will be considered by overload resolution. The caller needs to build this set based on the context using, e.g., LookupOverloadedOperatorName() and ArgumentDependentLookup(). This set should not contain any member functions; those will be added by CreateOverloadedBinOp().
  LHS | Left-hand argument.
  RHS | Right-hand argument.
  PerformADL | Whether to consider operator candidates found by ADL.
  AllowRewrittenCandidates | Whether to consider candidates found by C++20 operator rewrites.
  DefaultedFn | If we are synthesizing a defaulted operator function, the function in question. Such a function is never a candidate in our overload resolution. This also enables synthesizing a three-way comparison from < and == as described in C++20 [class.spaceship]p1.

Definition at line 13126 of file SemaOverload.cpp.

References clang::CPlusPlus2a, clang::UnresolvedSetImpl::empty(), and clang::BinaryOperator::getOverloadedOperator().

Referenced by BuildOverloadedBinOp().

## ◆ CreateOverloadedUnaryOp()

ExprResult Sema::CreateOverloadedUnaryOp | ( | SourceLocation | OpLoc,
|  | UnaryOperatorKind | Opc,
|  | const UnresolvedSetImpl & | Fns,
|  | Expr * | Input,
|  | bool | PerformADL = `true`
| ) |  |

Create a unary operation that may resolve to an overloaded operator.

Parameters

  OpLoc | The location of the operator itself (e.g., '*').
  Opc | The UnaryOperatorKind that describes this operator.
  Fns | The set of non-member functions that will be considered by overload resolution. The caller needs to build this set based on the context using, e.g., LookupOverloadedOperatorName() and ArgumentDependentLookup(). This set should not contain any member functions; those will be added by CreateOverloadedUnaryOp().
  Input | The input argument.

Definition at line 12865 of file SemaOverload.cpp.

References clang::UnaryOperator::getOverloadedOperator(), and clang::OO_None.

Referenced by buildOperatorCoawaitCall().

## ◆ CreateParsedType()

ParsedType Sema::CreateParsedType | ( | QualType | T,
|  | TypeSourceInfo * | TInfo
| ) |  |

Package the given type and TSI into a ParsedType.

Create a LocInfoType to hold the given QualType and TypeSourceInfo.

Definition at line 6007 of file SemaType.cpp.

References clang::Type::getTypeClass(), clang::OpaquePtr< QualType >::make(), and clang::TypeAlignment.

## ◆ CreatePropertyDecl()

ObjCPropertyDecl * Sema::CreatePropertyDecl | ( | 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.

Definition at line 566 of file SemaObjCProperty.cpp.

## ◆ CreateUnaryExprOrTypeTraitExpr() [1/2]

ExprResult Sema::CreateUnaryExprOrTypeTraitExpr | ( | TypeSourceInfo * | TInfo,
|  | SourceLocation | OpLoc,
|  | UnaryExprOrTypeTrait | ExprKind,
|  | SourceRange | R
| ) |  |

Build a sizeof or alignof expression given a type operand.

Definition at line 4267 of file SemaExpr.cpp.

References captureVariablyModifiedType(), clang::DeclContext::containsDecl(), clang::ExprError(), clang::Type::getAs(), clang::TypeSourceInfo::getType(), clang::if(), clang::Type::isDependentType(), and clang::Type::isVariablyModifiedType().

## ◆ CreateUnaryExprOrTypeTraitExpr() [2/2]

ExprResult Sema::CreateUnaryExprOrTypeTraitExpr | ( | Expr * | E,
|  | SourceLocation | OpLoc,
|  | UnaryExprOrTypeTrait | ExprKind
| ) |  |

Build a sizeof or alignof expression given an expression operand.

Definition at line 4312 of file SemaExpr.cpp.

References CheckAlignOfExpr(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isInvalid(), clang::Expr::isTypeDependent(), clang::Type::isVariableArrayType(), clang::Expr::refersToBitField(), clang::UETT_AlignOf, clang::UETT_OpenMPRequiredSimdAlign, clang::UETT_PreferredAlignOf, clang::UETT_SizeOf, and clang::UETT_VecStep.

## ◆ CUDADiagIfDeviceCode()

Sema::DeviceDiagBuilder Sema::CUDADiagIfDeviceCode | ( | SourceLocation | Loc,
|  | unsigned | DiagID
| ) |  |

Creates a DeviceDiagBuilder that emits the diagnostic if the current context is "used as device code".

- If CurContext is a host function, does not emit any diagnostics.
- If CurContext is a device or global function, emits the diagnostics immediately.
- If CurContext is a host device function and we are compiling for the device, creates a diagnostic which is emitted if and when we realize that the function will be codegen'ed.

Example usage:

// Variable-length arrays are not allowed in CUDA device code. if (CUDADiagIfDeviceCode(Loc, diag::err_cuda_vla) << CurrentCUDATarget()) return ExprError(); // Otherwise, continue parsing as normal.

Definition at line 605 of file SemaCUDA.cpp.

References CFT_Device, CFT_Global, CFT_HostDevice, clang::CUDA, CurContext, CurrentCUDATarget(), Emitted, getEmissionStatus(), getLangOpts(), clang::Sema::DeviceDiagBuilder::K_Deferred, clang::Sema::DeviceDiagBuilder::K_Immediate, clang::Sema::DeviceDiagBuilder::K_ImmediateWithCallStack, and clang::Sema::DeviceDiagBuilder::K_Nop.

Referenced by targetDiag().

## ◆ CUDADiagIfHostCode()

Sema::DeviceDiagBuilder Sema::CUDADiagIfHostCode | ( | SourceLocation | Loc,
|  | unsigned | DiagID
| ) |  |

Creates a DeviceDiagBuilder that emits the diagnostic if the current context is "used as host code".

Same as CUDADiagIfDeviceCode, with "host" and "device" switched.

Definition at line 633 of file SemaCUDA.cpp.

References CFT_Host, CFT_HostDevice, clang::CUDA, CurContext, CurrentCUDATarget(), Emitted, getEmissionStatus(), getLangOpts(), clang::Sema::DeviceDiagBuilder::K_Deferred, clang::Sema::DeviceDiagBuilder::K_Immediate, clang::Sema::DeviceDiagBuilder::K_ImmediateWithCallStack, and clang::Sema::DeviceDiagBuilder::K_Nop.

Referenced by targetDiag().

## ◆ CUDASetLambdaAttrs()

void Sema::CUDASetLambdaAttrs | ( | CXXMethodDecl * | Method | ) |

Set device or host device attributes on the given lambda operator() method.

CUDA lambdas declared inside device or global functions inherit the device attribute. Similarly, lambdas inside host device functions become host device themselves.

Definition at line 732 of file SemaCUDA.cpp.

References clang::Decl::addAttr(), CFT_Device, CFT_Global, CFT_HostDevice, Context, clang::CUDA, CurContext, getLangOpts(), clang::Decl::hasAttr(), IdentifyCUDATarget(), and clang::Target.

## ◆ CurrentCUDATarget()

CUDAFunctionTarget clang::Sema::CurrentCUDATarget | ( |  | ) |
| inline

Gets the CUDA target for the current context.

Definition at line 11333 of file Sema.h.

Referenced by CUDADiagIfDeviceCode(), and CUDADiagIfHostCode().

## ◆ CXXCheckConditionalOperands()

QualType Sema::CXXCheckConditionalOperands | ( | ExprResult & | Cond,
|  | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | ExprValueKind & | VK,
|  | ExprObjectKind & | OK,
|  | SourceLocation | QuestionLoc
| ) |  |

Check the operands of ?: under C++ semantics.

See C++ [expr.cond]. Note that LHS is never null, even for the GNU x ?: y extension. In this case, LHS == Cond. (But they're not aliases.)

This function also implements GCC's vector extension for conditionals. GCC's vector extension permits the use of a?b:c where the type of a is that of a integer vector with the same number of elements and size as the vectors of b and c. If one of either b or c is a scalar it is implicitly converted to match the type of the vector. Otherwise the expression is ill-formed. If both b and c are scalars, then b and c are checked and converted to the type of a if possible. Unlike the OpenCL ?: operator, the expression is evaluated as (a[0] != 0 ? b[0] : c[0], .. , a[n] != 0 ? b[n] : c[n]).

Definition at line 5871 of file SemaExprCXX.cpp.

References ACK_Conditional, CheckCXXBooleanCondition(), CheckGNUVectorConditionalTypes(), CheckVectorOperands(), CompareReferenceRelationship(), Context, ConvertForConditional(), DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, Diag(), DiagnoseConditionalForNull(), FindCompositeObjCPointerType(), FindCompositePointerType(), FindConditionalOverload(), clang::XRayInstrKind::Function, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalType(), clang::Expr::getObjectKind(), clang::ASTContext::getQualifiedType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), ImpCastExprToType(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isRecordType(), isValidVectorForConditionalCondition(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::OK_BitField, clang::OK_Ordinary, PerformCopyInitialization(), PrepareScalarCast(), Ref_Compatible, TryClassUnification(), UsualArithmeticConversions(), clang::VK_RValue, and clang::ASTContext::VoidTy.

## ◆ DeclApplyPragmaWeak()

void clang::Sema::DeclApplyPragmaWeak | ( | Scope * | S,
|  | NamedDecl * | ND,
|  | WeakInfo & | W
| ) |  |

## ◆ DeclareGlobalAllocationFunction()

void Sema::DeclareGlobalAllocationFunction | ( | DeclarationName | Name,
|  | QualType | Return,
|  | ArrayRef< QualType > | Params
| ) |  |

DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't already exist.

Definition at line 2768 of file SemaExprCXX.cpp.

Referenced by DeclareGlobalNewDelete().

## ◆ DeclareGlobalNewDelete()

void Sema::DeclareGlobalNewDelete | ( |  | ) |

DeclareGlobalNewDelete - Declare the global forms of operator new and delete.

These are:

// C++03:
void* operator new(std::size_t) throw(std::bad_alloc);
void* operator new[](std::size_t) throw(std::bad_alloc);
void operator delete(void *) throw();
void operator delete[](void *) throw();
// C++11:
void* operator new(std::size_t);
void* operator new[](std::size_t);
void operator delete(void *) noexcept;
void operator delete[](void *) noexcept;
// C++1y:
void* operator new(std::size_t);
void* operator new[](std::size_t);
void operator delete(void *) noexcept;
void operator delete[](void *) noexcept;
void operator delete(void *, std::size_t) noexcept;
void operator delete[](void *, std::size_t) noexcept;

Note that the placement and nothrow forms of new are not implicitly declared. Their use requires including <new>.

Definition at line 2665 of file SemaExprCXX.cpp.

References Context, clang::CPlusPlus11, clang::CXXRecordDecl::Create(), clang::EnumDecl::Create(), clang::ASTContext::DeclarationNames, DeclareGlobalAllocationFunction(), clang::IdentifierTable::get(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Preprocessor::getIdentifierTable(), getLangOpts(), getOrCreateStdNamespace(), clang::ASTContext::getPointerType(), clang::ASTContext::getSizeType(), getStdAlignValT(), getStdBadAlloc(), clang::ASTContext::getTypeDeclType(), GlobalNewDeleteDeclared, PP, clang::Decl::setImplicit(), clang::EnumDecl::setIntegerType(), StdAlignValT, StdBadAlloc, clang::TTK_Class, and clang::ASTContext::VoidTy.

Referenced by FindAllocationFunctions(), and resolveBuiltinNewDeleteOverload().

## ◆ DeclareImplicitCopyAssignment()

CXXMethodDecl * Sema::DeclareImplicitCopyAssignment | ( | CXXRecordDecl * | ClassDecl | ) |

Declare the implicit copy assignment operator for the given class.

Parameters

  ClassDecl | The class declaration into which the implicit copy assignment operator will be added.

Returns
  The implicitly-declared copy assignment operator.

Definition at line 13464 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::needsImplicitCopyAssignment().

## ◆ DeclareImplicitCopyConstructor()

CXXConstructorDecl * Sema::DeclareImplicitCopyConstructor | ( | CXXRecordDecl * | ClassDecl | ) |

Declare the implicit copy constructor for the given class.

Parameters

  ClassDecl | The class declaration into which the implicit copy constructor will be added.

Returns
  The implicitly-declared copy constructor.

Definition at line 14165 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::needsImplicitCopyConstructor().

## ◆ DeclareImplicitDeductionGuides()

void Sema::DeclareImplicitDeductionGuides | ( | TemplateDecl * | Template,
|  | SourceLocation | Loc
| ) |  |

Declare implicit deduction guides for a class template if we've not already done so.

Definition at line 2229 of file SemaTemplate.cpp.

References clang::Decl::getDeclContext(), getDefinition(), clang::TemplateDecl::getTemplatedDecl(), clang::DeclContext::isDependentContext(), clang::Sema::InstantiatingTemplate::isInvalid(), and clang::DeclContext::lookup().

## ◆ DeclareImplicitDefaultConstructor()

CXXConstructorDecl * Sema::DeclareImplicitDefaultConstructor | ( | CXXRecordDecl * | ClassDecl | ) |

Declare the implicit default constructor for the given class.

Parameters

  ClassDecl | The class declaration into which the implicit default constructor will be added.

Returns
  The implicitly-declared default constructor.

Definition at line 12573 of file SemaDeclCXX.cpp.

References defaultedSpecialMemberIsConstexpr(), and clang::CXXRecordDecl::needsImplicitDefaultConstructor().

Referenced by findTrivialSpecialMember().

## ◆ DeclareImplicitDestructor()

CXXDestructorDecl * Sema::DeclareImplicitDestructor | ( | CXXRecordDecl * | ClassDecl | ) |

Declare the implicit destructor for the given class.

Parameters

  ClassDecl | The class declaration into which the implicit destructor will be added.

Returns
  The implicitly-declared destructor.

Definition at line 12855 of file SemaDeclCXX.cpp.

References defaultedSpecialMemberIsConstexpr(), and clang::CXXRecordDecl::needsImplicitDestructor().

Referenced by findTrivialSpecialMember().

## ◆ DeclareImplicitEqualityComparison()

void Sema::DeclareImplicitEqualityComparison | ( | CXXRecordDecl * | RD,
|  | FunctionDecl * | Spaceship
| ) |  |

Definition at line 8156 of file SemaDeclCXX.cpp.

References clang::Sema::CodeSynthesisContext::DeclaringImplicitEqualityComparison, clang::Sema::CodeSynthesisContext::Entity, clang::Decl::getEndLoc(), clang::Sema::CodeSynthesisContext::Kind, clang::Sema::CodeSynthesisContext::PointOfInstantiation, and clang::prec::Spaceship.

## ◆ DeclareImplicitMoveAssignment()

CXXMethodDecl * Sema::DeclareImplicitMoveAssignment | ( | CXXRecordDecl * | ClassDecl | ) |

Declare the implicit move assignment operator for the given class.

Parameters

  ClassDecl | The Class declaration into which the implicit move assignment operator will be added.

Returns
  The implicitly-declared move assignment operator, or NULL if it wasn't declared.

Definition at line 13792 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::needsImplicitMoveAssignment().

## ◆ DeclareImplicitMoveConstructor()

CXXConstructorDecl * Sema::DeclareImplicitMoveConstructor | ( | CXXRecordDecl * | ClassDecl | ) |

Declare the implicit move constructor for the given class.

Parameters

  ClassDecl | The Class declaration into which the implicit move constructor will be added.

Returns
  The implicitly-declared move constructor, or NULL if it wasn't declared.

Definition at line 14304 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::needsImplicitMoveConstructor().

## ◆ DeclClonePragmaWeak()

NamedDecl* clang::Sema::DeclClonePragmaWeak | ( | NamedDecl * | ND,
|  | IdentifierInfo * | II,
|  | SourceLocation | Loc
| ) |  |

## ◆ DecomposeUnqualifiedId()

void Sema::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.

If this produces template arguments, it is permitted to call DecomposeTemplateName.

This actually loses a lot of source location information for non-standard name kinds; we should consider preserving that in some way.

Definition at line 1978 of file SemaExpr.cpp.

References clang::OpaquePtr< PtrTy >::get(), clang::UnqualifiedId::getKind(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::IK_TemplateId, clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::NumArgs, clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, and clang::TemplateIdAnnotation::TemplateNameLoc.

## ◆ DeduceAutoType() [1/2]

Sema::DeduceAutoResult Sema::DeduceAutoType | ( | TypeSourceInfo * | AutoType,
|  | Expr *& | Initializer,
|  | QualType & | Result,
|  | Optional< unsigned > | DependentDeductionDepth = `None`,
|  | bool | IgnoreConstraints = `false`
| ) |  |

Definition at line 4454 of file SemaTemplateDeduction.cpp.

References clang::TypeSourceInfo::getTypeLoc().

Referenced by FinishForRangeVarDecl().

## ◆ DeduceAutoType() [2/2]

Sema::DeduceAutoResult Sema::DeduceAutoType | ( | TypeLoc | Type,
|  | Expr *& | Init,
|  | QualType & | Result,
|  | Optional< unsigned > | DependentDeductionDepth = `None`,
|  | bool | IgnoreConstraints = `false`
| ) |  |

Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6)

Note that this is done even if the initializer is dependent. (This is necessary to support partial ordering of templates using 'auto'.) A dependent type will be produced when deducing from a dependent type.

Parameters

  Type | the type pattern using the auto type-specifier.
  Init | the initializer for the variable whose type is to be deduced.
  Result | if type deduction was successful, this will be set to the deduced type.
  DependentDeductionDepth | Set if we should permit deduction in dependent cases. This is necessary for template partial ordering with 'auto' template parameters. The value specified is the template parameter depth at which we should perform 'auto' deduction.
  IgnoreConstraints | Set if we should not fail if the deduced type does not satisfy the type-constraint in the auto type.

Definition at line 4546 of file SemaTemplateDeduction.cpp.

References bool, clang::Expr::containsUnexpandedParameterPack(), Depth, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TypeLoc::getAs(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::TypeLoc::getType(), clang::Expr::getType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isNonOverloadPlaceholderType(), clang::QualType::isNull(), and clang::Expr::isTypeDependent().

## ◆ deduceClosureReturnType()

void Sema::deduceClosureReturnType | ( | sema::CapturingScopeInfo & | CSI | ) |

Deduce a block or lambda's return type based on the return statements present in the body.

Definition at line 693 of file SemaLambda.cpp.

References clang::CPlusPlus14, findCommonEnumForBlockReturns(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isUndeducedType(), clang::sema::FunctionScopeInfo::Returns, clang::sema::CapturingScopeInfo::ReturnType, and clang::ASTContext::VoidTy.

## ◆ DeduceFunctionTypeFromReturnExpr()

bool Sema::DeduceFunctionTypeFromReturnExpr | ( | FunctionDecl * | FD,
|  | SourceLocation | ReturnLoc,
|  | Expr *& | RetExpr,
|  | AutoType * | AT
| ) |  |

Deduce the return type for a function from a returned expression, per C++1y [dcl.spec.auto]p6.

Definition at line 3466 of file SemaStmt.cpp.

References Diag(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::TypeLoc::getType(), clang::Expr::getType(), clang::DeducedType::isDeduced(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), and clang::isLambdaConversionOperator().

## ◆ deduceOpenCLAddressSpace()

void Sema::deduceOpenCLAddressSpace | ( | ValueDecl * | decl | ) |

Definition at line 6147 of file SemaDecl.cpp.

References clang::ValueDecl::getType(), clang::QualType::hasAddressSpace(), clang::Type::isSamplerT(), clang::Type::isVoidType(), clang::opencl_global, and clang::opencl_private.

Referenced by clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ DeduceReturnType()

bool Sema::DeduceReturnType | ( | FunctionDecl * | FD,
|  | SourceLocation | Loc,
|  | bool | Diagnose = `true`
| ) |  |

Definition at line 4780 of file SemaTemplateDeduction.cpp.

References clang::Type::castAs(), clang::Type::getAs(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), clang::isLambdaConversionOperator(), clang::Type::isUndeducedType(), and clang::runWithSufficientStackSpace().

Referenced by completeFunctionType(), and GetTypeOfFunction().

## ◆ DeduceTemplateArguments() [1/6]

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | ClassTemplatePartialSpecializationDecl * | Partial,
|  | const TemplateArgumentList & | TemplateArgs,
|  | sema::TemplateDeductionInfo & | Info
| ) |  |

Perform template argument deduction to determine whether the given template arguments match the given class template partial specialization per C++ [temp.class.spec.match].

Definition at line 2902 of file SemaTemplateDeduction.cpp.

References DeduceTemplateArguments(), FinishTemplateArgumentDeduction(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::ClassTemplatePartialSpecializationDecl::getTemplateParameters(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Decl::isInvalidDecl(), clang::TemplateParameterList::size(), TDK_SubstitutionFailure, and Unevaluated.

Referenced by LookupDirect(), and ResolveOverloadForDeduction().

## ◆ DeduceTemplateArguments() [2/6]

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | VarTemplatePartialSpecializationDecl * | Partial,
|  | const TemplateArgumentList & | TemplateArgs,
|  | sema::TemplateDeductionInfo & | Info
| ) |  |

Perform template argument deduction to determine whether the given template arguments match the given variable template partial specialization per C++ [temp.class.spec.match].

Definition at line 2945 of file SemaTemplateDeduction.cpp.

References DeduceTemplateArguments(), FinishTemplateArgumentDeduction(), clang::VarTemplateSpecializationDecl::getTemplateArgs(), clang::VarTemplatePartialSpecializationDecl::getTemplateParameters(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Decl::isInvalidDecl(), clang::TemplateParameterList::size(), TDK_SubstitutionFailure, and Unevaluated.

## ◆ DeduceTemplateArguments() [3/6]

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | FunctionTemplateDecl * | FunctionTemplate,
|  | TemplateArgumentListInfo * | ExplicitTemplateArgs,
|  | ArrayRef< Expr *> | Args,
|  | FunctionDecl *& | Specialization,
|  | sema::TemplateDeductionInfo & | Info,
|  | bool | PartialOverloading,
|  | llvm::function_ref< bool(ArrayRef< QualType >)> | CheckNonDependent
| ) |  |

Perform template argument deduction from a function call (C++ [temp.deduct.call]).

Parameters

  FunctionTemplate | the function template for which we are performing template argument deduction.
  ExplicitTemplateArgs | the explicit template arguments provided for this call.
  Args | the function call arguments
  Specialization | if template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction.
  Info | the argument will be updated to provide additional information about template argument deduction.
  CheckNonDependent | A callback to invoke to check conversions for non-dependent parameters, between deduction and substitution, per DR1391. If this returns true, substitution will be skipped and we return TDK_NonDependentConversionFailure. The callback is passed the parameter types (after substituting explicit template arguments).

Returns
  the result of template argument deduction.

Definition at line 3888 of file SemaTemplateDeduction.cpp.

References clang::Type::castAs(), DeduceTemplateArgumentsFromCallArgument(), FinishTemplateArgumentDeduction(), getFirstInnerIndex(), clang::FunctionDecl::getMinRequiredArguments(), clang::PackExpansionType::getNumExpansions(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::PackExpansionType::getPattern(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), hasDeducibleTemplateParameters(), clang::Decl::isInvalidDecl(), clang::TemplateParameterList::size(), and TDK_Success.

## ◆ DeduceTemplateArguments() [4/6]

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | FunctionTemplateDecl * | FunctionTemplate,
|  | TemplateArgumentListInfo * | ExplicitTemplateArgs,
|  | QualType | ArgFunctionType,
|  | FunctionDecl *& | Specialization,
|  | sema::TemplateDeductionInfo & | Info,
|  | bool | IsAddressOfFunction = `false`
| ) |  |

Deduce template arguments when taking the address of a function template (C++ [temp.deduct.funcaddr]) or matching a specialization to a template.

Parameters

  FunctionTemplate | the function template for which we are performing template argument deduction.
  ExplicitTemplateArgs | the explicitly-specified template arguments.
  ArgFunctionType | the function type that will be used as the "argument" type (A) when performing template argument deduction from the function template's function type. This type may be NULL, if there is no argument type to compare against, in C++0x [temp.arg.explicit]p3.
  Specialization | if template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction.
  Info | the argument will be updated to provide additional information about template argument deduction.
  IsAddressOfFunction | If `true`, we are deducing as part of taking the address of a function template per [temp.deduct.funcaddr] and [over.over]. If `false`, we are looking up a function template specialization based on its signature, per [temp.deduct.decl].

Returns
  the result of template argument deduction.

Definition at line 4105 of file SemaTemplateDeduction.cpp.

References clang::Type::getContainedAutoType(), clang::FunctionDecl::getReturnType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), clang::TemplateParameterList::size(), and Unevaluated.

## ◆ DeduceTemplateArguments() [5/6]

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | FunctionTemplateDecl * | ConversionTemplate,
|  | QualType | ToType,
|  | CXXConversionDecl *& | Specialization,
|  | sema::TemplateDeductionInfo & | Info
| ) |  |

Deduce template arguments for a templated conversion function (C++ [temp.deduct.conv]) and, if successful, produce a conversion function template specialization.

Definition at line 4223 of file SemaTemplateDeduction.cpp.

References clang::CXXConversionDecl::getConversionType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Decl::isInvalidDecl(), and P.

## ◆ DeduceTemplateArguments() [6/6]

Sema::TemplateDeductionResult Sema::DeduceTemplateArguments | ( | FunctionTemplateDecl * | FunctionTemplate,
|  | TemplateArgumentListInfo * | ExplicitTemplateArgs,
|  | FunctionDecl *& | Specialization,
|  | sema::TemplateDeductionInfo & | Info,
|  | bool | IsAddressOfFunction = `false`
| ) |  |

Deduce template arguments for a function template when there is nothing to deduce against (C++0x [temp.arg.explicit]p3).

Parameters

  FunctionTemplate | the function template for which we are performing template argument deduction.
  ExplicitTemplateArgs | the explicitly-specified template arguments.
  Specialization | if template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction.
  Info | the argument will be updated to provide additional information about template argument deduction.
  IsAddressOfFunction | If `true`, we are deducing as part of taking the address of a function template in a context where we do not have a target type, per [over.over]. If `false`, we are looking up a function template specialization based on its signature, which only happens when deducing a function parameter type from an argument that is a template-id naming a function template specialization.

Returns
  the result of template argument deduction.

Definition at line 4361 of file SemaTemplateDeduction.cpp.

References Context, clang::AutoTypeLoc::copy(), DeduceTemplateArguments(), clang::ASTContext::getAutoType(), clang::ASTContext::getDeducedTemplateSpecializationType(), clang::TypeLoc::getFullDataSize(), clang::AutoType::getKeyword(), clang::TypeSpecTypeLoc::getNameLoc(), clang::DeducedTemplateSpecializationType::getTemplateName(), clang::AutoType::getTypeConstraintArguments(), clang::AutoType::getTypeConstraintConcept(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), clang::QualType::isNull(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::reserve(), and clang::TypeSpecTypeLoc::setNameLoc().

## ◆ DeduceTemplateSpecializationFromInitializer()

QualType Sema::DeduceTemplateSpecializationFromInitializer | ( | TypeSourceInfo * | TInfo,
|  | const InitializedEntity & | Entity,
|  | const InitializationKind & | Kind,
|  | MultiExprArg | Init
| ) |  |

Definition at line 9679 of file SemaInit.cpp.

References clang::OverloadCandidateSet::CSK_Normal, clang::ASTContext::DeclarationNames, clang::ASTContext::DependentTy, Diag(), clang::Type::getAsCXXRecordDecl(), clang::TemplateName::getAsTemplateDecl(), clang::TypeLoc::getBeginLoc(), clang::Type::getContainedDeducedType(), clang::DeclarationNameTable::getCXXDeductionGuideName(), clang::TypeLoc::getEndLoc(), clang::InitListExpr::getInit(), clang::InitListExpr::getInits(), clang::InitializationKind::getKind(), clang::InitializationKind::getLocation(), clang::InitListExpr::getNumInits(), clang::TypeLoc::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::ASTContext::getTypeDeclType(), clang::TypeSourceInfo::getTypeLoc(), clang::NamedDecl::getUnderlyingDecl(), clang::Expr::hasAnyTypeDependentArguments(), clang::InitializationKind::IK_Direct, Inits, clang::InitializationKind::isCopyInit(), clang::TemplateName::isDependent(), clang::Decl::isInvalidDecl(), isOrIsDerivedFromSpecializationOf(), clang::ListInit, clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, and clang::Result.

Referenced by BuildCXXTypeConstructExpr().

## ◆ DeduceVariableDeclarationType()

bool Sema::DeduceVariableDeclarationType | ( | VarDecl * | VDecl,
|  | bool | DirectInit,
|  | Expr * | Init
| ) |  |

Definition at line 11383 of file SemaDecl.cpp.

References clang::NamedDecl::getDeclName(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::isInvalidDecl(), clang::NamedDecl::isLinkageValid(), clang::QualType::isNull(), clang::OpenCL, clang::Decl::setInvalidDecl(), and clang::ValueDecl::setType().

## ◆ deduceVarTypeFromInitializer()

QualType Sema::deduceVarTypeFromInitializer | ( | VarDecl * | VDecl,
|  | DeclarationName | Name,
|  | QualType | Type,
|  | TypeSourceInfo * | TSI,
|  | SourceRange | Range,
|  | bool | DirectInit,
|  | Expr * | Init
| ) |  |

Definition at line 11247 of file SemaDecl.cpp.

## ◆ DefaultArgumentPromotion()

ExprResult Sema::DefaultArgumentPromotion | ( | Expr * | E | ) |

DefaultArgumentPromotion (C99 6.5.2.2p6).

Used for function calls that do not have a prototype. Arguments that have type float or __fp16 are promoted to double. All other argument types are converted by UsualUnaryConversions().

Definition at line 776 of file SemaExpr.cpp.

References clang::ExprError(), clang::Type::getAs(), clang::BuiltinType::getKind(), clang::Expr::getType(), and clang::QualType::isNull().

## ◆ DefaultFunctionArrayConversion()

ExprResult Sema::DefaultFunctionArrayConversion | ( | Expr * | E,
|  | bool | Diagnose = `true`
| ) |  |

DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).

Definition at line 472 of file SemaExpr.cpp.

References checkAddressOfFunctionIsAvailable(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), and clang::Type::isPlaceholderType().

Referenced by IgnoredValueConversions(), isNullPointerValueTemplateArgument(), and LookupMemberExpr().

## ◆ DefaultFunctionArrayLvalueConversion()

ExprResult Sema::DefaultFunctionArrayLvalueConversion | ( | Expr * | E,
|  | bool | Diagnose = `true`
| ) |  |

Definition at line 693 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

Referenced by CheckCommaOperands(), CheckGNUVectorConditionalTypes(), CXXCheckConditionalOperands(), DiagnoseBadFunctionCast(), DiagnoseReinterpretUpDownCast(), getCastAwayConstnessCastKind(), IgnoredValueConversions(), OpenCLArithmeticConversions(), OpenCLCheckVectorConditional(), and TryAddressSpaceCast().

## ◆ DefaultLvalueConversion()

ExprResult Sema::DefaultLvalueConversion | ( | Expr * | E | ) |

Definition at line 592 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), and clang::Type::isPlaceholderType().

Referenced by ActOnCXXDelete(), buildCapture(), CheckObjCCollectionLiteralElement(), CheckPointerToMemberOperands(), finishContextualImplicitConversion(), IgnoredValueConversions(), LookupMemberExpr(), and PerformImplicitConversion().

## ◆ DefaultSynthesizeProperties() [1/2]

void Sema::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.

Default synthesizes all properties which must be synthesized in class's @implementation.

Definition at line 1898 of file SemaObjCProperty.cpp.

## ◆ DefaultSynthesizeProperties() [2/2]

void Sema::DefaultSynthesizeProperties | ( | Scope * | S,
|  | Decl * | D,
|  | SourceLocation | AtEnd
| ) |  |

Definition at line 1993 of file SemaObjCProperty.cpp.

## ◆ DefaultVariadicArgumentPromotion()

ExprResult Sema::DefaultVariadicArgumentPromotion | ( | Expr * | E,
|  | VariadicCallType | CT,
|  | FunctionDecl * | FDecl
| ) |  |

DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but will create a trap if the resulting type is not a POD type.

Definition at line 925 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAsPlaceholderType(), clang::Expr::getType(), clang::Decl::hasAttr(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

## ◆ DefineDefaultedComparison()

void Sema::DefineDefaultedComparison | ( | SourceLocation | Loc,
|  | FunctionDecl * | FD,
|  | DefaultedComparisonKind | DCK
| ) |  |

Definition at line 8170 of file SemaDeclCXX.cpp.

References clang::Sema::SynthesizedFunctionScope::addContextNote(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getEndLoc(), clang::DeclContext::getLexicalParent(), clang::Decl::getLocation(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::FunctionDecl::willHaveBody().

## ◆ DefineImplicitCopyAssignment()

void Sema::DefineImplicitCopyAssignment | ( | SourceLocation | CurrentLocation,
|  | CXXMethodDecl * | MethodDecl
| ) |  |

Defines an implicitly-declared copy assignment operator.

Definition at line 13588 of file SemaDeclCXX.cpp.

References clang::Sema::SynthesizedFunctionScope::addContextNote(), clang::CXXRecordDecl::bases(), clang::Type::castAs(), clang::CPlusPlus11, diagnoseDeprecatedCopyOperation(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::Type::getAs(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::CXXBaseSpecifier::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::SourceLocation::isValid(), clang::Decl::setInvalidDecl(), clang::interp::This(), and clang::FunctionDecl::willHaveBody().

Referenced by DefineImplicitSpecialMember().

## ◆ DefineImplicitCopyConstructor()

void Sema::DefineImplicitCopyConstructor | ( | SourceLocation | CurrentLocation,
|  | CXXConstructorDecl * | Constructor
| ) |  |

DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy constructor.

Definition at line 14256 of file SemaDeclCXX.cpp.

References clang::Sema::SynthesizedFunctionScope::addContextNote(), clang::Type::castAs(), clang::CPlusPlus11, diagnoseDeprecatedCopyOperation(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::CXXConstructorDecl::isCopyConstructor(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), clang::None, clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::FunctionDecl::willHaveBody().

Referenced by DefineImplicitSpecialMember().

## ◆ DefineImplicitDefaultConstructor()

void Sema::DefineImplicitDefaultConstructor | ( | SourceLocation | CurrentLocation,
|  | CXXConstructorDecl * | Constructor
| ) |  |

DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default constructor.

Definition at line 12636 of file SemaDeclCXX.cpp.

References clang::Sema::SynthesizedFunctionScope::addContextNote(), clang::Type::castAs(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::FunctionDecl::willHaveBody().

Referenced by DefineImplicitSpecialMember(), and PerformConstructorInitialization().

## ◆ DefineImplicitDestructor()

void Sema::DefineImplicitDestructor | ( | SourceLocation | CurrentLocation,
|  | CXXDestructorDecl * | Destructor
| ) |  |

DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default destructor.

Definition at line 12921 of file SemaDeclCXX.cpp.

References clang::Sema::SynthesizedFunctionScope::addContextNote(), clang::Type::castAs(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::FunctionDecl::willHaveBody().

Referenced by DefineImplicitSpecialMember().

## ◆ DefineImplicitLambdaToBlockPointerConversion()

void Sema::DefineImplicitLambdaToBlockPointerConversion | ( | SourceLocation | CurrentLoc,
|  | CXXConversionDecl * | Conv
| ) |  |

Define the "body" of the conversion from a lambda object to a block pointer.

This routine doesn't actually define a sensible body; rather, it fills in the initialization expression needed to copy the lambda object into the block, and IR generation actually generates the real body of the block pointer conversion.

Definition at line 14492 of file SemaDeclCXX.cpp.

References clang::ImplicitCastExpr::Create(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::CXXRecordDecl::isGenericLambda(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::interp::This().

## ◆ DefineImplicitLambdaToFunctionPointerConversion()

void Sema::DefineImplicitLambdaToFunctionPointerConversion | ( | SourceLocation | CurrentLoc,
|  | CXXConversionDecl * | Conv
| ) |  |

Define the "body" of the conversion from a lambda object to a function pointer.

This routine doesn't actually define a sensible body; rather, it fills in the initialization expression needed to copy the lambda object into the block, and IR generation actually generates the real body of the block pointer conversion.

Definition at line 14434 of file SemaDeclCXX.cpp.

References clang::FunctionDecl::getDescribedFunctionTemplate(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::Decl::isInvalidDecl(), clang::Type::isUndeducedType(), and clang::Decl::markUsed().

## ◆ DefineImplicitMoveAssignment()

void Sema::DefineImplicitMoveAssignment | ( | SourceLocation | CurrentLocation,
|  | CXXMethodDecl * | MethodDecl
| ) |  |

Defines an implicitly-declared move assignment operator.

Definition at line 13954 of file SemaDeclCXX.cpp.

References clang::Sema::SynthesizedFunctionScope::addContextNote(), clang::CXXRecordDecl::bases(), clang::Type::castAs(), checkMoveAssignmentForRepeatedMove(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::CXXBaseSpecifier::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::SourceLocation::isValid(), clang::Decl::setInvalidDecl(), clang::interp::This(), clang::VK_XValue, and clang::FunctionDecl::willHaveBody().

Referenced by DefineImplicitSpecialMember().

## ◆ DefineImplicitMoveConstructor()

void Sema::DefineImplicitMoveConstructor | ( | SourceLocation | CurrentLocation,
|  | CXXConstructorDecl * | Constructor
| ) |  |

DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move constructor.

Definition at line 14389 of file SemaDeclCXX.cpp.

References clang::Sema::SynthesizedFunctionScope::addContextNote(), clang::Type::castAs(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::CXXConstructorDecl::isMoveConstructor(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), clang::None, clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::FunctionDecl::willHaveBody().

Referenced by DefineImplicitSpecialMember().

## ◆ DefineInheritingConstructor()

void Sema::DefineInheritingConstructor | ( | SourceLocation | UseLoc,
|  | CXXConstructorDecl * | Constructor
| ) |  |

Define the specified inheriting constructor.

Definition at line 12774 of file SemaDeclCXX.cpp.

References clang::Sema::SynthesizedFunctionScope::addContextNote(), clang::CXXRecordDecl::bases(), clang::Type::castAs(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::Sema::InheritedConstructorInfo::findConstructorForBase(), clang::InheritedConstructor::getConstructor(), clang::CXXConstructorDecl::getInheritedConstructor(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ConstructorUsingShadowDecl::getParent(), clang::InheritedConstructor::getShadowDecl(), clang::ValueDecl::getType(), Inits, clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::vbases(), and clang::FunctionDecl::willHaveBody().

## ◆ DefineUsedVTables()

bool Sema::DefineUsedVTables | ( |  | ) |

Define all of the vtables that have been used in this translation unit and reference any virtual members used by those vtables.

Returns
  true if any work was done, false otherwise.

Definition at line 16799 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::getDefinition(), and clang::CXXRecordDecl::getTemplateSpecializationKind().

Referenced by ActOnEndOfTranslationUnitFragment().

## ◆ Diag() [1/2]

SemaDiagnosticBuilder clang::Sema::Diag | ( | SourceLocation | Loc,
|  | unsigned | DiagID
| ) |  |
| inline

Emit a diagnostic.

Definition at line 1411 of file Sema.h.

References Diag(), clang::transformer::name(), Offset, and clang::DiagnosticsEngine::Report().

Referenced by ActOnComment(), ActOnCompatibilityAlias(), ActOnCXXDelete(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnCXXThis(), ActOnEndOfTranslationUnit(), ActOnForwardClassDeclaration(), ActOnOpenMPThreadprivateDirective(), ActOnPragmaAttributeAttribute(), ActOnPragmaAttributePop(), ActOnPragmaMSVtorDisp(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaVisibility(), ActOnPseudoDestructorExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartOfObjCMethodDef(), ActOnStartProtocolInterface(), ActOnStartRequiresExpr(), AnalyzeAssignment(), AnalyzeBitFieldAssignment(), AnalyzeCompoundAssignment(), AnalyzeImplicitConversions(), AtomicPropertySetterGetterRules(), BuildAddressSpaceIndex(), BuildCXXNoexceptExpr(), BuildCXXTypeConstructExpr(), BuildFloatingLiteral(), BuildImplicitMemberInitializer(), BuildNonArrayForRange(), BuildObjCExceptionDecl(), BuildPseudoDestructorExpr(), buildUserDefinedMapperRef(), checkAllocateClauses(), CheckAllocatedType(), checkAllowedCUDAInitializer(), CheckARCMethodDecl(), checkArithmeticBinOpPointerOperands(), checkArithmeticNull(), CheckArrow(), checkBlockType(), CheckBuiltinTargetSupport(), checkCancelRegion(), checkCondition(), checkConditionalBlockPointerCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckConditionVariable(), CheckConflictingOverridingMethod(), CheckConstexprCtorInitializer(), CheckConstexprDeclStmt(), CheckConstexprDestructorSubobjects(), CheckConstexprFunctionBody(), CheckConvertedConstantExpression(), checkCUDATargetOverload(), CheckCXX98CompatAccessibleCopy(), CheckCXXThisCapture(), CheckDeclInExpr(), checkDeclInTargetContext(), CheckDeducedPlaceholderConstraints(), checkDirectCallValidity(), checkEnumArithmeticConversions(), CheckEquivalentExceptionSpec(), CheckExceptionSpecSubset(), CheckExplicitInstantiation(), CheckExplicitInstantiationScope(), checkExportedDecl(), CheckFallThroughForBody(), CheckFoldOperand(), CheckForModifiableLvalue(), checkForMultipleExportedDefaultConstructors(), CheckForReference(), CheckForwardProtocolDeclarationForCircularDependency(), checkFoundationAPI(), CheckGNUVectorConditionalTypes(), checkGrainsizeNumTasksClauses(), CheckIdentityFieldAssignment(), checkIfClauses(), CheckImplementationIvars(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), checkInitMethod(), checkIntToPointerCast(), CheckKeyForObjCARCConversion(), checkLiteralOperatorTemplateParameterList(), checkMapClauseExpressionBase(), checkMapConflicts(), checkMappableExpressionList(), CheckMemaccessSize(), checkMemberDecomposition(), CheckMemorySizeofForComparison(), checkMethodTypeQualifiers(), checkMoreSpecializedThanPrimary(), checkMoveAssignmentForRepeatedMove(), CheckMoveOnConstruction(), checkNestingOfRegions(), CheckNonTypeTemplatePartialSpecializationArgs(), checkNullabilityTypeSpecifier(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), CheckObjCCollectionLiteralElement(), checkObjCCollectionLiteralElement(), CheckObjCDeclScope(), checkObjCKindOfType(), CheckObjCMethodDirectOverrides(), CheckObjCMethodOverride(), checkObjCMethodX86VectorTypes(), checkObjCPointerIntrospection(), CheckObjCPropertyAttributes(), checkOpenCLConditionVector(), checkOpenCLEnqueueIntType(), checkOpenCLEnqueueVariadicArgs(), checkOpenCLPipeArg(), checkOpenCLPipePacketType(), checkOpenMPLoop(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), checkPointerIntegerMismatch(), CheckPointerToMemberOperands(), checkRecursiveFunction(), checkReductionClauseWithNogroup(), checkScheduleModifiers(), checkSimdlenSafelenSpecified(), CheckSpecifiedExceptionType(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), checkTemplatePartialSpecialization(), CheckTemplateSpecializationScope(), checkThreeWayNarrowingConversion(), checkTrivialClassMembers(), checkTrivialSubobjectCall(), checkTupleLikeDecomposition(), checkTypeMappable(), checkUnsafeAssignLiteral(), checkUnsafeAssignObject(), checkVAStartABI(), checkVAStartIsInVariadicFunction(), checkVectorResult(), checkVectorShift(), CheckVirtualDtorCall(), clang::Sema::InstantiatingTemplate::Clear(), ConvertDeducedTemplateArgument(), CopyObject(), CXXCheckConditionalOperands(), diagExportedUnnamedDecl(), clang::Sema::BoundTypeDiagnoser< Ts >::diagnose(), DiagnoseAdditionInShift(), diagnoseAddressOfInvalidType(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnNullPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), diagnoseArrayStarInParamType(), diagnoseAutoDeductionFailure(), DiagnoseBadFunctionCast(), DiagnoseBadShiftValues(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseBitwiseOpInBitwiseOp(), DiagnoseBitwisePrecedence(), DiagnoseCallingConvCast(), DiagnoseCastOfObjCSEL(), DiagnoseCastQual(), DiagnoseClassExtensionDupMethods(), DiagnoseConditionalPrecedence(), DiagnoseConstAssignment(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), diagnoseDeprecatedCopyOperation(), diagnoseDiagnoseIfAttrsWith(), diagnoseDistinctPointerComparison(), DiagnoseDivisionSizeofPointerOrArray(), DiagnoseDuplicateIvars(), DiagnoseFloatingImpCast(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), diagnoseFunctionPointerToVoidComparison(), DiagnoseImpCast(), DiagnoseIndirectOrAsmJumpStmt(), diagnoseInstanceReference(), DiagnoseIntInBoolContext(), diagnoseListInit(), diagnoseLogicalNotOnLHSofCheck(), DiagnoseMismatchedNewDelete(), diagnoseMissingArgument(), DiagnoseMissingDesignatedInitOverrides(), DiagnoseMultipleAddrSpaceAttributes(), DiagnoseMultipleMethodInGlobalPool(), DiagnoseNamespaceInlineMismatch(), DiagnoseNarrowingInInitList(), DiagnoseNonDefaultPragmaPack(), diagnoseNullableToNonnullConversion(), DiagnoseNullConversion(), diagnoseNullResettableSynthesizedSetters(), diagnoseObjCARCConversion(), diagnoseObjCLiteralComparison(), DiagnoseOwningPropertyGetterSynthesis(), diagnosePointerIncompatibility(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), DiagnoseQualifiedMemberReference(), DiagnoseRecursiveConstFields(), DiagnoseReinterpretUpDownCast(), diagnoseRetainCycle(), DiagnoseSelfAssignment(), DiagnoseShiftCompare(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), DiagnoseSwitchLabelsFallthrough(), diagnoseTautologicalComparison(), DiagnoseTemplateParameterListArityMismatch(), DiagnoseTwoPhaseLookup(), DiagnoseTypeArgsAndProtocols(), diagnoseUnavailableAlignedAllocation(), DiagnoseUninitializedReference(), DiagnoseUninitializedUse(), DiagnoseUnterminatedPragmaAttribute(), DiagnoseUnterminatedPragmaPack(), DiagnoseUseOfUnimplementedSelectors(), diagnoseXorMisusedAsPow(), diagnoseZeroToNullptrConversion(), diagReturnOnAllocFailure(), DiagUninitUse(), emitAndClearUnusedLocalTypedefWarnings(), EmitCurrentDiagnostic(), EmitDiagForCXXThrowInNonThrowingFunc(), EmitDiagnosticForLogicalAndInLogicalOr(), emitNullabilityConsistencyWarning(), emitReplacement(), EvaluateArrayTypeTrait(), FindAllocationFunctions(), FindConditionalOverload(), FindProtocolDeclaration(), FinishForRangeVarDecl(), FinishOpenMPLinearClause(), flushDiagnostics(), getCastAwayConstnessCastKind(), GetDeclSpecTypeForDeclarator(), getFunctionStorageClass(), getTupleLikeElementType(), HandleAddressSpaceTypeAttribute(), HandleExtVectorTypeAttr(), handleFunctionTypeAttr(), handleMSPointerTypeQualifierAttr(), HandleNeonVectorTypeAttr(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), HandleOpenCLAccessAttr(), HandleVectorSizeAttr(), inferCUDATargetForImplicitSpecialMember(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), InstantiateInClassInitializer(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), isNonNegativeIntegerValue(), isNullPointerValueTemplateArgument(), isOpenCLDisabledDecl(), isTupleLike(), LookupMemberExpr(), LookupMemberExprInRecord(), LookupMethodInReceiverType(), LookupStdInitializerList(), lookupStdTypeTraitMember(), MatchTemplateParameterKind(), maybeAddCUDAHostDeviceAttrs(), clang::TemplateSpecCandidateSet::NoteCandidates(), clang::OverloadCandidateSet::NoteCandidates(), noteMemberDeclaredHere(), noteNonDeducibleParameters(), noteOperatorArrows(), noteOverloads(), OpenCLArithmeticConversions(), OpenCLConvertScalarsToVectors(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), PerformOpenMPImplicitIntegerConversion(), PopFunctionScopeInfo(), PopPragmaVisibility(), ProcessPropertyDecl(), clang::TreeTransform< Derived >::RebuildCXXForRangeStmt(), clang::TreeTransform< Derived >::RebuildDependentNameType(), ReferenceDllExportedMembers(), reportOriginalDsa(), RequireCompleteDeclContext(), resolveBuiltinNewDeleteOverload(), ResolveExceptionSpec(), SearchForReturnInStmt(), SemaBuiltinCommitRWPipe(), SemaBuiltinCpuIs(), SemaBuiltinCpuSupports(), SemaBuiltinLaunder(), SemaBuiltinPipePackets(), SemaBuiltinReserveRWPipe(), SemaBuiltinRWPipe(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinToAddr(), SubstParmVarDecl(), SuggestInitializationFixit(), SuggestParentheses(), TryAddressSpaceCast(), TryReinterpretCast(), TryStaticCast(), tryToRecoverWithCall(), UnifySection(), clang::TemplateDeclInstantiator::VisitVarDecl(), clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl(), warnAboutAmbiguousFunction(), warnAboutRedundantParens(), warnBracedScalarInit(), WarnConflictingTypedMethods(), WarnExactTypedMethods(), and warnStackExhausted().

## ◆ Diag() [2/2]

Sema::SemaDiagnosticBuilder Sema::Diag | ( | SourceLocation | Loc,
|  | const PartialDiagnostic & | PD
| ) |  |

Emit a partial diagnostic.

Definition at line 1428 of file Sema.cpp.

## ◆ diagIfOpenMPDeviceCode()

Sema::DeviceDiagBuilder Sema::diagIfOpenMPDeviceCode | ( | SourceLocation | Loc,
|  | unsigned | DiagID
| ) |  |

Creates a DeviceDiagBuilder that emits the diagnostic if the current context is "used as device code".

- If CurContext is a `declare target` function or it is known that the function is emitted for the device, emits the diagnostics immediately.
- If CurContext is a non-`declare target` function and we are compiling for the device, creates a diagnostic which is emitted if and when we realize that the function will be codegen'ed.

Example usage:

// Variable-length arrays are not allowed in NVPTX device code. if (diagIfOpenMPDeviceCode(Loc, diag::err_vla_unsupported)) return ExprError(); // Otherwise, continue parsing as normal.

Definition at line 1639 of file SemaOpenMP.cpp.

References isOpenMPDeviceDelayedContext(), and clang::Unknown.

Referenced by targetDiag().

## ◆ diagIfOpenMPHostCode()

Sema::DeviceDiagBuilder Sema::diagIfOpenMPHostCode | ( | SourceLocation | Loc,
|  | unsigned | DiagID
| ) |  |

Creates a DeviceDiagBuilder that emits the diagnostic if the current context is "used as host code".

- If CurContext is a `declare target` function or it is known that the function is emitted for the host, emits the diagnostics immediately.
- If CurContext is a non-host function, just ignore it.

Example usage:

// Variable-length arrays are not allowed in NVPTX device code. if (diagIfOpenMPHostode(Loc, diag::err_vla_unsupported)) return ExprError(); // Otherwise, continue parsing as normal.

Definition at line 1665 of file SemaOpenMP.cpp.

References Diag(), clang::Decl::getAttr(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::getOpenMPSimpleClauseTypeName(), isOpenMPDeviceDelayedContext(), clang::OMPC_device_type, and clang::Unknown.

Referenced by targetDiag().

## ◆ DiagnoseAbsenceOfOverrideControl()

void Sema::DiagnoseAbsenceOfOverrideControl | ( | NamedDecl * | D | ) |

DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of an overriding method.

Definition at line 3036 of file SemaDeclCXX.cpp.

References clang::CXXMethodDecl::begin_overridden_methods(), Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), and clang::CXXMethodDecl::size_overridden_methods().

## ◆ DiagnoseAbstractType()

void Sema::DiagnoseAbstractType | ( | const CXXRecordDecl * | RD | ) |

Definition at line 5561 of file SemaDeclCXX.cpp.

References Diag(), clang::NamedDecl::getDeclName(), and clang::CXXRecordDecl::getFinalOverriders().

## ◆ DiagnoseAlwaysNonNullPointer()

void Sema::DiagnoseAlwaysNonNullPointer | ( | Expr * | E,
|  | Expr::NullPointerConstantKind | NullKind,
|  | bool | IsEqual,
|  | SourceRange | Range
| ) |  |

Diagnose pointers that are always non-null.

Parameters

  E | the expression containing the pointer
  NullKind | NPCK_NotNull if E is a cast to bool, otherwise, E is compared to a null pointer
  IsEqual | True when the comparison is equal to a null pointer
  Range | Extra SourceRange to highlight in the diagnostic

Definition at line 12313 of file SemaChecking.cpp.

References CheckForReference(), Diag(), clang::SourceRange::getBegin(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::IgnoreImpCasts(), IsInAnyMacroBody(), clang::SourceLocation::isMacroID(), clang::Expr::NPCK_NotNull, and SM.

Referenced by CheckImplicitConversion().

## ◆ DiagnoseAmbiguousLookup()

void Sema::DiagnoseAmbiguousLookup | ( | LookupResult & | Result | ) |

Produce a diagnostic describing the ambiguity that resulted from name lookup.

Parameters

  Result | The result of the ambiguous lookup to be diagnosed.

Definition at line 2564 of file SemaLookup.cpp.

References clang::LookupResult::isAmbiguous().

Referenced by clang::LookupResult::setFindLocalExtern().

## ◆ diagnoseARCUnbridgedCast()

void Sema::diagnoseARCUnbridgedCast | ( | Expr * | e | ) |

Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly.

Definition at line 4361 of file SemaExprObjC.cpp.

References ACTC_retainable, clang::cast(), clang::ast_matchers::castExpr, classifyTypeForARCConversion(), diagnoseObjCARCConversion(), clang::QualType::getNonReferenceType(), clang::Expr::hasPlaceholderType(), and clang::Expr::IgnoreParens().

## ◆ diagnoseArgDependentDiagnoseIfAttrs()

bool Sema::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.

Argument-dependent diagnose_if attributes should be checked each time a function is used as a direct callee of a function call.

Returns true if any errors were emitted.

Definition at line 6583 of file SemaOverload.cpp.

References diagnoseDiagnoseIfAttrsWith().

## ◆ diagnoseArgIndependentDiagnoseIfAttrs()

bool Sema::diagnoseArgIndependentDiagnoseIfAttrs | ( | const NamedDecl * | ND,
|  | SourceLocation | Loc
| ) |  |

Emit diagnostics for the diagnose_if attributes on Function, ignoring any ArgDependent DiagnoseIfAttrs.

Argument-independent diagnose_if attributes should be checked on every use of a function.

Returns true if any errors were emitted.

Definition at line 6601 of file SemaOverload.cpp.

References diagnoseDiagnoseIfAttrsWith().

## ◆ DiagnoseAssignmentAsCondition()

void Sema::DiagnoseAssignmentAsCondition | ( | Expr * | E | ) |

DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition, warn if it's an assignment.

Definition at line 17315 of file SemaExpr.cpp.

References clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), clang::Stmt::getBeginLoc(), clang::SourceRange::getEnd(), clang::Selector::getNameForSlot(), clang::Stmt::getSourceRange(), clang::Selector::isUnarySelector(), clang::OMF_init, and Open.

## ◆ DiagnoseAssignmentEnum()

void Sema::DiagnoseAssignmentEnum | ( | QualType | DstType,
|  | QualType | SrcType,
|  | Expr * | SrcExpr
| ) |  |

DiagnoseAssignmentEnum - Warn if assignment to enum is a constant integer not in the range of enum values.

Definition at line 1260 of file SemaStmt.cpp.

References clang::Type::getAs(), and clang::Expr::getExprLoc().

## ◆ DiagnoseAssignmentResult()

bool Sema::DiagnoseAssignmentResult | ( | AssignConvertType | ConvTy,
|  | SourceLocation | Loc,
|  | QualType | DstType,
|  | QualType | SrcType,
|  | Expr * | SrcExpr,
|  | AssignmentAction | Action,
|  | bool * | Complained = `nullptr`
| ) |  |

DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specified by ConvTy.

This returns true if the conversion was invalid or false if the conversion was accepted.

Definition at line 14759 of file SemaExpr.cpp.

References clang::QualType::getUnqualifiedType(), clang::Type::isArrayType(), clang::Type::isFunctionPointerType(), isInvalid(), clang::FixItHint::isNull(), clang::Type::isObjCObjectPointerType(), and clang::ConversionFixItGenerator::tryToFixConversion().

Referenced by LookupMethodInReceiverType(), clang::InitializationSequence::Perform(), and PerformImplicitConversion().

## ◆ DiagnoseAutoDeductionFailure()

void Sema::DiagnoseAutoDeductionFailure | ( | VarDecl * | VDecl,
|  | Expr * | Init
| ) |  |

Definition at line 4765 of file SemaTemplateDeduction.cpp.

References Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), and clang::VarDecl::isInitCapture().

## ◆ DiagnoseAvailabilityOfDecl()

void clang::Sema::DiagnoseAvailabilityOfDecl | ( | NamedDecl * | D,
|  | ArrayRef< SourceLocation > | Locs,
|  | const ObjCInterfaceDecl * | UnknownObjCClass,
|  | bool | ObjCPropertyAccess,
|  | bool | AvoidPartialAvailabilityChecks = `false`,
|  | ObjCInterfaceDecl * | ClassReceiver = `nullptr`
| ) |  |

## ◆ DiagnoseClassExtensionDupMethods()

void Sema::DiagnoseClassExtensionDupMethods | ( | ObjCCategoryDecl * | CAT,
|  | ObjCInterfaceDecl * | ID
| ) |  |

DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension.

Definition at line 1744 of file SemaDeclObjC.cpp.

References Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isInstanceMethod(), MatchTwoMethodDeclarations(), and clang::ObjCContainerDecl::methods().

## ◆ DiagnoseClassNameShadow()

bool Sema::DiagnoseClassNameShadow | ( | DeclContext * | DC,
|  | DeclarationNameInfo | NameInfo
| ) |  |

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:

- every static data member of class T;
- every member function of class T
- every member of class T that is itself a type;
  Returns
    true if the declaration name violates these rules.

Definition at line 5427 of file SemaDecl.cpp.

## ◆ DiagnoseCommaOperator()

void Sema::DiagnoseCommaOperator | ( | const Expr * | LHS,
|  | SourceLocation | Loc
| ) |  |

Definition at line 12149 of file SemaExpr.cpp.

References clang::Scope::BreakScope, clang::Scope::ContinueScope, clang::Scope::ControlScope, clang::FixItHint::CreateInsertion(), clang::Scope::DeclScope, Diag(), clang::Stmt::getBeginLoc(), clang::Stmt::getEndLoc(), clang::Stmt::getSourceRange(), IgnoreCommaOperand(), and clang::SourceLocation::isMacroID().

Referenced by CheckCommaOperands().

## ◆ DiagnoseConditionalForNull()

bool Sema::DiagnoseConditionalForNull | ( | Expr * | LHSExpr,
|  | Expr * | RHSExpr,
|  | SourceLocation | QuestionLoc
| ) |  |

Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a pointer.

Returns true if a diagnostic is emitted.

Definition at line 6956 of file SemaExpr.cpp.

References clang::Expr::isNullPointerConstant().

Referenced by CXXCheckConditionalOperands(), and FindConditionalOverload().

## ◆ DiagnoseDeletedDefaultedFunction()

void Sema::DiagnoseDeletedDefaultedFunction | ( | FunctionDecl * | FD | ) |

Produce notes explaining why a defaulted function was defined as deleted.

Definition at line 8854 of file SemaDeclCXX.cpp.

References clang::Sema::DefaultedFunctionKind::asComparison(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::Decl::getLexicalDeclContext(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), and clang::Sema::DefaultedFunctionKind::isSpecialMember().

## ◆ DiagnoseDuplicateIvars()

void Sema::DiagnoseDuplicateIvars | ( | ObjCInterfaceDecl * | ID,
|  | ObjCInterfaceDecl * | SID
| ) |  |

DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementation.

This becomes necesssary because class extension can add ivars to a class in random order which will not be known until class's @implementation is seen.

Definition at line 3739 of file SemaDeclObjC.cpp.

References Diag(), clang::Decl::getLocation(), clang::ObjCInterfaceDecl::ivars(), and clang::ObjCInterfaceDecl::lookupInstanceVariable().

## ◆ DiagnoseEmptyLookup()

bool Sema::DiagnoseEmptyLookup | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | LookupResult & | R,
|  | CorrectionCandidateCallback & | CCC,
|  | TemplateArgumentListInfo * | ExplicitTemplateArgs = `nullptr`,
|  | ArrayRef< Expr *> | Args = `None`,
|  | TypoExpr ** | Out = `nullptr`
| ) |  |

Diagnose an empty lookup.

Returns
  false if new lookup candidates were found

Definition at line 2036 of file SemaExpr.cpp.

Referenced by BuildRecoveryCallExpr().

## ◆ DiagnoseEmptyLoopBody()

void Sema::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.

Definition at line 14324 of file SemaChecking.cpp.

References Diag(), clang::Stmt::getBeginLoc(), clang::NullStmt::getSemiLoc(), and ShouldDiagnoseEmptyStmtBody().

## ◆ DiagnoseEmptyStmtBody()

void Sema::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.

This helps prevent bugs due to typos, such as: if (condition); do_stuff();

Definition at line 14303 of file SemaChecking.cpp.

References Diag(), clang::NullStmt::getSemiLoc(), and ShouldDiagnoseEmptyStmtBody().

## ◆ DiagnoseEqualityWithExtraParens()

void Sema::DiagnoseEqualityWithExtraParens | ( | ParenExpr * | ParenE | ) |

Redundant parentheses over an equality comparison can indicate that the user intended an assignment used as condition.

Definition at line 17373 of file SemaExpr.cpp.

References clang::ParenExpr::getBeginLoc(), clang::Expr::IgnoreParens(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isMacroID(), and clang::Expr::isTypeDependent().

## ◆ diagnoseEquivalentInternalLinkageDeclarations()

void Sema::diagnoseEquivalentInternalLinkageDeclarations | ( | SourceLocation | Loc,
|  | const NamedDecl * | D,
|  | ArrayRef< const NamedDecl *> | Equiv
| ) |  |

Definition at line 9702 of file SemaOverload.cpp.

References Diag(), clang::Module::getFullModuleName(), and clang::Decl::getLocation().

## ◆ diagnoseExprIntendedAsTemplateName()

void Sema::diagnoseExprIntendedAsTemplateName | ( | Scope * | S,
|  | ExprResult | TemplateName,
|  | SourceLocation | Less,
|  | SourceLocation | Greater
| ) |  |

Definition at line 565 of file SemaTemplate.cpp.

## ◆ DiagnoseFunctionSpecifiers()

void Sema::DiagnoseFunctionSpecifiers | ( | const DeclSpec & | DS | ) |

Diagnose function specifiers on a declaration of an identifier that does not identify a function.

Definition at line 5897 of file SemaDecl.cpp.

References Diag(), clang::DeclSpec::getExplicitSpecLoc(), clang::DeclSpec::getNoreturnSpecLoc(), clang::DeclSpec::getVirtualSpecLoc(), clang::DeclSpec::hasExplicitSpecifier(), clang::DeclSpec::isNoreturnSpecified(), and clang::DeclSpec::isVirtualSpecified().

## ◆ DiagnoseHiddenVirtualMethods()

void Sema::DiagnoseHiddenVirtualMethods | ( | CXXMethodDecl * | MD | ) |

Diagnose methods which overload virtual methods in a base class without overriding any.

Definition at line 9408 of file SemaDeclCXX.cpp.

References Diag(), clang::Decl::getLocation(), and clang::Decl::isInvalidDecl().

## ◆ diagnoseIgnoredQualifiers()

void Sema::diagnoseIgnoredQualifiers | ( | unsigned | DiagID,
|  | unsigned | Quals,
|  | SourceLocation | FallbackLoc,
|  | SourceLocation | ConstQualLoc = `SourceLocation()`,
|  | SourceLocation | VolatileQualLoc = `SourceLocation()`,
|  | SourceLocation | RestrictQualLoc = `SourceLocation()`,
|  | SourceLocation | AtomicQualLoc = `SourceLocation()`,
|  | SourceLocation | UnalignedQualLoc = `SourceLocation()`
| ) |  |

Definition at line 2836 of file SemaType.cpp.

Referenced by diagnoseRedundantReturnTypeQualifiers().

## ◆ DiagnoseInvalidJumps()

void Sema::DiagnoseInvalidJumps | ( | Stmt * | Body | ) |

Definition at line 942 of file JumpDiagnostics.cpp.

## ◆ DiagnoseMisalignedMembers()

void Sema::DiagnoseMisalignedMembers | ( |  | ) |

Diagnoses the current set of gathered accesses.

This typically happens at full expression level. The set is cleared after emitting the diagnostics.

Definition at line 14898 of file SemaChecking.cpp.

References Diag(), clang::NamedDecl::getName(), and clang::Decl::getSourceRange().

## ◆ DiagnoseMissingDesignatedInitOverrides()

void Sema::DiagnoseMissingDesignatedInitOverrides | ( | const ObjCImplementationDecl * | ImplD,
|  | const ObjCInterfaceDecl * | IFD
| ) |  |

Definition at line 2331 of file SemaObjCProperty.cpp.

References Diag(), clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getSelector(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ObjCInterfaceDecl::hasDesignatedInitializers(), clang::ObjCContainerDecl::instance_methods(), clang::Decl::isUnavailable(), clang::OMF_init, and clang::ObjCInterfaceDecl::visible_extensions().

## ◆ diagnoseMissingImport() [1/2]

void Sema::diagnoseMissingImport | ( | SourceLocation | Loc,
|  | 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.

Definition at line 5325 of file SemaLookup.cpp.

References getDefinitionToImport(), clang::Decl::getLocation(), and clang::ASTContext::getModulesWithMergedDefinition().

Referenced by computeDeclContext(), diagnoseMissingArgument(), and RequireCompleteDeclContext().

## ◆ diagnoseMissingImport() [2/2]

void Sema::diagnoseMissingImport | ( | SourceLocation | Loc,
|  | NamedDecl * | Decl,
|  | SourceLocation | DeclLoc,
|  | ArrayRef< Module *> | Modules,
|  | MissingImportKind | MIK,
|  | bool | Recover
| ) |  |

Definition at line 5356 of file SemaLookup.cpp.

References Diag(), getIncludeStringForHeader(), and clang::Module::GlobalModuleFragment.

## ◆ diagnoseMissingTemplateArguments()

void Sema::diagnoseMissingTemplateArguments | ( | TemplateName | Name,
|  | SourceLocation | Loc
| ) |  |

Definition at line 4420 of file SemaTemplate.cpp.

## ◆ DiagnoseMultipleMethodInGlobalPool()

void Sema::DiagnoseMultipleMethodInGlobalPool | ( | SmallVectorImpl< ObjCMethodDecl *> & | Methods,
|  | Selector | Sel,
|  | SourceRange | R,
|  | bool | receiverIdOrClass
| ) |  |

Definition at line 3567 of file SemaDeclObjC.cpp.

References Diag(), Diags, clang::SourceRange::getBegin(), getLangOpts(), isAcceptableMethodMismatch(), clang::DiagnosticsEngine::isIgnored(), MatchTwoMethodDeclarations(), MMS_loose, and MMS_strict.

Referenced by AreMultipleMethodsInGlobalPool().

## ◆ DiagnoseMultipleUserDefinedConversion()

bool Sema::DiagnoseMultipleUserDefinedConversion | ( | Expr * | From,
|  | QualType | ToType
| ) |  |

Definition at line 3594 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::CSK_Normal, Diag(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), IsUserDefinedConversion(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_No_Viable_Function, and clang::ImplicitConversionSequence::UserDefined.

Referenced by CheckConvertedConstantExpression().

## ◆ DiagnoseNonDefaultPragmaPack()

void Sema::DiagnoseNonDefaultPragmaPack | ( | PragmaPackDiagnoseKind | Kind,
|  | SourceLocation | IncludeLoc
| ) |  |

Definition at line 335 of file SemaAttr.cpp.

References ChangedStateAtExit, clang::Sema::PragmaStack< ValueType >::CurrentPragmaLocation, clang::Sema::PackIncludeState::CurrentPragmaLocation, clang::Sema::PragmaStack< ValueType >::CurrentValue, clang::Sema::PackIncludeState::CurrentValue, Diag(), clang::Sema::PragmaStack< ValueType >::hasValue(), NonDefaultStateAtInclude, PackIncludeStack, PackStack, and clang::Sema::PackIncludeState::ShouldWarnOnInclude.

Referenced by clang::sema::SemaPPCallbacks::FileChanged().

## ◆ DiagnoseNontrivial()

void Sema::DiagnoseNontrivial | ( | const CXXRecordDecl * | RD,
|  | CXXSpecialMember | CSM
| ) |  |

Diagnose why the specified class does not have a trivial special member of the given kind.

Definition at line 9138 of file SemaDeclCXX.cpp.

## ◆ diagnoseNullableToNonnullConversion()

void Sema::diagnoseNullableToNonnullConversion | ( | QualType | DstType,
|  | QualType | SrcType,
|  | SourceLocation | Loc
| ) |  |

Warn if we're implicitly casting from a _Nullable pointer type to a _Nonnull one.

Definition at line 487 of file Sema.cpp.

References Context, Diag(), clang::Type::getNullability(), clang::NonNull, and clang::Nullable.

Referenced by ImpCastExprToType(), and PerformImplicitConversion().

## ◆ diagnoseNullResettableSynthesizedSetters()

void Sema::diagnoseNullResettableSynthesizedSetters | ( | const ObjCImplDecl * | impDecl | ) |

Diagnose any null-resettable synthesized setters.

Definition at line 2150 of file SemaObjCProperty.cpp.

References Diag(), clang::Decl::getBeginLoc(), clang::SourceLocation::isInvalid(), clang::ObjCPropertyDecl::OBJC_PR_null_resettable, clang::ObjCImplDecl::property_impls(), and clang::ObjCPropertyImplDecl::Synthesize.

## ◆ DiagnoseOwningPropertyGetterSynthesis()

void Sema::DiagnoseOwningPropertyGetterSynthesis | ( | const ObjCImplementationDecl * | D | ) |

Definition at line 2272 of file SemaObjCProperty.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::LangOptions::GCOnly, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterMethodDecl(), clang::Preprocessor::getIdentifierInfo(), getLangOpts(), clang::Preprocessor::getLastMacroWithSpelling(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), getPreprocessor(), clang::Decl::hasAttr(), clang::ObjCPropertyDecl::isClassProperty(), clang::ObjCMethodDecl::isSynthesizedAccessorStub(), clang::SourceLocation::isValid(), clang::OMF_alloc, clang::OMF_copy, clang::OMF_mutableCopy, clang::OMF_new, PP, clang::ObjCImplDecl::property_impls(), and clang::Decl::redecls().

## ◆ DiagnosePropertyAccessorMismatch()

bool Sema::DiagnosePropertyAccessorMismatch | ( | ObjCPropertyDecl * | PD,
|  | ObjCMethodDecl * | Getter,
|  | SourceLocation | Loc
| ) |  |

Definition at line 1719 of file SemaObjCProperty.cpp.

References clang::ASTContext::canAssignObjCInterfaces(), CheckAssignmentConstraints(), Compatible, Context, Diag(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::CanQual< T >::getUnqualifiedType(), clang::ASTContext::hasSameType(), and clang::Type::isArithmeticType().

Referenced by LookupMethodInReceiverType(), and ProcessPropertyDecl().

## ◆ DiagnosePropertyMismatch()

void Sema::DiagnosePropertyMismatch | ( | ObjCPropertyDecl * | Property,
|  | ObjCPropertyDecl * | SuperProperty,
|  | const IdentifierInfo * | Name,
|  | bool | OverridingProtocolProperty
| ) |  |

DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a variety of inconsistencies.

Definition at line 1641 of file SemaObjCProperty.cpp.

References checkAtomicPropertyMismatch(), Context, Diag(), clang::ASTContext::getCanonicalType(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterName(), clang::Decl::getLocation(), getOwnershipRule(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), isObjCPointerConversion(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyDecl::OBJC_PR_copy, clang::ObjCPropertyDecl::OBJC_PR_readonly, clang::ObjCPropertyDecl::OBJC_PR_readwrite, clang::ObjCPropertyDecl::OBJC_PR_retain, clang::ObjCPropertyDecl::OBJC_PR_strong, and clang::ASTContext::propertyTypesAreCompatible().

## ◆ diagnoseQualifiedDeclaration()

bool Sema::diagnoseQualifiedDeclaration | ( | CXXScopeSpec & | SS,
|  | DeclContext * | DC,
|  | DeclarationName | Name,
|  | SourceLocation | Loc,
|  | bool | IsTemplateId
| ) |  |

Diagnose a declaration whose declarator-id has the given nested-name-specifier.

Parameters

  SS | The nested-name-specifier of the declarator-id.
  DC | The declaration context to which the nested-name-specifier resolves.
  Name | The name of the entity being declared.
  Loc | The location of the name of the entity being declared.
  IsTemplateId | Whether the name is a (simple-)template-id, and thus we're declaring an explicit / partial specialization / instantiation.

Returns
  true if we cannot safely recover from this error, false otherwise.

Definition at line 5458 of file SemaDecl.cpp.

## ◆ DiagnoseRedeclarationConstraintMismatch()

void clang::Sema::DiagnoseRedeclarationConstraintMismatch | ( | SourceLocation | Old,
|  | SourceLocation | New
| ) |  |

## ◆ DiagnoseReturnInConstructorExceptionHandler()

void Sema::DiagnoseReturnInConstructorExceptionHandler | ( | CXXTryStmt * | TryBlock | ) |

Definition at line 16449 of file SemaDeclCXX.cpp.

References clang::CXXTryStmt::getHandler(), clang::CXXTryStmt::getNumHandlers(), and SearchForReturnInStmt().

## ◆ DiagnoseSelfMove()

void Sema::DiagnoseSelfMove | ( | const Expr * | LHSExpr,
|  | const Expr * | RHSExpr,
|  | SourceLocation | OpLoc
| ) |  |

Warn if a value is moved to itself.

DiagnoseSelfMove - Emits a warning if a value is moved to itself.

Definition at line 14393 of file SemaChecking.cpp.

References Diag(), clang::CallExpr::getArg(), clang::MemberExpr::getBase(), clang::Decl::getCanonicalDecl(), clang::DeclRefExpr::getDecl(), clang::MemberExpr::getMemberDecl(), clang::CallExpr::getNumArgs(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::CallExpr::isCallToStdMove(), and isLayoutCompatible().

## ◆ DiagnoseSentinelCalls()

void Sema::DiagnoseSentinelCalls | ( | NamedDecl * | D,
|  | SourceLocation | Loc,
|  | ArrayRef< Expr *> | Args
| ) |  |

DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with the sentinel attribute, and if so, it checks that the requirements of the sentinel are satisfied.

Definition at line 372 of file SemaExpr.cpp.

References clang::Type::castAs(), Diag(), clang::Type::getAs(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Type::getPointeeType(), and clang::Expr::isValueDependent().

## ◆ DiagnoseShadowingLambdaDecls()

void Sema::DiagnoseShadowingLambdaDecls | ( | const sema::LambdaScopeInfo * | LSI | ) |

Diagnose shadowing for variables shadowed in the lambda record `LambdaRD` when these variables are captured by the lambda.

Definition at line 7445 of file SemaDecl.cpp.

References computeShadowedDeclKind(), Diag(), getCaptureLocation(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::SourceLocation::isInvalid(), and clang::sema::LambdaScopeInfo::ShadowingDecls.

## ◆ DiagnoseSizeOfParametersAndReturnValue()

void Sema::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.

Definition at line 13266 of file SemaDecl.cpp.

References clang::Type::isDependentType(), and clang::QualType::isPODType().

## ◆ DiagnoseTemplateParameterShadow()

void Sema::DiagnoseTemplateParameterShadow | ( | SourceLocation | Loc,
|  | Decl * | PrevDecl
| ) |  |

DiagnoseTemplateParameterShadow - Produce a diagnostic complaining that the template parameter 'PrevDecl' is being shadowed by a new declaration at location Loc.

Returns true to indicate that this is an error, and false otherwise.

Definition at line 830 of file SemaTemplate.cpp.

References Diag(), clang::Decl::getLocation(), and clang::Decl::isTemplateParameter().

## ◆ DiagnoseTypeArgsAndProtocols()

void Sema::DiagnoseTypeArgsAndProtocols | ( | IdentifierInfo * | ProtocolId,
|  | SourceLocation | ProtocolLoc,
|  | IdentifierInfo * | TypeArgId,
|  | SourceLocation | TypeArgLoc,
|  | bool | SelectProtocolFirst = `false`
| ) |  |

Definition at line 1395 of file SemaDeclObjC.cpp.

References Diag().

## ◆ diagnoseTypo() [1/2]

void Sema::diagnoseTypo | ( | const TypoCorrection & | Correction,
|  | const PartialDiagnostic & | TypoDiag,
|  | bool | ErrorRecovery = `true`
| ) |  |

Definition at line 5296 of file SemaLookup.cpp.

Referenced by ActOnStartClassImplementation(), FindProtocolDeclaration(), LookupMemberExpr(), and TryNamespaceTypoCorrection().

## ◆ diagnoseTypo() [2/2]

void Sema::diagnoseTypo | ( | const TypoCorrection & | Correction,
|  | const PartialDiagnostic & | TypoDiag,
|  | const PartialDiagnostic & | PrevNote,
|  | bool | ErrorRecovery = `true`
| ) |  |

Diagnose a successfully-corrected typo.

Separated from the correction itself to allow external validation of the result, etc.

Parameters

  Correction | The result of performing typo correction.
  TypoDiag | The diagnostic to produce. This will have the corrected string added to it (and usually also a fixit).
  PrevNote | A note to use when indicating the location of the entity to which we are correcting. Will have the correction string added to it.
  ErrorRecovery | If `true` (the default), the caller is going to recover from the typo as if the corrected string had been typed. In this case, `PDiag` must be an error, and we will attach a fixit to it.

Definition at line 5470 of file SemaLookup.cpp.

References clang::FixItHint::CreateReplacement(), Diag(), clang::TypoCorrection::getAsString(), clang::SourceRange::getBegin(), clang::TypoCorrection::getCorrectionRange(), clang::PartialDiagnostic::getDiagID(), clang::TypoCorrection::getExtraDiagnostics(), clang::TypoCorrection::getFoundDecl(), clang::TypoCorrection::getQuoted(), clang::TypoCorrection::isKeyword(), and clang::TypoCorrection::requiresImport().

## ◆ diagnoseUnavailableAlignedAllocation()

void Sema::diagnoseUnavailableAlignedAllocation | ( | const FunctionDecl & | FD,
|  | SourceLocation | Loc
| ) |  |

Produce diagnostics if `FD` is an aligned allocation or deallocation function that is unavailable.

Definition at line 1754 of file SemaExprCXX.cpp.

References clang::alignedAllocMinVersion(), Diag(), clang::getAsString(), clang::QualType::getAsString(), getASTContext(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), getPlatformName(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), and isUnavailableAlignedAllocationFunction().

## ◆ DiagnoseUnexpandedParameterPack() [1/6]

bool Sema::DiagnoseUnexpandedParameterPack | ( | SourceLocation | Loc,
|  | TypeSourceInfo * | T,
|  | UnexpandedParameterPackContext | UPPC
| ) |  |

If the given type contains an unexpanded parameter pack, diagnose the error.

Parameters

  Loc | The source location where a diagnostc should be emitted.
  T | The type that is being checked for unexpanded parameter packs.

Returns
  true if an error occurred, false otherwise.

Definition at line 381 of file SemaTemplateVariadic.cpp.

References clang::Type::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TypeSourceInfo::getType(), and clang::TypeSourceInfo::getTypeLoc().

Referenced by ActOnFinishFullExpr().

## ◆ DiagnoseUnexpandedParameterPack() [2/6]

bool Sema::DiagnoseUnexpandedParameterPack | ( | Expr * | E,
|  | UnexpandedParameterPackContext | UPPC = `UPPC_Expression`
| ) |  |

If the given expression contains an unexpanded parameter pack, diagnose the error.

Parameters

  E | The expression that is being checked for unexpanded parameter packs.

Returns
  true if an error occurred, false otherwise.

Definition at line 397 of file SemaTemplateVariadic.cpp.

References clang::Expr::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), and clang::Stmt::getBeginLoc().

## ◆ DiagnoseUnexpandedParameterPack() [3/6]

bool Sema::DiagnoseUnexpandedParameterPack | ( | const CXXScopeSpec & | SS,
|  | UnexpandedParameterPackContext | UPPC
| ) |  |

If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error.

Parameters

  SS | The nested-name-specifier that is being checked for unexpanded parameter packs.

Returns
  true if an error occurred, false otherwise.

Definition at line 411 of file SemaTemplateVariadic.cpp.

References clang::NestedNameSpecifier::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getRange(), and clang::CXXScopeSpec::getScopeRep().

## ◆ DiagnoseUnexpandedParameterPack() [4/6]

bool Sema::DiagnoseUnexpandedParameterPack | ( | const DeclarationNameInfo & | NameInfo,
|  | UnexpandedParameterPackContext | UPPC
| ) |  |

If the given name contains an unexpanded parameter pack, diagnose the error.

Parameters

  NameInfo | The name (with source location information) that is being checked for unexpanded parameter packs.

Returns
  true if an error occurred, false otherwise.

Definition at line 428 of file SemaTemplateVariadic.cpp.

References clang::Type::containsUnexpandedParameterPack(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDeductionGuideName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, DiagnoseUnexpandedParameterPacks(), clang::DeclarationName::getCXXNameType(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::DeclarationNameInfo::getNamedTypeInfo(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, and clang::DeclarationName::ObjCZeroArgSelector.

## ◆ DiagnoseUnexpandedParameterPack() [5/6]

bool Sema::DiagnoseUnexpandedParameterPack | ( | SourceLocation | Loc,
|  | TemplateName | Template,
|  | UnexpandedParameterPackContext | UPPC
| ) |  |

If the given template name contains an unexpanded parameter pack, diagnose the error.

Parameters

  Loc | The location of the template name.
  Template | The template name that is being checked for unexpanded parameter packs.

Returns
  true if an error occurred, false otherwise.

Definition at line 464 of file SemaTemplateVariadic.cpp.

References clang::TemplateName::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), and clang::TemplateName::isNull().

## ◆ DiagnoseUnexpandedParameterPack() [6/6]

bool Sema::DiagnoseUnexpandedParameterPack | ( | TemplateArgumentLoc | Arg,
|  | UnexpandedParameterPackContext | UPPC
| ) |  |

If the given template argument contains an unexpanded parameter pack, diagnose the error.

Parameters

  Arg | The template argument that is being checked for unexpanded parameter packs.

Returns
  true if an error occurred, false otherwise.

Definition at line 478 of file SemaTemplateVariadic.cpp.

References clang::TemplateArgument::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgumentLoc::getLocation(), and clang::TemplateArgument::isNull().

## ◆ DiagnoseUnexpandedParameterPacks()

bool Sema::DiagnoseUnexpandedParameterPacks | ( | SourceLocation | Loc,
|  | UnexpandedParameterPackContext | UPPC,
|  | ArrayRef< UnexpandedParameterPack > | Unexpanded
| ) |  |

Diagnose unexpanded parameter packs.

Diagnose all of the unexpanded parameter packs in the given vector.

Parameters

  Loc | The location at which we should emit the diagnostic.
  UPPC | The context in which we are diagnosing unexpanded parameter packs.
  Unexpanded | the set of unexpanded parameter packs.

Returns
  true if an error occurred, false otherwise.

Definition at line 290 of file SemaTemplateVariadic.cpp.

References clang::sema::FunctionScopeInfo::CompoundScopes, clang::declaresSameEntity(), and clang::TypeDecl::getTypeForDecl().

## ◆ DiagnoseUnguardedAvailabilityViolations()

void clang::Sema::DiagnoseUnguardedAvailabilityViolations | ( | Decl * | FD | ) |

Issue any -Wunguarded-availability warnings in `FD`.

## ◆ DiagnoseUnimplementedProperties()

void Sema::DiagnoseUnimplementedProperties | ( | Scope * | S,
|  | ObjCImplDecl * | IMPDecl,
|  | ObjCContainerDecl * | CDecl,
|  | bool | SynthesizeProperties
| ) |  |

DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by this implementation.

Definition at line 2042 of file SemaObjCProperty.cpp.

## ◆ DiagnoseUninstantiableTemplate()

bool Sema::DiagnoseUninstantiableTemplate | ( | SourceLocation | PointOfInstantiation,
|  | NamedDecl * | Instantiation,
|  | bool | InstantiatedFromMember,
|  | const NamedDecl * | Pattern,
|  | const NamedDecl * | PatternDef,
|  | TemplateSpecializationKind | TSK,
|  | bool | Complain = `true`
| ) |  |

Determine whether we would be unable to instantiate this template (because it either has no definition, or is in the process of being instantiated).

Definition at line 731 of file SemaTemplate.cpp.

References Definition, and clang::Decl::isInvalidDecl().

Referenced by InstantiateClass(), and InstantiateEnum().

## ◆ DiagnoseUnknownTemplateName()

bool Sema::DiagnoseUnknownTemplateName | ( | const IdentifierInfo & | II,
|  | SourceLocation | IILoc,
|  | Scope * | S,
|  | const CXXScopeSpec * | SS,
|  | TemplateTy & | SuggestedTemplate,
|  | TemplateNameKind & | SuggestedKind
| ) |  |

Definition at line 301 of file SemaTemplate.cpp.

## ◆ DiagnoseUnknownTypeName()

void Sema::DiagnoseUnknownTypeName | ( | IdentifierInfo *& | II,
|  | SourceLocation | IILoc,
|  | Scope * | S,
|  | CXXScopeSpec * | SS,
|  | ParsedType & | SuggestedType,
|  | bool | IsTemplateName = `false`
| ) |  |

Definition at line 658 of file SemaDecl.cpp.

## ◆ DiagnoseUnsatisfiedConstraint() [1/2]

void Sema::DiagnoseUnsatisfiedConstraint | ( | const ConstraintSatisfaction & | Satisfaction,
|  | bool | First = `true`
| ) |  |

Emit diagnostics explaining why a constraint expression was deemed unsatisfied.

Parameters

  First | whether this is the first time an unsatisfied constraint is diagnosed for this error.

Definition at line 590 of file SemaConcept.cpp.

References clang::ConstraintSatisfaction::Details, diagnoseUnsatisfiedConstraintExpr(), and clang::ConstraintSatisfaction::IsSatisfied.

Referenced by CheckDeducedPlaceholderConstraints().

## ◆ DiagnoseUnsatisfiedConstraint() [2/2]

void Sema::DiagnoseUnsatisfiedConstraint | ( | const ASTConstraintSatisfaction & | Satisfaction,
|  | bool | First = `true`
| ) |  |

Emit diagnostics explaining why a constraint expression was deemed unsatisfied.

Definition at line 600 of file SemaConcept.cpp.

References diagnoseUnsatisfiedConstraintExpr(), and clang::ASTConstraintSatisfaction::IsSatisfied.

## ◆ DiagnoseUnsatisfiedIllFormedConstraint()

void clang::Sema::DiagnoseUnsatisfiedIllFormedConstraint | ( | SourceLocation | DiagnosticLocation,
|  | StringRef | Diagnostic
| ) |  |

Emit diagnostics explaining why a constraint expression was deemed unsatisfied because it was ill-formed.

## ◆ DiagnoseUnterminatedPragmaAttribute()

void Sema::DiagnoseUnterminatedPragmaAttribute | ( |  | ) |

Definition at line 843 of file SemaAttr.cpp.

References Diag(), and PragmaAttributeStack.

Referenced by ActOnEndOfTranslationUnit().

## ◆ DiagnoseUnterminatedPragmaPack()

void Sema::DiagnoseUnterminatedPragmaPack | ( |  | ) |

Definition at line 369 of file SemaAttr.cpp.

References clang::FixItHint::CreateInsertion(), clang::Sema::PragmaStack< ValueType >::CurrentPragmaLocation, clang::Sema::PragmaStack< ValueType >::CurrentValue, clang::Sema::PragmaStack< ValueType >::DefaultValue, Diag(), clang::Lexer::findLocationAfterToken(), clang::SourceLocation::isValid(), LangOpts, PackStack, SourceMgr, and clang::Sema::PragmaStack< ValueType >::Stack.

Referenced by ActOnEndOfTranslationUnit().

## ◆ DiagnoseUnusedBackingIvarInAccessor()

void Sema::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.

Definition at line 5221 of file SemaDeclObjC.cpp.

## ◆ DiagnoseUnusedDecl()

void Sema::DiagnoseUnusedDecl | ( | const NamedDecl * | D | ) |

DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused).

Definition at line 1857 of file SemaDecl.cpp.

References GenerateFixForUnusedDecl(), and ShouldDiagnoseUnusedDecl().

## ◆ DiagnoseUnusedExprResult()

void Sema::DiagnoseUnusedExprResult | ( | const Stmt * | S | ) |

DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused, warn.

Definition at line 218 of file SemaStmt.cpp.

Referenced by ActOnFinishFullExpr(), and CheckCommaOperands().

## ◆ DiagnoseUnusedLambdaCapture()

bool Sema::DiagnoseUnusedLambdaCapture | ( | SourceRange | CaptureRange,
|  | const sema::Capture & | From
| ) |  |

Diagnose if an explicit lambda capture is unused.

Returns true if a diagnostic is emitted.

Definition at line 1586 of file SemaLambda.cpp.

References clang::FixItHint::CreateRemoval(), Diag(), clang::sema::Capture::getLocation(), clang::sema::Capture::getVariable(), clang::sema::Capture::isNonODRUsed(), clang::sema::Capture::isThisCapture(), and clang::sema::Capture::isVLATypeCapture().

## ◆ DiagnoseUnusedNestedTypedefs()

void Sema::DiagnoseUnusedNestedTypedefs | ( | const RecordDecl * | D | ) |

Definition at line 1843 of file SemaDecl.cpp.

References clang::DeclContext::decls(), clang::TypeDecl::getTypeForDecl(), and clang::Type::isDependentType().

## ◆ DiagnoseUnusedParameters()

void Sema::DiagnoseUnusedParameters | ( | ArrayRef< ParmVarDecl *> | Parameters | ) |

Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.

Definition at line 13251 of file SemaDecl.cpp.

References Diag(), and clang::Parameter.

## ◆ DiagnoseUseOfDecl()

bool Sema::DiagnoseUseOfDecl | ( | NamedDecl * | D,
|  | ArrayRef< SourceLocation > | Locs,
|  | const ObjCInterfaceDecl * | UnknownObjCClass = `nullptr`,
|  | bool | ObjCPropertyAccess = `false`,
|  | bool | AvoidPartialAvailabilityChecks = `false`,
|  | ObjCInterfaceDecl * | ClassReceiver = `nullptr`
| ) |  |

Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.

This routine diagnoses various problems with referencing declarations that can occur when using a declaration. For example, it might warn if a deprecated or unavailable declaration is being used, or produce an error (and return true) if a C++0x deleted function is being used.

Returns
  true if there was an error (this declaration cannot be referenced), false otherwise.

Definition at line 207 of file SemaExpr.cpp.

References CheckConstraintSatisfaction(), clang::CPlusPlus, clang::CPlusPlus14, Diag(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::Decl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), and clang::ConstraintSatisfaction::IsSatisfied.

Referenced by ActOnCXXDelete(), checkDestructorReference(), diagnoseUseOfProtocols(), FindProtocolDeclaration(), FinishOverloadedCallExpr(), LookupMemberExpr(), LookupMethodInReceiverType(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformImplicitConversion(), and resolveBuiltinNewDeleteOverload().

## ◆ DiagnoseUseOfUnimplementedSelectors()

void Sema::DiagnoseUseOfUnimplementedSelectors | ( |  | ) |

Definition at line 5136 of file SemaDeclObjC.cpp.

References clang::ASTContext::AnyObjCImplementation(), Diag(), LookupImplementedMethodInGlobalPool(), and ReferencedSelectors.

Referenced by ActOnEndOfTranslationUnit().

## ◆ diagnoseZeroToNullptrConversion()

void Sema::diagnoseZeroToNullptrConversion | ( | CastKind | Kind,
|  | const Expr * | E
| ) |  |

Warn when implicitly casting 0 to nullptr.

Definition at line 501 of file Sema.cpp.

References clang::FixItHint::CreateReplacement(), Diag(), Diags, findMacroSpelling(), clang::Stmt::getBeginLoc(), getLangOpts(), clang::Stmt::getSourceRange(), clang::DiagnosticsEngine::getSuppressSystemWarnings(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::DiagnosticsEngine::isIgnored(), clang::SourceManager::isInSystemMacro(), clang::Type::isNullPtrType(), and SourceMgr.

Referenced by ImpCastExprToType().

## ◆ DiagRuntimeBehavior() [1/2]

bool Sema::DiagRuntimeBehavior | ( | SourceLocation | Loc,
|  | const Stmt * | Statement,
|  | const PartialDiagnostic & | PD
| ) |  |

Conditionally issue a diagnostic based on the current evaluation context.

Parameters

  Statement | If Statement is non-null, delay reporting the diagnostic until the function body is parsed, and then do a basic reachability analysis to determine if the statement is reachable. If it is unreachable, the diagnostic will not be emitted.

Definition at line 17266 of file SemaExpr.cpp.

References clang::None.

Referenced by AnalyzeComparison(), CheckForNullPointerDereference(), CheckImplicitConversion(), CheckNonNullArgument(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseFloatingImpCast(), DiagnoseImpCast(), and diagnoseTautologicalComparison().

## ◆ DiagRuntimeBehavior() [2/2]

bool Sema::DiagRuntimeBehavior | ( | SourceLocation | Loc,
|  | ArrayRef< const Stmt *> | Stmts,
|  | const PartialDiagnostic & | PD
| ) |  |

Similar, but diagnostic is only produced if all the specified statements are reachable.

Emit a diagnostic that describes an effect on the run-time behavior of the program being compiled.

This routine emits the given diagnostic when the code currently being type-checked is "potentially evaluated", meaning that there is a possibility that the code will actually be executable. Code in sizeof() expressions, code used only during overload resolution, etc., are not potentially evaluated. This routine will suppress such diagnostics or, in the absolutely nutty case of potentially potentially evaluated expressions (C++ typeid), queue the diagnostic to potentially emit it later.

This routine should be used for all diagnostics that describe the run-time behavior of a program, such as passing a non-POD value through an ellipsis. Failure to do so will likely result in spurious diagnostics or failures during overload resolution or within sizeof/alignof/typeof/typeid.

Definition at line 17223 of file SemaExpr.cpp.

References Diag().

## ◆ DiscardCleanupsInEvaluationContext()

void Sema::DiscardCleanupsInEvaluationContext | ( |  | ) |

Definition at line 15346 of file SemaExpr.cpp.

Referenced by checkForMultipleExportedDefaultConstructors(), and MaybeCreateExprWithCleanups().

## ◆ DiscardMisalignedMemberAddress()

void Sema::DiscardMisalignedMemberAddress | ( | const Type * | T,
|  | Expr * | E
| ) |  |

This function checks if the expression is in the sef of potentially misaligned members and it is converted to some pointer type T with lower or equal alignment requirements.

If so it removes it. This is used when we do not want to diagnose such misaligned access (e.g. in conversions to void*).

Definition at line 14911 of file SemaChecking.cpp.

References clang::Type::getPointeeType(), clang::Expr::IgnoreParens(), clang::Type::isIncompleteType(), clang::Type::isIntegerType(), and clang::Type::isPointerType().

Referenced by CheckImplicitConversion(), and clang::InitializationSequence::Perform().

## ◆ emitAndClearUnusedLocalTypedefWarnings()

void Sema::emitAndClearUnusedLocalTypedefWarnings | ( |  | ) |

Definition at line 877 of file Sema.cpp.

References Diag(), clang::ExternalSemaSource::ReadUnusedLocalTypedefNameCandidates(), and UnusedLocalTypedefNameCandidates.

## ◆ EmitCurrentDiagnostic()

void Sema::EmitCurrentDiagnostic | ( | unsigned | DiagID | ) |

Cause the active diagnostic on the DiagosticsEngine to be emitted.

This is closely coupled to the SemaDiagnosticBuilder class and should not be used elsewhere.

Definition at line 1329 of file Sema.cpp.

References AccessCheckingSFINAE, clang::DiagnosticsEngine::Clear(), Context, clang::CPlusPlus11, Diag(), Diags, clang::DiagnosticsEngine::EmitCurrentDiagnostic(), clang::DiagnosticsEngine::getCurrentDiagID(), clang::DiagnosticsEngine::getCurrentDiagLoc(), clang::ASTContext::getDiagAllocator(), clang::DiagnosticIDs::getDiagnosticSFINAEResponse(), getLangOpts(), clang::Diagnostic::getLocation(), getPrintingPolicy(), clang::DiagnosticIDs::isBuiltinNote(), isSFINAEContext(), NumSFINAEErrors, PrintContextStack(), clang::DiagnosticsEngine::setLastDiagnosticIgnored(), clang::ASTContext::setPrintingPolicy(), clang::DiagnosticIDs::SFINAE_AccessControl, clang::DiagnosticIDs::SFINAE_Report, clang::DiagnosticIDs::SFINAE_SubstitutionFailure, and clang::DiagnosticIDs::SFINAE_Suppress.

Referenced by clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder().

## ◆ EmitRelatedResultTypeNote()

void Sema::EmitRelatedResultTypeNote | ( | const Expr * | E | ) |

If the given expression involves a message send to a method with a related result type, emit a note describing what happened.

Definition at line 1561 of file SemaExprObjC.cpp.

References clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMethodDecl::hasRelatedResultType(), and clang::Expr::IgnoreParenImpCasts().

Referenced by emitBadConversionNotes(), and PerformImplicitConversion().

## ◆ EmitRelatedResultTypeNoteForReturn()

void Sema::EmitRelatedResultTypeNoteForReturn | ( | QualType | destType | ) |

Given that we had incompatible pointer types in a return statement, check whether we're in a method with a related result type, and if so, emit a note describing what happened.

Definition at line 1532 of file SemaExprObjC.cpp.

References clang::ObjCMethodDecl::hasRelatedResultType().

Referenced by emitBadConversionNotes().

## ◆ EndOpenMPClause()

void Sema::EndOpenMPClause | ( |  | ) |

End analysis of clauses.

Definition at line 2227 of file SemaOpenMP.cpp.

References checkAllocateClauses(), DSAStack, and clang::OMPC_unknown.

## ◆ EndOpenMPDSABlock()

void Sema::EndOpenMPDSABlock | ( | Stmt * | CurDirective | ) |

Called on end of data sharing attribute block.

Definition at line 2239 of file SemaOpenMP.cpp.

References buildDeclRefExpr(), buildVarDecl(), clang::C, checkAllocateClauses(), DSAStack, FinishOpenMPLinearClause(), clang::TypoCorrection::getCorrectionDecl(), getCurLexicalContext(), getCurScope(), clang::Decl::getKind(), getPrivateItem(), clang::ValueDecl::getType(), isDeclInScope(), and clang::Decl::isInvalidDecl().

## ◆ EnsureTemplateArgumentListConstraints()

bool Sema::EnsureTemplateArgumentListConstraints | ( | TemplateDecl * | Template,
|  | ArrayRef< TemplateArgument > | TemplateArgs,
|  | SourceRange | TemplateIDRange
| ) |  |

Ensure that the given template arguments satisfy the constraints associated with the given template, emitting a diagnostic if they do not.

Parameters

  Template | The template to which the template arguments are being provided.
  TemplateArgs | The converted, canonicalized template arguments.
  TemplateIDRange | The source range of the template id that caused the constraints check.

Returns
  true if the constrains are not satisfied or could not be checked for satisfaction, false if the constraints are satisfied.

Definition at line 340 of file SemaConcept.cpp.

References CheckConstraintSatisfaction(), Diag(), clang::TemplateDecl::getAssociatedConstraints(), clang::SourceRange::getBegin(), clang::TemplateDecl::getTemplateParameters(), and clang::ConstraintSatisfaction::IsSatisfied.

## ◆ EnterDeclaratorContext()

void Sema::EnterDeclaratorContext | ( | Scope * | S,
|  | DeclContext * | DC
| ) |  |

EnterDeclaratorContext - Used when we must lookup names in the context of a declarator's nested name specifier.

Definition at line 1332 of file SemaDecl.cpp.

## ◆ EraseUnwantedCUDAMatches()

void Sema::EraseUnwantedCUDAMatches | ( | const FunctionDecl * | Caller,
|  | SmallVectorImpl< std::pair< DeclAccessPair, FunctionDecl *>> & | Matches
| ) |  |

Finds a function in `Matches` with highest calling priority from `Caller` context and erases all functions with lower calling priority.

Definition at line 213 of file SemaCUDA.cpp.

## ◆ EvaluateImplicitExceptionSpec()

void Sema::EvaluateImplicitExceptionSpec | ( | SourceLocation | Loc,
|  | FunctionDecl * | FD
| ) |  |

Evaluate the implicit exception specification for a defaulted special member function.

Definition at line 6902 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), computeImplicitExceptionSpec(), clang::EST_Unevaluated, clang::FunctionProtoType::getExceptionSpecType(), and clang::ValueDecl::getType().

Referenced by ResolveExceptionSpec().

## ◆ ExitDeclaratorContext()

void Sema::ExitDeclaratorContext | ( | Scope * | S | ) |

Definition at line 1361 of file SemaDecl.cpp.

## ◆ ExtractUnqualifiedFunctionType()

QualType Sema::ExtractUnqualifiedFunctionType | ( | QualType | PossiblyAFunctionType | ) |

Definition at line 11548 of file SemaOverload.cpp.

References clang::Type::getAs(), clang::Type::getPointeeType(), and Ret().

Referenced by IsStandardConversion().

## ◆ FillInlineAsmIdentifierInfo()

void Sema::FillInlineAsmIdentifierInfo | ( | Expr * | Res,
|  | llvm::InlineAsmIdentifierInfo & | Info
| ) |  |

Definition at line 703 of file SemaStmtAsm.cpp.

References clang::Expr::EvaluateAsRValue(), clang::Expr::getType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), and clang::Expr::isRValue().

## ◆ FilterAcceptableTemplateNames()

void Sema::FilterAcceptableTemplateNames | ( | LookupResult & | R,
|  | bool | AllowFunctionTemplates = `true`,
|  | bool | AllowDependent = `true`
| ) |  |

Definition at line 101 of file SemaTemplate.cpp.

References clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::LookupResult::Filter::hasNext(), clang::LookupResult::makeFilter(), and clang::LookupResult::Filter::next().

## ◆ FilterLookupForScope()

void Sema::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.

Definition at line 1512 of file SemaDecl.cpp.

## ◆ FinalizeDeclaration()

void Sema::FinalizeDeclaration | ( | Decl * | ThisDecl | ) |

FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions necessary after any initializer has been attached.

Definition at line 12757 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::Decl::hasAttr(), clang::VarDecl::hasGlobalStorage(), and clang::VarDecl::isThisDeclarationADefinition().

Referenced by FinishForRangeVarDecl(), and noteMemberDeclaredHere().

## ◆ FinalizeDeclaratorGroup()

Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup | ( | Scope * | S,
|  | const DeclSpec & | DS,
|  | ArrayRef< Decl *> | Group
| ) |  |

Definition at line 12945 of file SemaDecl.cpp.

## ◆ FinalizeVarWithDestructor()

void Sema::FinalizeVarWithDestructor | ( | VarDecl * | VD,
|  | const RecordType * | DeclInitType
| ) |  |

FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable.

Definition at line 14727 of file SemaDeclCXX.cpp.

References Diag(), clang::VarDecl::evaluateDestruction(), clang::VarDecl::evaluateValue(), clang::RecordType::getDecl(), clang::NamedDecl::getDeclName(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::VarDecl::hasGlobalStorage(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::Type::isArrayType(), clang::VarDecl::isConstexpr(), clang::FunctionDecl::isConstexpr(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::VarDecl::isNoDestroy(), clang::VarDecl::isStaticLocal(), clang::FunctionDecl::isTrivial(), and clang::Expr::isValueDependent().

## ◆ FindAllocationFunctions()

bool Sema::FindAllocationFunctions | ( | SourceLocation | StartLoc,
|  | SourceRange | Range,
|  | AllocationFunctionScope | NewScope,
|  | AllocationFunctionScope | DeleteScope,
|  | QualType | AllocType,
|  | bool | IsArray,
|  | bool & | PassAlignment,
|  | MultiExprArg | PlaceArgs,
|  | FunctionDecl *& | OperatorNew,
|  | FunctionDecl *& | OperatorDelete,
|  | bool | Diagnose = `true`
| ) |  |

Finds the overloads of operator new and delete that are appropriate for the allocation.

Definition at line 2345 of file SemaExprCXX.cpp.

References AFS_Class, AFS_Global, clang::Type::castAs(), Context, clang::ASTContext::DeclarationNames, DeclareGlobalNewDelete(), Diag(), clang::LookupResult::empty(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::TargetInfo::getPointerWidth(), clang::ASTContext::getSizeType(), getStdAlignValT(), clang::ASTContext::getTargetInfo(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::getTypeDeclType(), clang::LookupResult::isAmbiguous(), clang::Type::isRecordType(), LookupOrdinaryName, LookupQualifiedName(), resolveAllocationOverload(), clang::LookupResult::suppressDiagnostics(), and clang::ASTContext::VoidTy.

Referenced by diagReturnOnAllocFailure().

## ◆ FindAssociatedClassesAndNamespaces()

void Sema::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.

This routine computes the sets of associated classes and associated namespaces searched by argument-dependent lookup (C++ [basic.lookup.argdep]) for a given set of arguments.

Definition at line 3004 of file SemaLookup.cpp.

References clang::Expr::getType().

Referenced by argumentDependentLookup(), and DiagnoseTwoPhaseLookup().

## ◆ FindCompositeObjCPointerType()

QualType Sema::FindCompositeObjCPointerType | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | QuestionLoc
| ) |  |

FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types of the two input expressions.

Definition at line 7589 of file SemaExpr.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::Type::isObjCClassType().

Referenced by CXXCheckConditionalOperands().

## ◆ FindCompositePointerType() [1/2]

QualType Sema::FindCompositePointerType | ( | SourceLocation | Loc,
|  | Expr *& | E1,
|  | Expr *& | E2,
|  | bool | ConvertArgs = `true`
| ) |  |

Find a merged pointer type and convert the two expressions to it.

This finds the composite pointer type for `E1` and `E2` according to C++2a [expr.type]p3. It converts both expressions to this type and returns it. It does not emit diagnostics (FIXME: that's not true if `ConvertArgs` is `true`).

Parameters

  Loc | The location of the operator requiring these two expressions to be converted to the composite pointer type.
  ConvertArgs | If `false`, do not convert E1 and E2 to the target type.

The class for a pointer-to-member; a constant array type with a bound (if any) for an array.

Definition at line 6265 of file SemaExprCXX.cpp.

References Context, clang::CPlusPlus, clang::InitializationKind::CreateCopy(), clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::Qualifiers::fromCVRUMask(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::MemberPointerType::getClass(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getFunctionType(), clang::ASTContext::getIncompleteArrayType(), getLangOpts(), clang::ASTContext::getMemberPointerType(), clang::FunctionType::ExtInfo::getNoReturn(), clang::ASTContext::getObjCObjectPointerType(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::Expr::getType(), clang::ASTContext::getUnqualifiedArrayType(), clang::ASTContext::hasSameType(), ImpCastExprToType(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isAnyPointerType(), IsDerivedFrom(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjectType(), clang::Type::isVoidPointerType(), clang::Type::isVoidType(), mergeExceptionSpecs(), clang::ArrayType::Normal, clang::Expr::NPC_ValueDependentIsNull, clang::InitializationSequence::Perform(), Pointer, clang::Qualifiers::setAddressSpace(), clang::Qualifiers::setObjCGCAttr(), clang::Qualifiers::setObjCLifetime(), Step, and clang::FunctionType::ExtInfo::withNoReturn().

Referenced by convertPointersToCompositeType(), and CXXCheckConditionalOperands().

## ◆ FindCompositePointerType() [2/2]

QualType clang::Sema::FindCompositePointerType | ( | SourceLocation | Loc,
|  | ExprResult & | E1,
|  | ExprResult & | E2,
|  | bool | ConvertArgs = `true`
| ) |  |
| inline

Definition at line 10818 of file Sema.h.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), and V.

## ◆ FindDeallocationFunction()

bool Sema::FindDeallocationFunction | ( | SourceLocation | StartLoc,
|  | CXXRecordDecl * | RD,
|  | DeclarationName | Name,
|  | FunctionDecl *& | Operator,
|  | bool | Diagnose = `true`
| ) |  |

Definition at line 2889 of file SemaExprCXX.cpp.

Referenced by ActOnCXXDelete().

## ◆ FindDeallocationFunctionForDestructor()

FunctionDecl * Sema::FindDeallocationFunctionForDestructor | ( | SourceLocation | StartLoc,
|  | CXXRecordDecl * | RD
| ) |  |

Definition at line 2872 of file SemaExprCXX.cpp.

## ◆ findFailedBooleanCondition()

std::pair< Expr *, std::string > Sema::findFailedBooleanCondition | ( | Expr * | Cond | ) |

Find the failed Boolean condition within a given Boolean constant expression, and describe it with a string.

Definition at line 3364 of file SemaTemplate.cpp.

References collectConjunctionTerms(), ConstantEvaluated, clang::Expr::IgnoreParenImpCasts(), and lookThroughRangesV3Condition().

## ◆ FindFirstQualifierInScope()

NamedDecl * Sema::FindFirstQualifierInScope | ( | Scope * | S,
|  | NestedNameSpecifier * | NNS
| ) |  |

If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup for that identifier as a nested-name-specifier within the given scope, and return the result of that name lookup.

Definition at line 358 of file SemaCXXScopeSpec.cpp.

## ◆ FindHiddenVirtualMethods()

void Sema::FindHiddenVirtualMethods | ( | CXXMethodDecl * | MD,
|  | SmallVectorImpl< CXXMethodDecl *> & | OverloadedMethods
| ) |  |

Check if a method overloads virtual methods in a base class without overriding any.

Definition at line 9367 of file SemaDeclCXX.cpp.

References clang::NamedDecl::getDeclName(), and clang::DeclarationName::isIdentifier().

## ◆ findInheritingConstructor()

CXXConstructorDecl * Sema::findInheritingConstructor | ( | SourceLocation | Loc,
|  | CXXConstructorDecl * | BaseCtor,
|  | ConstructorUsingShadowDecl * | Shadow
| ) |  |

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.

Find or create the fake constructor we synthesize to model constructing an object of a derived class via a constructor of a base class.

Definition at line 12685 of file SemaDeclCXX.cpp.

References clang::Decl::getLocation(), and clang::ConstructorUsingShadowDecl::getParent().

Referenced by clang::Sema::InheritedConstructorInfo::findConstructorForBase(), and PerformConstructorInitialization().

## ◆ FindInstantiatedContext()

DeclContext * Sema::FindInstantiatedContext | ( | SourceLocation | Loc,
|  | DeclContext * | DC,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Finds the instantiation of the given declaration context within the current instantiation.

Returns
  NULL if there was an error

Definition at line 5553 of file SemaTemplateInstantiateDecl.cpp.

Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ FindInstantiatedDecl()

NamedDecl * Sema::FindInstantiatedDecl | ( | SourceLocation | Loc,
|  | NamedDecl * | D,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | bool | FindingInstantiatedContext = `false`
| ) |  |

Find the instantiation of the given declaration within the current instantiation.

This routine is intended to be used when `D` is a declaration referenced from within a template, that needs to mapped into the corresponding declaration within an instantiation. For example, given:

template<typename T>
struct X {
enum Kind {
KnownValue = sizeof(T)
};
bool getKind() const { return KnownValue; }
};
template struct X<int>;

In the instantiation of X<int>::getKind(), we need to map the `EnumConstantDecl` for `KnownValue` (which refers to X<T>::<Kind>::KnownValue) to its instantiation (X<int>::<Kind>::KnownValue). `FindInstantiatedDecl` performs this mapping from within the instantiation of X<int>.

Definition at line 5587 of file SemaTemplateInstantiateDecl.cpp.

References clang::TemplateArgumentListInfo::addArgument(), Diag(), clang::DeclContext::Equals(), clang::Type::getAsCXXRecordDecl(), clang::ClassTemplateDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::MultiLevelTemplateArgumentList::getInnermost(), clang::DeclContext::getParent(), clang::TemplateDecl::getTemplateParameters(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), isInstantiationOf(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::TemplateArgument::Pack, clang::TemplateParameterList::size(), and clang::TSK_ExplicitSpecialization.

Referenced by clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::SubstDefaultedFunction(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

## ◆ findLocallyScopedExternCDecl()

NamedDecl * Sema::findLocallyScopedExternCDecl | ( | DeclarationName | Name | ) |

Look for a locally scoped extern "C" declaration by the given name.

Definition at line 5889 of file SemaDecl.cpp.

## ◆ findMacroSpelling()

bool Sema::findMacroSpelling | ( | SourceLocation & | locref,
|  | StringRef | name
| ) |  |

Looks through the macro-expansion chain for the given location, looking for a macro expansion with the given name.

If one is found, returns true and sets the location to that expansion loc.

Definition at line 1624 of file Sema.cpp.

References clang::SourceManager::getExpansionLoc(), getPreprocessor(), getSourceManager(), and clang::SourceLocation::isMacroID().

Referenced by diagnoseZeroToNullptrConversion().

## ◆ FindProtocolDeclaration()

void Sema::FindProtocolDeclaration | ( | bool | WarnOnDeclarations,
|  | bool | ForObjCContainer,
|  | ArrayRef< IdentifierLocPair > | ProtocolId,
|  | SmallVectorImpl< Decl *> & | Protocols
| ) |  |

FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declared.

It returns list of protocol declarations in its 'Protocols' argument.

Definition at line 1293 of file SemaDeclObjC.cpp.

References Context, CorrectTypo(), CTK_ErrorRecovery, Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::TypoCorrection::getCorrectionDeclAs(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), clang::ObjCProtocolDecl::isThisDeclarationADefinition(), LookupObjCProtocolName, LookupOrdinaryName, LookupProtocol(), NestedProtocolHasNoDefinition(), PDiag(), and TUScope.

## ◆ FindUsualDeallocationFunction()

FunctionDecl * Sema::FindUsualDeallocationFunction | ( | SourceLocation | StartLoc,
|  | bool | CanProvideSize,
|  | bool | Overaligned,
|  | DeclarationName | Name
| ) |  |

Definition at line 2853 of file SemaExprCXX.cpp.

Referenced by ActOnCXXDelete().

## ◆ FinishCXXForRangeStmt()

StmtResult Sema::FinishCXXForRangeStmt | ( | Stmt * | S,
|  | Stmt * | B
| ) |  |

FinishCXXForRangeStmt - Attach the body to a C++0x for-range statement.

This is a separate step from ActOnCXXForRangeStmt because analysis of the body cannot be performed until after the type of the range variable is determined.

Definition at line 2881 of file SemaStmt.cpp.

## ◆ finishLambdaExplicitCaptures()

void Sema::finishLambdaExplicitCaptures | ( | sema::LambdaScopeInfo * | LSI | ) |

Note that we have finished the explicit captures for the given lambda.

Definition at line 517 of file SemaLambda.cpp.

References clang::sema::LambdaScopeInfo::finishedExplicitCaptures().

## ◆ FinishObjCForCollectionStmt()

StmtResult Sema::FinishObjCForCollectionStmt | ( | Stmt * | S,
|  | Stmt * | B
| ) |  |

FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.

Definition at line 2691 of file SemaStmt.cpp.

## ◆ FinishTemplateArgumentDeduction()

Sema::TemplateDeductionResult Sema::FinishTemplateArgumentDeduction | ( | FunctionTemplateDecl * | FunctionTemplate,
|  | SmallVectorImpl< DeducedTemplateArgument > & | Deduced,
|  | unsigned | NumExplicitlySpecified,
|  | FunctionDecl *& | Specialization,
|  | sema::TemplateDeductionInfo & | Info,
|  | SmallVectorImpl< OriginalCallArg > const * | OriginalCallArgs = `nullptr`,
|  | bool | PartialOverloading = `false`,
|  | llvm::function_ref< bool()> | CheckNonDependent = `[]{ return false; }`
| ) |  |

Finish template argument deduction for a function template, checking the deduced template arguments for completeness and forming the function template specialization.

Parameters

  OriginalCallArgs | If non-NULL, the original call arguments against which the deduced argument types should be compared.

Definition at line 3373 of file SemaTemplateDeduction.cpp.

References clang::sema::TemplateDeductionInfo::getLocation(), clang::FunctionTemplateDecl::getTemplatedDecl(), and Unevaluated.

## ◆ FixOverloadedFunctionReference() [1/2]

Expr * Sema::FixOverloadedFunctionReference | ( | Expr * | E,
|  | DeclAccessPair | Found,
|  | FunctionDecl * | Fn
| ) |  |

FixOverloadedFunctionReference - E is an expression that refers to a C++ overloaded function (possibly with some parentheses and perhaps a '&' around it).

We have resolved the overloaded function to the function declaration Fn, so patch up the expression E to refer (possibly indirectly) to Fn. Returns the new expr.

Definition at line 14593 of file SemaOverload.cpp.

Referenced by DiagnoseBadFunctionCast(), FinishOverloadedCallExpr(), IsStandardConversion(), clang::InitializationSequence::Perform(), and PerformImplicitConversion().

## ◆ FixOverloadedFunctionReference() [2/2]

ExprResult Sema::FixOverloadedFunctionReference | ( | ExprResult | E,
|  | DeclAccessPair | FoundDecl,
|  | FunctionDecl * | Fn
| ) |  |

Definition at line 14759 of file SemaOverload.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get().

## ◆ ForceDeclarationOfImplicitMembers()

void Sema::ForceDeclarationOfImplicitMembers | ( | CXXRecordDecl * | Class | ) |

Force the declaration of any implicitly-declared members of this class.

Definition at line 918 of file SemaLookup.cpp.

References CanDeclareSpecialMemberFunction(), clang::CXXRecordDecl::needsImplicitCopyAssignment(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), clang::CXXRecordDecl::needsImplicitDestructor(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), and clang::CXXRecordDecl::needsImplicitMoveConstructor().

## ◆ forceUnknownAnyToType()

ExprResult Sema::forceUnknownAnyToType | ( | Expr * | E,
|  | QualType | ToType
| ) |  |

Force an expression with unknown-type to an expression of the given type.

Definition at line 17917 of file SemaExpr.cpp.

Referenced by ActOnFinishFullExpr().

## ◆ FormatStringHasSArg()

bool Sema::FormatStringHasSArg | ( | const StringLiteral * | FExpr | ) |

Definition at line 8963 of file SemaChecking.cpp.

References clang::StringLiteral::getString().

Referenced by DiagnoseCStringFormatDirectiveInCFAPI(), and DiagnoseCStringFormatDirectiveInObjCAPI().

## ◆ forRedeclarationInCurContext()

RedeclarationKind clang::Sema::forRedeclarationInCurContext | ( |  | ) |
| inline

Definition at line 3495 of file Sema.h.

Referenced by ActOnCompatibilityAlias(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnStartClassImplementation(), ActOnStartProtocolInterface(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ FreePackedContext()

void clang::Sema::FreePackedContext | ( |  | ) |

FreePackedContext - Deallocate and null out PackContext.

## ◆ FreeVisContext()

void Sema::FreeVisContext | ( |  | ) |

FreeVisContext - Deallocate and null out VisContext.

Definition at line 900 of file SemaAttr.cpp.

References VisContext.

Referenced by ~Sema().

## ◆ FunctionParamTypesAreEqual()

bool Sema::FunctionParamTypesAreEqual | ( | const FunctionProtoType * | OldType,
|  | const FunctionProtoType * | NewType,
|  | unsigned * | ArgPos = `nullptr`
| ) |  |

FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their argument types.

Caller has already checked that they have same number of arguments. If the parameters are different, ArgPos will have the parameter index of the first different parameter.

Definition at line 2945 of file SemaOverload.cpp.

References clang::FunctionProtoType::param_type_begin(), and clang::FunctionProtoType::param_type_end().

## ◆ GatherArgumentsForCall()

bool Sema::GatherArgumentsForCall | ( | SourceLocation | CallLoc,
|  | FunctionDecl * | FDecl,
|  | const FunctionProtoType * | Proto,
|  | unsigned | FirstParam,
|  | ArrayRef< Expr *> | Args,
|  | SmallVectorImpl< Expr *> & | AllArgs,
|  | VariadicCallType | CallType = `VariadicDoesNotApply`,
|  | bool | AllowExplicit = `false`,
|  | bool | IsListInitialization = `false`
| ) |  |

GatherArgumentsForCall - Collector argument expressions for various form of call prototypes.

Definition at line 5264 of file SemaExpr.cpp.

References clang::Stmt::getBeginLoc(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionProtoType::getParamType(), and clang::Expr::getType().

## ◆ GatherGlobalCodeCompletions()

void Sema::GatherGlobalCodeCompletions | ( | CodeCompletionAllocator & | Allocator,
|  | CodeCompletionTUInfo & | CCTUInfo,
|  | SmallVectorImpl< CodeCompletionResult > & | Results
| ) |  |

Definition at line 8817 of file SemaCodeComplete.cpp.

## ◆ getAmbiguousPathsDisplayString()

std::string Sema::getAmbiguousPathsDisplayString | ( | CXXBasePaths & | Paths | ) |

Builds a string representing ambiguous paths from a specific derived class to different subobjects of the same base class.

This function builds a string that can be used in error messages to show the different paths that one can take through the inheritance hierarchy to go from the derived class to different subobjects of a base class. The result looks something like this:

struct D -> struct B -> struct A
struct D -> struct C -> struct A

Definition at line 2933 of file SemaDeclCXX.cpp.

## ◆ getASTConsumer()

ASTConsumer& clang::Sema::getASTConsumer | ( |  | ) | const
| inline

Definition at line 1332 of file Sema.h.

Referenced by getASTMutationListener().

## ◆ getASTContext()

ASTContext& clang::Sema::getASTContext | ( |  | ) | const
| inline

Definition at line 1331 of file Sema.h.

Referenced by AnalyzeCompoundAssignment(), assignInheritanceModel(), buildCapture(), buildCaptureDecl(), canPassInRegisters(), checkArrayExpressionDoesNotReferToUnitySize(), checkArrayExpressionDoesNotReferToWholeSize(), CheckBuiltinTargetSupport(), checkFormatStringExpr(), CheckImplicitConversion(), checkMapClauseExpressionBase(), checkMappableExpressionList(), checkObjCMethodX86VectorTypes(), checkOpenMPLoop(), CollectStmtSequenceData(), DiagnoseBinOpPrecedence(), DiagnoseCallingConvCast(), DiagnoseNarrowingInInitList(), diagnoseObjCLiteralComparison(), diagnoseRepeatedUseOfWeak(), diagnoseStringPlusChar(), diagnoseUnavailableAlignedAllocation(), EvaluateBinaryTypeTrait(), EvaluatesAsFalse(), EvaluatesAsTrue(), hasNewExtendedAlignment(), IsCommonTypo(), IsStandardConversion(), IsZeroInitializer(), clang::Parser::ParseFirstTopLevelDecl(), parseOpenMPReductionId(), clang::Parser::ParseTopLevelDecl(), reportOriginalDsa(), setPrototype(), and TryAddressSpaceCast().

## ◆ getAsTemplateNameDecl()

NamedDecl * Sema::getAsTemplateNameDecl | ( | NamedDecl * | D,
|  | bool | AllowFunctionTemplates = `true`,
|  | bool | AllowDependent = `true`
| ) |  |

Try to interpret the lookup result D as a template-name.

Determine whether the declaration found is acceptable as the name of a template and, if so, return that template declaration.

Parameters

  D | A declaration found by name lookup.
  AllowFunctionTemplates | Whether function templates should be considered valid results.
  AllowDependent | Whether unresolved using declarations (that might name templates) should be considered valid results.

Otherwise, returns null.

Note that this may return an UnresolvedUsingValueDecl if AllowDependent is true. In all other cases it will return a TemplateDecl (or null).

Definition at line 55 of file SemaTemplate.cpp.

References clang::NamedDecl::getUnderlyingDecl().

## ◆ getASTMutationListener()

ASTMutationListener * Sema::getASTMutationListener | ( |  | ) | const

Definition at line 453 of file Sema.cpp.

References getASTConsumer(), and clang::ASTConsumer::GetASTMutationListener().

Referenced by InstantiateInClassInitializer(), and UpdateExceptionSpec().

## ◆ getCallingConvAttributedType()

const AttributedType * Sema::getCallingConvAttributedType | ( | QualType | T | ) | const

Get the outermost AttributedType node that sets a calling convention.

Valid types should not have multiple attributes with different CCs.

Definition at line 3044 of file SemaDecl.cpp.

References clang::Type::getAs(), clang::AttributedType::getModifiedType(), and clang::AttributedType::isCallingConv().

Referenced by handleFunctionTypeAttr().

## ◆ getCapturedDeclRefType()

QualType Sema::getCapturedDeclRefType | ( | VarDecl * | Var,
|  | SourceLocation | Loc
| ) |  |

Given a variable, determine the type that a reference to that variable will have in the given scope.

Definition at line 16394 of file SemaExpr.cpp.

Referenced by getDecltypeForExpr().

## ◆ getConstructorName()

ParsedType Sema::getConstructorName | ( | IdentifierInfo & | II,
|  | SourceLocation | NameLoc,
|  | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | bool | EnteringContext
| ) |  |

Definition at line 83 of file SemaExprCXX.cpp.

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ getContainingDC()

DeclContext * Sema::getContainingDC | ( | DeclContext * | DC | ) |

Definition at line 1261 of file SemaDecl.cpp.

References clang::DeclContext::getLexicalParent(), and clang::isLambdaCallOperator().

## ◆ getCopyElisionCandidate()

VarDecl * Sema::getCopyElisionCandidate | ( | QualType | ReturnType,
|  | Expr * | E,
|  | CopyElisionSemanticsKind | CESK
| ) |  |

Determine whether the given expression is a candidate for copy elision in either a return statement or a throw expression.

Parameters

  ReturnType | If we're determining the copy elision candidate for a return statement, this is the return type of the function. If we're determining the copy elision candidate for a throw expression, this will be a NULL type.
  E | The expression being returned from the function or block, or being thrown.
  CESK | Whether we allow function parameters or id-expressions that could be moved out of the function to be considered NRVO candidates. C++ prohibits these for NRVO itself, but we re-use this logic to determine whether we should try to move as part of a return or throw (which does allow function parameters).

Returns
  The NRVO candidate variable, if the return statement may use the NRVO, or NULL if there is no such candidate.

Definition at line 2988 of file SemaStmt.cpp.

References clang::DeclRefExpr::getDecl(), clang::Expr::IgnoreParens(), and clang::DeclRefExpr::refersToEnclosingVariableOrCapture().

## ◆ getCudaConfigureFuncName()

std::string Sema::getCudaConfigureFuncName | ( |  | ) | const

Returns the name of the launch configuration function.

This is the name of the function that will be called to configure kernel call, with the parameters specified via <<<>>>.

Definition at line 795 of file SemaCUDA.cpp.

References Context, clang::CUDA_USES_NEW_LAUNCH, clang::CudaFeatureEnabled(), getLangOpts(), clang::TargetInfo::getSDKVersion(), clang::ASTContext::getTargetInfo(), and clang::HIP.

## ◆ getCurBlock()

BlockScopeInfo * Sema::getCurBlock | ( |  | ) |

Retrieve the current block, if any.

Definition at line 1839 of file Sema.cpp.

References CodeSynthesisContexts, CurContext, and FunctionScopes.

Referenced by AddKeywordsToConsumer(), and checkDeclInTargetContext().

## ◆ getCurCapturedRegion()

CapturedRegionScopeInfo * Sema::getCurCapturedRegion | ( |  | ) |

Retrieve the current captured region, if any.

Definition at line 2214 of file Sema.cpp.

References FunctionScopes.

Referenced by checkDeclInTargetContext().

## ◆ getCurCompoundScope()

sema::CompoundScopeInfo & Sema::getCurCompoundScope | ( |  | ) | const

Definition at line 384 of file SemaStmt.cpp.

## ◆ getCurFunction()

sema::FunctionScopeInfo* clang::Sema::getCurFunction | ( |  | ) | const
| inline

Definition at line 1493 of file Sema.h.

Referenced by ActOnStartOfObjCMethodDef(), AddKeywordsToConsumer(), hasAnyUnrecoverableErrorsInThisFunction(), LookupMemberExpr(), LookupMethodInReceiverType(), PopCompoundScope(), PushCompoundScope(), and RecordModifiableNonNullParam().

## ◆ getCurFunctionDecl()

FunctionDecl * Sema::getCurFunctionDecl | ( |  | ) |

getCurFunctionDecl - If inside of a function body, this returns a pointer to the function decl for the function being parsed.

If we're currently in a 'block', this returns the containing context.

Definition at line 1304 of file Sema.cpp.

References getFunctionLevelDeclContext().

Referenced by checkVAStartABI(), LookupMemberExpr(), and targetDiag().

## ◆ getCurFunctionOrMethodDecl()

NamedDecl * Sema::getCurFunctionOrMethodDecl | ( |  | ) |

getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method or C function we're in, otherwise return null.

If we're currently in a 'block', this returns the containing context.

Definition at line 1316 of file Sema.cpp.

References getFunctionLevelDeclContext().

Referenced by AddKeywordsToConsumer().

## ◆ getCurGenericLambda()

LambdaScopeInfo * Sema::getCurGenericLambda | ( |  | ) |

Retrieve the current generic lambda info, if any.

Definition at line 1907 of file Sema.cpp.

References getCurLambda().

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ getCurLambda()

LambdaScopeInfo * Sema::getCurLambda | ( | bool | IgnoreNonLambdaCapturingScope = `false` | ) |

Retrieve the current lambda scope info, if any.

Parameters

  IgnoreNonLambdaCapturingScope | true if should find the top-most lambda scope info ignoring all inner capturing scopes that are not lambda scopes.

Definition at line 1882 of file Sema.cpp.

References CodeSynthesisContexts, CurContext, and FunctionScopes.

Referenced by ActOnFinishFullExpr(), checkDeclInTargetContext(), DoMarkVarDeclReferenced(), getCurGenericLambda(), GetDeclSpecTypeForDeclarator(), getDecltypeForExpr(), RecordParsingTemplateParameterDepth(), and tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs().

## ◆ getCurLexicalContext()

DeclContext* clang::Sema::getCurLexicalContext | ( |  | ) | const
| inline

Definition at line 11915 of file Sema.h.

Referenced by CheckObjCDeclScope(), EndOpenMPDSABlock(), and LookupMethodInReceiverType().

## ◆ getCurMethodDecl()

ObjCMethodDecl * Sema::getCurMethodDecl | ( |  | ) |

getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the method being parsed.

If we're currently in a 'block', this returns the containing context.

Definition at line 1309 of file Sema.cpp.

References getFunctionLevelDeclContext(), and clang::DeclContext::getParent().

Referenced by ActOnStartOfObjCMethodDef(), AddClassMessageCompletions(), AddSuperSendCompletion(), CheckForModifiableLvalue(), findRetainCycleOwner(), LookupMemberExpr(), and LookupPotentialTypoResult().

## ◆ getCurObjCLexicalContext()

const DeclContext* clang::Sema::getCurObjCLexicalContext | ( |  | ) | const
| inline

Definition at line 11919 of file Sema.h.

## ◆ getCurrentClass()

CXXRecordDecl * Sema::getCurrentClass | ( | Scope * | S,
|  | const CXXScopeSpec * | SS
| ) |  |

Get the class that is directly named by the current context.

This is the class for which an unqualified-id in this scope could name a constructor or destructor.

If the scope specifier denotes a class, this will be that class. If the scope specifier is empty, this will be the class whose member-specification we are currently within. Otherwise, there is no such class.

Definition at line 2327 of file SemaDeclCXX.cpp.

References clang::CPlusPlus, clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isNotEmpty().

## ◆ getCurrentInstantiationOf()

CXXRecordDecl * Sema::getCurrentInstantiationOf | ( | NestedNameSpecifier * | NNS | ) |

If the given nested name specifier refers to the current instantiation, return the declaration that corresponds to that current instantiation (C++0x [temp.dep.type]p1).

Parameters

  NNS | a dependent nested name specifier.

Definition at line 179 of file SemaCXXScopeSpec.cpp.

References clang::CPlusPlus, CurContext, clang::NestedNameSpecifier::getAsType(), getCurrentInstantiationOf(), getLangOpts(), and clang::NestedNameSpecifier::isDependent().

Referenced by computeDeclContext().

## ◆ getCurrentMangleNumberContext()

std::tuple< MangleNumberingContext *, Decl * > Sema::getCurrentMangleNumberContext | ( | const DeclContext * | DC | ) |

Compute the mangling number context for a lambda expression or block literal.

Also return the extra mangling decl if any.

Parameters

  DC | - The DeclContext containing the lambda expression or block literal.

Definition at line 276 of file SemaLambda.cpp.

References ContextKind, clang::DeclContext::getLexicalParent(), clang::DeclContext::getParent(), isInInlineFunction(), and clang::Normal.

## ◆ getCurrentOpenCLExtension()

llvm::StringRef clang::Sema::getCurrentOpenCLExtension | ( |  | ) | const
| inline

Definition at line 9546 of file Sema.h.

## ◆ getCurrentThisType()

QualType Sema::getCurrentThisType | ( |  | ) |

Try to retrieve the type of the 'this' pointer.

Returns
  The type of 'this', if possible. Otherwise, returns a NULL type.

Definition at line 1082 of file SemaExprCXX.cpp.

References clang::isLambdaCallOperator(), and clang::QualType::isNull().

Referenced by ActOnCXXThis(), and CheckCXXThisCapture().

## ◆ getCurScope()

Scope* clang::Sema::getCurScope | ( |  | ) | const
| inline

Retrieve the parser's current scope.

This routine must only be used when it is certain that semantic analysis and the parser are in precisely the same context, which is not the case when, e.g., we are performing any kind of template instantiation. Therefore, the only safe places to use this scope are in the parser itself and in routines directly invoked from the parser and never from template substitution or instantiation.

Definition at line 11904 of file Sema.h.

Referenced by BuildNonArrayForRange(), checkMappableExpressionList(), diagReturnOnAllocFailure(), emitReplacement(), EndOpenMPDSABlock(), clang::Parser::getCurScope(), GetDeclSpecTypeForDeclarator(), getScopeForContext(), HandleAddressSpaceTypeAttribute(), HandleExtVectorTypeAttr(), HandleVectorSizeAttr(), isArithmeticArgumentPromotion(), and warnAboutRedundantParens().

## ◆ getDefaultCXXMethodAddrSpace()

LangAS Sema::getDefaultCXXMethodAddrSpace | ( |  | ) | const

Returns default addr space for method qualifiers.

Definition at line 1323 of file Sema.cpp.

References clang::Default, getLangOpts(), clang::OpenCL, and clang::opencl_generic.

## ◆ getDefaultedComparisonKind()

DefaultedComparisonKind clang::Sema::getDefaultedComparisonKind | ( | const FunctionDecl * | FD | ) |
| inline

Definition at line 2651 of file Sema.h.

References clang::Sema::DefaultedFunctionKind::asComparison().

## ◆ getDefaultedFunctionKind()

Sema::DefaultedFunctionKind Sema::getDefaultedFunctionKind | ( | const FunctionDecl * | FD | ) |

Determine the kind of defaulting that would be done for a given function.

If the function is both a default constructor and a copy / move constructor (due to having a default argument for the first parameter), this picks CXXDefaultConstructor.

FIXME: Check that case is properly handled by all callers.

Definition at line 6122 of file SemaDeclCXX.cpp.

References CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXMoveAssignment, CXXMoveConstructor, clang::Equal, clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), and clang::prec::Relational.

Referenced by computeImplicitExceptionSpec().

## ◆ getDestructorName()

ParsedType Sema::getDestructorName | ( | SourceLocation | TildeLoc,
|  | IdentifierInfo & | II,
|  | SourceLocation | NameLoc,
|  | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | ParsedType | ObjectType,
|  | bool | EnteringContext
| ) |  |

Definition at line 133 of file SemaExprCXX.cpp.

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ getDestructorTypeForDecltype()

ParsedType Sema::getDestructorTypeForDecltype | ( | const DeclSpec & | DS,
|  | ParsedType | ObjectType
| ) |  |

Definition at line 380 of file SemaExprCXX.cpp.

References Diag(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::DeclSpec::TST_decltype, clang::DeclSpec::TST_decltype_auto, and clang::DeclSpec::TST_error.

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ getDiagnostics()

DiagnosticsEngine& clang::Sema::getDiagnostics | ( |  | ) | const
| inline

Definition at line 1328 of file Sema.h.

Referenced by clang::sema::AnalysisBasedWarnings::AnalysisBasedWarnings(), CheckCommaOperands(), CheckFallThroughForBody(), checkMoreSpecializedThanPrimary(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), PushBlockScope(), PushCapturedRegionScope(), PushFunctionScope(), PushLambdaScope(), clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl(), clang::Sema::DeviceDiagBuilder::~DeviceDiagBuilder(), and clang::Sema::SFINAETrap::~SFINAETrap().

## ◆ getElaboratedType()

QualType Sema::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.

Definition at line 8371 of file SemaType.cpp.

References clang::ETK_None, clang::CXXScopeSpec::getScopeRep(), clang::QualType::isNull(), and clang::CXXScopeSpec::isValid().

## ◆ getEmissionStatus()

Sema::FunctionEmissionStatus Sema::getEmissionStatus | ( | FunctionDecl * | Decl | ) |

Definition at line 17809 of file SemaDecl.cpp.

References CFT_Device, CFT_Global, CFT_Host, clang::FunctionDecl::getCanonicalDecl(), clang::FunctionDecl::getDefinition(), clang::DeclContext::isDependentContext(), clang::isDiscardableGVALinkage(), and clang::Unknown.

Referenced by CheckCUDACall(), CUDADiagIfDeviceCode(), and CUDADiagIfHostCode().

## ◆ getEnclosingFunction()

FunctionScopeInfo * Sema::getEnclosingFunction | ( |  | ) | const

Definition at line 1854 of file Sema.cpp.

References FunctionScopes.

## ◆ getEnclosingLambda()

LambdaScopeInfo * Sema::getEnclosingLambda | ( |  | ) | const

Get the innermost lambda enclosing the current location, if any.

This looks through intervening non-lambda scopes such as local functions and blocks.

Definition at line 1866 of file Sema.cpp.

References CodeSynthesisContexts, CurContext, and FunctionScopes.

## ◆ getExprRange()

SourceRange Sema::getExprRange | ( | Expr * | E | ) | const

Definition at line 463 of file SemaExpr.cpp.

References clang::Stmt::getSourceRange().

Referenced by clang::Parser::ParseConstraintLogicalOrExpression().

## ◆ getExternalSource()

ExternalSemaSource* clang::Sema::getExternalSource | ( |  | ) | const
| inline

Definition at line 1334 of file Sema.h.

References clang::runWithSufficientStackSpace().

Referenced by AddClassMessageCompletions().

## ◆ getFixItZeroInitializerForType()

std::string Sema::getFixItZeroInitializerForType | ( | QualType | T,
|  | SourceLocation | Loc
| ) |  | const

Get a string to suggest for zero-initialization of a type.

Definition at line 200 of file SemaFixItUtils.cpp.

References clang::Type::getAsCXXRecordDecl(), getScalarZeroExpressionForType(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::hasUserProvidedDefaultConstructor(), clang::CXXRecordDecl::isAggregate(), and clang::Type::isScalarType().

Referenced by maybeRecoverWithZeroInitialization(), and SuggestInitializationFixit().

## ◆ getFixItZeroLiteralForType()

std::string Sema::getFixItZeroLiteralForType | ( | QualType | T,
|  | SourceLocation | Loc
| ) |  | const

Definition at line 219 of file SemaFixItUtils.cpp.

References getScalarZeroExpressionForType().

Referenced by DiagnoseNullConversion().

## ◆ getFloat128Identifier()

IdentifierInfo * Sema::getFloat128Identifier | ( |  | ) | const

Definition at line 2197 of file Sema.cpp.

References Context, clang::IdentifierTable::get(), and clang::ASTContext::Idents.

## ◆ GetFormatNSStringIdx()

bool Sema::GetFormatNSStringIdx | ( | const FormatAttr * | Format,
|  | unsigned & | Idx
| ) |  |
| static

Definition at line 4265 of file SemaChecking.cpp.

Referenced by DiagnoseCStringFormatDirectiveInCFAPI(), and DiagnoseCStringFormatDirectiveInObjCAPI().

## ◆ GetFormatStringType()

Sema::FormatStringType Sema::GetFormatStringType | ( | const FormatAttr * | Format | ) |
| static

Definition at line 7220 of file SemaChecking.cpp.

References checkFormatStringExpr(), clang::FixItHint::CreateInsertion(), Diag(), and clang::Stmt::getSourceRange().

Referenced by checkFormatStringExpr().

## ◆ getFPOptions()

FPOptions& clang::Sema::getFPOptions | ( |  | ) |
| inline

Definition at line 1326 of file Sema.h.

## ◆ getFullyPackExpandedSize()

Optional< unsigned > Sema::getFullyPackExpandedSize | ( | TemplateArgument | Arg | ) |

Given a template argument that contains an unexpanded parameter pack, but which has already been substituted, attempt to determine the number of elements that will be produced once this argument is fully-expanded.

This is intended for use when transforming 'sizeof...(Arg)' in order to avoid actually expanding the pack where possible.

Definition at line 1088 of file SemaTemplateVariadic.cpp.

References clang::TemplateArgument::containsUnexpandedParameterPack(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::Type::getAs(), clang::TemplateArgument::getAsExpr(), clang::TemplateName::getAsSubstTemplateTemplateParmPack(), clang::TemplateArgument::getAsTemplate(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::Integral, clang::None, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_elements(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

## ◆ getFunctionLevelDeclContext()

DeclContext * Sema::getFunctionLevelDeclContext | ( |  | ) |

Definition at line 1283 of file Sema.cpp.

References CurContext, and clang::DeclContext::getParent().

Referenced by ClassifyImplicitMemberAccess(), DiagnoseConstAssignment(), diagnoseInstanceReference(), getCurFunctionDecl(), getCurFunctionOrMethodDecl(), and getCurMethodDecl().

## ◆ getIdentityTemplateArgumentLoc()

TemplateArgumentLoc Sema::getIdentityTemplateArgumentLoc | ( | Decl * | Param,
|  | SourceLocation | Location
| ) |  |

Get a template argument mapping the given template parameter to itself, e.g.

for X in `template<int X>`, this would return an expression template argument referencing X.

Definition at line 2517 of file SemaTemplateDeduction.cpp.

## ◆ getImplicitCodeSegOrSectionAttrForFunction()

Attr * Sema::getImplicitCodeSegOrSectionAttrForFunction | ( | const FunctionDecl * | FD,
|  | bool | IsDefinition
| ) |  |

Returns an implicit CodeSegAttr if a __declspec(code_seg) is found on a containing class.

Otherwise it will return implicit SectionAttr if the function is a definition and there is an active value on CodeSegStack (from the current #pragma code-seg value).

Parameters

  FD | Function being declared.
  IsDefinition | Whether it is a definition or just a declarartion.

Returns
  A CodeSegAttr or SectionAttr to apply to the function or nullptr if no attribute should be added.

Definition at line 9713 of file SemaDecl.cpp.

References clang::AttributeCommonInfo::AS_Pragma, getImplicitCodeSegAttrFromClass(), and clang::Decl::hasAttr().

## ◆ getInheritingConstructorName()

ParsedType Sema::getInheritingConstructorName | ( | CXXScopeSpec & | SS,
|  | SourceLocation | NameLoc,
|  | IdentifierInfo & | Name
| ) |  |

Handle the result of the special case name lookup for inheriting constructor declarations.

'NS::X::X' and 'NS::X<...>::X' are treated as constructor names in member using declarations, even if 'X' is not the name of the corresponding type.

Definition at line 49 of file SemaExprCXX.cpp.

## ◆ GetIvarBackingPropertyAccessor()

ObjCIvarDecl * Sema::GetIvarBackingPropertyAccessor | ( | 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.

It also returns ivar's property on success.

Definition at line 5160 of file SemaDeclObjC.cpp.

References clang::ObjCMethodDecl::findPropertyDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCPropertyDecl::getPropertyIvarDecl(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isPropertyAccessor(), and clang::ObjCInterfaceDecl::lookupMethod().

## ◆ getLambdaConversionFunctionResultType()

QualType Sema::getLambdaConversionFunctionResultType | ( | const FunctionProtoType * | CallOpType | ) |

Get the return type to use for a lambda's conversion function(s) to function pointer type, given the type of the call operator.

Definition at line 1263 of file SemaLambda.cpp.

References clang::FunctionProtoType::getExtProtoInfo().

## ◆ getLangOpts()

const LangOptions& clang::Sema::getLangOpts | ( |  | ) | const
| inline

Definition at line 1324 of file Sema.h.

Referenced by ActOnCXXDelete(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnDecltypeExpression(), ActOnEndOfTranslationUnit(), ActOnFinishFullExpr(), ActOnStartOfObjCMethodDef(), ActOnStartOfTranslationUnit(), ActOnStartProtocolInterface(), AddCFAuditedAttribute(), addFixitForObjCARCConversion(), AddKeywordsToConsumer(), AddMsStructLayoutForRecord(), AddRecordMembersCompletionResults(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeImplicitConversions(), AtomicPropertySetterGetterRules(), buildCapture(), buildCaptureDecl(), buildDeclareReductionRef(), BuildObjCExceptionDecl(), BuildOverloadedBinOp(), BuildPseudoDestructorExpr(), buildUserDefinedMapperRef(), clang::canCalleeThrow(), canPassInRegisters(), CheckAllocatedType(), checkArithmeticBinOpPointerOperands(), checkArithmeticOpPointerOperand(), checkBlockPointerTypesForAssignment(), CheckBoolLikeConversion(), CheckCommaOperands(), checkCondition(), checkConditionalPointerCompatibility(), CheckConstexprCtorInitializer(), CheckConstexprDeclStmt(), CheckConstexprFunctionBody(), CheckConvertedConstantExpression(), CheckCUDACall(), checkCUDATargetOverload(), CheckCXX98CompatAccessibleCopy(), CheckDistantExceptionSpec(), checkEnumArithmeticConversions(), CheckEquivalentExceptionSpec(), clang::CheckEquivalentExceptionSpecImpl(), CheckExceptionSpecCompatibility(), CheckExceptionSpecSubset(), CheckExplicitInstantiationScope(), CheckFormatString(), CheckForModifiableLvalue(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckKeyForObjCARCConversion(), CheckMemaccessSize(), CheckObjCCollectionLiteralElement(), CheckObjCMethodOverride(), checkObjCPointerIntrospection(), CheckObjCPropertyAttributes(), checkOpenMPLoop(), CheckOperatorNewDeleteTypes(), CheckOverridingFunctionExceptionSpec(), CheckPointerToMemberOperands(), checkPointerTypesForAssignment(), CheckSpecifiedExceptionType(), CheckTautologicalComparison(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), CheckTemplateSpecializationScope(), ClassifyImplicitMemberAccess(), clang::Sema::InstantiatingTemplate::Clear(), compareConversionFunctions(), CompareImplicitConversionSequences(), compareOverloads(), CompareStandardConversionSequences(), completeFunctionType(), CorrectDelayedTyposInBinOp(), CUDADiagIfDeviceCode(), CUDADiagIfHostCode(), CUDASetLambdaAttrs(), DeclareGlobalNewDelete(), DeduceNonTypeTemplateArgument(), defaultedSpecialMemberIsConstexpr(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnNullPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), DiagnoseBadFunctionCast(), DiagnoseBadShiftValues(), DiagnoseCallingConvCast(), diagnoseDeprecatedCopyOperation(), diagnoseListInit(), DiagnoseMismatchedNewDelete(), DiagnoseMultipleMethodInGlobalPool(), DiagnoseNarrowingInInitList(), DiagnoseNullConversion(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseReinterpretUpDownCast(), diagnoseTautologicalComparison(), diagnoseXorMisusedAsPow(), diagnoseZeroToNullptrConversion(), diagReturnOnAllocFailure(), DiagUninitUse(), EmitCurrentDiagnostic(), EmitDiagForCXXThrowInNonThrowingFunc(), emitReplacement(), clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext(), FindAllocationFunctions(), FindCompositePointerType(), FinishForRangeVarDecl(), clang::FunctionCallFilterCCC::FunctionCallFilterCCC(), getCastAwayConstnessCastKind(), getCCForDeclaratorChunk(), getCudaConfigureFuncName(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), getDefaultCXXMethodAddrSpace(), GetTypeOfFunction(), getUDSuffixLoc(), handleFunctionTypeAttr(), handleObjCOwnershipTypeAttr(), hasNewExtendedAlignment(), IdentifyCUDAPreference(), IgnoredValueConversions(), ImpCastExprToType(), clang::Sema::ImplicitExceptionSpecification::ImplicitExceptionSpecification(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), Initialize(), clang::InitializationSequence::InitializeFrom(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), IsCXX98CompatWarning(), IsEnumConstOrFromMacro(), isExternalWithNoLinkageType(), isLibstdcxxPointerReturnFalseHack(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isObjCReceiverType(), isObjCSignedCharBool(), isResultTypeOrTemplate(), IsStandardConversion(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), isUnavailableAlignedAllocationFunction(), isUsualDeallocationFunction(), LookupDirect(), LookupMemberExpr(), LookupMethodInReceiverType(), MarkExprReferenced(), MatchTwoMethodDeclarations(), maybeAddCUDAHostDeviceAttrs(), MaybeBindToTemporary(), MaybeProduceObjCObject(), mergeExceptionSpecs(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), PopForceCUDAHostDevice(), ProcessPropertyDecl(), PushCapturedRegionScope(), PushForceCUDAHostDevice(), ReferenceDllExportedMembers(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), shouldIgnoreDueToReservedName(), targetDiag(), TryAddressSpaceCast(), TryConstructorInitialization(), TryDefaultInitialization(), TryImplicitConversion(), TryListInitialization(), TryNamespaceTypoCorrection(), TryOCLSamplerInitialization(), TryOCLZeroOpaqueTypeInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryReinterpretCast(), TryStaticCast(), TryUserDefinedConversion(), TryValueInitialization(), tryVectorConvertAndSplat(), clang::TemplateDeclInstantiator::VisitVarDecl(), warnAboutRedundantParens(), and WarnConflictingTypedMethods().

## ◆ getLocationOfStringLiteralByte()

SourceLocation Sema::getLocationOfStringLiteralByte | ( | const StringLiteral * | SL,
|  | unsigned | ByteNo
| ) |  | const

Definition at line 102 of file SemaChecking.cpp.

References clang::StringLiteral::getLocationOfByte().

## ◆ getLocForEndOfToken()

SourceLocation Sema::getLocForEndOfToken | ( | SourceLocation | Loc,
|  | unsigned | Offset = `0`
| ) |  |

Calls `Lexer::getLocForEndOfToken()`

Definition at line 49 of file Sema.cpp.

References clang::Lexer::getLocForEndOfToken().

Referenced by ActOnCXXDelete(), addFixitForObjCARCConversion(), AtomicPropertySetterGetterRules(), CheckEquivalentExceptionSpec(), CheckMemorySizeofForComparison(), CreateIfFixit(), diagnoseLogicalNotOnLHSofCheck(), DiagnoseMismatchedNewDelete(), DiagnoseNarrowingInInitList(), diagnoseNoViableConversion(), diagnoseObjCARCConversion(), diagnoseObjCLiteralComparison(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), diagnoseXorMisusedAsPow(), fixItNullability(), isNullPointerValueTemplateArgument(), maybeRecoverWithZeroInitialization(), SuggestInitializationFixit(), SuggestParentheses(), tryToRecoverWithCall(), and warnAboutRedundantParens().

## ◆ getLookupModules()

llvm::DenseSet< Module * > & Sema::getLookupModules | ( |  | ) |

Get the set of additional modules that should be checked during name lookup.

A module and its imports become visible when instanting a template defined within it.

Definition at line 1574 of file SemaLookup.cpp.

References getDefiningModule().

## ◆ getMessageSendResultType()

QualType Sema::getMessageSendResultType | ( | const Expr * | Receiver,
|  | QualType | ReceiverType,
|  | ObjCMethodDecl * | Method,
|  | bool | isClassMessage,
|  | bool | isSuperMessage
| ) |  |

Determine the result of a message send expression based on the type of the receiver, the method expected to receive the message, and the form of the message send.

Definition at line 1402 of file SemaExprObjC.cpp.

References getBaseMessageSendResultType(), clang::ObjCMethodDecl::getSendResultType(), clang::Type::isObjCClassType(), clang::Expr::isObjCSelfExpr(), and clang::AttributedType::stripOuterNullability().

## ◆ getMismatchingDeleteExpressions()

const llvm::MapVector< FieldDecl *, Sema::DeleteLocs > & Sema::getMismatchingDeleteExpressions | ( |  | ) | const

Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit.

Definition at line 2222 of file Sema.cpp.

References DeleteExprs.

Referenced by AddLazyVectorDecls().

## ◆ getModuleLoader()

ModuleLoader & Sema::getModuleLoader | ( |  | ) | const

Retrieve the module loader associated with the preprocessor.

Definition at line 53 of file Sema.cpp.

## ◆ getMoreSpecializedPartialSpecialization() [1/2]

ClassTemplatePartialSpecializationDecl * Sema::getMoreSpecializedPartialSpecialization | ( | ClassTemplatePartialSpecializationDecl * | PS1,
|  | ClassTemplatePartialSpecializationDecl * | PS2,
|  | SourceLocation | Loc
| ) |  |

Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]).

Parameters

  PS1 | the first class template partial specialization
  PS2 | the second class template partial specialization

Returns
  the more specialized class template partial specialization. If neither partial specialization is more specialized, returns NULL.

Definition at line 5275 of file SemaTemplateDeduction.cpp.

References clang::ClassTemplatePartialSpecializationDecl::getAssociatedConstraints(), clang::ClassTemplatePartialSpecializationDecl::getInjectedSpecializationType(), and isAtLeastAsSpecializedAs().

## ◆ getMoreSpecializedPartialSpecialization() [2/2]

VarTemplatePartialSpecializationDecl * Sema::getMoreSpecializedPartialSpecialization | ( | VarTemplatePartialSpecializationDecl * | PS1,
|  | VarTemplatePartialSpecializationDecl * | PS2,
|  | SourceLocation | Loc
| ) |  |

Definition at line 5331 of file SemaTemplateDeduction.cpp.

References clang::VarTemplateSpecializationDecl::getSpecializedTemplate().

## ◆ getMoreSpecializedTemplate()

FunctionTemplateDecl * Sema::getMoreSpecializedTemplate | ( | FunctionTemplateDecl * | FT1,
|  | FunctionTemplateDecl * | FT2,
|  | SourceLocation | Loc,
|  | TemplatePartialOrderingContext | TPOC,
|  | unsigned | NumCallArguments1,
|  | unsigned | NumCallArguments2
| ) |  |

Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]).

Parameters

  FT1 | the first function template
  FT2 | the second function template
  TPOC | the context in which we are performing partial ordering of function templates.
  NumCallArguments1 | The number of arguments in the call to FT1, used only when `TPOC` is `TPOC_Call`.
  NumCallArguments2 | The number of arguments in the call to FT2, used only when `TPOC` is `TPOC_Call`.

Returns
  the more specialized function template. If neither template is more specialized, returns NULL.

Definition at line 5051 of file SemaTemplateDeduction.cpp.

References clang::TemplateDecl::getAssociatedConstraints(), isAtLeastAsSpecializedAs(), and isVariadicFunctionTemplate().

## ◆ getMostSpecialized()

UnresolvedSetIterator Sema::getMostSpecialized | ( | UnresolvedSetIterator | SpecBegin,
|  | UnresolvedSetIterator | SpecEnd,
|  | TemplateSpecCandidateSet & | FailedCandidates,
|  | SourceLocation | Loc,
|  | const PartialDiagnostic & | NoneDiag,
|  | const PartialDiagnostic & | AmbigDiag,
|  | const PartialDiagnostic & | CandidateDiag,
|  | bool | Complain = `true`,
|  | QualType | TargetType = `QualType()`
| ) |  |

Retrieve the most specialized of the given function template specializations.

Parameters

  SpecBegin | the start iterator of the function template specializations that we will be comparing.
  SpecEnd | the end iterator of the function template specializations, paired with `SpecBegin`.
  Loc | the location where the ambiguity or no-specializations diagnostic should occur.
  NoneDiag | partial diagnostic used to diagnose cases where there are no matching candidates.
  AmbigDiag | partial diagnostic used to diagnose an ambiguity, if one occurs.
  CandidateDiag | partial diagnostic used for each function template specialization that is a candidate in the ambiguous ordering. One parameter in this diagnostic should be unbound, which will correspond to the string describing the template arguments for the function template specialization.

Returns
  the most specialized function template specialization, if found. Otherwise, returns SpecEnd.

Definition at line 5130 of file SemaTemplateDeduction.cpp.

References Diag(), clang::QualType::isNull(), isSameTemplate(), clang::TemplateSpecCandidateSet::NoteCandidates(), and clang::TPOC_Other.

## ◆ GetNameForDeclarator()

DeclarationNameInfo Sema::GetNameForDeclarator | ( | Declarator & | D | ) |

GetNameForDeclarator - Determine the full declaration name for the given Declarator.

Definition at line 5159 of file SemaDecl.cpp.

References clang::Declarator::getName().

Referenced by CreateNewFunctionDecl().

## ◆ GetNameFromUnqualifiedId()

DeclarationNameInfo Sema::GetNameFromUnqualifiedId | ( | const UnqualifiedId & | Name | ) |

Retrieves the declaration name from a parsed unqualified-id.

Definition at line 5165 of file SemaDecl.cpp.

## ◆ getNonFieldDeclScope()

Scope * Sema::getNonFieldDeclScope | ( | Scope * | S | ) |

getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared.

This routine copes with the difference between C and C++ scoping rules in structs and unions. For example, the following code is well-formed in C but ill-formed in C++:

struct S6 {
enum { BAR } e;
};
void test_S6() {
struct S6 a;
a.e = BAR;
}

For the declaration of BAR, this routine will return a different scope. The scope S will be the scope of the unnamed enumeration within S6. In C++, this routine will return the scope associated with S6, because the enumeration's scope is a transparent context but structures can contain non-field names. In C, this routine will return the translation unit scope, since the enumeration's scope is a transparent context and structures cannot contain non-field names.

Definition at line 1999 of file SemaDecl.cpp.

## ◆ getNonOdrUseReasonInCurrentContext()

NonOdrUseReason Sema::getNonOdrUseReasonInCurrentContext | ( | ValueDecl * | D | ) |

If `D` cannot be odr-used in the current expression evaluation context, return a reason explaining why.

Otherwise, return NOUR_None.

Definition at line 1887 of file SemaExpr.cpp.

References clang::NOUR_Unevaluated.

## ◆ getNonTagTypeDeclKind()

Sema::NonTagKind Sema::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.

Definition at line 14625 of file SemaDecl.cpp.

References clang::TTK_Class, clang::TTK_Enum, clang::TTK_Interface, clang::TTK_Struct, and clang::TTK_Union.

Referenced by clang::TreeTransform< Derived >::RebuildDependentNameType().

## ◆ getNormalizedAssociatedConstraints()

const NormalizedConstraint * Sema::getNormalizedAssociatedConstraints | ( | NamedDecl * | ConstrainedDecl,
|  | ArrayRef< const Expr *> | AssociatedConstraints
| ) |  |

Definition at line 612 of file SemaConcept.cpp.

Referenced by subsumes().

## ◆ getNSErrorIdent()

IdentifierInfo * Sema::getNSErrorIdent | ( |  | ) |

Retrieve the identifier "NSError".

Definition at line 3693 of file SemaType.cpp.

Referenced by classifyPointerDeclarator().

## ◆ getNullabilityKeyword()

IdentifierInfo * Sema::getNullabilityKeyword | ( | NullabilityKind | nullability | ) |

Retrieve the keyword associated.

Definition at line 3672 of file SemaType.cpp.

References clang::NonNull, clang::Nullable, and clang::Unspecified.

Referenced by clang::Parser::getNullabilityKeyword().

## ◆ getNumArgumentsInExpansion()

Optional< unsigned > Sema::getNumArgumentsInExpansion | ( | QualType | T,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Determine the number of arguments in the given pack expansion type.

This routine assumes that the number of arguments in the expansion is consistent across all of the unexpanded parameter packs in its pattern.

Returns an empty Optional if the type can't be expanded.

Definition at line 782 of file SemaTemplateVariadic.cpp.

References Depth, and clang::Result.

Referenced by getPackIndexForParam(), and clang::TemplateDeclInstantiator::SubstFunctionType().

## ◆ getObjCContainerKind()

Sema::ObjCContainerKind Sema::getObjCContainerKind | ( |  | ) | const

Definition at line 3792 of file SemaDeclObjC.cpp.

References CurContext, clang::DeclContext::getDeclKind(), OCK_Category, OCK_CategoryImplementation, OCK_ClassExtension, OCK_Implementation, OCK_Interface, OCK_None, and OCK_Protocol.

## ◆ getObjCDeclContext()

Decl * Sema::getObjCDeclContext | ( |  | ) | const

Definition at line 17805 of file SemaDecl.cpp.

Referenced by clang::Parser::getObjCDeclContext().

## ◆ getObjCInterfaceDecl()

ObjCInterfaceDecl * Sema::getObjCInterfaceDecl | ( | IdentifierInfo *& | Id,
|  | SourceLocation | IdLoc,
|  | bool | DoTypoCorrection = `false`
| ) |  |

Look for an Objective-C class in the translation unit.

Parameters

  Id | The name of the Objective-C class we're looking for. If typo-correction fixes this name, the Id will be updated to the fixed name.
  IdLoc | The location of the name in the translation unit.
  DoTypoCorrection | If true, this routine will attempt typo correction if there is no class with the given name.

Returns
  The declaration of the named Objective-C class, or NULL if the class could not be found.

Definition at line 1950 of file SemaDecl.cpp.

References clang::ObjCInterfaceDecl::getDefinition(), and clang::NamedDecl::getIdentifier().

Referenced by ActOnStartCategoryImplementation(), and ActOnStartCategoryInterface().

## ◆ getObjCMessageKind()

Sema::ObjCMessageKind Sema::getObjCMessageKind | ( | Scope * | S,
|  | IdentifierInfo * | Name,
|  | SourceLocation | NameLoc,
|  | bool | IsSuper,
|  | bool | HasTrailingDot,
|  | ParsedType & | ReceiverType
| ) |  |

Definition at line 2157 of file SemaExprObjC.cpp.

Referenced by CheckArrayDesignatorSyntax().

## ◆ getOpenCLExtensionsFromDeclExtMap()

std::string Sema::getOpenCLExtensionsFromDeclExtMap | ( | FunctionDecl * | FD | ) |

Check if a function declaration `FD` associates with any extensions present in OpenCLDeclExtMap and if so return the extension(s) name(s).

Definition at line 2257 of file Sema.cpp.

References getOpenCLExtensionsFromExtMap().

## ◆ getOpenCLExtensionsFromExtMap()

template<typename T , typename MapT >

std::string Sema::getOpenCLExtensionsFromExtMap | ( | T * | FT,
|  | MapT & | Map
| ) |  |

Find an extension in an appropriate extension map and return its name.

Definition at line 2272 of file Sema.cpp.

Referenced by getOpenCLExtensionsFromDeclExtMap(), and getOpenCLExtensionsFromTypeExtMap().

## ◆ getOpenCLExtensionsFromTypeExtMap()

std::string Sema::getOpenCLExtensionsFromTypeExtMap | ( | FunctionType * | FT | ) |

Check if a function type `FT` associates with any extensions present in OpenCLTypeExtMap and if so return the extension(s) name(s).

Definition at line 2264 of file Sema.cpp.

References getOpenCLExtensionsFromExtMap().

## ◆ getOpenCLOptions()

OpenCLOptions& clang::Sema::getOpenCLOptions | ( |  | ) |
| inline

Definition at line 1325 of file Sema.h.

Referenced by DiagnoseBadFunctionCast(), Initialize(), isOpenCLDisabledDecl(), and TryOCLZeroOpaqueTypeInitialization().

## ◆ getOpenMPCapturedExpr()

ExprResult Sema::getOpenMPCapturedExpr | ( | VarDecl * | Capture,
|  | ExprValueKind | VK,
|  | ExprObjectKind | OK,
|  | SourceLocation | Loc
| ) |  |

Definition at line 12547 of file SemaOpenMP.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::OK_Ordinary, and clang::VK_LValue.

## ◆ getOpenMPCaptureLevels()

int Sema::getOpenMPCaptureLevels | ( | OpenMPDirectiveKind | Kind | ) |
| static

Return the number of captured regions created for an OpenMP directive.

Definition at line 3708 of file SemaOpenMP.cpp.

References clang::getOpenMPCaptureRegions().

## ◆ getOptimizeOffPragmaLocation()

SourceLocation clang::Sema::getOptimizeOffPragmaLocation | ( |  | ) | const
| inline

Get the location for the currently active "\#pragma clang optimize off". If this location is invalid, then the state of the pragma is "on".

Definition at line 9451 of file Sema.h.

## ◆ GetOrCreateMSAsmLabel()

LabelDecl * Sema::GetOrCreateMSAsmLabel | ( | StringRef | ExternalLabelName,
|  | SourceLocation | Location,
|  | bool | AlwaysCreate
| ) |  |

Definition at line 903 of file SemaStmtAsm.cpp.

References clang::LabelDecl::isMSAsmLabel(), Label, and clang::Decl::markUsed().

## ◆ getOrCreateStdNamespace()

NamespaceDecl * Sema::getOrCreateStdNamespace | ( |  | ) |

Retrieve the special "std" namespace, which may require us to implicitly define the namespace.

Definition at line 10793 of file SemaDeclCXX.cpp.

References clang::NamespaceDecl::Create().

Referenced by DeclareGlobalNewDelete().

## ◆ getOwningModule()

Module* clang::Sema::getOwningModule | ( | const Decl * | Entity | ) |
| inline

Get the module owning an entity.

Definition at line 1750 of file Sema.h.

References clang::Decl::getOwningModule().

Referenced by hasVisibleDefaultArgument(), and hasVisibleMemberSpecialization().

## ◆ getPreprocessor()

Preprocessor& clang::Sema::getPreprocessor | ( |  | ) | const
| inline

Definition at line 1330 of file Sema.h.

Referenced by CheckUnreachable(), DiagnoseCallingConvCast(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseSwitchLabelsFallthrough(), diagnoseXorMisusedAsPow(), and findMacroSpelling().

## ◆ getPrintable() [1/13]

static int clang::Sema::getPrintable | ( | int | I | ) |
| inline static

Definition at line 1672 of file Sema.h.

## ◆ getPrintable() [2/13]

static unsigned clang::Sema::getPrintable | ( | unsigned | I | ) |
| inline static

Definition at line 1673 of file Sema.h.

## ◆ getPrintable() [3/13]

static bool clang::Sema::getPrintable | ( | bool | B | ) |
| inline static

Definition at line 1674 of file Sema.h.

## ◆ getPrintable() [4/13]

static const char* clang::Sema::getPrintable | ( | const char * | S | ) |
| inline static

Definition at line 1675 of file Sema.h.

## ◆ getPrintable() [5/13]

static StringRef clang::Sema::getPrintable | ( | StringRef | S | ) |
| inline static

Definition at line 1676 of file Sema.h.

## ◆ getPrintable() [6/13]

static const std::string& clang::Sema::getPrintable | ( | const std::string & | S | ) |
| inline static

Definition at line 1677 of file Sema.h.

## ◆ getPrintable() [7/13]

static const IdentifierInfo* clang::Sema::getPrintable | ( | const IdentifierInfo * | II | ) |
| inline static

Definition at line 1678 of file Sema.h.

## ◆ getPrintable() [8/13]

static DeclarationName clang::Sema::getPrintable | ( | DeclarationName | N | ) |
| inline static

Definition at line 1681 of file Sema.h.

## ◆ getPrintable() [9/13]

static QualType clang::Sema::getPrintable | ( | QualType | T | ) |
| inline static

Definition at line 1682 of file Sema.h.

## ◆ getPrintable() [10/13]

static SourceRange clang::Sema::getPrintable | ( | SourceRange | R | ) |
| inline static

Definition at line 1683 of file Sema.h.

## ◆ getPrintable() [11/13]

static SourceRange clang::Sema::getPrintable | ( | SourceLocation | L | ) |
| inline static

Definition at line 1684 of file Sema.h.

## ◆ getPrintable() [12/13]

static SourceRange clang::Sema::getPrintable | ( | const Expr * | E | ) |
| inline static

Definition at line 1685 of file Sema.h.

References clang::Stmt::getSourceRange().

## ◆ getPrintable() [13/13]

static SourceRange clang::Sema::getPrintable | ( | TypeLoc | TL | ) |
| inline static

Definition at line 1686 of file Sema.h.

References clang::TypeLoc::getSourceRange().

## ◆ getPrintingPolicy() [1/2]

PrintingPolicy clang::Sema::getPrintingPolicy | ( |  | ) | const
| inline

Retrieve a suitable printing policy for diagnostics.

Definition at line 2487 of file Sema.h.

Referenced by CheckDeducedPlaceholderConstraints(), CheckEquivalentExceptionSpec(), CheckVirtualDtorCall(), diagnoseNoViableConversion(), EmitCurrentDiagnostic(), and PrintInstantiationStack().

## ◆ getPrintingPolicy() [2/2]

PrintingPolicy Sema::getPrintingPolicy | ( | const ASTContext & | Ctx,
|  | const Preprocessor & | PP
| ) |  |
| static

Retrieve a suitable printing policy for diagnostics.

Definition at line 70 of file Sema.cpp.

## ◆ getReturnTypeLoc()

TypeLoc Sema::getReturnTypeLoc | ( | FunctionDecl * | FD | ) | const

Definition at line 3457 of file SemaStmt.cpp.

References clang::TypeLoc::getAsAdjusted(), clang::TypeSourceInfo::getTypeLoc(), and clang::DeclaratorDecl::getTypeSourceInfo().

## ◆ getScopeForContext()

Scope * Sema::getScopeForContext | ( | DeclContext * | Ctx | ) |

Determines the active Scope associated with the given declaration context.

This routine maps a declaration context to the active Scope object that represents that declaration context in the parser. It is typically used from "scope-less" code (e.g., template instantiation, lazy creation of declarations) that injects a name for name-lookup purposes and, therefore, must update the Scope.

Returns
  The scope corresponding to the given declaraion context, or NULL if no such scope is open.

Definition at line 1652 of file Sema.cpp.

References clang::Scope::DeclScope, getCurScope(), clang::DeclContext::getPrimaryContext(), and clang::Scope::TemplateParamScope.

## ◆ getScopeForDeclContext()

Scope * Sema::getScopeForDeclContext | ( | Scope * | S,
|  | DeclContext * | DC
| ) |  |
| static

Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope.

Otherwise return NULL.

Definition at line 1495 of file SemaDecl.cpp.

## ◆ getShadowedDeclaration() [1/2]

NamedDecl * Sema::getShadowedDeclaration | ( | 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.

Definition at line 7319 of file SemaDecl.cpp.

References clang::Decl::getDeclContext(), clang::LookupResult::getFoundDecl(), clang::DeclContext::isRecord(), and shouldWarnIfShadowedDecl().

## ◆ getShadowedDeclaration() [2/2]

NamedDecl * Sema::getShadowedDeclaration | ( | 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.

Definition at line 7302 of file SemaDecl.cpp.

References clang::LookupResult::getFoundDecl(), clang::VarDecl::hasGlobalStorage(), and shouldWarnIfShadowedDecl().

## ◆ GetSignedVectorType()

QualType Sema::GetSignedVectorType | ( | QualType | V | ) |

Definition at line 11200 of file SemaExpr.cpp.

References clang::Type::castAs().

## ◆ getSourceManager()

SourceManager& clang::Sema::getSourceManager | ( |  | ) | const
| inline

Definition at line 1329 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), AddCFAuditedAttribute(), addFixitForObjCARCConversion(), checkInitMethod(), CheckMemaccessSize(), CheckMoveOnConstruction(), CheckUnreachable(), CheckVirtualDtorCall(), DiagnoseMismatchedNewDelete(), DiagnoseNamespaceInlineMismatch(), diagnoseXorMisusedAsPow(), EmitDiagForCXXThrowInNonThrowingFunc(), clang::sema::SemaPPCallbacks::FileChanged(), findMacroSpelling(), getUDSuffixLoc(), handleObjCOwnershipTypeAttr(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), IsEnumConstOrFromMacro(), isLibstdcxxPointerReturnFalseHack(), isSameWidthConstantConversion(), maybeAddCUDAHostDeviceAttrs(), clang::Parser::ParseUnqualifiedId(), and clang::PrintingCodeCompleteConsumer::ProcessOverloadCandidates().

## ◆ getSpecialMember()

CXXSpecialMember clang::Sema::getSpecialMember | ( | const CXXMethodDecl * | MD | ) |
| inline

Definition at line 2648 of file Sema.h.

References clang::Sema::DefaultedFunctionKind::asSpecialMember().

Referenced by DefineImplicitSpecialMember().

## ◆ getStdAlignValT()

EnumDecl * Sema::getStdAlignValT | ( |  | ) | const

Definition at line 10631 of file SemaDeclCXX.cpp.

Referenced by AddLazyVectorDecls(), DeclareGlobalNewDelete(), FindAllocationFunctions(), and isNonPlacementDeallocationFunction().

## ◆ getStdBadAlloc()

CXXRecordDecl * Sema::getStdBadAlloc | ( |  | ) | const

Definition at line 10626 of file SemaDeclCXX.cpp.

Referenced by AddLazyVectorDecls(), and DeclareGlobalNewDelete().

## ◆ getStdNamespace()

NamespaceDecl * Sema::getStdNamespace | ( |  | ) | const

Definition at line 10635 of file SemaDeclCXX.cpp.

Referenced by AddLazyVectorDecls(), DiagnoseTwoPhaseLookup(), emitReplacement(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), LookupStdInitializerList(), and lookupStdTypeTraitMember().

## ◆ getSuperIdentifier()

IdentifierInfo * Sema::getSuperIdentifier | ( |  | ) | const

Definition at line 2191 of file Sema.cpp.

References Context, clang::IdentifierTable::get(), and clang::ASTContext::Idents.

## ◆ getTemplateArgumentBindingsText() [1/2]

std::string Sema::getTemplateArgumentBindingsText | ( | const TemplateParameterList * | Params,
|  | const TemplateArgumentList & | Args
| ) |  |

Produces a formatted string that describes the binding of template parameters to template arguments.

Definition at line 10595 of file SemaTemplate.cpp.

References clang::TemplateArgumentList::data(), and clang::TemplateArgumentList::size().

Referenced by PrintInstantiationStack().

## ◆ getTemplateArgumentBindingsText() [2/2]

std::string Sema::getTemplateArgumentBindingsText | ( | const TemplateParameterList * | Params,
|  | const TemplateArgument * | Args,
|  | unsigned | NumArgs
| ) |  |

Definition at line 10601 of file SemaTemplate.cpp.

References clang::NamedDecl::getIdentifier(), clang::TemplateParameterList::getParam(), Id, clang::TemplateArgument::print(), and clang::TemplateParameterList::size().

## ◆ getTemplateArgumentPackExpansionPattern()

TemplateArgumentLoc Sema::getTemplateArgumentPackExpansionPattern | ( | TemplateArgumentLoc | OrigLoc,
|  | SourceLocation & | Ellipsis,
|  | Optional< unsigned > & | NumExpansions
| ) |  | const

Returns the pattern of the pack expansion for a template argument.

Parameters

  OrigLoc | The template argument to expand.
  Ellipsis | Will be set to the location of the ellipsis.
  NumExpansions | Will be set to the number of expansions that will be generated from this pack expansion, if known a priori.

Definition at line 1029 of file SemaTemplateVariadic.cpp.

References clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getKind(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::TemplateArgument::isPackExpansion(), and clang::TemplateArgument::Type.

## ◆ getTemplateInstantiationArgs()

MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs | ( | NamedDecl * | D,
|  | const TemplateArgumentList * | Innermost = `nullptr`,
|  | bool | RelativeToPrimary = `false`,
|  | const FunctionDecl * | Pattern = `nullptr`
| ) |  |

Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.

Parameters

  D | the declaration for which we are computing template instantiation arguments.
  Innermost | if non-NULL, the innermost template argument list.
  RelativeToPrimary | true if we should get the template arguments relative to the primary template, even when we're dealing with a specialization. This is only relevant for function template specializations.
  Pattern | If non-NULL, indicates the pattern from which we will be instantiating the definition of the given declaration, `D`. This is used to determine the proper set of template instantiation arguments for friend function template specializations.

Definition at line 57 of file SemaTemplateInstantiate.cpp.

References clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::ClassTemplateSpecializationDecl::getSpecializationKind(), clang::VarTemplateSpecializationDecl::getSpecializationKind(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), clang::VarTemplateSpecializationDecl::getSpecializedTemplate(), clang::VarTemplateSpecializationDecl::getSpecializedTemplateOrPartial(), clang::ClassTemplateSpecializationDecl::getTemplateInstantiationArgs(), clang::VarTemplateSpecializationDecl::getTemplateInstantiationArgs(), clang::ClassTemplateSpecializationDecl::isClassScopeExplicitSpecialization(), clang::VarTemplateSpecializationDecl::isClassScopeExplicitSpecialization(), clang::DeclContext::isFileContext(), clang::isGenericLambdaCallOperatorOrStaticInvokerSpecialization(), clang::RedeclarableTemplateDecl::isMemberSpecialization(), clang::DeclContext::isTranslationUnit(), and clang::TSK_ExplicitSpecialization.

Referenced by InstantiateClassTemplateSpecialization(), InstantiateClassTemplateSpecializationMembers(), and RequireCompleteDeclContext().

## ◆ getTemplateNameKindForDiagnostics()

Sema::TemplateNameKindForDiagnostics Sema::getTemplateNameKindForDiagnostics | ( | TemplateName | Name | ) |

Definition at line 1239 of file SemaDecl.cpp.

Referenced by diagnoseMissingArgument(), and GetDeclSpecTypeForDeclarator().

## ◆ getTrivialTemplateArgumentLoc()

TemplateArgumentLoc Sema::getTrivialTemplateArgumentLoc | ( | const TemplateArgument & | Arg,
|  | QualType | NTTPType,
|  | SourceLocation | Loc
| ) |  |

Allocate a TemplateArgumentLoc where all locations have been initialized to the given location.

Parameters

  Arg | The template argument we are producing template argument location information for.
  NTTPType | For a declaration template argument, the type of the non-type template parameter that corresponds to this template argument. Can be null if no type sugar is available to add to the type from the template argument.
  Loc | The source location to use for the resulting template argument.

Definition at line 2455 of file SemaTemplateDeduction.cpp.

References clang::TemplateArgument::getKind(), clang::TemplateArgument::Null, and clang::TemplateArgument::Type.

Referenced by ConvertDeducedTemplateArgument(), getTrivialIntegralTemplateArgument(), and getTrivialTypeTemplateArgument().

## ◆ GetTypeForDeclarator()

TypeSourceInfo * Sema::GetTypeForDeclarator | ( | Declarator & | D,
|  | Scope * | S
| ) |  |

GetTypeForDeclarator - Convert the type for the specified declarator to Type instances.

The result of this call will never be null, but the associated type may be a null type if there's an unrecoverable error.

Definition at line 5432 of file SemaType.cpp.

References GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), inferARCWriteback(), clang::Declarator::isPrototypeContext(), and clang::CodeGen::state.

Referenced by ActOnCXXNew().

## ◆ GetTypeForDeclaratorCast()

TypeSourceInfo * Sema::GetTypeForDeclaratorCast | ( | Declarator & | D,
|  | QualType | FromTy
| ) |  |

Definition at line 5545 of file SemaType.cpp.

References GetDeclSpecTypeForDeclarator(), clang::ObjC, and clang::CodeGen::state.

## ◆ GetTypeFromParser()

QualType Sema::GetTypeFromParser | ( | ParsedType | Ty,
|  | TypeSourceInfo ** | TInfo = `nullptr`
| ) |  |
| static

Definition at line 2716 of file SemaType.cpp.

References clang::OpaquePtr< PtrTy >::get(), clang::QualType::isNull(), clang::CodeGen::state, and transferARCOwnershipToDeclaratorChunk().

Referenced by ActOnArrayTypeTrait(), ActOnCXXTypeConstructExpr(), ActOnPseudoDestructorExpr(), ActOnTypeRequirement(), ActOnTypeTrait(), AddClassMessageCompletions(), GetDeclSpecTypeForDeclarator(), and translateTemplateArgument().

## ◆ getTypeName()

ParsedType Sema::getTypeName | ( | const IdentifierInfo & | II,
|  | SourceLocation | NameLoc,
|  | Scope * | S,
|  | CXXScopeSpec * | SS = `nullptr`,
|  | bool | isClassName = `false`,
|  | bool | HasTrailingDot = `false`,
|  | ParsedType | ObjectTypePtr = `nullptr`,
|  | bool | IsCtorOrDtorName = `false`,
|  | bool | WantNontrivialTypeSourceInfo = `false`,
|  | bool | IsClassTemplateDeductionContext = `true`,
|  | IdentifierInfo ** | CorrectedII = `nullptr`
| ) |  |

If the identifier refers to a type name within this scope, return the declaration of that type.

This routine performs ordinary name lookup of the identifier II within the given scope, with optional C++ scope specifier SS, to determine whether the name refers to a type. If so, returns an opaque pointer (actually a QualType) corresponding to that type. Otherwise, returns NULL.

Definition at line 282 of file SemaDecl.cpp.

Referenced by ActOnPseudoDestructorExpr(), and clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().

## ◆ getTypoExprState()

const Sema::TypoExprState & Sema::getTypoExprState | ( | TypoExpr * | TE | ) | const

Definition at line 5517 of file SemaLookup.cpp.

## ◆ getUndefinedButUsed()

void Sema::getUndefinedButUsed | ( | SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > & | Undefined | ) |

Obtain a sorted list of functions that are undefined but ODR-used.

Obtains a sorted list of functions and variables that are undefined but ODR-used.

Definition at line 683 of file Sema.cpp.

References clang::VarDecl::DeclarationOnly, clang::Decl::hasAttr(), isExternalWithNoLinkageType(), clang::Decl::isInvalidDecl(), and UndefinedButUsed.

Referenced by AddLazyVectorDecls().

## ◆ getVariadicCallType()

Sema::VariadicCallType Sema::getVariadicCallType | ( | FunctionDecl * | FDecl,
|  | const FunctionProtoType * | Proto,
|  | Expr * | Fn
| ) |  |

Definition at line 5059 of file SemaExpr.cpp.

References clang::Expr::getType(), clang::Type::isBlockPointerType(), and clang::FunctionProtoType::isVariadic().

## ◆ getVarTemplateSpecialization()

VarDecl * Sema::getVarTemplateSpecialization | ( | VarTemplateDecl * | VarTempl,
|  | const TemplateArgumentListInfo * | TemplateArgs,
|  | const DeclarationNameInfo & | MemberNameInfo,
|  | SourceLocation | TemplateKWLoc
| ) |  |

Definition at line 950 of file SemaExprMember.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclarationNameInfo::getBeginLoc(), clang::DeclarationNameInfo::getLoc(), clang::VarDecl::getTemplateSpecializationKind(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::VarDecl::setTemplateSpecializationKind(), and clang::TSK_ImplicitInstantiation.

## ◆ HandleDeclarator()

NamedDecl * Sema::HandleDeclarator | ( | Scope * | S,
|  | Declarator & | D,
|  | MultiTemplateParamsArg | TemplateParameterLists
| ) |  |

Definition at line 5541 of file SemaDecl.cpp.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ HandleDelayedAccessCheck()

void Sema::HandleDelayedAccessCheck | ( | sema::DelayedDiagnostic & | DD,
|  | Decl * | Ctx
| ) |  |

Definition at line 1467 of file SemaAccess.cpp.

References AR_inaccessible, CheckEffectiveAccess(), clang::sema::DelayedDiagnostic::getAccessData(), clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::Decl::isLocalExternDecl(), clang::sema::DelayedDiagnostic::Loc, clang::Target, and clang::sema::DelayedDiagnostic::Triggered.

## ◆ HandleDependentAccessCheck()

void Sema::HandleDependentAccessCheck | ( | const DependentDiagnostic & | DD,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 1490 of file SemaAccess.cpp.

References clang::DependentDiagnostic::getAccess(), clang::DependentDiagnostic::getAccessBaseObjectType(), clang::DependentDiagnostic::getAccessLoc(), clang::DependentDiagnostic::getAccessNamingClass(), clang::DependentDiagnostic::getAccessTarget(), and clang::DependentDiagnostic::isAccessToMember().

## ◆ HandleExprEvaluationContextForTypeof()

ExprResult Sema::HandleExprEvaluationContextForTypeof | ( | Expr * | E | ) |

Definition at line 15354 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Type::isVariablyModifiedType().

## ◆ HandleExprPropertyRefExpr()

ExprResult Sema::HandleExprPropertyRefExpr | ( | const ObjCObjectPointerType * | OPT,
|  | Expr * | BaseExpr,
|  | SourceLocation | OpLoc,
|  | DeclarationName | MemberName,
|  | SourceLocation | MemberLoc,
|  | SourceLocation | SuperLoc,
|  | QualType | SuperType,
|  | bool | Super
| ) |  |

HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface.

This is a property reference expression.

Definition at line 1850 of file SemaExprObjC.cpp.

References Diag(), clang::ExprError(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::DeclarationName::getAsIdentifierInfo(), clang::ObjCInterfaceType::getDecl(), clang::ObjCObjectPointerType::getInterfaceType(), clang::ObjCObjectPointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::DeclarationName::isIdentifier(), and clang::OBJC_PR_query_instance.

Referenced by LookupMemberExpr(), and LookupMethodInQualifiedType().

## ◆ HandleField()

FieldDecl * Sema::HandleField | ( | 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.

Definition at line 16021 of file SemaDecl.cpp.

## ◆ HandleFunctionTypeMismatch()

void Sema::HandleFunctionTypeMismatch | ( | PartialDiagnostic & | PDiag,
|  | QualType | FromType,
|  | QualType | ToType
| ) |  |

HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types.

Catches different number of parameter, mismatch in parameter types, and different return types.

Definition at line 2846 of file SemaOverload.cpp.

References clang::Type::castAs(), ft_default, clang::Type::isMemberPointerType(), and clang::QualType::isNull().

## ◆ handleLambdaNumbering()

void Sema::handleLambdaNumbering | ( | CXXRecordDecl * | Class,
|  | CXXMethodDecl * | Method,
|  | Optional< std::tuple< unsigned, bool, Decl *>> | Mangling = `None`
| ) |  |

Number lambda for linkage purposes if necessary.

Definition at line 433 of file SemaLambda.cpp.

References clang::CXXRecordDecl::setLambdaMangling().

## ◆ HandleMSProperty()

MSPropertyDecl * Sema::HandleMSProperty | ( | 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.

Definition at line 17298 of file SemaDeclCXX.cpp.

References clang::CPlusPlus, Diag(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::TypeSourceInfo::getType(), and clang::Declarator::setInvalidType().

## ◆ HandlePropertyInClassExtension()

ObjCPropertyDecl * Sema::HandlePropertyInClassExtension | ( | 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.

Definition at line 414 of file SemaObjCProperty.cpp.

## ◆ handlerCanCatch()

bool clang::Sema::handlerCanCatch | ( | QualType | HandlerType,
|  | QualType | ExceptionType
| ) |  |

Definition at line 665 of file SemaExceptionSpec.cpp.

References clang::Qualifiers::compatiblyIncludes(), Context, clang::Type::getAs(), clang::Type::getPointeeType(), clang::ReferenceType::getPointeeType(), clang::ASTContext::getUnqualifiedArrayType(), clang::ASTContext::hasSameUnqualifiedType(), clang::QualType::isConstQualified(), IsFunctionConversion(), clang::Type::isMemberPointerType(), clang::Type::isNullPtrType(), clang::Type::isObjectType(), clang::Type::isPointerType(), IsQualificationConversion(), clang::Type::isRecordType(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), and clang::Result.

Referenced by CheckExceptionSpecSubset().

## ◆ handleTagNumbering()

void Sema::handleTagNumbering | ( | const TagDecl * | Tag,
|  | Scope * | TagScope
| ) |  |

Definition at line 4323 of file SemaDecl.cpp.

## ◆ hasAnyAcceptableTemplateNames()

bool Sema::hasAnyAcceptableTemplateNames | ( | LookupResult & | R,
|  | bool | AllowFunctionTemplates = `true`,
|  | bool | AllowDependent = `true`,
|  | bool | AllowNonTemplateFunctions = `false`
| ) |  |

Definition at line 113 of file SemaTemplate.cpp.

References clang::LookupResult::begin(), and clang::LookupResult::end().

## ◆ hasAnyUnrecoverableErrorsInThisFunction()

bool Sema::hasAnyUnrecoverableErrorsInThisFunction | ( |  | ) | const

Determine whether any errors occurred within this function/method/ block.

Definition at line 1820 of file Sema.cpp.

References clang::sema::FunctionScopeInfo::ErrorTrap, getCurFunction(), and clang::DiagnosticErrorTrap::hasUnrecoverableErrorOccurred().

## ◆ hasCStrMethod()

bool Sema::hasCStrMethod | ( | const Expr * | E | ) |

Check to see if a given expression could have '.c_str()' called on it.

Check if we could call '.c_str()' on an object.

FIXME: This returns the wrong results in some cases (if cv-qualifiers don't allow the call, or if it would be ambiguous).

Definition at line 8048 of file SemaChecking.cpp.

## ◆ hasExplicitCallingConv()

bool Sema::hasExplicitCallingConv | ( | QualType | T | ) |

Definition at line 7275 of file SemaType.cpp.

References clang::Type::getAs(), clang::AttributedType::getModifiedType(), and clang::AttributedType::isCallingConv().

## ◆ hasMergedDefinitionInCurrentModule()

bool Sema::hasMergedDefinitionInCurrentModule | ( | NamedDecl * | Def | ) |

Definition at line 1604 of file SemaLookup.cpp.

## ◆ hasStructuralCompatLayout()

bool Sema::hasStructuralCompatLayout | ( | Decl * | D,
|  | Decl * | Suggested
| ) |  |

Determine if `D` and `Suggested` have a structurally compatible layout as described in C11 6.2.7/1.

Definition at line 7932 of file SemaType.cpp.

References clang::Default, clang::Decl::getASTContext(), and clang::StructuralEquivalenceContext::IsEquivalent().

## ◆ hasVisibleDeclaration()

bool clang::Sema::hasVisibleDeclaration | ( | const NamedDecl * | D,
|  | llvm::SmallVectorImpl< Module *> * | Modules = `nullptr`
| ) |  |
| inline

Determine whether any declaration of an entity is visible.

Definition at line 1767 of file Sema.h.

Referenced by computeDeclContext().

## ◆ hasVisibleDeclarationSlow()

bool Sema::hasVisibleDeclarationSlow | ( | const NamedDecl * | D,
|  | llvm::SmallVectorImpl< Module *> * | Modules
| ) |  |

Definition at line 1885 of file SemaLookup.cpp.

References findAcceptableDecl(), clang::Decl::getCanonicalDecl(), and hasVisibleDeclarationImpl().

## ◆ hasVisibleDefaultArgument()

bool Sema::hasVisibleDefaultArgument | ( | const NamedDecl * | D,
|  | llvm::SmallVectorImpl< Module *> * | Modules = `nullptr`
| ) |  |

Determine if the template parameter `D` has a visible default argument.

Definition at line 1634 of file SemaLookup.cpp.

References hasVisibleDefaultArgument().

Referenced by diagnoseMissingArgument(), and isPreferredLookupResult().

## ◆ hasVisibleDefinition() [1/2]

bool Sema::hasVisibleDefinition | ( | NamedDecl * | D,
|  | NamedDecl ** | Suggested,
|  | bool | OnlyNeedComplete = `false`
| ) |  |

Determine if `D` has a visible definition.

Determine whether there is any declaration of `D` that was ever a definition (perhaps before module merging) and is currently visible.

If not, suggest a declaration that should be made visible to expose the definition.

Parameters

  D | The definition of the entity.
  Suggested | Filled in with the declaration that should be made visible in order to provide a definition of this entity.
  OnlyNeedComplete | If `true`, we only need the type to be complete, not defined. This only matters for enums with a fixed underlying type, since in all other cases, a type is complete if and only if it is defined.

Definition at line 7956 of file SemaType.cpp.

References clang::Decl::isModulePrivate(), and clang::Decl::setVisibleDespiteOwningModule().

Referenced by RequireCompleteDeclContext().

## ◆ hasVisibleDefinition() [2/2]

bool clang::Sema::hasVisibleDefinition | ( | const NamedDecl * | D | ) |
| inline

Definition at line 1785 of file Sema.h.

References hasVisibleDefaultArgument().

## ◆ hasVisibleExplicitSpecialization()

bool Sema::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.

(For a member specialization, use hasVisibleMemberSpecialization.)

Definition at line 1671 of file SemaLookup.cpp.

References hasVisibleDeclarationImpl(), and clang::TSK_ExplicitSpecialization.

## ◆ hasVisibleMemberSpecialization()

bool Sema::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).

Definition at line 1684 of file SemaLookup.cpp.

References clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), getOwningModule(), hasVisibleDeclarationImpl(), clang::DeclContext::isFileContext(), clang::Decl::isHidden(), clang::Decl::isModulePrivate(), isModuleVisible(), and clang::Decl::isTemplateParameter().

## ◆ hasVisibleMergedDefinition()

bool Sema::hasVisibleMergedDefinition | ( | NamedDecl * | Def | ) |

Definition at line 1597 of file SemaLookup.cpp.

## ◆ HideUsingShadowDecl()

void Sema::HideUsingShadowDecl | ( | Scope * | S,
|  | UsingShadowDecl * | Shadow
| ) |  |

Hides a using shadow declaration.

This is required by the current using-decl implementation when a resolvable using declaration in a class is followed by a declaration which would hide or override one or more of the using decl's targets; for example:

struct Base { void foo(int); }; struct Derived : Base { using Base::foo; void foo(int); };

The governing language is C++03 [namespace.udecl]p12:

When a using-declaration brings names from a base class into a derived class scope, member functions in the derived class override and/or hide member functions with the same name and parameter types in a base class (rather than conflicting).

There are two ways to implement this: (1) optimistically create shadow decls when they're not hidden by existing declarations, or (2) don't create any shadow decls (or at least don't make them visible) until we've fully parsed/instantiated the class. The problem with (1) is that we might have to retroactively remove a shadow decl, which requires several O(n) operations because the decl structures are (very reasonably) not designed for removal. (2) avoids this but is very fiddly and phase-dependent.

Definition at line 11429 of file SemaDeclCXX.cpp.

References clang::DeclarationName::CXXConversionFunctionName, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclarationName::getNameKind(), clang::UsingShadowDecl::getUsingDecl(), clang::Scope::RemoveDecl(), clang::DeclContext::removeDecl(), and clang::UsingDecl::removeShadowDecl().

## ◆ IdentifyCUDAPreference()

Sema::CUDAFunctionPreference Sema::IdentifyCUDAPreference | ( | const FunctionDecl * | Caller,
|  | const FunctionDecl * | Callee
| ) |  |

Identifies relative preference of a given Caller/Callee combination, based on their host/device attributes.

Parameters

  Caller | function which needs address of `Callee`. nullptr in case of global context.
  Callee | target function

Returns
  preference value for particular Caller/Callee combination.

Definition at line 162 of file SemaCUDA.cpp.

References CFP_HostDevice, CFP_Native, CFP_Never, CFP_SameSide, CFP_WrongSide, CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, CFT_InvalidTarget, getLangOpts(), and IdentifyCUDATarget().

Referenced by isNonPlacementDeallocationFunction(), and isUsualDeallocationFunction().

## ◆ IdentifyCUDATarget() [1/2]

Sema::CUDAFunctionTarget Sema::IdentifyCUDATarget | ( | const FunctionDecl * | D,
|  | bool | IgnoreImplicitHDAttr = `false`
| ) |  |

Determines whether the given function is a CUDA device/host/kernel/etc.

IdentifyCUDATarget - Determine the CUDA compilation target for this function.

function.

Use this rather than examining the function's attributes yourself – you will get it wrong. Returns CFT_Host if D is null.

Definition at line 106 of file SemaCUDA.cpp.

References CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, CFT_InvalidTarget, clang::Decl::hasAttr(), and clang::Decl::isImplicit().

Referenced by checkAllowedCUDAInitializer(), checkCUDATargetOverload(), CUDASetLambdaAttrs(), IdentifyCUDAPreference(), and inferCUDATargetForImplicitSpecialMember().

## ◆ IdentifyCUDATarget() [2/2]

Sema::CUDAFunctionTarget Sema::IdentifyCUDATarget | ( | const ParsedAttributesView & | Attrs | ) |

Definition at line 58 of file SemaCUDA.cpp.

References CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, and CFT_InvalidTarget.

## ◆ IgnoredValueConversions()

ExprResult Sema::IgnoredValueConversions | ( | Expr * | E | ) |

IgnoredValueConversions - Given that an expression's result is syntactically ignored, perform any conversions that are required.

Perform the conversions required for an expression used in a context that ignores the result.

Definition at line 7573 of file SemaExprCXX.cpp.

References CheckPlaceholderExpr(), CheckUnusedVolatileAssignment(), Context, DefaultFunctionArrayConversion(), DefaultFunctionArrayLvalueConversion(), DefaultLvalueConversion(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), ImpCastExprToType(), clang::Type::isFunctionType(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isRValue(), IsSpecialDiscardedValue(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), RequireCompleteType(), and clang::ASTContext::VoidTy.

Referenced by ActOnFinishFullExpr(), CheckCommaOperands(), DiagnoseBadFunctionCast(), DiagnoseReinterpretUpDownCast(), and TryAddressSpaceCast().

## ◆ ImpCastExprToType()

ExprResult Sema::ImpCastExprToType | ( | Expr * | E,
|  | QualType | Ty,
|  | CastKind | Kind,
|  | ExprValueKind | VK = `VK_RValue`,
|  | const CXXCastPath * | BasePath = `nullptr`,
|  | CheckedConversionKind | CCK = `CCK_ImplicitConversion`
| ) |  |

ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.

If there is already an implicit cast, merge into the existing one. If isLvalue, the result of the cast is an lvalue.

If there is already an implicit cast, merge into the existing one. The result is of the given category.

Definition at line 529 of file Sema.cpp.

References Context, clang::CPlusPlus, clang::ImplicitCastExpr::Create(), CreateMaterializeTemporaryExpr(), diagnoseNullableToNonnullConversion(), diagnoseZeroToNullptrConversion(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), clang::ASTContext::getCanonicalType(), getLangOpts(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isRValue(), and clang::VK_RValue.

Referenced by ActOnCXXDelete(), BuildImplicitBaseInitializer(), checkArithmeticOrEnumeralThreeWayCompare(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckGNUVectorConditionalTypes(), checkMemberDecomposition(), checkPointerIntegerMismatch(), CheckPointerToMemberOperands(), CheckTemplateArgumentPointerToMember(), checkVectorShift(), convertVector(), CXXCheckConditionalOperands(), DeduceNullPtrTemplateArgument(), FindCompositePointerType(), IgnoredValueConversions(), LookupMemberExpr(), LookupMethodInReceiverType(), OpenCLConvertScalarsToVectors(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), ShouldTryAgainWithRedefinitionType(), tryGCCVectorConvertAndSplat(), and tryVectorConvertAndSplat().

## ◆ ImplicitlyDefineFunction()

NamedDecl * Sema::ImplicitlyDefineFunction | ( | 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).

Definition at line 14243 of file SemaDecl.cpp.

## ◆ ImplMethodsVsClassMethods()

void Sema::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.

Definition at line 2956 of file SemaDeclObjC.cpp.

## ◆ incrementMSManglingNumber()

void clang::Sema::incrementMSManglingNumber | ( |  | ) | const
| inline

Definition at line 11906 of file Sema.h.

References clang::Scope::incrementMSManglingNumber().

Referenced by clang::Parser::incrementMSManglingNumber().

## ◆ inferCUDATargetForImplicitSpecialMember()

bool Sema::inferCUDATargetForImplicitSpecialMember | ( | CXXRecordDecl * | ClassDecl,
|  | CXXSpecialMember | CSM,
|  | CXXMethodDecl * | MemberDecl,
|  | bool | ConstRHS,
|  | bool | Diagnose
| ) |  |

Given a implicit special member, infer its CUDA target from the calls it needs to make to underlying base/field special members.

Parameters

  ClassDecl | the class for which the member is being created.
  CSM | the kind of special member.
  MemberDecl | the special member itself.
  ConstRHS | true if this is a copy operation with a const object on its RHS.
  Diagnose | true if this call should emit diagnostics.

Returns
  true if there was an error inferring. The result of this call is implicit CUDA target attribute(s) attached to the member declaration.

Definition at line 265 of file SemaCUDA.cpp.

References clang::Decl::addAttr(), clang::CXXRecordDecl::bases(), CFT_Device, CFT_Host, Context, Diag(), clang::RecordDecl::fields(), clang::Type::getAs(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::DeclContext::getLexicalParent(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::Decl::hasAttr(), IdentifyCUDATarget(), clang::CXXRecordDecl::isAbstract(), LookupSpecialMember(), resolveCalleeCUDATargetConflict(), and clang::CXXRecordDecl::vbases().

## ◆ inferGslOwnerPointerAttribute()

void Sema::inferGslOwnerPointerAttribute | ( | CXXRecordDecl * | Record | ) |

Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types.

Definition at line 154 of file SemaAttr.cpp.

References Context, clang::NamedDecl::getIdentifier(), clang::NamedDecl::getName(), clang::Decl::hasAttr(), inferGslPointerAttribute(), and clang::Decl::isInStdNamespace().

## ◆ inferGslPointerAttribute() [1/2]

void Sema::inferGslPointerAttribute | ( | NamedDecl * | ND,
|  | CXXRecordDecl * | UnderlyingRecord
| ) |  |

Add gsl::Pointer attribute to std::container::iterator.

Parameters

  ND | The declaration that introduces the name std::container::iterator.
  UnderlyingRecord | The record named by ND.

Definition at line 98 of file SemaAttr.cpp.

References Context, clang::Decl::getDeclContext(), clang::NamedDecl::getName(), and Parent.

Referenced by inferGslOwnerPointerAttribute(), inferGslPointerAttribute(), and clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl().

## ◆ inferGslPointerAttribute() [2/2]

void Sema::inferGslPointerAttribute | ( | TypedefNameDecl * | TD | ) |

Add [[gsl::Pointer]] attributes for std:: types.

Definition at line 137 of file SemaAttr.cpp.

References clang::Type::getAsCXXRecordDecl(), clang::QualType::getCanonicalType(), clang::QualType::getTypePtr(), clang::TypedefNameDecl::getUnderlyingType(), and inferGslPointerAttribute().

## ◆ inferObjCARCLifetime()

bool Sema::inferObjCARCLifetime | ( | ValueDecl * | decl | ) |

Definition at line 6103 of file SemaDecl.cpp.

References Diag(), clang::Decl::getLocation(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), clang::ValueDecl::getType(), clang::Type::isObjCLifetimeType(), clang::Qualifiers::OCL_Autoreleasing, and clang::Qualifiers::OCL_None.

Referenced by BuildObjCExceptionDecl(), FinishForRangeVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ inheritCUDATargetAttrs()

void Sema::inheritCUDATargetAttrs | ( | FunctionDecl * | FD,
|  | const FunctionTemplateDecl & | TD
| ) |  |

Copies target attributes from the template TD to the function FD.

Definition at line 787 of file SemaCUDA.cpp.

References clang::FunctionTemplateDecl::getTemplatedDecl().

## ◆ Initialize()

void Sema::Initialize | ( |  | ) |

Perform initialization that occurs after the parser has been initialized but before it parses anything.

Definition at line 216 of file Sema.cpp.

References addImplicitTypedef(), clang::OpenCLOptions::addSupport(), clang::IdentifierResolver::begin(), clang::ASTContext::buildImplicitRecord(), Consumer, Context, clang::ASTContext::DoubleTy, clang::OpenCLOptions::enableSupportedCore(), clang::IdentifierResolver::end(), clang::ASTContext::FloatTy, clang::IdentifierTable::get(), clang::ASTContext::getAtomicType(), clang::ASTContext::getBuiltinMSVaListDecl(), clang::ASTContext::getBuiltinVaListDecl(), clang::ASTContext::getCFConstantStringDecl(), clang::ASTContext::getExternalSource(), clang::Preprocessor::getIdentifierInfo(), clang::ASTContext::getInt128Decl(), clang::ASTContext::getIntPtrType(), getLangOpts(), clang::ASTContext::getObjCClassDecl(), clang::ASTContext::getObjCIdDecl(), clang::ASTContext::getObjCProtocolDecl(), clang::ASTContext::getObjCSelDecl(), getOpenCLOptions(), clang::ASTContext::getPointerDiffType(), clang::ASTContext::getSizeType(), clang::TargetInfo::getSupportedOpenCLOpts(), clang::ASTContext::getTargetInfo(), clang::ASTContext::getTypeSize(), clang::ASTContext::getUInt128Decl(), clang::ASTContext::getUIntPtrType(), clang::TargetInfo::hasAArch64SVETypes(), clang::TargetInfo::hasBuiltinMSVaList(), clang::TargetInfo::hasInt128Type(), Id, clang::ASTContext::Idents, IdResolver, clang::ASTContext::IntTy, clang::ASTContext::LongTy, clang::ASTContext::OCLClkEventTy, clang::ASTContext::OCLEventTy, clang::ASTContext::OCLQueueTy, clang::ASTContext::OCLReserveIDTy, clang::ASTContext::OCLSamplerTy, PP, PushOnScopeChains(), setOpenCLExtensionForType(), clang::TTK_Class, TUScope, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongTy, and VAListTagName.

Referenced by clang::Parser::Initialize().

## ◆ InstantiateAttrs()

void Sema::InstantiateAttrs | ( | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | const Decl * | Pattern,
|  | Decl * | Inst,
|  | LateInstantiatedAttrVec * | LateAttrs = `nullptr`,
|  | LocalInstantiationScope * | OuterMostScope = `nullptr`
| ) |  |

Definition at line 542 of file SemaTemplateInstantiateDecl.cpp.

References clang::Decl::addAttr(), clang::Decl::attrs(), attrToRetainOwnershipKind(), clang::Decl::hasAttr(), instantiateDependentAlignedAttr(), instantiateDependentAlignValueAttr(), instantiateDependentAllocAlignAttr(), instantiateDependentAMDGPUFlatWorkGroupSizeAttr(), instantiateDependentAMDGPUWavesPerEUAttr(), instantiateDependentAssumeAlignedAttr(), instantiateDependentCUDALaunchBoundsAttr(), instantiateDependentDiagnoseIfAttr(), instantiateDependentEnableIfAttr(), instantiateDependentModeAttr(), instantiateOMPDeclareSimdDeclAttr(), and instantiateOMPDeclareVariantAttr().

Referenced by clang::TemplateDeclInstantiator::InitFunctionInstantiation(), InstantiateEnum(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), SubstParmVarDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ InstantiateAttrsForDecl()

void Sema::InstantiateAttrsForDecl | ( | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | const Decl * | Pattern,
|  | Decl * | Inst,
|  | LateInstantiatedAttrVec * | LateAttrs = `nullptr`,
|  | LocalInstantiationScope * | OuterMostScope = `nullptr`
| ) |  |

Definition at line 508 of file SemaTemplateInstantiateDecl.cpp.

References clang::Decl::attrs(), and clang::sema::instantiateTemplateAttributeForDecl().

Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition().

## ◆ InstantiateClass()

bool Sema::InstantiateClass | ( | SourceLocation | PointOfInstantiation,
|  | CXXRecordDecl * | Instantiation,
|  | CXXRecordDecl * | Pattern,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | TemplateSpecializationKind | TSK,
|  | bool | Complain = `true`
| ) |  |

Instantiate the definition of a class from a given pattern.

Parameters

  PointOfInstantiation | The point of instantiation within the source code.
  Instantiation | is the declaration whose definition is being instantiated. This will be either a class template specialization or a member class of a class template specialization.
  Pattern | is the pattern from which the instantiation occurs. This will be either the declaration of a class template or the declaration of a member class of a class template.
  TemplateArgs | The template arguments to be substituted into the pattern.
  TSK | the kind of implicit or explicit instantiation to perform.
  Complain | whether to complain if the class cannot be instantiated due to the lack of a definition.

Returns
  true if an error occurred, false otherwise.

Definition at line 2377 of file SemaTemplateInstantiate.cpp.

References DiagnoseUninstantiableTemplate(), clang::CXXRecordDecl::getDefinition(), and clang::CXXRecordDecl::getInstantiatedFromMemberClass().

Referenced by InstantiateClassMembers(), and InstantiateClassTemplateSpecialization().

## ◆ InstantiateClassMembers()

void Sema::InstantiateClassMembers | ( | SourceLocation | PointOfInstantiation,
|  | CXXRecordDecl * | Instantiation,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | TemplateSpecializationKind | TSK
| ) |  |

Instantiates the definitions of all of the member of the given class, which is an instantiation of a class template or a member class of a template.

Definition at line 2959 of file SemaTemplateInstantiate.cpp.

References CheckSpecializationInstantiationRedecl(), Consumer, Context, clang::DeclContext::decls(), clang::DeclContextLookupResult::front(), clang::CXXRecordDecl::getDefinition(), clang::EnumDecl::getDefinition(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::ASTContext::getTargetInfo(), clang::CXXRecordDecl::getTemplateInstantiationPattern(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::TargetInfo::getTriple(), clang::ASTConsumer::HandleTopLevelDecl(), InstantiateClass(), InstantiateEnum(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), InstantiateVariableDefinition(), clang::CXXRecordDecl::isLocalClass(), clang::DeclContext::lookup(), MarkVTableUsed(), PendingLocalImplicitInstantiations, clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::MemberSpecializationInfo::setTemplateSpecializationKind(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.

Referenced by InstantiateClassTemplateSpecializationMembers().

## ◆ InstantiateClassTemplateSpecialization()

bool Sema::InstantiateClassTemplateSpecialization | ( | SourceLocation | PointOfInstantiation,
|  | ClassTemplateSpecializationDecl * | ClassTemplateSpec,
|  | TemplateSpecializationKind | TSK,
|  | bool | Complain = `true`
| ) |  |

Definition at line 2935 of file SemaTemplateInstantiate.cpp.

References clang::CXXRecordDecl::getCanonicalDecl(), getPatternForClassTemplateSpecialization(), getTemplateInstantiationArgs(), InstantiateClass(), and clang::Decl::isInvalidDecl().

## ◆ InstantiateClassTemplateSpecializationMembers()

void Sema::InstantiateClassTemplateSpecializationMembers | ( | SourceLocation | PointOfInstantiation,
|  | ClassTemplateSpecializationDecl * | ClassTemplateSpec,
|  | TemplateSpecializationKind | TSK
| ) |  |

Instantiate the definitions of all of the members of the given class template specialization, which was named as part of an explicit instantiation.

Definition at line 3179 of file SemaTemplateInstantiate.cpp.

References getTemplateInstantiationArgs(), and InstantiateClassMembers().

## ◆ InstantiateEnum()

bool Sema::InstantiateEnum | ( | SourceLocation | PointOfInstantiation,
|  | EnumDecl * | Instantiation,
|  | EnumDecl * | Pattern,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | TemplateSpecializationKind | TSK
| ) |  |

Instantiate the definition of an enum from a given pattern.

Parameters

  PointOfInstantiation | The point of instantiation within the source code.
  Instantiation | is the declaration whose definition is being instantiated. This will be a member enumeration of a class temploid specialization, or a local enumeration within a function temploid specialization.
  Pattern | The templated declaration from which the instantiation occurs.
  TemplateArgs | The template arguments to be substituted into the pattern.
  TSK | The kind of implicit or explicit instantiation to perform.

Returns
  `true` if an error occurred, `false` otherwise.

Definition at line 2631 of file SemaTemplateInstantiate.cpp.

References Context, DiagnoseUninstantiableTemplate(), clang::EnumDecl::getDefinition(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::EnumDecl::getMemberSpecializationInfo(), InstantiateAttrs(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiatingTemplate::isAlreadyInstantiating(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::EnumDecl::setTemplateSpecializationKind(), and clang::Decl::setVisibleDespiteOwningModule().

Referenced by InstantiateClassMembers(), and RequireCompleteDeclContext().

## ◆ InstantiateExceptionSpec()

void Sema::InstantiateExceptionSpec | ( | SourceLocation | PointOfInstantiation,
|  | FunctionDecl * | Function
| ) |  |

Definition at line 4188 of file SemaTemplateInstantiateDecl.cpp.

References addInstantiatedParametersToScope(), clang::Type::castAs(), Diag(), clang::EST_None, clang::EST_Uninstantiated, clang::FunctionProtoType::getExceptionSpecTemplate(), clang::FunctionProtoType::getExceptionSpecType(), clang::ValueDecl::getType(), clang::Sema::InstantiatingTemplate::isAlreadyInstantiating(), and clang::Sema::InstantiatingTemplate::isInvalid().

Referenced by ResolveExceptionSpec().

## ◆ InstantiateFunctionDeclaration()

FunctionDecl * Sema::InstantiateFunctionDeclaration | ( | FunctionTemplateDecl * | FTD,
|  | const TemplateArgumentList * | Args,
|  | SourceLocation | Loc
| ) |  |

Instantiate (or find existing instantiation of) a function template with a given set of template arguments.

Usually this should not be used, and template argument deduction should be used in its place.

Definition at line 4411 of file SemaTemplateInstantiateDecl.cpp.

References clang::TemplateArgumentList::asArray(), clang::DeclContext::getParent(), and clang::FunctionTemplateDecl::getTemplatedDecl().

## ◆ InstantiateFunctionDefinition()

void Sema::InstantiateFunctionDefinition | ( | SourceLocation | PointOfInstantiation,
|  | FunctionDecl * | Function,
|  | bool | Recursive = `false`,
|  | bool | DefinitionRequired = `false`,
|  | bool | AtEndOfTU = `false`
| ) |  |

Instantiate the definition of the given function from its template.

Parameters

  PointOfInstantiation | the point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the function, but it's close.
  Function | the already-instantiated declaration of a function template specialization or member function of a class template specialization.
  Recursive | if true, recursively instantiates any functions that are required by this instantiation.
  DefinitionRequired | if true, then we are performing an explicit instantiation where the body of the function is required. Complain if there is no such body.

Definition at line 4467 of file SemaTemplateInstantiateDecl.cpp.

References Diag(), clang::DeclaratorDecl::getBeginLoc(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getDefinition(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), clang::Decl::getLocation(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::getTemplateSpecializationKindForInstantiation(), clang::FunctionDecl::isDefined(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isLateTemplateParsed(), clang::FunctionDecl::setInstantiationIsPending(), clang::Decl::setInvalidDecl(), clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::FunctionDecl::willHaveBody().

Referenced by InstantiateClassMembers(), isEmptyCudaConstructor(), and isEmptyCudaDestructor().

## ◆ InstantiateInClassInitializer()

bool Sema::InstantiateInClassInitializer | ( | SourceLocation | PointOfInstantiation,
|  | FieldDecl * | Instantiation,
|  | FieldDecl * | Pattern,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Instantiate the definition of a field from the given pattern.

Parameters

  PointOfInstantiation | The point of instantiation within the source code.
  Instantiation | is the declaration whose definition is being instantiated. This will be a class of a class temploid specialization, or a local enumeration within a function temploid specialization.
  Pattern | The templated declaration from which the instantiation occurs.
  TemplateArgs | The template arguments to be substituted into the pattern.

Returns
  `true` if an error occurred, `false` otherwise.

Definition at line 2696 of file SemaTemplateInstantiate.cpp.

References ActOnFinishCXXInClassMemberInitializer(), ActOnStartCXXInClassMemberInitializer(), Context, Diag(), getASTMutationListener(), clang::Stmt::getBeginLoc(), clang::FieldDecl::getInClassInitializer(), clang::FieldDecl::getInClassInitStyle(), clang::DeclContext::getOuterLexicalRecordContext(), clang::FieldDecl::getParent(), clang::FieldDecl::hasInClassInitializer(), clang::Sema::InstantiatingTemplate::isAlreadyInstantiating(), clang::Sema::InstantiatingTemplate::isInvalid(), PotentiallyEvaluated, clang::Decl::setInvalidDecl(), and SubstInitializer().

Referenced by InstantiateClassMembers().

## ◆ InstantiateMemInitializers()

void Sema::InstantiateMemInitializers | ( | CXXConstructorDecl * | New,
|  | const CXXConstructorDecl * | Tmpl,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 5200 of file SemaTemplateInstantiateDecl.cpp.

References collectUnexpandedParameterPacks(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::NamedDecl::getDeclName(), clang::CXXMethodDecl::getParent(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::CXXConstructorDecl::inits(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), and clang::Decl::setInvalidDecl().

## ◆ InstantiateVariableDefinition()

void Sema::InstantiateVariableDefinition | ( | SourceLocation | PointOfInstantiation,
|  | VarDecl * | Var,
|  | bool | Recursive = `false`,
|  | bool | DefinitionRequired = `false`,
|  | bool | AtEndOfTU = `false`
| ) |  |

Instantiate the definition of the given variable from its template.

Parameters

  PointOfInstantiation | the point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the variable, but it's close.
  Var | the already-instantiated declaration of a templated variable.
  Recursive | if true, recursively instantiates any functions that are required by this instantiation.
  DefinitionRequired | if true, then we are performing an explicit instantiation where a definition of the variable is required. Complain if there is no such definition.

Definition at line 4978 of file SemaTemplateInstantiateDecl.cpp.

References clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::VarTemplateSpecializationDecl::getTemplateArgsInfo(), clang::VarDecl::getTemplateInstantiationPattern(), clang::VarDecl::getTemplateSpecializationKindForInstantiation(), clang::VarDecl::hasInit(), clang::Sema::InstantiatingTemplate::isAlreadyInstantiating(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::VarDecl::isStaticDataMember(), and clang::TSK_ExplicitSpecialization.

Referenced by DoMarkVarDeclReferenced(), and InstantiateClassMembers().

## ◆ InstantiateVariableInitializer()

void Sema::InstantiateVariableInitializer | ( | VarDecl * | Var,
|  | VarDecl * | OldVar,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Instantiate the initializer of a variable.

Definition at line 4895 of file SemaTemplateInstantiateDecl.cpp.

References clang::VarDecl::CallInit, clang::CUDA, clang::DirectInit, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getDeclContext(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::VarDecl::getInit(), clang::VarDecl::getInitStyle(), clang::Decl::hasAttr(), clang::VarDecl::hasInit(), clang::Expr::isConstantInitializer(), clang::VarDecl::isCXXForRangeDecl(), clang::VarDecl::isDirectInit(), clang::VarDecl::isInline(), clang::VarDecl::isInlineSpecified(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::VarDecl::isObjCForDecl(), clang::VarDecl::isOutOfLine(), clang::VarDecl::isStaticDataMember(), PotentiallyEvaluated, clang::VarDecl::setImplicitlyInline(), clang::VarDecl::setInlineSpecified(), and clang::Decl::setInvalidDecl().

## ◆ inTemplateInstantiation()

bool clang::Sema::inTemplateInstantiation | ( |  | ) | const
| inline

Determine whether we are currently performing template instantiation.

Definition at line 8412 of file Sema.h.

Referenced by BuildCXXNoexceptExpr(), CheckIdentityFieldAssignment(), checkLiteralOperatorTemplateParameterList(), CheckMoveOnConstruction(), CheckTautologicalComparison(), DiagnoseFloatingImpCast(), DiagnoseForRangeVariableCopies(), DiagnoseSelfAssignment(), diagnoseTautologicalComparison(), DiagnoseTwoPhaseLookup(), makeUnavailableInSystemHeader(), SemaBuiltinSEHScopeCheck(), warnAboutRedundantParens(), and warnBracedScalarInit().

## ◆ InvalidLogicalVectorOperands()

QualType Sema::InvalidLogicalVectorOperands | ( | SourceLocation | Loc,
|  | ExprResult & | LHS,
|  | ExprResult & | RHS
| ) |  |

Definition at line 8867 of file SemaExpr.cpp.

References Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreImpCasts(), and clang::Type::isVectorType().

## ◆ InvalidOperands()

QualType Sema::InvalidOperands | ( | SourceLocation | Loc,
|  | ExprResult & | LHS,
|  | ExprResult & | RHS
| ) |  |

the following "Check" methods will return a valid/converted QualType or a null QualType (indicating an error diagnostic was issued).

type checking binary operators (subroutines of CreateBuiltinBinOp).

Definition at line 8840 of file SemaExpr.cpp.

References Diag(), and clang::ActionResult< PtrTy, CompressInvalid >::get().

Referenced by checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), and convertPointersToCompositeType().

## ◆ InventAbbreviatedTemplateParameterTypeName()

IdentifierInfo * Sema::InventAbbreviatedTemplateParameterTypeName | ( | IdentifierInfo * | ParamName,
|  | unsigned | Index
| ) |  |

Invent a new identifier for parameters of abbreviated templates.

Definition at line 56 of file Sema.cpp.

Referenced by InventTemplateParameter().

## ◆ isAbstractType()

bool Sema::isAbstractType | ( | SourceLocation | Loc,
|  | QualType | T
| ) |  |

Definition at line 5529 of file SemaDeclCXX.cpp.

References clang::CPlusPlus.

Referenced by EvaluateBinaryTypeTrait().

## ◆ isAcceptableNestedNameSpecifier()

bool Sema::isAcceptableNestedNameSpecifier | ( | const NamedDecl * | SD,
|  | bool * | IsExtension = `nullptr`
| ) |  |

Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier.

Parameters

  SD | Declaration checked for nested-name-specifier.
  IsExtension | If not null and the declaration is accepted as an extension, the pointed variable is assigned true.

Definition at line 314 of file SemaCXXScopeSpec.cpp.

References Context, clang::ASTContext::getLangOpts(), clang::ASTContext::getTypeDeclType(), clang::NamedDecl::getUnderlyingDecl(), and clang::Type::isDependentType().

Referenced by compareOverloads().

## ◆ isAcceptableTagRedeclaration()

bool Sema::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.

Returns
  true if the new tag kind is acceptable, false otherwise.

Definition at line 14654 of file SemaDecl.cpp.

Referenced by clang::TreeTransform< Derived >::RebuildDependentNameType().

## ◆ IsAllowedCUDACall()

bool clang::Sema::IsAllowedCUDACall | ( | const FunctionDecl * | Caller,
|  | const FunctionDecl * | Callee
| ) |  |
| inline

Determines whether Caller may invoke Callee, based on their CUDA host/device attributes.

Returns false if the call is not allowed.

Note: Will return true for CFP_WrongSide calls. These may appear in semantically correct CUDA programs, but only if they're never codegen'ed.

Definition at line 11365 of file Sema.h.

## ◆ IsAtLeastAsConstrained()

bool Sema::IsAtLeastAsConstrained | ( | NamedDecl * | D1,
|  | ArrayRef< const Expr *> | AC1,
|  | NamedDecl * | D2,
|  | ArrayRef< const Expr *> | AC2,
|  | bool & | Result
| ) |  |

Check whether the given declaration's associated constraints are at least as constrained than another declaration's according to the partial ordering of constraints.

Parameters

  Result | If no error occurred, receives the result of true if D1 is at least constrained than D2, and false otherwise.

Returns
  true if an error occurred, false otherwise.

Definition at line 881 of file SemaConcept.cpp.

References clang::AtomicConstraint::subsumes(), and subsumes().

## ◆ IsBlockPointerConversion()

bool Sema::IsBlockPointerConversion | ( | QualType | FromType,
|  | QualType | ToType,
|  | QualType & | ConvertedType
| ) |  |

Definition at line 2728 of file SemaOverload.cpp.

References clang::Type::getAs(), and clang::Type::getPointeeType().

Referenced by IsStandardConversion().

## ◆ isCast()

static bool clang::Sema::isCast | ( | CheckedConversionKind | CCK | ) |
| inline static

Definition at line 10469 of file Sema.h.

References clang::VK_RValue.

Referenced by diagnoseObjCARCConversion(), and PerformImplicitConversion().

## ◆ isCompleteType()

bool clang::Sema::isCompleteType | ( | SourceLocation | Loc,
|  | QualType | T
| ) |  |
| inline

Definition at line 1817 of file Sema.h.

Referenced by ActOnCXXDelete(), buildDeclareReductionRef(), checkTupleLikeDecomposition(), EvaluateBinaryTypeTrait(), isNullPointerValueTemplateArgument(), IsUserDefinedConversion(), lookupStdTypeTraitMember(), PerformImplicitConversion(), ResolveConstructorOverload(), TryConstructorInitialization(), TryListConversion(), TryListInitialization(), TryReferenceInit(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticDowncast(), TryStaticMemberPointerUpcast(), and TryUserDefinedConversion().

## ◆ IsComplexPromotion()

bool Sema::IsComplexPromotion | ( | QualType | FromType,
|  | QualType | ToType
| ) |  |

Determine if a conversion is a complex promotion.

A complex promotion is defined as a complex -> complex conversion where the conversion between the underlying real types is a floating-point or integral promotion.

Definition at line 2244 of file SemaOverload.cpp.

References clang::Type::getAs(), and clang::ComplexType::getElementType().

Referenced by IsStandardConversion().

## ◆ isConstantEvaluated()

bool clang::Sema::isConstantEvaluated | ( |  | ) |
| inline

Definition at line 833 of file Sema.h.

Referenced by AnalyzeComparison(), checkFormatStringExpr(), CheckImplicitConversion(), and CheckNonNullArguments().

## ◆ isCopyElisionCandidate()

bool Sema::isCopyElisionCandidate | ( | QualType | ReturnType,
|  | const VarDecl * | VD,
|  | CopyElisionSemanticsKind | CESK
| ) |  |

Definition at line 3004 of file SemaStmt.cpp.

References clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::QualType::isNull(), and clang::Type::isRecordType().

Referenced by clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ isCurrentClassName()

bool Sema::isCurrentClassName | ( | const IdentifierInfo & | II,
|  | Scope * | S,
|  | const CXXScopeSpec * | SS = `nullptr`
| ) |  |

isCurrentClassName - Determine whether the identifier II is the name of the class type currently being defined.

In the case of nested classes, this will only return true if II is the name of the innermost class.

Definition at line 2345 of file SemaDeclCXX.cpp.

References clang::NamedDecl::getIdentifier().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ isCurrentClassNameTypo()

bool Sema::isCurrentClassNameTypo | ( | IdentifierInfo *& | II,
|  | const CXXScopeSpec * | SS
| ) |  |

Determine whether the identifier II is a typo for the name of the class type currently being defined.

If so, update it to the identifier that should have been used.

Definition at line 2354 of file SemaDeclCXX.cpp.

References clang::CPlusPlus, clang::IdentifierInfo::getLength(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().

## ◆ isDeclInScope()

bool Sema::isDeclInScope | ( | NamedDecl * | D,
|  | DeclContext * | Ctx,
|  | Scope * | S = `nullptr`,
|  | bool | AllowInlineNamespace = `false`
| ) |  |

isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns true if 'D' belongs to the given declaration context.

Parameters

  AllowInlineNamespace | If `true`, allow the declaration to be in the enclosing namespace set of the context, rather than contained directly within it.

Definition at line 1490 of file SemaDecl.cpp.

Referenced by EndOpenMPDSABlock().

## ◆ isDeductionGuideName()

bool Sema::isDeductionGuideName | ( | Scope * | S,
|  | const IdentifierInfo & | Name,
|  | SourceLocation | NameLoc,
|  | ParsedTemplateTy * | Template = `nullptr`
| ) |  |

Determine whether a particular identifier might be the name in a C++1z deduction-guide declaration.

Definition at line 268 of file SemaTemplate.cpp.

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ IsDependentFunctionNameExpr()

bool Sema::IsDependentFunctionNameExpr | ( | Expr * | E | ) |

Check whether the given type-dependent expression will be the name of a function or another callable function-like entity (e.g.

a function

Definition at line 18153 of file SemaExpr.cpp.

References clang::Expr::isTypeDependent().

## ◆ isDependentScopeSpecifier()

bool Sema::isDependentScopeSpecifier | ( | const CXXScopeSpec & | SS | ) |

Definition at line 167 of file SemaCXXScopeSpec.cpp.

References clang::CXXScopeSpec::getScopeRep(), clang::NestedNameSpecifier::isDependent(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().

## ◆ IsDerivedFrom() [1/2]

bool Sema::IsDerivedFrom | ( | SourceLocation | Loc,
|  | QualType | Derived,
|  | QualType | Base
| ) |  |

Determine whether the type `Derived` is a C++ class that is derived from the type `Base`.

Definition at line 2744 of file SemaDeclCXX.cpp.

References clang::CPlusPlus, clang::Type::getAsCXXRecordDecl(), clang::TagDecl::isBeingDefined(), clang::CXXRecordDecl::isDerivedFrom(), and clang::Decl::isInvalidDecl().

Referenced by buildDeclareReductionRef(), buildUserDefinedMapperRef(), CheckPointerToMemberOperands(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), FindCompositePointerType(), getCastAwayConstnessCastKind(), IsUserDefinedConversion(), TryClassUnification(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryObjectArgumentInitialization(), and TryUserDefinedConversion().

## ◆ IsDerivedFrom() [2/2]

bool Sema::IsDerivedFrom | ( | SourceLocation | Loc,
|  | QualType | Derived,
|  | QualType | Base,
|  | CXXBasePaths & | Paths
| ) |  |

Determine whether the type `Derived` is a C++ class that is derived from the type `Base`.

Definition at line 2771 of file SemaDeclCXX.cpp.

## ◆ isEmptyCudaConstructor()

bool Sema::isEmptyCudaConstructor | ( | SourceLocation | Loc,
|  | CXXConstructorDecl * | CD
| ) |  |

Returns
  true if `CD` can be considered empty according to CUDA (E.2.3.1 in CUDA 7.5 Programming guide).

Definition at line 407 of file SemaCUDA.cpp.

References clang::Redeclarable< decl_type >::getFirstDecl(), clang::FunctionDecl::getNumParams(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::hasTrivialBody(), clang::CXXConstructorDecl::inits(), InstantiateFunctionDefinition(), clang::FunctionDecl::isDefined(), clang::CXXRecordDecl::isDynamicClass(), clang::FunctionDecl::isTemplateInstantiation(), and clang::FunctionDecl::isTrivial().

Referenced by checkAllowedCUDAInitializer().

## ◆ isEmptyCudaDestructor()

bool Sema::isEmptyCudaDestructor | ( | SourceLocation | Loc,
|  | CXXDestructorDecl * | CD
| ) |  |

Definition at line 441 of file SemaCUDA.cpp.

References clang::CXXRecordDecl::bases(), clang::RecordDecl::fields(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::hasTrivialBody(), InstantiateFunctionDefinition(), clang::FunctionDecl::isDefined(), clang::CXXRecordDecl::isDynamicClass(), clang::FunctionDecl::isTemplateInstantiation(), and clang::FunctionDecl::isTrivial().

Referenced by checkAllowedCUDAInitializer().

## ◆ isEquivalentInternalLinkageDeclaration()

bool Sema::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.

Determine whether two declarations are "equivalent" for the purposes of name lookup and overload resolution.

This applies when the same internal/no linkage entity is defined by two modules (probably by textually including the same header). In such a case, we don't consider the declarations to declare the same entity, but we also don't want lookups with both declarations visible to be ambiguous in some cases (this happens when using a modularized libstdc++).

Definition at line 9658 of file SemaOverload.cpp.

## ◆ isExternalWithNoLinkageType()

bool Sema::isExternalWithNoLinkageType | ( | ValueDecl * | VD | ) |

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".

Determine whether ND is an external-linkage function or variable whose type has no linkage.

Definition at line 672 of file Sema.cpp.

References getLangOpts(), clang::Type::getLinkage(), clang::ValueDecl::getType(), clang::NamedDecl::hasExternalFormalLinkage(), clang::isExternalFormalLinkage(), and isFunctionOrVarDeclExternC().

Referenced by getUndefinedButUsed(), and MarkVarDeclODRUsed().

## ◆ IsFloatingPointPromotion()

bool Sema::IsFloatingPointPromotion | ( | QualType | FromType,
|  | QualType | ToType
| ) |  |

IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating point promotion (C++ 4.6).

If so, returns true and sets PromotedType to the promoted type.

An rvalue of type float can be converted to an rvalue of type double. (C++ 4.6p1).

Definition at line 2210 of file SemaOverload.cpp.

References clang::Type::getAs().

Referenced by IsStandardConversion().

## ◆ IsFunctionConversion()

bool Sema::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.

Definition at line 1528 of file SemaOverload.cpp.

Referenced by checkPointerTypesForAssignment(), handlerCanCatch(), and IsStandardConversion().

## ◆ isImplicitlyDeleted()

bool Sema::isImplicitlyDeleted | ( | FunctionDecl * | FD | ) |

Determine whether the given function is an implicitly-deleted special member function.

Definition at line 14430 of file SemaDeclCXX.cpp.

References clang::FunctionDecl::isDefaulted(), and clang::FunctionDecl::isDeleted().

## ◆ isIncompatibleTypedef()

bool Sema::isIncompatibleTypedef | ( | TypeDecl * | Old,
|  | TypedefNameDecl * | New
| ) |  |

Definition at line 2183 of file SemaDecl.cpp.

Referenced by clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl().

## ◆ isInitListConstructor()

bool Sema::isInitListConstructor | ( | const FunctionDecl * | Ctor | ) |

Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2.

Definition at line 10917 of file SemaDeclCXX.cpp.

References clang::Type::getAs(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::Type::getPointeeType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), and clang::ParmVarDecl::hasDefaultArg().

Referenced by IsInitializerListConstructorConversion(), and ResolveConstructorOverload().

## ◆ isInOpenMPDeclareTargetContext()

bool clang::Sema::isInOpenMPDeclareTargetContext | ( |  | ) | const
| inline

Return true inside OpenMP declare target region.

Definition at line 9834 of file Sema.h.

Referenced by MarkExprReferenced().

## ◆ isInOpenMPTargetExecutionDirective()

bool Sema::isInOpenMPTargetExecutionDirective | ( |  | ) | const

Return true inside OpenMP target region.

Definition at line 1967 of file SemaOpenMP.cpp.

References DSAStack, and clang::isOpenMPTargetExecutionDirective().

## ◆ IsInsideALocalClassWithinATemplateFunction()

bool Sema::IsInsideALocalClassWithinATemplateFunction | ( |  | ) |

Definition at line 10654 of file SemaTemplate.cpp.

References clang::DeclContext::getParent(), clang::FunctionDecl::getTemplatedKind(), clang::DeclContext::isNamespace(), clang::DeclContext::isTranslationUnit(), and clang::FunctionDecl::TK_NonTemplate.

## ◆ IsIntegralPromotion()

bool Sema::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).

If so, returns true and sets PromotedType to the promoted type.

Definition at line 2049 of file SemaOverload.cpp.

References clang::Type::getAs(), clang::Type::isBooleanType(), clang::Type::isEnumeralType(), clang::Type::isPromotableIntegerType(), and clang::Type::isSignedIntegerType().

Referenced by IsStandardConversion().

## ◆ IsInvalidUnlessNestedName()

bool Sema::IsInvalidUnlessNestedName | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | NestedNameSpecInfo & | IdInfo,
|  | bool | EnteringContext
| ) |  |

IsInvalidUnlessNestedName - This method is used for error recovery purposes to determine whether the specified identifier is only valid as a nested name specifier, for example a namespace name.

It is conservatively correct to always return false from this method.

The arguments are the same as those passed to ActOnCXXNestedNameSpecifier.

Definition at line 878 of file SemaCXXScopeSpec.cpp.

## ◆ isKnownName()

bool Sema::isKnownName | ( | StringRef | name | ) |

Definition at line 3590 of file SemaExprObjC.cpp.

Referenced by diagnoseObjCARCConversion().

## ◆ isLaxVectorConversion()

bool Sema::isLaxVectorConversion | ( | QualType | srcType,
|  | QualType | destType
| ) |  |

Is this a legal conversion between two types, one of which is known to be a vector type?

Definition at line 6658 of file SemaExpr.cpp.

References clang::Type::isVectorType().

Referenced by IsVectorConversion().

## ◆ isLibstdcxxEagerExceptionSpecHack()

bool clang::Sema::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.

HACK: libstdc++ has a bug where it shadows std::swap with a member swap function then tries to call std::swap unqualified from the exception specification of that function.

This function detects whether we're in such a case and turns off delay-parsing of exception specifications.

Definition at line 42 of file SemaExceptionSpec.cpp.

References Context, CurContext, clang::Declarator::getBeginLoc(), clang::Declarator::getIdentifier(), clang::ASTContext::getSourceManager(), clang::SourceManager::isInSystemHeader(), clang::DeclContext::isStdNamespace(), and clang::IdentifierInfo::isStr().

## ◆ isMemberAccessibleForDeletion() [1/2]

bool Sema::isMemberAccessibleForDeletion | ( | CXXRecordDecl * | NamingClass,
|  | DeclAccessPair | Found,
|  | QualType | ObjectType,
|  | SourceLocation | Loc,
|  | const PartialDiagnostic & | Diag
| ) |  |

Is the given member accessible for the purposes of deciding whether to define a special member function as deleted?

Definition at line 1565 of file SemaAccess.cpp.

References clang::AS_public, and clang::DeclAccessPair::getAccess().

## ◆ isMemberAccessibleForDeletion() [2/2]

bool clang::Sema::isMemberAccessibleForDeletion | ( | CXXRecordDecl * | NamingClass,
|  | DeclAccessPair | Found,
|  | QualType | ObjectType
| ) |  |
| inline

Definition at line 6775 of file Sema.h.

## ◆ IsMemberPointerConversion()

bool Sema::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).

If so, returns true and places the converted type (that might differ from ToType in its cv-qualifiers at some level) into ConvertedType.

Definition at line 3058 of file SemaOverload.cpp.

References clang::Type::getAs(), and clang::Expr::isNullPointerConstant().

Referenced by IsStandardConversion().

## ◆ isMicrosoftMissingTypename()

bool Sema::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.

This is needed for MSVC compatibility; Example:

template<class T> class A {
public:
typedef int TYPE;
};
template<class T> class B : public A<T> {
public:
A<T>::TYPE a; // no typename required because A<T> is a base class.
};

Definition at line 642 of file SemaDecl.cpp.

## ◆ isModuleVisible()

bool Sema::isModuleVisible | ( | const Module * | M,
|  | bool | ModulePrivate = `false`
| ) |  |

Definition at line 1782 of file SemaLookup.cpp.

References clang::NamedDecl::isExternallyDeclarable(), isInCurrentModule(), clang::Module::isModuleVisible(), and clang::LookupResult::isVisible().

Referenced by hasVisibleMemberSpecialization().

## ◆ isMoreSpecializedThanPrimary() [1/2]

bool Sema::isMoreSpecializedThanPrimary | ( | ClassTemplatePartialSpecializationDecl * | T,
|  | sema::TemplateDeductionInfo & | Info
| ) |  |

Definition at line 5305 of file SemaTemplateDeduction.cpp.

References clang::sema::TemplateDeductionInfo::clearSFINAEDiagnostic(), clang::TemplateDecl::getAssociatedConstraints(), clang::ClassTemplatePartialSpecializationDecl::getAssociatedConstraints(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ClassTemplatePartialSpecializationDecl::getInjectedSpecializationType(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), and isAtLeastAsSpecializedAs().

Referenced by checkMoreSpecializedThanPrimary().

## ◆ isMoreSpecializedThanPrimary() [2/2]

bool Sema::isMoreSpecializedThanPrimary | ( | VarTemplatePartialSpecializationDecl * | T,
|  | sema::TemplateDeductionInfo & | Info
| ) |  |

Definition at line 5369 of file SemaTemplateDeduction.cpp.

References clang::VarTemplateSpecializationDecl::getSpecializedTemplate().

## ◆ isNonTypeNestedNameSpecifier()

bool Sema::isNonTypeNestedNameSpecifier | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | NestedNameSpecInfo & | IdInfo
| ) |  |

Definition at line 383 of file SemaCXXScopeSpec.cpp.

## ◆ isObjCMethodDecl()

bool clang::Sema::isObjCMethodDecl | ( | Decl * | D | ) |
| inline

Definition at line 2342 of file Sema.h.

References clang::ast_matchers::expr.

## ◆ isObjCPointerConversion()

bool Sema::isObjCPointerConversion | ( | QualType | FromType,
|  | QualType | ToType,
|  | QualType & | ConvertedType,
|  | bool & | IncompatibleObjC
| ) |  |

isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion.

Subroutine of IsPointerConversion, with the same arguments and return values.

Definition at line 2490 of file SemaOverload.cpp.

References clang::Type::getAs(), and clang::QualType::getQualifiers().

Referenced by DiagnosePropertyMismatch().

## ◆ isObjCWritebackConversion()

bool Sema::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.

Parameters

  FromType | The type we're converting form.
  ToType | The type we're converting to.
  ConvertedType | The type that will be produced after applying this conversion.

Construct the type we're converting to, which is a pointer to __autoreleasing pointee.

Definition at line 2670 of file SemaOverload.cpp.

Referenced by IsStandardConversion(), and tryObjCWritebackConversion().

## ◆ isOpenCLDisabledDecl()

bool Sema::isOpenCLDisabledDecl | ( | Decl * | FD | ) |

Definition at line 2285 of file Sema.cpp.

References Diag(), getOpenCLOptions(), and clang::OpenCLOptions::isEnabled().

## ◆ isOpenMPCapturedByRef()

bool Sema::isOpenMPCapturedByRef | ( | const ValueDecl * | D,
|  | unsigned | Level,
|  | unsigned | OpenMPCaptureLevel
| ) |  | const

Return true if the provided declaration VD should be captured by reference.

Parameters

  Level | Relative level of nested OpenMP construct for that the check is performed.
  OpenMPCaptureLevel | Capture level within an OpenMP construct.

Definition at line 1803 of file SemaOpenMP.cpp.

References clang::Type::castAs(), DSAStack, clang::Decl::getCanonicalDecl(), clang::ASTContext::getDeclAlign(), clang::ReferenceType::getPointeeType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::ASTContext::getTypeSizeInChars(), clang::ASTContext::getUIntPtrType(), getVariableCategoryFromDecl(), clang::Decl::hasAttr(), and clang::isOpenMPTargetExecutionDirective().

## ◆ isOpenMPCapturedDecl()

VarDecl * Sema::isOpenMPCapturedDecl | ( | ValueDecl * | D,
|  | bool | CheckScopeInfo = `false`,
|  | unsigned | StopAt = `0`
| ) |  |

Check if the specified variable is used in one of the private clauses (private, firstprivate, lastprivate, reduction etc.) in OpenMP constructs.

Definition at line 1978 of file SemaOpenMP.cpp.

References clang::CR_OpenMP, DSAStack, getCanonicalDecl(), clang::getOpenMPCaptureRegions(), clang::isOpenMPPrivate(), clang::isOpenMPThreadPrivate(), and clang::OMPC_unknown.

Referenced by buildCapture().

## ◆ isOpenMPPrivateDecl()

bool Sema::isOpenMPPrivateDecl | ( | const ValueDecl * | D,
|  | unsigned | Level
| ) |  | const

Check if the specified variable is used in 'private' clause.

Parameters

  Level | Relative level of nested OpenMP construct for that the check is performed.

Definition at line 2082 of file SemaOpenMP.cpp.

References DSAStack, clang::Decl::getCanonicalDecl(), clang::isOpenMPLoopDirective(), and clang::isOpenMPSimdDirective().

## ◆ isOpenMPTargetCapturedDecl()

bool Sema::isOpenMPTargetCapturedDecl | ( | const ValueDecl * | D,
|  | unsigned | Level
| ) |  | const

Check if the specified variable is captured by 'target' directive.

Parameters

  Level | Relative level of nested OpenMP construct for that the check is performed.

Definition at line 2154 of file SemaOpenMP.cpp.

References Diag(), DSAStack, clang::Decl::getAttr(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::getOpenMPSimpleClauseTypeName(), clang::VarDecl::hasLocalStorage(), clang::isOpenMPTargetExecutionDirective(), and clang::OMPC_device_type.

## ◆ IsOverload()

bool Sema::IsOverload | ( | FunctionDecl * | New,
|  | FunctionDecl * | Old,
|  | bool | IsForUsingDecl,
|  | bool | ConsiderCudaAttrs = `true`,
|  | bool | ConsiderRequiresClauses = `true`
| ) |  |

Definition at line 1139 of file SemaOverload.cpp.

References clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionDecl::isMain(), and clang::FunctionDecl::isMSVCRTEntryPoint().

Referenced by checkCUDATargetOverload(), and maybeAddCUDAHostDeviceAttrs().

## ◆ IsPointerConversion()

bool Sema::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).

If so, returns true and places the converted type (that might differ from ToType in its cv-qualifiers at some level) into ConvertedType.

This routine also supports conversions to and from block pointers and conversions with Objective-C's 'id', 'id<protocols...>', and pointers to interfaces. FIXME: Once we've determined the appropriate overloading rules for Objective-C, we may want to split the Objective-C checks into a different routine; however, GCC seems to consider all of these conversions to be pointer conversions, so for now they live here. IncompatibleObjC will be set if the conversion is an allowed Objective-C conversion that should result in a warning.

Definition at line 2338 of file SemaOverload.cpp.

References isNullPointerConstantForConversion(), and clang::Type::isObjCObjectPointerType().

Referenced by IsStandardConversion().

## ◆ IsQualificationConversion()

bool Sema::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).

Parameters

  ObjCLifetimeConversion | Output parameter that will be set to indicate when the qualification conversion involves a change in the Objective-C object lifetime.

Definition at line 3244 of file SemaOverload.cpp.

Referenced by CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), handlerCanCatch(), isNullPointerValueTemplateArgument(), and IsStandardConversion().

## ◆ isQualifiedMemberAccess()

bool Sema::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.

Definition at line 13802 of file SemaExpr.cpp.

References clang::NamedDecl::isCXXClassMember().

## ◆ isSameOrCompatibleFunctionType()

bool Sema::isSameOrCompatibleFunctionType | ( | CanQualType | Param,
|  | CanQualType | Arg
| ) |  |

Compare types for equality with respect to possibly compatible function types (noreturn adjustment, implicit calling conventions).

If any of parameter and argument is not a function, just perform type comparison.

Parameters

  Param | the template parameter type.
  Arg | the argument type.

Definition at line 1158 of file SemaTemplateDeduction.cpp.

References clang::CanQual< T >::getAs().

## ◆ isSelfExpr() [1/2]

bool Sema::isSelfExpr | ( | Expr * | RExpr | ) |

Private Helper predicate to check for 'self'.

Definition at line 1792 of file SemaExprObjC.cpp.

Referenced by LookupMethodInReceiverType().

## ◆ isSelfExpr() [2/2]

bool Sema::isSelfExpr | ( | Expr * | RExpr,
|  | const ObjCMethodDecl * | Method
| ) |  |

Definition at line 1799 of file SemaExprObjC.cpp.

References clang::ObjCMethodDecl::getSelfDecl(), and clang::Expr::IgnoreParenLValueCasts().

## ◆ isSFINAEContext()

Optional< TemplateDeductionInfo * > Sema::isSFINAEContext | ( |  | ) | const

Determines whether we are currently in a context where template argument substitution failures are not considered errors.

Returns
  An empty `Optional` if we're not in a SFINAE context. Otherwise, contains a pointer that, if non-NULL, contains the nearest template-deduction context object, which can be used to capture diagnostics that will be suppressed.

Definition at line 814 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts, clang::Sema::CodeSynthesisContext::ConstraintNormalization, clang::Sema::CodeSynthesisContext::ConstraintsCheck, clang::Sema::CodeSynthesisContext::ConstraintSubstitution, CurrentInstantiationScope, clang::Sema::CodeSynthesisContext::DeclaringImplicitEqualityComparison, clang::Sema::CodeSynthesisContext::DeclaringSpecialMember, clang::Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution, clang::Sema::CodeSynthesisContext::DefaultFunctionArgumentInstantiation, clang::Sema::CodeSynthesisContext::DefaultTemplateArgumentChecking, clang::Sema::CodeSynthesisContext::DefaultTemplateArgumentInstantiation, clang::Sema::CodeSynthesisContext::DefiningSynthesizedFunction, Depth, clang::Sema::CodeSynthesisContext::ExceptionSpecEvaluation, clang::Sema::CodeSynthesisContext::ExceptionSpecInstantiation, clang::Sema::CodeSynthesisContext::ExplicitTemplateArgumentSubstitution, clang::LocalInstantiationScope::getPartiallySubstitutedPack(), InNonInstantiationSFINAEContext, clang::LocalInstantiationScope::MakeInstantiatedLocalArgPack(), clang::Sema::CodeSynthesisContext::Memoization, clang::Sema::CodeSynthesisContext::NestedRequirementConstraintsCheck, clang::Sema::CodeSynthesisContext::ParameterMappingSubstitution, clang::Sema::CodeSynthesisContext::PriorTemplateArgumentSubstitution, clang::Sema::CodeSynthesisContext::RequirementInstantiation, clang::Result, clang::Sema::CodeSynthesisContext::RewritingOperatorAsSpaceship, and clang::Sema::CodeSynthesisContext::TemplateInstantiation.

Referenced by ActOnCXXDelete(), ActOnPseudoDestructorExpr(), CheckArrow(), computeDeclContext(), CopyObject(), diagnoseNoViableConversion(), EmitCurrentDiagnostic(), recordConversion(), RequireCompleteDeclContext(), and clang::Sema::SFINAETrap::SFINAETrap().

## ◆ isSimpleTypeSpecifier()

bool Sema::isSimpleTypeSpecifier | ( | tok::TokenKind | Kind | ) | const

Determine whether the token kind starts a simple-type-specifier.

Definition at line 124 of file SemaDecl.cpp.

## ◆ IsSimplyAccessible()

bool Sema::IsSimplyAccessible | ( | NamedDecl * | Target,
|  | CXXRecordDecl * | NamingClass,
|  | QualType | BaseType
| ) |  |

Checks access to Target from the given class.

The check will take access specifiers into account, but no member access expressions and such.

Parameters

  Target | the declaration to check if it can be accessed
  NamingClass | the class in which the lookup was started.
  BaseType | type of the left side of member access expression. `BaseType` and `NamingClass` are used for C++ access control. Depending on the lookup case, they should be set to the following: lhs.target (member access without a qualifier): `BaseType` and `NamingClass` are both the type of 'lhs'. lhs.X::target (member access with a qualifier): BaseType is the type of 'lhs', NamingClass is 'X' X::target (qualified lookup without member access): BaseType is null, NamingClass is 'X'. target (unqualified lookup). BaseType is null, NamingClass is the parent class of 'target'.

Returns
  true if the Target is accessible from the Class, false otherwise.

Definition at line 1894 of file SemaAccess.cpp.

References clang::NamedDecl::isCXXClassMember().

## ◆ isStdInitializerList()

bool Sema::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.

Definition at line 10808 of file SemaDeclCXX.cpp.

References clang::CPlusPlus, clang::TemplateArgumentList::data(), clang::Type::getAs(), clang::TemplateArgument::getAsType(), clang::ClassTemplateDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::TemplateParameterList::getMinRequiredArguments(), clang::TemplateParameterList::getParam(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::ClassTemplateDecl::getTemplatedDecl(), and clang::TemplateDecl::getTemplateParameters().

Referenced by DeduceFromInitializerList(), diagnoseListInit(), TryListConversion(), and TryListInitialization().

## ◆ IsStringLiteralToNonConstPointerConversion()

bool Sema::IsStringLiteralToNonConstPointerConversion | ( | Expr * | From,
|  | QualType | ToType
| ) |  |

Helper function to determine whether this is the (deprecated) C++ conversion from a string literal to a pointer to non-const char or non-const wchar_t (for narrow and wide string literals, respectively).

Definition at line 3691 of file SemaExprCXX.cpp.

References clang::StringLiteral::Ascii, clang::interp::Cast(), Context, clang::Type::getAs(), clang::Type::getPointeeType(), clang::ASTContext::getWideCharType(), clang::Expr::IgnoreParens(), clang::ASTContext::typesAreCompatible(), clang::StringLiteral::UTF16, clang::StringLiteral::UTF32, clang::StringLiteral::UTF8, and clang::StringLiteral::Wide.

Referenced by IsStandardConversion().

## ◆ isTagName()

DeclSpec::TST Sema::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").

If so, this returns the TST for the tag corresponding to it (TST_enum, TST_union, TST_struct, TST_interface, TST_class). This is used to diagnose cases in C where the user forgot to specify the tag.

Definition at line 609 of file SemaDecl.cpp.

## ◆ isTemplateName()

TemplateNameKind Sema::isTemplateName | ( | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | bool | hasTemplateKeyword,
|  | const UnqualifiedId & | Name,
|  | ParsedType | ObjectType,
|  | bool | EnteringContext,
|  | TemplateTy & | Template,
|  | bool & | MemberOfUnknownSpecialization
| ) |  |

Definition at line 128 of file SemaTemplate.cpp.

Referenced by clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().

## ◆ isTemplateTemplateParameterAtLeastAsSpecializedAs()

bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs | ( | TemplateParameterList * | PParam,
|  | TemplateDecl * | AArg,
|  | SourceLocation | Loc
| ) |  |

Definition at line 5405 of file SemaTemplateDeduction.cpp.

References X.

## ◆ isThisOutsideMemberFunctionBody()

bool Sema::isThisOutsideMemberFunctionBody | ( | QualType | BaseType | ) |

Determine whether the given type is the type of *this that is used outside of the body of a member function for a type that is currently being defined.

Definition at line 1280 of file SemaExprCXX.cpp.

References CXXThisTypeOverride, clang::Type::getAsCXXRecordDecl(), clang::TagDecl::isBeingDefined(), and clang::QualType::isNull().

Referenced by LookupMemberExprInRecord().

## ◆ isUnavailableAlignedAllocationFunction()

bool Sema::isUnavailableAlignedAllocationFunction | ( | const FunctionDecl & | FD | ) | const

Determine whether `FD` is an aligned allocation or deallocation function that is unavailable.

Definition at line 1741 of file SemaExprCXX.cpp.

References getLangOpts(), clang::FunctionDecl::isDefined(), and clang::FunctionDecl::isReplaceableGlobalAllocationFunction().

Referenced by diagnoseUnavailableAlignedAllocation().

## ◆ isUnevaluatedContext()

bool clang::Sema::isUnevaluatedContext | ( |  | ) | const
| inline

Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.

Definition at line 8441 of file Sema.h.

Referenced by CheckCXXThisCapture(), CheckIdentityFieldAssignment(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckVirtualDtorCall(), DiagnoseSelfAssignment(), clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext(), LookupMemberExpr(), and LookupMethodInReceiverType().

## ◆ isUnexpandedParameterPackPermitted()

bool Sema::isUnexpandedParameterPackPermitted | ( |  | ) |

Determine whether an unexpanded parameter pack might be permitted in this location.

Determine whether it's possible for an unexpanded parameter pack to be valid in this location.

Useful for error recovery.

This only happens when we're in a declaration that is nested within an expression that could be expanded, such as a lambda-expression within a function call.

This is conservatively correct, but may claim that some unexpanded packs are permitted when they are not.

Definition at line 280 of file SemaTemplateVariadic.cpp.

## ◆ isUsualDeallocationFunction()

bool Sema::isUsualDeallocationFunction | ( | const CXXMethodDecl * | FD | ) |

Definition at line 1435 of file SemaExprCXX.cpp.

References CFP_HostDevice, CFP_WrongSide, clang::CUDA, CurContext, getLangOpts(), clang::FunctionDecl::getNumParams(), IdentifyCUDAPreference(), clang::CXXMethodDecl::isUsualDeallocationFunction(), and clang::Result.

Referenced by CheckOperatorDeleteDeclaration(), and isNonPlacementDeallocationFunction().

## ◆ isValidPointerAttrType()

bool clang::Sema::isValidPointerAttrType | ( | QualType | T,
|  | bool | RefOkay = `false`
| ) |  |

Determine if type T is a valid subject for a nonnull and similar attributes.

By default, we look through references (the behavior used by nonnull), but if the second parameter is true, then we treat a reference type as valid.

Referenced by CheckNonNullArguments().

## ◆ isValidVarArgType()

Sema::VarArgKind Sema::isValidVarArgType | ( | const QualType & | Ty | ) |

Determine the degree of POD-ness for an expression.

Incomplete types are considered POD, since this check can be performed when we're in an unevaluated context.

Definition at line 828 of file SemaExpr.cpp.

References clang::QualType::DK_nontrivial_c_struct, clang::QualType::isCXX98PODType(), clang::QualType::isDestructedType(), clang::Type::isIncompleteType(), clang::Type::isObjCObjectType(), and clang::Type::isVoidType().

## ◆ IsValueInFlagEnum()

bool Sema::IsValueInFlagEnum | ( | const EnumDecl * | ED,
|  | const llvm::APInt & | Val,
|  | bool | AllowMask
| ) |  | const

IsValueInFlagEnum - Determine if a value is allowed as part of a flag enum.

If AllowMask is true, then we also allow the complement of a valid value, to be used as a mask.

Definition at line 17468 of file SemaDecl.cpp.

References clang::EnumDecl::enumerators(), clang::EnumDecl::isClosedFlag(), and clang::TagDecl::isCompleteDefinition().

## ◆ isVisible()

bool clang::Sema::isVisible | ( | const NamedDecl * | D | ) |
| inline

Determine whether a declaration is visible to name lookup.

Definition at line 1761 of file Sema.h.

References clang::Decl::isHidden().

Referenced by argumentDependentLookup(), hasVisibleDeclarationImpl(), hasVisibleDefaultArgument(), isPreferredLookupResult(), and LookupQualifiedNameInUsingDirectives().

## ◆ IvarBacksCurrentMethodAccessor()

bool Sema::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'.

Definition at line 1847 of file SemaObjCProperty.cpp.

References clang::ObjCMethodDecl::getSelector(), clang::ObjCIvarDecl::getSynthesize(), clang::ObjCContainerDecl::instance_properties(), clang::ObjCMethodDecl::isInstanceMethod(), clang::ObjCMethodDecl::isPropertyAccessor(), clang::ObjCInterfaceDecl::known_extensions(), clang::ObjCInterfaceDecl::lookupMethod(), and clang::Property.

Referenced by LookupMemberExpr().

## ◆ LazilyCreateBuiltin()

NamedDecl * Sema::LazilyCreateBuiltin | ( | IdentifierInfo * | II,
|  | unsigned | ID,
|  | Scope * | S,
|  | bool | ForRedeclaration,
|  | SourceLocation | Loc
| ) |  |

LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope.

lazily create a decl for it. ForRedeclaration is true if we're creating this built-in in anticipation of redeclaring the built-in.

Definition at line 2046 of file SemaDecl.cpp.

## ◆ LoadExternalVTableUses()

void Sema::LoadExternalVTableUses | ( |  | ) |

Load any externally-stored vtable uses.

Definition at line 16713 of file SemaDeclCXX.cpp.

## ◆ LoadExternalWeakUndeclaredIdentifiers()

void Sema::LoadExternalWeakUndeclaredIdentifiers | ( |  | ) |

Load weak undeclared identifiers from the external source.

Definition at line 786 of file Sema.cpp.

References clang::ExternalSemaSource::ReadWeakUndeclaredIdentifiers(), and WeakUndeclaredIdentifiers.

Referenced by ActOnEndOfTranslationUnit().

## ◆ LookupBuiltin()

bool Sema::LookupBuiltin | ( | LookupResult & | R | ) |

Lookup a builtin function, when name lookup would otherwise fail.

Definition at line 855 of file SemaLookup.cpp.

References clang::LookupResult::addDecl(), clang::CPlusPlus, clang::DeclarationName::getAsIdentifierInfo(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), LookupOrdinaryName, LookupRedeclarationWithLinkage, and clang::OpenCL.

Referenced by LookupDirect().

## ◆ LookupConstructors()

DeclContext::lookup_result Sema::LookupConstructors | ( | CXXRecordDecl * | Class | ) |

Look up the constructors for the given class.

Definition at line 3335 of file SemaLookup.cpp.

References CanDeclareSpecialMemberFunction(), clang::Decl::getLocation(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), and clang::runWithSufficientStackSpace().

Referenced by CheckCXX98CompatAccessibleCopy(), CopyObject(), EvaluateUnaryTypeTrait(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), TryConstructorInitialization(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

## ◆ LookupCopyingAssignment()

CXXMethodDecl * Sema::LookupCopyingAssignment | ( | CXXRecordDecl * | Class,
|  | unsigned | Quals,
|  | bool | RValueThis,
|  | unsigned | ThisQuals
| ) |  |

Look up the copying assignment operator for the given class.

Definition at line 3354 of file SemaLookup.cpp.

References clang::Qualifiers::Const, clang::Sema::SpecialMemberOverloadResult::getMethod(), and clang::Qualifiers::Volatile.

## ◆ LookupCopyingConstructor()

CXXConstructorDecl * Sema::LookupCopyingConstructor | ( | CXXRecordDecl * | Class,
|  | unsigned | Quals
| ) |  |

Look up the copying constructor for the given class.

Definition at line 3313 of file SemaLookup.cpp.

References clang::Qualifiers::Const, clang::Sema::SpecialMemberOverloadResult::getMethod(), and clang::Qualifiers::Volatile.

## ◆ lookupCoroutineTraits()

ClassTemplateDecl * Sema::lookupCoroutineTraits | ( | SourceLocation | KwLoc,
|  | SourceLocation | FuncLoc
| ) |  |

Definition at line 1570 of file SemaCoroutine.cpp.

References Diag(), clang::Decl::getLocation(), and clang::Result.

## ◆ LookupDefaultConstructor()

CXXConstructorDecl * Sema::LookupDefaultConstructor | ( | CXXRecordDecl * | Class | ) |

Look up the default constructor for the given class.

Definition at line 3304 of file SemaLookup.cpp.

References clang::Sema::SpecialMemberOverloadResult::getMethod().

Referenced by TryConstructorInitialization(), TryListInitialization(), and TryValueInitialization().

## ◆ LookupDestructor()

CXXDestructorDecl * Sema::LookupDestructor | ( | CXXRecordDecl * | Class | ) |

Look for the destructor of the given class.

During semantic analysis, this routine should be used in lieu of CXXRecordDecl::getDestructor().

Returns
  The destructor for this class.

Definition at line 3392 of file SemaLookup.cpp.

Referenced by ActOnCXXDelete(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), checkDestructorReference(), EvaluateUnaryTypeTrait(), MaybeBindToTemporary(), and clang::InitializationSequence::Perform().

## ◆ LookupFactoryMethodInGlobalPool()

ObjCMethodDecl* clang::Sema::LookupFactoryMethodInGlobalPool | ( | Selector | Sel,
|  | SourceRange | R,
|  | bool | receiverIdOrClass = `false`
| ) |  |
| inline

LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures.

Definition at line 4043 of file Sema.h.

## ◆ LookupImplementedMethodInGlobalPool()

ObjCMethodDecl * Sema::LookupImplementedMethodInGlobalPool | ( | Selector | Sel | ) |

LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.

Definition at line 3621 of file SemaDeclObjC.cpp.

References clang::ObjCMethodDecl::isDefined(), clang::ObjCMethodDecl::isPropertyAccessor(), and MethodPool.

Referenced by DiagnoseUseOfUnimplementedSelectors().

## ◆ LookupInlineAsmField()

bool Sema::LookupInlineAsmField | ( | StringRef | Base,
|  | StringRef | Member,
|  | unsigned & | Offset,
|  | SourceLocation | AsmLoc
| ) |  |

Definition at line 776 of file SemaStmtAsm.cpp.

## ◆ LookupInlineAsmIdentifier()

ExprResult Sema::LookupInlineAsmIdentifier | ( | CXXScopeSpec & | SS,
|  | SourceLocation | TemplateKWLoc,
|  | UnqualifiedId & | Id,
|  | bool | IsUnevaluatedContext
| ) |  |

Definition at line 729 of file SemaStmtAsm.cpp.

References CheckNakedParmReference(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::isDependentType(), clang::Type::isFunctionType(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().

## ◆ LookupInlineAsmVarDeclField()

ExprResult Sema::LookupInlineAsmVarDeclField | ( | Expr * | RefExpr,
|  | StringRef | Member,
|  | SourceLocation | AsmLoc
| ) |  |

Definition at line 845 of file SemaStmtAsm.cpp.

References clang::Expr::getType(), clang::Type::isDependentType(), clang::DeclarationNameInfo::setLoc(), and clang::DeclarationNameInfo::setName().

## ◆ LookupInObjCMethod()

ExprResult Sema::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.

Perform some additional checks and determine if we should form a reference to an ivar. If so, build an expression referencing that ivar.

Definition at line 2745 of file SemaExpr.cpp.

References clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::LookupResult::getNameLoc(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::ActionResult< PtrTy, CompressInvalid >::isUsable().

Referenced by attemptRecovery().

## ◆ LookupInstanceMethodInGlobalPool()

ObjCMethodDecl* clang::Sema::LookupInstanceMethodInGlobalPool | ( | Selector | Sel,
|  | SourceRange | R,
|  | bool | receiverIdOrClass = `false`
| ) |  |
| inline

LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures.

Definition at line 4035 of file Sema.h.

Referenced by CheckKeyForObjCARCConversion(), and hasIsEqualMethod().

## ◆ LookupInSuper()

bool Sema::LookupInSuper | ( | LookupResult & | R,
|  | CXXRecordDecl * | Class
| ) |  |

Perform qualified name lookup into all base classes of the given class.

Parameters

  R | captures both the lookup criteria and any lookup results found.
  Class | The context in which qualified name lookup will search. Name lookup will search in all base classes merging the results.

Returns
  True if any decls were found (but possibly ambiguous)

Definition at line 2531 of file SemaLookup.cpp.

References clang::CXXRecordDecl::bases(), clang::LookupResult::getLookupKind(), and clang::LookupResult::getLookupNameInfo().

## ◆ LookupIvarInObjCMethod()

DeclResult Sema::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.

Perform some additional checks and determine if we should form a reference to an ivar.

Ideally, most of this would be done by lookup, but there's actually quite a lot of extra work involved.

Definition at line 2607 of file SemaExpr.cpp.

References clang::declaresSameEntity(), Diag(), clang::LookupResult::empty(), clang::ObjCIvarDecl::getAccessControl(), clang::ObjCMethodDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), clang::LookupResult::getNameLoc(), clang::ObjCMethodDecl::isClassMethod(), clang::Decl::isDefinedOutsideFunctionOrMethod(), clang::ObjCMethodDecl::isInstanceMethod(), clang::LookupResult::isSingleResult(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), and clang::ObjCIvarDecl::Private.

## ◆ LookupLiteralOperator()

Sema::LiteralOperatorLookupResult Sema::LookupLiteralOperator | ( | Scope * | S,
|  | LookupResult & | R,
|  | ArrayRef< QualType > | ArgTys,
|  | bool | AllowRaw,
|  | bool | AllowTemplate,
|  | bool | AllowStringTemplate,
|  | bool | DiagnoseMissing
| ) |  |

LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal, per C++11 [lex.ext].

Normal overload resolution is not used to select which literal operator to call for a user-defined literal. Look up the provided literal operator name, and filter the results to the appropriate set for the given argument types.

Definition at line 3405 of file SemaLookup.cpp.

References clang::LookupResult::Ambiguous, clang::LookupResult::getResultKind(), clang::Decl::isInvalidDecl(), and clang::LookupResult::makeFilter().

Referenced by BuildCookedLiteralOperatorCall().

## ◆ LookupMethodInObjectType()

ObjCMethodDecl * Sema::LookupMethodInObjectType | ( | Selector | Sel,
|  | QualType | Ty,
|  | bool | IsInstance
| ) |  |

LookupMethodInType - Look up a method in an ObjCObjectType.

Definition at line 1810 of file SemaExprObjC.cpp.

References clang::Type::castAs(), clang::ObjCObjectType::getInterface(), and clang::ObjCProtocolQualifiers< T >::quals().

Referenced by CheckKeyForObjCARCConversion(), hasIsEqualMethod(), and LookupMethodInReceiverType().

## ◆ LookupMethodInQualifiedType()

ObjCMethodDecl * Sema::LookupMethodInQualifiedType | ( | Selector | Sel,
|  | const ObjCObjectPointerType * | OPT,
|  | bool | Instance
| ) |  |

LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type.

Definition at line 1834 of file SemaExprObjC.cpp.

References HandleExprPropertyRefExpr(), and clang::ObjCObjectPointerType::quals().

Referenced by hasIsEqualMethod().

## ◆ LookupMovingAssignment()

CXXMethodDecl * Sema::LookupMovingAssignment | ( | CXXRecordDecl * | Class,
|  | unsigned | Quals,
|  | bool | RValueThis,
|  | unsigned | ThisQuals
| ) |  |

Look up the moving assignment operator for the given class.

Definition at line 3371 of file SemaLookup.cpp.

References clang::Qualifiers::Const, clang::Sema::SpecialMemberOverloadResult::getMethod(), and clang::Qualifiers::Volatile.

## ◆ LookupMovingConstructor()

CXXConstructorDecl * Sema::LookupMovingConstructor | ( | CXXRecordDecl * | Class,
|  | unsigned | Quals
| ) |  |

Look up the moving constructor for the given class.

Definition at line 3325 of file SemaLookup.cpp.

References clang::Qualifiers::Const, clang::Sema::SpecialMemberOverloadResult::getMethod(), and clang::Qualifiers::Volatile.

## ◆ LookupName()

bool Sema::LookupName | ( | LookupResult & | R,
|  | Scope * | S,
|  | bool | AllowBuiltinCreation = `false`
| ) |  |

Perform unqualified name lookup starting from a given scope.

Unqualified name lookup (C++ [basic.lookup.unqual], C99 6.2.1) is used to find names within the current scope. For example, 'x' in

int x;
int f() {
return x; // unqualified name look finds 'x' in the global scope
}

Different lookup criteria can find different names. For example, a particular scope can have both a struct and a function of the same name, and each can be found by certain lookup criteria. For more information about lookup criteria, see the documentation for the class LookupCriteria.

Parameters

  | S | The scope from which unqualified name lookup will begin. If the lookup criteria permits, name lookup may also search in the parent scopes.
  [in,out] | R | Specifies the lookup to perform (e.g., the name to look up and the lookup kind), and is updated with the results of lookup including zero or more declarations and possibly additional information used to diagnose ambiguities.

Returns
  `true` if lookup succeeded and false otherwise.

Definition at line 1942 of file SemaLookup.cpp.

Referenced by buildMemcpyForAssignmentOp(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), emitReplacement(), isArithmeticArgumentPromotion(), and warnAboutRedundantParens().

## ◆ lookupOpenMPDeclareTargetName()

NamedDecl * Sema::lookupOpenMPDeclareTargetName | ( | Scope * | CurScope,
|  | CXXScopeSpec & | ScopeSpec,
|  | const DeclarationNameInfo & | Id,
|  | NamedDeclSetType & | SameDirectiveDecls
| ) |  |

Searches for the provided declaration name for OpenMP declare target directive.

Definition at line 16818 of file SemaOpenMP.cpp.

References Diag(), clang::LookupResult::getAsSingle(), clang::Decl::getCanonicalDecl(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::LookupResult::isAmbiguous(), clang::LookupResult::isSingleResult(), and clang::LookupResult::suppressDiagnostics().

## ◆ LookupOrCreateLabel()

LabelDecl * Sema::LookupOrCreateLabel | ( | IdentifierInfo * | II,
|  | SourceLocation | Loc,
|  | SourceLocation | GnuLabelLoc = `SourceLocation()`
| ) |  |

LookupOrCreateLabel - Do a name lookup of a label with the specified name.

If GnuLabelLoc is a valid source location, then this is a definition of an label label name, otherwise it is a normal label definition or use.

Definition at line 4085 of file SemaLookup.cpp.

References clang::LabelDecl::Create(), and clang::SourceLocation::isValid().

## ◆ LookupOverloadedBinOp()

void Sema::LookupOverloadedBinOp | ( | OverloadCandidateSet & | CandidateSet,
|  | OverloadedOperatorKind | Op,
|  | const UnresolvedSetImpl & | Fns,
|  | ArrayRef< Expr *> | Args,
|  | bool | RequiresADL = `true`
| ) |  |

Perform lookup for an overloaded binary operator.

Definition at line 13040 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::OperatorRewriteInfo::AllowRewrittenCandidates, clang::OverloadCandidateSet::getLocation(), clang::OverloadCandidateSet::getRewriteInfo(), clang::getRewrittenOverloadedOperator(), clang::OO_None, clang::Reversed, and clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed().

## ◆ LookupOverloadedOperatorName()

void Sema::LookupOverloadedOperatorName | ( | OverloadedOperatorKind | Op,
|  | Scope * | S,
|  | QualType | T1,
|  | QualType | T2,
|  | UnresolvedSetImpl & | Functions
| ) |  |

Definition at line 3067 of file SemaLookup.cpp.

Referenced by BuildOverloadedBinOp(), and lookupOperatorsForDefaultedComparison().

## ◆ LookupParsedName()

bool Sema::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.

This routine is a convenience routine meant to be called from contexts that receive a name and an optional C++ scope specifier (e.g., "N::M::x"). It will then perform either qualified or unqualified name lookup (with LookupQualifiedName or LookupName, respectively) on the given name and return those results. It will perform a special type of lookup for "__super::" scope specifier.

Parameters

  S | The scope from which unqualified name lookup will begin.
  SS | An optional C++ scope-specifier, e.g., "::N::M".
  EnteringContext | Indicates whether we are going to enter the context of the scope-specifier SS (if present).

Returns
  True if any decls were found (but possibly ambiguous)

Definition at line 2487 of file SemaLookup.cpp.

References clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), clang::LookupResult::setContextRange(), clang::LookupResult::setNotFoundInCurrentInstantiation(), and clang::NestedNameSpecifier::Super.

Referenced by buildDeclareReductionRef(), buildUserDefinedMapperRef(), CheckMicrosoftIfExistsSymbol(), and LookupPotentialTypoResult().

## ◆ LookupProtocol()

ObjCProtocolDecl * Sema::LookupProtocol | ( | IdentifierInfo * | II,
|  | SourceLocation | IdLoc,
|  | RedeclarationKind | Redecl = `NotForRedeclaration`
| ) |  |

Find the protocol with the given name, if any.

Definition at line 3059 of file SemaLookup.cpp.

Referenced by ActOnForwardProtocolDeclaration(), ActOnStartProtocolInterface(), CheckForwardProtocolDeclarationForCircularDependency(), and FindProtocolDeclaration().

## ◆ LookupQualifiedName() [1/2]

bool Sema::LookupQualifiedName | ( | LookupResult & | R,
|  | DeclContext * | LookupCtx,
|  | bool | InUnqualifiedLookup = `false`
| ) |  |

Perform qualified name lookup into a given context.

Qualified name lookup (C++ [basic.lookup.qual]) is used to find names when the context of those names is explicit specified, e.g., "std::vector" or "x->member", or as part of unqualified name lookup.

Different lookup criteria can find different names. For example, a particular scope can have both a struct and a function of the same name, and each can be found by certain lookup criteria. For more information about lookup criteria, see the documentation for the class LookupCriteria.

Parameters

  R | captures both the lookup criteria and any lookup results found.
  LookupCtx | The context in which qualified name lookup will search. If the lookup criteria permits, name lookup may also search in the parent contexts or (for C++ classes) base classes.
  InUnqualifiedLookup | true if this is qualified name lookup that occurs as part of unqualified name lookup.

Returns
  true if lookup succeeded, false if it failed.

Definition at line 2221 of file SemaLookup.cpp.

References clang::LookupResult::getLookupName(), and clang::DeclContext::isDependentContext().

Referenced by buildDeclareReductionRef(), BuildNonArrayForRange(), checkTupleLikeDecomposition(), DiagnoseTwoPhaseLookup(), diagReturnOnAllocFailure(), doesUsualArrayDeleteWantSize(), emitReplacement(), FindAllocationFunctions(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), LookupMemberExprInRecord(), LookupPotentialTypoResult(), LookupStdInitializerList(), lookupStdTypeTraitMember(), clang::TreeTransform< Derived >::RebuildDependentNameType(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ LookupQualifiedName() [2/2]

bool Sema::LookupQualifiedName | ( | LookupResult & | R,
|  | DeclContext * | LookupCtx,
|  | CXXScopeSpec & | SS
| ) |  |

Performs qualified name lookup or special type of lookup for "__super::" scope specifier.

This routine is a convenience overload meant to be called from contexts that need to perform a qualified name lookup with an optional C++ scope specifier that might require special kind of lookup.

Parameters

  R | captures both the lookup criteria and any lookup results found.
  LookupCtx | The context in which qualified name lookup will search.
  SS | An optional C++ scope-specifier.

Returns
  true if lookup succeeded, false if it failed.

Definition at line 2458 of file SemaLookup.cpp.

References clang::CXXScopeSpec::getScopeRep(), and clang::NestedNameSpecifier::Super.

## ◆ LookupSingleName()

NamedDecl * Sema::LookupSingleName | ( | Scope * | S,
|  | DeclarationName | Name,
|  | SourceLocation | Loc,
|  | LookupNameKind | NameKind,
|  | RedeclarationKind | Redecl = `NotForRedeclaration`
| ) |  |

Look up a name, looking for a single declaration.

Return null if the results were absent, ambiguous, or overloaded.

It is preferable to use the elaborated form and explicitly handle ambiguity and overloaded.

Definition at line 3049 of file SemaLookup.cpp.

Referenced by ActOnCompatibilityAlias(), ActOnEndOfTranslationUnit(), ActOnForwardClassDeclaration(), ActOnStartClassImplementation(), ActOnTypedefedProtocols(), and isMethodDeclaredInRootProtocol().

## ◆ LookupSpecialMember()

Sema::SpecialMemberOverloadResult Sema::LookupSpecialMember | ( | CXXRecordDecl * | D,
|  | CXXSpecialMember | SM,
|  | bool | ConstArg,
|  | bool | VolatileArg,
|  | bool | RValueThis,
|  | bool | ConstThis,
|  | bool | VolatileThis
| ) |  |

Definition at line 3084 of file SemaLookup.cpp.

References CanDeclareSpecialMemberFunction(), clang::CXXRecordDecl::getDefinition(), clang::CXXRecordDecl::getDestructor(), clang::Decl::getLocation(), clang::CXXRecordDecl::needsImplicitDestructor(), clang::runWithSufficientStackSpace(), clang::Sema::SpecialMemberOverloadResult::setKind(), and clang::Sema::SpecialMemberOverloadResult::setMethod().

Referenced by checkMoveAssignmentForRepeatedMove(), inferCUDATargetForImplicitSpecialMember(), and lookupCallFromSpecialMember().

## ◆ lookupStdExperimentalNamespace()

NamespaceDecl * Sema::lookupStdExperimentalNamespace | ( |  | ) |

Definition at line 10640 of file SemaDeclCXX.cpp.

References clang::Result, and Std.

## ◆ LookupTemplateName()

bool Sema::LookupTemplateName | ( | LookupResult & | R,
|  | Scope * | S,
|  | CXXScopeSpec & | SS,
|  | QualType | ObjectType,
|  | bool | EnteringContext,
|  | bool & | MemberOfUnknownSpecialization,
|  | SourceLocation | TemplateKWLoc = `SourceLocation()`,
|  | AssumedTemplateKind * | ATK = `nullptr`
| ) |  |

Definition at line 326 of file SemaTemplate.cpp.

Referenced by LookupMemberExprInRecord().

## ◆ LookupVisibleDecls() [1/2]

void Sema::LookupVisibleDecls | ( | Scope * | S,
|  | LookupNameKind | Kind,
|  | VisibleDeclConsumer & | Consumer,
|  | bool | IncludeGlobalScope = `true`,
|  | bool | LoadExternal = `true`
| ) |  |

Definition at line 4065 of file SemaLookup.cpp.

Referenced by AddRecordMembersCompletionResults().

## ◆ LookupVisibleDecls() [2/2]

void Sema::LookupVisibleDecls | ( | DeclContext * | Ctx,
|  | LookupNameKind | Kind,
|  | VisibleDeclConsumer & | Consumer,
|  | bool | IncludeGlobalScope = `true`,
|  | bool | IncludeDependentBases = `false`,
|  | bool | LoadExternal = `true`
| ) |  |

Definition at line 4073 of file SemaLookup.cpp.

## ◆ MakeFullDiscardedValueExpr()

FullExprArg clang::Sema::MakeFullDiscardedValueExpr | ( | Expr * | Arg | ) |
| inline

Definition at line 4095 of file Sema.h.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::Expr::getExprLoc().

## ◆ MakeFullExpr() [1/2]

FullExprArg clang::Sema::MakeFullExpr | ( | Expr * | Arg | ) |
| inline

Definition at line 4088 of file Sema.h.

References clang::Expr::getExprLoc().

Referenced by ActOnConditionVariable(), and isNonNegativeIntegerValue().

## ◆ MakeFullExpr() [2/2]

FullExprArg clang::Sema::MakeFullExpr | ( | Expr * | Arg,
|  | SourceLocation | CC
| ) |  |
| inline

Definition at line 4091 of file Sema.h.

## ◆ makeMergedDefinitionVisible()

void Sema::makeMergedDefinitionVisible | ( | NamedDecl * | ND | ) |

Make a merged definition of an existing hidden definition `ND` visible at the specified location.

Definition at line 1534 of file SemaLookup.cpp.

## ◆ makeUnavailableInSystemHeader()

bool Sema::makeUnavailableInSystemHeader | ( | SourceLocation | loc,
|  | UnavailableAttr::ImplicitReason | reason
| ) |  |

makeUnavailableInSystemHeader - There is an error in the current context.

If we're still in a system header, and we can plausibly make the relevant declaration unavailable instead of erroring, do so and return true.

Definition at line 432 of file Sema.cpp.

References clang::Decl::addAttr(), Context, CurContext, clang::ASTContext::getSourceManager(), clang::Decl::hasAttr(), inTemplateInstantiation(), and clang::SourceManager::isInSystemHeader().

Referenced by diagnoseObjCARCConversion().

## ◆ MarkAnyDeclReferenced()

void Sema::MarkAnyDeclReferenced | ( | SourceLocation | Loc,
|  | Decl * | D,
|  | bool | MightBeOdrUse
| ) |  |

Perform marking for a reference to an arbitrary declaration.

It marks the declaration referenced, and performs odr-use checking for functions and variables. This method should not be used when building a normal expression which refers to a variable.

Definition at line 17072 of file SemaExpr.cpp.

References clang::Decl::setReferenced().

Referenced by CheckTemplateArgumentAddressOfObjectOrFunction(), and MarkExprReferenced().

## ◆ MarkAsLateParsedTemplate()

void Sema::MarkAsLateParsedTemplate | ( | FunctionDecl * | FD,
|  | Decl * | FnD,
|  | CachedTokens & | Toks
| ) |  |

Definition at line 10633 of file SemaTemplate.cpp.

References clang::FunctionDecl::setLateTemplateParsed().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ MarkBaseAndMemberDestructorsReferenced()

void Sema::MarkBaseAndMemberDestructorsReferenced | ( | SourceLocation | Loc,
|  | CXXRecordDecl * | Record
| ) |  |

MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of its members and bases as referenced.

Definition at line 5395 of file SemaDeclCXX.cpp.

References clang::RecordDecl::fields(), clang::DeclContext::isDependentContext(), isIncompleteOrZeroLengthArrayType(), and clang::TagDecl::isUnion().

## ◆ MarkCaptureUsedInEnclosingContext()

void Sema::MarkCaptureUsedInEnclosingContext | ( | VarDecl * | Capture,
|  | SourceLocation | Loc,
|  | unsigned | CapturingScopeIndex
| ) |  |

Definition at line 15781 of file SemaExpr.cpp.

References MarkVarDeclODRUsed().

## ◆ MarkDeclarationsReferencedInExpr()

void Sema::MarkDeclarationsReferencedInExpr | ( | Expr * | E,
|  | bool | SkipLocalVariables = `false`
| ) |  |

Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced".

Parameters

  SkipLocalVariables | If true, don't mark local variables as 'referenced'.

Definition at line 17202 of file SemaExpr.cpp.

## ◆ MarkDeclarationsReferencedInType()

void Sema::MarkDeclarationsReferencedInType | ( | SourceLocation | Loc,
|  | QualType | T
| ) |  |

Mark all of the declarations referenced within a particular AST node as referenced.

Used when template instantiation instantiates a non-dependent type – entities referenced by the type are now referenced.

Definition at line 17125 of file SemaExpr.cpp.

Referenced by clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ MarkDeclRefReferenced()

void Sema::MarkDeclRefReferenced | ( | DeclRefExpr * | E,
|  | const Expr * | Base = `nullptr`
| ) |  |

Perform reference-marking and odr-use handling for a DeclRefExpr.

Definition at line 17031 of file SemaExpr.cpp.

References clang::DeclRefExpr::getDecl(), clang::DeclRefExpr::getLocation(), and MarkExprReferenced().

Referenced by BuildImplicitBaseInitializer(), and BuildImplicitMemberInitializer().

## ◆ MarkDeducedTemplateParameters() [1/2]

void clang::Sema::MarkDeducedTemplateParameters | ( | const FunctionTemplateDecl * | FunctionTemplate,
|  | llvm::SmallBitVector & | Deduced
| ) |  |
| inline

Definition at line 7965 of file Sema.h.

Referenced by clang::CodeCompletionResult::createCodeCompletionStringForDecl().

## ◆ MarkDeducedTemplateParameters() [2/2]

void Sema::MarkDeducedTemplateParameters | ( | ASTContext & | Ctx,
|  | const FunctionTemplateDecl * | FunctionTemplate,
|  | llvm::SmallBitVector & | Deduced
| ) |  |
| static

Marks all of the template parameters that will be deduced by a call to the given function template.

Definition at line 5957 of file SemaTemplateDeduction.cpp.

References clang::TemplateParameterList::getDepth(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), MarkUsedTemplateParameters(), and clang::TemplateParameterList::size().

## ◆ MarkFunctionParmPackReferenced()

void Sema::MarkFunctionParmPackReferenced | ( | FunctionParmPackExpr * | E | ) |

Perform reference-marking and odr-use handling for a FunctionParmPackExpr.

Definition at line 17063 of file SemaExpr.cpp.

References MarkExprReferenced().

## ◆ MarkFunctionReferenced()

void Sema::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)

Definition at line 15521 of file SemaExpr.cpp.

References CheckCompleteParameterTypesForMangler(), clang::CUDA, funcHasParameterSizeMangling(), clang::Type::getAs(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::FunctionDecl::getMemberSpecializationInfo(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::FunctionDecl::getPointOfInstantiation(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKindForInstantiation(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isDeleted(), isImplicitlyDefinableConstexprFunction(), clang::FunctionDecl::isImplicitlyInstantiable(), clang::FunctionDecl::isInlined(), clang::SourceLocation::isInvalid(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), isOdrUseContext(), isPotentiallyConstantEvaluatedContext(), clang::FunctionDecl::isTrivial(), clang::isUnresolvedExceptionSpec(), clang::Decl::isUsed(), clang::Decl::markUsed(), clang::None, clang::Redeclarable< decl_type >::redecls(), clang::runWithSufficientStackSpace(), clang::FunctionDecl::setInstantiationIsPending(), clang::Decl::setReferenced(), clang::FunctionDecl::setTemplateSpecializationKind(), clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, and Used.

Referenced by ActOnCXXDelete(), checkDestructorReference(), FindConditionalOverload(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), ReferenceDllExportedMembers(), resolveBuiltinNewDeleteOverload(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ markKnownEmitted()

void Sema::markKnownEmitted | ( | Sema & | S,
|  | FunctionDecl * | OrigCaller,
|  | FunctionDecl * | OrigCallee,
|  | SourceLocation | OrigLoc,
|  | const llvm::function_ref< bool(Sema &, FunctionDecl *)> | IsKnownEmitted
| ) |  |

Indicate that this function (and thus everything it transtively calls) will be codegen'ed, and emit any deferred diagnostics on this function and its (transitive) callees.

Definition at line 1547 of file Sema.cpp.

References clang::C, DeviceCallGraph, DeviceKnownEmittedFns, emitDeferredDiags(), and clang::Decl::getAsFunction().

Referenced by CheckCUDACall().

## ◆ MarkMemberReferenced()

void Sema::MarkMemberReferenced | ( | MemberExpr * | E | ) |

Perform reference-marking and odr-use handling for a MemberExpr.

Definition at line 17044 of file SemaExpr.cpp.

References clang::MemberExpr::getBeginLoc(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getMemberLoc(), clang::SourceLocation::isValid(), MarkExprReferenced(), and clang::MemberExpr::performsVirtualDispatch().

## ◆ MarkThisReferenced()

void Sema::MarkThisReferenced | ( | CXXThisExpr * | This | ) |

Definition at line 1276 of file SemaExprCXX.cpp.

References CheckCXXThisCapture(), and clang::Expr::getExprLoc().

Referenced by BuildCXXThisExpr().

## ◆ MarkTypoCorrectedFunctionDefinition()

void Sema::MarkTypoCorrectedFunctionDefinition | ( | const NamedDecl * | F | ) |

Definition at line 8039 of file SemaDecl.cpp.

## ◆ MarkUnusedFileScopedDecl()

void Sema::MarkUnusedFileScopedDecl | ( | const DeclaratorDecl * | D | ) |

If it's a file scoped decl that must warn if not used, keep track of it.

Definition at line 1706 of file SemaDecl.cpp.

References clang::First.

## ◆ MarkUsedTemplateParameters() [1/2]

void Sema::MarkUsedTemplateParameters | ( | const Expr * | E,
|  | bool | OnlyDeduced,
|  | unsigned | Depth,
|  | llvm::SmallBitVector & | Used
| ) |  |

Mark which template parameters are used in a given expression.

Parameters

  E | the expression from which template parameters will be deduced.
  Used | a bit vector whose elements will be set to `true` to indicate when the corresponding template parameter will be deduced.

Definition at line 5923 of file SemaTemplateDeduction.cpp.

References MarkUsedTemplateParameters().

Referenced by checkTemplatePartialSpecialization().

## ◆ MarkUsedTemplateParameters() [2/2]

void Sema::MarkUsedTemplateParameters | ( | const TemplateArgumentList & | TemplateArgs,
|  | bool | OnlyDeduced,
|  | unsigned | Depth,
|  | llvm::SmallBitVector & | Used
| ) |  |

Mark which template parameters can be deduced from a given template argument list.

Parameters

  TemplateArgs | the template argument list from which template parameters will be deduced.
  Used | a bit vector whose elements will be set to `true` to indicate when the corresponding template parameter will be deduced.

Definition at line 5939 of file SemaTemplateDeduction.cpp.

References clang::TemplateArgumentList::asArray(), hasPackExpansionBeforeEnd(), MarkUsedTemplateParameters(), and clang::TemplateArgumentList::size().

## ◆ MarkVariableReferenced()

void Sema::MarkVariableReferenced | ( | SourceLocation | Loc,
|  | VarDecl * | Var
| ) |  |

Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3).

Note that this should not be used directly for normal expressions referring to VarDecl.

Definition at line 16992 of file SemaExpr.cpp.

References DoMarkVarDeclReferenced().

Referenced by ReferenceDllExportedMembers().

## ◆ MarkVirtualMemberExceptionSpecsNeeded()

void Sema::MarkVirtualMemberExceptionSpecsNeeded | ( | SourceLocation | Loc,
|  | const CXXRecordDecl * | RD
| ) |  |

Mark the exception specifications of all virtual member functions in the given class as needed.

Definition at line 16893 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::methods().

## ◆ MarkVirtualMembersReferenced()

void Sema::MarkVirtualMembersReferenced | ( | SourceLocation | Loc,
|  | const CXXRecordDecl * | RD,
|  | bool | ConstexprOnly = `false`
| ) |  |

MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced.

Definition at line 16900 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::bases(), clang::CXXRecordDecl::getFinalOverriders(), and clang::CXXRecordDecl::getNumVBases().

## ◆ MarkVTableUsed()

void Sema::MarkVTableUsed | ( | SourceLocation | Loc,
|  | CXXRecordDecl * | Class,
|  | bool | DefinitionRequired = `false`
| ) |  |

Note that the vtable for the given class was used at the given location.

Definition at line 16737 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::getCanonicalDecl(), clang::DeclContext::isDependentContext(), and clang::CXXRecordDecl::isDynamicClass().

Referenced by InstantiateClassMembers(), and ReferenceDllExportedMembers().

## ◆ MatchAllMethodDeclarations()

void Sema::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.

MatchAllMethodDeclarations - Check methods declared in interface or protocol against those declared in their implementations.

Definition at line 2804 of file SemaDeclObjC.cpp.

References clang::ObjCContainerDecl::class_methods(), clang::ObjCContainerDecl::getClassMethod(), clang::ObjCContainerDecl::getInstanceMethod(), clang::Decl::getLocation(), clang::ObjCContainerDecl::instance_methods(), clang::ObjCMethodDecl::isSynthesizedAccessorStub(), WarnConflictingTypedMethods(), WarnExactTypedMethods(), and WarnUndefinedMethod().

Referenced by CheckCategoryVsClassMethodMatches().

## ◆ MatchTemplateParametersToScopeSpecifier()

TemplateParameterList * Sema::MatchTemplateParametersToScopeSpecifier | ( | SourceLocation | DeclStartLoc,
|  | SourceLocation | DeclLoc,
|  | const CXXScopeSpec & | SS,
|  | TemplateIdAnnotation * | TemplateId,
|  | ArrayRef< TemplateParameterList *> | ParamLists,
|  | bool | IsFriend,
|  | bool & | IsMemberSpecialization,
|  | bool & | Invalid,
|  | bool | SuppressDiagnostic = `false`
| ) |  |

Match the given template parameter lists to the given scope specifier, returning the template parameter list that applies to the name.

Parameters

  DeclStartLoc | the start of the declaration that has a scope specifier or a template parameter list.
  DeclLoc | The location of the declaration itself.
  SS | the scope specifier that will be matched to the given template parameter lists. This scope specifier precedes a qualified name that is being declared.
  TemplateId | The template-id following the scope specifier, if there is one. Used to check for a missing 'template<>'.
  ParamLists | the template parameter lists, from the outermost to the innermost template parameter lists.
  IsFriend | Whether to apply the slightly different rules for matching template parameters to scope specifiers in friend declarations.
  IsMemberSpecialization | will be set true if the scope specifier denotes a fully-specialized type, and therefore this is a declaration of a member specialization.

Returns
  the template parameter list, if any, that corresponds to the name that is preceded by the scope specifier `SS`. This template parameter list may have template parameters (if we're declaring a template) or may have no template parameters (if we're declaring a template specialization), or may be NULL (if what we're declaring isn't itself a template).

Definition at line 2814 of file SemaTemplate.cpp.

References clang::CXXScopeSpec::getScopeRep().

## ◆ MatchTwoMethodDeclarations()

bool Sema::MatchTwoMethodDeclarations | ( | const ObjCMethodDecl * | left,
|  | const ObjCMethodDecl * | right,
|  | MethodMatchStrategy | strategy = `MMS_strict`
| ) |  |

MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false, accordingly.

MatchTwoMethodDeclarations - Checks that two methods have matching type and returns true, or false, accordingly.

TODO: Handle protocol list; such as id<p1,p2> in type comparisons

Definition at line 3231 of file SemaDeclObjC.cpp.

References getLangOpts(), clang::ObjCMethodDecl::getReturnType(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isDirectMethod(), clang::Decl::isHidden(), matchTypes(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().

Referenced by DiagnoseClassExtensionDupMethods(), and DiagnoseMultipleMethodInGlobalPool().

## ◆ maybeAddCUDAHostDeviceAttrs()

void Sema::maybeAddCUDAHostDeviceAttrs | ( | FunctionDecl * | FD,
|  | const LookupResult & | Previous
| ) |  |

May add implicit CUDAHostAttr and CUDADeviceAttr attributes to FD, depending on FD and the current compilation settings.

Definition at line 556 of file SemaCUDA.cpp.

References clang::Decl::addAttr(), Context, clang::CUDA, Diag(), clang::LookupResult::end(), clang::Decl::getAsFunction(), getLangOpts(), clang::Decl::getLocation(), getSourceManager(), clang::Decl::hasAttr(), clang::FunctionDecl::isConstexpr(), clang::SourceManager::isInSystemHeader(), IsOverload(), and clang::FunctionDecl::isVariadic().

## ◆ MaybeBindToTemporary()

ExprResult Sema::MaybeBindToTemporary | ( | Expr * | E | ) |

MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor, this will return CXXBindTemporaryExpr.

Otherwise it simply returns the passed in expression.

Definition at line 6598 of file SemaExprCXX.cpp.

References clang::ASTContext::BoundMemberTy, CheckDestructorAccess(), Cleanup, Context, clang::CXXTemporary::Create(), clang::ImplicitCastExpr::Create(), DiagnoseUseOfDecl(), clang::Sema::ExpressionEvaluationContextRecord::EK_Decltype, clang::ExprError(), ExprEvalContexts, clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::RecordType::getDecl(), clang::Expr::getExprLoc(), clang::FunctionType::getExtInfo(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::ObjCMethodDecl::getMethodFamily(), clang::Type::getPointeeType(), clang::FunctionType::ExtInfo::getProducesResult(), clang::Expr::getType(), clang::Type::getTypeClass(), clang::QualType::getTypePtr(), clang::Decl::hasAttr(), clang::ObjCRuntime::hasEmptyCollections(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::Type::isObjCARCImplicitlyUnretainedType(), clang::Type::isObjCRetainableType(), clang::Expr::isRValue(), clang::FunctionDecl::isTrivial(), LookupDestructor(), MarkFunctionReferenced(), clang::LangOptions::ObjCRuntime, clang::OMF_performSelector, PDiag(), clang::CleanupInfo::setExprNeedsCleanups(), and clang::VK_RValue.

Referenced by CopyObject(), and clang::InitializationSequence::Perform().

## ◆ MaybeConvertParenListExprToParenExpr()

ExprResult Sema::MaybeConvertParenListExprToParenExpr | ( | Scope * | S,
|  | Expr * | OrigExpr
| ) |  |

This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a sequence of comma binary operators.

Definition at line 6931 of file SemaExpr.cpp.

References clang::ExprError(), clang::ParenListExpr::getExpr(), clang::Expr::getExprLoc(), clang::ParenListExpr::getLParenLoc(), clang::ParenListExpr::getNumExprs(), and clang::ParenListExpr::getRParenLoc().

Referenced by ActOnStartCXXMemberReference().

## ◆ MaybeCreateExprWithCleanups() [1/2]

Expr * Sema::MaybeCreateExprWithCleanups | ( | Expr * | SubExpr | ) |

MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups, surround it with a ExprWithCleanups node.

Otherwise, just returns the passed-in expression.

Definition at line 6767 of file SemaExprCXX.cpp.

References Cleanup, clang::CleanupInfo::cleanupsHaveSideEffects(), CleanupVarDeclMarking(), Context, clang::ExprWithCleanups::Create(), DiscardCleanupsInEvaluationContext(), ExprCleanupObjects, ExprEvalContexts, and clang::CleanupInfo::exprNeedsCleanups().

Referenced by ActOnFinishFullExpr(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), checkEscapingByref(), MaybeCreateExprWithCleanups(), and MaybeCreateStmtWithCleanups().

## ◆ MaybeCreateExprWithCleanups() [2/2]

ExprResult Sema::MaybeCreateExprWithCleanups | ( | ExprResult | SubExpr | ) |

Definition at line 6760 of file SemaExprCXX.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and MaybeCreateExprWithCleanups().

## ◆ MaybeCreateStmtWithCleanups()

Stmt * Sema::MaybeCreateStmtWithCleanups | ( | Stmt * | SubStmt | ) |

Definition at line 6789 of file SemaExprCXX.cpp.

References Cleanup, CleanupVarDeclMarking(), Context, clang::CompoundStmt::Create(), clang::CleanupInfo::exprNeedsCleanups(), MaybeCreateExprWithCleanups(), and clang::ASTContext::VoidTy.

Referenced by ActOnFinishFullStmt().

## ◆ MaybeEmitAmbiguousAtomicConstraintsDiagnostic()

bool Sema::MaybeEmitAmbiguousAtomicConstraintsDiagnostic | ( | NamedDecl * | D1,
|  | ArrayRef< const Expr *> | AC1,
|  | NamedDecl * | D2,
|  | ArrayRef< const Expr *> | AC2
| ) |  |

If D1 was not at least as constrained as D2, but would've been if a pair of atomic constraints involved had been declared in a concept and not repeated in two separate places in code.

Returns
  true if such a diagnostic was emitted, false otherwise.

Definition at line 910 of file SemaConcept.cpp.

References clang::AtomicConstraint::subsumes().

Referenced by checkMoreSpecializedThanPrimary().

## ◆ maybeExtendBlockObject()

void Sema::maybeExtendBlockObject | ( | ExprResult & | E | ) |

Do an explicit extend of the given block pointer if we're in ARC.

Definition at line 6366 of file SemaExpr.cpp.

References clang::ImplicitCastExpr::Create(), and clang::ActionResult< PtrTy, CompressInvalid >::get().

## ◆ MaybeSuggestAddingStaticToDecl()

void Sema::MaybeSuggestAddingStaticToDecl | ( | const FunctionDecl * | D | ) |

Definition at line 184 of file SemaExpr.cpp.

References clang::FixItHint::CreateInsertion(), Diag(), clang::First, clang::SourceRange::getBegin(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::FunctionDecl::getSourceRange(), and hasAnyExplicitStorageClass().

## ◆ mergeAlwaysInlineAttr()

AlwaysInlineAttr* clang::Sema::mergeAlwaysInlineAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | const IdentifierInfo * | Ident
| ) |  |

## ◆ mergeAvailabilityAttr()

AvailabilityAttr* clang::Sema::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.

## ◆ mergeCodeSegAttr()

CodeSegAttr* clang::Sema::mergeCodeSegAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | StringRef | Name
| ) |  |

## ◆ mergeCommonAttr() [1/2]

CommonAttr* clang::Sema::mergeCommonAttr | ( | Decl * | D,
|  | const ParsedAttr & | AL
| ) |  |

## ◆ mergeCommonAttr() [2/2]

CommonAttr* clang::Sema::mergeCommonAttr | ( | Decl * | D,
|  | const CommonAttr & | AL
| ) |  |

## ◆ MergeCompatibleFunctionDecls()

bool Sema::MergeCompatibleFunctionDecls | ( | FunctionDecl * | New,
|  | FunctionDecl * | Old,
|  | Scope * | S,
|  | bool | MergeTypeWithOld
| ) |  |

Completes the merge of two function declarations that are known to be compatible.

This routine handles the merging of attributes and other properties of function declarations from the old declaration to the new declaration, once we know that New is in fact a redeclaration of Old.

Returns
  false

Definition at line 3782 of file SemaDecl.cpp.

## ◆ MergeCXXFunctionDecl()

bool Sema::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.

Subroutine of MergeFunctionDecl. Returns true if there was an error, false otherwise.

Definition at line 436 of file SemaDeclCXX.cpp.

## ◆ mergeDeclAttributes()

void Sema::mergeDeclAttributes | ( | NamedDecl * | New,
|  | Decl * | Old,
|  | AvailabilityMergeKind | AMK = `AMK_Redeclaration`
| ) |  |

mergeDeclAttributes - Copy attributes from the Old decl to the New one.

Definition at line 2789 of file SemaDecl.cpp.

References clang::Decl::getAttr(), and clang::Decl::getMostRecentDecl().

Referenced by ActOnForwardProtocolDeclaration(), and ActOnStartProtocolInterface().

## ◆ mergeDLLExportAttr()

DLLExportAttr* clang::Sema::mergeDLLExportAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI
| ) |  |

## ◆ mergeDLLImportAttr()

DLLImportAttr* clang::Sema::mergeDLLImportAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI
| ) |  |

## ◆ mergeFormatAttr()

FormatAttr* clang::Sema::mergeFormatAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | IdentifierInfo * | Format,
|  | int | FormatIdx,
|  | int | FirstArg
| ) |  |

## ◆ MergeFunctionDecl()

bool Sema::MergeFunctionDecl | ( | FunctionDecl * | New,
|  | NamedDecl *& | OldD,
|  | Scope * | S,
|  | bool | MergeTypeWithOld
| ) |  |

MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and scope as a previous declaration 'Old'.

Figure out how to resolve this situation, merging decls or emitting diagnostics as appropriate.

In C++, New and Old must be declarations that are not overloaded. Use IsOverload to determine whether New and Old are overloaded, and to select the Old declaration that New should be merged with.

Returns true if there was an error, false otherwise.

Definition at line 3176 of file SemaDecl.cpp.

## ◆ mergeInternalLinkageAttr() [1/2]

InternalLinkageAttr* clang::Sema::mergeInternalLinkageAttr | ( | Decl * | D,
|  | const ParsedAttr & | AL
| ) |  |

## ◆ mergeInternalLinkageAttr() [2/2]

InternalLinkageAttr* clang::Sema::mergeInternalLinkageAttr | ( | Decl * | D,
|  | const InternalLinkageAttr & | AL
| ) |  |

## ◆ mergeMinSizeAttr()

MinSizeAttr* clang::Sema::mergeMinSizeAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI
| ) |  |

## ◆ mergeMSInheritanceAttr()

MSInheritanceAttr* clang::Sema::mergeMSInheritanceAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | bool | BestCase,
|  | MSInheritanceModel | Model
| ) |  |

## ◆ mergeNoSpeculativeLoadHardeningAttr()

NoSpeculativeLoadHardeningAttr* clang::Sema::mergeNoSpeculativeLoadHardeningAttr | ( | Decl * | D,
|  | const NoSpeculativeLoadHardeningAttr & | AL
| ) |  |

## ◆ mergeObjCMethodDecls()

void Sema::mergeObjCMethodDecls | ( | ObjCMethodDecl * | New,
|  | ObjCMethodDecl * | Old
| ) |  |

Definition at line 3818 of file SemaDecl.cpp.

References clang::Decl::getDeclContext(), mergeParamDeclAttributes(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().

## ◆ mergeOptimizeNoneAttr()

OptimizeNoneAttr* clang::Sema::mergeOptimizeNoneAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI
| ) |  |

## ◆ mergeSectionAttr()

SectionAttr* clang::Sema::mergeSectionAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | StringRef | Name
| ) |  |

## ◆ mergeSpeculativeLoadHardeningAttr()

SpeculativeLoadHardeningAttr* clang::Sema::mergeSpeculativeLoadHardeningAttr | ( | Decl * | D,
|  | const SpeculativeLoadHardeningAttr & | AL
| ) |  |

## ◆ MergeTypedefNameDecl()

void Sema::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'.

Figure out how to resolve this situation, merging decls or emitting diagnostics as appropriate. If there was an error, set New to be invalid.

Definition at line 2222 of file SemaDecl.cpp.

## ◆ mergeTypeVisibilityAttr()

TypeVisibilityAttr* clang::Sema::mergeTypeVisibilityAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | TypeVisibilityAttr::VisibilityType | Vis
| ) |  |

## ◆ mergeUuidAttr()

UuidAttr* clang::Sema::mergeUuidAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | StringRef | Uuid
| ) |  |

## ◆ MergeVarDecl()

void Sema::MergeVarDecl | ( | VarDecl * | New,
|  | LookupResult & | Previous
| ) |  |

MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'.

Figure out how to resolve this situation, merging decls or emitting diagnostics as appropriate.

Tentative definition rules (C99 6.9.2p2) are checked by FinalizeDeclaratorGroup. Unfortunately, we can't analyze tentative definitions here, since the initializer hasn't been attached.

Definition at line 3987 of file SemaDecl.cpp.

References adjustDeclContextForDeclaratorDecl(), clang::CPlusPlus, clang::VarDecl::Definition, Diag(), clang::Decl::dropAttr(), clang::Decl::getAccess(), clang::VarDecl::getCanonicalDecl(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::VarDecl::getDescribedVarTemplate(), clang::LookupResult::getFoundDecl(), clang::NamedDecl::getIdentifier(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getMostRecentDecl(), getNoteDiagForInvalidRedeclaration(), clang::LookupResult::getRepresentativeDecl(), clang::VarDecl::getStorageClass(), clang::VarTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::VarDecl::getTLSKind(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), clang::VarDecl::hasExternalStorage(), clang::NamedDecl::hasLinkage(), haveIncompatibleLanguageLinkages(), clang::VarDecl::isConstexpr(), clang::VarDecl::isFileVarDecl(), clang::VarDecl::isInline(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDeclOrParm(), clang::VarDecl::isOutOfLine(), clang::DeclContext::isRecord(), clang::LookupResult::isSingleResult(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isThisDeclarationADefinition(), clang::Decl::isUsed(), mergeTypeWithPrevious(), clang::SC_None, clang::SC_Static, clang::Decl::setAccess(), clang::VarDecl::setImplicitlyInline(), clang::Decl::setInvalidDecl(), clang::Decl::setIsUsed(), clang::Redeclarable< decl_type >::setPreviousDecl(), and clang::VarDecl::TLS_Dynamic.

## ◆ MergeVarDeclExceptionSpecs()

void Sema::MergeVarDeclExceptionSpecs | ( | VarDecl * | New,
|  | VarDecl * | Old
| ) |  |

Merge the exception specifications of two variable declarations.

This is called when there's a redeclaration of a VarDecl. The function checks if the redeclaration might have an exception specification and validates compatibility and merges the specs if necessary.

Definition at line 1489 of file SemaDeclCXX.cpp.

## ◆ MergeVarDeclTypes()

void Sema::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'.

Figure out how to merge their types, emitting diagnostics as appropriate.

Declarations using the auto type specifier (C++ [decl.spec.auto]) call back to here in AddInitializerToDecl. We can't check them before the initializer is attached.

Definition at line 3863 of file SemaDecl.cpp.

References clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), and clang::Type::isUndeducedType().

## ◆ mergeVisibilityAttr()

VisibilityAttr* clang::Sema::mergeVisibilityAttr | ( | Decl * | D,
|  | const AttributeCommonInfo & | CI,
|  | VisibilityAttr::VisibilityType | Vis
| ) |  |

## ◆ mightBeIntendedToBeTemplateName()

bool clang::Sema::mightBeIntendedToBeTemplateName | ( | ExprResult | E,
|  | bool & | Dependent
| ) |  |
| inline

Determine whether it's plausible that E was intended to be a template-name.

Definition at line 2123 of file Sema.h.

References clang::CPlusPlus, clang::DirectInit, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Greater, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Less, and Previous.

## ◆ NeedToCaptureVariable()

bool Sema::NeedToCaptureVariable | ( | VarDecl * | Var,
|  | SourceLocation | Loc
| ) |  |

Checks if the variable must be captured.

Definition at line 16386 of file SemaExpr.cpp.

## ◆ NoteAllFoundTemplates()

void Sema::NoteAllFoundTemplates | ( | TemplateName | Name | ) |

Definition at line 3175 of file SemaTemplate.cpp.

## ◆ NoteAllOverloadCandidates()

void Sema::NoteAllOverloadCandidates | ( | Expr * | E,
|  | QualType | DestType = `QualType()`,
|  | bool | TakingAddress = `false`
| ) |  |

Definition at line 10075 of file SemaOverload.cpp.

References clang::Expr::getType().

Referenced by DiagnoseReinterpretUpDownCast(), and TryAddressSpaceCast().

## ◆ NoteDeletedFunction()

void Sema::NoteDeletedFunction | ( | FunctionDecl * | FD | ) |

Emit a note explaining that this function is deleted.

Definition at line 100 of file SemaExpr.cpp.

References Diag(), clang::Decl::getLocation(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), and clang::Decl::isImplicit().

Referenced by CheckCXX98CompatAccessibleCopy(), and CopyObject().

## ◆ NoteDeletedInheritingConstructor()

void Sema::NoteDeletedInheritingConstructor | ( | CXXConstructorDecl * | CD | ) |

Definition at line 12767 of file SemaDeclCXX.cpp.

References clang::CXXConstructorDecl::getInheritedConstructor(), clang::Decl::getLocation(), and clang::InheritedConstructor::getShadowDecl().

## ◆ NoteHiddenVirtualMethods()

void Sema::NoteHiddenVirtualMethods | ( | CXXMethodDecl * | MD,
|  | SmallVectorImpl< CXXMethodDecl *> & | OverloadedMethods
| ) |  |

Definition at line 9395 of file SemaDeclCXX.cpp.

References Diag(), clang::Decl::getLocation(), and clang::ValueDecl::getType().

## ◆ NoteOverloadCandidate()

void Sema::NoteOverloadCandidate | ( | NamedDecl * | Found,
|  | FunctionDecl * | Fn,
|  | OverloadCandidateRewriteKind | RewriteKind = `OverloadCandidateRewriteKind()`,
|  | QualType | DestType = `QualType()`,
|  | bool | TakingAddress = `false`
| ) |  |

Definition at line 10003 of file SemaOverload.cpp.

References checkAddressOfCandidateIsAvailable(), Diag(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), and clang::FunctionDecl::isMultiVersion().

## ◆ notePreviousDefinition()

void Sema::notePreviousDefinition | ( | const NamedDecl * | Old,
|  | SourceLocation | New
| ) |  |

Definition at line 4221 of file SemaDecl.cpp.

References clang::Module::DefinitionLoc, Diag(), clang::SourceManager::getDecomposedLoc(), clang::SourceManager::getFileEntryForID(), clang::SourceManager::getFilename(), clang::Module::getFullModuleName(), clang::SourceManager::getIncludeLoc(), clang::Decl::getLocation(), clang::Decl::getOwningModule(), clang::SourceManager::getSpellingLoc(), clang::SourceLocation::isInvalid(), and clang::SourceLocation::isValid().

## ◆ ParsedFreeStandingDeclSpec() [1/2]

Decl * Sema::ParsedFreeStandingDeclSpec | ( | Scope * | S,
|  | AccessSpecifier | AS,
|  | DeclSpec & | DS,
|  | RecordDecl *& | AnonRecord
| ) |  |

ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.

"struct foo;") is parsed.

Definition at line 4305 of file SemaDecl.cpp.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ParsedFreeStandingDeclSpec() [2/2]

Decl * Sema::ParsedFreeStandingDeclSpec | ( | Scope * | S,
|  | AccessSpecifier | AS,
|  | DeclSpec & | DS,
|  | MultiTemplateParamsArg | TemplateParams,
|  | bool | IsExplicitInstantiation,
|  | RecordDecl *& | AnonRecord
| ) |  |

ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.

"struct foo;") is parsed. It also accepts template parameters to cope with template friend declarations.

Definition at line 4417 of file SemaDecl.cpp.

## ◆ ParseObjCEncodeExpression()

ExprResult Sema::ParseObjCEncodeExpression | ( | SourceLocation | AtLoc,
|  | SourceLocation | EncodeLoc,
|  | SourceLocation | LParenLoc,
|  | ParsedType | Ty,
|  | SourceLocation | RParenLoc
| ) |  |

Definition at line 1102 of file SemaExprObjC.cpp.

## ◆ ParseObjCProtocolExpression()

ExprResult Sema::ParseObjCProtocolExpression | ( | IdentifierInfo * | ProtocolName,
|  | SourceLocation | AtLoc,
|  | SourceLocation | ProtoLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | ProtoIdLoc,
|  | SourceLocation | RParenLoc
| ) |  |

ParseObjCProtocolExpression - Build protocol expression for @protocol.

Definition at line 1272 of file SemaExprObjC.cpp.

References Diag(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), and clang::ObjCProtocolDecl::hasDefinition().

## ◆ ParseObjCSelectorExpression()

ExprResult Sema::ParseObjCSelectorExpression | ( | Selector | Sel,
|  | SourceLocation | AtLoc,
|  | SourceLocation | SelLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | RParenLoc,
|  | bool | WarnMultipleSelectors
| ) |  |

ParseObjCSelectorExpression - Build selector expression for @selector.

Definition at line 1202 of file SemaExprObjC.cpp.

References clang::FixItHint::CreateReplacement(), Diag(), DiagnoseDirectSelectorsExpr(), DiagnoseMismatchedSelectors(), clang::Selector::getAsString(), clang::NamedDecl::getDeclName(), clang::ObjCMethodDecl::getImplementationControl(), clang::Decl::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::Selector::getMethodFamily(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::isDirectMethod(), clang::OMF_alloc, clang::OMF_autorelease, clang::OMF_copy, clang::OMF_dealloc, clang::OMF_finalize, clang::OMF_init, clang::OMF_initialize, clang::OMF_mutableCopy, clang::OMF_new, clang::OMF_None, clang::OMF_performSelector, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, clang::OMF_self, and clang::ObjCMethodDecl::Optional.

## ◆ ParseObjCStringLiteral()

ExprResult Sema::ParseObjCStringLiteral | ( | SourceLocation * | AtLocs,
|  | ArrayRef< Expr *> | Strings
| ) |  |

Definition at line 35 of file SemaExprObjC.cpp.

## ◆ ParseTypedefDecl()

TypedefDecl * Sema::ParseTypedefDecl | ( | Scope * | S,
|  | Declarator & | D,
|  | QualType | T,
|  | TypeSourceInfo * | TInfo
| ) |  |

Subroutines of ActOnDeclarator().

Definition at line 14497 of file SemaDecl.cpp.

## ◆ PDiag()

PartialDiagnostic clang::Sema::PDiag | ( | unsigned | DiagID = `0` | ) |
| inline

Build a partial diagnostic.

Definition at line 24 of file SemaInternal.h.

References Context, and clang::ASTContext::getDiagAllocator().

Referenced by ActOnCXXDelete(), ActOnStartClassImplementation(), AnalyzeComparison(), BuildNonArrayForRange(), CheckCXX98CompatAccessibleCopy(), checkDestructorReference(), CheckEquivalentExceptionSpec(), CheckExceptionSpecCompatibility(), CheckFormatString(), CheckForNullPointerDereference(), CheckImplicitConversion(), CheckNonNullArgument(), CheckOverridingFunctionExceptionSpec(), CheckParamExceptionSpec(), CopyObject(), DiagnoseAdditionInShift(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseBitwiseOpInBitwiseOp(), DiagnoseBitwisePrecedence(), DiagnoseConditionalPrecedence(), DiagnoseFloatingImpCast(), DiagnoseImpCast(), DiagnoseShiftCompare(), diagnoseTautologicalComparison(), EmitDiagnosticForLogicalAndInLogicalOr(), FindProtocolDeclaration(), FinishOverloadedCallExpr(), isArithmeticArgumentPromotion(), LookupMemberExpr(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), and TryNamespaceTypoCorrection().

## ◆ PerformContextualImplicitConversion()

ExprResult Sema::PerformContextualImplicitConversion | ( | SourceLocation | Loc,
|  | Expr * | From,
|  | ContextualImplicitConverter & | Converter
| ) |  |

Perform a contextual implicit conversion.

Attempt to convert the given expression to a type which is accepted by the given converter.

This routine will attempt to convert an expression of class type to a type accepted by the specified converter. In C++11 and before, the class must have a single non-explicit conversion function converting to a matching type. In C++1y, there can be multiple such conversion functions, but only one target type.

Parameters

  Loc | The source location of the construct that requires the conversion.
  From | The expression we're converting from.
  Converter | Used to control and diagnose the conversion process.

Returns
  The expression, converted to an integral or enumeration type if successful.

Definition at line 5894 of file SemaOverload.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::OverloadCandidateSet::BestViableFunction(), collectViableConversionCandidates(), clang::CPlusPlus14, clang::OverloadCandidateSet::CSK_Normal, diagnoseAmbiguousConversion(), clang::Sema::ContextualImplicitConverter::diagnoseIncomplete(), clang::Sema::ContextualImplicitConverter::diagnoseNoMatch(), diagnoseNoViableConversion(), distance(), clang::ExprError(), finishContextualImplicitConversion(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), clang::RecordType::getDecl(), clang::QualType::getNonReferenceType(), clang::Stmt::getSourceRange(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Expr::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::QualType::getUnqualifiedType(), clang::Expr::hasPlaceholderType(), clang::CXXConversionDecl::isExplicit(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::DeclAccessPair::make(), clang::Sema::ContextualImplicitConverter::match(), clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, recordConversion(), clang::UnresolvedSetImpl::size(), and clang::Sema::ContextualImplicitConverter::Suppress.

Referenced by ActOnCXXDelete().

## ◆ PerformContextuallyConvertToBool()

ExprResult Sema::PerformContextuallyConvertToBool | ( | Expr * | From | ) |

PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C++0x [conv]p3).

Definition at line 5439 of file SemaOverload.cpp.

References checkPlaceholderForOverload(), clang::ExprError(), clang::ImplicitConversionSequence::isBad(), and TryContextuallyConvertToBool().

Referenced by CheckCXXBooleanCondition().

## ◆ PerformContextuallyConvertToObjCPointer()

ExprResult Sema::PerformContextuallyConvertToObjCPointer | ( | Expr * | From | ) |

PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to an Objective-C pointer type.

Returns a valid but null ExprResult if no conversion sequence exists.

Definition at line 5730 of file SemaOverload.cpp.

References checkPlaceholderForOverload(), and clang::ExprError().

## ◆ PerformCopyInitialization()

ExprResult Sema::PerformCopyInitialization | ( | const InitializedEntity & | Entity,
|  | SourceLocation | EqualLoc,
|  | ExprResult | Init,
|  | bool | TopLevelOfInitList = `false`,
|  | bool | AllowExplicit = `false`
| ) |  |

Definition at line 9608 of file SemaInit.cpp.

References clang::InitializationKind::CreateCopy(), clang::ExprError(), clang::InitializationSequence::FK_ConstructorOverloadFailed, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::InitializedEntity::getType(), clang::ValueDecl::getType(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::InitializedEntity::isParameterKind(), clang::BadConversionSequence::no_conversion, clang::OR_No_Viable_Function, clang::ovl_fail_bad_conversion, clang::Result, and clang::InitializationSequence::SK_ConstructorInitialization.

Referenced by checkBuiltinArgument(), CheckObjCCollectionLiteralElement(), convertArgsForAvailabilityChecks(), CXXCheckConditionalOperands(), resolveBuiltinNewDeleteOverload(), and SemaBuiltinLaunder().

## ◆ PerformDependentDiagnostics()

void Sema::PerformDependentDiagnostics | ( | const DeclContext * | Pattern,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 5955 of file SemaTemplateInstantiateDecl.cpp.

References clang::DependentDiagnostic::Access, and clang::DeclContext::ddiags().

## ◆ PerformImplicitConversion() [1/4]

ExprResult Sema::PerformImplicitConversion | ( | Expr * | From,
|  | QualType | ToType,
|  | AssignmentAction | Action,
|  | bool | AllowExplicit = `false`
| ) |  |

PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType.

Returns the converted expression. Flavor is the kind of conversion we're performing, used in the error message. If `AllowExplicit`, explicit user-defined conversions are permitted.

Definition at line 1495 of file SemaOverload.cpp.

Referenced by ActOnCXXDelete(), buildCounterInit(), buildCounterUpdate(), CheckConvertedConstantExpression(), checkOpenMPLoop(), FindConditionalOverload(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), and widenIterationCount().

## ◆ PerformImplicitConversion() [2/4]

ExprResult Sema::PerformImplicitConversion | ( | Expr * | From,
|  | QualType | ToType,
|  | AssignmentAction | Action,
|  | bool | AllowExplicit,
|  | ImplicitConversionSequence & | ICS
| ) |  |

Definition at line 1502 of file SemaOverload.cpp.

References checkPlaceholderForOverload(), clang::ExprError(), clang::Stmt::getBeginLoc(), clang::Expr::getType(), and TryImplicitConversion().

## ◆ PerformImplicitConversion() [3/4]

ExprResult Sema::PerformImplicitConversion | ( | Expr * | From,
|  | QualType | ToType,
|  | const ImplicitConversionSequence & | ICS,
|  | AssignmentAction | Action,
|  | CheckedConversionKind | CCK = `CCK_ImplicitConversion`
| ) |  |

PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType using the pre-computed implicit conversion sequence ICS.

Returns the converted expression. Action is the kind of conversion we're performing, used in the error message.

Definition at line 3792 of file SemaExprCXX.cpp.

References AA_Converting, clang::UserDefinedConversionSequence::After, clang::ImplicitConversionSequence::AmbiguousConversion, clang::ImplicitConversionSequence::BadConversion, clang::UserDefinedConversionSequence::Before, BuildCXXCastArgument(), CCK_ForBuiltinOverloadedOp, Context, clang::UserDefinedConversionSequence::ConversionFunction, clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), DiagnoseAssignmentResult(), clang::UserDefinedConversionSequence::EllipsisConversion, clang::ImplicitConversionSequence::EllipsisConversion, clang::ExprError(), clang::UserDefinedConversionSequence::FoundConversionFunction, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::ImplicitConversionSequence::getKind(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getParamDecl(), clang::Stmt::getSourceRange(), clang::ASTContext::getTagDeclType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::UserDefinedConversionSequence::HadMultipleCandidates, Incompatible, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isRecordType(), PDiag(), PerformImplicitConversion(), clang::ImplicitConversionSequence::Standard, clang::ImplicitConversionSequence::StandardConversion, clang::ImplicitConversionSequence::UserDefined, and clang::ImplicitConversionSequence::UserDefinedConversion.

## ◆ PerformImplicitConversion() [4/4]

ExprResult Sema::PerformImplicitConversion | ( | Expr * | From,
|  | QualType | ToType,
|  | const StandardConversionSequence & | SCS,
|  | AssignmentAction | Action,
|  | CheckedConversionKind | CCK
| ) |  |

PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType by following the standard conversion sequence SCS.

Returns the converted expression. Flavor is the context in which we're performing this conversion, for use in error messages.

Definition at line 3892 of file SemaExprCXX.cpp.

References AA_Assigning, AA_Casting, AA_Converting, AA_Initializing, AA_Passing, AA_Passing_CFAudited, AA_Returning, AA_Sending, clang::LangOptions::allowsNonTrivialObjCLifetimeQualifiers(), clang::ASTContext::BoolTy, BuildCXXConstructExpr(), clang::Type::castAs(), CCK_CStyleCast, CCK_FunctionalCast, CheckDerivedToBaseConversion(), CheckExceptionSpecCompatibility(), CheckMemberPointerConversion(), CheckObjCARCUnavailableWeakConversion(), CheckObjCConversion(), CheckPointerConversion(), CheckTransparentUnionArgumentConstraints(), clang::CXXConstructExpr::CK_Complete, Compatible, CompleteConstructorCall(), Context, clang::StandardConversionSequence::CopyConstructor, clang::ImplicitCastExpr::Create(), DefaultLvalueConversion(), clang::StandardConversionSequence::DeprecatedStringLiteralToCharPtr, Diag(), diagnoseNullableToNonnullConversion(), DiagnoseUseOfDecl(), EmitRelatedResultTypeNote(), clang::ExprError(), clang::StandardConversionSequence::First, FixOverloadedFunctionReference(), clang::ASTContext::FloatTy, clang::StandardConversionSequence::FoundCopyConstructor, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::QualType::getAddressSpace(), clang::ASTContext::getAddrSpaceQualType(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::ASTContext::getBlockPointerType(), clang::TargetInfo::getCXXABI(), clang::EnumType::getDecl(), clang::ComplexType::getElementType(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::ASTContext::getObjCObjectPointerType(), clang::Expr::getObjectKind(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKind(), clang::AtomicType::getValueType(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ICK_Array_To_Pointer, clang::ICK_Block_Pointer_Conversion, clang::ICK_Boolean_Conversion, clang::ICK_C_Only_Conversion, clang::ICK_Compatible_Conversion, clang::ICK_Complex_Conversion, clang::ICK_Complex_Promotion, clang::ICK_Complex_Real, clang::ICK_Derived_To_Base, clang::ICK_Floating_Conversion, clang::ICK_Floating_Integral, clang::ICK_Floating_Promotion, clang::ICK_Function_Conversion, clang::ICK_Function_To_Pointer, clang::ICK_Identity, clang::ICK_Incompatible_Pointer_Conversion, clang::ICK_Integral_Conversion, clang::ICK_Integral_Promotion, clang::ICK_Lvalue_To_Rvalue, clang::ICK_Num_Conversion_Kinds, clang::ICK_Pointer_Conversion, clang::ICK_Pointer_Member, clang::ICK_Qualification, clang::ICK_TransparentUnionConversion, clang::ICK_Vector_Conversion, clang::ICK_Vector_Splat, clang::ICK_Writeback_Conversion, clang::ICK_Zero_Event_Conversion, clang::ICK_Zero_Queue_Conversion, ImpCastExprToType(), clang::StandardConversionSequence::IncompatibleObjC, clang::Qualifiers::isAddressSpaceSupersetOf(), clang::Type::isBlockPointerType(), clang::Type::isBooleanType(), isCast(), isCompleteType(), clang::EnumDecl::isFixed(), clang::Type::isHalfType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), clang::OK_ObjCProperty, clang::ASTContext::OverloadTy, PrepareCastToObjCObjectPointer(), prepareVectorSplat(), clang::ASTContext::removeAddrSpaceQualType(), ResolveAddressOfOverloadedFunction(), ScalarTypeToBooleanCastKind(), clang::StandardConversionSequence::Second, clang::StandardConversionSequence::Third, and clang::VK_RValue.

## ◆ PerformMemberExprBaseConversion()

ExprResult Sema::PerformMemberExprBaseConversion | ( | Expr * | Base,
|  | bool | IsArrow
| ) |  |

Perform conversions on the LHS of a member access expression.

Definition at line 1240 of file SemaExprMember.cpp.

References clang::Expr::getType(), and clang::Type::isFunctionType().

Referenced by LookupMemberExpr().

## ◆ PerformMoveOrCopyInitialization()

ExprResult Sema::PerformMoveOrCopyInitialization | ( | const InitializedEntity & | Entity,
|  | const VarDecl * | NRVOCandidate,
|  | QualType | ResultType,
|  | Expr * | Value,
|  | bool | AllowNRVO = `true`
| ) |  |

Perform the initialization of a potentially-movable value, which is the result of return value.

This routine implements C++14 [class.copy]p32, which attempts to treat returned lvalues as rvalues in certain cases (to prefer move construction), then falls back to treating them as lvalues if that failed.

Definition at line 3144 of file SemaStmt.cpp.

References clang::ExprError(), clang::Expr::getExprLoc(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isTriviallyCopyableType(), and TryMoveInitialization().

Referenced by checkEscapingByref(), and noteMemberDeclaredHere().

## ◆ PerformObjectArgumentInitialization()

ExprResult Sema::PerformObjectArgumentInitialization | ( | Expr * | From,
|  | NestedNameSpecifier * | Qualifier,
|  | NamedDecl * | FoundDecl,
|  | CXXMethodDecl * | Method
| ) |  |

PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the given Method with the given expression.

Definition at line 5332 of file SemaOverload.cpp.

References clang::Type::castAs(), clang::Expr::Classify(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::CXXMethodDecl::getThisType(), clang::Expr::getType(), and clang::Expr::Classification::makeSimpleLValue().

Referenced by convertArgsForAvailabilityChecks().

## ◆ PerformObjectMemberConversion()

ExprResult Sema::PerformObjectMemberConversion | ( | Expr * | From,
|  | NestedNameSpecifier * | Qualifier,
|  | NamedDecl * | FoundDecl,
|  | NamedDecl * | Member
| ) |  |

Cast a base object to a member's actual type.

Logically this happens in three phases:

- First we cast from the base type to the naming class. The naming class is the class into which we were looking when we found the member; it's the qualifier type if a qualifier was provided, and otherwise it's the base type.
- Next we cast from the naming class to the declaring class. If the member we found was brought into a class's scope by a using declaration, this is that class; otherwise it's the class declaring the member.
- Finally we cast from the declaring class to the "true" declaring class of the member. This conversion does not obey access control.

Definition at line 2780 of file SemaExpr.cpp.

## ◆ PerformOpenMPImplicitIntegerConversion()

ExprResult Sema::PerformOpenMPImplicitIntegerConversion | ( | SourceLocation | OpLoc,
|  | Expr * | Op
| ) |  |

Definition at line 11573 of file SemaOpenMP.cpp.

References Diag(), clang::ExprError(), clang::Decl::getLocation(), and clang::Type::isEnumeralType().

Referenced by isNonNegativeIntegerValue().

## ◆ PerformPendingInstantiations()

void Sema::PerformPendingInstantiations | ( | bool | LocalOnly = `false` | ) |

Performs template instantiation for all implicit template instantiations we have seen until this point.

Definition at line 5877 of file SemaTemplateInstantiateDecl.cpp.

References clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::VarDecl::getTemplateSpecializationKindForInstantiation(), clang::FunctionDecl::isDefined(), clang::Decl::isInvalidDecl(), clang::VarDecl::isStaticDataMember(), clang::FunctionDecl::setInstantiationIsPending(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by ActOnEndOfTranslationUnitFragment().

## ◆ PerformQualificationConversion()

ExprResult Sema::PerformQualificationConversion | ( | Expr * | E,
|  | QualType | Ty,
|  | ExprValueKind | VK = `VK_RValue`,
|  | CheckedConversionKind | CCK = `CCK_ImplicitConversion`
| ) |  |

Definition at line 7731 of file SemaInit.cpp.

References clang::QualType::getAddressSpace(), clang::Type::getPointeeType(), clang::Expr::getType(), and clang::VK_RValue.

Referenced by clang::InitializationSequence::Perform().

## ◆ popCodeSynthesisContext()

void Sema::popCodeSynthesisContext | ( |  | ) |

Definition at line 439 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContextLookupModules, CodeSynthesisContexts, InNonInstantiationSFINAEContext, LastEmittedCodeSynthesisContextDepth, LookupModulesCache, and NonInstantiationEntries.

Referenced by clang::Sema::InstantiatingTemplate::Clear(), and clang::Sema::SynthesizedFunctionScope::~SynthesizedFunctionScope().

## ◆ PopCompoundScope()

void Sema::PopCompoundScope | ( |  | ) |

Definition at line 1811 of file Sema.cpp.

References clang::sema::FunctionScopeInfo::CompoundScopes, and getCurFunction().

## ◆ PopDeclContext()

void Sema::PopDeclContext | ( |  | ) |

Definition at line 1304 of file SemaDecl.cpp.

## ◆ PopExpressionEvaluationContext()

void Sema::PopExpressionEvaluationContext | ( |  | ) |

Definition at line 15281 of file SemaExpr.cpp.

References Diag(), clang::Sema::ExpressionEvaluationContextRecord::ExprContext, clang::Sema::ExpressionEvaluationContextRecord::isConstantEvaluated(), clang::Sema::ExpressionEvaluationContextRecord::isUnevaluated(), clang::Sema::ExpressionEvaluationContextRecord::Lambdas, clang::Sema::ExpressionEvaluationContextRecord::NumCleanupObjects, clang::Sema::ExpressionEvaluationContextRecord::NumTypos, clang::Sema::ExpressionEvaluationContextRecord::ParentCleanup, clang::Sema::ExpressionEvaluationContextRecord::SavedMaybeODRUseExprs, and clang::Sema::ExpressionEvaluationContextRecord::VolatileAssignmentLHSs.

Referenced by clang::EnterExpressionEvaluationContext::~EnterExpressionEvaluationContext(), and clang::Sema::SynthesizedFunctionScope::~SynthesizedFunctionScope().

## ◆ PopForceCUDAHostDevice()

bool Sema::PopForceCUDAHostDevice | ( |  | ) |

Decrements our count of the number of times we've seen a pragma forcing functions to be host device.

Returns false if the count is 0 before incrementing, so you can emit an error.

Definition at line 32 of file SemaCUDA.cpp.

References clang::CUDA, and getLangOpts().

## ◆ PopFunctionScopeInfo()

Sema::PoppedFunctionScopePtr Sema::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.

Parameters

  WP | The warning policy to use for CFG-based warnings, or null if such warnings should not be produced.
  D | The declaration corresponding to this function scope, if producing CFG-based warnings.
  BlockType | The type of the block expression, if D is a BlockDecl.

Definition at line 1776 of file Sema.cpp.

References AnalysisWarnings, Diag(), FunctionScopes, clang::sema::AnalysisBasedWarnings::IssueWarnings(), LangOpts, markEscapingByrefs(), and clang::Sema::PoppedFunctionScopeDeleter::operator()().

Referenced by clang::Sema::FunctionScopeRAII::~FunctionScopeRAII(), and clang::Sema::SynthesizedFunctionScope::~SynthesizedFunctionScope().

## ◆ popObjCTypeParamList()

void Sema::popObjCTypeParamList | ( | Scope * | S,
|  | ObjCTypeParamList * | typeParamList
| ) |  |

Definition at line 804 of file SemaDeclObjC.cpp.

Referenced by clang::Parser::ObjCTypeParamListScope::leave().

## ◆ PopParsingClass()

void clang::Sema::PopParsingClass | ( | ParsingClassState | state | ) |
| inline

Definition at line 4397 of file Sema.h.

References clang::Sema::DelayedDiagnostics::popUndelayed().

## ◆ PopParsingDeclaration()

void clang::Sema::PopParsingDeclaration | ( | ParsingDeclState | state,
|  | Decl * | decl
| ) |  |

Referenced by clang::ParsingDeclRAIIObject::abortAndRemember(), and clang::SuppressAccessChecks::done().

## ◆ PopPragmaVisibility()

void Sema::PopPragmaVisibility | ( | bool | IsNamespaceEnd,
|  | SourceLocation | EndLoc
| ) |  |

PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' and visibility attributes on namespaces.

Definition at line 964 of file SemaAttr.cpp.

References Diag(), and VisContext.

Referenced by ActOnPragmaVisibility().

## ◆ PrepareCastToObjCObjectPointer()

CastKind Sema::PrepareCastToObjCObjectPointer | ( | ExprResult & | E | ) |

Prepare a conversion of the given expression to an ObjC object pointer type.

Definition at line 6381 of file SemaExpr.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::isBlockPointerType(), clang::Type::isObjCObjectPointerType(), and clang::Type::isPointerType().

Referenced by PerformImplicitConversion(), and TryReinterpretCast().

## ◆ PrepareScalarCast()

CastKind Sema::PrepareScalarCast | ( | ExprResult & | Src,
|  | QualType | DestTy
| ) |  |

Prepares for a scalar cast, performing all the necessary stages except the final cast and returning the kind required.

Definition at line 6396 of file SemaExpr.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get().

Referenced by CXXCheckConditionalOperands(), and DiagnoseBadFunctionCast().

## ◆ prepareVectorSplat()

ExprResult Sema::prepareVectorSplat | ( | QualType | VectorTy,
|  | Expr * | SplattedExpr
| ) |  |

Prepare `SplattedExpr` for a vector splat operation, adding implicit casts if necessary.

Definition at line 6706 of file SemaExpr.cpp.

References clang::Type::castAs(), clang::Expr::getType(), clang::Type::isBooleanType(), clang::Type::isExtVectorType(), clang::Type::isFloatingType(), and clang::Type::isIntegralOrEnumerationType().

Referenced by DiagnoseBadFunctionCast(), PerformImplicitConversion(), and TryAddressSpaceCast().

## ◆ PrintContextStack()

void clang::Sema::PrintContextStack | ( |  | ) |
| inline

Definition at line 8416 of file Sema.h.

Referenced by EmitCurrentDiagnostic().

## ◆ PrintInstantiationStack()

void Sema::PrintInstantiationStack | ( |  | ) |

Prints the current instantiation stack through a series of notes.

Definition at line 506 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts, clang::Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution, clang::Sema::CodeSynthesisContext::DefaultFunctionArgumentInstantiation, clang::Sema::CodeSynthesisContext::DefaultTemplateArgumentInstantiation, Diags, clang::Sema::CodeSynthesisContext::ExplicitTemplateArgumentSubstitution, clang::Decl::getDeclContext(), getPrintingPolicy(), getTemplateArgumentBindingsText(), clang::DiagnosticsEngine::getTemplateBacktraceLimit(), clang::TemplateDecl::getTemplateParameters(), clang::NamedDecl::printName(), clang::printTemplateArgumentList(), clang::Sema::CodeSynthesisContext::PriorTemplateArgumentSubstitution, clang::DiagnosticsEngine::Report(), and clang::Sema::CodeSynthesisContext::TemplateInstantiation.

## ◆ PrintPragmaAttributeInstantiationPoint()

void Sema::PrintPragmaAttributeInstantiationPoint | ( |  | ) |

Definition at line 837 of file SemaAttr.cpp.

References Diags, clang::Decl::getBeginLoc(), PragmaAttributeCurrentTargetDecl, and clang::DiagnosticsEngine::Report().

## ◆ PrintStats()

void Sema::PrintStats | ( |  | ) | const

Print out statistics about the semantic analysis.

Definition at line 479 of file Sema.cpp.

References AnalysisWarnings, BumpAlloc, NumSFINAEErrors, and clang::sema::AnalysisBasedWarnings::PrintStats().

## ◆ ProcessAccessDeclAttributeList()

bool clang::Sema::ProcessAccessDeclAttributeList | ( | AccessSpecDecl * | ASDecl,
|  | const ParsedAttributesView & | AttrList
| ) |  |

## ◆ ProcessDeclAttributeDelayed()

void clang::Sema::ProcessDeclAttributeDelayed | ( | Decl * | D,
|  | const ParsedAttributesView & | AttrList
| ) |  |

## ◆ ProcessDeclAttributeList()

void clang::Sema::ProcessDeclAttributeList | ( | Scope * | S,
|  | Decl * | D,
|  | const ParsedAttributesView & | AL,
|  | bool | IncludeCXX11Attributes = `true`
| ) |  |

Referenced by ActOnForwardProtocolDeclaration(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartProtocolInterface(), and AddPragmaAttributes().

## ◆ ProcessDeclAttributes()

void clang::Sema::ProcessDeclAttributes | ( | Scope * | S,
|  | Decl * | D,
|  | const Declarator & | PD
| ) |  |

## ◆ ProcessPragmaWeak()

void clang::Sema::ProcessPragmaWeak | ( | Scope * | S,
|  | Decl * | D
| ) |  |

## ◆ ProcessPropertyDecl()

void Sema::ProcessPropertyDecl | ( | ObjCPropertyDecl * | property | ) |

Process the specified property declaration and create decls for the setters and getters as needed.

ProcessPropertyDecl - Make sure that any user-defined setter/getter methods have the property type and issue diagnostics if they don't.

Parameters

  property | The property declaration being processed

Also synthesize a getter/setter method if none exist (and update the appropriate lookup tables.

Definition at line 2390 of file SemaObjCProperty.cpp.

References clang::Decl::addAttr(), clang::DeclContext::addDecl(), AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), AddPropertyAttrs(), clang::AttributeCommonInfo::AS_GNU, CheckARCMethodDecl(), CheckObjCMethodOverrides(), Context, clang::ObjCMethodDecl::Create(), clang::ParmVarDecl::Create(), clang::ObjCMethodDecl::createImplicitParams(), Diag(), DiagnosePropertyAccessorMismatch(), clang::Decl::getAttr(), clang::ASTContext::getAttributedType(), clang::ASTContext::getCanonicalType(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCContainerDecl::getClassMethod(), clang::NamedDecl::getDeclName(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getSetterName(), clang::Decl::hasAttr(), clang::ASTContext::hasSameUnqualifiedType(), clang::ObjCPropertyDecl::isDirectProperty(), clang::Decl::isInvalidDecl(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyDecl::OBJC_PR_null_resettable, clang::ObjCMethodDecl::Optional, clang::ObjCPropertyDecl::Optional, clang::ObjCMethodDecl::Required, RTC_Unknown, clang::SC_None, clang::ObjCMethodDecl::setPropertyAccessor(), clang::AttributedType::stripOuterNullability(), clang::Unspecified, and clang::ASTContext::VoidTy.

## ◆ ProcessStmtAttributes()

StmtResult Sema::ProcessStmtAttributes | ( | Stmt * | Stmt,
|  | const ParsedAttributesView & | Attrs,
|  | SourceRange | Range
| ) |  |

Stmt attributes - this routine is the top level dispatcher.

Definition at line 347 of file SemaStmtAttr.cpp.

## ◆ ProduceCallSignatureHelp()

QualType Sema::ProduceCallSignatureHelp | ( | Scope * | S,
|  | Expr * | Fn,
|  | ArrayRef< Expr *> | Args,
|  | SourceLocation | OpenParLoc
| ) |  |

Reports signatures for a call to CodeCompleteConsumer and returns the preferred type for the current argument.

Returned type can be null.

Definition at line 5131 of file SemaCodeComplete.cpp.

References anyNullArguments(), clang::OverloadCandidateSet::CSK_Normal, clang::Expr::getExprLoc(), clang::Expr::hasAnyTypeDependentArguments(), and clang::Expr::isTypeDependent().

## ◆ ProduceConstructorSignatureHelp()

QualType Sema::ProduceConstructorSignatureHelp | ( | Scope * | S,
|  | QualType | Type,
|  | SourceLocation | Loc,
|  | ArrayRef< Expr *> | Args,
|  | SourceLocation | OpenParLoc
| ) |  |

Definition at line 5227 of file SemaCodeComplete.cpp.

References clang::OverloadCandidateSet::CSK_Normal, clang::Type::getAsCXXRecordDecl(), and clang::DeclAccessPair::make().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ ProduceCtorInitMemberSignatureHelp()

QualType Sema::ProduceCtorInitMemberSignatureHelp | ( | Scope * | S,
|  | Decl * | ConstructorDecl,
|  | CXXScopeSpec | SS,
|  | ParsedType | TemplateTypeTy,
|  | ArrayRef< Expr *> | ArgExprs,
|  | IdentifierInfo * | II,
|  | SourceLocation | OpenParLoc
| ) |  |

Definition at line 5266 of file SemaCodeComplete.cpp.

References clang::CXXMethodDecl::getParent().

## ◆ propagateDLLAttrToBaseClassTemplate()

void Sema::propagateDLLAttrToBaseClassTemplate | ( | CXXRecordDecl * | Class,
|  | Attr * | ClassAttr,
|  | ClassTemplateSpecializationDecl * | BaseTemplateSpec,
|  | SourceLocation | BaseLoc
| ) |  |

Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibility.

Definition at line 6056 of file SemaDeclCXX.cpp.

References clang::Decl::addAttr(), clang::Attr::clone(), Diag(), clang::getDLLAttr(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::ClassTemplateSpecializationDecl::getSpecializationKind(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::ClassTemplateSpecializationDecl::isExplicitSpecialization(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by dllExportImportClassTemplateSpecialization().

## ◆ PushBlockScope()

void Sema::PushBlockScope | ( | Scope * | BlockScope,
|  | BlockDecl * | Block
| ) |  |

Definition at line 1683 of file Sema.cpp.

References FunctionScopes, and getDiagnostics().

## ◆ PushCapturedRegionScope()

void Sema::PushCapturedRegionScope | ( | Scope * | RegionScope,
|  | CapturedDecl * | CD,
|  | RecordDecl * | RD,
|  | CapturedRegionKind | K,
|  | unsigned | OpenMPCaptureLevel = `0`
| ) |  |

Definition at line 2203 of file Sema.cpp.

References Context, clang::CR_OpenMP, FunctionScopes, clang::CapturedDecl::getContextParam(), getDiagnostics(), getLangOpts(), clang::sema::CapturingScopeInfo::ReturnType, and clang::ASTContext::VoidTy.

## ◆ pushCodeSynthesisContext()

void Sema::pushCodeSynthesisContext | ( | CodeSynthesisContext | Ctx | ) |

Definition at line 424 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts, InNonInstantiationSFINAEContext, clang::Sema::CodeSynthesisContext::isInstantiationRecord(), clang::isStackNearlyExhausted(), NonInstantiationEntries, clang::Sema::CodeSynthesisContext::PointOfInstantiation, clang::Sema::CodeSynthesisContext::SavedInNonInstantiationSFINAEContext, and warnStackExhausted().

Referenced by clang::Sema::SynthesizedFunctionScope::addContextNote(), and clang::Sema::CodeSynthesisContext::isInstantiationRecord().

## ◆ PushCompoundScope()

void Sema::PushCompoundScope | ( | bool | IsStmtExpr | ) |

Definition at line 1807 of file Sema.cpp.

References clang::sema::FunctionScopeInfo::CompoundScopes, and getCurFunction().

## ◆ PushDeclContext()

void Sema::PushDeclContext | ( | Scope * | S,
|  | DeclContext * | DC
| ) |  |

Set the current declaration context until it gets popped.

Definition at line 1297 of file SemaDecl.cpp.

Referenced by ActOnStartOfObjCMethodDef(), and ActOnStartRequiresExpr().

## ◆ PushExpressionEvaluationContext() [1/2]

void Sema::PushExpressionEvaluationContext | ( | ExpressionEvaluationContext | NewContext,
|  | Decl * | LambdaContextDecl = `nullptr`,
|  | ExpressionEvaluationContextRecord::ExpressionKind | Type = `ExpressionEvaluationContextRecord::EK_Other`
| ) |  |

Definition at line 15198 of file SemaExpr.cpp.

Referenced by ActOnStartOfObjCMethodDef(), clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext(), and clang::Sema::SynthesizedFunctionScope::SynthesizedFunctionScope().

## ◆ PushExpressionEvaluationContext() [2/2]

void Sema::PushExpressionEvaluationContext | ( | ExpressionEvaluationContext | NewContext,
|  | ReuseLambdaContextDecl_t | ,
|  | ExpressionEvaluationContextRecord::ExpressionKind | Type = `ExpressionEvaluationContextRecord::EK_Other`
| ) |  |

Definition at line 15209 of file SemaExpr.cpp.

## ◆ PushForceCUDAHostDevice()

void Sema::PushForceCUDAHostDevice | ( |  | ) |

Increments our count of the number of times we've seen a pragma forcing functions to be host device.

So long as this count is greater than zero, all functions encountered will be host device.

Definition at line 27 of file SemaCUDA.cpp.

References clang::CUDA, and getLangOpts().

## ◆ PushFunctionScope()

void Sema::PushFunctionScope | ( |  | ) |

Enter a new function scope.

Definition at line 1671 of file Sema.cpp.

References CachedFunctionScope, FunctionScopes, getDiagnostics(), and LangOpts.

Referenced by ActOnStartOfObjCMethodDef(), and clang::Sema::SynthesizedFunctionScope::SynthesizedFunctionScope().

## ◆ PushLambdaScope()

LambdaScopeInfo * Sema::PushLambdaScope | ( |  | ) |

Definition at line 1688 of file Sema.cpp.

References FunctionScopes, and getDiagnostics().

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ PushNamespaceVisibilityAttr()

void Sema::PushNamespaceVisibilityAttr | ( | const VisibilityAttr * | Attr,
|  | SourceLocation | Loc
| ) |  |

PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.

Definition at line 955 of file SemaAttr.cpp.

References NoVisibility, and PushPragmaVisibility().

## ◆ PushOnScopeChains()

void Sema::PushOnScopeChains | ( | NamedDecl * | D,
|  | Scope * | S,
|  | bool | AddToContext = `true`
| ) |  |

Add this decl to the scope shadowed decl chains.

Definition at line 1430 of file SemaDecl.cpp.

Referenced by ActOnCompatibilityAlias(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnStartClassImplementation(), ActOnStartOfObjCMethodDef(), ActOnStartProtocolInterface(), ActOnStartRequiresExpr(), and Initialize().

## ◆ PushParsingClass()

ParsingClassState clang::Sema::PushParsingClass | ( |  | ) |
| inline

Definition at line 4393 of file Sema.h.

References clang::Sema::DelayedDiagnostics::pushUndelayed().

## ◆ PushParsingDeclaration()

ParsingDeclState clang::Sema::PushParsingDeclaration | ( | sema::DelayedDiagnosticPool & | pool | ) |
| inline

Definition at line 4387 of file Sema.h.

References clang::ast_matchers::decl, clang::Sema::DelayedDiagnostics::push(), and clang::CodeGen::state.

Referenced by clang::ParsingDeclRAIIObject::abortAndRemember(), and clang::SuppressAccessChecks::SuppressAccessChecks().

## ◆ PushUsingDirective()

void Sema::PushUsingDirective | ( | Scope * | S,
|  | UsingDirectiveDecl * | UDir
| ) |  |

Definition at line 11076 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::Scope::getEntity(), clang::DeclContext::isFunctionOrMethod(), and clang::Scope::PushUsingDirective().

## ◆ ReadMethodPool()

void Sema::ReadMethodPool | ( | Selector | Sel | ) |

Read the contents of the method pool for a given selector from external storage.

Definition at line 3395 of file SemaDeclObjC.cpp.

Referenced by AddClassMessageCompletions(), AreMultipleMethodsInGlobalPool(), CollectMultipleMethodsInGlobalPool(), and updateOutOfDateSelector().

## ◆ RebuildExprInCurrentInstantiation()

ExprResult Sema::RebuildExprInCurrentInstantiation | ( | Expr * | E | ) |

Definition at line 10522 of file SemaTemplate.cpp.

References clang::Expr::getExprLoc().

## ◆ RebuildNestedNameSpecifierInCurrentInstantiation()

bool Sema::RebuildNestedNameSpecifierInCurrentInstantiation | ( | CXXScopeSpec & | SS | ) |

Definition at line 10528 of file SemaTemplate.cpp.

References clang::CXXScopeSpec::getWithLocInContext(), and clang::CXXScopeSpec::isInvalid().

## ◆ RebuildTemplateParamsInCurrentInstantiation()

bool Sema::RebuildTemplateParamsInCurrentInstantiation | ( | TemplateParameterList * | Params | ) |

Rebuild the template parameters now that we know we're in a current instantiation.

Definition at line 10546 of file SemaTemplate.cpp.

References clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::DeclaratorDecl::getTypeSourceInfo(), and clang::TemplateParameterList::size().

## ◆ RebuildTypeInCurrentInstantiation()

TypeSourceInfo * Sema::RebuildTypeInCurrentInstantiation | ( | TypeSourceInfo * | T,
|  | SourceLocation | Loc,
|  | DeclarationName | Name
| ) |  |

Rebuilds a type within the context of the current instantiation.

The type `T` is part of the type of an out-of-line member definition of a class template (or class template partial specialization) that was parsed and constructed before we entered the scope of the class template (or partial specialization thereof). This routine will rebuild that type now that we have entered the declarator's scope, which may produce different canonical types, e.g.,

template<typename T>
struct X {
typedef T* pointer;
pointer data();
};
template<typename T>
typename X<T>::pointer X<T>::data() { ... }

Here, the type "typename X<T>::pointer" will be created as a DependentNameType, since we do not know that we can look into X<T> when we parsed the type. This function will rebuild the type, performing the lookup of "pointer" in X<T> and returning an ElaboratedType whose canonical type is the same as the canonical type of T*, allowing the return types of the out-of-line definition and the declaration to match.

Definition at line 10512 of file SemaTemplate.cpp.

## ◆ RecordParsingTemplateParameterDepth()

void Sema::RecordParsingTemplateParameterDepth | ( | unsigned | Depth | ) |

This is used to inform Sema what the current TemplateParameterDepth is during Parsing.

Currently it is used to pass on the depth when parsing generic lambda 'auto' parameters.

Definition at line 1694 of file Sema.cpp.

References Depth, and getCurLambda().

Referenced by addConstevalToLambdaDeclSpecifier().

## ◆ recreateSyntacticForm()

Expr * Sema::recreateSyntacticForm | ( | PseudoObjectExpr * | E | ) |

Given a pseudo-object expression, recreate what it looks like syntactically without the attendant OpaqueValueExprs.

This is a hack which should be removed when TreeTransform is capable of rebuilding a tree without stripping implicit operations.

Definition at line 1645 of file SemaPseudoObject.cpp.

References clang::PseudoObjectExpr::getSyntacticForm(), and stripOpaqueValuesFromPseudoObjectRef().

## ◆ redelayDiagnostics()

void clang::Sema::redelayDiagnostics | ( | sema::DelayedDiagnosticPool & | pool | ) |

Referenced by clang::SuppressAccessChecks::redelay().

## ◆ referenceDLLExportedClassMethods()

void Sema::referenceDLLExportedClassMethods | ( |  | ) |

Definition at line 12996 of file SemaDeclCXX.cpp.

References ReferenceDllExportedMembers().

Referenced by dllExportImportClassTemplateSpecialization().

## ◆ RefersToMemberWithReducedAlignment()

void Sema::RefersToMemberWithReducedAlignment | ( | Expr * | E,
|  | llvm::function_ref< void(Expr *, RecordDecl *, FieldDecl *, CharUnits)> | Action
| ) |  |

This function calls Action when it determines that E designates a misaligned member due to the packed attribute.

This is used to emit local diagnostics like in reference binding.

Definition at line 14930 of file SemaChecking.cpp.

References clang::Type::castAs(), clang::MemberExpr::getBase(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Qualifiers::hasUnaligned(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isDependentType(), and clang::Decl::isInvalidDecl().

## ◆ RegisterLocallyScopedExternCDecl()

void Sema::RegisterLocallyScopedExternCDecl | ( | NamedDecl * | ND,
|  | Scope * | S
| ) |  |

Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarations.

We include any extern "C" declaration that is not visible in the translation unit here, not just function-scope declarations.

Definition at line 5879 of file SemaDecl.cpp.

## ◆ RegisterTypeTagForDatatype()

void Sema::RegisterTypeTagForDatatype | ( | const IdentifierInfo * | ArgumentKind,
|  | uint64_t | MagicValue,
|  | QualType | Type,
|  | bool | LayoutCompatible,
|  | bool | MustBeNull
| ) |  |

Register a magic integral constant to be used as a type tag.

Definition at line 14768 of file SemaChecking.cpp.

## ◆ ReplaceAutoType()

QualType Sema::ReplaceAutoType | ( | QualType | TypeWithAuto,
|  | QualType | Replacement
| ) |  |

Completely replace the `auto` in `TypeWithAuto` by `Replacement`.

This does not retain any `auto` type sugar.

Definition at line 4758 of file SemaTemplateDeduction.cpp.

## ◆ RequireCompleteDeclContext()

bool Sema::RequireCompleteDeclContext | ( | CXXScopeSpec & | SS,
|  | DeclContext * | DC
| ) |  |

Require that the context specified by SS be complete.

If SS refers to a type, this routine checks whether the type is complete enough (or can be made complete enough) for name lookup into the DeclContext. A type that is not yet completed can be considered "complete enough" if it is a class/struct/union/enum that is currently being defined. Or, if we have a type that names a class template specialization that is not a complete type, we will attempt to instantiate that class template.

Definition at line 199 of file SemaCXXScopeSpec.cpp.

References Context, Definition, Diag(), diagnoseMissingImport(), clang::Type::getAsTagDecl(), clang::SourceRange::getBegin(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::CXXScopeSpec::getRange(), getTemplateInstantiationArgs(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::ASTContext::getTypeDeclType(), hasVisibleDefinition(), InstantiateEnum(), clang::TagDecl::isBeingDefined(), clang::DeclContext::isDependentContext(), clang::SourceLocation::isInvalid(), isSFINAEContext(), RequireCompleteType(), clang::CXXScopeSpec::SetInvalid(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.

Referenced by LookupMemberExprInRecord(), clang::TreeTransform< Derived >::RebuildDependentNameType(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ RequireCompleteExprType() [1/3]

bool Sema::RequireCompleteExprType | ( | Expr * | E,
|  | TypeDiagnoser & | Diagnoser
| ) |  |

Ensure that the type of the given expression is complete.

This routine checks whether the expression `E` has a complete type. If the expression refers to an instantiable construct, that instantiation is performed as needed to complete its type. Furthermore Sema::RequireCompleteType is called for the expression's type (or in the case of a reference type, the referred-to type).

Parameters

  E | The expression whose type is required to be complete.
  Diagnoser | The object that will emit a diagnostic if the type is incomplete.

Returns
  `true` if the type of `E` is incomplete and diagnosed, `false` otherwise.

Definition at line 7879 of file SemaType.cpp.

References clang::Expr::getExprLoc(), clang::Expr::getType(), and clang::Type::isIncompleteArrayType().

## ◆ RequireCompleteExprType() [2/3]

bool Sema::RequireCompleteExprType | ( | Expr * | E,
|  | unsigned | DiagID
| ) |  |

Definition at line 7897 of file SemaType.cpp.

## ◆ RequireCompleteExprType() [3/3]

template<typename... Ts>

bool clang::Sema::RequireCompleteExprType | ( | Expr * | E,
|  | unsigned | DiagID,
|  | const Ts &... | Args
| ) |  |
| inline

Definition at line 1837 of file Sema.h.

## ◆ RequireCompleteType() [1/3]

bool Sema::RequireCompleteType | ( | SourceLocation | Loc,
|  | QualType | T,
|  | TypeDiagnoser & | Diagnoser
| ) |  |

Ensure that the type T is a complete type.

This routine checks whether the type `T` is complete in any context where a complete type is required. If `T` is a complete type, returns false. If `T` is a class template specialization, this routine then attempts to perform class template instantiation. If instantiation fails, or if `T` is incomplete and cannot be completed, issues the diagnostic `diag` (giving it the type `T`) and returns true.

Parameters

  Loc | The location in the source that the incomplete type diagnostic should refer to.
  T | The type that this routine is examining for completeness.

Returns
  `true` if `T` is incomplete and a diagnostic was emitted, `false` otherwise.

Definition at line 7919 of file SemaType.cpp.

References clang::Type::getAs().

Referenced by ActOnCXXDelete(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartOfObjCMethodDef(), BuildCXXTypeConstructExpr(), CheckAllocatedType(), checkArithmeticIncompletePointerType(), CheckCommaOperands(), CheckForModifiableLvalue(), checkMemberDecomposition(), CheckPointerToMemberOperands(), CheckSpecifiedExceptionType(), CheckUnaryTypeTraitTypeCompleteness(), ComputeDefaultedSpecialMemberExceptionSpec(), CopyObject(), DiagnoseBadFunctionCast(), diagReturnOnAllocFailure(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), getCastAwayConstnessCastKind(), IgnoredValueConversions(), LookupMemberExpr(), LookupMemberExprInRecord(), lookupStdTypeTraitMember(), RequireCompleteDeclContext(), SemaBuiltinLaunder(), TryStaticCast(), and TryStaticImplicitCast().

## ◆ RequireCompleteType() [2/3]

bool Sema::RequireCompleteType | ( | SourceLocation | Loc,
|  | QualType | T,
|  | unsigned | DiagID
| ) |  |

Definition at line 8235 of file SemaType.cpp.

## ◆ RequireCompleteType() [3/3]

template<typename... Ts>

bool clang::Sema::RequireCompleteType | ( | SourceLocation | Loc,
|  | QualType | T,
|  | unsigned | DiagID,
|  | const Ts &... | Args
| ) |  |
| inline

Definition at line 1826 of file Sema.h.

## ◆ RequireLiteralType() [1/3]

bool Sema::RequireLiteralType | ( | SourceLocation | Loc,
|  | QualType | T,
|  | TypeDiagnoser & | Diagnoser
| ) |  |

Ensure that the type T is a literal type.

This routine checks whether the type `T` is a literal type. If `T` is an incomplete type, an attempt is made to complete it. If `T` is a literal type, or `AllowIncompleteType` is true and `T` is an incomplete type, returns false. Otherwise, this routine issues the diagnostic `PD` (giving it the type `T`), along with notes explaining why the type is not a literal type, and returns true.

Parameters

  Loc | The location in the source that the non-literal type diagnostic should refer to.
  T | The type that this routine is examining for literalness.
  Diagnoser | Emits a diagnostic if T is not a literal type.

Returns
  `true` if `T` is not a literal type and a diagnostic was emitted, `false` otherwise.

Definition at line 8273 of file SemaType.cpp.

References clang::Type::isDependentType().

Referenced by CheckLiteralType().

## ◆ RequireLiteralType() [2/3]

bool Sema::RequireLiteralType | ( | SourceLocation | Loc,
|  | QualType | T,
|  | unsigned | DiagID
| ) |  |

Definition at line 8363 of file SemaType.cpp.

## ◆ RequireLiteralType() [3/3]

template<typename... Ts>

bool clang::Sema::RequireLiteralType | ( | SourceLocation | Loc,
|  | QualType | T,
|  | unsigned | DiagID,
|  | const Ts &... | Args
| ) |  |
| inline

Definition at line 1847 of file Sema.h.

## ◆ RequireNonAbstractType() [1/2]

bool Sema::RequireNonAbstractType | ( | SourceLocation | Loc,
|  | QualType | T,
|  | TypeDiagnoser & | Diagnoser
| ) |  |

Definition at line 5550 of file SemaDeclCXX.cpp.

Referenced by CheckAllocatedType(), clang::InitializationSequence::Perform(), and TryStaticImplicitCast().

## ◆ RequireNonAbstractType() [2/2]

template<typename... Ts>

bool clang::Sema::RequireNonAbstractType | ( | SourceLocation | Loc,
|  | QualType | T,
|  | unsigned | DiagID,
|  | const Ts &... | Args
| ) |  |
| inline

Definition at line 6808 of file Sema.h.

## ◆ ResolveAddressOfOverloadedFunction()

FunctionDecl * Sema::ResolveAddressOfOverloadedFunction | ( | Expr * | AddressOfExpr,
|  | QualType | TargetType,
|  | bool | Complain,
|  | DeclAccessPair & | FoundResult,
|  | 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.

For example:

int f(double);
int f(int);
int (*pfd)(double) = f; // selects f(double)

This routine returns the resulting FunctionDecl if it could be resolved, and NULL otherwise. When `Complain` is true, this routine will emit diagnostics if there is an error.

Definition at line 11994 of file SemaOverload.cpp.

References clang::Expr::getType().

Referenced by DiagnoseBadFunctionCast(), IsStandardConversion(), PerformImplicitConversion(), ResolveOverloadedFunctionForReferenceBinding(), TryAddressSpaceCast(), TryListConversion(), TryReferenceInit(), and TryStaticMemberPointerUpcast().

## ◆ resolveAddressOfSingleOverloadCandidate()

FunctionDecl * Sema::resolveAddressOfSingleOverloadCandidate | ( | Expr * | E,
|  | DeclAccessPair & | Pair
| ) |  |

Given an expression that refers to an overloaded function, try to resolve that function to a single function that can have its address taken.

This will modify `Pair` iff it returns non-null.

This routine can only succeed if from all of the candidates in the overload set for SrcExpr that can have their addresses taken, there is one candidate that is more constrained than the rest.

Definition at line 12041 of file SemaOverload.cpp.

References checkAddressOfFunctionIsAvailable(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), and clang::FunctionDecl::getAssociatedConstraints().

Referenced by ResolveOverloadForDeduction().

## ◆ resolveAndFixAddressOfSingleOverloadCandidate()

bool Sema::resolveAndFixAddressOfSingleOverloadCandidate | ( | ExprResult & | SrcExpr,
|  | bool | DoFunctionPointerConverion = `false`
| ) |  |

Given an overloaded function, tries to turn it into a non-overloaded function reference using resolveAddressOfSingleOverloadCandidate.

This will perform access checks, diagnose the use of the resultant decl, and, if requested, potentially perform a function-to-pointer decay.

Returns false if resolveAddressOfSingleOverloadCandidate fails. Otherwise, returns true. This may emit diagnostics and return true.

Definition at line 12116 of file SemaOverload.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::Expr::getType().

Referenced by fixOverloadedReinterpretCastExpr().

## ◆ ResolveAndFixSingleFunctionTemplateSpecialization()

bool Sema::ResolveAndFixSingleFunctionTemplateSpecialization | ( | ExprResult & | SrcExpr,
|  | bool | DoFunctionPointerConverion = `false`,
|  | bool | Complain = `false`,
|  | SourceRange | OpRangeForComplaining = `SourceRange()`,
|  | QualType | DestTypeForComplaining = `QualType()`,
|  | unsigned | DiagIDForComplaining = `0`
| ) |  |

Definition at line 12234 of file SemaOverload.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::get().

Referenced by DiagnoseReinterpretUpDownCast(), fixOverloadedReinterpretCastExpr(), and TryAddressSpaceCast().

## ◆ resolveAssumedTemplateNameAsType()

bool Sema::resolveAssumedTemplateNameAsType | ( | Scope * | S,
|  | TemplateName & | Name,
|  | SourceLocation | NameLoc,
|  | bool | Diagnose = `true`
| ) |  |

Definition at line 3620 of file SemaTemplate.cpp.

## ◆ ResolveExceptionSpec()

const FunctionProtoType * clang::Sema::ResolveExceptionSpec | ( | SourceLocation | Loc,
|  | const FunctionProtoType * | FPT
| ) |  |

Definition at line 197 of file SemaExceptionSpec.cpp.

References clang::Type::castAs(), Diag(), clang::EST_Unevaluated, clang::EST_Unparsed, EvaluateImplicitExceptionSpec(), clang::FunctionProtoType::getExceptionSpecDecl(), clang::FunctionProtoType::getExceptionSpecType(), clang::ValueDecl::getType(), InstantiateExceptionSpec(), and clang::isUnresolvedExceptionSpec().

Referenced by clang::canCalleeThrow(), clang::CheckEquivalentExceptionSpecImpl(), checkEscapingByref(), CheckExceptionSpecSubset(), completeFunctionType(), and EvaluateUnaryTypeTrait().

## ◆ ResolveSingleFunctionTemplateSpecialization()

FunctionDecl * Sema::ResolveSingleFunctionTemplateSpecialization | ( | OverloadExpr * | ovl,
|  | bool | Complain = `false`,
|  | DeclAccessPair * | FoundResult = `nullptr`
| ) |  |

Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function.

This routine can only resolve template-ids that refer to a single function template, where that template-id refers to a single template whose template arguments are either provided by the template-id or have defaults, as described in C++0x [temp.arg.explicit]p3.

If no template-ids are found, no diagnostics are emitted and NULL is returned.

Definition at line 12151 of file SemaOverload.cpp.

References clang::OverloadExpr::copyTemplateArgumentsInto(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), DeduceTemplateArguments(), clang::OverloadExpr::getNameLoc(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::OverloadExpr::hasExplicitTemplateArgs(), and clang::MakeDeductionFailureInfo().

Referenced by ResolveOverloadForDeduction().

## ◆ RestoreNestedNameSpecifierAnnotation()

void Sema::RestoreNestedNameSpecifierAnnotation | ( | void * | Annotation,
|  | SourceRange | AnnotationRange,
|  | CXXScopeSpec & | SS
| ) |  |

Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.

Parameters

  Annotation | The annotation pointer, produced by `SaveNestedNameSpecifierAnnotation()`.
  AnnotationRange | The source range corresponding to the annotation.
  SS | The nested-name-specifier that will be updated with the contents of the annotation pointer.

Definition at line 1007 of file SemaCXXScopeSpec.cpp.

References clang::CXXScopeSpec::Adopt(), and clang::CXXScopeSpec::SetInvalid().

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ runWithSufficientStackSpace()

void Sema::runWithSufficientStackSpace | ( | SourceLocation | Loc,
|  | llvm::function_ref< void()> | Fn
| ) |  |

Run some code with "sufficient" stack space.

(Currently, at least 256K is guaranteed). Produces a warning if we're low on stack space and allocates more in that case. Use this in code that may recurse deeply (for example, in template instantiation) to avoid stack overflow.

Definition at line 423 of file Sema.cpp.

References clang::runWithSufficientStackSpace(), and warnStackExhausted().

Referenced by DoMarkVarDeclReferenced(), and PerformConstructorInitialization().

## ◆ SaveNestedNameSpecifierAnnotation()

void * Sema::SaveNestedNameSpecifierAnnotation | ( | CXXScopeSpec & | SS | ) |

Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to reconstruct the given nested-name-specifier.

Parameters

  SS | A nested-name-specifier.

Returns
  A pointer containing all of the information in the nested-name-specifier `SS`.

Definition at line 993 of file SemaCXXScopeSpec.cpp.

References clang::ASTContext::Allocate(), Context, clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::location_data(), clang::CXXScopeSpec::location_size(), and memcpy().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ ScalarTypeToBooleanCastKind()

CastKind Sema::ScalarTypeToBooleanCastKind | ( | QualType | ScalarTy | ) |
| static

ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ScalarTy to the Boolean type.

Definition at line 586 of file Sema.cpp.

References clang::Type::getScalarTypeKind(), clang::Type::STK_BlockPointer, clang::Type::STK_Bool, clang::Type::STK_CPointer, clang::Type::STK_FixedPoint, clang::Type::STK_Floating, clang::Type::STK_FloatingComplex, clang::Type::STK_Integral, clang::Type::STK_IntegralComplex, clang::Type::STK_MemberPointer, and clang::Type::STK_ObjCObjectPointer.

Referenced by PerformImplicitConversion().

## ◆ SelectorsForTypoCorrection()

const ObjCMethodDecl * Sema::SelectorsForTypoCorrection | ( | Selector | Sel,
|  | QualType | ObjectType = `QualType()`
| ) |  |

Definition at line 3677 of file SemaDeclObjC.cpp.

References clang::Type::getAsObjCInterfacePointerType(), clang::Selector::getAsString(), clang::ObjCMethodList::getNext(), clang::Selector::getNumArgs(), HelperIsMethodInObjCType(), HelperSelectorsForTypoCorrection(), clang::QualType::isNull(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedClassType(), clang::Type::isObjCQualifiedIdType(), and MethodPool.

## ◆ SemaBuiltinShuffleVector()

ExprResult Sema::SemaBuiltinShuffleVector | ( | CallExpr * | TheCall | ) |

SemaBuiltinShuffleVector - Handle __builtin_shufflevector.

Definition at line 5989 of file SemaChecking.cpp.

References clang::Type::castAs(), Diag(), clang::ExprError(), clang::CallExpr::getArg(), clang::Stmt::getBeginLoc(), clang::CallExpr::getBeginLoc(), clang::CallExpr::getDirectCallee(), clang::Stmt::getEndLoc(), clang::CallExpr::getEndLoc(), clang::CallExpr::getNumArgs(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::hasIntegerRepresentation(), clang::Expr::isTypeDependent(), and clang::Type::isVectorType().

Referenced by clang::TreeTransform< Derived >::RebuildShuffleVectorExpr().

## ◆ SemaConvertVectorExpr()

ExprResult Sema::SemaConvertVectorExpr | ( | Expr * | E,
|  | TypeSourceInfo * | TInfo,
|  | SourceLocation | BuiltinLoc,
|  | SourceLocation | RParenLoc
| ) |  |

SemaConvertVectorExpr - Handle __builtin_convertvector.

Definition at line 6075 of file SemaChecking.cpp.

References clang::Type::castAs(), Diag(), clang::ExprError(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::Type::isDependentType(), clang::Type::isVectorType(), clang::OK_Ordinary, and clang::VK_RValue.

Referenced by clang::TreeTransform< Derived >::RebuildConvertVectorExpr().

## ◆ SetCtorInitializers()

bool Sema::SetCtorInitializers | ( | CXXConstructorDecl * | Constructor,
|  | bool | AnyErrors,
|  | ArrayRef< CXXCtorInitializer *> | Initializers = `None`
| ) |  |

Definition at line 4970 of file SemaDeclCXX.cpp.

References clang::DeclContext::isDependentContext(), and clang::CXXConstructorDecl::setNumCtorInitializers().

## ◆ setCurrentOpenCLExtension()

void clang::Sema::setCurrentOpenCLExtension | ( | llvm::StringRef | Ext | ) |
| inline

Definition at line 9564 of file Sema.h.

## ◆ setCurrentOpenCLExtensionForDecl()

void Sema::setCurrentOpenCLExtensionForDecl | ( | Decl * | FD | ) |

Set current OpenCL extensions for a declaration which can only be used when these OpenCL extensions are enabled.

If current OpenCL extension is empty, do nothing.

Definition at line 2251 of file Sema.cpp.

References setOpenCLExtensionForDecl().

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ setCurrentOpenCLExtensionForType()

void Sema::setCurrentOpenCLExtensionForType | ( | QualType | T | ) |

Set current OpenCL extensions for a type which can only be used when these OpenCL extensions are enabled.

If current OpenCL extension is empty, do nothing.

Definition at line 2245 of file Sema.cpp.

References setOpenCLExtensionForType().

## ◆ SetDeclDefaulted()

void Sema::SetDeclDefaulted | ( | Decl * | dcl,
|  | SourceLocation | DefaultLoc
| ) |  |

Definition at line 16352 of file SemaDeclCXX.cpp.

References clang::Sema::DefaultedFunctionKind::asComparison(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::CPlusPlus2a, DefineImplicitSpecialMember(), Diag(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Sema::DefaultedFunctionKind::isComparison(), clang::Decl::isInvalidDecl(), and clang::Decl::setInvalidDecl().

Referenced by clang::Parser::ParseTopLevelDecl(), and clang::TemplateDeclInstantiator::SubstDefaultedFunction().

## ◆ SetDeclDeleted()

void Sema::SetDeclDeleted | ( | Decl * | dcl,
|  | SourceLocation | DelLoc
| ) |  |

Definition at line 16285 of file SemaDeclCXX.cpp.

References clang::CXXMethodDecl::begin_overridden_methods(), Diag(), clang::FunctionDecl::getCanonicalDecl(), clang::NamedDecl::getDeclName(), clang::getDLLAttr(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::FunctionDecl::isMain(), clang::CXXMethodDecl::overridden_methods(), clang::FunctionDecl::setDeletedAsWritten(), clang::FunctionDecl::setImplicitlyInline(), clang::Decl::setInvalidDecl(), clang::FunctionDecl::setWillHaveBody(), and clang::TSK_ExplicitSpecialization.

Referenced by clang::Parser::ParseTopLevelDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ SetDelegatingInitializer()

bool Sema::SetDelegatingInitializer | ( | CXXConstructorDecl * | Constructor,
|  | CXXCtorInitializer * | Initializer
| ) |  |

Definition at line 4949 of file SemaDeclCXX.cpp.

References clang::CXXCtorInitializer::isDelegatingInitializer(), and clang::CXXConstructorDecl::setNumCtorInitializers().

## ◆ setFunctionHasBranchIntoScope()

void Sema::setFunctionHasBranchIntoScope | ( |  | ) |

Definition at line 1824 of file Sema.cpp.

References FunctionScopes.

## ◆ setFunctionHasBranchProtectedScope()

void Sema::setFunctionHasBranchProtectedScope | ( |  | ) |

Definition at line 1829 of file Sema.cpp.

References FunctionScopes.

## ◆ setFunctionHasIndirectGoto()

void Sema::setFunctionHasIndirectGoto | ( |  | ) |

Definition at line 1834 of file Sema.cpp.

References FunctionScopes.

## ◆ SetIvarInitializers()

void Sema::SetIvarInitializers | ( | ObjCImplementationDecl * | ObjCImplementation | ) |

SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whose ivars need be initialized.

Definition at line 16937 of file SemaDeclCXX.cpp.

References clang::CPlusPlus, clang::InitializationKind::CreateDefault(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ObjCImplDecl::getClassInterface(), clang::Decl::getLocation(), clang::InitializedEntity::InitializeMember(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), and clang::None.

## ◆ SetLateTemplateParser()

void clang::Sema::SetLateTemplateParser | ( | LateTemplateParserCB * | LTP,
|  | LateTemplateParserCleanupCB * | LTPCleanup,
|  | void * | P
| ) |  |
| inline

Definition at line 726 of file Sema.h.

References P.

Referenced by clang::Parser::ParseTopLevelDecl().

## ◆ SetMemberAccessSpecifier()

bool Sema::SetMemberAccessSpecifier | ( | NamedDecl * | MemberDecl,
|  | NamedDecl * | PrevMemberDecl,
|  | AccessSpecifier | LexicalAS
| ) |  |

SetMemberAccessSpecifier - Set the access specifier of a member.

Returns true on error (when the previous member decl access specifier is different from the new member decl access specifier).

Definition at line 39 of file SemaAccess.cpp.

References clang::AS_none, Diag(), clang::Decl::getAccess(), clang::Decl::getLocation(), and clang::Decl::setAccess().

## ◆ setOpenCLExtensionForDecl()

void Sema::setOpenCLExtensionForDecl | ( | Decl * | FD,
|  | llvm::StringRef | Exts
| ) |  |

Set OpenCL extensions for a declaration which can only be used when these OpenCL extensions are enabled.

If `Exts` is empty, do nothing.

Parameters

  Exts | A space separated list of OpenCL extensions.

Definition at line 2236 of file Sema.cpp.

Referenced by AddOpenCLExtensions(), and setCurrentOpenCLExtensionForDecl().

## ◆ setOpenCLExtensionForType()

void Sema::setOpenCLExtensionForType | ( | QualType | T,
|  | llvm::StringRef | Exts
| ) |  |

Set OpenCL extensions for a type which can only be used when these OpenCL extensions are enabled.

If `Exts` is empty, do nothing.

Parameters

  Exts | A space separated list of OpenCL extensions.

Definition at line 2226 of file Sema.cpp.

References clang::QualType::getCanonicalType(), and clang::QualType::getTypePtr().

Referenced by Initialize(), and setCurrentOpenCLExtensionForType().

## ◆ setOpenMPCaptureKind()

void Sema::setOpenMPCaptureKind | ( | FieldDecl * | FD,
|  | const ValueDecl * | D,
|  | unsigned | Level
| ) |  |

Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.) for `FD` based on DSA for the provided corresponding captured declaration `D`.

Definition at line 2117 of file SemaOpenMP.cpp.

References DSAStack, getCanonicalDecl(), getVariableCategoryFromDecl(), clang::isOpenMPTargetExecutionDirective(), and clang::OMPC_unknown.

## ◆ SetParamDefaultArgument()

bool Sema::SetParamDefaultArgument | ( | ParmVarDecl * | Param,
|  | Expr * | DefaultArg,
|  | SourceLocation | EqualLoc
| ) |  |

Definition at line 250 of file SemaDeclCXX.cpp.

References clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::InitializedEntity::InitializeParameter(), and clang::Decl::setInvalidDecl().

Referenced by SubstParmVarDecl().

## ◆ setTagNameForLinkagePurposes()

void Sema::setTagNameForLinkagePurposes | ( | TagDecl * | TagFromDeclSpec,
|  | TypedefNameDecl * | NewTD
| ) |  |

Definition at line 4352 of file SemaDecl.cpp.

References clang::TagDecl::hasNameForLinkage(), clang::Decl::isInvalidDecl(), and clang::TagDecl::isThisDeclarationADefinition().

## ◆ ShouldDeleteSpecialMember()

bool Sema::ShouldDeleteSpecialMember | ( | CXXMethodDecl * | MD,
|  | CXXSpecialMember | CSM,
|  | InheritedConstructorInfo * | ICI = `nullptr`,
|  | bool | Diagnose = `false`
| ) |  |

Determine if a special member function should have a deleted definition when it is defaulted.

Determine whether a defaulted special member function should be defined as deleted, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p11, C++11 [class.copy]p23, and C++11 [class.dtor]p5.

Definition at line 8723 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::ctors(), Diag(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::CXXRecordDecl::hasUserDeclaredMoveAssignment(), clang::CXXRecordDecl::hasUserDeclaredMoveConstructor(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::TagDecl::isDependentType(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::isLambda(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::CXXMethodDecl::isVirtual(), clang::CXXRecordDecl::lambdaIsDefaultConstructibleAndAssignable(), clang::CXXRecordDecl::methods(), and clang::LangOptions::MSVC2015.

## ◆ ShouldEnterDeclaratorScope()

bool Sema::ShouldEnterDeclaratorScope | ( | Scope * | S,
|  | const CXXScopeSpec & | SS
| ) |  |

Definition at line 1020 of file SemaCXXScopeSpec.cpp.

Referenced by clang::Parser::ParseUnqualifiedId().

## ◆ shouldIgnoreInHostDeviceCheck()

bool Sema::shouldIgnoreInHostDeviceCheck | ( | FunctionDecl * | Callee | ) |

Definition at line 17881 of file SemaDecl.cpp.

Referenced by CheckCUDACall().

## ◆ shouldLinkDependentDeclWithPrevious()

bool Sema::shouldLinkDependentDeclWithPrevious | ( | Decl * | D,
|  | Decl * | PrevDecl
| ) |  |

Checks if the new declaration declared in dependent context must be put in the same redeclaration chain as the specified declaration.

Parameters

  D | Declaration that is checked.
  PrevDecl | Previous declaration found with proper lookup method for the same declaration name.

Returns
  True if D must be added to the redeclaration chain which PrevDecl belongs to.

Definition at line 9767 of file SemaDecl.cpp.

References clang::Decl::getDeclContext(), clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::isDependentContext(), and clang::DeclContext::isFileContext().

## ◆ shouldSkipAnonEnumBody()

Sema::SkipBodyInfo Sema::shouldSkipAnonEnumBody | ( | Scope * | S,
|  | IdentifierInfo * | II,
|  | SourceLocation | IILoc
| ) |  |

Determine whether the body of an anonymous enumeration should be skipped.

Parameters

  II | The name of the first enumerator.

Definition at line 17220 of file SemaDecl.cpp.

## ◆ ShouldWarnIfUnusedFileScopedDecl()

bool Sema::ShouldWarnIfUnusedFileScopedDecl | ( | const DeclaratorDecl * | D | ) | const

Definition at line 1643 of file SemaDecl.cpp.

References clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::Decl::hasAttr(), clang::DeclContext::isDependentContext(), IsDisallowedCopyOrAssign(), clang::Decl::isInvalidDecl(), isMainFileLoc(), clang::Decl::isUsed(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.

Referenced by ShouldRemoveFromUnused().

## ◆ SpecialMemberIsTrivial()

bool Sema::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.

Definition at line 9150 of file SemaDeclCXX.cpp.

References clang::Qualifiers::Const, Diag(), clang::Type::getAs(), clang::QualType::getCVRQualifiers(), clang::Decl::getLocation(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ReferenceType::getPointeeType(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), and clang::FunctionDecl::isUserProvided().

Referenced by checkTrivialSubobjectCall().

## ◆ startLambdaDefinition()

CXXMethodDecl * Sema::startLambdaDefinition | ( | CXXRecordDecl * | Class,
|  | SourceRange | IntroducerRange,
|  | TypeSourceInfo * | MethodType,
|  | SourceLocation | EndLoc,
|  | ArrayRef< ParmVarDecl *> | Params,
|  | ConstexprSpecKind | ConstexprKind,
|  | Expr * | TrailingRequiresClause
| ) |  |

Start the definition of a lambda expression.

Definition at line 359 of file SemaLambda.cpp.

References clang::Type::castAs(), getGenericLambdaTemplateParameterList(), clang::FunctionType::getReturnType(), clang::TypeSourceInfo::getType(), and clang::DeclContext::isDependentContext().

## ◆ StartOpenMPClause()

void Sema::StartOpenMPClause | ( | OpenMPClauseKind | K | ) |

Start analysis of clauses.

Definition at line 2223 of file SemaOpenMP.cpp.

References DSAStack.

## ◆ startOpenMPCXXRangeFor()

void Sema::startOpenMPCXXRangeFor | ( |  | ) |

If the current region is a range loop-based region, mark the start of the loop construct.

Definition at line 2074 of file SemaOpenMP.cpp.

References DSAStack, and clang::isOpenMPLoopDirective().

## ◆ StartOpenMPDSABlock()

void Sema::StartOpenMPDSABlock | ( | OpenMPDirectiveKind | K,
|  | const DeclarationNameInfo & | DirName,
|  | Scope * | CurScope,
|  | SourceLocation | Loc
| ) |  |

Called on start of new data sharing attribute block.

Definition at line 2215 of file SemaOpenMP.cpp.

References DSAStack.

Referenced by clang::TreeTransform< Derived >::TransformOMPExecutableDirective().

## ◆ startOpenMPLoop()

void Sema::startOpenMPLoop | ( |  | ) |

If the current region is a loop-based region, mark the start of the loop construct.

Definition at line 2068 of file SemaOpenMP.cpp.

References DSAStack, and clang::isOpenMPLoopDirective().

## ◆ stripARCUnbridgedCast()

Expr * Sema::stripARCUnbridgedCast | ( | Expr * | e | ) |

stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.

Definition at line 4394 of file SemaExprObjC.cpp.

References clang::Expr::hasPlaceholderType().

Referenced by clang::OverloadCandidateSet::clear().

## ◆ Subst()

bool Sema::Subst | ( | const TemplateArgumentLoc * | Args,
|  | unsigned | NumArgs,
|  | TemplateArgumentListInfo & | Result,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 3282 of file SemaTemplateInstantiate.cpp.

Referenced by clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

## ◆ SubstAutoType()

QualType Sema::SubstAutoType | ( | QualType | TypeWithAuto,
|  | QualType | Replacement
| ) |  |

Substitute Replacement for `auto` in `TypeWithAuto`.

Definition at line 4735 of file SemaTemplateDeduction.cpp.

References clang::Type::containsUnexpandedParameterPack(), and clang::Type::isDependentType().

## ◆ SubstAutoTypeSourceInfo()

TypeSourceInfo * Sema::SubstAutoTypeSourceInfo | ( | TypeSourceInfo * | TypeWithAuto,
|  | QualType | Replacement
| ) |  |

Substitute Replacement for auto in TypeWithAuto.

Definition at line 4746 of file SemaTemplateDeduction.cpp.

References clang::Type::containsUnexpandedParameterPack(), and clang::Type::isDependentType().

## ◆ SubstBaseSpecifiers()

bool Sema::SubstBaseSpecifiers | ( | CXXRecordDecl * | Instantiation,
|  | CXXRecordDecl * | Pattern,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Perform substitution on the base class specifiers of the given class template specialization.

Produces a diagnostic and returns true on error, returns false and attaches the instantiated base classes to the class template specialization if successful.

Definition at line 2241 of file SemaTemplateInstantiate.cpp.

References AttachBaseSpecifiers(), clang::CXXRecordDecl::bases(), clang::C, CheckBaseSpecifier(), CheckParameterPacksForExpansion(), collectUnexpandedParameterPacks(), Context, clang::sema::instantiateTemplateAttribute(), clang::Decl::setInvalidDecl(), and SubstType().

## ◆ SubstDecl()

Decl * Sema::SubstDecl | ( | Decl * | D,
|  | DeclContext * | Owner,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 3627 of file SemaTemplateInstantiateDecl.cpp.

References clang::Decl::getLocation(), clang::Decl::isInvalidDecl(), clang::runWithSufficientStackSpace(), and clang::declvisitor::Base< Ptr, ImplClass, RetTy >::Visit().

Referenced by ConvertDeducedTemplateArgument().

## ◆ SubstDeclarationNameInfo()

DeclarationNameInfo Sema::SubstDeclarationNameInfo | ( | const DeclarationNameInfo & | NameInfo,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Do template substitution on declaration name info.

Definition at line 3264 of file SemaTemplateInstantiate.cpp.

References clang::DeclarationNameInfo::getLoc(), and clang::DeclarationNameInfo::getName().

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ SubstDefaultTemplateArgumentIfAvailable()

TemplateArgumentLoc Sema::SubstDefaultTemplateArgumentIfAvailable | ( | TemplateDecl * | Template,
|  | SourceLocation | TemplateLoc,
|  | SourceLocation | RAngleLoc,
|  | Decl * | Param,
|  | SmallVectorImpl< TemplateArgument > & | Converted,
|  | bool & | HasDefaultArg
| ) |  |

If the given template parameter has a default template argument, substitute into that default template argument and return the corresponding template argument.

Definition at line 4974 of file SemaTemplate.cpp.

References clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::TypeSourceInfo::getType(), hasVisibleDefaultArgument(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::TemplateName::isNull(), and SubstDefaultTemplateArgument().

## ◆ SubstExceptionSpec() [1/2]

void Sema::SubstExceptionSpec | ( | FunctionDecl * | New,
|  | const FunctionProtoType * | Proto,
|  | const MultiLevelTemplateArgumentList & | Args
| ) |  |

Definition at line 2094 of file SemaTemplateInstantiate.cpp.

References clang::EST_None, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::TypeLoc::getEndLoc(), clang::FunctionProtoType::getExtProtoInfo(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::FunctionProtoType::ExceptionSpecInfo::Type, and UpdateExceptionSpec().

Referenced by clang::TemplateDeclInstantiator::InitFunctionInstantiation().

## ◆ SubstExceptionSpec() [2/2]

bool Sema::SubstExceptionSpec | ( | SourceLocation | Loc,
|  | FunctionProtoType::ExceptionSpecInfo & | ESI,
|  | SmallVectorImpl< QualType > & | ExceptionStorage,
|  | const MultiLevelTemplateArgumentList & | Args
| ) |  |

Definition at line 2082 of file SemaTemplateInstantiate.cpp.

References clang::EST_Uninstantiated, and clang::FunctionProtoType::ExceptionSpecInfo::Type.

## ◆ SubstExpr()

ExprResult Sema::SubstExpr | ( | Expr * | E,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 3219 of file SemaTemplateInstantiate.cpp.

Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), SubstDefaultTemplateArgument(), SubstParmVarDecl(), clang::TemplateDeclInstantiator::SubstTemplateParams(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ SubstExprs()

bool Sema::SubstExprs | ( | ArrayRef< Expr *> | Exprs,
|  | bool | IsCall,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | SmallVectorImpl< Expr *> & | Outputs
| ) |  |

Substitute the given template arguments into a list of expressions, expanding pack expansions if required.

Parameters

  Exprs | The list of expressions to substitute into.
  IsCall | Whether this is some form of call, in which case default arguments will be dropped.
  TemplateArgs | The set of template arguments to substitute.
  Outputs | Will receive all of the substituted arguments.

Returns
  true if an error occurred, false otherwise.

Definition at line 3238 of file SemaTemplateInstantiate.cpp.

## ◆ SubstFunctionDeclType()

TypeSourceInfo * Sema::SubstFunctionDeclType | ( | TypeSourceInfo * | T,
|  | const MultiLevelTemplateArgumentList & | Args,
|  | SourceLocation | Loc,
|  | DeclarationName | Entity,
|  | CXXRecordDecl * | ThisContext,
|  | Qualifiers | ThisTypeQuals
| ) |  |

A form of SubstType intended specifically for instantiating the type of a FunctionDecl.

Its purpose is solely to force the instantiation of default-argument expressions and to avoid instantiating an exception-specification.

Definition at line 2040 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts, Context, clang::TypeLoc::getAs(), clang::TypeLoc::getFullDataSize(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TypeLoc::IgnoreParens(), clang::QualType::isNull(), NeedsInstantiationAsFunctionType(), clang::TypeLocBuilder::reserve(), and clang::Result.

Referenced by clang::TemplateDeclInstantiator::SubstFunctionType().

## ◆ SubstInitializer()

ExprResult Sema::SubstInitializer | ( | Expr * | E,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | bool | CXXDirectInit
| ) |  |

Definition at line 3229 of file SemaTemplateInstantiate.cpp.

Referenced by InstantiateInClassInitializer().

## ◆ SubstituteExplicitTemplateArguments()

Sema::TemplateDeductionResult Sema::SubstituteExplicitTemplateArguments | ( | FunctionTemplateDecl * | FunctionTemplate,
|  | TemplateArgumentListInfo & | ExplicitTemplateArgs,
|  | SmallVectorImpl< DeducedTemplateArgument > & | Deduced,
|  | SmallVectorImpl< QualType > & | ParamTypes,
|  | QualType * | FunctionType,
|  | sema::TemplateDeductionInfo & | Info
| ) |  |

Substitute the explicitly-provided template arguments into the given function template according to C++ [temp.arg.explicit].

Parameters

  FunctionTemplate | the function template into which the explicit template arguments will be substituted.
  ExplicitTemplateArgs | the explicitly-specified template arguments.
  Deduced | the deduced template arguments, which will be populated with the converted and checked explicit template arguments.
  ParamTypes | will be populated with the instantiated function parameters.
  FunctionType | if non-NULL, the result type of the function template will also be instantiated and the pointed-to value will be updated with the instantiated function type.
  Info | if substitution fails for any reason, this object will be populated with more information about the failure.

Returns
  TDK_Success if substitution was successful, or some failure condition.

Definition at line 3027 of file SemaTemplateDeduction.cpp.

References clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), P, clang::FunctionDecl::parameters(), clang::TemplateArgumentListInfo::size(), and Unevaluated.

## ◆ SubstNestedNameSpecifierLoc()

NestedNameSpecifierLoc Sema::SubstNestedNameSpecifierLoc | ( | NestedNameSpecifierLoc | NNS,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 3252 of file SemaTemplateInstantiate.cpp.

References clang::NestedNameSpecifierLoc::getBeginLoc().

Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), SubstDefaultTemplateArgument(), SubstQualifier(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ SubstParmTypes()

bool Sema::SubstParmTypes | ( | SourceLocation | Loc,
|  | ArrayRef< ParmVarDecl *> | Params,
|  | const FunctionProtoType::ExtParameterInfo * | ExtParamInfos,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | SmallVectorImpl< QualType > & | ParamTypes,
|  | SmallVectorImpl< ParmVarDecl *> * | OutParams,
|  | ExtParameterInfoBuilder & | ParamInfos
| ) |  |

Substitute the given template arguments into the given set of parameters, producing the set of parameter types that would be generated from such a substitution.

Definition at line 2217 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts.

Referenced by clang::TemplateDeclInstantiator::SubstFunctionType().

## ◆ SubstParmVarDecl()

ParmVarDecl * Sema::SubstParmVarDecl | ( | ParmVarDecl * | D,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | int | indexAdjustment,
|  | Optional< unsigned > | NumExpansions,
|  | bool | ExpectParameterPack
| ) |  |

Definition at line 2108 of file SemaTemplateInstantiate.cpp.

References CheckPackExpansion(), CheckParameter(), clang::Type::containsUnexpandedParameterPack(), Context, CurContext, CurrentInstantiationScope, Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::TypeLoc::getAs(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::getDefaultArg(), clang::ParmVarDecl::getFunctionScopeDepth(), clang::ParmVarDecl::getFunctionScopeIndex(), clang::NamedDecl::getIdentifier(), clang::DeclaratorDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::VarDecl::getStorageClass(), clang::ASTContext::getTranslationUnitDecl(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::ParmVarDecl::hasInheritedDefaultArg(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUnparsedDefaultArg(), InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::LocalInstantiationScope::InstantiatedLocalPackArg(), clang::Decl::isLexicallyWithinFunctionOrMethod(), clang::VarDecl::isParameterPack(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Type::isVoidType(), clang::Decl::setDeclContext(), clang::ParmVarDecl::setHasInheritedDefaultArg(), SetParamDefaultArgument(), clang::ParmVarDecl::setScopeInfo(), clang::ParmVarDecl::setUninstantiatedDefaultArg(), clang::ParmVarDecl::setUnparsedDefaultArg(), SubstExpr(), SubstType(), and UnparsedDefaultArgInstantiations.

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

## ◆ SubstSpaceshipAsEqualEqual()

FunctionDecl * Sema::SubstSpaceshipAsEqualEqual | ( | CXXRecordDecl * | RD,
|  | FunctionDecl * | Spaceship
| ) |  |

Substitute the name and return type of a defaulted 'operator<=>' to form an implicit 'operator=='.

Definition at line 3672 of file SemaTemplateInstantiateDecl.cpp.

References clang::FriendDecl::Create(), clang::Decl::getFriendObjectKind(), clang::Decl::isInvalidDecl(), clang::TemplateDeclInstantiator::RewriteSpaceshipAsEqualEqual, clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ SubstStmt()

StmtResult Sema::SubstStmt | ( | Stmt * | S,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 3197 of file SemaTemplateInstantiate.cpp.

## ◆ SubstTemplateArguments()

bool Sema::SubstTemplateArguments | ( | ArrayRef< TemplateArgumentLoc > | Args,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | TemplateArgumentListInfo & | Outputs
| ) |  |

Definition at line 3207 of file SemaTemplateInstantiate.cpp.

## ◆ SubstTemplateName()

TemplateName Sema::SubstTemplateName | ( | NestedNameSpecifierLoc | QualifierLoc,
|  | TemplateName | Name,
|  | SourceLocation | Loc,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 3272 of file SemaTemplateInstantiate.cpp.

References clang::CXXScopeSpec::Adopt().

Referenced by SubstDefaultTemplateArgument().

## ◆ SubstTemplateParams()

TemplateParameterList * Sema::SubstTemplateParams | ( | TemplateParameterList * | Params,
|  | DeclContext * | Owner,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs
| ) |  |

Definition at line 3753 of file SemaTemplateInstantiateDecl.cpp.

References clang::TemplateDeclInstantiator::SubstTemplateParams().

## ◆ SubstType() [1/3]

TypeSourceInfo * Sema::SubstType | ( | TypeSourceInfo * | T,
|  | const MultiLevelTemplateArgumentList & | Args,
|  | SourceLocation | Loc,
|  | DeclarationName | Entity,
|  | bool | AllowDeducedTST = `false`
| ) |  |

Perform substitution on the type T with a given set of template arguments.

This routine substitutes the given template arguments into the type T and produces the instantiated type.

Parameters

  T | the type into which the template arguments will be substituted. If this type is not dependent, it will be returned immediately.
  Args | the template arguments that will be substituted for the top-level template parameters within T.
  Loc | the location in the source code where this substitution is being performed. It will typically be the location of the declarator (if we're instantiating the type of some declaration) or the location of the type in the source code (if, e.g., we're instantiating the type of a cast expression).
  Entity | the name of the entity associated with a declaration being instantiated (if any). May be empty to indicate that there is no such entity (if, e.g., this is a type that occurs as part of a cast expression) or that the entity has no name (e.g., an unnamed function parameter).
  AllowDeducedTST | Whether a DeducedTemplateSpecializationType is acceptable as the top level type of the result.

Returns
  If the instantiation succeeds, the instantiated type. Otherwise, produces diagnostics and returns a NULL type.

Definition at line 1949 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts, clang::TypeSourceInfo::getType(), clang::Type::isInstantiationDependentType(), and clang::Type::isVariablyModifiedType().

Referenced by ConvertDeducedTemplateArgument(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), SubstBaseSpecifiers(), SubstDefaultTemplateArgument(), SubstParmVarDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

## ◆ SubstType() [2/3]

QualType Sema::SubstType | ( | QualType | T,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | SourceLocation | Loc,
|  | DeclarationName | Entity
| ) |  |

Deprecated form of the above.

Definition at line 1998 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts, clang::Type::isInstantiationDependentType(), and clang::Type::isVariablyModifiedType().

## ◆ SubstType() [3/3]

TypeSourceInfo * Sema::SubstType | ( | TypeLoc | TL,
|  | const MultiLevelTemplateArgumentList & | TemplateArgs,
|  | SourceLocation | Loc,
|  | DeclarationName | Entity
| ) |  |

Definition at line 1967 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts, Context, clang::TypeLoc::getFullDataSize(), clang::TypeLoc::getType(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::Type::isInstantiationDependentType(), clang::QualType::isNull(), clang::Type::isVariablyModifiedType(), clang::TypeLocBuilder::pushFullCopy(), clang::TypeLocBuilder::reserve(), and clang::Result.

## ◆ targetDiag()

Sema::DeviceDiagBuilder Sema::targetDiag | ( | SourceLocation | Loc,
|  | unsigned | DiagID
| ) |  |

Definition at line 1609 of file Sema.cpp.

References clang::CUDA, CUDADiagIfDeviceCode(), CUDADiagIfHostCode(), clang::Sema::DeviceDiagBuilder::DeviceDiagBuilder(), diagIfOpenMPDeviceCode(), diagIfOpenMPHostCode(), getCurFunctionDecl(), getLangOpts(), clang::Sema::DeviceDiagBuilder::K_Immediate, and LangOpts.

## ◆ TemplateParameterListsAreEqual()

bool Sema::TemplateParameterListsAreEqual | ( | TemplateParameterList * | New,
|  | TemplateParameterList * | Old,
|  | bool | Complain,
|  | TemplateParameterListEqualKind | Kind,
|  | SourceLocation | TemplateArgLoc = `SourceLocation()`
| ) |  |

Determine whether the given template parameter lists are equivalent.

Parameters

  New | The new template parameter list, typically written in the source code as part of a new template declaration.
  Old | The old template parameter list, typically found via name lookup of the template declared with this template parameter list.
  Complain | If true, this routine will produce a diagnostic if the template parameter lists are not equivalent.
  Kind | describes how we are to match the template parameter lists.
  TemplateArgLoc | If this source location is valid, then we are actually checking the template parameter list of a template argument (New) against the template parameter list of its corresponding template template parameter (Old). We produce slightly different diagnostics in this scenario.

Returns
  True if the template parameter lists are equal, false otherwise.

Definition at line 7539 of file SemaTemplate.cpp.

References clang::TemplateParameterList::begin(), Diag(), DiagnoseTemplateParameterListArityMismatch(), clang::TemplateParameterList::end(), clang::Stmt::getBeginLoc(), clang::TemplateParameterList::getRequiresClause(), clang::TemplateParameterList::getTemplateLoc(), MatchTemplateParameterKind(), clang::Stmt::Profile(), and clang::TemplateParameterList::size().

Referenced by clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), and MatchTemplateParameterKind().

## ◆ TemporaryMaterializationConversion()

ExprResult Sema::TemporaryMaterializationConversion | ( | Expr * | E | ) |

If `E` is a prvalue denoting an unmaterialized temporary, materialize it as an xvalue.

In C++98, the result will still be a prvalue, because we don't have xvalues there.

Definition at line 7713 of file SemaInit.cpp.

References clang::ExprError(), clang::Expr::getExprLoc(), clang::Expr::getType(), and clang::Expr::isRValue().

Referenced by CheckPointerToMemberOperands().

## ◆ TooManyArguments()

static bool clang::Sema::TooManyArguments | ( | size_t | NumParams,
|  | size_t | NumArgs,
|  | bool | PartialOverloading = `false`
| ) |  |
| inline static

To be used for checking whether the arguments being passed to function exceeds the number of parameters expected for it.

Definition at line 11929 of file Sema.h.

Referenced by checkDirectCallValidity().

## ◆ TransformToPotentiallyEvaluated()

ExprResult Sema::TransformToPotentiallyEvaluated | ( | Expr * | E | ) |

Definition at line 15187 of file SemaExpr.cpp.

## ◆ translateTemplateArguments()

void Sema::translateTemplateArguments | ( | const ASTTemplateArgsPtr & | TemplateArgsIn,
|  | TemplateArgumentListInfo & | TemplateArgs
| ) |  |

Translates template arguments as provided by the parser into template arguments used by semantic analysis.

Definition at line 903 of file SemaTemplate.cpp.

References clang::TemplateArgumentListInfo::addArgument(), clang::Last, and translateTemplateArgument().

Referenced by InventTemplateParameter().

## ◆ tryCaptureObjCSelf()

ObjCMethodDecl * Sema::tryCaptureObjCSelf | ( | SourceLocation | Loc | ) |

Try to capture an implicit reference to 'self'.

Definition at line 1298 of file SemaExprObjC.cpp.

References clang::ObjCMethodDecl::getSelfDecl().

## ◆ tryCaptureOpenMPLambdas()

void Sema::tryCaptureOpenMPLambdas | ( | ValueDecl * | V | ) |

Function tries to capture lambda's captured variables in the OpenMP region before the original lambda is captured.

Definition at line 3804 of file SemaOpenMP.cpp.

References DSAStack, clang::DeclContext::Encloses(), clang::Type::getAsCXXRecordDecl(), clang::QualType::getCanonicalType(), clang::Decl::getDeclContext(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::QualType::isNull(), clang::isOpenMPTargetDataManagementDirective(), clang::isOpenMPTargetExecutionDirective(), clang::LCK_ByRef, and clang::LCK_This.

Referenced by MarkVarDeclODRUsed().

## ◆ tryCaptureVariable() [1/2]

bool Sema::tryCaptureVariable | ( | VarDecl * | Var,
|  | SourceLocation | Loc,
|  | TryCaptureKind | Kind,
|  | SourceLocation | EllipsisLoc,
|  | bool | BuildAndDiagnose,
|  | QualType & | CaptureType,
|  | QualType & | DeclRefType,
|  | const unsigned *const | FunctionScopeIndexToStopAt
| ) |  |

Try to capture the given variable.

Parameters

  Var | The variable to capture.
  Loc | The location at which the capture occurs.
  Kind | The kind of capture, which may be implicit (for either a block or a lambda), or explicit by-value or by-reference (for a lambda).
  EllipsisLoc | The location of the ellipsis, if one is provided in an explicit lambda capture.
  BuildAndDiagnose | Whether we are actually supposed to add the captures or diagnose errors. If false, this routine merely check whether the capture can occur without performing the capture itself or complaining if the variable cannot be captured.
  CaptureType | Will be set to the type of the field used to capture this variable in the innermost block or lambda. Only valid when the variable can be captured.
  DeclRefType | Will be set to the type of a reference to the capture from within the current scope. Only valid when the variable can be captured.
  FunctionScopeIndexToStopAt | If non-null, it points to the index of the FunctionScopeInfo stack beyond which we do not attempt to capture. This is useful when enclosing lambdas must speculatively capture variables that may or may not be used in certain specializations of a nested generic lambda.

Returns
  true if an error occurred (i.e., the variable cannot be captured) and false if the capture succeeded.

Definition at line 16153 of file SemaExpr.cpp.

References captureVariablyModifiedType(), Diag(), diagnoseUncapturableValueReference(), clang::TypeDecl::getBeginLoc(), clang::VarDecl::getCanonicalDecl(), clang::sema::CapturingScopeInfo::getCapture(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::getLambdaAwareParentOfDeclContext(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::DeclContext::getParent(), getParentOfCapturingContextOrNull(), clang::ValueDecl::getType(), clang::VarDecl::hasLocalStorage(), clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::isGenericLambdaCallOperatorSpecialization(), clang::VarDecl::isInitCapture(), isVariableAlreadyCapturedInScopeInfo(), clang::Type::isVariablyModifiedType(), clang::sema::LambdaScopeInfo::Lambda, and clang::sema::Capture::markUsed().

Referenced by MarkVarDeclODRUsed().

## ◆ tryCaptureVariable() [2/2]

bool Sema::tryCaptureVariable | ( | VarDecl * | Var,
|  | SourceLocation | Loc,
|  | TryCaptureKind | Kind = `TryCapture_Implicit`,
|  | SourceLocation | EllipsisLoc = `SourceLocation()`
| ) |  |

Try to capture the given variable.

Definition at line 16377 of file SemaExpr.cpp.

## ◆ tryExprAsCall()

bool Sema::tryExprAsCall | ( | Expr & | E,
|  | QualType & | ZeroArgCallReturnTy,
|  | UnresolvedSetImpl & | OverloadSet
| ) |  |

Figure out if an expression could be turned into a call.

Use this when trying to recover from an error where the programmer may have written just the name of a function instead of actually calling it.

Parameters

  E | - The expression to examine.
  ZeroArgCallReturnTy | - If the expression can be turned into a call with no arguments, this parameter is set to the type returned by such a call; otherwise, it is set to an empty QualType.
  OverloadSet | - If the expression is an overloaded function name, this parameter is populated with the decls of the various overloads.

Definition at line 1970 of file Sema.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::ASTContext::BoundMemberTy, BuildCallToMemberFunction(), clang::UnresolvedSetImpl::clear(), Context, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::Expr::getType(), clang::OverloadExpr::FindResult::HasFormOfMemberPointer, clang::Expr::IgnoreParens(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::ASTContext::OverloadTy.

Referenced by tryToRecoverWithCall().

## ◆ TryImplicitConversion()

ImplicitConversionSequence Sema::TryImplicitConversion | ( | Expr * | From,
|  | QualType | ToType,
|  | bool | SuppressUserConversions,
|  | bool | AllowExplicit,
|  | bool | InOverloadResolution,
|  | bool | CStyle,
|  | bool | AllowObjCWritebackConversion
| ) |  |

Definition at line 1476 of file SemaOverload.cpp.

References TryImplicitConversion().

Referenced by TryReferenceInitializationCore().

## ◆ tryResolveExplicitSpecifier()

bool Sema::tryResolveExplicitSpecifier | ( | ExplicitSpecifier & | ExplicitSpec | ) |

tryResolveExplicitSpecifier - Attempt to resolve the explict specifier.

Returns true if the explicit specifier is now resolved.

Definition at line 12431 of file SemaDeclCXX.cpp.

References CheckConvertedConstantExpression(), clang::ExplicitSpecifier::getExpr(), and clang::Result.

## ◆ tryToRecoverWithCall()

bool Sema::tryToRecoverWithCall | ( | ExprResult & | E,
|  | const PartialDiagnostic & | PD,
|  | bool | ForceComplain = `false`,
|  | bool(*)(QualType) | IsPlausibleResult = `nullptr`
| ) |  |

Try to recover by turning the given expression into a call.

Returns true if recovery was attempted or an error was emitted; this may also leave the ExprResult invalid.

Definition at line 2150 of file Sema.cpp.

References BuildCallExpr(), clang::FixItHint::CreateInsertion(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceRange::getEnd(), getLocForEndOfToken(), clang::SourceLocation::getLocWithOffset(), IsCallableWithAppend(), IsCPUDispatchCPUSpecificMultiVersion(), clang::QualType::isNull(), notePlausibleOverloads(), and tryExprAsCall().

Referenced by LookupMemberExpr().

## ◆ UnifySection() [1/2]

bool Sema::UnifySection | ( | StringRef | SectionName,
|  | int | SectionFlags,
|  | DeclaratorDecl * | TheDecl
| ) |  |

Definition at line 464 of file SemaAttr.cpp.

References Context, Diag(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::ASTContext::PSF_Implicit, and clang::ASTContext::SectionInfos.

Referenced by ActOnPragmaMSSection().

## ◆ UnifySection() [2/2]

bool Sema::UnifySection | ( | StringRef | SectionName,
|  | int | SectionFlags,
|  | SourceLocation | PragmaSectionLocation
| ) |  |

Definition at line 491 of file SemaAttr.cpp.

References Context, Diag(), clang::ASTContext::PSF_Implicit, and clang::ASTContext::SectionInfos.

## ◆ UnmarkAsLateParsedTemplate()

void Sema::UnmarkAsLateParsedTemplate | ( | FunctionDecl * | FD | ) |

Definition at line 10648 of file SemaTemplate.cpp.

References clang::FunctionDecl::setLateTemplateParsed().

## ◆ UpdateExceptionSpec()

void clang::Sema::UpdateExceptionSpec | ( | FunctionDecl * | FD,
|  | const FunctionProtoType::ExceptionSpecInfo & | ESI
| ) |  |

Definition at line 230 of file SemaExceptionSpec.cpp.

References clang::ASTContext::adjustExceptionSpec(), Context, getASTMutationListener(), clang::isUnresolvedExceptionSpec(), clang::Redeclarable< decl_type >::redecls(), and clang::FunctionProtoType::ExceptionSpecInfo::Type.

Referenced by SubstExceptionSpec().

## ◆ updateOutOfDateSelector()

void Sema::updateOutOfDateSelector | ( | Selector | Sel | ) |

Definition at line 3400 of file SemaDeclObjC.cpp.

References addMethodToGlobalList(), clang::Decl::getDeclContext(), clang::ObjCMethodDecl::getSelector(), MethodPool, ReadMethodPool(), and clang::ObjCMethodDecl::setDefined().

Referenced by AddLazyVectorDecls().

## ◆ UseArgumentDependentLookup()

bool Sema::UseArgumentDependentLookup | ( | const CXXScopeSpec & | SS,
|  | const LookupResult & | R,
|  | bool | HasTrailingLParen
| ) |  |

Definition at line 2947 of file SemaExpr.cpp.

References clang::FunctionDecl::getBuiltinID(), clang::Decl::isImplicit(), and clang::CXXScopeSpec::isSet().

## ◆ usesPartialOrExplicitSpecialization()

bool Sema::usesPartialOrExplicitSpecialization | ( | SourceLocation | Loc,
|  | ClassTemplateSpecializationDecl * | ClassTemplateSpec
| ) |  |

Definition at line 2768 of file SemaTemplateInstantiate.cpp.

References clang::CXXRecordDecl::getTemplateSpecializationKind(), and clang::TSK_ExplicitSpecialization.

## ◆ UsualArithmeticConversions()

QualType Sema::UsualArithmeticConversions | ( | ExprResult & | LHS,
|  | ExprResult & | RHS,
|  | SourceLocation | Loc,
|  | ArithConvKind | ACK
| ) |  |

UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6.3.1.8).

If both operands aren't arithmetic, this routine returns the first non-arithmetic type found. The client is responsible for emitting appropriate error diagnostics.

Definition at line 1432 of file SemaExpr.cpp.

References checkEnumArithmeticConversions(), clang::ActionResult< PtrTy, CompressInvalid >::get(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

Referenced by checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), CheckGNUVectorConditionalTypes(), and CXXCheckConditionalOperands().

## ◆ UsualUnaryConversions()

ExprResult Sema::UsualUnaryConversions | ( | Expr * | E | ) |

UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6.3).

The conversions of array and function types are sometimes suppressed. For example, the array->pointer conversion doesn't apply if the array is an argument to the sizeof or address (&) operators. In these instances, this routine should not be called.

Definition at line 727 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::Type::isHalfType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::QualType::isNull().

Referenced by CheckIndirectionOperand(), and checkVectorShift().

## ◆ VerifyBitField()

ExprResult Sema::VerifyBitField | ( | SourceLocation | FieldLoc,
|  | IdentifierInfo * | FieldName,
|  | QualType | FieldTy,
|  | bool | IsMsStruct,
|  | Expr * | BitWidth,
|  | bool * | ZeroWidth = `nullptr`
| ) |  |

VerifyBitField - verifies that a bit field expression is an ICE and has the correct width, and that the field type is valid.

Returns false on success. Can optionally return whether the bit-field is of width 0

Definition at line 15918 of file SemaDecl.cpp.

References Diag(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Stmt::getSourceRange(), clang::Type::isDependentType(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().

## ◆ VerifyIntegerConstantExpression() [1/3]

ExprResult Sema::VerifyIntegerConstantExpression | ( | Expr * | E,
|  | llvm::APSInt * | Result,
|  | VerifyICEDiagnoser & | Diagnoser,
|  | bool | AllowFold = `true`
| ) |  |

VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate diagnostics.

Returns false on success. Can optionally return the value of the expression.

Definition at line 15009 of file SemaExpr.cpp.

References clang::CPlusPlus11, and clang::Stmt::getBeginLoc().

Referenced by ActOnCXXNew(), ActOnNoexceptSpec(), EvaluateArrayTypeTrait(), and isTupleLike().

## ◆ VerifyIntegerConstantExpression() [2/3]

ExprResult Sema::VerifyIntegerConstantExpression | ( | Expr * | E,
|  | llvm::APSInt * | Result,
|  | unsigned | DiagID,
|  | bool | AllowFold = `true`
| ) |  |

Definition at line 14984 of file SemaExpr.cpp.

## ◆ VerifyIntegerConstantExpression() [3/3]

ExprResult Sema::VerifyIntegerConstantExpression | ( | Expr * | E,
|  | llvm::APSInt * | Result = `nullptr`
| ) |  |

Definition at line 14972 of file SemaExpr.cpp.

## ◆ WarnConflictingTypedMethods()

void Sema::WarnConflictingTypedMethods | ( | ObjCMethodDecl * | Method,
|  | ObjCMethodDecl * | MethodDecl,
|  | bool | IsProtocolMethodDecl
| ) |  |

Definition at line 2547 of file SemaDeclObjC.cpp.

References checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), Diag(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().

Referenced by MatchAllMethodDeclarations().

## ◆ WarnExactTypedMethods()

void Sema::WarnExactTypedMethods | ( | ObjCMethodDecl * | ImpMethodDecl,
|  | ObjCMethodDecl * | MethodDecl,
|  | bool | IsProtocolMethodDecl
| ) |  |

WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches exactly that of its declaration.

Definition at line 2598 of file SemaDeclObjC.cpp.

References CheckMethodOverrideParam(), CheckMethodOverrideReturn(), Context, Diag(), clang::NamedDecl::getDeclName(), clang::ObjCMethodDecl::getImplementationControl(), clang::Decl::getLocation(), clang::GetNullarySelector(), clang::ObjCMethodDecl::getSelector(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isVariadic(), clang::ast_matchers::match(), clang::ObjCMethodDecl::Optional, clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().

Referenced by MatchAllMethodDeclarations().

## ◆ WarnOnPendingNoDerefs()

void Sema::WarnOnPendingNoDerefs | ( | ExpressionEvaluationContextRecord & | Rec | ) |

Emit a warning for all pending noderef expressions that we recorded.

Definition at line 15245 of file SemaExpr.cpp.

References Diag(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::Stmt::getSourceRange(), and clang::Sema::ExpressionEvaluationContextRecord::PossibleDerefs.

## ◆ warnStackExhausted()

void Sema::warnStackExhausted | ( | SourceLocation | Loc | ) |

Warn that the stack is nearly exhausted.

Definition at line 415 of file Sema.cpp.

References Diag(), and WarnedStackExhausted.

Referenced by pushCodeSynthesisContext(), and runWithSufficientStackSpace().

## ◆ WeakTopLevelDecls()

SmallVectorImpl<Decl *>& clang::Sema::WeakTopLevelDecls | ( |  | ) |
| inline

WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.

Definition at line 1532 of file Sema.h.

## Friends And Related Function Documentation

## ◆ ArgumentPackSubstitutionRAII

friend class ArgumentPackSubstitutionRAII
| friend

Definition at line 8221 of file Sema.h.

## ◆ ASTDeclReader

friend class ASTDeclReader
| friend

Definition at line 11883 of file Sema.h.

## ◆ ASTReader

friend class ASTReader
| friend

Definition at line 11882 of file Sema.h.

## ◆ ASTWriter

friend class ASTWriter
| friend

Definition at line 11884 of file Sema.h.

## ◆ InitializationSequence

friend class InitializationSequence
| friend

Definition at line 11881 of file Sema.h.

## ◆ Parser

friend class Parser
| friend

Definition at line 11880 of file Sema.h.

## Member Data Documentation

## ◆ AccessCheckingSFINAE

bool clang::Sema::AccessCheckingSFINAE

When true, access checking violations are treated as SFINAE failures rather than hard errors.

Definition at line 6791 of file Sema.h.

Referenced by EmitCurrentDiagnostic(), clang::Sema::SFINAETrap::SFINAETrap(), and clang::Sema::SFINAETrap::~SFINAETrap().

## ◆ AllowAbstractFieldReference

bool clang::Sema::AllowAbstractFieldReference

A flag to indicate that we're in a context that permits abstract references to fields.

This is really a

Definition at line 991 of file Sema.h.

## ◆ AnalysisWarnings

sema::AnalysisBasedWarnings clang::Sema::AnalysisWarnings

Worker object for performing CFG-based warnings.

Definition at line 8526 of file Sema.h.

Referenced by PopFunctionScopeInfo(), and PrintStats().

## ◆ ArgumentPackSubstitutionIndex

int clang::Sema::ArgumentPackSubstitutionIndex

The current index into pack expansion arguments that will be used for substitution of parameter packs.

The pack expansion index will be -1 to indicate that parameter packs should be instantiated as themselves. Otherwise, the index specifies which argument within the parameter pack will be used for substitution.

Definition at line 8200 of file Sema.h.

Referenced by clang::TreeTransform< Derived >::AlwaysRebuild(), clang::Sema::ArgumentPackSubstitutionIndexRAII::ArgumentPackSubstitutionIndexRAII(), and clang::Sema::ArgumentPackSubstitutionIndexRAII::~ArgumentPackSubstitutionIndexRAII().

## ◆ ArrayWithObjectsMethod

ObjCMethodDecl* clang::Sema::ArrayWithObjectsMethod

The declaration of the arrayWithObjects:count: method.

Definition at line 971 of file Sema.h.

## ◆ BSSSegStack

PragmaStack<StringLiteral *> clang::Sema::BSSSegStack

Definition at line 540 of file Sema.h.

Referenced by clang::Sema::PragmaStackSentinelRAII::~PragmaStackSentinelRAII().

## ◆ BumpAlloc

llvm::BumpPtrAllocator clang::Sema::BumpAlloc

Definition at line 1180 of file Sema.h.

Referenced by PrintStats().

## ◆ CachedFunctionScope

std::unique_ptr<sema::FunctionScopeInfo> clang::Sema::CachedFunctionScope

Definition at line 617 of file Sema.h.

Referenced by PushFunctionScope().

## ◆ CFError

RecordDecl* clang::Sema::CFError = nullptr

The struct behind the CFErrorRef pointer.

Definition at line 11891 of file Sema.h.

Referenced by classifyPointerDeclarator().

## ◆ Cleanup

CleanupInfo clang::Sema::Cleanup

Used to control the generation of ExprWithCleanups.

Definition at line 602 of file Sema.h.

Referenced by checkIndirectCopyRestoreSource(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), and clang::InitializationSequence::Perform().

## ◆ CodeCompleter

CodeCompleteConsumer* clang::Sema::CodeCompleter

Code-completion consumer.

Definition at line 394 of file Sema.h.

Referenced by AddRecordMembersCompletionResults(), and ProduceSignatureHelp().

## ◆ CodeSegStack

PragmaStack<StringLiteral *> clang::Sema::CodeSegStack

Definition at line 542 of file Sema.h.

Referenced by clang::Sema::PragmaStackSentinelRAII::~PragmaStackSentinelRAII().

## ◆ CodeSynthesisContextLookupModules

SmallVector<Module*, 16> clang::Sema::CodeSynthesisContextLookupModules

Extra modules inspected when performing a lookup during a template instantiation.

Computed lazily.

Definition at line 8146 of file Sema.h.

Referenced by popCodeSynthesisContext().

## ◆ CodeSynthesisContexts

SmallVector<CodeSynthesisContext, 16> clang::Sema::CodeSynthesisContexts

List of active code synthesis contexts.

This vector is treated as a stack. As synthesis of one entity requires synthesis of another, additional contexts are pushed onto the stack.

Definition at line 8135 of file Sema.h.

Referenced by clang::Sema::InstantiatingTemplate::Clear(), getCurBlock(), getCurLambda(), getEnclosingLambda(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), isSFINAEContext(), popCodeSynthesisContext(), PrintInstantiationStack(), pushCodeSynthesisContext(), SubstFunctionDeclType(), SubstParmTypes(), and SubstType().

## ◆ CollectStats

bool clang::Sema::CollectStats

Flag indicating whether or not to collect detailed statistics.

Definition at line 391 of file Sema.h.

Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().

## ◆ ConstSegStack

PragmaStack<StringLiteral *> clang::Sema::ConstSegStack

Definition at line 541 of file Sema.h.

Referenced by clang::Sema::PragmaStackSentinelRAII::~PragmaStackSentinelRAII().

## ◆ Consumer

ASTConsumer& clang::Sema::Consumer

Definition at line 386 of file Sema.h.

Referenced by ActOnPragmaMSComment(), assignInheritanceModel(), Initialize(), InstantiateClassMembers(), ReferenceDllExportedMembers(), and ~Sema().

## ◆ Context

ASTContext& clang::Sema::Context

Definition at line 385 of file Sema.h.

Referenced by ActOnArrayTypeTrait(), ActOnComment(), ActOnCompatibilityAlias(), ActOnCompoundRequirement(), ActOnCXXDelete(), ActOnCXXGlobalScopeSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnCXXTypeConstructExpr(), ActOnDecltypeExpression(), ActOnFinishFullExpr(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnNoexceptSpec(), ActOnPragmaMSComment(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPseudoDestructorExpr(), ActOnRequiresExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartOfObjCMethodDef(), ActOnStartProtocolInterface(), ActOnStartRequiresExpr(), ActOnTypeRequirement(), ActOnTypeTrait(), AddAlignmentAttributesForRecord(), AddCFAuditedAttribute(), AddLazyVectorDecls(), AddMsStructLayoutForRecord(), AddOptnoneAttributeIfNoConflicts(), AddSuperSendCompletion(), clang::TemplateDeclInstantiator::adjustForRewrite(), AdjustFunctionParmAndArgTypesForDeduction(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), attemptRecovery(), attributeParsedArgsUnevaluated(), BuildAddressSpaceIndex(), BuildArrayTypeTrait(), BuildCookedLiteralOperatorCall(), buildCounterInit(), buildCounterUpdate(), BuildCXXNoexceptExpr(), BuildCXXThisExpr(), BuildCXXTypeConstructExpr(), buildDeclareReductionRef(), BuildExpressionTrait(), BuildExprRequirement(), BuildFloatingLiteral(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), buildMemcpyForAssignmentOp(), BuildMSPropertyRefExpr(), BuildNestedRequirement(), buildPostUpdate(), BuildPseudoDestructorExpr(), buildSingleCopyAssign(), BuildTypeRequirement(), BuildTypeTrait(), buildUserDefinedMapperRef(), buildVarDecl(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), canPassInRegisters(), clang::canTypeidThrow(), clang::canVarDeclThrow(), castForMoving(), CastForMoving(), CastsAwayConstness(), CheckAllocatedType(), checkAllowedCUDAInitializer(), CheckARCMethodDecl(), checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), checkBlockPointerTypesForAssignment(), CheckBoolLikeConversion(), checkBuiltinArgument(), checkComplexDecomposition(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkConditionalVoidType(), CheckConvertedConstantExpression(), CheckCXXBooleanCondition(), CheckDeducedArgumentConstraints(), CheckDeducedPlaceholderConstraints(), checkEnumArithmeticConversions(), CheckEquivalentExceptionSpec(), clang::CheckEquivalentExceptionSpecImpl(), checkEscapingByref(), CheckFormatString(), checkFormatStringExpr(), CheckForModifiableLvalue(), checkForMultipleExportedDefaultConstructors(), CheckForNullPointerDereference(), CheckForReference(), CheckGNUVectorConditionalTypes(), CheckImplementationIvars(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), checkInitMethod(), checkIntToPointerCast(), CheckKeyForObjCARCConversion(), checkLiteralOperatorTemplateParameterList(), CheckLiteralType(), checkMemberDecomposition(), CheckMoveOnConstruction(), CheckNonNullArguments(), CheckNonNullExpr(), checkNullabilityConsistency(), checkNullabilityTypeSpecifier(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), CheckObjCCollectionLiteralElement(), checkObjCKindOfType(), CheckObjCMethodOverride(), checkObjCPointerTypesForAssignment(), CheckObjCPropertyAttributes(), checkOpenCLEnqueueLocalSizeArgs(), checkOpenCLPipePacketType(), checkOpenMPLoop(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CheckPointerToMemberOperands(), checkPointerTypesForAssignment(), checkSimdlenSafelenSpecified(), CheckSpecifiedExceptionType(), CheckTautologicalComparison(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), checkThreeWayNarrowingConversion(), checkTrivialClassMembers(), checkTupleLikeDecomposition(), checkTypeMappable(), checkVAStartABI(), checkVectorDecomposition(), checkVectorResult(), checkVectorShift(), CloneDesignatedInitExpr(), CollectFieldInitializer(), CompareDerivedToBaseConversions(), compareOverloads(), CompareQualificationConversions(), CompareStandardConversionSequences(), computeDeclContext(), ComputeDefaultedSpecialMemberExceptionSpec(), convertArgsForAvailabilityChecks(), ConvertDeducedTemplateArgument(), convertVector(), CopyObject(), CUDASetLambdaAttrs(), CXXCheckConditionalOperands(), DeclareGlobalNewDelete(), DeduceFromInitializerList(), DeduceNonTypeTemplateArgument(), DeduceNullPtrTemplateArgument(), DeduceTemplateArguments(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), defaultedSpecialMemberIsConstexpr(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArrayStarInParamType(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadFunctionCast(), DiagnoseBadShiftValues(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseCallingConvCast(), DiagnoseCastOfObjCSEL(), DiagnoseDivisionSizeofPointerOrArray(), DiagnoseFloatingImpCast(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), DiagnoseIntInBoolContext(), diagnoseListInit(), DiagnoseNarrowingInInitList(), diagnoseNoViableConversion(), diagnoseNullableToNonnullConversion(), DiagnoseNullConversion(), diagnoseObjCARCConversion(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), DiagnoseReinterpretUpDownCast(), diagnoseTautologicalComparison(), DiagnoseTwoPhaseOperatorLookup(), DiagnoseUninitializedUse(), doesUsualArrayDeleteWantSize(), DoMarkVarDeclReferenced(), EmitCurrentDiagnostic(), emitReplacement(), EvaluateArrayTypeTrait(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), EvaluateUnaryTypeTrait(), ExpandAnonymousFieldDesignator(), FindAllocationFunctions(), FindBaseInitializer(), findCapturingExpr(), FindCompositePointerType(), FindProtocolDeclaration(), fitsInto(), getCastAwayConstnessCastKind(), getCCForDeclaratorChunk(), clang::TypoCorrectionConsumer::getCorrectionValidator(), getCudaConfigureFuncName(), GetDeclSpecTypeForDeclarator(), getDecltypeForExpr(), clang::getDeclUsageType(), getFixedEnumPromtion(), getFloat128Identifier(), getGenericLambdaTemplateParameterList(), getImplicitMethodEPI(), getParamType(), getPreviousDeclForInstantiation(), getSuperIdentifier(), getTrivialIntegralTemplateArgument(), getTupleLikeElementType(), GetTypeOfFunction(), GetTypeSourceInfoForDeclarator(), HandleAddressSpaceTypeAttribute(), handleFixedPointConversion(), handleFunctionTypeAttr(), handleIntegerConversion(), handleMSPointerTypeQualifierAttr(), HandleNeonVectorTypeAttr(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), HandleOpenCLAccessAttr(), handlerCanCatch(), hasDeducibleTemplateParameters(), IgnoredValueConversions(), ImpCastExprToType(), inferARCWriteback(), inferCUDATargetForImplicitSpecialMember(), inferGslOwnerPointerAttribute(), inferGslPointerAttribute(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), Initialize(), clang::InitializationSequence::InitializeFrom(), InstantiateClassMembers(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), InstantiateEnum(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), InstantiateInClassInitializer(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), InventTemplateParameter(), clang::TreeTransform< Derived >::InventTypeSourceInfo(), isAcceptableNestedNameSpecifier(), isArithmeticArgumentPromotion(), isAtLeastAsSpecializedAs(), IsImplicitBoolFloatConversion(), IsInitializerListConstructorConversion(), isLibstdcxxEagerExceptionSpecHack(), isNonNegativeIntegerValue(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isObjCReceiverType(), isPermittedNeonBaseType(), IsStandardConversion(), IsStringLiteralToNonConstPointerConversion(), isTupleLike(), IsUserDefinedConversion(), IsVectorConversion(), LookupDirect(), LookupMemberExpr(), LookupMethodInReceiverType(), lookupStdTypeTraitMember(), makeUnavailableInSystemHeader(), MarkVarDeclODRUsed(), MatchTemplateParameterKind(), maybeAddCUDAHostDeviceAttrs(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), mergeExceptionSpecs(), noteMemberDeclaredHere(), OpenCLArithmeticConversions(), OpenCLConvertScalarsToVectors(), PDiag(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformImplicitConversion(), ProcessPropertyDecl(), PushCapturedRegionScope(), clang::TreeTransform< Derived >::RebuildAutoType(), clang::TreeTransform< Derived >::RebuildDeducedTemplateSpecializationType(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::RebuildElaboratedType(), clang::TreeTransform< Derived >::RebuildEnumType(), clang::TreeTransform< Derived >::RebuildImplicitValueInitExpr(), clang::TreeTransform< Derived >::RebuildMacroQualifiedType(), clang::TreeTransform< Derived >::RebuildRecordType(), clang::TreeTransform< Derived >::RebuildRequiresExpr(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), clang::TreeTransform< Derived >::RebuildSizeOfPackExpr(), clang::TreeTransform< Derived >::RebuildTypedefType(), recordConversion(), ReferenceDllExportedMembers(), RemoveAddressSpaceFromPtr(), RequireCompleteDeclContext(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), ResolveOverloadedFunctionForReferenceBinding(), ResolveOverloadForDeduction(), SaveNestedNameSpecifierAnnotation(), SemaBuiltinCommitRWPipe(), SemaBuiltinCpuIs(), SemaBuiltinCpuSupports(), SemaBuiltinLaunder(), SemaBuiltinReserveRWPipe(), SemaBuiltinRWPipe(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinToAddr(), shouldIgnoreDueToReservedName(), ShouldRemoveFromUnused(), ShouldTryAgainWithRedefinitionType(), SubstBaseSpecifiers(), clang::TemplateDeclInstantiator::SubstDefaultedFunction(), SubstFunctionDeclType(), SubstParmVarDecl(), clang::TemplateDeclInstantiator::SubstTemplateParams(), SubstType(), transferARCOwnershipToDeclaratorChunk(), transferARCOwnershipToDeclSpec(), translateTemplateArgument(), TryAddressSpaceCast(), TryClassUnification(), TryConstCast(), TryConstructorInitialization(), TryContextuallyConvertToBool(), TryContextuallyConvertToObjCPointer(), TryDefaultInitialization(), tryExprAsCall(), tryGCCVectorConvertAndSplat(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), TryObjectArgumentInitialization(), TryOCLSamplerInitialization(), TryReferenceInit(), TryReferenceInitialization(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), TryUserDefinedConversion(), TryValueInitialization(), tryVectorConvertAndSplat(), UnifySection(), UpdateExceptionSpec(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitVarDecl(), clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl(), WarnExactTypedMethods(), widenIterationCount(), clang::ASTWriter::WriteAST(), and ~Sema().

## ◆ CurContext

DeclContext* clang::Sema::CurContext

CurContext - This is the current declaration context of parsing.

Definition at line 397 of file Sema.h.

Referenced by ActOnCompatibilityAlias(), ActOnCompoundRequirement(), ActOnFinishFullExpr(), ActOnFinishRequiresExpr(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartProtocolInterface(), ActOnStartRequiresExpr(), AddClassMessageCompletions(), clang::Sema::SynthesizedFunctionScope::addContextNote(), AddKeywordsToConsumer(), buildCaptureDecl(), buildDeclareReductionRef(), BuildObjCExceptionDecl(), buildUserDefinedMapperRef(), buildVarDecl(), checkAllocateClauses(), CheckCUDACall(), CheckExplicitInstantiationScope(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckObjCDeclScope(), checkOpenMPLoop(), CheckTemplateSpecializationScope(), checkTypeMappable(), checkVAStartIsInVariadicFunction(), computeDeclContext(), clang::Sema::ContextRAII::ContextRAII(), ConvertDeducedTemplateArgument(), CUDADiagIfDeviceCode(), CUDADiagIfHostCode(), CUDASetLambdaAttrs(), DiagnoseTwoPhaseLookup(), DoMarkVarDeclReferenced(), FinishForRangeVarDecl(), clang::TypoCorrectionConsumer::getCorrectionValidator(), getCurBlock(), getCurLambda(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), getEnclosingLambda(), getFunctionLevelDeclContext(), getFunctionStorageClass(), getNullabilityCompletenessCheckFileID(), getObjCContainerKind(), isLibstdcxxEagerExceptionSpecHack(), isNonNegativeIntegerValue(), isNonPlacementDeallocationFunction(), isOdrUseContext(), isReferenceToNonConstCapture(), isUsualDeallocationFunction(), LookupMethodInReceiverType(), makeUnavailableInSystemHeader(), clang::Parser::ParseTopLevelDecl(), clang::Sema::ContextRAII::pop(), SubstParmVarDecl(), tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs(), warnAboutAmbiguousFunction(), and clang::Sema::SynthesizedFunctionScope::~SynthesizedFunctionScope().

## ◆ CurInitSeg

StringLiteral* clang::Sema::CurInitSeg

Last section used with #pragma init_seg.

Definition at line 561 of file Sema.h.

Referenced by ActOnPragmaMSInitSeg().

## ◆ CurInitSegLoc

SourceLocation clang::Sema::CurInitSegLoc

Definition at line 562 of file Sema.h.

Referenced by ActOnPragmaMSInitSeg().

## ◆ CurrentInstantiationScope

LocalInstantiationScope* clang::Sema::CurrentInstantiationScope

The current instantiation scope used to store local variables.

Definition at line 8508 of file Sema.h.

Referenced by clang::LocalInstantiationScope::cloneScopes(), clang::TemplateDeclInstantiator::enableLateAttributeInstantiation(), clang::LocalInstantiationScope::Exit(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isSFINAEContext(), clang::LocalInstantiationScope::LocalInstantiationScope(), clang::TemplateDeclInstantiator::SubstFunctionType(), SubstParmVarDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().

## ◆ CurrentParameterCopyTypes

llvm::SmallVector<QualType, 4> clang::Sema::CurrentParameterCopyTypes

Stack of types that correspond to the parameter entities that are currently being copy-initialized.

Can be empty.

Definition at line 1284 of file Sema.h.

## ◆ CurrentSEHFinally

SmallVector<Scope*, 2> clang::Sema::CurrentSEHFinally

Stack of active SEH __finally scopes. Can be empty.

Definition at line 414 of file Sema.h.

## ◆ CXXThisTypeOverride

QualType clang::Sema::CXXThisTypeOverride

When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-static member function.

In such cases, this provides the type used for 'this'.

Definition at line 5612 of file Sema.h.

Referenced by ClassifyImplicitMemberAccess(), clang::Sema::ContextRAII::ContextRAII(), isThisOutsideMemberFunctionBody(), clang::Sema::ContextRAII::pop(), and clang::Sema::CXXThisScopeRAII::~CXXThisScopeRAII().

## ◆ CXXTypeInfoDecl

RecordDecl* clang::Sema::CXXTypeInfoDecl

The C++ "type_info" declaration, which is defined in <typeinfo>.

Definition at line 932 of file Sema.h.

## ◆ DataSegStack

PragmaStack<StringLiteral *> clang::Sema::DataSegStack

Definition at line 539 of file Sema.h.

Referenced by clang::Sema::PragmaStackSentinelRAII::~PragmaStackSentinelRAII().

## ◆ DelayedDiagnostics

class clang::Sema::DelayedDiagnostics clang::Sema::DelayedDiagnostics

Referenced by clang::Sema::ContextRAII::pop().

## ◆ DelayedDllExportClasses

SmallVector<CXXRecordDecl*, 4> clang::Sema::DelayedDllExportClasses

Definition at line 11939 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and dllExportImportClassTemplateSpecialization().

## ◆ DelayedDllExportMemberFunctions

SmallVector<CXXMethodDecl*, 4> clang::Sema::DelayedDllExportMemberFunctions

Definition at line 11940 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit().

## ◆ DelayedEquivalentExceptionSpecChecks

SmallVector<std::pair<FunctionDecl*, FunctionDecl*>, 2> clang::Sema::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.

Except during error recovery, the new decl should always be a friend declaration, as that's the only valid way to redeclare a special member before its class is complete.

Definition at line 712 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and CheckEquivalentExceptionSpec().

## ◆ DelayedOverridingExceptionSpecChecks

SmallVector<std::pair<const CXXMethodDecl*, const CXXMethodDecl*>, 2> clang::Sema::DelayedOverridingExceptionSpecChecks

All the overriding functions seen during a class definition that had their exception spec checks delayed, plus the overridden function.

Definition at line 704 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and CheckOverridingFunctionExceptionSpec().

## ◆ DelegatingCtorDecls

DelegatingCtorDeclsType clang::Sema::DelegatingCtorDecls

All the delegating constructors seen so far in the file, used for cycle detection at the end of the TU.

Definition at line 698 of file Sema.h.

Referenced by AddLazyVectorDecls().

## ◆ DeleteExprs

llvm::MapVector<FieldDecl *, DeleteLocs> clang::Sema::DeleteExprs

Definition at line 658 of file Sema.h.

Referenced by DiagnoseMismatchedNewDelete(), and getMismatchingDeleteExpressions().

## ◆ DeviceCallGraph

llvm::DenseMap< CanonicalDeclPtr<FunctionDecl>, llvm::MapVector<CanonicalDeclPtr<FunctionDecl>, SourceLocation> > clang::Sema::DeviceCallGraph

A partial call graph maintained during CUDA/OpenMP device code compilation to support deferred diagnostics.

Functions are only added here if, at the time they're considered, they are not known-emitted. As soon as we discover that a function is known-emitted, we remove it and everything it transitively calls from this set and add those functions to DeviceKnownEmittedFns.

Definition at line 11173 of file Sema.h.

Referenced by markKnownEmitted().

## ◆ DeviceDeferredDiags

llvm::DenseMap<CanonicalDeclPtr<FunctionDecl>, std::vector<PartialDiagnosticAt> > clang::Sema::DeviceDeferredDiags

Diagnostics that are emitted only if we discover that the given function must be codegen'ed.

Because handling these correctly adds overhead to compilation, this is currently only enabled for CUDA compilations.

Definition at line 11140 of file Sema.h.

## ◆ DeviceKnownEmittedFns

llvm::DenseMap< CanonicalDeclPtr<FunctionDecl>, FunctionDeclAndLoc> clang::Sema::DeviceKnownEmittedFns

An inverse call graph, mapping known-emitted functions to one of their known-emitted callers (plus the location of the call).

Functions that we can tell a priori must be emitted aren't added to this map.

Definition at line 11161 of file Sema.h.

Referenced by markKnownEmitted().

## ◆ Diags

DiagnosticsEngine& clang::Sema::Diags

Definition at line 387 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), CheckConditionalOperator(), CheckCXX98CompatAccessibleCopy(), DiagnoseBadFunctionCast(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseCallingConvCast(), DiagnoseForRangeVariableCopies(), DiagnoseMismatchedNewDelete(), DiagnoseMultipleMethodInGlobalPool(), DiagnoseNullConversion(), diagnoseZeroToNullptrConversion(), EmitCurrentDiagnostic(), getNullabilityCompletenessCheckFileID(), clang::Sema::CodeSynthesisContext::isInstantiationRecord(), LookupMemberExpr(), LookupMethodInReceiverType(), clang::TemplateSpecCandidateSet::NoteCandidates(), clang::OverloadCandidateSet::NoteCandidates(), noteOverloads(), PrintInstantiationStack(), PrintPragmaAttributeInstantiationPoint(), and ReferenceDllExportedMembers().

## ◆ DictionaryWithObjectsMethod

ObjCMethodDecl* clang::Sema::DictionaryWithObjectsMethod

The declaration of the dictionaryWithObjects:forKeys:count: method.

Definition at line 977 of file Sema.h.

## ◆ DisableTypoCorrection

bool clang::Sema::DisableTypoCorrection

Tracks whether we are in a context where typo correction is disabled.

Definition at line 8512 of file Sema.h.

Referenced by clang::Sema::TentativeAnalysisScope::TentativeAnalysisScope(), and clang::Sema::TentativeAnalysisScope::~TentativeAnalysisScope().

## ◆ ExprCleanupObjects

SmallVector<BlockDecl*, 8> clang::Sema::ExprCleanupObjects

ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current full expression.

The element type here is ExprWithCleanups::Object.

Definition at line 607 of file Sema.h.

Referenced by MaybeCreateExprWithCleanups().

## ◆ ExprEvalContexts

SmallVector<ExpressionEvaluationContextRecord, 8> clang::Sema::ExprEvalContexts

A stack of expression evaluation contexts.

Definition at line 1112 of file Sema.h.

Referenced by ActOnDecltypeExpression(), ActOnStartOfObjCMethodDef(), CheckCUDACall(), ClassifyImplicitMemberAccess(), CorrectDelayedTyposInExpr(), isOdrUseContext(), isPotentiallyConstantEvaluatedContext(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), and clang::Parser::ParseConstantExpressionInExprEvalContext().

## ◆ ExternalDeclarations

SmallVector<VarDecl *, 4> clang::Sema::ExternalDeclarations

All the external declarations encoutered and used in the TU.

Definition at line 682 of file Sema.h.

## ◆ ExtnameUndeclaredIdentifiers

llvm::DenseMap<IdentifierInfo*,AsmLabelAttr*> clang::Sema::ExtnameUndeclaredIdentifiers

ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared.

Used in Solaris system headers to define functions that occur in multiple standards to call the version in the currently selected standard.

Definition at line 888 of file Sema.h.

## ◆ ExtVectorDecls

ExtVectorDeclsType clang::Sema::ExtVectorDecls

ExtVectorDecls - This is a list all the extended vector types.

This allows us to associate a raw vector type with one of the ext_vector type names. This is only necessary for issuing pretty diagnostics.

Definition at line 637 of file Sema.h.

Referenced by AddLazyVectorDecls().

## ◆ FieldCollector

std::unique_ptr<CXXFieldCollector> clang::Sema::FieldCollector

FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.

Definition at line 640 of file Sema.h.

## ◆ FlagBitsCache

llvm::DenseMap<const EnumDecl*, llvm::APInt> clang::Sema::FlagBitsCache
| mutable

A cache of the flags available in enumerations with the flag_bits attribute.

Definition at line 1169 of file Sema.h.

## ◆ FPFeatures

FPOptions clang::Sema::FPFeatures

Definition at line 381 of file Sema.h.

Referenced by ActOnPragmaFEnvAccess(), and ActOnPragmaFPContract().

## ◆ FunctionScopes

SmallVector<sema::FunctionScopeInfo *, 4> clang::Sema::FunctionScopes

Stack containing information about each of the nested function, block, and method scopes that are currently active.

Definition at line 621 of file Sema.h.

Referenced by CheckCXXThisCapture(), getCurBlock(), getCurCapturedRegion(), getCurLambda(), getEnclosingFunction(), getEnclosingLambda(), PopFunctionScopeInfo(), PushBlockScope(), PushCapturedRegionScope(), PushFunctionScope(), PushLambdaScope(), setFunctionHasBranchIntoScope(), setFunctionHasBranchProtectedScope(), setFunctionHasIndirectGoto(), and ~Sema().

## ◆ GlobalNewDeleteDeclared

bool clang::Sema::GlobalNewDeleteDeclared

A flag to remember whether the implicit forms of operator new and delete have been declared.

Definition at line 987 of file Sema.h.

Referenced by DeclareGlobalNewDelete().

## ◆ IdResolver

IdentifierResolver clang::Sema::IdResolver

Definition at line 901 of file Sema.h.

Referenced by AddLazyVectorDecls(), clang::ASTReader::getIdResolver(), and Initialize().

## ◆ ImplicitlyRetainedSelfLocs

llvm::SmallVector<std::pair<SourceLocation, const BlockDecl *>, 1> clang::Sema::ImplicitlyRetainedSelfLocs

List of SourceLocations where 'self' is implicitly retained inside a block.

Definition at line 1237 of file Sema.h.

Referenced by ActOnStartOfObjCMethodDef().

## ◆ ImplicitMSInheritanceAttrLoc

SourceLocation clang::Sema::ImplicitMSInheritanceAttrLoc

Source location for newly created implicit MSInheritanceAttrs.

Definition at line 417 of file Sema.h.

Referenced by ActOnPragmaMSPointersToMembers(), and assignInheritanceModel().

## ◆ InNonInstantiationSFINAEContext

bool clang::Sema::InNonInstantiationSFINAEContext

Whether we are in a SFINAE context that is not associated with template instantiation.

This is used when setting up a SFINAE trap (`see` SFINAETrap) outside of a template instantiation or template argument deduction.

Definition at line 8167 of file Sema.h.

Referenced by isSFINAEContext(), popCodeSynthesisContext(), pushCodeSynthesisContext(), clang::Sema::SFINAETrap::SFINAETrap(), and clang::Sema::SFINAETrap::~SFINAETrap().

## ◆ InstantiatedNonDependentTypes

llvm::DenseSet<QualType> clang::Sema::InstantiatedNonDependentTypes

Non-dependent types used in templates that have already been instantiated by some template instantiation.

Definition at line 8142 of file Sema.h.

## ◆ InstantiatingSpecializations

llvm::DenseSet<std::pair<Decl *, unsigned> > clang::Sema::InstantiatingSpecializations

Specializations whose definitions are currently being instantiated.

Definition at line 8138 of file Sema.h.

Referenced by clang::Sema::InstantiatingTemplate::Clear(), and clang::Sema::CodeSynthesisContext::isInstantiationRecord().

## ◆ InventedParameterInfos

SmallVector<InventedTemplateParameterInfo, 4> clang::Sema::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.

This information is also present in LambdaScopeInfo, stored in the FunctionScopes stack.

Definition at line 628 of file Sema.h.

Referenced by GetDeclSpecTypeForDeclarator().

## ◆ IsBuildingRecoveryCallExpr

bool clang::Sema::IsBuildingRecoveryCallExpr

Flag indicating if Sema is building a recovery call expression.

This flag is used to avoid building recovery call expressions if Sema is already doing so, which would cause infinite recursions.

Definition at line 599 of file Sema.h.

Referenced by BuildRecoveryCallExpr(), and DiagnoseTwoPhaseOperatorLookup().

## ◆ isConstantEvaluatedOverride

bool clang::Sema::isConstantEvaluatedOverride

Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextRecord object.

Definition at line 831 of file Sema.h.

## ◆ kMac68kAlignmentSentinel

const unsigned clang::Sema::kMac68kAlignmentSentinel = ~0U
| static

Definition at line 529 of file Sema.h.

Referenced by ActOnPragmaOptionsAlign(), ActOnPragmaPack(), and AddAlignmentAttributesForRecord().

## ◆ LangOpts

const LangOptions& clang::Sema::LangOpts

Definition at line 383 of file Sema.h.

Referenced by ActOnComment(), ActOnEndOfTranslationUnit(), ActOnEndOfTranslationUnitFragment(), ActOnPragmaAttributeAttribute(), checkAllowedCUDAInitializer(), checkDeclInTargetContext(), CheckImplementationIvars(), checkMappableExpressionList(), checkNestingOfRegions(), checkOpenMPLoop(), checkVectorShift(), DiagnoseUnterminatedPragmaPack(), isNonNegativeIntegerValue(), MarkVarDeclODRUsed(), PopFunctionScopeInfo(), PushFunctionScope(), and targetDiag().

## ◆ LastEmittedCodeSynthesisContextDepth

unsigned clang::Sema::LastEmittedCodeSynthesisContextDepth = 0

The depth of the context stack at the point when the most recent error or warning was produced.

This value is used to suppress printing of redundant context stacks when there are multiple errors or warnings in the same instantiation.

Definition at line 8184 of file Sema.h.

Referenced by popCodeSynthesisContext().

## ◆ LateParsedInstantiations

SmallVector<PendingImplicitInstantiation, 1> clang::Sema::LateParsedInstantiations

Queue of implicit template instantiations that cannot be performed eagerly.

Definition at line 8545 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and ActOnEndOfTranslationUnitFragment().

## ◆ LateParsedTemplateMap

LateParsedTemplateMapT clang::Sema::LateParsedTemplateMap

Definition at line 717 of file Sema.h.

## ◆ LateTemplateParser

LateTemplateParserCB* clang::Sema::LateTemplateParser

Definition at line 722 of file Sema.h.

## ◆ LateTemplateParserCleanup

LateTemplateParserCleanupCB* clang::Sema::LateTemplateParserCleanup

Definition at line 723 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit().

## ◆ LocsWithCUDACallDiags

llvm::DenseSet<FunctionDeclAndLoc> clang::Sema::LocsWithCUDACallDiags

FunctionDecls and SourceLocations for which CheckCUDACall has emitted a (maybe deferred) "bad call" diagnostic.

We use this to avoid emitting the same deferred diag twice.

Definition at line 11152 of file Sema.h.

## ◆ LookupModulesCache

llvm::DenseSet<Module*> clang::Sema::LookupModulesCache

Cache of additional modules that should be used for name lookup within the current template instantiation.

Computed lazily; use getLookupModules() to get a complete set.

Definition at line 8151 of file Sema.h.

Referenced by popCodeSynthesisContext().

## ◆ MaybeODRUseExprs

MaybeODRUseExprSet clang::Sema::MaybeODRUseExprs

Definition at line 615 of file Sema.h.

Referenced by DoMarkVarDeclReferenced().

## ◆ MethodPool

GlobalMethodPool clang::Sema::MethodPool

Method Pool - allows efficient lookup when typechecking messages to "id".

We need to maintain a list, since selectors can have differing signatures across classes. In Cocoa, this happens to be extremely uncommon (only 1% of selectors are "overloaded"). At the head of the list it is recorded whether there were 0, 1, or >= 2 methods inside categories with a particular selector.

Definition at line 1228 of file Sema.h.

Referenced by AddClassMessageCompletions(), AreMultipleMethodsInGlobalPool(), CheckObjCMethodOverrides(), CollectMultipleMethodsInGlobalPool(), LookupImplementedMethodInGlobalPool(), SelectorsForTypoCorrection(), and updateOutOfDateSelector().

## ◆ MSPointerToMemberRepresentationMethod

LangOptions::PragmaMSPointersToMembersKind clang::Sema::MSPointerToMemberRepresentationMethod

Controls member pointer representation format under the MS ABI.

Definition at line 411 of file Sema.h.

Referenced by ActOnPragmaMSPointersToMembers(), and assignInheritanceModel().

## ◆ MSStructPragmaOn

bool clang::Sema::MSStructPragmaOn

Definition at line 407 of file Sema.h.

Referenced by ActOnPragmaMSStruct(), and AddMsStructLayoutForRecord().

## ◆ MSVCGuidDecl

RecordDecl* clang::Sema::MSVCGuidDecl

The MSVC "_GUID" struct, which is defined in MSVC header files.

Definition at line 935 of file Sema.h.

## ◆ NonInstantiationEntries

unsigned clang::Sema::NonInstantiationEntries

The number of `CodeSynthesisContexts` that are not template instantiations and, therefore, should not be counted as part of the instantiation depth.

When the instantiation depth reaches the user-configurable limit `LangOptions::InstantiationDepth` we will abort instantiation.

Definition at line 8176 of file Sema.h.

Referenced by clang::Sema::InstantiatingTemplate::Clear(), popCodeSynthesisContext(), and pushCodeSynthesisContext().

## ◆ NSAPIObj

std::unique_ptr<NSAPI> clang::Sema::NSAPIObj

Caches identifiers/selectors for NSFoundation APIs.

Definition at line 938 of file Sema.h.

Referenced by CheckObjCCollectionLiteralElement(), CheckTautologicalComparison(), GetNSMutableArrayArgumentIndex(), GetNSMutableDictionaryArgumentIndex(), GetNSSetArgumentIndex(), hasIsEqualMethod(), isMethodDeclaredInRootProtocol(), and isObjCSignedCharBool().

## ◆ NSArrayDecl

ObjCInterfaceDecl* clang::Sema::NSArrayDecl

The declaration of the Objective-C NSArray class.

Definition at line 968 of file Sema.h.

Referenced by checkObjCArrayLiteral().

## ◆ NSDictionaryDecl

ObjCInterfaceDecl* clang::Sema::NSDictionaryDecl

The declaration of the Objective-C NSDictionary class.

Definition at line 974 of file Sema.h.

Referenced by checkObjCDictionaryLiteral().

## ◆ NSNumberDecl

ObjCInterfaceDecl* clang::Sema::NSNumberDecl

The declaration of the Objective-C NSNumber class.

Definition at line 941 of file Sema.h.

## ◆ NSNumberLiteralMethods

ObjCMethodDecl* clang::Sema::NSNumberLiteralMethods[NSAPI::NumNSNumberLiteralMethods]

The Objective-C NSNumber methods used to create NSNumber literals.

Definition at line 953 of file Sema.h.

## ◆ NSNumberPointer

QualType clang::Sema::NSNumberPointer

Pointer to NSNumber type (NSNumber *).

Definition at line 947 of file Sema.h.

## ◆ NSStringDecl

ObjCInterfaceDecl* clang::Sema::NSStringDecl

The declaration of the Objective-C NSString class.

Definition at line 956 of file Sema.h.

## ◆ NSStringPointer

QualType clang::Sema::NSStringPointer

Pointer to NSString type (NSString *).

Definition at line 959 of file Sema.h.

## ◆ NSValueDecl

ObjCInterfaceDecl* clang::Sema::NSValueDecl

The declaration of the Objective-C NSValue class.

Definition at line 944 of file Sema.h.

## ◆ NSValuePointer

QualType clang::Sema::NSValuePointer

Pointer to NSValue type (NSValue *).

Definition at line 950 of file Sema.h.

## ◆ NullabilityMap

FileNullabilityMap clang::Sema::NullabilityMap

A mapping that describes the nullability we've seen in each header file.

Definition at line 558 of file Sema.h.

Referenced by checkNullabilityConsistency(), and recordNullabilitySeen().

## ◆ NumSFINAEErrors

unsigned clang::Sema::NumSFINAEErrors

The number of SFINAE diagnostics that have been trapped.

Definition at line 1183 of file Sema.h.

Referenced by EmitCurrentDiagnostic(), clang::Sema::SFINAETrap::hasErrorOccurred(), PrintStats(), and clang::Sema::SFINAETrap::~SFINAETrap().

## ◆ OpaqueParser

void* clang::Sema::OpaqueParser

Definition at line 724 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit().

## ◆ OpenCLFeatures

OpenCLOptions clang::Sema::OpenCLFeatures

Definition at line 380 of file Sema.h.

## ◆ OptimizeOffPragmaLocation

SourceLocation clang::Sema::OptimizeOffPragmaLocation

This represents the last location of a "#pragma clang optimize off" directive if such a directive has not been closed by an "on" yet.

If optimizations are currently "on", this is set to an invalid location.

Definition at line 593 of file Sema.h.

Referenced by ActOnPragmaOptimize(), and AddRangeBasedOptnone().

## ◆ OriginalLexicalContext

DeclContext* clang::Sema::OriginalLexicalContext

Generally null except when we temporarily switch decl contexts, like in.

See also
  ActOnObjCTemporaryExitContainerContext.

Definition at line 401 of file Sema.h.

## ◆ PackIncludeStack

SmallVector<PackIncludeState, 8> clang::Sema::PackIncludeStack

Definition at line 537 of file Sema.h.

Referenced by AddAlignmentAttributesForRecord(), and DiagnoseNonDefaultPragmaPack().

## ◆ PackStack

PragmaStack<unsigned> clang::Sema::PackStack

Definition at line 530 of file Sema.h.

Referenced by ActOnPragmaOptionsAlign(), ActOnPragmaPack(), AddAlignmentAttributesForRecord(), DiagnoseNonDefaultPragmaPack(), and DiagnoseUnterminatedPragmaPack().

## ◆ ParsingInitForAutoVars

llvm::SmallPtrSet<const Decl*, 4> clang::Sema::ParsingInitForAutoVars

ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the initializer.

Definition at line 669 of file Sema.h.

## ◆ PendingInstantiations

std::deque<PendingImplicitInstantiation> clang::Sema::PendingInstantiations

The queue of implicit template instantiations that are required but have not yet been performed.

Definition at line 8541 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnEndOfTranslationUnitFragment(), AddLazyVectorDecls(), DoMarkVarDeclReferenced(), and clang::Sema::GlobalEagerInstantiationScope::GlobalEagerInstantiationScope().

## ◆ PendingLocalImplicitInstantiations

std::deque<PendingImplicitInstantiation> clang::Sema::PendingLocalImplicitInstantiations

The queue of implicit template instantiations that are required and must be performed within the current local scope.

This queue is only used for member functions of local classes in templates, which must be instantiated in the same scope as their enclosing function, so that they can reference function-local types, static variables, enumerators, etc.

Definition at line 8592 of file Sema.h.

Referenced by AddLazyVectorDecls(), InstantiateClassMembers(), clang::Sema::LocalEagerInstantiationScope::LocalEagerInstantiationScope(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

## ◆ PP

Preprocessor& clang::Sema::PP

Definition at line 384 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), AddCFAuditedAttribute(), AddLazyVectorDecls(), BuildNonArrayForRange(), checkTupleLikeDecomposition(), DeclareGlobalNewDelete(), DiagnoseOwningPropertyGetterSynthesis(), diagReturnOnAllocFailure(), clang::arcmt::trans::getNilString(), getTupleLikeElementType(), Initialize(), isTupleLike(), LookupMemberExpr(), LookupMethodInReceiverType(), LookupStdInitializerList(), lookupStdTypeTraitMember(), noteMemberDeclaredHere(), and clang::ASTWriter::WriteAST().

## ◆ PragmaAttributeCurrentTargetDecl

const Decl* clang::Sema::PragmaAttributeCurrentTargetDecl

The declaration that is currently receiving an attribute from the #pragma attribute stack.

Definition at line 588 of file Sema.h.

Referenced by AddPragmaAttributes(), and PrintPragmaAttributeInstantiationPoint().

## ◆ PragmaAttributeStack

SmallVector<PragmaAttributeGroup, 2> clang::Sema::PragmaAttributeStack

Definition at line 584 of file Sema.h.

Referenced by ActOnPragmaAttributeAttribute(), ActOnPragmaAttributeEmptyPush(), ActOnPragmaAttributePop(), AddPragmaAttributes(), and DiagnoseUnterminatedPragmaAttribute().

## ◆ PragmaClangBSSSection

PragmaClangSection clang::Sema::PragmaClangBSSSection

Definition at line 450 of file Sema.h.

Referenced by ActOnPragmaClangSection().

## ◆ PragmaClangDataSection

PragmaClangSection clang::Sema::PragmaClangDataSection

Definition at line 451 of file Sema.h.

Referenced by ActOnPragmaClangSection().

## ◆ PragmaClangRelroSection

PragmaClangSection clang::Sema::PragmaClangRelroSection

Definition at line 453 of file Sema.h.

Referenced by ActOnPragmaClangSection().

## ◆ PragmaClangRodataSection

PragmaClangSection clang::Sema::PragmaClangRodataSection

Definition at line 452 of file Sema.h.

Referenced by ActOnPragmaClangSection().

## ◆ PragmaClangTextSection

PragmaClangSection clang::Sema::PragmaClangTextSection

Definition at line 454 of file Sema.h.

Referenced by ActOnPragmaClangSection().

## ◆ PureVirtualClassDiagSet

std::unique_ptr<RecordDeclSetTy> clang::Sema::PureVirtualClassDiagSet

PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual functions.

Used to prevent emitting the same list more than once.

Definition at line 665 of file Sema.h.

## ◆ QIDNSCopying

QualType clang::Sema::QIDNSCopying

id<NSCopying> type.

Definition at line 980 of file Sema.h.

## ◆ ReferencedSelectors

llvm::MapVector<Selector, SourceLocation> clang::Sema::ReferencedSelectors

Method selectors used in a @selector expression.

Used for implementation of -Wselector.

Definition at line 1232 of file Sema.h.

Referenced by DiagnoseUseOfUnimplementedSelectors(), and RemoveSelectorFromWarningCache().

## ◆ RespondsToSelectorSel

Selector clang::Sema::RespondsToSelectorSel

will hold 'respondsToSelector:'

Definition at line 983 of file Sema.h.

## ◆ SourceMgr

SourceManager& clang::Sema::SourceMgr

Definition at line 388 of file Sema.h.

Referenced by ActOnComment(), ActOnStartOfTranslationUnit(), AnalyzeCompoundAssignment(), CheckImplicitConversion(), DiagnoseNullConversion(), DiagnoseUnterminatedPragmaPack(), diagnoseZeroToNullptrConversion(), fixItNullability(), getNullabilityCompletenessCheckFileID(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), shouldIgnoreDueToReservedName(), and warnAboutAmbiguousFunction().

## ◆ SpecialMemberCache

llvm::FoldingSet<SpecialMemberOverloadResultEntry> clang::Sema::SpecialMemberCache

A cache of special member function overload resolution results for C++ records.

Definition at line 1165 of file Sema.h.

## ◆ SpecialMembersBeingDeclared

llvm::SmallPtrSet<SpecialMemberDecl, 4> clang::Sema::SpecialMembersBeingDeclared

The C++ special members which we are currently in the process of declaring.

If this process recursively triggers the declaration of the same special member, we should act as if it is not yet declared.

Definition at line 1256 of file Sema.h.

## ◆ StdAlignValT

LazyDeclPtr clang::Sema::StdAlignValT

The C++ "std::align_val_t" enum class, which is defined by the C++ standard library.

Definition at line 917 of file Sema.h.

Referenced by AddLazyVectorDecls(), and DeclareGlobalNewDelete().

## ◆ StdBadAlloc

LazyDeclPtr clang::Sema::StdBadAlloc

The C++ "std::bad_alloc" class, which is defined by the C++ standard library.

Definition at line 913 of file Sema.h.

Referenced by AddLazyVectorDecls(), and DeclareGlobalNewDelete().

## ◆ StdCoroutineTraitsCache

ClassTemplateDecl* clang::Sema::StdCoroutineTraitsCache

The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>

Definition at line 929 of file Sema.h.

## ◆ StdExperimentalNamespaceCache

NamespaceDecl* clang::Sema::StdExperimentalNamespaceCache

The C++ "std::experimental" namespace, where the experimental parts of the standard library resides.

Definition at line 921 of file Sema.h.

## ◆ StdInitializerList

ClassTemplateDecl* clang::Sema::StdInitializerList

The C++ "std::initializer_list" template, which is defined in <initializer_list>.

Definition at line 925 of file Sema.h.

## ◆ StdNamespace

LazyDeclPtr clang::Sema::StdNamespace

The C++ "std" namespace, where the standard library resides.

Definition at line 909 of file Sema.h.

Referenced by AddLazyVectorDecls().

## ◆ StringWithUTF8StringMethod

ObjCMethodDecl* clang::Sema::StringWithUTF8StringMethod

The declaration of the stringWithUTF8String: method.

Definition at line 962 of file Sema.h.

## ◆ SuppressedDiagnostics

SuppressedDiagnosticsMap clang::Sema::SuppressedDiagnostics

Definition at line 8230 of file Sema.h.

## ◆ TemplateInstCallbacks

std::vector<std::unique_ptr<TemplateInstantiationCallback> > clang::Sema::TemplateInstCallbacks

The template instantiation callbacks to trace or track instantiations (objects can be chained).

This callbacks is used to print, trace or track template instantiations as they are being constructed.

Definition at line 8192 of file Sema.h.

Referenced by clang::Sema::InstantiatingTemplate::Clear(), clang::TemplightDumpAction::ExecuteAction(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and clang::Sema::CodeSynthesisContext::isInstantiationRecord().

## ◆ TentativeDefinitions

TentativeDefinitionsType clang::Sema::TentativeDefinitions

All the tentative definitions encountered in the TU.

Definition at line 679 of file Sema.h.

Referenced by AddLazyVectorDecls().

## ◆ ThreadSafetyDeclCache

threadSafety::BeforeSet* clang::Sema::ThreadSafetyDeclCache

Definition at line 8527 of file Sema.h.

Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings(), and ~Sema().

## ◆ TUKind

TranslationUnitKind clang::Sema::TUKind

The kind of translation unit we are processing.

When we're processing a complete translation unit, Sema will perform end-of-translation-unit semantic tasks (such as creating initializers for tentative definitions in C) once parsing has completed. Modules and precompiled headers perform different kinds of checks.

Definition at line 1178 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit().

## ◆ TUScope

Scope* clang::Sema::TUScope

Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in the "ordinary" C decl namespace.

For example, user-defined classes, built-in "id" type, etc.

Definition at line 906 of file Sema.h.

Referenced by ActOnCompatibilityAlias(), ActOnEndOfTranslationUnit(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartProtocolInterface(), ActOnTypedefedProtocols(), buildMemcpyForAssignmentOp(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), FindProtocolDeclaration(), Initialize(), and isMethodDeclaredInRootProtocol().

## ◆ TypoCorrectedFunctionDefinitions

llvm::SmallPtrSet<const NamedDecl *, 4> clang::Sema::TypoCorrectedFunctionDefinitions

The function definitions which were renamed as part of typo-correction to match their respective declarations.

We want to keep track of them to ensure that we don't emit a "redefinition" error if we encounter a correctly named definition after the renamed definition.

Definition at line 1280 of file Sema.h.

## ◆ TypoCorrectionFailures

IdentifierSourceLocations clang::Sema::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.

Definition at line 8523 of file Sema.h.

## ◆ TypoExprs

llvm::SmallVector<TypoExpr *, 2> clang::Sema::TypoExprs

Holds TypoExprs that are created from `createDelayedTypo`.

This is used by `TransformTypos` in order to keep track of any TypoExprs that are created recursively during typo correction and wipe them away if the correction fails.

Definition at line 423 of file Sema.h.

Referenced by attemptRecovery().

## ◆ TyposCorrected

unsigned clang::Sema::TyposCorrected

The number of typos corrected by CorrectTypo.

Definition at line 8515 of file Sema.h.

## ◆ UndefinedButUsed

llvm::MapVector<NamedDecl *, SourceLocation> clang::Sema::UndefinedButUsed

UndefinedInternals - all the used, undefined objects which require a definition in this translation unit.

Definition at line 1203 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), getUndefinedButUsed(), and MarkVarDeclODRUsed().

## ◆ UnparsedDefaultArgInstantiations

UnparsedDefaultArgInstantiationsMap clang::Sema::UnparsedDefaultArgInstantiations

A mapping from parameters with unparsed default arguments to the set of instantiations of each parameter.

This mapping is a temporary data structure used when parsing nested class templates or nested classes of class templates, where we might end up instantiating an inner class before the default arguments of its methods have been parsed.

Definition at line 1195 of file Sema.h.

Referenced by SubstParmVarDecl().

## ◆ UnparsedDefaultArgLocs

llvm::DenseMap<ParmVarDecl *, SourceLocation> clang::Sema::UnparsedDefaultArgLocs

Definition at line 1199 of file Sema.h.

## ◆ UnusedFileScopedDecls

UnusedFileScopedDeclsType clang::Sema::UnusedFileScopedDecls

The set of file scoped decls seen so far that have not been used and must warn if not used.

Only contains the first declaration.

Definition at line 690 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and AddLazyVectorDecls().

## ◆ UnusedLocalTypedefNameCandidates

llvm::SmallSetVector<const TypedefNameDecl *, 4> clang::Sema::UnusedLocalTypedefNameCandidates

Set containing all typedefs that are likely unused.

Definition at line 649 of file Sema.h.

Referenced by AddLazyVectorDecls(), and emitAndClearUnusedLocalTypedefWarnings().

## ◆ UnusedPrivateFields

NamedDeclSetType clang::Sema::UnusedPrivateFields

Set containing all declared private fields that are not used.

Definition at line 645 of file Sema.h.

## ◆ VAListTagName

DeclarationName clang::Sema::VAListTagName

VAListTagName - The declaration name corresponding to __va_list_tag.

This is used as part of a hack to omit that class from ADL results.

Definition at line 405 of file Sema.h.

Referenced by Initialize().

## ◆ ValueWithBytesObjCTypeMethod

ObjCMethodDecl* clang::Sema::ValueWithBytesObjCTypeMethod

The declaration of the valueWithBytes:objCType: method.

Definition at line 965 of file Sema.h.

## ◆ VisContext

void* clang::Sema::VisContext

VisContext - Manages the stack for #pragma GCC visibility.

Definition at line 565 of file Sema.h.

Referenced by AddPushedVisibilityAttribute(), FreeVisContext(), PopPragmaVisibility(), PushPragmaVisibility(), and ~Sema().

## ◆ VisibleNamespaceCache

llvm::DenseMap<NamedDecl*, NamedDecl*> clang::Sema::VisibleNamespaceCache

Map from the most recent declaration of a namespace to the most recent visible declaration of that namespace.

Definition at line 8160 of file Sema.h.

## ◆ VTablesUsed

llvm::DenseMap<CXXRecordDecl *, bool> clang::Sema::VTablesUsed

The set of classes whose vtables have been used within this translation unit, and a bit that will be true if the vtable is required to be emitted (otherwise, it should be emitted only if needed by code generation).

Definition at line 6508 of file Sema.h.

Referenced by AddLazyVectorDecls().

## ◆ VTableUses

SmallVector<VTableUse, 16> clang::Sema::VTableUses

The list of vtables that are required but have not yet been materialized.

Definition at line 6502 of file Sema.h.

Referenced by AddLazyVectorDecls(), and clang::Sema::GlobalEagerInstantiationScope::GlobalEagerInstantiationScope().

## ◆ VtorDispStack

PragmaStack<MSVtorDispMode> clang::Sema::VtorDispStack

Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI.

Possible values are 0, 1, and 2, which mean:

0: Suppress all vtordisps 1: Insert vtordisps in the presence of vbase overrides and non-trivial structors 2: Always insert vtordisps to support RTTI on partially constructed objects

Definition at line 526 of file Sema.h.

Referenced by ActOnPragmaMSVtorDisp(), AddMsStructLayoutForRecord(), and clang::Sema::PragmaStackSentinelRAII::~PragmaStackSentinelRAII().

## ◆ WarnedStackExhausted

bool clang::Sema::WarnedStackExhausted = false

Definition at line 1312 of file Sema.h.

Referenced by warnStackExhausted().

## ◆ WeakTopLevelDecl

SmallVector<Decl*,2> clang::Sema::WeakTopLevelDecl

WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing of other Decls.

I couldn't figure out a clean way to generate these in-line, so we store them here and handle separately – which is a hack. It would be best to refactor this.

Definition at line 899 of file Sema.h.

## ◆ WeakUndeclaredIdentifiers

llvm::MapVector<IdentifierInfo *, WeakInfo> clang::Sema::WeakUndeclaredIdentifiers

WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared.

rare. may alias another identifier, declared or undeclared

Definition at line 882 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), AddLazyVectorDecls(), and LoadExternalWeakUndeclaredIdentifiers().

The documentation for this class was generated from the following files:

- include/clang/Sema/Sema.h
- include/clang/Sema/SemaInternal.h
- lib/Sema/JumpDiagnostics.cpp
- lib/Sema/Sema.cpp
- lib/Sema/SemaAccess.cpp
- lib/Sema/SemaAttr.cpp
- lib/Sema/SemaCast.cpp
- lib/Sema/SemaChecking.cpp
- lib/Sema/SemaCodeComplete.cpp
- lib/Sema/SemaConcept.cpp
- lib/Sema/SemaCoroutine.cpp
- lib/Sema/SemaCUDA.cpp
- lib/Sema/SemaCXXScopeSpec.cpp
- lib/Sema/SemaDecl.cpp
- lib/Sema/SemaDeclAttr.cpp
- lib/Sema/SemaDeclCXX.cpp
- lib/Sema/SemaDeclObjC.cpp
- lib/Sema/SemaExceptionSpec.cpp
- lib/Sema/SemaExpr.cpp
- lib/Sema/SemaExprCXX.cpp
- lib/Sema/SemaExprMember.cpp
- lib/Sema/SemaExprObjC.cpp
- lib/Sema/SemaFixItUtils.cpp
- lib/Sema/SemaInit.cpp
- lib/Sema/SemaLambda.cpp
- lib/Sema/SemaLookup.cpp
- lib/Sema/SemaModule.cpp
- lib/Sema/SemaObjCProperty.cpp
- lib/Sema/SemaOpenMP.cpp
- lib/Sema/SemaOverload.cpp
- lib/Sema/SemaPseudoObject.cpp
- lib/Sema/SemaStmt.cpp
- lib/Sema/SemaStmtAsm.cpp
- lib/Sema/SemaStmtAttr.cpp
- lib/Sema/SemaTemplate.cpp
- lib/Sema/SemaTemplateDeduction.cpp
- lib/Sema/SemaTemplateInstantiate.cpp
- lib/Sema/SemaTemplateInstantiateDecl.cpp
- lib/Sema/SemaTemplateVariadic.cpp
- lib/Sema/SemaType.cpp