clang 19.0.0git
Classes | List of all members
clang::Sema Class Referencefinal

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

#include "clang/Sema/Sema.h"

Classes

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

Semantic Analysis

Implementations are in Sema.cpp

enum  TUFragmentKind { Global , Normal , Private }
 
enum  CheckedConversionKind {
  CCK_ImplicitConversion , CCK_CStyleCast , CCK_FunctionalCast , CCK_OtherCast ,
  CCK_ForBuiltinOverloadedOp
}
 The kind of conversion being performed. More...
 
typedef std::pair< SourceLocation, boolDeleteExprLoc
 
typedef llvm::SmallVector< DeleteExprLoc, 4 > DeleteLocs
 
using PoppedFunctionScopePtr = std::unique_ptr< sema::FunctionScopeInfo, PoppedFunctionScopeDeleter >
 
typedef OpaquePtr< DeclGroupRefDeclGroupPtrTy
 
typedef OpaquePtr< TemplateNameTemplateTy
 
typedef OpaquePtr< QualTypeTypeTy
 
typedef void LateTemplateParserCB(void *P, LateParsedTemplate &LPT)
 Callback to the parser to parse templated functions when needed.
 
typedef void LateTemplateParserCleanupCB(void *P)
 
typedef DelayedDiagnosticsState ParsingDeclState
 
typedef DelayedDiagnosticsState ProcessingContextState
 
static const unsigned MaxAlignmentExponent = 32
 The maximum alignment, same as in llvm::Value.
 
static const uint64_t MaximumAlignment = 1ull << MaxAlignmentExponent
 
bool CollectStats
 Flag indicating whether or not to collect detailed statistics.
 
std::unique_ptr< sema::FunctionScopeInfoCachedFunctionScope
 
SmallVector< sema::FunctionScopeInfo *, 4 > FunctionScopes
 Stack containing information about each of the nested function, block, and method scopes that are currently active.
 
unsigned FunctionScopesStart = 0
 The index of the first FunctionScope that corresponds to the current context.
 
unsigned CapturingFunctionScopes = 0
 Track the number of currently active capturing scopes.
 
llvm::BumpPtrAllocator BumpAlloc
 
const TranslationUnitKind TUKind
 The kind of translation unit we are processing.
 
ScopeTUScope
 Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in the "ordinary" C decl namespace.
 
bool WarnedStackExhausted = false
 
OpenCLOptions OpenCLFeatures
 
FPOptions CurFPFeatures
 
const LangOptionsLangOpts
 
PreprocessorPP
 
ASTContextContext
 
ASTConsumerConsumer
 
DiagnosticsEngineDiags
 
SourceManagerSourceMgr
 
api_notes::APINotesManager APINotes
 
sema::AnalysisBasedWarnings AnalysisWarnings
 Worker object for performing CFG-based warnings.
 
threadSafety::BeforeSetThreadSafetyDeclCache
 
LateTemplateParserCBLateTemplateParser
 
LateTemplateParserCleanupCBLateTemplateParserCleanup
 
void * OpaqueParser
 
std::function< TypeResult(StringRef, StringRef, SourceLocation)> ParseTypeFromStringCallback
 Callback to the parser to parse a type expressed as a string.
 
DeclarationName VAListTagName
 VAListTagName - The declaration name corresponding to __va_list_tag.
 
bool IsLastErrorImmediate = true
 Is the last error level diagnostic immediate.
 
class clang::Sema::DelayedDiagnostics DelayedDiagnostics
 
DeclContextCurContext
 CurContext - This is the current declaration context of parsing.
 
class Parser
 
class InitializationSequence
 
class ASTReader
 
class ASTDeclReader
 
class ASTWriter
 
 Sema (Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, TranslationUnitKind TUKind=TU_Complete, CodeCompleteConsumer *CompletionConsumer=nullptr)
 
 ~Sema ()
 
void Initialize ()
 Perform initialization that occurs after the parser has been initialized but before it parses anything.
 
virtual void anchor ()
 This virtual key function only exists to limit the emission of debug info describing the Sema class.
 
const LangOptionsgetLangOpts () const
 
OpenCLOptionsgetOpenCLOptions ()
 
FPOptionsgetCurFPFeatures ()
 
DiagnosticsEnginegetDiagnostics () const
 
SourceManagergetSourceManager () const
 
PreprocessorgetPreprocessor () const
 
ASTContextgetASTContext () const
 
ASTConsumergetASTConsumer () const
 
ASTMutationListenergetASTMutationListener () const
 
ExternalSemaSourcegetExternalSource () const
 
DarwinSDKInfogetDarwinSDKInfoForAvailabilityChecking (SourceLocation Loc, StringRef Platform)
 
DarwinSDKInfogetDarwinSDKInfoForAvailabilityChecking ()
 
void addExternalSource (ExternalSemaSource *E)
 Registers an external source.
 
void PrintStats () const
 Print out statistics about the semantic analysis.
 
void warnStackExhausted (SourceLocation Loc)
 Warn that the stack is nearly exhausted.
 
void runWithSufficientStackSpace (SourceLocation Loc, llvm::function_ref< void()> Fn)
 Run some code with "sufficient" stack space.
 
LangAS getDefaultCXXMethodAddrSpace () const
 Returns default addr space for method qualifiers.
 
void LoadExternalWeakUndeclaredIdentifiers ()
 Load weak undeclared identifiers from the external source.
 
bool isExternalWithNoLinkageType (const ValueDecl *VD) const
 Determine if VD, which must be a variable or function, is an external symbol that nonetheless can't be referenced from outside this translation unit because its type has no linkage and it's not extern "C".
 
void getUndefinedButUsed (SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined)
 Obtain a sorted list of functions that are undefined but ODR-used.
 
const llvm::MapVector< FieldDecl *, DeleteLocs > & getMismatchingDeleteExpressions () const
 Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit.
 
void EmitCurrentDiagnostic (unsigned DiagID)
 Cause the active diagnostic on the DiagosticsEngine to be emitted.
 
void addImplicitTypedef (StringRef Name, QualType T)
 
SemaDiagnosticBuilder Diag (SourceLocation Loc, unsigned DiagID, bool DeferHint=false)
 Emit a diagnostic.
 
SemaDiagnosticBuilder Diag (SourceLocation Loc, const PartialDiagnostic &PD, bool DeferHint=false)
 Emit a partial diagnostic.
 
bool hasUncompilableErrorOccurred () const
 Whether uncompilable error has occurred.
 
bool findMacroSpelling (SourceLocation &loc, StringRef name)
 Looks through the macro-expansion chain for the given location, looking for a macro expansion with the given name.
 
SourceLocation getLocForEndOfToken (SourceLocation Loc, unsigned Offset=0)
 Calls Lexer::getLocForEndOfToken()
 
ModuleLoadergetModuleLoader () const
 Retrieve the module loader associated with the preprocessor.
 
IdentifierInfoInventAbbreviatedTemplateParameterTypeName (IdentifierInfo *ParamName, unsigned Index)
 Invent a new identifier for parameters of abbreviated templates.
 
void emitAndClearUnusedLocalTypedefWarnings ()
 
void emitDeferredDiags ()
 
void ActOnStartOfTranslationUnit ()
 This is called before the very first declaration in the translation unit is parsed.
 
void ActOnEndOfTranslationUnit ()
 ActOnEndOfTranslationUnit - This is called at the very end of the translation unit when EOF is reached and all but the top-level scope is popped.
 
void ActOnEndOfTranslationUnitFragment (TUFragmentKind Kind)
 
ScopegetScopeForContext (DeclContext *Ctx)
 Determines the active Scope associated with the given declaration context.
 
void PushFunctionScope ()
 Enter a new function scope.
 
void PushBlockScope (Scope *BlockScope, BlockDecl *Block)
 
sema::LambdaScopeInfoPushLambdaScope ()
 
void RecordParsingTemplateParameterDepth (unsigned Depth)
 This is used to inform Sema what the current TemplateParameterDepth is during Parsing.
 
void PushCapturedRegionScope (Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K, unsigned OpenMPCaptureLevel=0)
 
PoppedFunctionScopePtr PopFunctionScopeInfo (const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, QualType BlockType=QualType())
 Pop a function (or block or lambda or captured region) scope from the stack.
 
sema::FunctionScopeInfogetEnclosingFunction () const
 
void setFunctionHasBranchIntoScope ()
 
void setFunctionHasBranchProtectedScope ()
 
void setFunctionHasIndirectGoto ()
 
void setFunctionHasMustTail ()
 
void PushCompoundScope (bool IsStmtExpr)
 
void PopCompoundScope ()
 
bool hasAnyUnrecoverableErrorsInThisFunction () const
 Determine whether any errors occurred within this function/method/ block.
 
sema::BlockScopeInfogetCurBlock ()
 Retrieve the current block, if any.
 
sema::LambdaScopeInfogetEnclosingLambda () const
 Get the innermost lambda enclosing the current location, if any.
 
sema::LambdaScopeInfogetCurLambda (bool IgnoreNonLambdaCapturingScope=false)
 Retrieve the current lambda scope info, if any.
 
sema::LambdaScopeInfogetCurGenericLambda ()
 Retrieve the current generic lambda info, if any.
 
sema::CapturedRegionScopeInfogetCurCapturedRegion ()
 Retrieve the current captured region, if any.
 
void ActOnComment (SourceRange Comment)
 
ScopegetCurScope () const
 Retrieve the parser's current scope.
 
IdentifierInfogetSuperIdentifier () const
 
DeclContextgetCurLexicalContext () const
 
SemaDiagnosticBuilder targetDiag (SourceLocation Loc, unsigned DiagID, const FunctionDecl *FD=nullptr)
 
SemaDiagnosticBuilder targetDiag (SourceLocation Loc, const PartialDiagnostic &PD, const FunctionDecl *FD=nullptr)
 
void checkTypeSupport (QualType Ty, SourceLocation Loc, ValueDecl *D=nullptr)
 Check if the type is allowed to be used for the current target.
 
ExprResult ImpCastExprToType (Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_PRValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
 ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
 
DeclContextgetFunctionLevelDeclContext (bool AllowLambda=false) const
 If AllowLambda is true, treat lambda as function.
 
FunctionDeclgetCurFunctionDecl (bool AllowLambda=false) const
 Returns a pointer to the innermost enclosing function, or nullptr if the current context is not inside a function.
 
ObjCMethodDeclgetCurMethodDecl ()
 getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the method being parsed.
 
NamedDeclgetCurFunctionOrMethodDecl () const
 getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method or C function we're in, otherwise return null.
 
void diagnoseNullableToNonnullConversion (QualType DstType, QualType SrcType, SourceLocation Loc)
 Warn if we're implicitly casting from a _Nullable pointer type to a _Nonnull one.
 
void diagnoseZeroToNullptrConversion (CastKind Kind, const Expr *E)
 Warn when implicitly casting 0 to nullptr.
 
bool makeUnavailableInSystemHeader (SourceLocation loc, UnavailableAttr::ImplicitReason reason)
 makeUnavailableInSystemHeader - There is an error in the current context.
 
PrintingPolicy getPrintingPolicy () const
 Retrieve a suitable printing policy for diagnostics.
 
void ActOnTranslationUnitScope (Scope *S)
 Scope actions.
 
bool isDeclaratorFunctionLike (Declarator &D)
 Determine whether.
 
void incrementMSManglingNumber () const
 
bool tryToRecoverWithCall (ExprResult &E, const PartialDiagnostic &PD, bool ForceComplain=false, bool(*IsPlausibleResult)(QualType)=nullptr)
 Try to recover by turning the given expression into a call.
 
bool tryExprAsCall (Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads)
 Figure out if an expression could be turned into a call.
 
PartialDiagnostic PDiag (unsigned DiagID=0)
 Build a partial diagnostic.
 
sema::FunctionScopeInfogetCurFunction () const
 
void SetLateTemplateParser (LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P)
 
ParsingDeclState PushParsingDeclaration (sema::DelayedDiagnosticPool &pool)
 
static CastKind ScalarTypeToBooleanCastKind (QualType ScalarTy)
 ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ScalarTy to the Boolean type.
 
static PrintingPolicy getPrintingPolicy (const ASTContext &Ctx, const Preprocessor &PP)
 Retrieve a suitable printing policy for diagnostics.
 

C++ Access Control

Implementations are in SemaAccess.cpp

enum  AccessResult { AR_accessible , AR_inaccessible , AR_dependent , AR_delayed }
 
bool SetMemberAccessSpecifier (NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS)
 SetMemberAccessSpecifier - Set the access specifier of a member.
 
AccessResult CheckUnresolvedMemberAccess (UnresolvedMemberExpr *E, DeclAccessPair FoundDecl)
 Perform access-control checking on a previously-unresolved member access which has now been resolved to a member.
 
AccessResult CheckUnresolvedLookupAccess (UnresolvedLookupExpr *E, DeclAccessPair FoundDecl)
 
AccessResult CheckAllocationAccess (SourceLocation OperatorLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, bool Diagnose=true)
 Checks access to an overloaded operator new or delete.
 
AccessResult CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, DeclAccessPair FoundDecl, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp=false)
 Checks access to a constructor.
 
AccessResult CheckConstructorAccess (SourceLocation Loc, CXXConstructorDecl *D, DeclAccessPair FoundDecl, const InitializedEntity &Entity, const PartialDiagnostic &PDiag)
 Checks access to a constructor.
 
AccessResult CheckDestructorAccess (SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag, QualType objectType=QualType())
 
AccessResult CheckFriendAccess (NamedDecl *D)
 Checks access to the target of a friend declaration.
 
AccessResult CheckMemberAccess (SourceLocation UseLoc, CXXRecordDecl *NamingClass, DeclAccessPair Found)
 Checks access to a member.
 
AccessResult CheckStructuredBindingMemberAccess (SourceLocation UseLoc, CXXRecordDecl *DecomposedClass, DeclAccessPair Field)
 Checks implicit access to a member in a structured binding.
 
AccessResult CheckMemberOperatorAccess (SourceLocation Loc, Expr *ObjectExpr, const SourceRange &, DeclAccessPair FoundDecl)
 
AccessResult CheckMemberOperatorAccess (SourceLocation Loc, Expr *ObjectExpr, Expr *ArgExpr, DeclAccessPair FoundDecl)
 Checks access to an overloaded member operator, including conversion operators.
 
AccessResult CheckMemberOperatorAccess (SourceLocation Loc, Expr *ObjectExpr, ArrayRef< Expr * > ArgExprs, DeclAccessPair FoundDecl)
 
AccessResult CheckAddressOfMemberAccess (Expr *OvlExpr, DeclAccessPair FoundDecl)
 
AccessResult CheckBaseClassAccess (SourceLocation AccessLoc, QualType Base, QualType Derived, const CXXBasePath &Path, unsigned DiagID, bool ForceCheck=false, bool ForceUnprivileged=false)
 Checks access for a hierarchy conversion.
 
void CheckLookupAccess (const LookupResult &R)
 Checks access to all the declarations in the given result set.
 
bool IsSimplyAccessible (NamedDecl *Decl, CXXRecordDecl *NamingClass, QualType BaseType)
 Checks access to Target from the given class.
 
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?
 
bool isMemberAccessibleForDeletion (CXXRecordDecl *NamingClass, DeclAccessPair Found, QualType ObjectType)
 
void HandleDependentAccessCheck (const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs)
 
void HandleDelayedAccessCheck (sema::DelayedDiagnostic &DD, Decl *Ctx)
 

Attributes

Implementations are in SemaAttr.cpp

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  PragmaSectionKind { PSK_DataSeg , PSK_BSSSeg , PSK_ConstSeg , PSK_CodeSeg }
 
enum  PragmaOptionsAlignKind {
  POAK_Native , POAK_Natural , POAK_Packed , POAK_Power ,
  POAK_Mac68k , POAK_Reset
}
 
enum class  PragmaAlignPackDiagnoseKind { NonDefaultStateAtInclude , ChangedStateAtExit }
 
LangOptions::PragmaMSPointersToMembersKind MSPointerToMemberRepresentationMethod
 Controls member pointer representation format under the MS ABI.
 
bool MSStructPragmaOn
 
SourceLocation ImplicitMSInheritanceAttrLoc
 Source location for newly created implicit MSInheritanceAttrs.
 
PragmaClangSection PragmaClangBSSSection
 
PragmaClangSection PragmaClangDataSection
 
PragmaClangSection PragmaClangRodataSection
 
PragmaClangSection PragmaClangRelroSection
 
PragmaClangSection PragmaClangTextSection
 
PragmaStack< MSVtorDispModeVtorDispStack
 Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI.
 
PragmaStack< AlignPackInfoAlignPackStack
 
SmallVector< AlignPackIncludeState, 8 > AlignPackIncludeStack
 
PragmaStack< StringLiteral * > DataSegStack
 
PragmaStack< StringLiteral * > BSSSegStack
 
PragmaStack< StringLiteral * > ConstSegStack
 
PragmaStack< StringLiteral * > CodeSegStack
 
PragmaStack< boolStrictGuardStackCheckStack
 
PragmaStack< FPOptionsOverrideFpPragmaStack
 
StringLiteralCurInitSeg
 Last section used with #pragma init_seg.
 
SourceLocation CurInitSegLoc
 
llvm::StringMap< std::tuple< StringRef, SourceLocation > > FunctionToSectionMap
 Sections used with #pragma alloc_text.
 
void * VisContext
 VisContext - Manages the stack for #pragma GCC visibility.
 
SmallVector< PragmaAttributeGroup, 2 > PragmaAttributeStack
 
const DeclPragmaAttributeCurrentTargetDecl
 The declaration that is currently receiving an attribute from the #pragma attribute stack.
 
SourceLocation OptimizeOffPragmaLocation
 This represents the last location of a "#pragma clang optimize off" directive if such a directive has not been closed by an "on" yet.
 
bool MSPragmaOptimizeIsOn = true
 The "on" or "off" argument passed by #pragma optimize, that denotes whether the optimizations in the list passed to the pragma should be turned off or on.
 
llvm::SmallSetVector< StringRef, 4 > MSFunctionNoBuiltins
 Set of no-builtin functions listed by #pragma function.
 
FPOptionsOverride CurFPFeatureOverrides ()
 
SourceLocation getOptimizeOffPragmaLocation () const
 Get the location for the currently active "\#pragma clang optimize off". If this location is invalid, then the state of the pragma is "on".
 
void AddAlignmentAttributesForRecord (RecordDecl *RD)
 AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl, to handle '#pragma pack' and '#pragma options align'.
 
void AddMsStructLayoutForRecord (RecordDecl *RD)
 AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
 
void inferGslPointerAttribute (NamedDecl *ND, CXXRecordDecl *UnderlyingRecord)
 Add gsl::Pointer attribute to std::container::iterator.
 
void inferGslOwnerPointerAttribute (CXXRecordDecl *Record)
 Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types.
 
void inferGslPointerAttribute (TypedefNameDecl *TD)
 Add [[gsl::Pointer]] attributes for std:: types.
 
void ActOnPragmaClangSection (SourceLocation PragmaLoc, PragmaClangSectionAction Action, PragmaClangSectionKind SecKind, StringRef SecName)
 ActOnPragmaClangSection - Called on well formed #pragma clang section.
 
void ActOnPragmaOptionsAlign (PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc)
 ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
 
void ActOnPragmaPack (SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *Alignment)
 ActOnPragmaPack - Called on well formed #pragma pack(...).
 
bool ConstantFoldAttrArgs (const AttributeCommonInfo &CI, MutableArrayRef< Expr * > Args)
 ConstantFoldAttrArgs - Folds attribute arguments into ConstantExprs (unless they are value dependent or type dependent).
 
void DiagnoseNonDefaultPragmaAlignPack (PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc)
 
void DiagnoseUnterminatedPragmaAlignPack ()
 
void ActOnPragmaMSStruct (PragmaMSStructKind Kind)
 ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].
 
void ActOnPragmaMSComment (SourceLocation CommentLoc, PragmaMSCommentKind Kind, StringRef Arg)
 ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").
 
void ActOnPragmaDetectMismatch (SourceLocation Loc, StringRef Name, StringRef Value)
 ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.
 
bool isPreciseFPEnabled ()
 Are precise floating point semantics currently enabled?
 
void ActOnPragmaFPEvalMethod (SourceLocation Loc, LangOptions::FPEvalMethodKind Value)
 
void ActOnPragmaFloatControl (SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value)
 ActOnPragmaFloatControl - Call on well-formed #pragma float_control.
 
void ActOnPragmaMSPointersToMembers (LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc)
 ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation method[, general purpose representation]).
 
void ActOnPragmaMSVtorDisp (PragmaMsStackAction Action, SourceLocation PragmaLoc, MSVtorDispMode Value)
 Called on well formed #pragma vtordisp().
 
bool UnifySection (StringRef SectionName, int SectionFlags, NamedDecl *TheDecl)
 
bool UnifySection (StringRef SectionName, int SectionFlags, SourceLocation PragmaSectionLocation)
 
void ActOnPragmaMSSeg (SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName)
 Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.
 
void ActOnPragmaMSSection (SourceLocation PragmaLocation, int SectionFlags, StringLiteral *SegmentName)
 Called on well formed #pragma section().
 
void ActOnPragmaMSInitSeg (SourceLocation PragmaLocation, StringLiteral *SegmentName)
 Called on well-formed #pragma init_seg().
 
void ActOnPragmaMSAllocText (SourceLocation PragmaLocation, StringRef Section, const SmallVector< std::tuple< IdentifierInfo *, SourceLocation > > &Functions)
 Called on well-formed #pragma alloc_text().
 
void ActOnPragmaMSStrictGuardStackCheck (SourceLocation PragmaLocation, PragmaMsStackAction Action, bool Value)
 ActOnPragmaMSStrictGuardStackCheck - Called on well formed #pragma strict_gs_check.
 
void ActOnPragmaUnused (const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc)
 ActOnPragmaUnused - Called on well-formed '#pragma unused'.
 
void AddCFAuditedAttribute (Decl *D)
 AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and, if so, consider adding the appropriate attribute.
 
void 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'.
 
void AddPragmaAttributes (Scope *S, Decl *D)
 Adds the attributes that have been specified using the '#pragma clang attribute push' directives to the given declaration.
 
void PrintPragmaAttributeInstantiationPoint ()
 
void DiagnoseUnterminatedPragmaAttribute ()
 
void ActOnPragmaOptimize (bool On, SourceLocation PragmaLoc)
 Called on well formed #pragma clang optimize.
 
void ActOnPragmaMSOptimize (SourceLocation Loc, bool IsOn)
 #pragma optimize("[optimization-list]", on | off).
 
void ActOnPragmaMSFunction (SourceLocation Loc, const llvm::SmallVectorImpl< StringRef > &NoBuiltins)
 Call on well formed #pragma function.
 
void AddRangeBasedOptnone (FunctionDecl *FD)
 Only called on function definitions; if there is a pragma in scope with the effect of a range-based optnone, consider marking the function with attribute optnone.
 
void AddSectionMSAllocText (FunctionDecl *FD)
 Only called on function definitions; if there is a #pragma alloc_text that decides which code section the function should be in, add attribute section to the function.
 
void AddOptnoneAttributeIfNoConflicts (FunctionDecl *FD, SourceLocation Loc)
 Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents the location causing the 'optnone' attribute to be added (usually because of a pragma).
 
void ModifyFnAttributesMSPragmaOptimize (FunctionDecl *FD)
 Only called on function definitions; if there is a MSVC #pragma optimize in scope, consider changing the function's attributes based on the optimization list passed to the pragma.
 
void AddImplicitMSFunctionNoBuiltinAttr (FunctionDecl *FD)
 Only called on function definitions; if there is a pragma in scope with the effect of a range-based no_builtin, consider marking the function with attribute no_builtin.
 
void AddPushedVisibilityAttribute (Decl *RD)
 AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute.
 
void FreeVisContext ()
 FreeVisContext - Deallocate and null out VisContext.
 
void ActOnPragmaVisibility (const IdentifierInfo *VisType, SourceLocation PragmaLoc)
 ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
 
void ActOnPragmaFPContract (SourceLocation Loc, LangOptions::FPModeKind FPC)
 ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT and #pragma clang fp contract.
 
void ActOnPragmaFPValueChangingOption (SourceLocation Loc, PragmaFPKind Kind, bool IsEnabled)
 Called on well formed #pragma clang fp reassociate or #pragma clang fp reciprocal.
 
void ActOnPragmaFEnvAccess (SourceLocation Loc, bool IsEnabled)
 ActOnPragmaFenvAccess - Called on well formed #pragma STDC FENV_ACCESS.
 
void ActOnPragmaCXLimitedRange (SourceLocation Loc, LangOptions::ComplexRangeKind Range)
 ActOnPragmaCXLimitedRange - Called on well formed #pragma STDC CX_LIMITED_RANGE.
 
void ActOnPragmaFPExceptions (SourceLocation Loc, LangOptions::FPExceptionModeKind)
 Called on well formed '#pragma clang fp' that has option 'exceptions'.
 
void ActOnPragmaFEnvRound (SourceLocation Loc, llvm::RoundingMode)
 Called to set constant rounding mode for floating point operations.
 
void setExceptionMode (SourceLocation Loc, LangOptions::FPExceptionModeKind)
 Called to set exception behavior for floating point operations.
 
void PushNamespaceVisibilityAttr (const VisibilityAttr *Attr, SourceLocation Loc)
 PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.
 
void PopPragmaVisibility (bool IsNamespaceEnd, SourceLocation EndLoc)
 PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' and visibility attributes on namespaces.
 
bool checkCommonAttributeFeatures (const Decl *D, const ParsedAttr &A, bool SkipArgCountCheck=false)
 Handles semantic checking for features that are common to all attributes, such as checking whether a parameter was properly specified, or the correct number of arguments were passed, etc.
 
bool checkCommonAttributeFeatures (const Stmt *S, const ParsedAttr &A, bool SkipArgCountCheck=false)
 

Extra Semantic Checking

Implementations are in SemaChecking.cpp

enum  FormatArgumentPassingKind { FAPK_Fixed , FAPK_Variadic , FAPK_VAList }
 
enum  FormatStringType {
  FST_Scanf , FST_Printf , FST_NSString , FST_Strftime ,
  FST_Strfmon , FST_Kprintf , FST_FreeBSDKPrintf , FST_OSTrace ,
  FST_OSLog , FST_Unknown
}
 
enum class  AtomicArgumentOrder { API , AST }
 
enum  VariadicCallType {
  VariadicFunction , VariadicBlock , VariadicMethod , VariadicConstructor ,
  VariadicDoesNotApply
}
 
typedef std::pair< const IdentifierInfo *, uint64_t > TypeTagMagicValue
 A pair of ArgumentKind identifier and magic value.
 
bool isConstantEvaluatedOverride = false
 Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextRecord object.
 
bool isConstantEvaluatedContext () const
 
SourceLocation getLocationOfStringLiteralByte (const StringLiteral *SL, unsigned ByteNo) const
 
ExprResult SemaBuiltinShuffleVector (CallExpr *TheCall)
 SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
 
ExprResult SemaConvertVectorExpr (Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 SemaConvertVectorExpr - Handle __builtin_convertvector.
 
bool FormatStringHasSArg (const StringLiteral *FExpr)
 
void CheckFloatComparison (SourceLocation Loc, Expr *LHS, Expr *RHS, BinaryOperatorKind Opcode)
 Check for comparisons of floating-point values using == and !=.
 
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.
 
void DiagnoseMisalignedMembers ()
 Diagnoses the current set of gathered accesses.
 
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.
 
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.
 
ExprResult BuildAtomicExpr (SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder=AtomicArgumentOrder::API)
 
bool hasCStrMethod (const Expr *E)
 Check to see if a given expression could have '.c_str()' called on it.
 
void DiagnoseAlwaysNonNullPointer (Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range)
 Diagnose pointers that are always non-null.
 
bool CheckParmsForFunctionDef (ArrayRef< ParmVarDecl * > Parameters, bool CheckParameterNames)
 CheckParmsForFunctionDef - Check that the parameters of the given function are appropriate for the definition of a function.
 
void CheckCastAlign (Expr *Op, QualType T, SourceRange TRange)
 CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment requirements.
 
void checkRetainCycles (ObjCMessageExpr *msg)
 checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle.
 
void checkRetainCycles (Expr *receiver, Expr *argument)
 Check a property assign to see if it's likely to cause a retain cycle.
 
void checkRetainCycles (VarDecl *Var, Expr *Init)
 
bool checkUnsafeAssigns (SourceLocation Loc, QualType LHS, Expr *RHS)
 checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type.
 
void checkUnsafeExprAssigns (SourceLocation Loc, Expr *LHS, Expr *RHS)
 checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expression.
 
void DiagnoseEmptyStmtBody (SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID)
 Emit DiagID if statement located on StmtLoc has a suspicious null statement as a Body, and it is located on the same line.
 
void DiagnoseEmptyLoopBody (const Stmt *S, const Stmt *PossibleBody)
 Warn if a for/while loop statement S, which is followed by PossibleBody, has a suspicious null statement as a body.
 
void DiagnoseSelfMove (const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc)
 Warn if a value is moved to itself.
 
bool IsLayoutCompatible (QualType T1, QualType T2) const
 
bool CheckFunctionCall (FunctionDecl *FDecl, CallExpr *TheCall, const FunctionProtoType *Proto)
 CheckFunctionCall - Check a direct function call for various correctness and safety properties not strictly enforced by the C type system.
 
static bool getFormatStringInfo (const FormatAttr *Format, bool IsCXXMember, bool IsVariadic, FormatStringInfo *FSI)
 Given a FunctionDecl's FormatAttr, attempts to populate the FomatStringInfo parameter with the FormatAttr's correct format_idx and firstDataArg.
 
static FormatStringType GetFormatStringType (const FormatAttr *Format)
 
static bool GetFormatNSStringIdx (const FormatAttr *Format, unsigned &Idx)
 

Declarations

Implementations are in SemaDecl.cpp

enum  NameClassificationKind {
  NC_Unknown , NC_Error , NC_Keyword , NC_Type ,
  NC_NonType , NC_UndeclaredNonType , NC_DependentNonType , NC_OverloadSet ,
  NC_TypeTemplate , NC_VarTemplate , NC_FunctionTemplate , NC_UndeclaredTemplate ,
  NC_Concept
}
 Describes the result of the name lookup and resolution performed by ClassifyName(). More...
 
enum class  TemplateNameKindForDiagnostics {
  ClassTemplate , FunctionTemplate , VarTemplate , AliasTemplate ,
  TemplateTemplateParam , Concept , DependentTemplate
}
 Describes the detailed kind of a template name. Used in diagnostics. More...
 
enum  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 class  FnBodyKind { Other , Default , Delete }
 
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  OffsetOfKind { OOK_Outside , OOK_Builtin , OOK_Macro }
 
enum  AvailabilityMergeKind {
  AMK_None , AMK_Redeclaration , AMK_Override , AMK_ProtocolImplementation ,
  AMK_OptionalProtocolImplementation
}
 Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability"). More...
 
enum class  FunctionEmissionStatus {
  Emitted , CUDADiscarded , OMPDiscarded , TemplateDiscarded ,
  Unknown
}
 Status of the function emission on the CUDA/HIP/OpenMP host/device attrs. More...
 
typedef LazyVector< const DeclaratorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 > UnusedFileScopedDeclsType
 
typedef LazyVector< VarDecl *, ExternalSemaSource, &ExternalSemaSource::ReadTentativeDefinitions, 2, 2 > TentativeDefinitionsType
 
typedef void * SkippedDefinitionContext
 
typedef llvm::function_ref< void(SourceLocation Loc, PartialDiagnostic PD)> DiagReceiverTy
 
IdentifierResolver IdResolver
 
unsigned InventedParameterInfosStart = 0
 The index of the first InventedParameterInfo that refers to the current context.
 
llvm::SmallPtrSet< const NamedDecl *, 4 > TypoCorrectedFunctionDefinitions
 The function definitions which were renamed as part of typo-correction to match their respective declarations.
 
llvm::DenseMap< const EnumDecl *, llvm::APInt > FlagBitsCache
 A cache of the flags available in enumerations with the flag_bits attribute.
 
llvm::MapVector< IdentifierInfo *, llvm::SetVector< WeakInfo, llvm::SmallVector< WeakInfo, 1u >, llvm::SmallDenseSet< WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly > > > WeakUndeclaredIdentifiers
 WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared.
 
llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > ExtnameUndeclaredIdentifiers
 ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared.
 
llvm::SmallSetVector< const TypedefNameDecl *, 4 > UnusedLocalTypedefNameCandidates
 Set containing all typedefs that are likely unused.
 
UnusedFileScopedDeclsType UnusedFileScopedDecls
 The set of file scoped decls seen so far that have not been used and must warn if not used.
 
TentativeDefinitionsType TentativeDefinitions
 All the tentative definitions encountered in the TU.
 
SmallVector< VarDecl *, 4 > ExternalDeclarations
 All the external declarations encoutered and used in the TU.
 
DeclContextOriginalLexicalContext
 Generally null except when we temporarily switch decl contexts, like in.
 
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
 ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the initializer.
 
void DiagnoseInvalidJumps (Stmt *Body)
 
bool currentModuleIsHeaderUnit () const
 Is the module scope we are in a C++ Header Unit?
 
ModulegetOwningModule (const Decl *Entity)
 Get the module owning an entity.
 
DeclGroupPtrTy ConvertDeclToDeclGroup (Decl *Ptr, Decl *OwnedType=nullptr)
 
ParsedType getTypeName (const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS=nullptr, bool isClassName=false, bool HasTrailingDot=false, ParsedType ObjectType=nullptr, bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, bool IsClassTemplateDeductionContext=true, ImplicitTypenameContext AllowImplicitTypename=ImplicitTypenameContext::No, IdentifierInfo **CorrectedII=nullptr)
 If the identifier refers to a type name within this scope, return the declaration of that type.
 
TypeSpecifierType isTagName (IdentifierInfo &II, Scope *S)
 isTagName() - This method is called for error recovery purposes only to determine if the specified name is a valid tag name ("struct foo").
 
bool isMicrosoftMissingTypename (const CXXScopeSpec *SS, Scope *S)
 isMicrosoftMissingTypename - In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to the type of one of the base classes then downgrade the missing typename error to a warning.
 
void DiagnoseUnknownTypeName (IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName=false)
 
ParsedType ActOnMSVCUnknownTypeName (const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg)
 Attempt to behave like MSVC in situations where lookup of an unqualified type name has failed in a dependent context.
 
NameClassification ClassifyName (Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, CorrectionCandidateCallback *CCC=nullptr)
 Perform name lookup on the given name, classifying it based on the results of name lookup and the following token.
 
ExprResult ActOnNameClassifiedAsUndeclaredNonType (IdentifierInfo *Name, SourceLocation NameLoc)
 Act on the result of classifying a name as an undeclared (ADL-only) non-type declaration.
 
ExprResult ActOnNameClassifiedAsDependentNonType (const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, bool IsAddressOfOperand)
 Act on the result of classifying a name as an undeclared member of a dependent base class.
 
ExprResult ActOnNameClassifiedAsNonType (Scope *S, const CXXScopeSpec &SS, NamedDecl *Found, SourceLocation NameLoc, const Token &NextToken)
 Act on the result of classifying a name as a specific non-type declaration.
 
ExprResult ActOnNameClassifiedAsOverloadSet (Scope *S, Expr *OverloadSet)
 Act on the result of classifying a name as an overload set.
 
TemplateNameKindForDiagnostics getTemplateNameKindForDiagnostics (TemplateName Name)
 
bool mightBeIntendedToBeTemplateName (ExprResult E, bool &Dependent)
 Determine whether it's plausible that E was intended to be a template-name.
 
void warnOnReservedIdentifier (const NamedDecl *D)
 
DeclActOnDeclarator (Scope *S, Declarator &D)
 
NamedDeclHandleDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
 
bool tryToFixVariablyModifiedVarType (TypeSourceInfo *&TInfo, QualType &T, SourceLocation Loc, unsigned FailedFoldDiagID)
 Attempt to fold a variable-sized type to a constant-sized type, returning true if we were successful.
 
void RegisterLocallyScopedExternCDecl (NamedDecl *ND, Scope *S)
 Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarations.
 
bool DiagnoseClassNameShadow (DeclContext *DC, DeclarationNameInfo Info)
 DiagnoseClassNameShadow - Implement C++ [class.mem]p13: If T is the name of a class, then each of the following shall have a name different from T:
 
bool diagnoseQualifiedDeclaration (CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc, TemplateIdAnnotation *TemplateId, bool IsMemberSpecialization)
 Diagnose a declaration whose declarator-id has the given nested-name-specifier.
 
bool checkConstantPointerAuthKey (Expr *keyExpr, unsigned &key)
 
void DiagnoseFunctionSpecifiers (const DeclSpec &DS)
 Diagnose function specifiers on a declaration of an identifier that does not identify a function.
 
NamedDeclgetShadowedDeclaration (const TypedefNameDecl *D, const LookupResult &R)
 Return the declaration shadowed by the given typedef D, or null if it doesn't shadow any declaration or shadowing warnings are disabled.
 
NamedDeclgetShadowedDeclaration (const VarDecl *D, const LookupResult &R)
 Return the declaration shadowed by the given variable D, or null if it doesn't shadow any declaration or shadowing warnings are disabled.
 
NamedDeclgetShadowedDeclaration (const BindingDecl *D, const LookupResult &R)
 Return the declaration shadowed by the given variable D, or null if it doesn't shadow any declaration or shadowing warnings are disabled.
 
void CheckShadow (NamedDecl *D, NamedDecl *ShadowedDecl, const LookupResult &R)
 Diagnose variable or built-in function shadowing.
 
void CheckShadow (Scope *S, VarDecl *D)
 Check -Wshadow without the advantage of a previous lookup.
 
void CheckShadowingDeclModification (Expr *E, SourceLocation Loc)
 Warn if 'E', which is an expression that is about to be modified, refers to a shadowing declaration.
 
void DiagnoseShadowingLambdaDecls (const sema::LambdaScopeInfo *LSI)
 Diagnose shadowing for variables shadowed in the lambda record LambdaRD when these variables are captured by the lambda.
 
void handleTagNumbering (const TagDecl *Tag, Scope *TagScope)
 
void setTagNameForLinkagePurposes (TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD)
 
void CheckTypedefForVariablyModifiedType (Scope *S, TypedefNameDecl *D)
 
NamedDeclActOnTypedefDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous)
 
NamedDeclActOnTypedefNameDecl (Scope *S, DeclContext *DC, TypedefNameDecl *D, LookupResult &Previous, bool &Redeclaration)
 ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name, either using the 'typedef' type specifier or via a C++0x [dcl.typedef]p2 alias-declaration: 'using T = A;'.
 
NamedDeclActOnVariableDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef< BindingDecl * > Bindings=std::nullopt)
 
bool CheckVariableDeclaration (VarDecl *NewVD, LookupResult &Previous)
 Perform semantic checking on a newly-created variable declaration.
 
void CheckVariableDeclarationType (VarDecl *NewVD)
 
void CheckCompleteVariableDeclaration (VarDecl *VD)
 
NamedDeclActOnFunctionDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope)
 
bool AddOverriddenMethods (CXXRecordDecl *DC, CXXMethodDecl *MD)
 AddOverriddenMethods - See if a method overrides any in the base classes, and if so, check that it's a valid override and remember it.
 
bool CheckFunctionDeclaration (Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization, bool DeclIsDefn)
 Perform semantic checking of a new function declaration.
 
bool shouldLinkDependentDeclWithPrevious (Decl *D, Decl *OldDecl)
 Checks if the new declaration declared in dependent context must be put in the same redeclaration chain as the specified declaration.
 
bool canFullyTypeCheckRedeclaration (ValueDecl *NewD, ValueDecl *OldD, QualType NewT, QualType OldT)
 Determines if we can perform a correct type check for D as a redeclaration of PrevDecl.
 
void CheckMain (FunctionDecl *FD, const DeclSpec &D)
 
void CheckMSVCRTEntryPoint (FunctionDecl *FD)
 
void ActOnHLSLTopLevelFunction (FunctionDecl *FD)
 
void CheckHLSLEntryPoint (FunctionDecl *FD)
 
void CheckHLSLSemanticAnnotation (FunctionDecl *EntryPoint, const Decl *Param, const HLSLAnnotationAttr *AnnotationAttr)
 
void DiagnoseHLSLAttrStageMismatch (const Attr *A, HLSLShaderAttr::ShaderType Stage, std::initializer_list< HLSLShaderAttr::ShaderType > AllowedStages)
 
AttrgetImplicitCodeSegOrSectionAttrForFunction (const FunctionDecl *FD, bool IsDefinition)
 Returns an implicit CodeSegAttr if a __declspec(code_seg) is found on a containing class.
 
void CheckFunctionOrTemplateParamDeclarator (Scope *S, Declarator &D)
 Common checks for a parameter-declaration that should apply to both function parameters and non-type template parameters.
 
DeclActOnParamDeclarator (Scope *S, Declarator &D, SourceLocation ExplicitThisLoc={})
 ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into function prototype scope.
 
ParmVarDeclBuildParmVarDeclForTypedef (DeclContext *DC, SourceLocation Loc, QualType T)
 Synthesizes a variable for a parameter arising from a typedef.
 
QualType AdjustParameterTypeForObjCAutoRefCount (QualType T, SourceLocation NameLoc, TypeSourceInfo *TSInfo)
 
ParmVarDeclCheckParameter (DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC)
 
void checkNonTrivialCUnionInInitializer (const Expr *Init, SourceLocation Loc)
 Emit diagnostics if the initializer or any of its explicit or implicitly-generated subexpressions require copying or default-initializing a type that is or contains a C union type that is non-trivial to copy or default-initialize.
 
void checkNonTrivialCUnion (QualType QT, SourceLocation Loc, NonTrivialCUnionContext UseContext, unsigned NonTrivialKind)
 Emit diagnostics if a non-trivial C union type or a struct that contains a non-trivial C union is used in an invalid context.
 
void AddInitializerToDecl (Decl *dcl, Expr *init, bool DirectInit)
 AddInitializerToDecl - Adds the initializer Init to the declaration dcl.
 
void ActOnUninitializedDecl (Decl *dcl)
 
void ActOnInitializerError (Decl *Dcl)
 ActOnInitializerError - Given that there was an error parsing an initializer for the given declaration, try to at least re-establish invariants such as whether a variable's type is either dependent or complete.
 
void ActOnCXXForRangeDecl (Decl *D)
 
StmtResult ActOnCXXForRangeIdentifier (Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs)
 
void CheckStaticLocalForDllExport (VarDecl *VD)
 Check if VD needs to be dllexport/dllimport due to being in a dllexport/import function.
 
void CheckThreadLocalForLargeAlignment (VarDecl *VD)
 
void FinalizeDeclaration (Decl *D)
 FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions necessary after any initializer has been attached.
 
DeclGroupPtrTy FinalizeDeclaratorGroup (Scope *S, const DeclSpec &DS, ArrayRef< Decl * > Group)
 
DeclGroupPtrTy BuildDeclaratorGroup (MutableArrayRef< Decl * > Group)
 BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necessary semantic checking.
 
void ActOnDocumentableDecl (Decl *D)
 Should be called on all declarations that might have attached documentation comments.
 
void ActOnDocumentableDecls (ArrayRef< Decl * > Group)
 
void ActOnFinishKNRParamDeclarations (Scope *S, Declarator &D, SourceLocation LocAfterDecls)
 
void CheckForFunctionRedefinition (FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr, SkipBodyInfo *SkipBody=nullptr)
 
DeclActOnStartOfFunctionDef (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists, SkipBodyInfo *SkipBody=nullptr, FnBodyKind BodyKind=FnBodyKind::Other)
 
DeclActOnStartOfFunctionDef (Scope *S, Decl *D, SkipBodyInfo *SkipBody=nullptr, FnBodyKind BodyKind=FnBodyKind::Other)
 
bool canDelayFunctionBody (const Declarator &D)
 Determine whether we can delay parsing the body of a function or function template until it is used, assuming we don't care about emitting code for that function.
 
bool canSkipFunctionBody (Decl *D)
 Determine whether we can skip parsing the body of a function definition, assuming we don't care about analyzing its body or emitting code for that function.
 
void computeNRVO (Stmt *Body, sema::FunctionScopeInfo *Scope)
 Given the set of return statements within a function body, compute the variables that are subject to the named return value optimization.
 
DeclActOnFinishFunctionBody (Decl *Decl, Stmt *Body)
 
DeclActOnFinishFunctionBody (Decl *Decl, Stmt *Body, bool IsInstantiation)
 
DeclActOnSkippedFunctionBody (Decl *Decl)
 
void ActOnFinishInlineFunctionDef (FunctionDecl *D)
 
void ActOnFinishDelayedAttribute (Scope *S, Decl *D, ParsedAttributes &Attrs)
 ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is delayed.
 
void DiagnoseUnusedParameters (ArrayRef< ParmVarDecl * > Parameters)
 Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
 
void DiagnoseSizeOfParametersAndReturnValue (ArrayRef< ParmVarDecl * > Parameters, QualType ReturnTy, NamedDecl *D)
 Diagnose whether the size of parameters or return value of a function or obj-c method definition is pass-by-value and larger than a specified threshold.
 
DeclActOnFileScopeAsmDecl (Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc)
 
TopLevelStmtDeclActOnStartTopLevelStmtDecl (Scope *S)
 
void ActOnFinishTopLevelStmtDecl (TopLevelStmtDecl *D, Stmt *Statement)
 
void ActOnPopScope (SourceLocation Loc, Scope *S)
 
DeclParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, RecordDecl *&AnonRecord)
 ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.
 
DeclParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord)
 ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.
 
DeclBuildAnonymousStructOrUnion (Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy)
 BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union.
 
void ActOnDefinedDeclarationSpecifier (Decl *D)
 Called once it is known whether a tag declaration is an anonymous union or struct.
 
void DiagPlaceholderFieldDeclDefinitions (RecordDecl *Record)
 Emit diagnostic warnings for placeholder members.
 
DeclBuildMicrosoftCAnonymousStruct (Scope *S, DeclSpec &DS, RecordDecl *Record)
 BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure.
 
NonTagKind getNonTagTypeDeclKind (const Decl *D, TagTypeKind TTK)
 Given a non-tag type declaration, returns an enum useful for indicating what kind of non-tag type this is.
 
bool isAcceptableTagRedeclaration (const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name)
 Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declaration.
 
DeclResult ActOnTag (Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody=nullptr)
 This is invoked when we see 'struct foo' or 'struct {'.
 
DeclActOnField (Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth)
 ActOnField - Each field of a C struct/union is passed into this in order to create a FieldDecl object for it.
 
FieldDeclHandleField (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS)
 HandleField - Analyze a field of a C struct or a C++ data member.
 
FieldDeclCheckFieldDecl (DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=nullptr)
 Build a new FieldDecl and check its well-formedness.
 
bool CheckNontrivialField (FieldDecl *FD)
 
void ActOnLastBitfield (SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls)
 ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions.
 
DeclActOnIvar (Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitWidth, tok::ObjCKeywordKind visibility)
 ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDecl object for it.
 
void ActOnFields (Scope *S, SourceLocation RecLoc, Decl *TagDecl, ArrayRef< Decl * > Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &AttrList)
 
void ActOnTagStartDefinition (Scope *S, Decl *TagDecl)
 ActOnTagStartDefinition - Invoked when we have entered the scope of a tag's definition (e.g., for an enumeration, class, struct, or union).
 
bool ActOnDuplicateDefinition (Decl *Prev, SkipBodyInfo &SkipBody)
 Perform ODR-like check for C/ObjC when merging tag types from modules.
 
SkippedDefinitionContext ActOnTagStartSkippedDefinition (Scope *S, Decl *TD)
 Invoked when we enter a tag definition that we're skipping.
 
void ActOnObjCContainerStartDefinition (ObjCContainerDecl *IDecl)
 
void ActOnStartCXXMemberDeclarations (Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, bool IsAbstract, SourceLocation LBraceLoc)
 ActOnStartCXXMemberDeclarations - Invoked when we have parsed a C++ record definition's base-specifiers clause and are starting its member declarations.
 
void ActOnTagFinishDefinition (Scope *S, Decl *TagDecl, SourceRange BraceRange)
 ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration, class, struct, or union).
 
void ActOnTagFinishSkippedDefinition (SkippedDefinitionContext Context)
 
void ActOnObjCContainerFinishDefinition ()
 
void ActOnObjCTemporaryExitContainerContext (ObjCContainerDecl *ObjCCtx)
 Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constructs.
 
void ActOnObjCReenterContainerContext (ObjCContainerDecl *ObjCCtx)
 
void ActOnTagDefinitionError (Scope *S, Decl *TagDecl)
 ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a tag.
 
EnumConstantDeclCheckEnumConstant (EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *val)
 
bool CheckEnumUnderlyingType (TypeSourceInfo *TI)
 Check that this is a valid underlying type for an enum declaration.
 
bool CheckEnumRedeclaration (SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, bool IsFixed, const EnumDecl *Prev)
 Check whether this is a valid redeclaration of a previous enumeration.
 
SkipBodyInfo shouldSkipAnonEnumBody (Scope *S, IdentifierInfo *II, SourceLocation IILoc)
 Determine whether the body of an anonymous enumeration should be skipped.
 
DeclActOnEnumConstant (Scope *S, Decl *EnumDecl, Decl *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val)
 
void ActOnEnumBody (SourceLocation EnumLoc, SourceRange BraceRange, Decl *EnumDecl, ArrayRef< Decl * > Elements, Scope *S, const ParsedAttributesView &Attr)
 
void PushDeclContext (Scope *S, DeclContext *DC)
 Set the current declaration context until it gets popped.
 
void PopDeclContext ()
 
void EnterDeclaratorContext (Scope *S, DeclContext *DC)
 EnterDeclaratorContext - Used when we must lookup names in the context of a declarator's nested name specifier.
 
void ExitDeclaratorContext (Scope *S)
 
void EnterTemplatedContext (Scope *S, DeclContext *DC)
 Enter a template parameter scope, after it's been associated with a particular DeclContext.
 
void ActOnReenterFunctionContext (Scope *S, Decl *D)
 Push the parameters of D, which must be a function, into scope.
 
void ActOnExitFunctionContext ()
 
void PushOnScopeChains (NamedDecl *D, Scope *S, bool AddToContext=true)
 Add this decl to the scope shadowed decl chains.
 
bool isDeclInScope (NamedDecl *D, DeclContext *Ctx, Scope *S=nullptr, bool AllowInlineNamespace=false) const
 isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns true if 'D' belongs to the given declaration context.
 
TypedefDeclParseTypedefDecl (Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo)
 Subroutines of ActOnDeclarator().
 
bool isIncompatibleTypedef (TypeDecl *Old, TypedefNameDecl *New)
 
void mergeDeclAttributes (NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration)
 mergeDeclAttributes - Copy attributes from the Old decl to the New one.
 
void MergeTypedefNameDecl (Scope *S, TypedefNameDecl *New, LookupResult &OldDecls)
 MergeTypedefNameDecl - We just parsed a typedef 'New' which has the same name and scope as a previous declaration 'Old'.
 
bool MergeFunctionDecl (FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn)
 MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and scope as a previous declaration 'Old'.
 
bool MergeCompatibleFunctionDecls (FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld)
 Completes the merge of two function declarations that are known to be compatible.
 
void mergeObjCMethodDecls (ObjCMethodDecl *New, ObjCMethodDecl *Old)
 
void MergeVarDecl (VarDecl *New, LookupResult &Previous)
 MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'.
 
void MergeVarDeclTypes (VarDecl *New, VarDecl *Old, bool MergeTypeWithOld)
 MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'.
 
bool checkVarDeclRedefinition (VarDecl *OldDefn, VarDecl *NewDefn)
 We've just determined that Old and New both appear to be definitions of the same variable.
 
void notePreviousDefinition (const NamedDecl *Old, SourceLocation New)
 
void FilterLookupForScope (LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace)
 Filters out lookup results that don't fall within the given scope as determined by isDeclInScope.
 
bool CheckRedeclarationModuleOwnership (NamedDecl *New, NamedDecl *Old)
 We've determined that New is a redeclaration of Old.
 
bool CheckRedeclarationExported (NamedDecl *New, NamedDecl *Old)
 
bool CheckRedeclarationInModule (NamedDecl *New, NamedDecl *Old)
 
bool IsRedefinitionInModule (const NamedDecl *New, const NamedDecl *Old) const
 
bool ShouldWarnIfUnusedFileScopedDecl (const DeclaratorDecl *D) const
 
void MarkUnusedFileScopedDecl (const DeclaratorDecl *D)
 If it's a file scoped decl that must warn if not used, keep track of it.
 
void DiagnoseUnusedNestedTypedefs (const RecordDecl *D)
 
void DiagnoseUnusedNestedTypedefs (const RecordDecl *D, DiagReceiverTy DiagReceiver)
 
void DiagnoseUnusedDecl (const NamedDecl *ND)
 
void DiagnoseUnusedDecl (const NamedDecl *ND, DiagReceiverTy DiagReceiver)
 DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused).
 
void DiagnoseUnusedButSetDecl (const VarDecl *VD, DiagReceiverTy DiagReceiver)
 If VD is set but not otherwise used, diagnose, for a parameter or a variable.
 
ObjCInterfaceDeclgetObjCInterfaceDecl (IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false)
 Look for an Objective-C class in the translation unit.
 
ScopegetNonFieldDeclScope (Scope *S)
 getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared.
 
FunctionDeclCreateBuiltin (IdentifierInfo *II, QualType Type, unsigned ID, SourceLocation Loc)
 
NamedDeclLazilyCreateBuiltin (IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc)
 LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope.
 
const AttributedTypegetCallingConvAttributedType (QualType T) const
 Get the outermost AttributedType node that sets a calling convention.
 
DeclarationNameInfo GetNameForDeclarator (Declarator &D)
 GetNameForDeclarator - Determine the full declaration name for the given Declarator.
 
DeclarationNameInfo GetNameFromUnqualifiedId (const UnqualifiedId &Name)
 Retrieves the declaration name from a parsed unqualified-id.
 
NamedDeclfindLocallyScopedExternCDecl (DeclarationName Name)
 Look for a locally scoped extern "C" declaration by the given name.
 
bool inferObjCARCLifetime (ValueDecl *decl)
 
void deduceOpenCLAddressSpace (ValueDecl *decl)
 
void MarkTypoCorrectedFunctionDefinition (const NamedDecl *F)
 
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.
 
bool CheckForConstantInitializer (Expr *e, QualType t)
 type checking declaration initializers (C99 6.7.8)
 
QualType deduceVarTypeFromInitializer (VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init)
 
bool DeduceVariableDeclarationType (VarDecl *VDecl, bool DirectInit, Expr *Init)
 
sema::LambdaScopeInfoRebuildLambdaScopeInfo (CXXMethodDecl *CallOperator)
 
void ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, SmallVectorImpl< FunctionDecl * > &Bases)
 The declarator D defines a function in the scope S which is nested in an omp begin/end declare variant scope.
 
NamedDeclImplicitlyDefineFunction (SourceLocation Loc, IdentifierInfo &II, Scope *S)
 ImplicitlyDefineFunction - An undeclared identifier was used in a function call, forming a call to an implicitly defined function (per C99 6.5.1p2).
 
void AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction (FunctionDecl *FD)
 If this function is a C++ replaceable global allocation function (C++2a [basic.stc.dynamic.allocation], C++2a [new.delete]), adds any function attributes that we know a priori based on the standard.
 
void AddKnownFunctionAttributes (FunctionDecl *FD)
 Adds any function attributes that we know a priori based on the declaration of this function.
 
ExprResult VerifyBitField (SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth)
 VerifyBitField - verifies that a bit field expression is an ICE and has the correct width, and that the field type is valid.
 
bool IsValueInFlagEnum (const EnumDecl *ED, const llvm::APInt &Val, bool AllowMask) const
 IsValueInFlagEnum - Determine if a value is allowed as part of a flag enum.
 
void ActOnPragmaWeakID (IdentifierInfo *WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc)
 ActOnPragmaWeakID - Called on well formed #pragma weak ident.
 
void ActOnPragmaRedefineExtname (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
 ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname.
 
void ActOnPragmaWeakAlias (IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
 ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
 
ObjCContainerDeclgetObjCDeclContext () const
 
FunctionEmissionStatus getEmissionStatus (const FunctionDecl *Decl, bool Final=false)
 
bool shouldIgnoreInHostDeviceCheck (FunctionDecl *Callee)
 
static ScopegetScopeForDeclContext (Scope *S, DeclContext *DC)
 Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope.
 
static bool adjustContextForLocalExternDecl (DeclContext *&DC)
 Adjust the DeclContext for a function or variable that might be a function-local external declaration.
 
static bool CanBeGetReturnObject (const FunctionDecl *FD)
 
static bool CanBeGetReturnTypeOnAllocFailure (const FunctionDecl *FD)
 

Declaration Attribute Handling

Implementations are in SemaDeclAttr.cpp

enum  AvailabilityPriority : int { AP_Explicit = 0 , AP_PragmaClangAttribute = 1 , AP_InferredFromOtherPlatform = 2 }
 Describes the kind of priority given to an availability attribute. More...
 
enum class  CallingConventionIgnoredReason { ForThisTarget = 0 , VariadicFunction , ConstructorDestructor , BuiltinFunction }
 Describes the reason a calling convention specification was ignored, used for diagnostics. More...
 
enum  CUDAFunctionTarget {
  CFT_Device , CFT_Global , CFT_Host , CFT_HostDevice ,
  CFT_InvalidTarget
}
 
enum class  RetainOwnershipKind { NS , CF , OS }
 
typedef LazyVector< TypedefNameDecl *, ExternalSemaSource, &ExternalSemaSource::ReadExtVectorDecls, 2, 2 > ExtVectorDeclsType
 
SmallVector< Decl *, 2 > WeakTopLevelDecl
 WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing of other Decls.
 
ExtVectorDeclsType ExtVectorDecls
 ExtVectorDecls - This is a list all the extended vector types.
 
SmallVectorImpl< Decl * > & WeakTopLevelDecls ()
 WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
 
bool checkStringLiteralArgumentAttr (const AttributeCommonInfo &CI, const Expr *E, StringRef &Str, SourceLocation *ArgLocation=nullptr)
 Check if the argument E is a ASCII string literal.
 
bool checkStringLiteralArgumentAttr (const ParsedAttr &Attr, unsigned ArgNum, StringRef &Str, SourceLocation *ArgLocation=nullptr)
 Check if the argument ArgNum of Attr is a ASCII string literal.
 
bool isValidPointerAttrType (QualType T, bool RefOkay=false)
 Determine if type T is a valid subject for a nonnull and similar attributes.
 
void AddAssumeAlignedAttr (Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE)
 AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration.
 
void AddAllocAlignAttr (Decl *D, const AttributeCommonInfo &CI, Expr *ParamExpr)
 AddAllocAlignAttr - Adds an alloc_align attribute to a particular declaration.
 
bool CheckAttrTarget (const ParsedAttr &CurrAttr)
 
bool CheckAttrNoArgs (const ParsedAttr &CurrAttr)
 
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)
 
TypeVisibilityAttr * mergeTypeVisibilityAttr (Decl *D, const AttributeCommonInfo &CI, TypeVisibilityAttr::VisibilityType Vis)
 
VisibilityAttr * mergeVisibilityAttr (Decl *D, const AttributeCommonInfo &CI, VisibilityAttr::VisibilityType Vis)
 
SectionAttr * mergeSectionAttr (Decl *D, const AttributeCommonInfo &CI, StringRef Name)
 
llvm::Error isValidSectionSpecifier (StringRef Str)
 Used to implement to perform semantic checking on attribute((section("foo"))) specifiers.
 
bool checkSectionName (SourceLocation LiteralLoc, StringRef Str)
 
CodeSegAttr * mergeCodeSegAttr (Decl *D, const AttributeCommonInfo &CI, StringRef Name)
 
bool checkTargetAttr (SourceLocation LiteralLoc, StringRef Str)
 
bool checkTargetVersionAttr (SourceLocation LiteralLoc, Decl *D, StringRef &Str, bool &isDefault)
 
bool checkTargetClonesAttrString (SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, Decl *D, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl< SmallString< 64 > > &StringsBuffer)
 
ErrorAttr * mergeErrorAttr (Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic)
 
FormatAttr * mergeFormatAttr (Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Format, int FormatIdx, int FirstArg)
 
void AddAlignedAttr (Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion)
 AddAlignedAttr - Adds an aligned attribute to a particular declaration.
 
void AddAlignedAttr (Decl *D, const AttributeCommonInfo &CI, TypeSourceInfo *T, bool IsPackExpansion)
 
void AddAlignValueAttr (Decl *D, const AttributeCommonInfo &CI, Expr *E)
 AddAlignValueAttr - Adds an align_value attribute to a particular declaration.
 
void AddAnnotationAttr (Decl *D, const AttributeCommonInfo &CI, StringRef Annot, MutableArrayRef< Expr * > Args)
 AddAnnotationAttr - Adds an annotation Annot with Args arguments to D.
 
bool checkMSInheritanceAttrOnDefinition (CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel SemanticSpelling)
 
void CheckAlignasUnderalignment (Decl *D)
 
void AddModeAttr (Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name, bool InInstantiation=false)
 AddModeAttr - Adds a mode attribute to a particular declaration.
 
AlwaysInlineAttr * mergeAlwaysInlineAttr (Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Ident)
 
MinSizeAttr * mergeMinSizeAttr (Decl *D, const AttributeCommonInfo &CI)
 
SwiftNameAttr * mergeSwiftNameAttr (Decl *D, const SwiftNameAttr &SNA, StringRef Name)
 
OptimizeNoneAttr * mergeOptimizeNoneAttr (Decl *D, const AttributeCommonInfo &CI)
 
InternalLinkageAttr * mergeInternalLinkageAttr (Decl *D, const ParsedAttr &AL)
 
InternalLinkageAttr * mergeInternalLinkageAttr (Decl *D, const InternalLinkageAttr &AL)
 
bool CheckCallingConvAttr (const ParsedAttr &attr, CallingConv &CC, const FunctionDecl *FD=nullptr, CUDAFunctionTarget CFT=CFT_InvalidTarget)
 Check validaty of calling convention attribute attr.
 
void AddParameterABIAttr (Decl *D, const AttributeCommonInfo &CI, ParameterABI ABI)
 
bool CheckRegparmAttr (const ParsedAttr &attr, unsigned &value)
 Checks a regparm attribute, returning true if it is ill-formed and otherwise setting numParams to the appropriate value.
 
CUDALaunchBoundsAttr * CreateLaunchBoundsAttr (const AttributeCommonInfo &CI, Expr *MaxThreads, Expr *MinBlocks, Expr *MaxBlocks)
 Create an CUDALaunchBoundsAttr attribute.
 
void AddLaunchBoundsAttr (Decl *D, const AttributeCommonInfo &CI, Expr *MaxThreads, Expr *MinBlocks, Expr *MaxBlocks)
 AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration.
 
void AddXConsumedAttr (Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation)
 
bool checkNSReturnsRetainedReturnType (SourceLocation loc, QualType type)
 
bool DiagnoseSwiftName (Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync)
 Do a check to make sure Name looks like a legal argument for the swift_name attribute applied to decl D.
 
UuidAttr * mergeUuidAttr (Decl *D, const AttributeCommonInfo &CI, StringRef UuidAsWritten, MSGuidDecl *GuidDecl)
 
BTFDeclTagAttr * mergeBTFDeclTagAttr (Decl *D, const BTFDeclTagAttr &AL)
 
HLSLNumThreadsAttr * mergeHLSLNumThreadsAttr (Decl *D, const AttributeCommonInfo &AL, int X, int Y, int Z)
 
HLSLShaderAttr * mergeHLSLShaderAttr (Decl *D, const AttributeCommonInfo &AL, HLSLShaderAttr::ShaderType ShaderType)
 
HLSLParamModifierAttr * mergeHLSLParamModifierAttr (Decl *D, const AttributeCommonInfo &AL, HLSLParamModifierAttr::Spelling Spelling)
 
WebAssemblyImportNameAttr * mergeImportNameAttr (Decl *D, const WebAssemblyImportNameAttr &AL)
 
WebAssemblyImportModuleAttr * mergeImportModuleAttr (Decl *D, const WebAssemblyImportModuleAttr &AL)
 
AMDGPUFlatWorkGroupSizeAttr * CreateAMDGPUFlatWorkGroupSizeAttr (const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
 Create an AMDGPUWavesPerEUAttr attribute.
 
void addAMDGPUFlatWorkGroupSizeAttr (Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
 addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size attribute to a particular declaration.
 
AMDGPUWavesPerEUAttr * CreateAMDGPUWavesPerEUAttr (const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
 Create an AMDGPUWavesPerEUAttr attribute.
 
void addAMDGPUWavesPerEUAttr (Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
 addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a particular declaration.
 
AMDGPUMaxNumWorkGroupsAttr * CreateAMDGPUMaxNumWorkGroupsAttr (const AttributeCommonInfo &CI, Expr *XExpr, Expr *YExpr, Expr *ZExpr)
 Create an AMDGPUMaxNumWorkGroupsAttr attribute.
 
void addAMDGPUMaxNumWorkGroupsAttr (Decl *D, const AttributeCommonInfo &CI, Expr *XExpr, Expr *YExpr, Expr *ZExpr)
 addAMDGPUMaxNumWorkGroupsAttr - Adds an amdgpu_max_num_work_groups attribute to a particular declaration.
 
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)
 
bool CheckCountedByAttr (Scope *Scope, const FieldDecl *FD)
 
EnforceTCBAttr * mergeEnforceTCBAttr (Decl *D, const EnforceTCBAttr &AL)
 
EnforceTCBLeafAttr * mergeEnforceTCBLeafAttr (Decl *D, const EnforceTCBLeafAttr &AL)
 
void ProcessDeclAttributeDelayed (Decl *D, const ParsedAttributesView &AttrList)
 
void ProcessDeclAttributeList (Scope *S, Decl *D, const ParsedAttributesView &AttrList, const ProcessDeclAttributeOptions &Options=ProcessDeclAttributeOptions())
 ProcessDeclAttributeList - Apply all the decl attributes in the specified attribute list to the specified decl, ignoring any type attributes.
 
bool ProcessAccessDeclAttributeList (AccessSpecDecl *ASDecl, const ParsedAttributesView &AttrList)
 
void checkUnusedDeclAttributes (Declarator &D)
 checkUnusedDeclAttributes - Given a declarator which is not being used to build a declaration, complain about any decl attributes which might be lying around on it.
 
NamedDeclDeclClonePragmaWeak (NamedDecl *ND, const IdentifierInfo *II, SourceLocation Loc)
 DeclClonePragmaWeak - clone existing decl (maybe definition), #pragma weak needs a non-definition decl and source may not have one.
 
void DeclApplyPragmaWeak (Scope *S, NamedDecl *ND, const WeakInfo &W)
 DeclApplyPragmaWeak - A declaration (maybe definition) needs #pragma weak applied to it, possibly with an alias.
 
void ProcessPragmaWeak (Scope *S, Decl *D)
 
void ProcessDeclAttributes (Scope *S, Decl *D, const Declarator &PD)
 ProcessDeclAttributes - Given a declarator (PD) with attributes indicated in it, apply them to D.
 
void PopParsingDeclaration (ParsingDeclState state, Decl *decl)
 
void redelayDiagnostics (sema::DelayedDiagnosticPool &pool)
 Given a set of delayed diagnostics, re-emit them as if they had been delayed in the current context instead of in the given pool.
 

C++ Declarations

Implementations are in SemaDeclCXX.cpp

enum class  ComparisonCategoryUsage { OperatorInExpression , DefaultedOperator }
 
enum  CXXSpecialMember {
  CXXDefaultConstructor , CXXCopyConstructor , CXXMoveConstructor , CXXCopyAssignment ,
  CXXMoveAssignment , CXXDestructor , CXXInvalid
}
 Kinds of C++ special members. More...
 
enum class  DefaultedComparisonKind : unsigned char {
  None , Equal , ThreeWay , NotEqual ,
  Relational
}
 Kinds of defaulted comparison operator functions. More...
 
enum  AbstractDiagSelID {
  AbstractNone = -1 , AbstractReturnType , AbstractParamType , AbstractVariableType ,
  AbstractFieldType , AbstractIvarType , AbstractSynthesizedIvarType , AbstractArrayType
}
 
enum  TrivialABIHandling { TAH_IgnoreTrivialABI , TAH_ConsiderTrivialABI }
 
enum class  CheckConstexprKind { Diagnose , CheckValid }
 
typedef std::pair< CXXRecordDecl *, SourceLocationVTableUse
 The list of classes whose vtables have been used within this translation unit, and the source locations at which the first use occurred.
 
typedef llvm::SmallSetVector< const NamedDecl *, 16 > NamedDeclSetType
 
typedef llvm::SmallPtrSet< const CXXRecordDecl *, 8 > RecordDeclSetTy
 
typedef LazyVector< CXXConstructorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadDelegatingConstructors, 2, 2 > DelegatingCtorDeclsType
 
typedef llvm::PointerIntPair< CXXRecordDecl *, 3, CXXSpecialMemberSpecialMemberDecl
 
typedef ProcessingContextState ParsingClassState
 
SmallVector< VTableUse, 16 > VTableUses
 The list of vtables that are required but have not yet been materialized.
 
llvm::DenseMap< CXXRecordDecl *, boolVTablesUsed
 The set of classes whose vtables have been used within this translation unit, and a bit that will be true if the vtable is required to be emitted (otherwise, it should be emitted only if needed by code generation).
 
SmallVector< CXXRecordDecl *, 4 > DelayedDllExportClasses
 
SmallVector< CXXMethodDecl *, 4 > DelayedDllExportMemberFunctions
 
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.
 
std::unique_ptr< CXXFieldCollectorFieldCollector
 FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
 
NamedDeclSetType UnusedPrivateFields
 Set containing all declared private fields that are not used.
 
std::unique_ptr< RecordDeclSetTyPureVirtualClassDiagSet
 PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual functions.
 
DelegatingCtorDeclsType DelegatingCtorDecls
 All the delegating constructors seen so far in the file, used for cycle detection at the end of the TU.
 
LazyDeclPtr StdNamespace
 The C++ "std" namespace, where the standard library resides.
 
ClassTemplateDeclStdInitializerList
 The C++ "std::initializer_list" template, which is defined in <initializer_list>.
 
llvm::DenseMap< ParmVarDecl *, SourceLocationUnparsedDefaultArgLocs
 
llvm::MapVector< NamedDecl *, SourceLocationUndefinedButUsed
 UndefinedInternals - all the used, undefined objects which require a definition in this translation unit.
 
llvm::SmallPtrSet< SpecialMemberDecl, 4 > SpecialMembersBeingDeclared
 The C++ special members which we are currently in the process of declaring.
 
void CheckDelegatingCtorCycles ()
 
void ActOnStartFunctionDeclarationDeclarator (Declarator &D, unsigned TemplateParameterDepth)
 Called before parsing a function declarator belonging to a function declaration.
 
void ActOnFinishFunctionDeclarationDeclarator (Declarator &D)
 Called after parsing a function declarator belonging to a function declaration.
 
DeclActOnStartNamespaceDef (Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, const ParsedAttributesView &AttrList, UsingDirectiveDecl *&UsingDecl, bool IsNested)
 ActOnStartNamespaceDef - This is called at the start of a namespace definition.
 
void ActOnFinishNamespaceDef (Decl *Dcl, SourceLocation RBrace)
 ActOnFinishNamespaceDef - This callback is called after a namespace is exited.
 
NamespaceDeclgetStdNamespace () const
 
NamespaceDeclgetOrCreateStdNamespace ()
 Retrieve the special "std" namespace, which may require us to implicitly define the namespace.
 
CXXRecordDeclgetStdBadAlloc () const
 
EnumDeclgetStdAlignValT () const
 
ValueDecltryLookupUnambiguousFieldDecl (RecordDecl *ClassDecl, const IdentifierInfo *MemberOrBase)
 
QualType CheckComparisonCategoryType (ComparisonCategoryType Kind, SourceLocation Loc, ComparisonCategoryUsage Usage)
 Lookup the specified comparison category types in the standard library, an check the VarDecls possibly returned by the operator<=> builtins for that type.
 
bool isStdInitializerList (QualType Ty, QualType *Element)
 Tests whether Ty is an instance of std::initializer_list and, if it is and Element is not NULL, assigns the element type to Element.
 
QualType BuildStdInitializerList (QualType Element, SourceLocation Loc)
 Looks for the std::initializer_list template and instantiates it with Element, or emits an error if it's not found.
 
bool isInitListConstructor (const FunctionDecl *Ctor)
 Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2.
 
DeclActOnUsingDirective (Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList)
 
void PushUsingDirective (Scope *S, UsingDirectiveDecl *UDir)
 
DeclActOnNamespaceAliasDef (Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident)
 
void FilterUsingLookup (Scope *S, LookupResult &lookup)
 Remove decls we can't actually see from a lookup being used to declare shadow using decls.
 
void HideUsingShadowDecl (Scope *S, UsingShadowDecl *Shadow)
 Hides a using shadow declaration.
 
bool CheckUsingShadowDecl (BaseUsingDecl *BUD, NamedDecl *Target, const LookupResult &PreviousDecls, UsingShadowDecl *&PrevShadow)
 Determines whether to create a using shadow decl for a particular decl, given the set of decls existing prior to this using lookup.
 
UsingShadowDeclBuildUsingShadowDecl (Scope *S, BaseUsingDecl *BUD, NamedDecl *Target, UsingShadowDecl *PrevDecl)
 Builds a shadow declaration corresponding to a 'using' declaration.
 
bool CheckUsingDeclRedeclaration (SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Previous)
 Checks that the given using declaration is not an invalid redeclaration.
 
bool CheckUsingDeclQualifier (SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R=nullptr, const UsingDecl *UD=nullptr)
 Checks that the given nested-name qualifier used in a using decl in the current context is appropriately related to the current scope.
 
NamedDeclBuildUsingDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists)
 Builds a using declaration.
 
NamedDeclBuildUsingEnumDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation NameLoc, TypeSourceInfo *EnumType, EnumDecl *ED)
 
NamedDeclBuildUsingPackDecl (NamedDecl *InstantiatedFrom, ArrayRef< NamedDecl * > Expansions)
 
bool CheckInheritingConstructorUsingDecl (UsingDecl *UD)
 Additional checks for a using declaration referring to a constructor name.
 
CXXConstructorDeclfindInheritingConstructor (SourceLocation Loc, CXXConstructorDecl *BaseCtor, ConstructorUsingShadowDecl *DerivedShadow)
 Given a derived-class using shadow declaration for a constructor and the correspnding base class constructor, find or create the implicit synthesized derived class constructor to use for this initialization.
 
DeclActOnUsingDeclaration (Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList)
 
DeclActOnUsingEnumDeclaration (Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation IdentLoc, IdentifierInfo &II, CXXScopeSpec *SS=nullptr)
 
DeclActOnAliasDeclaration (Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec)
 
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, CXXConstructionKind ConstructKind, SourceRange ParenRange)
 BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.
 
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, CXXConstructionKind ConstructKind, SourceRange ParenRange)
 Build a CXXConstructExpr whose constructor has already been resolved if it denotes an inherited constructor.
 
ExprResult BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, CXXConstructionKind ConstructKind, SourceRange ParenRange)
 
ExprResult ConvertMemberDefaultInitExpression (FieldDecl *FD, Expr *InitExpr, SourceLocation InitLoc)
 
void FinalizeVarWithDestructor (VarDecl *VD, const RecordType *DeclInitType)
 FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable.
 
void EvaluateImplicitExceptionSpec (SourceLocation Loc, FunctionDecl *FD)
 Evaluate the implicit exception specification for a defaulted special member function.
 
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.
 
void actOnDelayedExceptionSpecification (Decl *Method, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr)
 Add an exception-specification to the given member function (or member function template).
 
bool ShouldDeleteSpecialMember (CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI=nullptr, bool Diagnose=false)
 Determine if a special member function should have a deleted definition when it is defaulted.
 
void DiagnoseDeletedDefaultedFunction (FunctionDecl *FD)
 Produce notes explaining why a defaulted function was defined as deleted.
 
CXXConstructorDeclDeclareImplicitDefaultConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit default constructor for the given class.
 
void DefineImplicitDefaultConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
 DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default constructor.
 
CXXDestructorDeclDeclareImplicitDestructor (CXXRecordDecl *ClassDecl)
 Declare the implicit destructor for the given class.
 
void DefineImplicitDestructor (SourceLocation CurrentLocation, CXXDestructorDecl *Destructor)
 DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default destructor.
 
void AdjustDestructorExceptionSpec (CXXDestructorDecl *Destructor)
 Build an exception spec for destructors that don't have one.
 
void DefineInheritingConstructor (SourceLocation UseLoc, CXXConstructorDecl *Constructor)
 Define the specified inheriting constructor.
 
CXXConstructorDeclDeclareImplicitCopyConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit copy constructor for the given class.
 
void DefineImplicitCopyConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
 DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy constructor.
 
CXXConstructorDeclDeclareImplicitMoveConstructor (CXXRecordDecl *ClassDecl)
 Declare the implicit move constructor for the given class.
 
void DefineImplicitMoveConstructor (SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
 DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move constructor.
 
CXXMethodDeclDeclareImplicitCopyAssignment (CXXRecordDecl *ClassDecl)
 Declare the implicit copy assignment operator for the given class.
 
void DefineImplicitCopyAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
 Defines an implicitly-declared copy assignment operator.
 
CXXMethodDeclDeclareImplicitMoveAssignment (CXXRecordDecl *ClassDecl)
 Declare the implicit move assignment operator for the given class.
 
void DefineImplicitMoveAssignment (SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
 Defines an implicitly-declared move assignment operator.
 
void CheckImplicitSpecialMemberDeclaration (Scope *S, FunctionDecl *FD)
 Check a completed declaration of an implicit special member.
 
bool isImplicitlyDeleted (FunctionDecl *FD)
 Determine whether the given function is an implicitly-deleted special member function.
 
bool checkThisInStaticMemberFunctionType (CXXMethodDecl *Method)
 Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-qualifier-seq would be.
 
bool checkThisInStaticMemberFunctionExceptionSpec (CXXMethodDecl *Method)
 Whether this' shows up in the exception specification of a static member function.
 
bool checkThisInStaticMemberFunctionAttributes (CXXMethodDecl *Method)
 Check whether 'this' shows up in the attributes of the given static member function.
 
bool CheckImmediateEscalatingFunctionDefinition (FunctionDecl *FD, const sema::FunctionScopeInfo *FSI)
 
void DiagnoseImmediateEscalatingReason (FunctionDecl *FD)
 
bool CompleteConstructorCall (CXXConstructorDecl *Constructor, QualType DeclInitType, 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.
 
void ActOnCXXEnterDeclInitializer (Scope *S, Decl *Dcl)
 ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration 'Dcl'.
 
void ActOnCXXExitDeclInitializer (Scope *S, Decl *Dcl)
 ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaration 'Dcl'.
 
void DefineImplicitLambdaToFunctionPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv)
 Define the "body" of the conversion from a lambda object to a function pointer.
 
void DefineImplicitLambdaToBlockPointerConversion (SourceLocation CurrentLoc, CXXConversionDecl *Conv)
 Define the "body" of the conversion from a lambda object to a block pointer.
 
DeclActOnStartLinkageSpecification (Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc)
 ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification, including the language and (if present) the '{'.
 
DeclActOnFinishLinkageSpecification (Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
 ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpec.
 
CXXRecordDeclgetCurrentClass (Scope *S, const CXXScopeSpec *SS)
 Get the class that is directly named by the current context.
 
bool isCurrentClassName (const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr)
 isCurrentClassName - Determine whether the identifier II is the name of the class type currently being defined.
 
bool isCurrentClassNameTypo (IdentifierInfo *&II, const CXXScopeSpec *SS)
 Determine whether the identifier II is a typo for the name of the class type currently being defined.
 
bool ActOnAccessSpecifier (AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, const ParsedAttributesView &Attrs)
 ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
 
NamedDeclActOnCXXMemberDeclarator (Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle)
 ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed.
 
void ActOnStartCXXInClassMemberInitializer ()
 Enter a new C++ default initializer scope.
 
void ActOnFinishCXXInClassMemberInitializer (Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
 This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template.
 
MemInitResult ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc)
 Handle a C++ member initializer using parentheses syntax.
 
MemInitResult ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *InitList, SourceLocation EllipsisLoc)
 Handle a C++ member initializer using braced-init-list syntax.
 
MemInitResult BuildMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc)
 Handle a C++ member initializer.
 
MemInitResult BuildMemberInitializer (ValueDecl *Member, Expr *Init, SourceLocation IdLoc)
 
MemInitResult BuildBaseInitializer (QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc)
 
MemInitResult BuildDelegatingInitializer (TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl)
 
bool SetDelegatingInitializer (CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer)
 
bool SetCtorInitializers (CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer * > Initializers=std::nullopt)
 
void SetIvarInitializers (ObjCImplementationDecl *ObjCImplementation)
 SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whose ivars need be initialized.
 
void MarkBaseAndMemberDestructorsReferenced (SourceLocation Loc, CXXRecordDecl *Record)
 MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of its members and bases as referenced.
 
void MarkVirtualBaseDestructorsReferenced (SourceLocation Location, CXXRecordDecl *ClassDecl, llvm::SmallPtrSetImpl< const RecordType * > *DirectVirtualBases=nullptr)
 Mark destructors of virtual bases of this class referenced.
 
void CheckCompleteDestructorVariant (SourceLocation CurrentLocation, CXXDestructorDecl *Dtor)
 Do semantic checks to allow the complete destructor variant to be emitted when the destructor is defined in another translation unit.
 
void LoadExternalVTableUses ()
 Load any externally-stored vtable uses.
 
void MarkVTableUsed (SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false)
 Note that the vtable for the given class was used at the given location.
 
void MarkVirtualMemberExceptionSpecsNeeded (SourceLocation Loc, const CXXRecordDecl *RD)
 Mark the exception specifications of all virtual member functions in the given class as needed.
 
void MarkVirtualMembersReferenced (SourceLocation Loc, const CXXRecordDecl *RD, bool ConstexprOnly=false)
 MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced.
 
bool DefineUsedVTables ()
 Define all of the vtables that have been used in this translation unit and reference any virtual members used by those vtables.
 
void AddImplicitlyDeclaredMembersToClass (CXXRecordDecl *ClassDecl)
 AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions, such as the default constructor, copy constructor, or destructor, to the given C++ class (C++ [special]p1).
 
void ActOnMemInitializers (Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer * > MemInits, bool AnyErrors)
 ActOnMemInitializers - Handle the member initializers for a constructor.
 
void checkClassLevelDLLAttribute (CXXRecordDecl *Class)
 Check class-level dllimport/dllexport attribute.
 
void 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.
 
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.
 
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.
 
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.
 
void ActOnFinishCXXNonNestedClass ()
 
void ActOnReenterCXXMethodParameter (Scope *S, ParmVarDecl *Param)
 This is used to implement the constant expression evaluation part of the attribute enable_if extension.
 
unsigned ActOnReenterTemplateScope (Decl *Template, llvm::function_ref< Scope *()> EnterScope)
 
void ActOnStartDelayedMemberDeclarations (Scope *S, Decl *Record)
 
void ActOnStartDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
 ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class, and we are now parsing those parts of the given Method declaration that could not be parsed earlier (C++ [class.mem]p2), such as default arguments.
 
void ActOnDelayedCXXMethodParameter (Scope *S, Decl *Param)
 ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration.
 
void ActOnFinishDelayedMemberDeclarations (Scope *S, Decl *Record)
 
void ActOnFinishDelayedCXXMethodDeclaration (Scope *S, Decl *Method)
 ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration for Method.
 
void ActOnFinishDelayedMemberInitializers (Decl *Record)
 
bool EvaluateStaticAssertMessageAsString (Expr *Message, std::string &Result, ASTContext &Ctx, bool ErrorOnInvalidMessage)
 
DeclActOnStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc)
 
DeclBuildStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc, bool Failed)
 
void DiagnoseStaticAssertDetails (const Expr *E)
 Try to print more useful information about a failed static_assert with expression \E.
 
DeclActOnFriendTypeDecl (Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
 Handle a friend type declaration.
 
NamedDeclActOnFriendFunctionDecl (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
 
QualType CheckConstructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
 CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructor declarator D with type R.
 
void CheckConstructor (CXXConstructorDecl *Constructor)
 CheckConstructor - Checks a fully-formed constructor for well-formedness, issuing any diagnostics required.
 
QualType CheckDestructorDeclarator (Declarator &D, QualType R, StorageClass &SC)
 CheckDestructorDeclarator - Called by ActOnDeclarator to check the well-formednes of the destructor declarator D with type R.
 
bool CheckDestructor (CXXDestructorDecl *Destructor)
 CheckDestructor - Checks a fully-formed destructor definition for well-formedness, issuing any diagnostics required.
 
void CheckConversionDeclarator (Declarator &D, QualType &R, StorageClass &SC)
 CheckConversionDeclarator - Called by ActOnDeclarator to check the well-formednes of the conversion function declarator D with type R.
 
DeclActOnConversionDeclarator (CXXConversionDecl *Conversion)
 ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ conversion function.
 
bool CheckDeductionGuideDeclarator (Declarator &D, QualType &R, StorageClass &SC)
 Check the validity of a declarator that we parsed for a deduction-guide.
 
void CheckExplicitlyDefaultedFunction (Scope *S, FunctionDecl *MD)
 
bool CheckExplicitlyDefaultedSpecialMember (CXXMethodDecl *MD, CXXSpecialMember CSM, SourceLocation DefaultLoc)
 
void CheckDelayedMemberExceptionSpecs ()
 
bool CheckExplicitlyDefaultedComparison (Scope *S, FunctionDecl *MD, DefaultedComparisonKind DCK)
 
void DeclareImplicitEqualityComparison (CXXRecordDecl *RD, FunctionDecl *Spaceship)
 
void DefineDefaultedComparison (SourceLocation Loc, FunctionDecl *FD, DefaultedComparisonKind DCK)
 
void CheckExplicitObjectMemberFunction (Declarator &D, DeclarationName Name, QualType R, bool IsLambda, DeclContext *DC=nullptr)
 
void CheckExplicitObjectMemberFunction (DeclContext *DC, Declarator &D, DeclarationName Name, QualType R)
 
void CheckExplicitObjectLambda (Declarator &D)
 
CXXBaseSpecifierCheckBaseSpecifier (CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
 ActOnBaseSpecifier - Parsed a base specifier.
 
BaseResult ActOnBaseSpecifier (Decl *classdecl, SourceRange SpecifierRange, const ParsedAttributesView &Attrs, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc)
 ActOnBaseSpecifier - Parsed a base specifier.
 
bool AttachBaseSpecifiers (CXXRecordDecl *Class, MutableArrayRef< CXXBaseSpecifier * > Bases)
 Performs the actual work of attaching the given base class specifiers to a C++ class.
 
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.
 
bool IsDerivedFrom (SourceLocation Loc, QualType Derived, QualType Base)
 Determine whether the type Derived is a C++ class that is derived from the type Base.
 
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.
 
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 AmbiguousBaseConvID, 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).
 
std::string getAmbiguousPathsDisplayString (CXXBasePaths &Paths)
 Builds a string representing ambiguous paths from a specific derived class to different subobjects of the same base class.
 
bool CheckOverridingFunctionAttributes (const CXXMethodDecl *New, const CXXMethodDecl *Old)
 
bool CheckOverridingFunctionReturnType (const CXXMethodDecl *New, const CXXMethodDecl *Old)
 CheckOverridingFunctionReturnType - Checks whether the return types are covariant, according to C++ [class.virtual]p5.
 
bool CheckExplicitObjectOverride (CXXMethodDecl *New, const CXXMethodDecl *Old)
 
bool CheckPureMethod (CXXMethodDecl *Method, SourceRange InitRange)
 Mark the given method pure.
 
void CheckOverrideControl (NamedDecl *D)
 CheckOverrideControl - Check C++11 override control semantics.
 
void DiagnoseAbsenceOfOverrideControl (NamedDecl *D, bool Inconsistent)
 DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of an overriding method.
 
bool CheckIfOverriddenFunctionIsMarkedFinal (const CXXMethodDecl *New, const CXXMethodDecl *Old)
 CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4.
 
bool 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.
 
bool CheckLiteralOperatorDeclaration (FunctionDecl *FnDecl)
 CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is well-formed.
 
ExplicitSpecifier ActOnExplicitBoolSpecifier (Expr *E)
 ActOnExplicitBoolSpecifier - Build an ExplicitSpecifier from an expression found in an explicit(bool) specifier.
 
bool tryResolveExplicitSpecifier (ExplicitSpecifier &ExplicitSpec)
 tryResolveExplicitSpecifier - Attempt to resolve the explict specifier.
 
DeclResult ActOnCXXConditionDeclaration (Scope *S, Declarator &D)
 ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statement.
 
void MergeVarDeclExceptionSpecs (VarDecl *New, VarDecl *Old)
 Merge the exception specifications of two variable declarations.
 
bool MergeCXXFunctionDecl (FunctionDecl *New, FunctionDecl *Old, Scope *S)
 MergeCXXFunctionDecl - Merge two declarations of the same C++ function, once we already know that they have the same type.
 
void CheckCXXDefaultArguments (FunctionDecl *FD)
 Helpers for dealing with blocks and functions.
 
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.
 
CXXSpecialMember getSpecialMember (const CXXMethodDecl *MD)
 
VarDeclBuildExceptionDeclaration (Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id)
 Perform semantic analysis for the variable declaration that occurs within a C++ catch clause, returning the newly-created variable.
 
DeclActOnExceptionDeclarator (Scope *S, Declarator &D)
 ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler.
 
void DiagnoseReturnInConstructorExceptionHandler (CXXTryStmt *TryBlock)
 
DeclResult ActOnTemplatedFriendTag (Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, MultiTemplateParamsArg TempParamLists)
 Handle a friend tag declaration where the scope specifier was templated.
 
MSPropertyDeclHandleMSProperty (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, const ParsedAttr &MSPropertyAttr)
 HandleMSProperty - Analyze a __delcspec(property) field of a C++ class.
 
void DiagnoseNontrivial (const CXXRecordDecl *Record, CXXSpecialMember CSM)
 Diagnose why the specified class does not have a trivial special member of the given kind.
 
bool SpecialMemberIsTrivial (CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH=TAH_IgnoreTrivialABI, bool Diagnose=false)
 Determine whether a defaulted or deleted special member function is trivial, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25, and C++11 [class.dtor]p5.
 
DefaultedFunctionKind getDefaultedFunctionKind (const FunctionDecl *FD)
 Determine the kind of defaulting that would be done for a given function.
 
DeclActOnEmptyDeclaration (Scope *S, const ParsedAttributesView &AttrList, SourceLocation SemiLoc)
 Handle a C++11 empty-declaration and attribute-declaration.
 
bool CheckConstexprFunctionDefinition (const FunctionDecl *FD, CheckConstexprKind Kind)
 
void DiagnoseHiddenVirtualMethods (CXXMethodDecl *MD)
 Diagnose methods which overload virtual methods in a base class without overriding any.
 
void FindHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
 Check if a method overloads virtual methods in a base class without overriding any.
 
void NoteHiddenVirtualMethods (CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
 
void ActOnParamDefaultArgument (Decl *param, SourceLocation EqualLoc, Expr *defarg)
 ActOnParamDefaultArgument - Check whether the default argument provided for a function parameter is well-formed.
 
void ActOnParamUnparsedDefaultArgument (Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc)
 ActOnParamUnparsedDefaultArgument - We've seen a default argument for a function parameter, but we can't parse it yet because we're inside a class definition.
 
void ActOnParamDefaultArgumentError (Decl *param, SourceLocation EqualLoc, Expr *DefaultArg)
 ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the parameter param failed.
 
ExprResult ConvertParamDefaultArgument (ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
 
void SetParamDefaultArgument (ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
 
void ActOnPureSpecifier (Decl *D, SourceLocation PureSpecLoc)
 
void SetDeclDeleted (Decl *dcl, SourceLocation DelLoc)
 
void SetDeclDefaulted (Decl *dcl, SourceLocation DefaultLoc)
 
void SetFunctionBodyKind (Decl *D, SourceLocation Loc, FnBodyKind BodyKind)
 
void ActOnStartTrailingRequiresClause (Scope *S, Declarator &D)
 
ExprResult ActOnFinishTrailingRequiresClause (ExprResult ConstraintExpr)
 
ExprResult ActOnRequiresClause (ExprResult ConstraintExpr)
 
NamedDeclActOnDecompositionDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists)
 
void DiagPlaceholderVariableDefinition (SourceLocation Loc)
 
bool DiagRedefinedPlaceholderFieldDecl (SourceLocation Loc, RecordDecl *ClassDecl, const IdentifierInfo *Name)
 
void CheckCompleteDecompositionDeclaration (DecompositionDecl *DD)
 
void NoteDeletedInheritingConstructor (CXXConstructorDecl *CD)
 
void ActOnDefaultCtorInitializers (Decl *CDtorDecl)
 
ParsingClassState PushParsingClass ()
 
void PopParsingClass (ParsingClassState state)
 

Expressions

Implementations are in SemaExpr.cpp

enum class  ExpressionEvaluationContext {
  Unevaluated , UnevaluatedList , DiscardedStatement , UnevaluatedAbstract ,
  ConstantEvaluated , ImmediateFunctionContext , PotentiallyEvaluated , PotentiallyEvaluatedIfUsed
}
 Describes how the expressions currently being parsed are evaluated at run-time, if at all. More...
 
enum  AssignmentAction {
  AA_Assigning , AA_Passing , AA_Returning , AA_Converting ,
  AA_Initializing , AA_Sending , AA_Casting , AA_Passing_CFAudited
}
 
enum  ReuseLambdaContextDecl_t { ReuseLambdaContextDecl }
 
enum  TryCaptureKind { TryCapture_Implicit , TryCapture_ExplicitByVal , TryCapture_ExplicitByRef }
 
enum  ObjCLiteralKind {
  LK_Array , LK_Dictionary , LK_Numeric , LK_Boxed ,
  LK_String , LK_Block , LK_None
}
 
enum  AllowFoldKind { NoFold , AllowFold }
 
enum class  ConditionKind { Boolean , ConstexprIf , Switch }
 
enum  ArithConvKind {
  ACK_Arithmetic , ACK_BitwiseOp , ACK_Comparison , ACK_Conditional ,
  ACK_CompAssign
}
 Context in which we're performing a usual arithmetic conversion. More...
 
enum  VarArgKind {
  VAK_Valid , VAK_ValidInCXX11 , VAK_Undefined , VAK_MSVCUndefined ,
  VAK_Invalid
}
 
enum  AssignConvertType {
  Compatible , PointerToInt , IntToPointer , FunctionVoidPointer ,
  IncompatiblePointer , IncompatibleFunctionPointer , IncompatibleFunctionPointerStrict , IncompatiblePointerSign ,
  CompatiblePointerDiscardsQualifiers , IncompatiblePointerDiscardsQualifiers , IncompatibleNestedPointerAddressSpaceMismatch , IncompatibleNestedPointerQualifiers ,
  IncompatibleVectors , IntToBlockPointer , IncompatibleBlockPointer , IncompatibleObjCQualifiedId ,
  IncompatibleObjCWeakRef , Incompatible
}
 AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the assignment was allowed. More...
 
using MaybeODRUseExprSet = llvm::SmallSetVector< Expr *, 4 >
 Store a set of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) that may or may not be odr-used in this Expr, and we won't know until all lvalue-to-rvalue and discarded value conversions have been applied to all subexpressions of the enclosing full expression.
 
using ImmediateInvocationCandidate = llvm::PointerIntPair< ConstantExpr *, 1 >
 
using ADLCallKind = CallExpr::ADLCallKind
 
MaybeODRUseExprSet MaybeODRUseExprs
 
llvm::DenseMap< const VarDecl *, intRefsMinusAssignments
 Increment when we find a reference; decrement when we find an ignored assignment.
 
CleanupInfo Cleanup
 Used to control the generation of ExprWithCleanups.
 
SmallVector< ExprWithCleanups::CleanupObject, 8 > ExprCleanupObjects
 ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current full expression.
 
bool RebuildingImmediateInvocation = false
 Whether the AST is currently being rebuilt to correct immediate invocations.
 
RecordDeclStdSourceLocationImplDecl
 The C++ "std::source_location::__impl" struct, defined in <source_location>.
 
SmallVector< ExpressionEvaluationContextRecord, 8 > ExprEvalContexts
 A stack of expression evaluation contexts.
 
llvm::SmallPtrSet< ConstantExpr *, 4 > FailedImmediateInvocations
 
llvm::SmallVector< std::pair< SourceLocation, const BlockDecl * >, 1 > ImplicitlyRetainedSelfLocs
 List of SourceLocations where 'self' is implicitly retained inside a block.
 
const ExpressionEvaluationContextRecordcurrentEvaluationContext () const
 
bool CanUseDecl (NamedDecl *D, bool TreatUnavailableAsInvalid)
 Determine whether the use of this declaration is valid, without emitting diagnostics.
 
bool DiagnoseUseOfOverloadedDecl (NamedDecl *D, SourceLocation Loc)
 
bool DiagnoseUseOfDecl (NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReciever=nullptr, bool SkipTrailingRequiresClause=false)
 Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.
 
void NoteDeletedFunction (FunctionDecl *FD)
 Emit a note explaining that this function is deleted.
 
void DiagnoseSentinelCalls (const NamedDecl *D, SourceLocation Loc, ArrayRef< Expr * > Args)
 DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with the sentinel attribute, and if so, it checks that the requirements of the sentinel are satisfied.
 
void PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other)
 
void PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other)
 
void PopExpressionEvaluationContext ()
 
void DiscardCleanupsInEvaluationContext ()
 
ExprResult TransformToPotentiallyEvaluated (Expr *E)
 
TypeSourceInfoTransformToPotentiallyEvaluated (TypeSourceInfo *TInfo)
 
ExprResult HandleExprEvaluationContextForTypeof (Expr *E)
 
void CheckUnusedVolatileAssignment (Expr *E)
 Check whether E, which is either a discarded-value expression or an unevaluated operand, is a simple-assignment to a volatlie-qualified lvalue, and if so, remove it from the list of volatile-qualified assignments that we are going to warn are deprecated.
 
ExprResult ActOnConstantExpression (ExprResult Res)
 
void MarkAnyDeclReferenced (SourceLocation Loc, Decl *D, bool MightBeOdrUse)
 Perform marking for a reference to an arbitrary declaration.
 
void MarkFunctionReferenced (SourceLocation Loc, FunctionDecl *Func, bool MightBeOdrUse=true)
 Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3)
 
void MarkVariableReferenced (SourceLocation Loc, VarDecl *Var)
 Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2, C99 6.9p3).
 
void MarkDeclRefReferenced (DeclRefExpr *E, const Expr *Base=nullptr)
 Perform reference-marking and odr-use handling for a DeclRefExpr.
 
void MarkMemberReferenced (MemberExpr *E)
 Perform reference-marking and odr-use handling for a MemberExpr.
 
void MarkFunctionParmPackReferenced (FunctionParmPackExpr *E)
 Perform reference-marking and odr-use handling for a FunctionParmPackExpr.
 
void MarkCaptureUsedInEnclosingContext (ValueDecl *Capture, SourceLocation Loc, unsigned CapturingScopeIndex)
 
ExprResult CheckLValueToRValueConversionOperand (Expr *E)
 
void CleanupVarDeclMarking ()
 
bool tryCaptureVariable (ValueDecl *Var, SourceLocation Loc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt)
 Try to capture the given variable.
 
bool tryCaptureVariable (ValueDecl *Var, SourceLocation Loc, TryCaptureKind Kind=TryCapture_Implicit, SourceLocation EllipsisLoc=SourceLocation())
 Try to capture the given variable.
 
bool NeedToCaptureVariable (ValueDecl *Var, SourceLocation Loc)
 Checks if the variable must be captured.
 
QualType getCapturedDeclRefType (ValueDecl *Var, SourceLocation Loc)
 Given a variable, determine the type that a reference to that variable will have in the given scope.
 
void MarkDeclarationsReferencedInType (SourceLocation Loc, QualType T)
 Mark all of the declarations referenced within a particular AST node as referenced.
 
void MarkDeclarationsReferencedInExpr (Expr *E, bool SkipLocalVariables=false, ArrayRef< const Expr * > StopAt=std::nullopt)
 Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced".
 
ExprResult tryConvertExprToType (Expr *E, QualType Ty)
 Try to convert an expression E to type Ty.
 
bool DiagIfReachable (SourceLocation Loc, ArrayRef< const Stmt * > Stmts, const PartialDiagnostic &PD)
 Conditionally issue a diagnostic based on the statements's reachability analysis.
 
bool DiagRuntimeBehavior (SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
 Conditionally issue a diagnostic based on the current evaluation context.
 
bool DiagRuntimeBehavior (SourceLocation Loc, ArrayRef< const Stmt * > Stmts, const PartialDiagnostic &PD)
 Similar, but diagnostic is only produced if all the specified statements are reachable.
 
SourceRange getExprRange (Expr *E) const
 
ExprResult ActOnIdExpression (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, CorrectionCandidateCallback *CCC=nullptr, bool IsInlineAsmIdentifier=false, Token *KeywordReplacement=nullptr)
 
void DecomposeUnqualifiedId (const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
 Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template arguments.
 
bool DiagnoseDependentMemberLookup (const LookupResult &R)
 Diagnose a lookup that found results in an enclosing class during error recovery.
 
bool DiagnoseEmptyLookup (Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=std::nullopt, DeclContext *LookupCtx=nullptr, TypoExpr **Out=nullptr)
 Diagnose an empty lookup.
 
DeclResult LookupIvarInObjCMethod (LookupResult &Lookup, Scope *S, IdentifierInfo *II)
 The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
 
ExprResult BuildIvarRefExpr (Scope *S, SourceLocation Loc, ObjCIvarDecl *IV)
 
ExprResult LookupInObjCMethod (LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false)
 The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
 
NonOdrUseReason getNonOdrUseReasonInCurrentContext (ValueDecl *D)
 If D cannot be odr-used in the current expression evaluation context, return a reason explaining why.
 
DeclRefExprBuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr)
 
DeclRefExprBuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, const CXXScopeSpec *SS=nullptr, NamedDecl *FoundD=nullptr, SourceLocation TemplateKWLoc=SourceLocation(), const TemplateArgumentListInfo *TemplateArgs=nullptr)
 
DeclRefExprBuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, NestedNameSpecifierLoc NNS, NamedDecl *FoundD=nullptr, SourceLocation TemplateKWLoc=SourceLocation(), const TemplateArgumentListInfo *TemplateArgs=nullptr)
 BuildDeclRefExpr - Build an expression that references a declaration that does not require a closure capture.
 
bool UseArgumentDependentLookup (const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen)
 
ExprResult BuildQualifiedDeclarationNameExpr (CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, const Scope *S, TypeSourceInfo **RecoveryTSI=nullptr)
 BuildQualifiedDeclarationNameExpr - Build a C++ qualified declaration name, generally during template instantiation.
 
ExprResult 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.
 
std::vector< TokenExpandFunctionLocalPredefinedMacros (ArrayRef< Token > Toks)
 
ExprResult BuildPredefinedExpr (SourceLocation Loc, PredefinedIdentKind IK)
 
ExprResult ActOnPredefinedExpr (SourceLocation Loc, tok::TokenKind Kind)
 
ExprResult ActOnIntegerConstant (SourceLocation Loc, uint64_t Val)
 
ExprResult BuildSYCLUniqueStableNameExpr (SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, TypeSourceInfo *TSI)
 
ExprResult ActOnSYCLUniqueStableNameExpr (SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, ParsedType ParsedTy)
 
bool CheckLoopHintExpr (Expr *E, SourceLocation Loc)
 
ExprResult ActOnNumericConstant (const Token &Tok, Scope *UDLScope=nullptr)
 
ExprResult ActOnCharacterConstant (const Token &Tok, Scope *UDLScope=nullptr)
 
ExprResult ActOnParenExpr (SourceLocation L, SourceLocation R, Expr *E)
 
ExprResult ActOnParenListExpr (SourceLocation L, SourceLocation R, MultiExprArg Val)
 
ExprResult ActOnStringLiteral (ArrayRef< Token > StringToks, Scope *UDLScope=nullptr)
 ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e.g.
 
ExprResult ActOnUnevaluatedStringLiteral (ArrayRef< Token > StringToks)
 
ExprResult ActOnGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr * > ArgExprs)
 ControllingExprOrType is either an opaque pointer coming out of a ParsedType or an Expr *.
 
ExprResult CreateGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef< TypeSourceInfo * > Types, ArrayRef< Expr * > Exprs)
 ControllingExprOrType is either a TypeSourceInfo * or an Expr *.
 
ExprResult CreateBuiltinUnaryOp (SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr, bool IsAfterAmp=false)
 
ExprResult BuildUnaryOp (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input, bool IsAfterAmp=false)
 
ExprResult ActOnUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input, bool IsAfterAmp=false)
 
bool isQualifiedMemberAccess (Expr *E)
 Determine whether the given expression is a qualified member access expression, of a form that could be turned into a pointer to member with the address-of operator.
 
bool CheckUseOfCXXMethodAsAddressOfOperand (SourceLocation OpLoc, const Expr *Op, const CXXMethodDecl *MD)
 
QualType CheckAddressOfOperand (ExprResult &Operand, SourceLocation OpLoc)
 CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designating an object.
 
bool ActOnAlignasTypeArgument (StringRef KWName, ParsedType Ty, SourceLocation OpLoc, SourceRange R)
 ActOnAlignasTypeArgument - Handle alignas(type-id) and _Alignas(type-name) .
 
bool CheckAlignasTypeArgument (StringRef KWName, TypeSourceInfo *TInfo, SourceLocation OpLoc, SourceRange R)
 
ExprResult CreateUnaryExprOrTypeTraitExpr (TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
 Build a sizeof or alignof expression given a type operand.
 
ExprResult CreateUnaryExprOrTypeTraitExpr (Expr *E, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind)
 Build a sizeof or alignof expression given an expression operand.
 
ExprResult ActOnUnaryExprOrTypeTraitExpr (SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, bool IsType, void *TyOrEx, SourceRange ArgRange)
 ActOnUnaryExprOrTypeTraitExpr - Handle sizeof(type) and sizeof expr and the same for alignof and __alignof Note that the ArgRange is invalid if isType is false.
 
ExprResult CheckPlaceholderExpr (Expr *E)
 Check for operands with placeholder types and complain if found.
 
bool CheckVecStepExpr (Expr *E)
 
bool CheckUnaryExprOrTypeTraitOperand (Expr *E, UnaryExprOrTypeTrait ExprKind)
 Check the constraints on expression operands to unary type expression and type traits.
 
bool CheckUnaryExprOrTypeTraitOperand (QualType ExprType, SourceLocation OpLoc, SourceRange ExprRange, UnaryExprOrTypeTrait ExprKind, StringRef KWName)
 Check the constraints on operands to unary expression and type traits.
 
ExprResult ActOnPostfixUnaryOp (Scope *S, SourceLocation OpLoc, tok::TokenKind Kind, Expr *Input)
 
ExprResult ActOnArraySubscriptExpr (Scope *S, Expr *Base, SourceLocation LLoc, MultiExprArg ArgExprs, SourceLocation RLoc)
 
ExprResult CreateBuiltinArraySubscriptExpr (Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
 
ExprResult CreateBuiltinMatrixSubscriptExpr (Expr *Base, Expr *RowIdx, Expr *ColumnIdx, SourceLocation RBLoc)
 
ExprResult ActOnOMPArraySectionExpr (Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc)
 
ExprResult ActOnOMPArrayShapingExpr (Expr *Base, SourceLocation LParenLoc, SourceLocation RParenLoc, ArrayRef< Expr * > Dims, ArrayRef< SourceRange > Brackets)
 
ExprResult ActOnOMPIteratorExpr (Scope *S, SourceLocation IteratorKwLoc, SourceLocation LLoc, SourceLocation RLoc, ArrayRef< OMPIteratorData > Data)
 
bool ConvertArgumentsForCall (CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef< Expr * > Args, SourceLocation RParenLoc, bool ExecConfig=false)
 ConvertArgumentsForCall - Converts the arguments specified in Args/NumArgs to the parameter types of the function FDecl with function prototype Proto.
 
void CheckStaticArrayArgument (SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr)
 CheckStaticArrayArgument - If the given argument corresponds to a static array parameter, check that it is non-null, and that if it is formed by array-to-pointer decay, the underlying array is sufficiently large.
 
ExprResult ActOnCallExpr (Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr)
 ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
 
ExprResult BuildCallExpr (Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
 BuildCallExpr - Handle a call to Fn with the specified array of arguments.
 
ExprBuildBuiltinCallExpr (SourceLocation Loc, Builtin::ID Id, MultiExprArg CallArgs)
 BuildBuiltinCallExpr - Create a call to a builtin function specified by Id.
 
ExprResult BuildResolvedCallExpr (Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, bool IsExecConfig=false, ADLCallKind UsesADL=ADLCallKind::NotADL)
 BuildResolvedCallExpr - Build a call to a resolved expression, i.e.
 
ExprResult ActOnCastExpr (Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr)
 
CastKind PrepareScalarCast (ExprResult &src, QualType destType)
 Prepares for a scalar cast, performing all the necessary stages except the final cast and returning the kind required.
 
ExprResult BuildVectorLiteral (SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo)
 Build an altivec or OpenCL literal.
 
ExprResult MaybeConvertParenListExprToParenExpr (Scope *S, Expr *ME)
 This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a sequence of comma binary operators.
 
ExprResult ActOnCompoundLiteral (SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc, Expr *InitExpr)
 
ExprResult BuildCompoundLiteralExpr (SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr)
 
ExprResult ActOnInitList (SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
 
ExprResult BuildInitList (SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
 
ExprResult ActOnBinOp (Scope *S, SourceLocation TokLoc, tok::TokenKind Kind, Expr *LHSExpr, Expr *RHSExpr)
 
ExprResult BuildBinOp (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
 
ExprResult CreateBuiltinBinOp (SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
 CreateBuiltinBinOp - Creates a new built-in binary operation with operator Opc at location TokLoc.
 
void LookupBinOp (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, UnresolvedSetImpl &Functions)
 
void DiagnoseCommaOperator (const Expr *LHS, SourceLocation Loc)
 
ExprResult ActOnConditionalOp (SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr)
 ActOnConditionalOp - Parse a ?: operation.
 
ExprResult ActOnAddrLabel (SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl)
 ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
 
void ActOnStartStmtExpr ()
 
ExprResult ActOnStmtExpr (Scope *S, SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
 
ExprResult BuildStmtExpr (SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc, unsigned TemplateDepth)
 
ExprResult ActOnStmtExprResult (ExprResult E)
 
void ActOnStmtExprError ()
 
ExprResult BuildBuiltinOffsetOf (SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc)
 __builtin_offsetof(type, a.b[123][456].c)
 
ExprResult ActOnBuiltinOffsetOf (Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc)
 
ExprResult ActOnChooseExpr (SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc)
 
ExprResult ActOnVAArg (SourceLocation BuiltinLoc, Expr *E, ParsedType Ty, SourceLocation RPLoc)
 
ExprResult BuildVAArgExpr (SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc)
 
ExprResult ActOnSourceLocExpr (SourceLocIdentKind Kind, SourceLocation BuiltinLoc, SourceLocation RPLoc)
 
ExprResult BuildSourceLocExpr (SourceLocIdentKind Kind, QualType ResultTy, SourceLocation BuiltinLoc, SourceLocation RPLoc, DeclContext *ParentContext)
 
ExprResult ActOnGNUNullExpr (SourceLocation TokenLoc)
 
bool CheckCaseExpression (Expr *E)
 
void ActOnBlockStart (SourceLocation CaretLoc, Scope *CurScope)
 ActOnBlockStart - This callback is invoked when a block literal is started.
 
void ActOnBlockArguments (SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope)
 ActOnBlockArguments - This callback allows processing of block arguments.
 
void ActOnBlockError (SourceLocation CaretLoc, Scope *CurScope)
 ActOnBlockError - If there is an error parsing a block, this callback is invoked to pop the information about the block from the action impl.
 
ExprResult ActOnBlockStmtExpr (SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
 ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully completed.
 
ExprResult ActOnConvertVectorExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 __builtin_convertvector(...)
 
ExprResult ActOnAsTypeExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 __builtin_astype(...)
 
ExprResult BuildAsTypeExpr (Expr *E, QualType DestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
 Create a new AsTypeExpr node (bitcast) from the arguments.
 
ExprResult CreateRecoveryExpr (SourceLocation Begin, SourceLocation End, ArrayRef< Expr * > SubExprs, QualType T=QualType())
 Attempts to produce a RecoveryExpr after some AST node cannot be created.
 
ObjCLiteralKind CheckLiteralKind (Expr *FromE)
 
ExprResult PerformObjectMemberConversion (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, NamedDecl *Member)
 Cast a base object to a member's actual type.
 
bool CheckCallReturnType (QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
 CheckCallReturnType - Checks that a call expression's return type is complete.
 
void WarnOnPendingNoDerefs (ExpressionEvaluationContextRecord &Rec)
 Emit a warning for all pending noderef expressions that we recorded.
 
ExprResult BuildCXXDefaultInitExpr (SourceLocation Loc, FieldDecl *Field)
 
bool CheckCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *Init=nullptr, bool SkipImmediateInvocations=true)
 Instantiate or parse a C++ default argument expression as necessary.
 
ExprResult BuildCXXDefaultArgExpr (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *Init=nullptr)
 BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed.
 
ExprResult CheckForImmediateInvocation (ExprResult E, FunctionDecl *Decl)
 Wrap the expression in a ConstantExpr if it is a potential immediate invocation.
 
void MarkExpressionAsImmediateEscalating (Expr *E)
 
bool IsInvalidSMECallConversion (QualType FromType, QualType ToType)
 
const DeclContextgetCurObjCLexicalContext () const
 
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, AllowFoldKind CanFold=NoFold)
 VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate diagnostics.
 
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, unsigned DiagID, AllowFoldKind CanFold=NoFold)
 
ExprResult VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result=nullptr, AllowFoldKind CanFold=NoFold)
 
ExprResult VerifyIntegerConstantExpression (Expr *E, AllowFoldKind CanFold=NoFold)
 
void DiagnoseAssignmentAsCondition (Expr *E)
 DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition, warn if it's an assignment.
 
void DiagnoseEqualityWithExtraParens (ParenExpr *ParenE)
 Redundant parentheses over an equality comparison can indicate that the user intended an assignment used as condition.
 
FullExprArg MakeFullExpr (Expr *Arg)
 
FullExprArg MakeFullExpr (Expr *Arg, SourceLocation CC)
 
FullExprArg MakeFullDiscardedValueExpr (Expr *Arg)
 
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.
 
ConditionResult ActOnCondition (Scope *S, SourceLocation Loc, Expr *SubExpr, ConditionKind CK, bool MissingOK=false)
 
QualType CheckConditionalOperands (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc)
 Note that LHS is not null here, even if this is the gnu "x ?: y" extension.
 
QualType FindCompositeObjCPointerType (ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
 FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types of the two input expressions.
 
bool DiagnoseConditionalForNull (const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation QuestionLoc)
 Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a pointer.
 
QualType CheckVectorOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversion, bool AllowBoolOperation, bool ReportInvalid)
 type checking for vector binary operators.
 
QualType GetSignedVectorType (QualType V)
 
QualType GetSignedSizelessVectorType (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.
 
QualType CheckSizelessVectorCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
 
QualType CheckVectorLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc)
 
QualType CheckSizelessVectorOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind)
 
QualType CheckMatrixElementwiseOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
 Type checking for matrix binary operators.
 
QualType CheckMatrixMultiplyOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
 
bool isValidSveBitcast (QualType srcType, QualType destType)
 Are the two types SVE-bitcast-compatible types? I.e.
 
bool isValidRVVBitcast (QualType srcType, QualType destType)
 Are the two types RVV-bitcast-compatible types? I.e.
 
bool areMatrixTypesOfTheSameDimension (QualType srcTy, QualType destTy)
 Are the two types matrix types and do they have the same dimensions i.e.
 
bool areVectorTypesSameSize (QualType srcType, QualType destType)
 
bool areLaxCompatibleVectorTypes (QualType srcType, QualType destType)
 Are the two types lax-compatible vector types? That is, given that one of them is a vector, do they have equal storage sizes, where the storage size is the number of elements times the element size?
 
bool isLaxVectorConversion (QualType srcType, QualType destType)
 Is this a legal conversion between two types, one of which is known to be a vector type?
 
bool anyAltivecTypes (QualType srcType, QualType destType)
 
ExprResult checkUnknownAnyCast (SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path)
 Check a cast of an unknown-any type.
 
ExprResult forceUnknownAnyToType (Expr *E, QualType ToType)
 Force an expression with unknown-type to an expression of the given type.
 
ExprResult checkUnknownAnyArg (SourceLocation callLoc, Expr *result, QualType &paramType)
 Type-check an expression that's being passed to an __unknown_anytype parameter.
 
bool CheckMatrixCast (SourceRange R, QualType DestTy, QualType SrcTy, CastKind &Kind)
 
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.
 
ExprResult CheckExtVectorCast (SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind)
 
QualType PreferredConditionType (ConditionKind K) const
 
ExprResult UsualUnaryConversions (Expr *E)
 UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6.3).
 
ExprResult CallExprUnaryConversions (Expr *E)
 CallExprUnaryConversions - a special case of an unary conversion performed on a function designator of a call expression.
 
ExprResult DefaultFunctionArrayConversion (Expr *E, bool Diagnose=true)
 DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
 
ExprResult DefaultFunctionArrayLvalueConversion (Expr *E, bool Diagnose=true)
 
ExprResult DefaultLvalueConversion (Expr *E)
 
ExprResult DefaultArgumentPromotion (Expr *E)
 DefaultArgumentPromotion (C99 6.5.2.2p6).
 
VariadicCallType getVariadicCallType (FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn)
 
VarArgKind isValidVarArgType (const QualType &Ty)
 Determine the degree of POD-ness for an expression.
 
void checkVariadicArgument (const Expr *E, VariadicCallType CT)
 Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic if not.
 
bool GatherArgumentsForCall (SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr * > Args, SmallVectorImpl< Expr * > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false)
 GatherArgumentsForCall - Collector argument expressions for various form of call prototypes.
 
ExprResult DefaultVariadicArgumentPromotion (Expr *E, VariadicCallType CT, FunctionDecl *FDecl)
 DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but will create a trap if the resulting type is not a POD type.
 
QualType UsualArithmeticConversions (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, ArithConvKind ACK)
 UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6.3.1.8).
 
bool DiagnoseAssignmentResult (AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr)
 DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specified by ConvTy.
 
AssignConvertType CheckAssignmentConstraints (SourceLocation Loc, QualType LHSType, QualType RHSType)
 CheckAssignmentConstraints - Perform type checking for assignment, argument passing, variable initialization, and function return values.
 
AssignConvertType CheckAssignmentConstraints (QualType LHSType, ExprResult &RHS, CastKind &Kind, bool ConvertRHS=true)
 Check assignment constraints and optionally prepare for a conversion of the RHS to the LHS type.
 
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.
 
AssignConvertType CheckTransparentUnionArgumentConstraints (QualType ArgType, ExprResult &RHS)
 
QualType InvalidOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
 the following "Check" methods will return a valid/converted QualType or a null QualType (indicating an error diagnostic was issued).
 
QualType InvalidLogicalVectorOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
 
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, BinaryOperatorKind Opc)
 
bool CheckConversionToObjCLiteral (QualType DstType, Expr *&SrcExpr, bool Diagnose=true)
 
bool isAlwaysConstantEvaluatedContext () const
 
bool isUnevaluatedContext () const
 Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
 
bool isImmediateFunctionContext () const
 
bool isInLifetimeExtendingContext () const
 
bool isCheckingDefaultArgumentOrInitializer () const
 
std::optional< ExpressionEvaluationContextRecord::InitializationContextInnermostDeclarationWithDelayedImmediateInvocations () const
 
std::optional< ExpressionEvaluationContextRecord::InitializationContextOutermostDeclarationWithDelayedImmediateInvocations () const
 
void keepInLifetimeExtendingContext ()
 keepInLifetimeExtendingContext - Pull down InLifetimeExtendingContext flag from previous context.
 
void keepInMaterializeTemporaryObjectContext ()
 keepInMaterializeTemporaryObjectContext - Pull down InMaterializeTemporaryObjectContext flag from previous context.
 
DefaultedComparisonKind getDefaultedComparisonKind (const FunctionDecl *FD)
 
const FieldDeclgetSelfAssignmentClassMemberCandidate (const ValueDecl *SelfAssigned)
 Returns a field in a CXXRecordDecl that has the same name as the decl SelfAssigned when inside a CXXMethodDecl.
 
void MaybeSuggestAddingStaticToDecl (const FunctionDecl *D)
 
template<typename... Ts>
bool RequireCompleteSizedType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
 
template<typename... Ts>
bool RequireCompleteSizedExprType (Expr *E, unsigned DiagID, const Ts &...Args)
 
bool CheckArgsForPlaceholders (MultiExprArg args)
 Check an argument list for placeholders that we won't try to handle later.
 
static ConditionResult ConditionError ()
 
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.
 

C++ Expressions

Implementations are in SemaExprCXX.cpp

enum  AllocationFunctionScope { AFS_Global , AFS_Class , AFS_Both }
 The scope in which to find allocation functions. More...
 
enum  IfExistsResult { IER_Exists , IER_DoesNotExist , IER_Dependent , IER_Error }
 Describes the result of an "if-exists" condition check. More...
 
LazyDeclPtr StdBadAlloc
 The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
 
LazyDeclPtr StdAlignValT
 The C++ "std::align_val_t" enum class, which is defined by the C++ standard library.
 
RecordDeclCXXTypeInfoDecl
 The C++ "type_info" declaration, which is defined in <typeinfo>.
 
bool GlobalNewDeleteDeclared
 A flag to remember whether the implicit forms of operator new and delete have been declared.
 
llvm::MapVector< FieldDecl *, DeleteLocsDeleteExprs
 Delete-expressions to be analyzed at the end of translation unit.
 
QualType CXXThisTypeOverride
 When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-static member function.
 
bool isInMaterializeTemporaryObjectContext () const
 
ParsedType getInheritingConstructorName (CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo &Name)
 Handle the result of the special case name lookup for inheriting constructor declarations.
 
ParsedType getConstructorName (IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, bool EnteringContext)
 
ParsedType getDestructorName (IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectType, bool EnteringContext)
 
ParsedType getDestructorTypeForDecltype (const DeclSpec &DS, ParsedType ObjectType)
 
ExprResult BuildCXXTypeId (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
 Build a C++ typeid expression with a type operand.
 
ExprResult BuildCXXTypeId (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
 Build a C++ typeid expression with an expression operand.
 
ExprResult ActOnCXXTypeid (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
 ActOnCXXTypeid - Parse typeid( something ).
 
ExprResult BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
 Build a Microsoft __uuidof expression with a type operand.
 
ExprResult BuildCXXUuidof (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
 Build a Microsoft __uuidof expression with an expression operand.
 
ExprResult ActOnCXXUuidof (SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
 ActOnCXXUuidof - Parse __uuidof( something ).
 
ExprResult ActOnCXXThis (SourceLocation loc)
 
ExprBuildCXXThisExpr (SourceLocation Loc, QualType Type, bool IsImplicit)
 Build a CXXThisExpr and mark it referenced in the current context.
 
void MarkThisReferenced (CXXThisExpr *This)
 
QualType getCurrentThisType ()
 Try to retrieve the type of the 'this' pointer.
 
bool CheckCXXThisCapture (SourceLocation Loc, bool Explicit=false, bool BuildAndDiagnose=true, const unsigned *const FunctionScopeIndexToStopAt=nullptr, bool ByCopy=false)
 Make sure the value of 'this' is actually available in the current context, if it is a potentially evaluated context.
 
bool isThisOutsideMemberFunctionBody (QualType BaseType)
 Determine whether the given type is the type of *this that is used outside of the body of a member function for a type that is currently being defined.
 
ExprResult ActOnCXXBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind)
 ActOnCXXBoolLiteral - Parse {true,false} literals.
 
ExprResult ActOnObjCBoolLiteral (SourceLocation OpLoc, tok::TokenKind Kind)
 ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
 
ExprResult ActOnObjCAvailabilityCheckExpr (llvm::ArrayRef< AvailabilitySpec > AvailSpecs, SourceLocation AtLoc, SourceLocation RParen)
 
ExprResult ActOnCXXNullPtrLiteral (SourceLocation Loc)
 ActOnCXXNullPtrLiteral - Parse 'nullptr'.
 
ExprResult ActOnCXXThrow (Scope *S, SourceLocation OpLoc, Expr *expr)
 ActOnCXXThrow - Parse throw expressions.
 
ExprResult BuildCXXThrow (SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope)
 
bool CheckCXXThrowOperand (SourceLocation ThrowLoc, QualType ThrowTy, Expr *E)
 CheckCXXThrowOperand - Validate the operand of a throw.
 
ExprResult ActOnCXXTypeConstructExpr (ParsedType TypeRep, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization)
 ActOnCXXTypeConstructExpr - Parse construction of a specified type.
 
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.
 
ExprResult BuildCXXNew (SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::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.
 
void diagnoseUnavailableAlignedAllocation (const FunctionDecl &FD, SourceLocation Loc)
 Produce diagnostics if FD is an aligned allocation or deallocation function that is unavailable.
 
bool CheckAllocatedType (QualType AllocType, SourceLocation Loc, SourceRange R)
 Checks that a type is suitable as the allocated type in a new-expression.
 
bool FindAllocationFunctions (SourceLocation StartLoc, SourceRange Range, 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.
 
void DeclareGlobalNewDelete ()
 DeclareGlobalNewDelete - Declare the global forms of operator new and delete.
 
void DeclareGlobalAllocationFunction (DeclarationName Name, QualType Return, ArrayRef< QualType > Params)
 DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't already exist.
 
bool FindDeallocationFunction (SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true, bool WantSize=false, bool WantAligned=false)
 
FunctionDeclFindUsualDeallocationFunction (SourceLocation StartLoc, bool CanProvideSize, bool Overaligned, DeclarationName Name)
 
FunctionDeclFindDeallocationFunctionForDestructor (SourceLocation StartLoc, CXXRecordDecl *RD)
 
ExprResult ActOnCXXDelete (SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand)
 ActOnCXXDelete - Parsed a C++ 'delete' expression.
 
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 ActOnStartCXXMemberReference (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor)
 
ExprResult BuildPseudoDestructorExpr (Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
 
ExprResult ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName)
 
ExprResult ActOnPseudoDestructorExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, SourceLocation TildeLoc, const DeclSpec &DS)
 
ExprMaybeCreateExprWithCleanups (Expr *SubExpr)
 MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups, surround it with a ExprWithCleanups node.
 
StmtMaybeCreateStmtWithCleanups (Stmt *SubStmt)
 
ExprResult MaybeCreateExprWithCleanups (ExprResult SubExpr)
 
ExprResult ActOnFinishFullExpr (Expr *Expr, bool DiscardedValue)
 
ExprResult ActOnFinishFullExpr (Expr *Expr, SourceLocation CC, bool DiscardedValue, bool IsConstexpr=false, bool IsTemplateArgument=false)
 
StmtResult ActOnFinishFullStmt (Stmt *Stmt)
 
ExprResult ActOnDecltypeExpression (Expr *E)
 Process the expression contained within a decltype.
 
bool checkLiteralOperatorId (const CXXScopeSpec &SS, const UnqualifiedId &Id, bool IsUDSuffix)
 
bool isUsualDeallocationFunction (const CXXMethodDecl *FD)
 
ConditionResult ActOnConditionVariable (Decl *ConditionVar, SourceLocation StmtLoc, ConditionKind CK)
 
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.
 
ExprResult CheckCXXBooleanCondition (Expr *CondExpr, bool IsConstexpr=false)
 CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
 
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).
 
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, const ImplicitConversionSequence &ICS, AssignmentAction Action, CheckedConversionKind CCK=CCK_ImplicitConversion)
 PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType using the pre-computed implicit conversion sequence ICS.
 
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, const StandardConversionSequence &SCS, AssignmentAction Action, CheckedConversionKind CCK)
 PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType by following the standard conversion sequence SCS.
 
bool CheckTypeTraitArity (unsigned Arity, SourceLocation Loc, size_t N)
 
ExprResult ActOnTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< ParsedType > Args, SourceLocation RParenLoc)
 Parsed one of the type trait support pseudo-functions.
 
ExprResult BuildTypeTrait (TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc)
 
ExprResult ActOnArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen)
 ActOnArrayTypeTrait - Parsed one of the binary type trait support pseudo-functions.
 
ExprResult BuildArrayTypeTrait (ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen)
 
ExprResult ActOnExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
 ActOnExpressionTrait - Parsed one of the unary type trait support pseudo-functions.
 
ExprResult BuildExpressionTrait (ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
 
QualType CheckPointerToMemberOperands (ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation OpLoc, bool isIndirect)
 
QualType CheckVectorConditionalTypes (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
 
QualType CheckSizelessVectorConditionalTypes (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
 
QualType CXXCheckConditionalOperands (ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc)
 Check the operands of ?: under C++ semantics.
 
QualType FindCompositePointerType (SourceLocation Loc, Expr *&E1, Expr *&E2, bool ConvertArgs=true)
 Find a merged pointer type and convert the two expressions to it.
 
QualType FindCompositePointerType (SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool ConvertArgs=true)
 
ExprResult MaybeBindToTemporary (Expr *E)
 MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor, this will return CXXBindTemporaryExpr.
 
ExprResult IgnoredValueConversions (Expr *E)
 IgnoredValueConversions - Given that an expression's result is syntactically ignored, perform any conversions that are required.
 
ExprResult CheckUnevaluatedOperand (Expr *E)
 
ExprResult CorrectDelayedTyposInExpr (Expr *E, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
 Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and returning a new Expr if there were typos that were all successfully corrected and ExprError if one or more typos could not be corrected.
 
ExprResult CorrectDelayedTyposInExpr (ExprResult ER, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
 
IfExistsResult CheckMicrosoftIfExistsSymbol (Scope *S, CXXScopeSpec &SS, const DeclarationNameInfo &TargetNameInfo)
 
IfExistsResult CheckMicrosoftIfExistsSymbol (Scope *S, SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name)
 
RequiresExprBodyDeclActOnStartRequiresExpr (SourceLocation RequiresKWLoc, ArrayRef< ParmVarDecl * > LocalParameters, Scope *BodyScope)
 
void ActOnFinishRequiresExpr ()
 
concepts::RequirementActOnSimpleRequirement (Expr *E)
 
concepts::RequirementActOnTypeRequirement (SourceLocation TypenameKWLoc, CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo *TypeName, TemplateIdAnnotation *TemplateId)
 
concepts::RequirementActOnCompoundRequirement (Expr *E, SourceLocation NoexceptLoc)
 
concepts::RequirementActOnCompoundRequirement (Expr *E, SourceLocation NoexceptLoc, CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, unsigned Depth)
 
concepts::RequirementActOnNestedRequirement (Expr *Constraint)
 
concepts::ExprRequirementBuildExprRequirement (Expr *E, bool IsSatisfied, SourceLocation NoexceptLoc, concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement)
 
concepts::ExprRequirementBuildExprRequirement (concepts::Requirement::SubstitutionDiagnostic *ExprSubstDiag, bool IsSatisfied, SourceLocation NoexceptLoc, concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement)
 
concepts::TypeRequirementBuildTypeRequirement (TypeSourceInfo *Type)
 
concepts::TypeRequirementBuildTypeRequirement (concepts::Requirement::SubstitutionDiagnostic *SubstDiag)
 
concepts::NestedRequirementBuildNestedRequirement (Expr *E)
 
concepts::NestedRequirementBuildNestedRequirement (StringRef InvalidConstraintEntity, const ASTConstraintSatisfaction &Satisfaction)
 
ExprResult ActOnRequiresExpr (SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, SourceLocation LParenLoc, ArrayRef< ParmVarDecl * > LocalParameters, SourceLocation RParenLoc, ArrayRef< concepts::Requirement * > Requirements, SourceLocation ClosingBraceLoc)
 

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.

Implementations are in SemaLookup.cpp

enum class  AcceptableKind { Visible , Reachable }
 
enum  LookupNameKind {
  LookupOrdinaryName = 0 , LookupTagName , LookupLabel , LookupMemberName ,
  LookupOperatorName , LookupDestructorName , LookupNestedNameSpecifierName , LookupNamespaceName ,
  LookupUsingDeclName , LookupRedeclarationWithLinkage , LookupLocalFriendName , LookupObjCProtocolName ,
  LookupObjCImplicitSelfParam , LookupOMPReductionName , LookupOMPMapperName , LookupAnyName
}
 Describes the kind of name lookup to perform. More...
 
enum  LiteralOperatorLookupResult {
  LOLR_Error , LOLR_ErrorNoDiagnostic , LOLR_Cooked , LOLR_Raw ,
  LOLR_Template , LOLR_StringTemplatePack
}
 The possible outcomes of name lookup for a literal operator. More...
 
enum  RedeclarationKind { NotForRedeclaration = 0 , ForVisibleRedeclaration , ForExternalRedeclaration }
 Specifies whether (or how) name lookup is being performed for a redeclaration (vs. More...
 
enum  CorrectTypoKind { CTK_NonError , CTK_ErrorRecovery }
 
enum class  MissingImportKind {
  Declaration , Definition , DefaultArgument , ExplicitSpecialization ,
  PartialSpecialization
}
 Kinds of missing import. More...
 
typedef llvm::SmallSet< SourceLocation, 2 > SrcLocSet
 
typedef llvm::DenseMap< IdentifierInfo *, SrcLocSetIdentifierSourceLocations
 
typedef llvm::SmallSetVector< DeclContext *, 16 > AssociatedNamespaceSet
 
typedef llvm::SmallSetVector< CXXRecordDecl *, 16 > AssociatedClassSet
 
typedef std::function< void(const TypoCorrection &)> TypoDiagnosticGenerator
 
typedef std::function< ExprResult(Sema &, TypoExpr *, TypoCorrection)> TypoRecoveryCallback
 
bool DisableTypoCorrection
 Tracks whether we are in a context where typo correction is disabled.
 
unsigned TyposCorrected
 The number of typos corrected by CorrectTypo.
 
IdentifierSourceLocations TypoCorrectionFailures
 A cache containing identifiers for which typo correction failed and their locations, so that repeated attempts to correct an identifier in a given location are ignored if typo correction already failed for it.
 
llvm::FoldingSet< SpecialMemberOverloadResultEntrySpecialMemberCache
 A cache of special member function overload resolution results for C++ records.
 
llvm::SmallVector< TypoExpr *, 2 > TypoExprs
 Holds TypoExprs that are created from createDelayedTypo.
 
SpecialMemberOverloadResult LookupSpecialMember (CXXRecordDecl *D, CXXSpecialMember SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis)
 
RedeclarationKind forRedeclarationInCurContext () const
 
NamedDeclLookupSingleName (Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=NotForRedeclaration)
 Look up a name, looking for a single declaration.
 
bool LookupBuiltin (LookupResult &R)
 Lookup a builtin function, when name lookup would otherwise fail.
 
void LookupNecessaryTypesForBuiltin (Scope *S, unsigned ID)
 
bool LookupName (LookupResult &R, Scope *S, bool AllowBuiltinCreation=false, bool ForceNoCPlusPlus=false)
 Perform unqualified name lookup starting from a given scope.
 
bool LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
 Perform qualified name lookup into a given context.
 
bool LookupQualifiedName (LookupResult &R, DeclContext *LookupCtx, CXXScopeSpec &SS)
 Performs qualified name lookup or special type of lookup for "__super::" scope specifier.
 
bool LookupParsedName (LookupResult &R, Scope *S, CXXScopeSpec *SS, bool AllowBuiltinCreation=false, bool EnteringContext=false)
 Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope specifier.
 
ObjCProtocolDeclLookupProtocol (IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration)
 Find the protocol with the given name, if any.
 
bool LookupInSuper (LookupResult &R, CXXRecordDecl *Class)
 Perform qualified name lookup into all base classes of the given class.
 
void LookupOverloadedOperatorName (OverloadedOperatorKind Op, Scope *S, UnresolvedSetImpl &Functions)
 
LabelDeclLookupOrCreateLabel (IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation())
 LookupOrCreateLabel - Do a name lookup of a label with the specified name.
 
DeclContextLookupResult LookupConstructors (CXXRecordDecl *Class)
 Look up the constructors for the given class.
 
CXXConstructorDeclLookupDefaultConstructor (CXXRecordDecl *Class)
 Look up the default constructor for the given class.
 
CXXConstructorDeclLookupCopyingConstructor (CXXRecordDecl *Class, unsigned Quals)
 Look up the copying constructor for the given class.
 
CXXMethodDeclLookupCopyingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
 Look up the copying assignment operator for the given class.
 
CXXConstructorDeclLookupMovingConstructor (CXXRecordDecl *Class, unsigned Quals)
 Look up the moving constructor for the given class.
 
CXXMethodDeclLookupMovingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
 Look up the moving assignment operator for the given class.
 
CXXDestructorDeclLookupDestructor (CXXRecordDecl *Class)
 Look for the destructor of the given class.
 
void ForceDeclarationOfImplicitMembers (CXXRecordDecl *Class)
 Force the declaration of any implicitly-declared members of this class.
 
void makeMergedDefinitionVisible (NamedDecl *ND)
 Make a merged definition of an existing hidden definition ND visible at the specified location.
 
llvm::DenseSet< Module * > & getLookupModules ()
 Get the set of additional modules that should be checked during name lookup.
 
bool hasVisibleMergedDefinition (const NamedDecl *Def)
 
bool hasMergedDefinitionInCurrentModule (const NamedDecl *Def)
 
bool hasVisibleDefaultArgument (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if the template parameter D has a visible default argument.
 
bool hasReachableDefaultArgument (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if the template parameter D has a reachable default argument.
 
bool hasAcceptableDefaultArgument (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules, Sema::AcceptableKind Kind)
 Determine if the template parameter D has a reachable default argument.
 
bool hasVisibleExplicitSpecialization (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if there is a visible declaration of D that is an explicit specialization declaration for a specialization of a template.
 
bool hasReachableExplicitSpecialization (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if there is a reachable declaration of D that is an explicit specialization declaration for a specialization of a template.
 
bool hasVisibleMemberSpecialization (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if there is a visible declaration of D that is a member specialization declaration (as opposed to an instantiated declaration).
 
bool hasReachableMemberSpecialization (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine if there is a reachable declaration of D that is a member specialization declaration (as opposed to an instantiated declaration).
 
bool isModuleVisible (const Module *M, bool ModulePrivate=false)
 
bool hasVisibleDeclaration (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine whether any declaration of an entity is visible.
 
bool hasVisibleDeclarationSlow (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules)
 
bool hasReachableDeclaration (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 Determine whether any declaration of an entity is reachable.
 
bool hasReachableDeclarationSlow (const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
 
void diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
 
void diagnoseTypo (const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, const PartialDiagnostic &PrevNote, bool ErrorRecovery=true)
 Diagnose a successfully-corrected typo.
 
void FindAssociatedClassesAndNamespaces (SourceLocation InstantiationLoc, ArrayRef< Expr * > Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses)
 Find the associated classes and namespaces for argument-dependent lookup for a call with the given set of arguments.
 
void DiagnoseAmbiguousLookup (LookupResult &Result)
 Produce a diagnostic describing the ambiguity that resulted from name lookup.
 
LiteralOperatorLookupResult LookupLiteralOperator (Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate, bool DiagnoseMissing, StringLiteral *StringLit=nullptr)
 LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal, per C++11 [lex.ext].
 
void ArgumentDependentLookup (DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, ADLResult &Functions)
 
void LookupVisibleDecls (Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true, bool LoadExternal=true)
 
void LookupVisibleDecls (DeclContext *Ctx, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true, bool IncludeDependentBases=false, bool LoadExternal=true)
 
TypoCorrection CorrectTypo (const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr, bool RecordFailure=true)
 Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
 
TypoExprCorrectTypoDelayed (const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, TypoDiagnosticGenerator TDG, TypoRecoveryCallback TRC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr)
 Try to "correct" a typo in the source code by finding visible declarations whose names are similar to the name that was present in the source code.
 
void diagnoseMissingImport (SourceLocation Loc, const NamedDecl *Decl, MissingImportKind MIK, bool Recover=true)
 Diagnose that the specified declaration needs to be visible but isn't, and suggest a module import that would resolve the problem.
 
void diagnoseMissingImport (SourceLocation Loc, const NamedDecl *Decl, SourceLocation DeclLoc, ArrayRef< Module * > Modules, MissingImportKind MIK, bool Recover)
 
const TypoExprStategetTypoExprState (TypoExpr *TE) const
 
void clearDelayedTypo (TypoExpr *TE)
 Clears the state of the given TypoExpr.
 
void ActOnPragmaDump (Scope *S, SourceLocation Loc, IdentifierInfo *II)
 Called on #pragma clang __debug dump II.
 
void ActOnPragmaDump (Expr *E)
 Called on #pragma clang __debug dump E.
 

Modules

Implementations are in SemaModule.cpp

enum class  ModuleDeclKind { Interface , Implementation , PartitionInterface , PartitionImplementation }
 
enum class  ModuleImportState {
  FirstDecl , GlobalFragment , ImportAllowed , ImportFinished ,
  PrivateFragmentImportAllowed , PrivateFragmentImportFinished , NotACXX20Module
}
 An enumeration to represent the transition of states in parsing module fragments and imports. More...
 
ModulegetCurrentModule () const
 Get the module unit whose scope we are currently within.
 
bool currentModuleIsImplementation () const
 Is the module scope we are an implementation unit?
 
void makeModuleVisible (Module *Mod, SourceLocation ImportLoc)
 
DeclGroupPtrTy ActOnModuleDecl (SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState)
 The parser has processed a module-declaration that begins the definition of a module interface or implementation.
 
DeclGroupPtrTy ActOnGlobalModuleFragmentDecl (SourceLocation ModuleLoc)
 The parser has processed a global-module-fragment declaration that begins the definition of the global module fragment of the current module unit.
 
DeclGroupPtrTy ActOnPrivateModuleFragmentDecl (SourceLocation ModuleLoc, SourceLocation PrivateLoc)
 The parser has processed a private-module-fragment declaration that begins the definition of the private module fragment of the current module unit.
 
DeclResult ActOnModuleImport (SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, ModuleIdPath Path, bool IsPartition=false)
 The parser has processed a module import declaration.
 
DeclResult ActOnModuleImport (SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, Module *M, ModuleIdPath Path={})
 
void ActOnAnnotModuleInclude (SourceLocation DirectiveLoc, Module *Mod)
 The parser has processed a module import translated from a #include or similar preprocessing directive.
 
void BuildModuleInclude (SourceLocation DirectiveLoc, Module *Mod)
 
void ActOnAnnotModuleBegin (SourceLocation DirectiveLoc, Module *Mod)
 The parsed has entered a submodule.
 
void ActOnAnnotModuleEnd (SourceLocation DirectiveLoc, Module *Mod)
 The parser has left a submodule.
 
void createImplicitModuleImportForErrorRecovery (SourceLocation Loc, Module *Mod)
 Create an implicit import of the given module at the given source location, for error recovery, if possible.
 
DeclActOnStartExportDecl (Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc)
 We have parsed the start of an export declaration, including the '{' (if present).
 
DeclActOnFinishExportDecl (Scope *S, Decl *ExportDecl, SourceLocation RBraceLoc)
 Complete the definition of an export declaration.
 

C++ Overloading

Implementations are in SemaOverload.cpp

enum  OverloadKind { Ovl_Overload , Ovl_Match , Ovl_NonFunction }
 
enum class  AllowedExplicit { None , Conversions , All }
 
enum  CCEKind {
  CCEK_CaseValue , CCEK_Enumerator , CCEK_TemplateArg , CCEK_ArrayBound ,
  CCEK_ExplicitBool , CCEK_Noexcept , CCEK_StaticAssertMessageSize , CCEK_StaticAssertMessageData
}
 Contexts in which a converted constant expression is required. More...
 
enum  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  ForRangeStatus { FRS_Success , FRS_NoViableFunction , FRS_DiagnosticIssued }
 
using ReferenceConversions = ReferenceConversionsScope::ReferenceConversions
 
bool DeferDiags = false
 Whether deferrable diagnostics should be deferred.
 
bool IsBuildingRecoveryCallExpr
 Flag indicating if Sema is building a recovery call expression.
 
OverloadKind CheckOverload (Scope *S, FunctionDecl *New, const LookupResult &OldDecls, NamedDecl *&OldDecl, bool UseMemberUsingDeclRules)
 Determine whether the given New declaration is an overload of the declarations in Old.
 
bool IsOverload (FunctionDecl *New, FunctionDecl *Old, bool UseMemberUsingDeclRules, bool ConsiderCudaAttrs=true)
 
bool IsOverride (FunctionDecl *MD, FunctionDecl *BaseMD, bool UseMemberUsingDeclRules, bool ConsiderCudaAttrs=true)
 
ImplicitConversionSequence TryImplicitConversion (Expr *From, QualType ToType, bool SuppressUserConversions, AllowedExplicit AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion)
 
ExprResult PerformImplicitConversion (Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false)
 PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType.
 
bool IsIntegralPromotion (Expr *From, QualType FromType, QualType ToType)
 IsIntegralPromotion - Determines whether the conversion from the expression From (whose potentially-adjusted type is FromType) to ToType is an integral promotion (C++ 4.5).
 
bool IsFloatingPointPromotion (QualType FromType, QualType ToType)
 IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating point promotion (C++ 4.6).
 
bool IsComplexPromotion (QualType FromType, QualType ToType)
 Determine if a conversion is a complex promotion.
 
bool IsPointerConversion (Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType, bool &IncompatibleObjC)
 IsPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a pointer conversion (C++ 4.10).
 
bool isObjCPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC)
 isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion.
 
bool isObjCWritebackConversion (QualType FromType, QualType ToType, QualType &ConvertedType)
 Determine whether this is an Objective-C writeback conversion, used for parameter passing when performing automatic reference counting.
 
bool IsBlockPointerConversion (QualType FromType, QualType ToType, QualType &ConvertedType)
 
bool FunctionParamTypesAreEqual (ArrayRef< QualType > Old, ArrayRef< QualType > New, unsigned *ArgPos=nullptr, bool Reversed=false)
 FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their parameter types.
 
bool FunctionParamTypesAreEqual (const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr, bool Reversed=false)
 
bool FunctionNonObjectParamTypesAreEqual (const FunctionDecl *OldFunction, const FunctionDecl *NewFunction, unsigned *ArgPos=nullptr, bool Reversed=false)
 
void HandleFunctionTypeMismatch (PartialDiagnostic &PDiag, QualType FromType, QualType ToType)
 HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types.
 
bool CheckPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose=true)
 CheckPointerConversion - Check the pointer conversion from the expression From to the type ToType.
 
bool IsMemberPointerConversion (Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType)
 IsMemberPointerConversion - Determines whether the conversion of the expression From, which has the (possibly adjusted) type FromType, can be converted to the type ToType via a member pointer conversion (C++ 4.11).
 
bool CheckMemberPointerConversion (Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
 CheckMemberPointerConversion - Check the member pointer conversion from the expression From to the type ToType.
 
bool IsQualificationConversion (QualType FromType, QualType ToType, bool CStyle, bool &ObjCLifetimeConversion)
 IsQualificationConversion - Determines whether the conversion from an rvalue of type FromType to ToType is a qualification conversion (C++ 4.4).
 
bool IsFunctionConversion (QualType FromType, QualType ToType, QualType &ResultTy)
 Determine whether the conversion from FromType to ToType is a valid conversion that strips "noexcept" or "noreturn" off the nested function type.
 
bool DiagnoseMultipleUserDefinedConversion (Expr *From, QualType ToType)
 
ExprResult InitializeExplicitObjectArgument (Sema &S, Expr *Obj, FunctionDecl *Fun)
 
ExprResult PerformImplicitObjectArgumentInitialization (Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method)
 PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the given Method with the given expression.
 
ExprResult PerformContextuallyConvertToBool (Expr *From)
 PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C++0x [conv]p3).
 
ExprResult PerformContextuallyConvertToObjCPointer (Expr *From)
 PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to an Objective-C pointer type.
 
ExprResult BuildConvertedConstantExpression (Expr *From, QualType T, CCEKind CCE, NamedDecl *Dest=nullptr)
 
ExprResult CheckConvertedConstantExpression (Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
 
ExprResult CheckConvertedConstantExpression (Expr *From, QualType T, APValue &Value, CCEKind CCE, NamedDecl *Dest=nullptr)
 
ExprResult EvaluateConvertedConstantExpression (Expr *E, QualType T, APValue &Value, CCEKind CCE, bool RequireInt, const APValue &PreNarrowingValue)
 EvaluateConvertedConstantExpression - Evaluate an Expression That is a converted constant expression (which was built with BuildConvertedConstantExpression)
 
ExprResult PerformContextualImplicitConversion (SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter)
 Perform a contextual implicit conversion.
 
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).
 
void AddOverloadCandidate (FunctionDecl *Function, DeclAccessPair FoundDecl, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=true, bool AllowExplicitConversion=false, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, ConversionSequenceList EarlyConversions=std::nullopt, OverloadCandidateParamOrder PO={}, bool AggregateCandidateDeduction=false)
 AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given function call arguments.
 
void AddFunctionCandidates (const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, bool SuppressUserConversions=false, bool PartialOverloading=false, bool FirstArgumentIsBase=false)
 Add all of the function declarations in the given function set to the overload candidate set.
 
void AddMethodCandidate (DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversion=false, OverloadCandidateParamOrder PO={})
 AddMethodCandidate - Adds a named decl (which is some kind of method) as a method candidate to the given overload set.
 
void AddMethodCandidate (CXXMethodDecl *Method, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, ConversionSequenceList EarlyConversions=std::nullopt, OverloadCandidateParamOrder PO={})
 AddMethodCandidate - Adds the given C++ member function to the set of candidate functions, using the given function call arguments and the object argument (Object).
 
void AddMethodTemplateCandidate (FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, OverloadCandidateParamOrder PO={})
 Add a C++ member function template as a candidate to the candidate set, using template argument deduction to produce an appropriate member function template specialization.
 
void AddTemplateOverloadCandidate (FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=true, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, OverloadCandidateParamOrder PO={}, bool AggregateCandidateDeduction=false)
 Add a C++ function template specialization as a candidate in the candidate set, using template argument deduction to produce an appropriate function template specialization.
 
bool CheckNonDependentConversions (FunctionTemplateDecl *FunctionTemplate, ArrayRef< QualType > ParamTypes, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, ConversionSequenceList &Conversions, bool SuppressUserConversions, CXXRecordDecl *ActingContext=nullptr, QualType ObjectType=QualType(), Expr::Classification ObjectClassification={}, OverloadCandidateParamOrder PO={})
 Check that implicit conversion sequences can be formed for each argument whose corresponding parameter has a non-dependent type, per DR1391's [temp.deduct.call]p10.
 
void AddConversionCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit, bool AllowExplicit, bool AllowResultConversion=true)
 AddConversionCandidate - Add a C++ conversion function as a candidate in the candidate set (C++ [over.match.conv], C++ [over.match.copy]).
 
void AddTemplateConversionCandidate (FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit, bool AllowExplicit, bool AllowResultConversion=true)
 Adds a conversion function template specialization candidate to the overload set, using template argument deduction to deduce the template arguments of the conversion function template from the type that we are converting to (C++ [temp.deduct.conv]).
 
void AddSurrogateCandidate (CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
 AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given Object to a function pointer via the conversion function Conversion, and then attempts to call it with the given arguments (C++ [over.call.object]p2-4).
 
void AddNonMemberOperatorCandidates (const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
 Add all of the non-member operator function declarations in the given function set to the overload candidate set.
 
void AddMemberOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, OverloadCandidateParamOrder PO={})
 Add overload candidates for overloaded operators that are member functions.
 
void AddBuiltinCandidate (QualType *ParamTys, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0)
 AddBuiltinCandidate - Add a candidate for a built-in operator.
 
void AddBuiltinOperatorCandidates (OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
 AddBuiltinOperatorCandidates - Add the appropriate built-in operator overloads to the candidate set (C++ [over.built]), based on the operator Op and the arguments given.
 
void AddArgumentDependentLookupCandidates (DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
 Add function candidates found via argument-dependent lookup to the set of overloading candidates.
 
EnableIfAttr * CheckEnableIf (FunctionDecl *Function, SourceLocation CallLoc, ArrayRef< Expr * > Args, bool MissingImplicitThis=false)
 Check the enable_if expressions on the given function.
 
bool diagnoseArgDependentDiagnoseIfAttrs (const FunctionDecl *Function, const Expr *ThisArg, ArrayRef< const Expr * > Args, SourceLocation Loc)
 Emit diagnostics for the diagnose_if attributes on Function, ignoring any non-ArgDependent DiagnoseIfAttrs.
 
bool diagnoseArgIndependentDiagnoseIfAttrs (const NamedDecl *ND, SourceLocation Loc)
 Emit diagnostics for the diagnose_if attributes on Function, ignoring any ArgDependent DiagnoseIfAttrs.
 
bool isEquivalentInternalLinkageDeclaration (const NamedDecl *A, const NamedDecl *B)
 Determine if A and B are equivalent internal linkage declarations from different modules, and thus an ambiguity error can be downgraded to an extension warning.
 
void diagnoseEquivalentInternalLinkageDeclarations (SourceLocation Loc, const NamedDecl *D, ArrayRef< const NamedDecl * > Equiv)
 
void NoteOverloadCandidate (const NamedDecl *Found, const FunctionDecl *Fn, OverloadCandidateRewriteKind RewriteKind=OverloadCandidateRewriteKind(), QualType DestType=QualType(), bool TakingAddress=false)
 
void NoteAllOverloadCandidates (Expr *E, QualType DestType=QualType(), bool TakingAddress=false)
 
bool checkAddressOfFunctionIsAvailable (const FunctionDecl *Function, bool Complain=false, SourceLocation Loc=SourceLocation())
 Returns whether the given function's address can be taken or not, optionally emitting a diagnostic if the address can't be taken.
 
QualType ExtractUnqualifiedFunctionType (QualType PossiblyAFunctionType)
 
FunctionDeclResolveAddressOfOverloadedFunction (Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr)
 ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over.over]), where From is an expression with overloaded function type and ToType is the type we're trying to resolve to.
 
FunctionDeclresolveAddressOfSingleOverloadCandidate (Expr *E, DeclAccessPair &FoundResult)
 Given an expression that refers to an overloaded function, try to resolve that function to a single function that can have its address taken.
 
bool resolveAndFixAddressOfSingleOverloadCandidate (ExprResult &SrcExpr, bool DoFunctionPointerConversion=false)
 Given an overloaded function, tries to turn it into a non-overloaded function reference using resolveAddressOfSingleOverloadCandidate.
 
FunctionDeclResolveSingleFunctionTemplateSpecialization (OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr, TemplateSpecCandidateSet *FailedTSC=nullptr)
 Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function.
 
bool ResolveAndFixSingleFunctionTemplateSpecialization (ExprResult &SrcExpr, bool DoFunctionPointerConversion=false, bool Complain=false, SourceRange OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0)
 
void AddOverloadedCallCandidates (UnresolvedLookupExpr *ULE, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
 Add the overload candidates named by callee and/or found by argument dependent lookup to the given overload set.
 
void AddOverloadedCallCandidates (LookupResult &R, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
 Add the call candidates from the given set of lookup results to the given overload set.
 
ForRangeStatus BuildForRangeBeginEndCall (SourceLocation Loc, SourceLocation RangeLoc, const DeclarationNameInfo &NameInfo, LookupResult &MemberLookup, OverloadCandidateSet *CandidateSet, Expr *Range, ExprResult *CallExpr)
 Build a call to 'begin' or 'end' for a C++11 for-range statement.
 
ExprResult BuildOverloadedCallExpr (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true, bool CalleesAddressIsTaken=false)
 BuildOverloadedCallExpr - Given the call expression that calls Fn (which eventually refers to the declaration Func) and the call arguments Args/NumArgs, attempt to resolve the function call down to a specific function.
 
bool buildOverloadedCallSet (Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, MultiExprArg Args, SourceLocation RParenLoc, OverloadCandidateSet *CandidateSet, ExprResult *Result)
 Constructs and populates an OverloadedCandidateSet from the given function.
 
ExprResult CreateUnresolvedLookupExpr (CXXRecordDecl *NamingClass, NestedNameSpecifierLoc NNSLoc, DeclarationNameInfo DNI, const UnresolvedSetImpl &Fns, bool PerformADL=true)
 
ExprResult CreateOverloadedUnaryOp (SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *input, bool RequiresADL=true)
 Create a unary operation that may resolve to an overloaded operator.
 
void LookupOverloadedBinOp (OverloadCandidateSet &CandidateSet, OverloadedOperatorKind Op, const UnresolvedSetImpl &Fns, ArrayRef< Expr * > Args, bool RequiresADL=true)
 Perform lookup for an overloaded binary operator.
 
ExprResult CreateOverloadedBinOp (SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool RequiresADL=true, bool AllowRewrittenCandidates=true, FunctionDecl *DefaultedFn=nullptr)
 Create a binary operation that may resolve to an overloaded operator.
 
ExprResult BuildSynthesizedThreeWayComparison (SourceLocation OpLoc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, FunctionDecl *DefaultedFn)
 
ExprResult CreateOverloadedArraySubscriptExpr (SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg Args)
 
ExprResult BuildCallToMemberFunction (Scope *S, Expr *MemExpr, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
 BuildCallToMemberFunction - Build a call to a member function.
 
ExprResult BuildCallToObjectOfClassType (Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
 BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over.call.object]), which can end up invoking an overloaded function call operator (operator()) or performing a user-defined conversion on the object argument.
 
ExprResult BuildOverloadedArrowExpr (Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound=nullptr)
 BuildOverloadedArrowExpr - Build a call to an overloaded operator-> (if one exists), where Base is an expression of class type and Member is the name of the member we're trying to find.
 
ExprResult BuildCXXMemberCallExpr (Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates)
 
ExprResult BuildLiteralOperatorCall (LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef< Expr * > Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
 BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to a literal operator described by the provided lookup results.
 
ExprResult FixOverloadedFunctionReference (Expr *E, DeclAccessPair FoundDecl, FunctionDecl *Fn)
 FixOverloadedFunctionReference - E is an expression that refers to a C++ overloaded function (possibly with some parentheses and perhaps a '&' around it).
 
ExprResult FixOverloadedFunctionReference (ExprResult, DeclAccessPair FoundDecl, FunctionDecl *Fn)
 

Pseudo-Object

Implementations are in SemaPseudoObject.cpp

enum  ObjCSubscriptKind { OS_Array , OS_Dictionary , OS_Error }
 
void maybeExtendBlockObject (ExprResult &E)
 Do an explicit extend of the given block pointer if we're in ARC.
 
CastKind PrepareCastToObjCObjectPointer (ExprResult &E)
 Prepare a conversion of the given expression to an ObjC object pointer type.
 
ObjCSubscriptKind CheckSubscriptingKind (Expr *FromE)
 CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being done.
 
ExprResult checkPseudoObjectIncDec (Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opcode, Expr *Op)
 Check an increment or decrement of a pseudo-object expression.
 
ExprResult checkPseudoObjectAssignment (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opcode, Expr *LHS, Expr *RHS)
 
ExprResult checkPseudoObjectRValue (Expr *E)
 
ExprrecreateSyntacticForm (PseudoObjectExpr *E)
 Given a pseudo-object expression, recreate what it looks like syntactically without the attendant OpaqueValueExprs.
 

Statements

Implementations are in SemaStmt.cpp

enum  BuildForRangeKind { BFRK_Build , BFRK_Rebuild , BFRK_Check }
 
enum class  SimplerImplicitMoveMode { ForceOff , Normal , ForceOn }
 
typedef std::pair< StringRef, QualTypeCapturedParamNameType
 
SmallVector< Scope *, 2 > CurrentSEHFinally
 Stack of active SEH __finally scopes. Can be empty.
 
StmtResult ActOnExprStmt (ExprResult Arg, bool DiscardedValue=true)
 
StmtResult ActOnExprStmtError ()
 
StmtResult ActOnNullStmt (SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false)
 
StmtResult ActOnDeclStmt (DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc)
 
void ActOnForEachDeclStmt (DeclGroupPtrTy Decl)
 
void DiagnoseUnusedExprResult (const Stmt *S, unsigned DiagID)
 DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused, warn.
 
void ActOnStartOfCompoundStmt (bool IsStmtExpr)
 
void ActOnAfterCompoundStatementLeadingPragmas ()
 
void ActOnFinishOfCompoundStmt ()
 
StmtResult ActOnCompoundStmt (SourceLocation L, SourceLocation R, ArrayRef< Stmt * > Elts, bool isStmtExpr)
 
sema::CompoundScopeInfogetCurCompoundScope () const
 
ExprResult ActOnCaseExpr (SourceLocation CaseLoc, ExprResult Val)
 
StmtResult ActOnCaseStmt (SourceLocation CaseLoc, ExprResult LHS, SourceLocation DotDotDotLoc, ExprResult RHS, SourceLocation ColonLoc)
 
void ActOnCaseStmtBody (Stmt *CaseStmt, Stmt *SubStmt)
 ActOnCaseStmtBody - This installs a statement as the body of a case.
 
StmtResult ActOnDefaultStmt (SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope)
 
StmtResult ActOnLabelStmt (SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt)
 
StmtResult BuildAttributedStmt (SourceLocation AttrsLoc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt)
 
StmtResult ActOnAttributedStmt (const ParsedAttributes &AttrList, Stmt *SubStmt)
 
bool checkAndRewriteMustTailAttr (Stmt *St, const Attr &MTA)
 Check whether the given statement can have musttail applied to it, issuing a diagnostic and returning false if not.
 
StmtResult ActOnIfStmt (SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
 
StmtResult BuildIfStmt (SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
 
ExprResult CheckSwitchCondition (SourceLocation SwitchLoc, Expr *Cond)
 
StmtResult ActOnStartOfSwitchStmt (SourceLocation SwitchLoc, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc)
 
StmtResult ActOnFinishSwitchStmt (SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
 
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.
 
StmtResult ActOnWhileStmt (SourceLocation WhileLoc, SourceLocation LParenLoc, ConditionResult Cond, SourceLocation RParenLoc, Stmt *Body)
 
StmtResult ActOnDoStmt (SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen)
 
StmtResult ActOnForStmt (SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, ConditionResult Second, FullExprArg Third, SourceLocation RParenLoc, Stmt *Body)
 
StmtResult ActOnForEachLValueExpr (Expr *E)
 In an Objective C collection iteration statement: for (x in y) x can be an arbitrary l-value expression.
 
ExprResult CheckObjCForCollectionOperand (SourceLocation forLoc, Expr *collection)
 
StmtResult ActOnObjCForCollectionStmt (SourceLocation ForColLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc)
 
StmtResult FinishObjCForCollectionStmt (Stmt *ForCollection, Stmt *Body)
 FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.
 
StmtResult ActOnCXXForRangeStmt (Scope *S, SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc, BuildForRangeKind Kind, ArrayRef< MaterializeTemporaryExpr * > LifetimeExtendTemps={})
 ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.
 
StmtResult BuildCXXForRangeStmt (SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind, ArrayRef< MaterializeTemporaryExpr * > LifetimeExtendTemps={})
 BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
 
StmtResult FinishCXXForRangeStmt (Stmt *ForRange, Stmt *Body)
 FinishCXXForRangeStmt - Attach the body to a C++0x for-range statement.
 
StmtResult ActOnGotoStmt (SourceLocation GotoLoc, SourceLocation LabelLoc, LabelDecl *TheDecl)
 
StmtResult ActOnIndirectGotoStmt (SourceLocation GotoLoc, SourceLocation StarLoc, Expr *DestExp)
 
StmtResult ActOnContinueStmt (SourceLocation ContinueLoc, Scope *CurScope)
 
StmtResult ActOnBreakStmt (SourceLocation BreakLoc, Scope *CurScope)
 
NamedReturnInfo getNamedReturnInfo (Expr *&E, SimplerImplicitMoveMode Mode=SimplerImplicitMoveMode::Normal)
 Determine whether the given expression might be move-eligible or copy-elidable in either a (co_)return statement or throw expression, without considering function return type, if applicable.
 
NamedReturnInfo getNamedReturnInfo (const VarDecl *VD)
 Determine whether the given NRVO candidate variable is move-eligible or copy-elidable, without considering function return type.
 
const VarDeclgetCopyElisionCandidate (NamedReturnInfo &Info, QualType ReturnType)
 Updates given NamedReturnInfo's move-eligible and copy-elidable statuses, considering the function return type criteria as applicable to return statements.
 
ExprResult PerformMoveOrCopyInitialization (const InitializedEntity &Entity, const NamedReturnInfo &NRInfo, Expr *Value, bool SupressSimplerImplicitMoves=false)
 Perform the initialization of a potentially-movable value, which is the result of return value.
 
TypeLoc getReturnTypeLoc (FunctionDecl *FD) const
 
bool DeduceFunctionTypeFromReturnExpr (FunctionDecl *FD, SourceLocation ReturnLoc, Expr *RetExpr, const AutoType *AT)
 Deduce the return type for a function from a returned expression, per C++1y [dcl.spec.auto]p6.
 
StmtResult ActOnReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope)
 
StmtResult BuildReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery=false)
 
StmtResult ActOnCapScopeReturnStmt (SourceLocation ReturnLoc, Expr *RetValExp, NamedReturnInfo &NRInfo, bool SupressSimplerImplicitMoves)
 ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes.
 
StmtResult 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)
 
StmtResult ActOnCXXCatchBlock (SourceLocation CatchLoc, Decl *ExDecl, Stmt *HandlerBlock)
 ActOnCXXCatchBlock - Takes an exception declaration and a handler block and creates a proper catch handler from them.
 
StmtResult ActOnCXXTryBlock (SourceLocation TryLoc, Stmt *TryBlock, ArrayRef< Stmt * > Handlers)
 ActOnCXXTryBlock - Takes a try compound-statement and a number of handlers and creates a try statement from them.
 
StmtResult ActOnSEHTryBlock (bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler)
 
StmtResult ActOnSEHExceptBlock (SourceLocation Loc, Expr *FilterExpr, Stmt *Block)
 
void ActOnStartSEHFinallyBlock ()
 
void ActOnAbortSEHFinallyBlock ()
 
StmtResult ActOnFinishSEHFinallyBlock (SourceLocation Loc, Stmt *Block)
 
StmtResult ActOnSEHLeaveStmt (SourceLocation Loc, Scope *CurScope)
 
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 ActOnCapturedRegionStart (SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, unsigned NumParams)
 
void ActOnCapturedRegionStart (SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, ArrayRef< CapturedParamNameType > Params, unsigned OpenMPCaptureLevel=0)
 
StmtResult ActOnCapturedRegionEnd (Stmt *S)
 
void ActOnCapturedRegionError ()
 
RecordDeclCreateCapturedStmtRecordDecl (CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams)
 

C++ Templates

Implementations are in SemaTemplate.cpp

enum  TemplateNameIsRequiredTag { TemplateNameIsRequired }
 
enum class  AssumedTemplateKind { None , FoundNothing , FoundFunctions }
 
enum  TemplateParamListContext {
  TPC_ClassTemplate , TPC_VarTemplate , TPC_FunctionTemplate , TPC_ClassTemplateMember ,
  TPC_FriendClassTemplate , TPC_FriendFunctionTemplate , TPC_FriendFunctionTemplateDefinition , TPC_TypeAliasTemplate
}
 The context in which we are checking a template parameter list. More...
 
enum  CheckTemplateArgumentKind { CTAK_Specified , CTAK_Deduced , CTAK_DeducedFromArrayBound }
 Specifies the context in which a particular template argument is being checked. More...
 
enum  TemplateParameterListEqualKind { TPL_TemplateMatch , TPL_TemplateTemplateParmMatch , TPL_TemplateTemplateArgumentMatch , TPL_TemplateParamsEquivalent }
 Enumeration describing how template parameter lists are compared for equality. More...
 
typedef llvm::MapVector< const FunctionDecl *, std::unique_ptr< LateParsedTemplate > > LateParsedTemplateMapT
 
unsigned NumSFINAEErrors
 The number of SFINAE diagnostics that have been trapped.
 
LateParsedTemplateMapT LateParsedTemplateMap
 
void resetFPOptions (FPOptions FPO)
 
ArrayRef< InventedTemplateParameterInfogetInventedParameterInfos () const
 
ArrayRef< sema::FunctionScopeInfo * > getFunctionScopes () const
 
unsigned getTemplateDepth (Scope *S) const
 Determine the number of levels of enclosing template parameters.
 
void FilterAcceptableTemplateNames (LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true)
 
bool hasAnyAcceptableTemplateNames (LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true, bool AllowNonTemplateFunctions=false)
 
bool LookupTemplateName (LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate=SourceLocation(), AssumedTemplateKind *ATK=nullptr, bool AllowTypoCorrection=true)
 
TemplateNameKind isTemplateName (Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool &MemberOfUnknownSpecialization, bool Disambiguation=false)
 
void ActOnUndeclaredTypeTemplateName (Scope *S, TemplateTy &Name, TemplateNameKind &TNK, SourceLocation NameLoc, IdentifierInfo *&II)
 Try to resolve an undeclared template name as a type template.
 
bool resolveAssumedTemplateNameAsType (Scope *S, TemplateName &Name, SourceLocation NameLoc, bool Diagnose=true)
 
bool isDeductionGuideName (Scope *S, const IdentifierInfo &Name, SourceLocation NameLoc, CXXScopeSpec &SS, ParsedTemplateTy *Template=nullptr)
 Determine whether a particular identifier might be the name in a C++1z deduction-guide declaration.
 
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).
 
void DiagnoseTemplateParameterShadow (SourceLocation Loc, Decl *PrevDecl, bool SupportedForCompatibility=false)
 DiagnoseTemplateParameterShadow - Produce a diagnostic complaining that the template parameter 'PrevDecl' is being shadowed by a new declaration at location Loc.
 
TemplateDeclAdjustDeclIfTemplate (Decl *&Decl)
 AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference the templated declaration and return a pointer to the template declaration.
 
NamedDeclActOnTypeParameter (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.
 
bool CheckTypeConstraint (TemplateIdAnnotation *TypeConstraint)
 
bool ActOnTypeConstraint (const CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
 
bool BuildTypeConstraint (const CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc, bool AllowUnexpandedPack)
 
bool AttachTypeConstraint (NestedNameSpecifierLoc NS, DeclarationNameInfo NameInfo, ConceptDecl *NamedConcept, NamedDecl *FoundDecl, const TemplateArgumentListInfo *TemplateArgs, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
 Attach a type-constraint to a template parameter.
 
bool AttachTypeConstraint (AutoTypeLoc TL, NonTypeTemplateParmDecl *NewConstrainedParm, NonTypeTemplateParmDecl *OrigConstrainedParm, SourceLocation EllipsisLoc)
 
bool RequireStructuralType (QualType T, SourceLocation Loc)
 Require the given type to be a structural type, and diagnose if it is not.
 
QualType CheckNonTypeTemplateParameterType (TypeSourceInfo *&TSI, SourceLocation Loc)
 Check that the type of a non-type template parameter is well-formed.
 
QualType CheckNonTypeTemplateParameterType (QualType T, SourceLocation Loc)
 
NamedDeclActOnNonTypeTemplateParameter (Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg)
 
NamedDeclActOnTemplateTemplateParameter (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.
 
TemplateParameterListActOnTemplateParameterList (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.
 
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.
 
TemplateParameterListMatchTemplateParametersToScopeSpecifier (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.
 
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)
 
void translateTemplateArguments (const ASTTemplateArgsPtr &In, TemplateArgumentListInfo &Out)
 Translates template arguments as provided by the parser into template arguments used by semantic analysis.
 
ParsedTemplateArgument ActOnTemplateTypeArgument (TypeResult ParsedType)
 Convert a parsed type into a parsed template argument.
 
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, ImplicitTypenameContext AllowImplicitTypename=ImplicitTypenameContext::No)
 
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.
 
DeclResult ActOnVarTemplateSpecialization (Scope *S, Declarator &D, TypeSourceInfo *DI, LookupResult &Previous, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization)
 
DeclResult CheckVarTemplateId (VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs)
 Get the specialization of the given variable template corresponding to the specified argument list, or a null-but-valid result if the arguments are dependent.
 
ExprResult CheckVarTemplateId (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, VarTemplateDecl *Template, NamedDecl *FoundD, SourceLocation TemplateLoc, const TemplateArgumentListInfo *TemplateArgs)
 Form a reference to the specialization of the given variable template corresponding to the specified argument list, or a null-but-valid result if the arguments are dependent.
 
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 ActOnTemplateName (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool AllowInjectedClassName=false)
 Form a template name from a name that is syntactically required to name a template, either due to use of the 'template' keyword or because a name in this syntactic context is assumed to name a template (C++ [temp.names]p2-4).
 
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.
 
void CheckTemplatePartialSpecialization (ClassTemplatePartialSpecializationDecl *Partial)
 
void CheckTemplatePartialSpecialization (VarTemplatePartialSpecializationDecl *Partial)
 
DeclActOnTemplateDeclarator (Scope *S, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
 
bool CheckSpecializationInstantiationRedecl (SourceLocation NewLoc, TemplateSpecializationKind ActOnExplicitInstantiationNewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPtOfInstantiation, bool &SuppressNew)
 Diagnose cases where we have an explicit template specialization before/after an explicit template instantiation, producing diagnostics for those cases where they are required and determining whether the new specialization/instantiation will have any effect.
 
bool CheckDependentFunctionTemplateSpecialization (FunctionDecl *FD, const TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous)
 Perform semantic analysis for the given dependent function template specialization.
 
bool CheckFunctionTemplateSpecialization (FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous, bool QualifiedFriend=false)
 Perform semantic analysis for the given function template specialization.
 
bool CheckMemberSpecialization (NamedDecl *Member, LookupResult &Previous)
 Perform semantic analysis for the given non-template member specialization.
 
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, ArrayRef< TemplateArgument > SugaredConverted, ArrayRef< TemplateArgument > CanonicalConverted, bool &HasDefaultArg)
 If the given template parameter has a default template argument, substitute into that default template argument and return the corresponding template argument.
 
SourceLocation getTopMostPointOfInstantiation (const NamedDecl *) const
 Returns the top most location responsible for the definition of N.
 
bool CheckTemplateArgument (NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl< TemplateArgument > &SugaredConverted, SmallVectorImpl< TemplateArgument > &CanonicalConverted, CheckTemplateArgumentKind CTAK)
 Check that the given template argument corresponds to the given template parameter.
 
bool CheckTemplateArgumentList (TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl< TemplateArgument > &SugaredConverted, SmallVectorImpl< TemplateArgument > &CanonicalConverted, bool UpdateArgsWithConversions=true, bool *ConstraintsNotSatisfied=nullptr)
 Check that the given template arguments can be provided to the given template, converting the arguments along the way.
 
bool CheckTemplateTypeArgument (TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &SugaredConverted, SmallVectorImpl< TemplateArgument > &CanonicalConverted)
 
bool CheckTemplateArgument (TypeSourceInfo *Arg)
 Check a template argument against its corresponding template type parameter.
 
ExprResult CheckTemplateArgument (NonTypeTemplateParmDecl *Param, QualType InstantiatedParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, CheckTemplateArgumentKind CTAK)
 Check a template argument against its corresponding non-type template parameter.
 
bool CheckTemplateTemplateArgument (TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg)
 Check a template argument against its corresponding template template parameter.
 
void NoteTemplateLocation (const NamedDecl &Decl, std::optional< SourceRange > ParamRange={})
 
void NoteTemplateParameterLocation (const NamedDecl &Decl)
 
ExprResult BuildExpressionFromDeclTemplateArgument (const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc)
 Given a non-type template argument that refers to a declaration and the type of its corresponding non-type template parameter, produce an expression that properly refers to that declaration.
 
ExprResult BuildExpressionFromNonTypeTemplateArgument (const TemplateArgument &Arg, SourceLocation Loc)
 
bool TemplateParameterListsAreEqual (const TemplateCompareNewDeclInfo &NewInstFrom, TemplateParameterList *New, const NamedDecl *OldInstFrom, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation())
 Determine whether the given template parameter lists are equivalent.
 
bool TemplateParameterListsAreEqual (TemplateParameterList *New, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation())
 
bool CheckTemplateDeclScope (Scope *S, TemplateParameterList *TemplateParams)
 Check whether a template can be declared within this scope.
 
TypeResult ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc, ImplicitTypenameContext IsImplicitTypename=ImplicitTypenameContext::No)
 Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".
 
TypeResult ActOnTypenameType (Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, SourceLocation TemplateLoc, TemplateTy TemplateName, 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>".
 
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".
 
TypeSourceInfoRebuildTypeInCurrentInstantiation (TypeSourceInfo *T, SourceLocation Loc, DeclarationName Name)
 Rebuilds a type within the context of the current instantiation.
 
bool RebuildNestedNameSpecifierInCurrentInstantiation (CXXScopeSpec &SS)
 
ExprResult RebuildExprInCurrentInstantiation (Expr *E)
 
bool RebuildTemplateParamsInCurrentInstantiation (TemplateParameterList *Params)
 Rebuild the template parameters now that we know we're in a current instantiation.
 
std::string getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgumentList &Args)
 Produces a formatted string that describes the binding of template parameters to template arguments.
 
std::string getTemplateArgumentBindingsText (const TemplateParameterList *Params, const TemplateArgument *Args, unsigned NumArgs)
 
void diagnoseExprIntendedAsTemplateName (Scope *S, ExprResult TemplateName, SourceLocation Less, SourceLocation Greater)
 
ExprResult ActOnDependentIdExpression (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool isAddressOfOperand, const TemplateArgumentListInfo *TemplateArgs)
 ActOnDependentIdExpression - Handle a dependent id-expression that was just parsed.
 
ExprResult BuildDependentDeclRefExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
 
bool ConstraintExpressionDependsOnEnclosingTemplate (const FunctionDecl *Friend, unsigned TemplateDepth, const Expr *Constraint)
 
void DeclareImplicitDeductionGuides (TemplateDecl *Template, SourceLocation Loc)
 Declare implicit deduction guides for a class template if we've not already done so.
 
FunctionTemplateDeclDeclareImplicitDeductionGuideFromInitList (TemplateDecl *Template, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc)
 
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.
 
void CheckDeductionGuideTemplate (FunctionTemplateDecl *TD)
 
DeclActOnConceptDefinition (Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr)
 
void CheckConceptRedefinition (ConceptDecl *NewDecl, LookupResult &Previous, bool &AddToScope)
 
TypeResult ActOnDependentTag (Scope *S, unsigned TagSpec, TagUseKind TUK, const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation TagLoc, SourceLocation NameLoc)
 
void MarkAsLateParsedTemplate (FunctionDecl *FD, Decl *FnD, CachedTokens &Toks)
 
void UnmarkAsLateParsedTemplate (FunctionDecl *FD)
 
bool IsInsideALocalClassWithinATemplateFunction ()
 
void checkSpecializationVisibility (SourceLocation Loc, NamedDecl *Spec)
 We've found a use of a templated declaration that would trigger an implicit instantiation.
 
void checkSpecializationReachability (SourceLocation Loc, NamedDecl *Spec)
 
static NamedDeclgetAsTemplateNameDecl (NamedDecl *D, bool AllowFunctionTemplates=true, bool AllowDependent=true)
 Try to interpret the lookup result D as a template-name.
 

C++ Variadic Templates

Implementations are in SemaTemplateVariadic.cpp

enum  UnexpandedParameterPackContext {
  UPPC_Expression = 0 , UPPC_BaseType , UPPC_DeclarationType , UPPC_DataMemberType ,
  UPPC_BitFieldWidth , UPPC_StaticAssertExpression , UPPC_FixedUnderlyingType , UPPC_EnumeratorValue ,
  UPPC_UsingDeclaration , UPPC_FriendDeclaration , UPPC_DeclarationQualifier , UPPC_Initializer ,
  UPPC_DefaultArgument , UPPC_NonTypeTemplateParameterType , UPPC_ExceptionType , UPPC_ExplicitSpecialization ,
  UPPC_PartialSpecialization , UPPC_IfExists , UPPC_IfNotExists , UPPC_Lambda ,
  UPPC_Block , UPPC_TypeConstraint , UPPC_Requirement , UPPC_RequiresClause
}
 The context in which an unexpanded parameter pack is being diagnosed. More...
 
bool isUnexpandedParameterPackPermitted ()
 Determine whether an unexpanded parameter pack might be permitted in this location.
 
bool DiagnoseUnexpandedParameterPacks (SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef< UnexpandedParameterPack > Unexpanded)
 Diagnose unexpanded parameter packs.
 
bool DiagnoseUnexpandedParameterPack (SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC)
 If the given type contains an unexpanded parameter pack, diagnose the error.
 
bool DiagnoseUnexpandedParameterPack (Expr *E, UnexpandedParameterPackContext UPPC=UPPC_Expression)
 If the given expression contains an unexpanded parameter pack, diagnose the error.
 
bool DiagnoseUnexpandedParameterPackInRequiresExpr (RequiresExpr *RE)
 If the given requirees-expression contains an unexpanded reference to one of its own parameter packs, diagnose the error.
 
bool DiagnoseUnexpandedParameterPack (const CXXScopeSpec &SS, UnexpandedParameterPackContext UPPC)
 If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error.
 
bool DiagnoseUnexpandedParameterPack (const DeclarationNameInfo &NameInfo, UnexpandedParameterPackContext UPPC)
 If the given name contains an unexpanded parameter pack, diagnose the error.
 
bool DiagnoseUnexpandedParameterPack (SourceLocation Loc, TemplateName Template, UnexpandedParameterPackContext UPPC)
 If the given template name contains an unexpanded parameter pack, diagnose the error.
 
bool DiagnoseUnexpandedParameterPack (TemplateArgumentLoc Arg, UnexpandedParameterPackContext UPPC)
 If the given template argument contains an unexpanded parameter pack, diagnose the error.
 
void collectUnexpandedParameterPacks (TemplateArgument Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given template argument.
 
void collectUnexpandedParameterPacks (TemplateArgumentLoc Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given template argument.
 
void collectUnexpandedParameterPacks (QualType T, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given type.
 
void collectUnexpandedParameterPacks (TypeLoc TL, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given type.
 
void collectUnexpandedParameterPacks (NestedNameSpecifierLoc NNS, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given nested-name-specifier.
 
void collectUnexpandedParameterPacks (const DeclarationNameInfo &NameInfo, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
 Collect the set of unexpanded parameter packs within the given name.
 
ParsedTemplateArgument ActOnPackExpansion (const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc)
 Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion.
 
TypeResult ActOnPackExpansion (ParsedType Type, SourceLocation EllipsisLoc)
 Invoked when parsing a type followed by an ellipsis, which creates a pack expansion.
 
TypeSourceInfoCheckPackExpansion (TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, std::optional< unsigned > NumExpansions)
 Construct a pack expansion type from the pattern of the pack expansion.
 
QualType CheckPackExpansion (QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, std::optional< unsigned > NumExpansions)
 Construct a pack expansion type from the pattern of the pack expansion.
 
ExprResult ActOnPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc)
 Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
 
ExprResult CheckPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc, std::optional< unsigned > NumExpansions)
 Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
 
bool CheckParameterPacksForExpansion (SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, std::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.
 
std::optional< unsignedgetNumArgumentsInExpansion (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs)
 Determine the number of arguments in the given pack expansion type.
 
bool containsUnexpandedParameterPacks (Declarator &D)
 Determine whether the given declarator contains any unexpanded parameter packs.
 
TemplateArgumentLoc getTemplateArgumentPackExpansionPattern (TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, std::optional< unsigned > &NumExpansions) const
 Returns the pattern of the pack expansion for a template argument.
 
std::optional< unsignedgetFullyPackExpandedSize (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.
 
ExprResult ActOnSizeofParameterPackExpr (Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc)
 Called when an expression computing the size of a parameter pack is parsed.
 
ExprResult ActOnPackIndexingExpr (Scope *S, Expr *PackExpression, SourceLocation EllipsisLoc, SourceLocation LSquareLoc, Expr *IndexExpr, SourceLocation RSquareLoc)
 
ExprResult BuildPackIndexingExpr (Expr *PackExpression, SourceLocation EllipsisLoc, Expr *IndexExpr, SourceLocation RSquareLoc, ArrayRef< Expr * > ExpandedExprs={}, bool EmptyPack=false)
 
ExprResult ActOnCXXFoldExpr (Scope *S, SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
 Handle a C++1z fold-expression: ( expr op ... op expr ).
 
ExprResult BuildCXXFoldExpr (UnresolvedLookupExpr *Callee, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc, std::optional< unsigned > NumExpansions)
 
ExprResult BuildEmptyCXXFoldExpr (SourceLocation EllipsisLoc, BinaryOperatorKind Operator)
 

Types

Implementations are in SemaType.cpp

enum class  CompleteTypeKind { Normal , AcceptSizeless , Default = AcceptSizeless }
 
using UTTKind = UnaryTransformType::UTTKind
 
FileNullabilityMap NullabilityMap
 A mapping that describes the nullability we've seen in each header file.
 
RecordDeclCFError = nullptr
 The struct behind the CFErrorRef pointer.
 
TypeResult actOnObjCProtocolQualifierType (SourceLocation lAngleLoc, ArrayRef< Decl * > protocols, ArrayRef< SourceLocation > protocolLocs, SourceLocation rAngleLoc)
 Build a an Objective-C protocol-qualified 'id' type where no base type was specified.
 
TypeResult actOnObjCTypeArgsAndProtocolQualifiers (Scope *S, SourceLocation Loc, ParsedType BaseType, SourceLocation TypeArgsLAngleLoc, ArrayRef< ParsedType > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< Decl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc)
 Build a specialized and/or protocol-qualified Objective-C type.
 
QualType BuildObjCTypeParamType (const ObjCTypeParamDecl *Decl, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
 Build an Objective-C type parameter type.
 
QualType BuildObjCObjectType (QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo * > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError, bool Rebuilding)
 Build an Objective-C object pointer type.
 
QualType BuildQualifiedType (QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS=nullptr)
 
QualType BuildQualifiedType (QualType T, SourceLocation Loc, unsigned CVRA, const DeclSpec *DS=nullptr)
 
QualType BuildPointerType (QualType T, SourceLocation Loc, DeclarationName Entity)
 Build a pointer type.
 
QualType BuildReferenceType (QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity)
 Build a reference type.
 
QualType BuildArrayType (QualType T, ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity)
 Build an array type.
 
QualType BuildVectorType (QualType T, Expr *VecSize, SourceLocation AttrLoc)
 
QualType BuildExtVectorType (QualType T, Expr *ArraySize, SourceLocation AttrLoc)
 Build an ext-vector type.
 
QualType BuildMatrixType (QualType T, Expr *NumRows, Expr *NumColumns, SourceLocation AttrLoc)
 
QualType BuildAddressSpaceAttr (QualType &T, LangAS ASIdx, Expr *AddrSpace, SourceLocation AttrLoc)
 BuildAddressSpaceAttr - Builds a DependentAddressSpaceType if an expression is uninstantiated.
 
QualType BuildAddressSpaceAttr (QualType &T, Expr *AddrSpace, SourceLocation AttrLoc)
 Same as above, but constructs the AddressSpace index if not provided.
 
bool CheckQualifiedFunctionForTypeId (QualType T, SourceLocation Loc)
 
bool CheckFunctionReturnType (QualType T, SourceLocation Loc)
 
QualType BuildFunctionType (QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI)
 Build a function type.
 
QualType BuildMemberPointerType (QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity)
 Build a member pointer type T Class::*.
 
QualType BuildBlockPointerType (QualType T, SourceLocation Loc, DeclarationName Entity)
 Build a block pointer type.
 
QualType BuildParenType (QualType T)
 Build a paren type including T.
 
QualType BuildAtomicType (QualType T, SourceLocation Loc)
 
QualType BuildReadPipeType (QualType T, SourceLocation Loc)
 Build a Read-only Pipe type.
 
QualType BuildWritePipeType (QualType T, SourceLocation Loc)
 Build a Write-only Pipe type.
 
QualType BuildBitIntType (bool IsUnsigned, Expr *BitWidth, SourceLocation Loc)
 Build a bit-precise integer type.
 
TypeSourceInfoGetTypeForDeclarator (Declarator &D)
 GetTypeForDeclarator - Convert the type for the specified declarator to Type instances.
 
TypeSourceInfoGetTypeForDeclaratorCast (Declarator &D, QualType FromTy)
 
ParsedType CreateParsedType (QualType T, TypeSourceInfo *TInfo)
 Package the given type and TSI into a ParsedType.
 
TypeResult ActOnTypeName (Declarator &D)
 
ParsedType ActOnObjCInstanceType (SourceLocation Loc)
 The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration.
 
bool checkArrayElementAlignment (QualType EltTy, SourceLocation Loc)
 
void diagnoseIgnoredQualifiers (unsigned DiagID, unsigned Quals, SourceLocation FallbackLoc, SourceLocation ConstQualLoc=SourceLocation(), SourceLocation VolatileQualLoc=SourceLocation(), SourceLocation RestrictQualLoc=SourceLocation(), SourceLocation AtomicQualLoc=SourceLocation(), SourceLocation UnalignedQualLoc=SourceLocation())
 
IdentifierInfogetNullabilityKeyword (NullabilityKind nullability)
 Retrieve the keyword associated.
 
bool isCFError (RecordDecl *D)
 
IdentifierInfogetNSErrorIdent ()
 Retrieve the identifier "NSError".
 
void adjustMemberFunctionCC (QualType &T, bool HasThisPointer, bool IsCtorOrDtor, SourceLocation Loc)
 Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly.
 
bool hasExplicitCallingConv (QualType T)
 
bool CheckImplicitNullabilityTypeSpecifier (QualType &Type, NullabilityKind Nullability, SourceLocation DiagLoc, bool AllowArrayTypes, bool OverrideExisting)
 Check whether a nullability type specifier can be added to the given type through some means not written in source (e.g.
 
QualType getCompletedType (Expr *E)
 Get the type of expression E, triggering instantiation to complete the type if necessary – that is, if the expression refers to a templated static data member of incomplete array type.
 
void completeExprArrayBound (Expr *E)
 
bool RequireCompleteExprType (Expr *E, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
 Ensure that the type of the given expression is complete.
 
bool RequireCompleteExprType (Expr *E, unsigned DiagID)
 
template<typename... Ts>
bool RequireCompleteExprType (Expr *E, unsigned DiagID, const Ts &...Args)
 
QualType getElaboratedType (ElaboratedTypeKeyword Keyword, const CXXScopeSpec &SS, QualType T, TagDecl *OwnedTagDecl=nullptr)
 Retrieve a version of the type 'T' that is elaborated by Keyword, qualified by the nested-name-specifier contained in SS, and that is (re)declared by OwnedTagDecl, which is nullptr if this is not a (re)declaration.
 
QualType getDecltypeForExpr (Expr *E)
 getDecltypeForExpr - Given an expr, will return the decltype for that expression, according to the rules in C++11 [dcl.type.simple]p4 and C++11 [expr.lambda.prim]p18.
 
QualType BuildTypeofExprType (Expr *E, TypeOfKind Kind)
 
QualType BuildDecltypeType (Expr *E, bool AsUnevaluated=true)
 If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building a type for decltype(auto).
 
QualType ActOnPackIndexingType (QualType Pattern, Expr *IndexExpr, SourceLocation Loc, SourceLocation EllipsisLoc)
 
QualType BuildPackIndexingType (QualType Pattern, Expr *IndexExpr, SourceLocation Loc, SourceLocation EllipsisLoc, bool FullySubstituted=false, ArrayRef< QualType > Expansions={})
 
QualType BuildUnaryTransformType (QualType BaseType, UTTKind UKind, SourceLocation Loc)
 
QualType BuiltinEnumUnderlyingType (QualType BaseType, SourceLocation Loc)
 
QualType BuiltinAddPointer (QualType BaseType, SourceLocation Loc)
 
QualType BuiltinRemovePointer (QualType BaseType, SourceLocation Loc)
 
QualType BuiltinDecay (QualType BaseType, SourceLocation Loc)
 
QualType BuiltinAddReference (QualType BaseType, UTTKind UKind, SourceLocation Loc)
 
QualType BuiltinRemoveExtent (QualType BaseType, UTTKind UKind, SourceLocation Loc)
 
QualType BuiltinRemoveReference (QualType BaseType, UTTKind UKind, SourceLocation Loc)
 
QualType BuiltinChangeCVRQualifiers (QualType BaseType, UTTKind UKind, SourceLocation Loc)
 
QualType BuiltinChangeSignedness (QualType BaseType, UTTKind UKind, SourceLocation Loc)
 
bool RequireLiteralType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
 Ensure that the type T is a literal type.
 
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID)
 
template<typename... Ts>
bool RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
 
bool isCompleteType (SourceLocation Loc, QualType T, CompleteTypeKind Kind=CompleteTypeKind::Default)
 
bool RequireCompleteType (SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
 Ensure that the type T is a complete type.
 
bool RequireCompleteType (SourceLocation Loc, QualType T, CompleteTypeKind Kind, unsigned DiagID)
 
bool RequireCompleteType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
 
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID)
 
template<typename... Ts>
bool RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
 
bool isVisible (const NamedDecl *D)
 Determine whether a declaration is visible to name lookup.
 
bool isReachable (const NamedDecl *D)
 Determine whether a declaration is reachable.
 
bool isAcceptable (const NamedDecl *D, AcceptableKind Kind)
 Determine whether a declaration is acceptable (visible/reachable).
 
bool hasStructuralCompatLayout (Decl *D, Decl *Suggested)
 Determine if D and Suggested have a structurally compatible layout as described in C11 6.2.7/1.
 
bool hasVisibleDefinition (NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
 Determine if D has a visible definition.
 
bool hasVisibleDefinition (const NamedDecl *D)
 
bool hasReachableDefinition (NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
 Determine if D has a reachable definition.
 
bool hasReachableDefinition (NamedDecl *D)
 
bool hasAcceptableDefinition (NamedDecl *D, NamedDecl **Suggested, AcceptableKind Kind, bool OnlyNeedComplete=false)
 
bool hasAcceptableDefinition (NamedDecl *D, AcceptableKind Kind)
 
static int getPrintable (int I)
 
static unsigned getPrintable (unsigned I)
 
static bool getPrintable (bool B)
 
static const char * getPrintable (const char *S)
 
static StringRef getPrintable (StringRef S)
 
static const std::string & getPrintable (const std::string &S)
 
static const IdentifierInfogetPrintable (const IdentifierInfo *II)
 
static DeclarationName getPrintable (DeclarationName N)
 
static QualType getPrintable (QualType T)
 
static SourceRange getPrintable (SourceRange R)
 
static SourceRange getPrintable (SourceLocation L)
 
static SourceRange getPrintable (const Expr *E)
 
static SourceRange getPrintable (TypeLoc TL)
 
static QualType GetTypeFromParser (ParsedType Ty, TypeSourceInfo **TInfo=nullptr)
 

ObjC Declarations

Implementations are in SemaDeclObjC.cpp

enum  ObjCSpecialMethodKind {
  OSMK_None , OSMK_Alloc , OSMK_New , OSMK_Copy ,
  OSMK_RetainingInit , OSMK_NonRetainingInit
}
 
enum  MethodMatchStrategy { MMS_loose , MMS_strict }
 
enum  ObjCContainerKind {
  OCK_None = -1 , OCK_Interface = 0 , OCK_Protocol , OCK_Category ,
  OCK_ClassExtension , OCK_Implementation , OCK_CategoryImplementation
}
 
enum  ResultTypeCompatibilityKind { RTC_Compatible , RTC_Incompatible , RTC_Unknown }
 Describes the compatibility of a result type with its method. More...
 
typedef llvm::SmallPtrSet< Selector, 8 > SelectorSet
 
llvm::MapVector< Selector, SourceLocationReferencedSelectors
 Method selectors used in a @selector expression.
 
GlobalMethodPool MethodPool
 Method Pool - allows efficient lookup when typechecking messages to "id".
 
template<typename T , typename = std::enable_if_t<std::is_base_of<NamedDecl, T>::value>>
bool ActOnDuplicateODRHashDefinition (T *Duplicate, T *Previous)
 Check ODR hashes for C/ObjC when merging types from modules.
 
ObjCContainerKind getObjCContainerKind () const
 
DeclResult actOnObjCTypeParam (Scope *S, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, IdentifierInfo *paramName, SourceLocation paramLoc, SourceLocation colonLoc, ParsedType typeBound)
 
ObjCTypeParamListactOnObjCTypeParamList (Scope *S, SourceLocation lAngleLoc, ArrayRef< Decl * > typeParams, SourceLocation rAngleLoc)
 
void popObjCTypeParamList (Scope *S, ObjCTypeParamList *typeParamList)
 
ObjCInterfaceDeclActOnStartClassInterface (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, SkipBodyInfo *SkipBody)
 
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.
 
DeclActOnCompatibilityAlias (SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation)
 ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias declaration.
 
bool CheckForwardProtocolDeclarationForCircularDependency (IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList)
 
ObjCProtocolDeclActOnStartProtocolInterface (SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody)
 
ObjCCategoryDeclActOnStartCategoryInterface (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)
 
ObjCImplementationDeclActOnStartClassImplementation (SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &AttrList)
 
ObjCCategoryImplDeclActOnStartCategoryImplementation (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.
 
DeclGroupPtrTy ActOnFinishObjCImplementation (Decl *ObjCImpDecl, ArrayRef< Decl * > Decls)
 
DeclGroupPtrTy ActOnForwardProtocolDeclaration (SourceLocation AtProtoclLoc, ArrayRef< IdentifierLocPair > IdentList, const ParsedAttributesView &attrList)
 ActOnForwardProtocolDeclaration - Handle @protocol foo;.
 
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.
 
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.
 
void DiagnoseClassExtensionDupMethods (ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
 DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension.
 
DeclActOnAtEnd (Scope *S, SourceRange AtEnd, ArrayRef< Decl * > allMethods=std::nullopt, ArrayRef< DeclGroupPtrTy > allTUVars=std::nullopt)
 
DeclActOnMethodDeclaration (Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, 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.
 
bool checkInitMethod (ObjCMethodDecl *method, QualType receiverTypeIfCall)
 Check whether the given method, which must be in the 'init' family, is a valid member of that family.
 
void CheckObjCMethodOverride (ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden)
 Check whether the given new method is a valid override of the given overridden method, and set any properties that should be inherited.
 
void CheckObjCMethodDirectOverrides (ObjCMethodDecl *method, ObjCMethodDecl *overridden)
 
void CheckObjCMethodOverrides (ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC)
 
void AddAnyMethodToGlobalPool (Decl *D)
 AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.
 
void ActOnStartOfObjCMethodDef (Scope *S, Decl *D)
 ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST.
 
bool isObjCMethodDecl (Decl *D)
 
void CheckImplementationIvars (ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc)
 CheckImplementationIvars - This routine checks if the instance variables listed in the implelementation match those listed in the interface.
 
void WarnConflictingTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
 
void CheckConflictingOverridingMethod (ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl)
 
void WarnExactTypedMethods (ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
 WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches exactly that of its declaration.
 
void MatchAllMethodDeclarations (const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl=false)
 MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declared in their implementations.
 
void CheckCategoryVsClassMethodMatches (ObjCCategoryImplDecl *CatIMP)
 CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those implemented in its primary class and warns each time an exact match is found.
 
void 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.
 
DeclGroupPtrTy ActOnForwardClassDeclaration (SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef< ObjCTypeParamList * > TypeParamLists, unsigned NumElts)
 
bool MatchTwoMethodDeclarations (const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict)
 MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false, accordingly.
 
void addMethodToGlobalList (ObjCMethodList *List, ObjCMethodDecl *Method)
 Add the given method to the list of globally-known methods.
 
void ReadMethodPool (Selector Sel)
 Read the contents of the method pool for a given selector from external storage.
 
void updateOutOfDateSelector (Selector Sel)
 
bool CollectMultipleMethodsInGlobalPool (Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool InstanceFirst, bool CheckTheOther, const ObjCObjectType *TypeBound=nullptr)
 We first select the type of the method: Instance or Factory, then collect all methods with that type.
 
bool AreMultipleMethodsInGlobalPool (Selector Sel, ObjCMethodDecl *BestMethod, SourceRange R, bool receiverIdOrClass, SmallVectorImpl< ObjCMethodDecl * > &Methods)
 
void DiagnoseMultipleMethodInGlobalPool (SmallVectorImpl< ObjCMethodDecl * > &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass)
 
const ObjCMethodDeclSelectorsForTypoCorrection (Selector Sel, QualType ObjectType=QualType())
 
ObjCMethodDeclLookupImplementedMethodInGlobalPool (Selector Sel)
 LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.
 
void DiagnoseDuplicateIvars (ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID)
 DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementation.
 
bool CheckObjCDeclScope (Decl *D)
 Checks that the Objective-C declaration is declared in the global scope.
 
void ActOnDefs (Scope *S, Decl *TagD, SourceLocation DeclStart, IdentifierInfo *ClassName, SmallVectorImpl< Decl * > &Decls)
 Called whenever @defs(ClassName) is encountered in the source.
 
VarDeclBuildObjCExceptionDecl (TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid=false)
 Build a type-check a new Objective-C exception variable declaration.
 
DeclActOnObjCExceptionDecl (Scope *S, Declarator &D)
 
void CollectIvarsToConstructOrDestruct (ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars)
 CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.
 
void DiagnoseUseOfUnimplementedSelectors ()
 
void DiagnoseUnusedBackingIvarInAccessor (Scope *S, const ObjCImplementationDecl *ImplD)
 DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is not used in the property's accessor.
 
ObjCIvarDeclGetIvarBackingPropertyAccessor (const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const
 GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ivar, returns this ivar; otherwise, returns NULL.
 
void AddInstanceMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false)
 AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool.
 
void AddFactoryMethodToGlobalPool (ObjCMethodDecl *Method, bool impl=false)
 AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
 

ObjC Expressions

Implementations are in SemaExprObjC.cpp

enum  ObjCMessageKind { ObjCSuperMessage , ObjCInstanceMessage , ObjCClassMessage }
 Describes the kind of message expression indicated by a message send that starts with an identifier. More...
 
enum  ARCConversionResult { ACR_okay , ACR_unbridged , ACR_error }
 
std::unique_ptr< NSAPINSAPIObj
 Caches identifiers/selectors for NSFoundation APIs.
 
ObjCInterfaceDeclNSNumberDecl
 The declaration of the Objective-C NSNumber class.
 
ObjCInterfaceDeclNSValueDecl
 The declaration of the Objective-C NSValue class.
 
QualType NSNumberPointer
 Pointer to NSNumber type (NSNumber *).
 
QualType NSValuePointer
 Pointer to NSValue type (NSValue *).
 
ObjCMethodDeclNSNumberLiteralMethods [NSAPI::NumNSNumberLiteralMethods]
 The Objective-C NSNumber methods used to create NSNumber literals.
 
ObjCInterfaceDeclNSStringDecl
 The declaration of the Objective-C NSString class.
 
QualType NSStringPointer
 Pointer to NSString type (NSString *).
 
ObjCMethodDeclStringWithUTF8StringMethod
 The declaration of the stringWithUTF8String: method.
 
ObjCMethodDeclValueWithBytesObjCTypeMethod
 The declaration of the valueWithBytes:objCType: method.
 
ObjCInterfaceDeclNSArrayDecl
 The declaration of the Objective-C NSArray class.
 
ObjCMethodDeclArrayWithObjectsMethod
 The declaration of the arrayWithObjects:count: method.
 
ObjCInterfaceDeclNSDictionaryDecl
 The declaration of the Objective-C NSDictionary class.
 
ObjCMethodDeclDictionaryWithObjectsMethod
 The declaration of the dictionaryWithObjects:forKeys:count: method.
 
QualType QIDNSCopying
 id<NSCopying> type.
 
Selector RespondsToSelectorSel
 will hold 'respondsToSelector:'
 
ExprResult HandleExprPropertyRefExpr (const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
 HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface.
 
ExprResult ActOnClassPropertyRefExpr (IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc)
 
ExprResult ParseObjCStringLiteral (SourceLocation *AtLocs, ArrayRef< Expr * > Strings)
 
ExprResult BuildObjCStringLiteral (SourceLocation AtLoc, StringLiteral *S)
 
ExprResult BuildObjCNumericLiteral (SourceLocation AtLoc, Expr *Number)
 BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression.
 
ExprResult ActOnObjCBoolLiteral (SourceLocation AtLoc, SourceLocation ValueLoc, bool Value)
 
ExprResult BuildObjCArrayLiteral (SourceRange SR, MultiExprArg Elements)
 
ExprResult BuildObjCBoxedExpr (SourceRange SR, Expr *ValueExpr)
 BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression.
 
ExprResult BuildObjCSubscriptExpression (SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
 Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime.
 
ExprResult BuildObjCDictionaryLiteral (SourceRange SR, 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.
 
ExprResult ParseObjCProtocolExpression (IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc)
 ParseObjCProtocolExpression - Build protocol expression for @protocol.
 
ObjCMethodDecltryCaptureObjCSelf (SourceLocation Loc)
 Try to capture an implicit reference to 'self'.
 
ObjCMessageKind getObjCMessageKind (Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType)
 
ExprResult ActOnSuperMessage (Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
 
ExprResult BuildClassMessage (TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
 Build an Objective-C class message expression.
 
ExprResult BuildClassMessageImplicit (QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
 
ExprResult ActOnClassMessage (Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
 
ExprResult BuildInstanceMessage (Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
 Build an Objective-C instance message expression.
 
ExprResult BuildInstanceMessageImplicit (Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
 
ExprResult ActOnInstanceMessage (Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
 
ExprResult BuildObjCBridgedCast (SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr)
 
ExprResult ActOnObjCBridgedCast (Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr)
 
void CheckTollFreeBridgeCast (QualType castType, Expr *castExpr)
 
void CheckObjCBridgeRelatedCast (QualType castType, Expr *castExpr)
 
bool CheckTollFreeBridgeStaticCast (QualType castType, Expr *castExpr, CastKind &Kind)
 
bool checkObjCBridgeRelatedComponents (SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose=true)
 
bool CheckObjCBridgeRelatedConversions (SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose=true)
 
bool isSelfExpr (Expr *RExpr)
 Private Helper predicate to check for 'self'.
 
bool isSelfExpr (Expr *RExpr, const ObjCMethodDecl *Method)
 
ObjCMethodDeclLookupMethodInQualifiedType (Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
 LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type.
 
ObjCMethodDeclLookupMethodInObjectType (Selector Sel, QualType Ty, bool IsInstance)
 LookupMethodInType - Look up a method in an ObjCObjectType.
 
bool isKnownName (StringRef name)
 
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.
 
ExprstripARCUnbridgedCast (Expr *e)
 stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.
 
void diagnoseARCUnbridgedCast (Expr *e)
 Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly.
 
bool CheckObjCARCUnavailableWeakConversion (QualType castType, QualType ExprType)
 
bool CheckMessageArgumentTypes (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.
 
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.
 
void EmitRelatedResultTypeNote (const Expr *E)
 If the given expression involves a message send to a method with a related result type, emit a note describing what happened.
 
void EmitRelatedResultTypeNoteForReturn (QualType destType)
 Given that we had incompatible pointer types in a return statement, check whether we're in a method with a related result type, and if so, emit a note describing what happened.
 
ObjCMethodDeclLookupInstanceMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false)
 LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
 
ObjCMethodDeclLookupFactoryMethodInGlobalPool (Selector Sel, SourceRange R, bool receiverIdOrClass=false)
 LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
 

Code Completion

Implementations are in SemaCodeComplete.cpp

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 , PCC_TopLevelOrExpression
}
 Describes the context in which code completion occurs. More...
 
enum class  AttributeCompletion { Attribute , Scope , None }
 
CodeCompleteConsumerCodeCompleter
 Code-completion consumer.
 
void CodeCompleteModuleImport (SourceLocation ImportLoc, ModuleIdPath Path)
 
void CodeCompleteOrdinaryName (Scope *S, ParserCompletionContext CompletionContext)
 
void CodeCompleteDeclSpec (Scope *S, DeclSpec &DS, bool AllowNonIdentifiers, bool AllowNestedNameSpecifiers)
 
void CodeCompleteExpression (Scope *S, const CodeCompleteExpressionData &Data)
 Perform code-completion in an expression context when we know what type we're looking for.
 
void 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)
 
void CodeCompleteAttribute (AttributeCommonInfo::Syntax Syntax, AttributeCompletion Completion=AttributeCompletion::Attribute, const IdentifierInfo *Scope=nullptr)
 
QualType ProduceCallSignatureHelp (Expr *Fn, ArrayRef< Expr * > Args, SourceLocation OpenParLoc)
 Determines the preferred type of the current function argument, by examining the signatures of all possible overloads.
 
QualType ProduceConstructorSignatureHelp (QualType Type, SourceLocation Loc, ArrayRef< Expr * > Args, SourceLocation OpenParLoc, bool Braced)
 
QualType ProduceCtorInitMemberSignatureHelp (Decl *ConstructorDecl, CXXScopeSpec SS, ParsedType TemplateTypeTy, ArrayRef< Expr * > ArgExprs, IdentifierInfo *II, SourceLocation OpenParLoc, bool Braced)
 
QualType ProduceTemplateArgumentSignatureHelp (TemplateTy, ArrayRef< ParsedTemplateArgument >, SourceLocation LAngleLoc)
 
void CodeCompleteInitializer (Scope *S, Decl *D)
 
void CodeCompleteDesignator (const QualType BaseType, llvm::ArrayRef< Expr * > InitExprs, const Designation &D)
 Trigger code completion for a record of BaseType.
 
void CodeCompleteAfterIf (Scope *S, bool IsBracedThen)
 
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 CodeCompleteAfterFunctionEquals (Declarator &D)
 
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 CodeCompleteObjCClassForwardDecl (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, std::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)
 

CUDA

Implementations are in SemaCUDA.cpp

enum  CUDAVariableTarget { CVT_Device , CVT_Host , CVT_Both , CVT_Unified }
 
enum  CUDATargetContextKind { CTCK_Unknown , CTCK_InitGlobalVar }
 Defines kinds of CUDA global host/device context where a function may be called. More...
 
enum  CUDAFunctionPreference {
  CFP_Never , CFP_WrongSide , CFP_HostDevice , CFP_SameSide ,
  CFP_Native
}
 
llvm::DenseMap< CanonicalDeclPtr< const FunctionDecl >, std::vector< PartialDiagnosticAt > > DeviceDeferredDiags
 Diagnostics that are emitted only if we discover that the given function must be codegen'ed.
 
llvm::DenseSet< FunctionDeclAndLocLocsWithCUDACallDiags
 FunctionDecls and SourceLocations for which CheckCUDACall has emitted a (maybe deferred) "bad call" diagnostic.
 
llvm::DenseMap< CanonicalDeclPtr< const FunctionDecl >, FunctionDeclAndLocDeviceKnownEmittedFns
 An inverse call graph, mapping known-emitted functions to one of their known-emitted callers (plus the location of the call).
 
struct clang::Sema::CUDATargetContext CurCUDATargetCtx
 
void PushForceCUDAHostDevice ()
 Increments our count of the number of times we've seen a pragma forcing functions to be host device.
 
bool PopForceCUDAHostDevice ()
 Decrements our count of the number of times we've seen a pragma forcing functions to be host device.
 
ExprResult ActOnCUDAExecConfigExpr (Scope *S, SourceLocation LLLLoc, MultiExprArg ExecConfig, SourceLocation GGGLoc)
 
SemaDiagnosticBuilder CUDADiagIfDeviceCode (SourceLocation Loc, unsigned DiagID)
 Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device code".
 
SemaDiagnosticBuilder CUDADiagIfHostCode (SourceLocation Loc, unsigned DiagID)
 Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host code".
 
CUDAFunctionTarget IdentifyCUDATarget (const FunctionDecl *D, bool IgnoreImplicitHDAttr=false)
 Determines whether the given function is a CUDA device/host/kernel/etc.
 
CUDAFunctionTarget IdentifyCUDATarget (const ParsedAttributesView &Attrs)
 
CUDAVariableTarget IdentifyCUDATarget (const VarDecl *D)
 Determines whether the given variable is emitted on host or device side.
 
CUDAFunctionTarget CurrentCUDATarget ()
 Gets the CUDA target for the current context.
 
CUDAFunctionPreference IdentifyCUDAPreference (const FunctionDecl *Caller, const FunctionDecl *Callee)
 Identifies relative preference of a given Caller/Callee combination, based on their host/device attributes.
 
bool IsAllowedCUDACall (const FunctionDecl *Caller, const FunctionDecl *Callee)
 Determines whether Caller may invoke Callee, based on their CUDA host/device attributes.
 
void maybeAddCUDAHostDeviceAttrs (FunctionDecl *FD, const LookupResult &Previous)
 May add implicit CUDAHostAttr and CUDADeviceAttr attributes to FD, depending on FD and the current compilation settings.
 
void MaybeAddCUDAConstantAttr (VarDecl *VD)
 May add implicit CUDAConstantAttr attribute to VD, depending on VD and current compilation settings.
 
bool CheckCUDACall (SourceLocation Loc, FunctionDecl *Callee)
 Check whether we're allowed to call Callee from the current context.
 
void CUDACheckLambdaCapture (CXXMethodDecl *D, const sema::Capture &Capture)
 
void CUDASetLambdaAttrs (CXXMethodDecl *Method)
 Set device or host device attributes on the given lambda operator() method.
 
void CUDARecordImplicitHostDeviceFuncUsedByDevice (const FunctionDecl *FD)
 Record FD if it is a CUDA/HIP implicit host device function used on device side in device compilation.
 
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.
 
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.
 
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.
 
void inheritCUDATargetAttrs (FunctionDecl *FD, const FunctionTemplateDecl &TD)
 Copies target attributes from the template TD to the function FD.
 
std::string getCudaConfigureFuncName () const
 Returns the name of the launch configuration function.
 
static bool isCUDAImplicitHostDeviceFunction (const FunctionDecl *D)
 

C++ Template Argument Deduction

Implementations are in SemaTemplateDeduction.cpp

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.
 
bool AccessCheckingSFINAE
 When true, access checking violations are treated as SFINAE failures rather than hard errors.
 
SuppressedDiagnosticsMap SuppressedDiagnostics
 
bool isSameOrCompatibleFunctionType (QualType Param, QualType Arg)
 Compare types for equality with respect to possibly compatible function types (noreturn adjustment, implicit calling conventions).
 
TemplateArgumentLoc getTrivialTemplateArgumentLoc (const TemplateArgument &Arg, QualType NTTPType, SourceLocation Loc)
 Allocate a TemplateArgumentLoc where all locations have been initialized to the given location.
 
TemplateArgumentLoc getIdentityTemplateArgumentLoc (NamedDecl *Param, SourceLocation Location)
 Get a template argument mapping the given template parameter to itself, e.g.
 
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.
 
TemplateDeductionResult DeduceTemplateArguments (ClassTemplatePartialSpecializationDecl *Partial, ArrayRef< TemplateArgument > TemplateArgs, sema::TemplateDeductionInfo &Info)
 Perform template argument deduction to determine whether the given template arguments match the given class template partial specialization per C++ [temp.class.spec.match].
 
TemplateDeductionResult DeduceTemplateArguments (VarTemplatePartialSpecializationDecl *Partial, ArrayRef< TemplateArgument > TemplateArgs, sema::TemplateDeductionInfo &Info)
 Perform template argument deduction to determine whether the given template arguments match the given variable template partial specialization per C++ [temp.class.spec.match].
 
TemplateDeductionResult DeduceTemplateArguments (TemplateParameterList *TemplateParams, ArrayRef< TemplateArgument > Ps, ArrayRef< TemplateArgument > As, sema::TemplateDeductionInfo &Info, SmallVectorImpl< DeducedTemplateArgument > &Deduced, bool NumberOfArgumentsMustMatch)
 
TemplateDeductionResult SubstituteExplicitTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo &ExplicitTemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, SmallVectorImpl< QualType > &ParamTypes, QualType *FunctionType, sema::TemplateDeductionInfo &Info)
 Substitute the explicitly-provided template arguments into the given function template according to C++ [temp.arg.explicit].
 
TemplateDeductionResult FinishTemplateArgumentDeduction (FunctionTemplateDecl *FunctionTemplate, SmallVectorImpl< DeducedTemplateArgument > &Deduced, unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, SmallVectorImpl< OriginalCallArg > const *OriginalCallArgs=nullptr, bool PartialOverloading=false, 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.
 
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool PartialOverloading, bool AggregateDeductionCandidate, QualType ObjectType, Expr::Classification ObjectClassification, llvm::function_ref< bool(ArrayRef< QualType >)> CheckNonDependent)
 Perform template argument deduction from a function call (C++ [temp.deduct.call]).
 
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ArgFunctionType, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool IsAddressOfFunction=false)
 Deduce template arguments when taking the address of a function template (C++ [temp.deduct.funcaddr]) or matching a specialization to a template.
 
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, QualType ObjectType, Expr::Classification ObjectClassification, QualType ToType, CXXConversionDecl *&Specialization, sema::TemplateDeductionInfo &Info)
 Deduce template arguments for a templated conversion function (C++ [temp.deduct.conv]) and, if successful, produce a conversion function template specialization.
 
TemplateDeductionResult DeduceTemplateArguments (FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo *ExplicitTemplateArgs, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, bool IsAddressOfFunction=false)
 Deduce template arguments for a function template when there is nothing to deduce against (C++0x [temp.arg.explicit]p3).
 
QualType SubstAutoType (QualType TypeWithAuto, QualType Replacement)
 Substitute Replacement for auto in TypeWithAuto.
 
TypeSourceInfoSubstAutoTypeSourceInfo (TypeSourceInfo *TypeWithAuto, QualType Replacement)
 Substitute Replacement for auto in TypeWithAuto.
 
QualType SubstAutoTypeDependent (QualType TypeWithAuto)
 
TypeSourceInfoSubstAutoTypeSourceInfoDependent (TypeSourceInfo *TypeWithAuto)
 
QualType ReplaceAutoType (QualType TypeWithAuto, QualType Replacement)
 Completely replace the auto in TypeWithAuto by Replacement.
 
TypeSourceInfoReplaceAutoTypeSourceInfo (TypeSourceInfo *TypeWithAuto, QualType Replacement)
 
TemplateDeductionResult DeduceAutoType (TypeLoc AutoTypeLoc, Expr *Initializer, QualType &Result, sema::TemplateDeductionInfo &Info, bool DependentDeduction=false, bool IgnoreConstraints=false, TemplateSpecCandidateSet *FailedTSC=nullptr)
 Deduce the type for an auto type-specifier (C++11 [dcl.spec.auto]p6)
 
void DiagnoseAutoDeductionFailure (VarDecl *VDecl, Expr *Init)
 
bool DeduceReturnType (FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true)
 
bool CheckIfFunctionSpecializationIsImmediate (FunctionDecl *FD, SourceLocation Loc)
 
ClassTemplatePartialSpecializationDeclgetMoreSpecializedPartialSpecialization (ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
 Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]).
 
bool isMoreSpecializedThanPrimary (ClassTemplatePartialSpecializationDecl *T, sema::TemplateDeductionInfo &Info)
 
VarTemplatePartialSpecializationDeclgetMoreSpecializedPartialSpecialization (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.
 
void MarkUsedTemplateParameters (const TemplateArgumentList &TemplateArgs, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
 Mark which template parameters can be deduced from a given template argument list.
 
void MarkDeducedTemplateParameters (const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
 
FunctionTemplateDeclgetMoreSpecializedTemplate (FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, QualType RawObj1Ty={}, QualType RawObj2Ty={}, bool Reversed=false)
 Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]).
 
UnresolvedSetIterator getMostSpecialized (UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplateSpecCandidateSet &FailedCandidates, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain=true, QualType TargetType=QualType())
 Retrieve the most specialized of the given function template specializations.
 
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.
 

C++ Template Instantiation

Implementations are in SemaTemplateInstantiate.cpp

typedef llvm::DenseMap< ParmVarDecl *, llvm::TinyPtrVector< ParmVarDecl * > > UnparsedDefaultArgInstantiationsMap
 
LocalInstantiationScopeCurrentInstantiationScope
 The current instantiation scope used to store local variables.
 
UnparsedDefaultArgInstantiationsMap UnparsedDefaultArgInstantiations
 A mapping from parameters with unparsed default arguments to the set of instantiations of each parameter.
 
SmallVector< CodeSynthesisContext, 16 > CodeSynthesisContexts
 List of active code synthesis contexts.
 
llvm::DenseSet< std::pair< Decl *, unsigned > > InstantiatingSpecializations
 Specializations whose definitions are currently being instantiated.
 
llvm::DenseSet< QualTypeInstantiatedNonDependentTypes
 Non-dependent types used in templates that have already been instantiated by some template instantiation.
 
SmallVector< Module *, 16 > CodeSynthesisContextLookupModules
 Extra modules inspected when performing a lookup during a template instantiation.
 
llvm::DenseSet< Module * > LookupModulesCache
 Cache of additional modules that should be used for name lookup within the current template instantiation.
 
llvm::DenseMap< NamedDecl *, NamedDecl * > VisibleNamespaceCache
 Map from the most recent declaration of a namespace to the most recent visible declaration of that namespace.
 
bool InNonInstantiationSFINAEContext
 Whether we are in a SFINAE context that is not associated with template instantiation.
 
unsigned NonInstantiationEntries
 The number of CodeSynthesisContexts that are not template instantiations and, therefore, should not be counted as part of the instantiation depth.
 
unsigned LastEmittedCodeSynthesisContextDepth = 0
 The depth of the context stack at the point when the most recent error or warning was produced.
 
std::vector< std::unique_ptr< TemplateInstantiationCallback > > TemplateInstCallbacks
 The template instantiation callbacks to trace or track instantiations (objects can be chained).
 
int ArgumentPackSubstitutionIndex
 The current index into pack expansion arguments that will be used for substitution of parameter packs.
 
class ArgumentPackSubstitutionRAII
 
bool SubstTemplateArgument (const TemplateArgumentLoc &Input, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateArgumentLoc &Output)
 
bool SubstTemplateArguments (ArrayRef< TemplateArgumentLoc > Args, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateArgumentListInfo &Outputs)
 
MultiLevelTemplateArgumentList getTemplateInstantiationArgs (const NamedDecl *D, const DeclContext *DC=nullptr, bool Final=false, std::optional< ArrayRef< TemplateArgument > > Innermost=std::nullopt, bool RelativeToPrimary=false, const FunctionDecl *Pattern=nullptr, bool ForConstraintInstantiation=false, bool SkipForSpecialization=false)
 Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.
 
void pushCodeSynthesisContext (CodeSynthesisContext Ctx)
 
void popCodeSynthesisContext ()
 
void PrintContextStack ()
 
void PrintInstantiationStack ()
 Prints the current instantiation stack through a series of notes.
 
std::optional< sema::TemplateDeductionInfo * > isSFINAEContext () const
 Determines whether we are currently in a context where template argument substitution failures are not considered errors.
 
TypeSourceInfoSubstType (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.
 
QualType SubstType (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
 Deprecated form of the above.
 
TypeSourceInfoSubstType (TypeLoc TL, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity)
 
TypeSourceInfoSubstFunctionDeclType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext, Qualifiers ThisTypeQuals, bool EvaluateConstraints=true)
 A form of SubstType intended specifically for instantiating the type of a FunctionDecl.
 
void SubstExceptionSpec (FunctionDecl *New, const FunctionProtoType *Proto, const MultiLevelTemplateArgumentList &Args)
 
bool SubstExceptionSpec (SourceLocation Loc, FunctionProtoType::ExceptionSpecInfo &ESI, SmallVectorImpl< QualType > &ExceptionStorage, const MultiLevelTemplateArgumentList &Args)
 
ParmVarDeclSubstParmVarDecl (ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, std::optional< unsigned > NumExpansions, bool ExpectParameterPack, bool EvaluateConstraints=true)
 
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.
 
bool SubstDefaultArgument (SourceLocation Loc, ParmVarDecl *Param, const MultiLevelTemplateArgumentList &TemplateArgs, bool ForCallExpr=false)
 Substitute the given template arguments into the default argument.
 
ExprResult SubstExpr (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
 
ExprResult SubstConstraintExpr (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
 
ExprResult SubstConstraintExprWithoutSatisfaction (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.
 
StmtResult SubstStmt (Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs)
 
ExprResult SubstInitializer (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs, bool CXXDirectInit)
 
bool SubstBaseSpecifiers (CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
 Perform substitution on the base class specifiers of the given class template specialization.
 
bool InstantiateClass (SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true)
 Instantiate the definition of a class from a given pattern.
 
bool InstantiateEnum (SourceLocation PointOfInstantiation, EnumDecl *Instantiation, EnumDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
 Instantiate the definition of an enum from a given pattern.
 
bool InstantiateInClassInitializer (SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
 Instantiate the definition of a field from the given pattern.
 
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.
 
void InstantiateClassTemplateSpecializationMembers (SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK)
 Instantiate the definitions of all of the members of the given class template specialization, which was named as part of an explicit instantiation.
 
NestedNameSpecifierLoc SubstNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS, const MultiLevelTemplateArgumentList &TemplateArgs)
 
DeclarationNameInfo SubstDeclarationNameInfo (const DeclarationNameInfo &NameInfo, const MultiLevelTemplateArgumentList &TemplateArgs)
 Do template substitution on declaration name info.
 
TemplateName SubstTemplateName (NestedNameSpecifierLoc QualifierLoc, TemplateName Name, SourceLocation Loc, const MultiLevelTemplateArgumentList &TemplateArgs)
 
bool SubstTypeConstraint (TemplateTypeParmDecl *Inst, const TypeConstraint *TC, const MultiLevelTemplateArgumentList &TemplateArgs, bool EvaluateConstraint)
 
bool inTemplateInstantiation () const
 Determine whether we are currently performing template instantiation.
 

C++ Template Declaration Instantiation

Implementations are in SemaTemplateInstantiateDecl.cpp

typedef std::pair< ValueDecl *, SourceLocationPendingImplicitInstantiation
 An entity for which implicit template instantiation is required.
 
typedef SmallVector< LateInstantiatedAttribute, 16 > LateInstantiatedAttrVec
 
std::deque< PendingImplicitInstantiationPendingInstantiations
 The queue of implicit template instantiations that are required but have not yet been performed.
 
SmallVector< PendingImplicitInstantiation, 1 > LateParsedInstantiations
 Queue of implicit template instantiations that cannot be performed eagerly.
 
SmallVector< SmallVector< VTableUse, 16 >, 8 > SavedVTableUses
 
SmallVector< std::deque< PendingImplicitInstantiation >, 8 > SavedPendingInstantiations
 
std::deque< PendingImplicitInstantiationPendingLocalImplicitInstantiations
 The queue of implicit template instantiations that are required and must be performed within the current local scope.
 
ExplicitSpecifier instantiateExplicitSpecifier (const MultiLevelTemplateArgumentList &TemplateArgs, ExplicitSpecifier ES)
 
void InstantiateAttrs (const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
 
void updateAttrsForLateParsedTemplate (const Decl *Pattern, Decl *Inst)
 Update instantiation attributes after template was late parsed.
 
void InstantiateAttrsForDecl (const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
 
void InstantiateDefaultCtorDefaultArgs (CXXConstructorDecl *Ctor)
 In the MS ABI, we need to instantiate default arguments of dllexported default constructors along with the constructor definition.
 
bool InstantiateDefaultArgument (SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
 
void InstantiateExceptionSpec (SourceLocation PointOfInstantiation, FunctionDecl *Function)
 
FunctionDeclInstantiateFunctionDeclaration (FunctionTemplateDecl *FTD, const TemplateArgumentList *Args, SourceLocation Loc, CodeSynthesisContext::SynthesisKind CSC=CodeSynthesisContext::ExplicitTemplateArgumentSubstitution)
 Instantiate (or find existing instantiation of) a function template with a given set of template arguments.
 
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.
 
VarTemplateSpecializationDeclBuildVarTemplateInstantiation (VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList *PartialSpecArgs, const TemplateArgumentListInfo &TemplateArgsInfo, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr)
 
VarTemplateSpecializationDeclCompleteVarTemplateSpecializationDecl (VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs)
 Instantiates a variable template specialization by completing it with appropriate type information and initializer.
 
void BuildVariableInstantiation (VarDecl *NewVar, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs, LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, bool InstantiatingVarTemplate=false, VarTemplateSpecializationDecl *PrevVTSD=nullptr)
 BuildVariableInstantiation - Used after a new variable has been created.
 
void InstantiateVariableInitializer (VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs)
 Instantiate the initializer of a variable.
 
void InstantiateVariableDefinition (SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false, bool AtEndOfTU=false)
 Instantiate the definition of the given variable from its template.
 
void InstantiateMemInitializers (CXXConstructorDecl *New, const CXXConstructorDecl *Tmpl, const MultiLevelTemplateArgumentList &TemplateArgs)
 
NamedDeclFindInstantiatedDecl (SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext=false)
 Find the instantiation of the given declaration within the current instantiation.
 
DeclContextFindInstantiatedContext (SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs)
 Finds the instantiation of the given declaration context within the current instantiation.
 
DeclSubstDecl (Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
 
FunctionDeclSubstSpaceshipAsEqualEqual (CXXRecordDecl *RD, FunctionDecl *Spaceship)
 Substitute the name and return type of a defaulted 'operator<=>' to form an implicit 'operator=='.
 
void PerformPendingInstantiations (bool LocalOnly=false)
 Performs template instantiation for all implicit template instantiations we have seen until this point.
 
TemplateParameterListSubstTemplateParams (TemplateParameterList *Params, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs, bool EvaluateConstraints=true)
 
void PerformDependentDiagnostics (const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
 

Constraints and Concepts

Implementations are in SemaConcept.cpp

using SatisfactionStackEntryTy = std::pair< const NamedDecl *, llvm::FoldingSetNodeID >
 
void PushSatisfactionStackEntry (const NamedDecl *D, const llvm::FoldingSetNodeID &ID)
 
void PopSatisfactionStackEntry ()
 
bool SatisfactionStackContains (const NamedDecl *D, const llvm::FoldingSetNodeID &ID) const
 
void SwapSatisfactionStack (llvm::SmallVectorImpl< SatisfactionStackEntryTy > &NewSS)
 
bool CheckConstraintExpression (const Expr *CE, Token NextToken=Token(), bool *PossibleNonPrimary=nullptr, bool IsTrailingRequiresClause=false)
 Check whether the given expression is a valid constraint expression.
 
bool CheckConstraintSatisfaction (const NamedDecl *Template, ArrayRef< const Expr * > ConstraintExprs, const MultiLevelTemplateArgumentList &TemplateArgLists, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction)
 Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given template arguments.
 
bool CheckConstraintSatisfaction (const NamedDecl *Template, ArrayRef< const Expr * > ConstraintExprs, llvm::SmallVectorImpl< Expr * > &ConvertedConstraints, const MultiLevelTemplateArgumentList &TemplateArgList, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction)
 Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given template arguments.
 
bool CheckConstraintSatisfaction (const Expr *ConstraintExpr, ConstraintSatisfaction &Satisfaction)
 Check whether the given non-dependent constraint expression is satisfied.
 
bool CheckFunctionConstraints (const FunctionDecl *FD, ConstraintSatisfaction &Satisfaction, SourceLocation UsageLoc=SourceLocation(), bool ForOverloadResolution=false)
 Check whether the given function decl's trailing requires clause is satisfied, if any.
 
bool AreConstraintExpressionsEqual (const NamedDecl *Old, const Expr *OldConstr, const TemplateCompareNewDeclInfo &New, const Expr *NewConstr)
 
bool FriendConstraintsDependOnEnclosingTemplate (const FunctionDecl *FD)
 
bool EnsureTemplateArgumentListConstraints (TemplateDecl *Template, const MultiLevelTemplateArgumentList &TemplateArgs, SourceRange TemplateIDRange)
 Ensure that the given template arguments satisfy the constraints associated with the given template, emitting a diagnostic if they do not.
 
bool CheckInstantiatedFunctionTemplateConstraints (SourceLocation PointOfInstantiation, FunctionDecl *Decl, ArrayRef< TemplateArgument > TemplateArgs, ConstraintSatisfaction &Satisfaction)
 
void DiagnoseUnsatisfiedConstraint (const ConstraintSatisfaction &Satisfaction, bool First=true)
 Emit diagnostics explaining why a constraint expression was deemed unsatisfied.
 
void DiagnoseUnsatisfiedConstraint (const ASTConstraintSatisfaction &Satisfaction, bool First=true)
 Emit diagnostics explaining why a constraint expression was deemed unsatisfied.
 
const NormalizedConstraintgetNormalizedAssociatedConstraints (NamedDecl *ConstrainedDecl, ArrayRef< const Expr * > AssociatedConstraints)
 
bool IsAtLeastAsConstrained (NamedDecl *D1, MutableArrayRef< const Expr * > AC1, NamedDecl *D2, MutableArrayRef< 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.
 
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.
 

OpenMP Directives and Clauses

Implementations are in SemaOpenMP.cpp

using VarsWithInheritedDSAType = llvm::SmallDenseMap< const ValueDecl *, const Expr *, 4 >
 
SemaDiagnosticBuilder diagIfOpenMPDeviceCode (SourceLocation Loc, unsigned DiagID, const FunctionDecl *FD)
 Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device code".
 
SemaDiagnosticBuilder diagIfOpenMPHostCode (SourceLocation Loc, unsigned DiagID, const FunctionDecl *FD)
 Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host code".
 
void ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope (Decl *D, SmallVectorImpl< FunctionDecl * > &Bases)
 Register D as specialization of all base functions in Bases in the current omp begin/end declare variant scope.
 
void ActOnFinishedFunctionDefinitionInOpenMPAssumeScope (Decl *D)
 Act on D, a function definition inside of an omp [begin/end] assumes.
 
bool isInOpenMPDeclareVariantScope () const
 Can we exit an OpenMP declare variant scope at the moment.
 
ExprResult VerifyPositiveIntegerConstantInClause (Expr *Op, OpenMPClauseKind CKind, bool StrictlyPositive=true, bool SuppressExprDiags=false)
 
ExprResult ActOnOpenMPCall (ExprResult Call, Scope *Scope, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig)
 Given the potential call expression Call, determine if there is a specialization via the OpenMP declare variant mechanism available.
 
void ActOnOpenMPBeginDeclareVariant (SourceLocation Loc, OMPTraitInfo &TI)
 Handle a omp begin declare variant.
 
void ActOnOpenMPEndDeclareVariant ()
 Handle a omp end declare variant.
 
void tryCaptureOpenMPLambdas (ValueDecl *V)
 Function tries to capture lambda's captured variables in the OpenMP region before the original lambda is captured.
 
bool isOpenMPCapturedByRef (const ValueDecl *D, unsigned Level, unsigned OpenMPCaptureLevel) const
 Return true if the provided declaration VD should be captured by reference.
 
VarDeclisOpenMPCapturedDecl (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.
 
bool isOpenMPRebuildMemberExpr (ValueDecl *D)
 The member expression(this->fd) needs to be rebuilt in the template instantiation to generate private copy for OpenMP when default clause is used.
 
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.
 
void startOpenMPCXXRangeFor ()
 If the current region is a range loop-based region, mark the start of the loop construct.
 
OpenMPClauseKind isOpenMPPrivateDecl (ValueDecl *D, unsigned Level, unsigned CapLevel) const
 Check if the specified variable is used in 'private' clause.
 
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.
 
bool isOpenMPTargetCapturedDecl (const ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
 Check if the specified variable is captured by 'target' directive.
 
bool isOpenMPGlobalCapturedDecl (ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
 Check if the specified global variable must be captured by outer capture regions.
 
ExprResult PerformOpenMPImplicitIntegerConversion (SourceLocation OpLoc, Expr *Op)
 
void StartOpenMPDSABlock (OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
 Called on start of new data sharing attribute block.
 
void StartOpenMPClause (OpenMPClauseKind K)
 Start analysis of clauses.
 
void EndOpenMPClause ()
 End analysis of clauses.
 
void EndOpenMPDSABlock (Stmt *CurDirective)
 Called on end of data sharing attribute block.
 
void ActOnOpenMPLoopInitialization (SourceLocation ForLoc, Stmt *Init)
 Check if the current region is an OpenMP loop region and if it is, mark loop control variable, used in Init for loop initialization, as private by default.
 
StmtResult ActOnOpenMPMetaDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp metadirective' after parsing of the associated statement.
 
ExprResult ActOnOpenMPIdExpression (Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind)
 Called on correct id-expression from the '#pragma omp threadprivate'.
 
DeclGroupPtrTy ActOnOpenMPThreadprivateDirective (SourceLocation Loc, ArrayRef< Expr * > VarList)
 Called on well-formed '#pragma omp threadprivate'.
 
OMPThreadPrivateDeclCheckOMPThreadPrivateDecl (SourceLocation Loc, ArrayRef< Expr * > VarList)
 Builds a new OpenMPThreadPrivateDecl and checks its correctness.
 
DeclGroupPtrTy ActOnOpenMPAllocateDirective (SourceLocation Loc, ArrayRef< Expr * > VarList, ArrayRef< OMPClause * > Clauses, DeclContext *Owner=nullptr)
 Called on well-formed '#pragma omp allocate'.
 
void ActOnOpenMPAssumesDirective (SourceLocation Loc, OpenMPDirectiveKind DKind, ArrayRef< std::string > Assumptions, bool SkippedClauses)
 Called on well-formed '#pragma omp [begin] assume[s]'.
 
bool isInOpenMPAssumeScope () const
 Check if there is an active global omp begin assumes directive.
 
bool hasGlobalOpenMPAssumes () const
 Check if there is an active global omp assumes directive.
 
void ActOnOpenMPEndAssumesDirective ()
 Called on well-formed '#pragma omp end assumes'.
 
DeclGroupPtrTy ActOnOpenMPRequiresDirective (SourceLocation Loc, ArrayRef< OMPClause * > ClauseList)
 Called on well-formed '#pragma omp requires'.
 
OMPRequiresDeclCheckOMPRequiresDecl (SourceLocation Loc, ArrayRef< OMPClause * > Clauses)
 Check restrictions on Requires directive.
 
QualType ActOnOpenMPDeclareReductionType (SourceLocation TyLoc, TypeResult ParsedType)
 Check if the specified type is allowed to be used in 'omp declare reduction' construct.
 
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'.
 
void ActOnOpenMPDeclareReductionCombinerStart (Scope *S, Decl *D)
 Initialize declare reduction construct initializer.
 
void ActOnOpenMPDeclareReductionCombinerEnd (Decl *D, Expr *Combiner)
 Finish current declare reduction construct initializer.
 
VarDeclActOnOpenMPDeclareReductionInitializerStart (Scope *S, Decl *D)
 Initialize declare reduction construct initializer.
 
void ActOnOpenMPDeclareReductionInitializerEnd (Decl *D, Expr *Initializer, VarDecl *OmpPrivParm)
 Finish current declare reduction construct initializer.
 
DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveEnd (Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid)
 Called at the end of '#pragma omp declare reduction'.
 
TypeResult ActOnOpenMPDeclareMapperVarDecl (Scope *S, Declarator &D)
 Check variable declaration in 'omp declare mapper' construct.
 
QualType ActOnOpenMPDeclareMapperType (SourceLocation TyLoc, TypeResult ParsedType)
 Check if the specified type is allowed to be used in 'omp declare mapper' construct.
 
DeclGroupPtrTy ActOnOpenMPDeclareMapperDirective (Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType, SourceLocation StartLoc, DeclarationName VN, AccessSpecifier AS, Expr *MapperVarRef, ArrayRef< OMPClause * > Clauses, Decl *PrevDeclInScope=nullptr)
 Called on start of '#pragma omp declare mapper'.
 
ExprResult ActOnOpenMPDeclareMapperDirectiveVarDecl (Scope *S, QualType MapperType, SourceLocation StartLoc, DeclarationName VN)
 Build the mapper variable of '#pragma omp declare mapper'.
 
void ActOnOpenMPIteratorVarDecl (VarDecl *VD)
 
bool isOpenMPDeclareMapperVarDeclAllowed (const VarDecl *VD) const
 
const ValueDeclgetOpenMPDeclareMapperVarName () const
 
bool ActOnStartOpenMPDeclareTargetContext (DeclareTargetContextInfo &DTCI)
 Called on the start of target region i.e. '#pragma omp declare target'.
 
const DeclareTargetContextInfo ActOnOpenMPEndDeclareTargetDirective ()
 Called at the end of target region i.e. '#pragma omp end declare target'.
 
void ActOnFinishedOpenMPDeclareTargetContext (DeclareTargetContextInfo &DTCI)
 Called once a target context is completed, that can be when a '#pragma omp end declare target' was encountered or when a '#pragma omp declare target' without declaration-definition-seq was encountered.
 
void DiagnoseUnterminatedOpenMPDeclareTarget ()
 Report unterminated 'omp declare target' or 'omp begin declare target' at the end of a compilation unit.
 
NamedDecllookupOpenMPDeclareTargetName (Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id)
 Searches for the provided declaration name for OpenMP declare target directive.
 
void ActOnOpenMPDeclareTargetName (NamedDecl *ND, SourceLocation Loc, OMPDeclareTargetDeclAttr::MapTypeTy MT, DeclareTargetContextInfo &DTCI)
 Called on correct id-expression from the '#pragma omp declare target'.
 
void checkDeclIsAllowedInOpenMPTarget (Expr *E, Decl *D, SourceLocation IdLoc=SourceLocation())
 Check declaration inside target region.
 
void ActOnOpenMPDeclareTargetInitializer (Decl *D)
 Adds OMPDeclareTargetDeclAttr to referenced variables in declare target directive.
 
void finalizeOpenMPDelayedAnalysis (const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc)
 Finishes analysis of the deferred functions calls that may be declared as host/nohost during device/host compilation.
 
bool isInOpenMPTaskUntiedContext () const
 Return true if currently in OpenMP task with untied clause context.
 
bool isInOpenMPDeclareTargetContext () const
 Return true inside OpenMP declare target region.
 
bool isInOpenMPTargetExecutionDirective () const
 Return true inside OpenMP target region.
 
void ActOnOpenMPRegionStart (OpenMPDirectiveKind DKind, Scope *CurScope)
 Initialization of captured region for OpenMP region.
 
StmtResult ActOnOpenMPCanonicalLoop (Stmt *AStmt)
 Called for syntactical loops (ForStmt or CXXForRangeStmt) associated to an OpenMP loop directive.
 
StmtResult ActOnOpenMPLoopnest (Stmt *AStmt)
 Process a canonical OpenMP loop nest that can either be a canonical literal loop (ForStmt or CXXForRangeStmt), or the generated loop of an OpenMP loop transformation construct.
 
StmtResult ActOnOpenMPRegionEnd (StmtResult S, ArrayRef< OMPClause * > Clauses)
 End of OpenMP region.
 
StmtResult ActOnOpenMPExecutableDirective (OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind PrevMappedDirective=llvm::omp::OMPD_unknown)
 
StmtResult ActOnOpenMPParallelDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp parallel' after parsing of the associated statement.
 
StmtResult ActOnOpenMPSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp simd' after parsing of the associated statement.
 
StmtResult ActOnOpenMPTileDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp tile' after parsing of its clauses and the associated statement.
 
StmtResult ActOnOpenMPUnrollDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp unroll' after parsing of its clauses and the associated statement.
 
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.
 
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.
 
StmtResult ActOnOpenMPSectionsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp sections' after parsing of the associated statement.
 
StmtResult ActOnOpenMPSectionDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp section' after parsing of the associated statement.
 
StmtResult ActOnOpenMPScopeDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp scope' after parsing of the associated statement.
 
StmtResult ActOnOpenMPSingleDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp single' after parsing of the associated statement.
 
StmtResult ActOnOpenMPMasterDirective (Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp master' after parsing of the associated statement.
 
StmtResult ActOnOpenMPCriticalDirective (const DeclarationNameInfo &DirName, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp critical' after parsing of the associated statement.
 
StmtResult ActOnOpenMPParallelForDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.
 
StmtResult ActOnOpenMPParallelForSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement.
 
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.
 
StmtResult ActOnOpenMPParallelMaskedDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp parallel masked' after parsing of the associated statement.
 
StmtResult ActOnOpenMPParallelSectionsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.
 
StmtResult ActOnOpenMPTaskDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp task' after parsing of the associated statement.
 
StmtResult ActOnOpenMPTaskyieldDirective (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp taskyield'.
 
StmtResult ActOnOpenMPErrorDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, bool InExContext=true)
 Called on well-formed '#pragma omp error'.
 
StmtResult ActOnOpenMPBarrierDirective (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp barrier'.
 
StmtResult ActOnOpenMPTaskwaitDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp taskwait'.
 
StmtResult ActOnOpenMPTaskgroupDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp taskgroup'.
 
StmtResult ActOnOpenMPFlushDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp flush'.
 
StmtResult ActOnOpenMPDepobjDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp depobj'.
 
StmtResult ActOnOpenMPScanDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp scan'.
 
StmtResult ActOnOpenMPOrderedDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp ordered' after parsing of the associated statement.
 
StmtResult ActOnOpenMPAtomicDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp atomic' after parsing of the associated statement.
 
StmtResult ActOnOpenMPTargetDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp target' after parsing of the associated statement.
 
StmtResult ActOnOpenMPTargetDataDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp target data' after parsing of the associated statement.
 
StmtResult 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.
 
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.
 
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.
 
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.
 
StmtResult ActOnOpenMPTeamsDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp teams' after parsing of the associated statement.
 
StmtResult ActOnOpenMPTeamsGenericLoopDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp teams loop' after parsing of the associated statement.
 
StmtResult ActOnOpenMPTargetTeamsGenericLoopDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp target teams loop' after parsing of the associated statement.
 
StmtResult ActOnOpenMPParallelGenericLoopDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp parallel loop' after parsing of the associated statement.
 
StmtResult ActOnOpenMPTargetParallelGenericLoopDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp target parallel loop' after parsing of the associated statement.
 
StmtResult ActOnOpenMPCancellationPointDirective (SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
 Called on well-formed '#pragma omp cancellation point'.
 
StmtResult ActOnOpenMPCancelDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
 Called on well-formed '#pragma omp cancel'.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
StmtResult ActOnOpenMPMaskedTaskLoopDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp masked taskloop' after parsing of the associated statement.
 
StmtResult ActOnOpenMPMaskedTaskLoopSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp masked taskloop simd' after parsing of the associated statement.
 
StmtResult ActOnOpenMPParallelMaskedTaskLoopDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp parallel masked taskloop' after parsing of the associated statement.
 
StmtResult ActOnOpenMPParallelMaskedTaskLoopSimdDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp parallel masked taskloop simd' after parsing of the associated statement.
 
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.
 
StmtResult ActOnOpenMPTargetUpdateDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
 Called on well-formed '#pragma omp target update'.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
StmtResult ActOnOpenMPInteropDirective (ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp interop'.
 
StmtResult ActOnOpenMPDispatchDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp dispatch' after parsing of the.
 
StmtResult ActOnOpenMPMaskedDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed '#pragma omp masked' after parsing of the.
 
StmtResult ActOnOpenMPGenericLoopDirective (ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
 Called on well-formed '#pragma omp loop' after parsing of the associated statement.
 
bool CheckOpenMPLinearModifier (OpenMPLinearClauseKind LinKind, SourceLocation LinLoc)
 Checks correctness of linear modifiers.
 
bool CheckOpenMPLinearDecl (const ValueDecl *D, SourceLocation ELoc, OpenMPLinearClauseKind LinKind, QualType Type, bool IsDeclareSimd=false)
 Checks that the specified declaration matches requirements for the linear decls.
 
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.
 
std::optional< std::pair< FunctionDecl *, Expr * > > checkOpenMPDeclareVariantFunction (DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR)
 Checks '#pragma omp declare variant' variant function and original functions after parsing of the associated method/function.
 
void ActOnOpenMPDeclareVariantDirective (FunctionDecl *FD, Expr *VariantRef, OMPTraitInfo &TI, ArrayRef< Expr * > AdjustArgsNothing, ArrayRef< Expr * > AdjustArgsNeedDevicePtr, ArrayRef< OMPInteropInfo > AppendArgs, SourceLocation AdjustArgsLoc, SourceLocation AppendArgsLoc, SourceRange SR)
 Called on well-formed '#pragma omp declare variant' after parsing of the associated method/function.
 
OMPClauseActOnOpenMPSingleExprClause (OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 
OMPClauseActOnOpenMPAllocatorClause (Expr *Allocator, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'allocator' clause.
 
OMPClauseActOnOpenMPIfClause (OpenMPDirectiveKind NameModifier, Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
 Called on well-formed 'if' clause.
 
OMPClauseActOnOpenMPFinalClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'final' clause.
 
OMPClauseActOnOpenMPNumThreadsClause (Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'num_threads' clause.
 
OMPClauseActOnOpenMPAlignClause (Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'align' clause.
 
OMPClauseActOnOpenMPSafelenClause (Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'safelen' clause.
 
OMPClauseActOnOpenMPSimdlenClause (Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'simdlen' clause.
 
OMPClauseActOnOpenMPSizesClause (ArrayRef< Expr * > SizeExprs, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-form 'sizes' clause.
 
OMPClauseActOnOpenMPFullClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-form 'full' clauses.
 
OMPClauseActOnOpenMPPartialClause (Expr *FactorExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-form 'partial' clauses.
 
OMPClauseActOnOpenMPCollapseClause (Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'collapse' clause.
 
OMPClauseActOnOpenMPOrderedClause (SourceLocation StartLoc, SourceLocation EndLoc, SourceLocation LParenLoc=SourceLocation(), Expr *NumForLoops=nullptr)
 Called on well-formed 'ordered' clause.
 
OMPClauseActOnOpenMPGrainsizeClause (OpenMPGrainsizeClauseModifier Modifier, Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
 Called on well-formed 'grainsize' clause.
 
OMPClauseActOnOpenMPNumTasksClause (OpenMPNumTasksClauseModifier Modifier, Expr *NumTasks, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
 Called on well-formed 'num_tasks' clause.
 
OMPClauseActOnOpenMPHintClause (Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'hint' clause.
 
OMPClauseActOnOpenMPDetachClause (Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'detach' clause.
 
OMPClauseActOnOpenMPSimpleClause (OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 
OMPClauseActOnOpenMPWhenClause (OMPTraitInfo &TI, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'when' clause.
 
OMPClauseActOnOpenMPDefaultClause (llvm::omp::DefaultKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'default' clause.
 
OMPClauseActOnOpenMPProcBindClause (llvm::omp::ProcBindKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'proc_bind' clause.
 
OMPClauseActOnOpenMPOrderClause (OpenMPOrderClauseModifier Modifier, OpenMPOrderClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc)
 Called on well-formed 'order' clause.
 
OMPClauseActOnOpenMPUpdateClause (OpenMPDependClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'update' clause.
 
OMPClauseActOnOpenMPSingleExprWithArgClause (OpenMPClauseKind Kind, ArrayRef< unsigned > Arguments, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, ArrayRef< SourceLocation > ArgumentsLoc, SourceLocation DelimLoc, SourceLocation EndLoc)
 
OMPClauseActOnOpenMPScheduleClause (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.
 
OMPClauseActOnOpenMPClause (OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc)
 
OMPClauseActOnOpenMPNowaitClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'nowait' clause.
 
OMPClauseActOnOpenMPUntiedClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'untied' clause.
 
OMPClauseActOnOpenMPMergeableClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'mergeable' clause.
 
OMPClauseActOnOpenMPReadClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'read' clause.
 
OMPClauseActOnOpenMPWriteClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'write' clause.
 
OMPClauseActOnOpenMPUpdateClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'update' clause.
 
OMPClauseActOnOpenMPCaptureClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'capture' clause.
 
OMPClauseActOnOpenMPCompareClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'compare' clause.
 
OMPClauseActOnOpenMPFailClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'fail' clause.
 
OMPClauseActOnOpenMPFailClause (OpenMPClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 
OMPClauseActOnOpenMPSeqCstClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'seq_cst' clause.
 
OMPClauseActOnOpenMPAcqRelClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'acq_rel' clause.
 
OMPClauseActOnOpenMPAcquireClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'acquire' clause.
 
OMPClauseActOnOpenMPReleaseClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'release' clause.
 
OMPClauseActOnOpenMPRelaxedClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'relaxed' clause.
 
OMPClauseActOnOpenMPWeakClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'weak' clause.
 
OMPClauseActOnOpenMPInitClause (Expr *InteropVar, OMPInteropInfo &InteropInfo, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
 Called on well-formed 'init' clause.
 
OMPClauseActOnOpenMPUseClause (Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
 Called on well-formed 'use' clause.
 
OMPClauseActOnOpenMPDestroyClause (Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
 Called on well-formed 'destroy' clause.
 
OMPClauseActOnOpenMPNovariantsClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'novariants' clause.
 
OMPClauseActOnOpenMPNocontextClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'nocontext' clause.
 
OMPClauseActOnOpenMPFilterClause (Expr *ThreadID, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'filter' clause.
 
OMPClauseActOnOpenMPThreadsClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'threads' clause.
 
OMPClauseActOnOpenMPSIMDClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'simd' clause.
 
OMPClauseActOnOpenMPNogroupClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'nogroup' clause.
 
OMPClauseActOnOpenMPUnifiedAddressClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'unified_address' clause.
 
OMPClauseActOnOpenMPUnifiedSharedMemoryClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'unified_address' clause.
 
OMPClauseActOnOpenMPReverseOffloadClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'reverse_offload' clause.
 
OMPClauseActOnOpenMPDynamicAllocatorsClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on well-formed 'dynamic_allocators' clause.
 
OMPClauseActOnOpenMPAtomicDefaultMemOrderClause (OpenMPAtomicDefaultMemOrderClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'atomic_default_mem_order' clause.
 
OMPClauseActOnOpenMPAtClause (OpenMPAtClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'at' clause.
 
OMPClauseActOnOpenMPSeverityClause (OpenMPSeverityClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'severity' clause.
 
OMPClauseActOnOpenMPMessageClause (Expr *MS, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'message' clause.
 
OMPClauseActOnOpenMPVarListClause (OpenMPClauseKind Kind, ArrayRef< Expr * > Vars, const OMPVarListLocTy &Locs, OpenMPVarListDataTy &Data)
 
OMPClauseActOnOpenMPInclusiveClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'inclusive' clause.
 
OMPClauseActOnOpenMPExclusiveClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'exclusive' clause.
 
OMPClauseActOnOpenMPAllocateClause (Expr *Allocator, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'allocate' clause.
 
OMPClauseActOnOpenMPPrivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'private' clause.
 
OMPClauseActOnOpenMPFirstprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'firstprivate' clause.
 
OMPClauseActOnOpenMPLastprivateClause (ArrayRef< Expr * > VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'lastprivate' clause.
 
OMPClauseActOnOpenMPSharedClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'shared' clause.
 
OMPClauseActOnOpenMPReductionClause (ArrayRef< Expr * > VarList, OpenMPReductionClauseModifier Modifier, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=std::nullopt)
 Called on well-formed 'reduction' clause.
 
OMPClauseActOnOpenMPTaskReductionClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=std::nullopt)
 Called on well-formed 'task_reduction' clause.
 
OMPClauseActOnOpenMPInReductionClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=std::nullopt)
 Called on well-formed 'in_reduction' clause.
 
OMPClauseActOnOpenMPLinearClause (ArrayRef< Expr * > VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation StepModifierLoc, SourceLocation EndLoc)
 Called on well-formed 'linear' clause.
 
OMPClauseActOnOpenMPAlignedClause (ArrayRef< Expr * > VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
 Called on well-formed 'aligned' clause.
 
OMPClauseActOnOpenMPCopyinClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'copyin' clause.
 
OMPClauseActOnOpenMPCopyprivateClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'copyprivate' clause.
 
OMPClauseActOnOpenMPFlushClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'flush' pseudo clause.
 
OMPClauseActOnOpenMPDepobjClause (Expr *Depobj, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'depobj' pseudo clause.
 
OMPClauseActOnOpenMPDependClause (const OMPDependClause::DependDataTy &Data, Expr *DepModifier, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'depend' clause.
 
OMPClauseActOnOpenMPDeviceClause (OpenMPDeviceClauseModifier Modifier, Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
 Called on well-formed 'device' clause.
 
OMPClauseActOnOpenMPMapClause (Expr *IteratorModifier, ArrayRef< OpenMPMapModifierKind > MapTypeModifiers, ArrayRef< SourceLocation > MapTypeModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, bool NoDiagnose=false, ArrayRef< Expr * > UnresolvedMappers=std::nullopt)
 Called on well-formed 'map' clause.
 
OMPClauseActOnOpenMPNumTeamsClause (Expr *NumTeams, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'num_teams' clause.
 
OMPClauseActOnOpenMPThreadLimitClause (Expr *ThreadLimit, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'thread_limit' clause.
 
OMPClauseActOnOpenMPPriorityClause (Expr *Priority, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'priority' clause.
 
OMPClauseActOnOpenMPDistScheduleClause (OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
 Called on well-formed 'dist_schedule' clause.
 
OMPClauseActOnOpenMPDefaultmapClause (OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc)
 Called on well-formed 'defaultmap' clause.
 
OMPClauseActOnOpenMPToClause (ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=std::nullopt)
 Called on well-formed 'to' clause.
 
OMPClauseActOnOpenMPFromClause (ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=std::nullopt)
 Called on well-formed 'from' clause.
 
OMPClauseActOnOpenMPUseDevicePtrClause (ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
 Called on well-formed 'use_device_ptr' clause.
 
OMPClauseActOnOpenMPUseDeviceAddrClause (ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
 Called on well-formed 'use_device_addr' clause.
 
OMPClauseActOnOpenMPIsDevicePtrClause (ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
 Called on well-formed 'is_device_ptr' clause.
 
OMPClauseActOnOpenMPHasDeviceAddrClause (ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
 Called on well-formed 'has_device_addr' clause.
 
OMPClauseActOnOpenMPNontemporalClause (ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'nontemporal' clause.
 
OMPClauseActOnOpenMPUsesAllocatorClause (SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< UsesAllocatorsData > Data)
 Called on well-formed 'uses_allocators' clause.
 
OMPClauseActOnOpenMPAffinityClause (SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, Expr *Modifier, ArrayRef< Expr * > Locators)
 Called on well-formed 'affinity' clause.
 
OMPClauseActOnOpenMPBindClause (OpenMPBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on a well-formed 'bind' clause.
 
OMPClauseActOnOpenMPXDynCGroupMemClause (Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on a well-formed 'ompx_dyn_cgroup_mem' clause.
 
OMPClauseActOnOpenMPDoacrossClause (OpenMPDoacrossClauseModifier DepType, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on well-formed 'doacross' clause.
 
OMPClauseActOnOpenMPXAttributeClause (ArrayRef< const Attr * > Attrs, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Called on a well-formed 'ompx_attribute' clause.
 
OMPClauseActOnOpenMPXBareClause (SourceLocation StartLoc, SourceLocation EndLoc)
 Called on a well-formed 'ompx_bare' clause.
 
static int getOpenMPCaptureLevels (OpenMPDirectiveKind Kind)
 Return the number of captured regions created for an OpenMP directive.
 

C++ Coroutines

Implementations are in SemaCoroutine.cpp

ClassTemplateDeclStdCoroutineTraitsCache
 The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>
 
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 BuildOperatorCoawaitLookupExpr (Scope *S, SourceLocation Loc)
 
ExprResult BuildOperatorCoawaitCall (SourceLocation Loc, Expr *E, UnresolvedLookupExpr *Lookup)
 Build a call to 'operator co_await' if there is a suitable operator for the given expression.
 
ExprResult BuildResolvedCoawaitExpr (SourceLocation KwLoc, Expr *Operand, Expr *Awaiter, bool IsImplicit=false)
 
ExprResult BuildUnresolvedCoawaitExpr (SourceLocation KwLoc, Expr *Operand, 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)
 
VarDeclbuildCoroutinePromise (SourceLocation Loc)
 
void CheckCompletedCoroutineBody (FunctionDecl *FD, Stmt *&Body)
 
void CheckCoroutineWrapper (FunctionDecl *FD)
 
ClassTemplateDecllookupCoroutineTraits (SourceLocation KwLoc, SourceLocation FuncLoc)
 Lookup 'coroutine_traits' in std namespace and std::experimental namespace.
 
bool checkFinalSuspendNoThrow (const Stmt *FinalSuspend)
 Check that the expression co_await promise.final_suspend() shall not be potentially-throwing.
 

C++ Exception Specifications

Implementations are in SemaExceptionSpec.cpp

SmallVector< std::pair< const CXXMethodDecl *, const CXXMethodDecl * >, 2 > DelayedOverridingExceptionSpecChecks
 All the overriding functions seen during a class definition that had their exception spec checks delayed, plus the overridden function.
 
SmallVector< std::pair< FunctionDecl *, FunctionDecl * >, 2 > DelayedEquivalentExceptionSpecChecks
 All the function redeclarations seen during a class definition that had their exception spec checks delayed, plus the prior declaration they should be checked against.
 
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.
 
ExprResult ActOnNoexceptSpec (Expr *NoexceptExpr, ExceptionSpecificationType &EST)
 Check the given noexcept-specifier, convert its expression, and compute the appropriate ExceptionSpecificationType.
 
CanThrowResult canThrow (const Stmt *E)
 
const FunctionProtoTypeResolveExceptionSpec (SourceLocation Loc, const FunctionProtoType *FPT)
 
void UpdateExceptionSpec (FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI)
 
bool CheckSpecifiedExceptionType (QualType &T, SourceRange Range)
 CheckSpecifiedExceptionType - Check if the given type is valid in an exception specification.
 
bool CheckDistantExceptionSpec (QualType T)
 CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function with an exception specification.
 
bool CheckEquivalentExceptionSpec (FunctionDecl *Old, FunctionDecl *New)
 
bool CheckEquivalentExceptionSpec (const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc)
 CheckEquivalentExceptionSpec - Check if the two types have equivalent exception specifications.
 
bool CheckEquivalentExceptionSpec (const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Old, SourceLocation OldLoc, const FunctionProtoType *New, SourceLocation NewLoc)
 
bool handlerCanCatch (QualType HandlerType, QualType ExceptionType)
 
bool CheckExceptionSpecSubset (const PartialDiagnostic &DiagID, const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const PartialDiagnostic &NoThrowDiagID, const FunctionProtoType *Superset, bool SkipSupersetFirstParameter, SourceLocation SuperLoc, const FunctionProtoType *Subset, bool SkipSubsetFirstParameter, SourceLocation SubLoc)
 CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subset (or equivalent) of the first function type.
 
bool CheckParamExceptionSpec (const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Target, bool SkipTargetFirstParameter, SourceLocation TargetLoc, const FunctionProtoType *Source, bool SkipSourceFirstParameter, SourceLocation SourceLoc)
 CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalent exception specs.
 
bool CheckExceptionSpecCompatibility (Expr *From, QualType ToType)
 
bool CheckOverridingFunctionExceptionSpec (const CXXMethodDecl *New, const CXXMethodDecl *Old)
 CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec.
 
static CanThrowResult canCalleeThrow (Sema &S, const Expr *E, const Decl *D, SourceLocation Loc=SourceLocation())
 Determine whether the callee of a particular function call can throw.
 

Initializers

Implementations are in SemaInit.cpp

llvm::SmallVector< QualType, 4 > CurrentParameterCopyTypes
 Stack of types that correspond to the parameter entities that are currently being copy-initialized.
 
llvm::DenseMap< unsigned, CXXDeductionGuideDecl * > AggregateDeductionCandidates
 
bool IsStringInit (Expr *Init, const ArrayType *AT)
 
bool CanPerformAggregateInitializationForOverloadResolution (const InitializedEntity &Entity, InitListExpr *From)
 Determine whether we can perform aggregate initialization for the purposes of overload resolution.
 
ExprResult ActOnDesignatedInitializer (Designation &Desig, SourceLocation EqualOrColonLoc, bool GNUSyntax, ExprResult Init)
 
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.
 
MaterializeTemporaryExprCreateMaterializeTemporaryExpr (QualType T, Expr *Temporary, bool BoundToLvalueReference)
 
ExprResult TemporaryMaterializationConversion (Expr *E)
 If E is a prvalue denoting an unmaterialized temporary, materialize it as an xvalue.
 
ExprResult PerformQualificationConversion (Expr *E, QualType Ty, ExprValueKind VK=VK_PRValue, CheckedConversionKind CCK=CCK_ImplicitConversion)
 
bool CanPerformCopyInitialization (const InitializedEntity &Entity, ExprResult Init)
 
ExprResult PerformCopyInitialization (const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false, bool AllowExplicit=false)
 
QualType DeduceTemplateSpecializationFromInitializer (TypeSourceInfo *TInfo, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Init)
 

Name Lookup for RISC-V Vector Intrinsic

Implementations are in SemaRISCVVectorLookup.cpp

bool DeclareRISCVVBuiltins = false
 Indicate RISC-V vector builtin functions enabled or not.
 
bool DeclareRISCVSiFiveVectorBuiltins = false
 Indicate RISC-V SiFive vector builtin functions enabled or not.
 

Availability Attribute Handling

Implementations are in SemaAvailability.cpp

void DiagnoseUnguardedAvailabilityViolations (Decl *FD)
 Issue any -Wunguarded-availability warnings in FD.
 
void handleDelayedAvailabilityCheck (sema::DelayedDiagnostic &DD, Decl *Ctx)
 
sema::FunctionScopeInfogetCurFunctionAvailabilityContext ()
 Retrieve the current function, if any, that should be analyzed for potential availability violations.
 
void DiagnoseAvailabilityOfDecl (NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReceiver=nullptr)
 

Casts

Implementations are in SemaCast.cpp

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,addrspace}_cast's.
 
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)
 
void CheckCompatibleReinterpretCast (QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range)
 
bool ShouldSplatAltivecScalarInCast (const VectorType *VecTy)
 
bool CheckAltivecInitFromScalar (SourceRange R, QualType VecTy, QualType SrcTy)
 
ExprResult BuildCStyleCastExpr (SourceLocation LParenLoc, TypeSourceInfo *Ty, SourceLocation RParenLoc, Expr *Op)
 
ExprResult BuildCXXFunctionalCastExpr (TypeSourceInfo *TInfo, QualType Type, SourceLocation LParenLoc, Expr *CastExpr, SourceLocation RParenLoc)
 
static bool isCast (CheckedConversionKind CCK)
 

C++ Scope Specifiers

Implementations are in SemaCXXScopeSpec.cpp

bool RequireCompleteDeclContext (CXXScopeSpec &SS, DeclContext *DC)
 Require that the context specified by SS be complete.
 
bool RequireCompleteEnumDecl (EnumDecl *D, SourceLocation L, CXXScopeSpec *SS=nullptr)
 Require that the EnumDecl is completed with its enumerators defined or instantiated.
 
DeclContextcomputeDeclContext (QualType T)
 Compute the DeclContext that is associated with the given type.
 
DeclContextcomputeDeclContext (const CXXScopeSpec &SS, bool EnteringContext=false)
 Compute the DeclContext that is associated with the given scope specifier.
 
bool isDependentScopeSpecifier (const CXXScopeSpec &SS)
 
CXXRecordDeclgetCurrentInstantiationOf (NestedNameSpecifier *NNS)
 If the given nested name specifier refers to the current instantiation, return the declaration that corresponds to that current instantiation (C++0x [temp.dep.type]p1).
 
bool ActOnCXXGlobalScopeSpecifier (SourceLocation CCLoc, CXXScopeSpec &SS)
 The parser has parsed a global nested-name-specifier '::'.
 
bool ActOnSuperScopeSpecifier (SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS)
 The parser has parsed a '__super' nested-name-specifier.
 
bool isAcceptableNestedNameSpecifier (const NamedDecl *SD, bool *CanCorrect=nullptr)
 Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier.
 
NamedDeclFindFirstQualifierInScope (Scope *S, NestedNameSpecifier *NNS)
 If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup for that identifier as a nested-name-specifier within the given scope, and return the result of that name lookup.
 
bool 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.
 
bool ActOnCXXNestedNameSpecifier (Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, bool *IsCorrectedToColon=nullptr, bool OnlyNamespace=false)
 The parser has parsed a nested-name-specifier 'identifier::'.
 
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 >::'.
 
bool ActOnCXXNestedNameSpecifierDecltype (CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc)
 
bool ActOnCXXNestedNameSpecifierIndexedPack (CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc, QualType Type)
 
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.
 
void * SaveNestedNameSpecifierAnnotation (CXXScopeSpec &SS)
 Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to reconstruct the given nested-name-specifier.
 
void RestoreNestedNameSpecifierAnnotation (void *Annotation, SourceRange AnnotationRange, CXXScopeSpec &SS)
 Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.
 
bool ShouldEnterDeclaratorScope (Scope *S, const CXXScopeSpec &SS)
 
bool ActOnCXXEnterDeclaratorScope (Scope *S, CXXScopeSpec &SS)
 ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global scope or nested-name-specifier) is parsed, part of a declarator-id.
 
void ActOnCXXExitDeclaratorScope (Scope *S, const CXXScopeSpec &SS)
 ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclaratorScope(), is finished.
 

Member Access Expressions

Implementations are in SemaExprMember.cpp

ExprResult BuildPossibleImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, UnresolvedLookupExpr *AsULE=nullptr)
 Builds an expression which might be an implicit member expression.
 
ExprResult BuildImplicitMemberExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance, const Scope *S)
 Builds an implicit member access expression.
 
ExprResult ActOnDependentMemberExpr (Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
 
ExprResult ActOnMemberAccessExpr (Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Member, Decl *ObjCImpDecl)
 The main callback when the parser finds something like expression .
 
MemberExprBuildMemberExpr (Expr *Base, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec *SS, SourceLocation TemplateKWLoc, ValueDecl *Member, DeclAccessPair FoundDecl, bool HadMultipleCandidates, const DeclarationNameInfo &MemberNameInfo, QualType Ty, ExprValueKind VK, ExprObjectKind OK, const TemplateArgumentListInfo *TemplateArgs=nullptr)
 
MemberExprBuildMemberExpr (Expr *Base, bool IsArrow, SourceLocation OpLoc, NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, ValueDecl *Member, DeclAccessPair FoundDecl, bool HadMultipleCandidates, const DeclarationNameInfo &MemberNameInfo, QualType Ty, ExprValueKind VK, ExprObjectKind OK, const TemplateArgumentListInfo *TemplateArgs=nullptr)
 
bool CheckQualifiedMemberReference (Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, const LookupResult &R)
 
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.
 
ExprResult BuildAnonymousStructUnionMemberReference (const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation())
 

C++ Lambda Expressions

Implementations are in SemaLambda.cpp

CXXRecordDeclcreateLambdaClosureType (SourceRange IntroducerRange, TypeSourceInfo *Info, unsigned LambdaDependencyKind, LambdaCaptureDefault CaptureDefault)
 Create a new lambda closure type.
 
void handleLambdaNumbering (CXXRecordDecl *Class, CXXMethodDecl *Method, std::optional< CXXRecordDecl::LambdaNumbering > NumberingOverride=std::nullopt)
 Number lambda for linkage purposes if necessary.
 
void buildLambdaScope (sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, bool ExplicitParams, bool Mutable)
 Endow the lambda scope info with the relevant properties.
 
CXXMethodDeclCreateLambdaCallOperator (SourceRange IntroducerRange, CXXRecordDecl *Class)
 
void AddTemplateParametersToLambdaCallOperator (CXXMethodDecl *CallOperator, CXXRecordDecl *Class, TemplateParameterList *TemplateParams)
 
void CompleteLambdaCallOperator (CXXMethodDecl *Method, SourceLocation LambdaLoc, SourceLocation CallOperatorLoc, Expr *TrailingRequiresClause, TypeSourceInfo *MethodTyInfo, ConstexprSpecKind ConstexprKind, StorageClass SC, ArrayRef< ParmVarDecl * > Params, bool HasExplicitResultType)
 
void DiagnoseInvalidExplicitObjectParameterInLambda (CXXMethodDecl *Method)
 
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.
 
QualType buildLambdaInitCaptureInitialization (SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, std::optional< unsigned > NumExpansions, IdentifierInfo *Id, bool DirectInit, Expr *&Init)
 
VarDeclcreateLambdaInitCaptureVarDecl (SourceLocation Loc, QualType InitCaptureType, SourceLocation EllipsisLoc, IdentifierInfo *Id, unsigned InitStyle, Expr *Init, DeclContext *DeclCtx)
 Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purposes for a lambda init capture.
 
void addInitCapture (sema::LambdaScopeInfo *LSI, VarDecl *Var, bool ByRef)
 Add an init-capture to a lambda scope.
 
void finishLambdaExplicitCaptures (sema::LambdaScopeInfo *LSI)
 Note that we have finished the explicit captures for the given lambda.
 
void deduceClosureReturnType (sema::CapturingScopeInfo &CSI)
 Deduce a block or lambda's return type based on the return statements present in the body.
 
void ActOnLambdaExpressionAfterIntroducer (LambdaIntroducer &Intro, Scope *CurContext)
 Once the Lambdas capture are known, we can start to create the closure, call operator method, and keep track of the captures.
 
void ActOnLambdaExplicitTemplateParameterList (LambdaIntroducer &Intro, SourceLocation LAngleLoc, ArrayRef< NamedDecl * > TParams, SourceLocation RAngleLoc, ExprResult RequiresClause)
 This is called after parsing the explicit template parameter list on a lambda (if it exists) in C++2a.
 
void ActOnLambdaClosureQualifiers (LambdaIntroducer &Intro, SourceLocation MutableLoc)
 
void ActOnLambdaClosureParameters (Scope *LambdaScope, MutableArrayRef< DeclaratorChunk::ParamInfo > ParamInfo)
 
void ActOnStartOfLambdaDefinition (LambdaIntroducer &Intro, Declarator &ParamInfo, const DeclSpec &DS)
 ActOnStartOfLambdaDefinition - This is called just before we start parsing the body of a lambda; it analyzes the explicit captures and arguments, and sets up various data-structures for the body of the lambda.
 
void ActOnLambdaError (SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false)
 ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the information about the lambda.
 
ExprResult ActOnLambdaExpr (SourceLocation StartLoc, Stmt *Body)
 ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed.
 
bool CaptureHasSideEffects (const sema::Capture &From)
 Does copying/destroying the captured variable have side effects?
 
bool DiagnoseUnusedLambdaCapture (SourceRange CaptureRange, const sema::Capture &From)
 Diagnose if an explicit lambda capture is unused.
 
FieldDeclBuildCaptureField (RecordDecl *RD, const sema::Capture &Capture)
 Build a FieldDecl suitable to hold the given capture.
 
ExprResult BuildCaptureInit (const sema::Capture &Capture, SourceLocation ImplicitCaptureLoc, bool IsOpenMPMapping=false)
 Initialize the given capture with a suitable expression.
 
ExprResult BuildLambdaExpr (SourceLocation StartLoc, SourceLocation EndLoc, sema::LambdaScopeInfo *LSI)
 Complete a lambda-expression having processed and attached the lambda body.
 
QualType getLambdaConversionFunctionResultType (const FunctionProtoType *CallOpType, CallingConv CC)
 Get the return type to use for a lambda's conversion function(s) to function pointer type, given the type of the call operator.
 
ExprResult BuildBlockForLambdaConversion (SourceLocation CurrentLocation, SourceLocation ConvLocation, CXXConversionDecl *Conv, Expr *Src)
 
std::tuple< MangleNumberingContext *, Decl * > getCurrentMangleNumberContext (const DeclContext *DC)
 Compute the mangling number context for a lambda expression or block literal.
 

<tt>inline asm</tt> Statement

Implementations are in SemaStmtAsm.cpp

StmtResult ActOnGCCAsmStmt (SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, unsigned NumLabels, SourceLocation RParenLoc)
 
void FillInlineAsmIdentifierInfo (Expr *Res, llvm::InlineAsmIdentifierInfo &Info)
 
ExprResult LookupInlineAsmIdentifier (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool IsUnevaluatedContext)
 
bool LookupInlineAsmField (StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc)
 
ExprResult LookupInlineAsmVarDeclField (Expr *RefExpr, StringRef Member, SourceLocation AsmLoc)
 
StmtResult ActOnMSAsmStmt (SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr * > Exprs, SourceLocation EndLoc)
 
LabelDeclGetOrCreateMSAsmLabel (StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate)
 

Statement Attribute Handling

Implementations are in SemaStmtAttr.cpp

bool CheckNoInlineAttr (const Stmt *OrigSt, const Stmt *CurSt, const AttributeCommonInfo &A)
 
bool CheckAlwaysInlineAttr (const Stmt *OrigSt, const Stmt *CurSt, const AttributeCommonInfo &A)
 
CodeAlignAttr * BuildCodeAlignAttr (const AttributeCommonInfo &CI, Expr *E)
 
bool CheckRebuiltStmtAttributes (ArrayRef< const Attr * > Attrs)
 
void ProcessStmtAttributes (Stmt *Stmt, const ParsedAttributes &InAttrs, SmallVectorImpl< const Attr * > &OutAttrs)
 Process the attributes before creating an attributed statement.
 
ExprResult ActOnCXXAssumeAttr (Stmt *St, const ParsedAttr &A, SourceRange Range)
 
ExprResult BuildCXXAssumeExpr (Expr *Assumption, const IdentifierInfo *AttrName, SourceRange Range)
 

ObjC @property and @synthesize

Implementations are in SemaObjCProperty.cpp

void CheckObjCPropertyAttributes (Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass)
 Ensure attributes are consistent with type.
 
void ProcessPropertyDecl (ObjCPropertyDecl *property)
 Process the specified property declaration and create decls for the setters and getters as needed.
 
DeclActOnProperty (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
 
DeclActOnPropertyImplDecl (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.
 
ObjCPropertyDeclHandlePropertyInClassExtension (Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind)
 Called by ActOnProperty to handle @property declarations in class extensions.
 
ObjCPropertyDeclCreatePropertyDecl (Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
 Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl for a category or @interface.
 
void 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.
 
bool DiagnosePropertyAccessorMismatch (ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc)
 
void DiagnoseUnimplementedProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties)
 DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by this implementation.
 
void diagnoseNullResettableSynthesizedSetters (const ObjCImplDecl *impDecl)
 Diagnose any null-resettable synthesized setters.
 
void DefaultSynthesizeProperties (Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd)
 DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesized in the class's @implementation.
 
void DefaultSynthesizeProperties (Scope *S, Decl *D, SourceLocation AtEnd)
 
bool IvarBacksCurrentMethodAccessor (ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV)
 IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Method' and 'Method' is a property accessor declared in class 'IFace'.
 
void DiagnoseOwningPropertyGetterSynthesis (const ObjCImplementationDecl *D)
 
void DiagnoseMissingDesignatedInitOverrides (const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD)
 
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.
 

FixIt Helpers

Implementations are in SemaFixItUtils.cpp

std::string getFixItZeroInitializerForType (QualType T, SourceLocation Loc) const
 Get a string to suggest for zero-initialization of a type.
 
std::string getFixItZeroLiteralForType (QualType T, SourceLocation Loc) const
 

API Notes

Implementations are in SemaAPINotes.cpp

void ProcessAPINotes (Decl *D)
 Map any API notes provided for this declaration to attributes on the declaration.
 

HLSL Constructs

Implementations are in SemaHLSL.cpp

DeclActOnStartHLSLBuffer (Scope *BufferScope, bool CBuffer, SourceLocation KwLoc, IdentifierInfo *Ident, SourceLocation IdentLoc, SourceLocation LBrace)
 
void ActOnFinishHLSLBuffer (Decl *Dcl, SourceLocation RBrace)
 
bool CheckHLSLBuiltinFunctionCall (unsigned BuiltinID, CallExpr *TheCall)
 
bool SemaBuiltinVectorMath (CallExpr *TheCall, QualType &Res)
 
bool SemaBuiltinVectorToScalarMath (CallExpr *TheCall)
 

OpenACC Constructs

Implementations are in SemaOpenACC.cpp

bool ActOnOpenACCClause (OpenACCClauseKind ClauseKind, SourceLocation StartLoc)
 Called after parsing an OpenACC Clause so that it can be checked.
 
void ActOnOpenACCConstruct (OpenACCDirectiveKind K, SourceLocation StartLoc)
 Called after the construct has been parsed, but clauses haven't been parsed.
 
bool ActOnStartOpenACCStmtDirective (OpenACCDirectiveKind K, SourceLocation StartLoc)
 Called after the directive, including its clauses, have been parsed and parsing has consumed the 'annot_pragma_openacc_end' token.
 
bool ActOnStartOpenACCDeclDirective (OpenACCDirectiveKind K, SourceLocation StartLoc)
 Called after the directive, including its clauses, have been parsed and parsing has consumed the 'annot_pragma_openacc_end' token.
 
StmtResult ActOnOpenACCAssociatedStmt (OpenACCDirectiveKind K, StmtResult AssocStmt)
 Called when we encounter an associated statement for our construct, this should check legality of the statement as it appertains to this Construct.
 
StmtResult ActOnEndOpenACCStmtDirective (OpenACCDirectiveKind K, SourceLocation StartLoc, SourceLocation EndLoc, StmtResult AssocStmt)
 Called after the directive has been completely parsed, including the declaration group or associated statement.
 
DeclGroupRef ActOnEndOpenACCDeclDirective ()
 Called after the directive has been completely parsed, including the declaration group or associated statement.
 

SYCL Constructs

Implementations are in SemaSYCL.cpp

SemaDiagnosticBuilder SYCLDiagIfDeviceCode (SourceLocation Loc, unsigned DiagID)
 Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device code".
 
void deepTypeCheckForSYCLDevice (SourceLocation UsedAt, llvm::DenseSet< QualType > Visited, ValueDecl *DeclToCheck)
 

Detailed Description

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

Definition at line 426 of file Sema.h.

Member Typedef Documentation

◆ ADLCallKind

Definition at line 5781 of file Sema.h.

◆ AssociatedClassSet

Definition at line 7600 of file Sema.h.

◆ AssociatedNamespaceSet

Definition at line 7599 of file Sema.h.

◆ CapturedParamNameType

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

Definition at line 8934 of file Sema.h.

◆ DeclGroupPtrTy

Definition at line 1021 of file Sema.h.

◆ DelegatingCtorDeclsType

Definition at line 4969 of file Sema.h.

◆ DeleteExprLoc

Definition at line 733 of file Sema.h.

◆ DeleteLocs

Definition at line 734 of file Sema.h.

◆ DiagReceiverTy

typedef llvm::function_ref<void(SourceLocation Loc, PartialDiagnostic PD)> clang::Sema::DiagReceiverTy

Definition at line 3529 of file Sema.h.

◆ ExtVectorDeclsType

Definition at line 3731 of file Sema.h.

◆ IdentifierSourceLocations

Definition at line 7547 of file Sema.h.

◆ ImmediateInvocationCandidate

using clang::Sema::ImmediateInvocationCandidate = llvm::PointerIntPair<ConstantExpr *, 1>

Definition at line 5184 of file Sema.h.

◆ LateInstantiatedAttrVec

Definition at line 10873 of file Sema.h.

◆ LateParsedTemplateMapT

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

Definition at line 9073 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 1073 of file Sema.h.

◆ LateTemplateParserCleanupCB

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

Definition at line 1074 of file Sema.h.

◆ MaybeODRUseExprSet

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 5181 of file Sema.h.

◆ NamedDeclSetType

Definition at line 4956 of file Sema.h.

◆ ParsingClassState

Definition at line 5002 of file Sema.h.

◆ ParsingDeclState

Definition at line 1104 of file Sema.h.

◆ 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 10747 of file Sema.h.

◆ PoppedFunctionScopePtr

Definition at line 818 of file Sema.h.

◆ ProcessingContextState

Definition at line 1105 of file Sema.h.

◆ RecordDeclSetTy

Definition at line 4960 of file Sema.h.

◆ ReferenceConversions

Definition at line 8416 of file Sema.h.

◆ SatisfactionStackEntryTy

using clang::Sema::SatisfactionStackEntryTy = std::pair<const NamedDecl *, llvm::FoldingSetNodeID>

Definition at line 11436 of file Sema.h.

◆ SelectorSet

Definition at line 12092 of file Sema.h.

◆ SkippedDefinitionContext

Definition at line 3383 of file Sema.h.

◆ SpecialMemberDecl

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

Definition at line 4991 of file Sema.h.

◆ SrcLocSet

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

Definition at line 7546 of file Sema.h.

◆ 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 9817 of file Sema.h.

◆ TemplateTy

Definition at line 1022 of file Sema.h.

◆ TentativeDefinitionsType

Definition at line 2757 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 2072 of file Sema.h.

◆ TypeTy

Definition at line 1023 of file Sema.h.

◆ TypoDiagnosticGenerator

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

Definition at line 7682 of file Sema.h.

◆ TypoRecoveryCallback

Definition at line 7684 of file Sema.h.

◆ UnparsedDefaultArgInstantiationsMap

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

Definition at line 10037 of file Sema.h.

◆ UnusedFileScopedDeclsType

Definition at line 2749 of file Sema.h.

◆ UTTKind

Definition at line 11914 of file Sema.h.

◆ VarsWithInheritedDSAType

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

Definition at line 13744 of file Sema.h.

◆ 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 4541 of file Sema.h.

Member Enumeration Documentation

◆ AbstractDiagSelID

Enumerator
AbstractNone 
AbstractReturnType 
AbstractParamType 
AbstractVariableType 
AbstractFieldType 
AbstractIvarType 
AbstractSynthesizedIvarType 
AbstractArrayType 

Definition at line 4755 of file Sema.h.

◆ AcceptableKind

enum class clang::Sema::AcceptableKind
strong
Enumerator
Visible 
Reachable 

Definition at line 7595 of file Sema.h.

◆ AccessResult

Enumerator
AR_accessible 
AR_inaccessible 
AR_dependent 
AR_delayed 

Definition at line 1208 of file Sema.h.

◆ 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 6889 of file Sema.h.

◆ AllowedExplicit

enum class clang::Sema::AllowedExplicit
strong
Enumerator
None 

Allow no explicit functions to be used.

Conversions 

Allow explicit conversion functions but not explicit constructors.

All 

Allow both explicit conversion functions and explicit constructors.

Definition at line 8201 of file Sema.h.

◆ AllowFoldKind

Enumerator
NoFold 
AllowFold 

Definition at line 6008 of file Sema.h.

◆ ARCConversionResult

Enumerator
ACR_okay 
ACR_unbridged 
ACR_error 

Definition at line 12636 of file Sema.h.

◆ 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 6152 of file Sema.h.

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

IncompatibleFunctionPointer 

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

IncompatibleFunctionPointerStrict 

IncompatibleFunctionPointerStrict - The assignment is between two function pointer types that are not identical, but are compatible, unless compiled with -fsanitize=cfi, in which case the type mismatch may trip an indirect call runtime check.

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 6309 of file Sema.h.

◆ AssignmentAction

Enumerator
AA_Assigning 
AA_Passing 
AA_Returning 
AA_Converting 
AA_Initializing 
AA_Sending 
AA_Casting 
AA_Passing_CFAudited 

Definition at line 5379 of file Sema.h.

◆ AssumedTemplateKind

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 9124 of file Sema.h.

◆ AtomicArgumentOrder

Enumerator
API 
AST 

Definition at line 2094 of file Sema.h.

◆ AttributeCompletion

Enumerator
Attribute 
Scope 
None 

Definition at line 12887 of file Sema.h.

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

AMK_OptionalProtocolImplementation 

Merge availability attributes for an implementation of an optional protocol requirement.

Definition at line 3483 of file Sema.h.

◆ AvailabilityPriority

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 3697 of file Sema.h.

◆ 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 8824 of file Sema.h.

◆ CallingConventionIgnoredReason

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

Enumerator
ForThisTarget 
VariadicFunction 
ConstructorDestructor 
BuiltinFunction 

Definition at line 3712 of file Sema.h.

◆ 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_ArrayBound 

Array bound in array declarator or new-expression.

CCEK_ExplicitBool 

Condition in an explicit(bool) specifier.

CCEK_Noexcept 

Condition in a noexcept(bool) specifier.

CCEK_StaticAssertMessageSize 

Call to size() in a static assert message.

CCEK_StaticAssertMessageData 

Call to data() in a static assert message.

Definition at line 8275 of file Sema.h.

◆ CheckConstexprKind

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 4898 of file Sema.h.

◆ 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 890 of file Sema.h.

◆ 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 9422 of file Sema.h.

◆ ComparisonCategoryUsage

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 4034 of file Sema.h.

◆ CompleteTypeKind

enum class clang::Sema::CompleteTypeKind
strong
Enumerator
Normal 

Apply the normal rules for complete types.

In particular, treat all sizeless types as incomplete.

AcceptSizeless 

Relax the normal rules for complete types so that they include sizeless built-in types.

Default 

Definition at line 11689 of file Sema.h.

◆ ConditionKind

enum class 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 6116 of file Sema.h.

◆ CorrectTypoKind

Enumerator
CTK_NonError 
CTK_ErrorRecovery 

Definition at line 7857 of file Sema.h.

◆ CUDAFunctionPreference

Enumerator
CFP_Never 
CFP_WrongSide 
CFP_HostDevice 
CFP_SameSide 
CFP_Native 

Definition at line 13193 of file Sema.h.

◆ CUDAFunctionTarget

Enumerator
CFT_Device 
CFT_Global 
CFT_Host 
CFT_HostDevice 
CFT_InvalidTarget 

Definition at line 3833 of file Sema.h.

◆ CUDATargetContextKind

Defines kinds of CUDA global host/device context where a function may be called.

Enumerator
CTCK_Unknown 
CTCK_InitGlobalVar 

Unknown context.

Definition at line 13163 of file Sema.h.

◆ CUDAVariableTarget

Enumerator
CVT_Device 
CVT_Host 

Emitted on device side with a shadow variable on host side.

CVT_Both 

Emitted on host side only.

CVT_Unified 

Emitted on both sides with different addresses.

Definition at line 13152 of file Sema.h.

◆ CXXSpecialMember

Kinds of C++ special members.

Enumerator
CXXDefaultConstructor 
CXXCopyConstructor 
CXXMoveConstructor 
CXXCopyAssignment 
CXXMoveAssignment 
CXXDestructor 
CXXInvalid 

Definition at line 4270 of file Sema.h.

◆ DefaultedComparisonKind

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 4655 of file Sema.h.

◆ ExpressionEvaluationContext

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

ImmediateFunctionContext 

In addition of being constant evaluated, the current expression occurs in an immediate function context - either a consteval function or a consteval if 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 5126 of file Sema.h.

◆ FnBodyKind

enum class clang::Sema::FnBodyKind
strong
Enumerator
Other 

C++ [dcl.fct.def.general]p1 function-body: ctor-initializer[opt] compound-statement function-try-block.

Default 

= default ;

Delete 

= delete ;

Definition at line 3201 of file Sema.h.

◆ FormatArgumentPassingKind

Enumerator
FAPK_Fixed 
FAPK_Variadic 
FAPK_VAList 

Definition at line 2004 of file Sema.h.

◆ 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 2027 of file Sema.h.

◆ ForRangeStatus

Enumerator
FRS_Success 
FRS_NoViableFunction 
FRS_DiagnosticIssued 

Definition at line 8605 of file Sema.h.

◆ FunctionEmissionStatus

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

Enumerator
Emitted 
CUDADiscarded 
OMPDiscarded 
TemplateDiscarded 
Unknown 

Definition at line 3648 of file Sema.h.

◆ 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 7107 of file Sema.h.

◆ 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_StringTemplatePack 

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 7656 of file Sema.h.

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

LookupDestructorName 

Look up a name following ~ in a destructor name.

This is an ordinary lookup, but prefers tags to typedefs.

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 7603 of file Sema.h.

◆ MethodMatchStrategy

Enumerator
MMS_loose 
MMS_strict 

Definition at line 12094 of file Sema.h.

◆ MissingImportKind

enum class 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 7880 of file Sema.h.

◆ ModuleDeclKind

enum class clang::Sema::ModuleDeclKind
strong
Enumerator
Interface 

'export module X;'

Implementation 

'module X;'

PartitionInterface 

'export module X:Y;'

PartitionImplementation 

'module X:Y;'

Definition at line 8010 of file Sema.h.

◆ ModuleImportState

enum class clang::Sema::ModuleImportState
strong

An enumeration to represent the transition of states in parsing module fragments and imports.

If we are not parsing a C++20 TU, or we find an error in state transition, the state is set to NotACXX20Module.

Enumerator
FirstDecl 

Parsing the first decl in a TU.

GlobalFragment 

after 'module;' but before 'module X;'

ImportAllowed 

after 'module X;' but before any non-import decl.

ImportFinished 

after any non-import decl.

PrivateFragmentImportAllowed 

after 'module :private;' but before any non-import decl.

PrivateFragmentImportFinished 

after 'module :private;' but a non-import decl has already been seen.

NotACXX20Module 

Not a C++20 TU, or an invalid state was found.

Definition at line 8020 of file Sema.h.

◆ 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_OverloadSet 

The name was classified as an overload set, and an expression representing that overload set has been formed.

ActOnNameClassifiedAsOverloadSet should be called to form a suitable expression referencing the overload set.

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 2817 of file Sema.h.

◆ 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 3298 of file Sema.h.

◆ NonTrivialCUnionContext

Enumerator
NTCUC_FunctionParam 
NTCUC_FunctionReturn 
NTCUC_DefaultInitializedObject 
NTCUC_AutoVar 
NTCUC_CopyInit 
NTCUC_Assignment 
NTCUC_CompoundLiteral 
NTCUC_BlockCapture 
NTCUC_LValueToRValueVolatile 

Definition at line 3140 of file Sema.h.

◆ NonTrivialCUnionKind

Enumerator
NTCUK_Init 
NTCUK_Destruct 
NTCUK_Copy 

Definition at line 3168 of file Sema.h.

◆ ObjCContainerKind

Enumerator
OCK_None 
OCK_Interface 
OCK_Protocol 
OCK_Category 
OCK_ClassExtension 
OCK_Implementation 
OCK_CategoryImplementation 

Definition at line 12096 of file Sema.h.

◆ ObjCLiteralKind

Enumerator
LK_Array 
LK_Dictionary 
LK_Numeric 
LK_Boxed 
LK_String 
LK_Block 
LK_None 

Definition at line 5938 of file Sema.h.

◆ 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 12538 of file Sema.h.

◆ ObjCSpecialMethodKind

Enumerator
OSMK_None 
OSMK_Alloc 
OSMK_New 
OSMK_Copy 
OSMK_RetainingInit 
OSMK_NonRetainingInit 

Definition at line 12040 of file Sema.h.

◆ ObjCSubscriptKind

Enumerator
OS_Array 
OS_Dictionary 
OS_Error 

Definition at line 8708 of file Sema.h.

◆ OffsetOfKind

Enumerator
OOK_Outside 
OOK_Builtin 
OOK_Macro 

Definition at line 3325 of file Sema.h.

◆ OverloadKind

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 8177 of file Sema.h.

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

PCC_TopLevelOrExpression 

Code completion occurs at top-level in a REPL session.

Definition at line 12818 of file Sema.h.

◆ PragmaAlignPackDiagnoseKind

Enumerator
NonDefaultStateAtInclude 
ChangedStateAtExit 

Definition at line 1688 of file Sema.h.

◆ PragmaClangSectionAction

Enumerator
PCSA_Set 
PCSA_Clear 

Definition at line 1314 of file Sema.h.

◆ PragmaClangSectionKind

pragma clang section kind

Enumerator
PCSK_Invalid 
PCSK_BSS 
PCSK_Data 
PCSK_Rodata 
PCSK_Text 
PCSK_Relro 

Definition at line 1305 of file Sema.h.

◆ PragmaMsStackAction

Enumerator
PSK_Reset 
PSK_Set 
PSK_Push 
PSK_Pop 
PSK_Show 
PSK_Push_Set 
PSK_Pop_Set 

Definition at line 1328 of file Sema.h.

◆ PragmaOptionsAlignKind

Enumerator
POAK_Native 
POAK_Natural 
POAK_Packed 
POAK_Power 
POAK_Mac68k 
POAK_Reset 

Definition at line 1658 of file Sema.h.

◆ PragmaSectionKind

Enumerator
PSK_DataSeg 
PSK_BSSSeg 
PSK_ConstSeg 
PSK_CodeSeg 

Definition at line 1566 of file Sema.h.

◆ 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 7688 of file Sema.h.

◆ 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 8388 of file Sema.h.

◆ ResultTypeCompatibilityKind

Describes the compatibility of a result type with its method.

Enumerator
RTC_Compatible 
RTC_Incompatible 
RTC_Unknown 

Definition at line 12245 of file Sema.h.

◆ RetainOwnershipKind

Enumerator
NS 
CF 
OS 

Definition at line 3863 of file Sema.h.

◆ ReuseLambdaContextDecl_t

Enumerator
ReuseLambdaContextDecl 

Definition at line 5416 of file Sema.h.

◆ SimplerImplicitMoveMode

Enumerator
ForceOff 
Normal 
ForceOn 

Definition at line 8864 of file Sema.h.

◆ TagUseKind

Enumerator
TUK_Reference 
TUK_Declaration 
TUK_Definition 
TUK_Friend 

Definition at line 3318 of file Sema.h.

◆ TemplateNameIsRequiredTag

Enumerator
TemplateNameIsRequired 

Definition at line 9101 of file Sema.h.

◆ TemplateNameKindForDiagnostics

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

Enumerator
ClassTemplate 
FunctionTemplate 
VarTemplate 
AliasTemplate 
TemplateTemplateParam 
Concept 
DependentTemplate 

Definition at line 3015 of file Sema.h.

◆ 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;
#define X(type, name)
Definition: Value.h:142
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;
@ Other
C++ [dcl.fct.def.general]p1 function-body: ctor-initializer[opt] compound-statement function-try-bloc...
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;
TPL_TemplateParamsEquivalent 

We are determining whether the template-parameters are equivalent according to C++ [temp.over.link]/6.

This comparison does not consider constraints.

template<C1 T> void f(T);
template<C2 T> void f(T);

Definition at line 9508 of file Sema.h.

◆ 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 9252 of file Sema.h.

◆ 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 4838 of file Sema.h.

◆ TryCaptureKind

Enumerator
TryCapture_Implicit 
TryCapture_ExplicitByVal 
TryCapture_ExplicitByRef 

Definition at line 5458 of file Sema.h.

◆ 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 777 of file Sema.h.

◆ 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_ExplicitSpecialization 

Explicit specialization.

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.

UPPC_Requirement 
UPPC_RequiresClause 

Definition at line 11027 of file Sema.h.

◆ VarArgKind

Enumerator
VAK_Valid 
VAK_ValidInCXX11 
VAK_Undefined 
VAK_MSVCUndefined 
VAK_Invalid 

Definition at line 6266 of file Sema.h.

◆ VariadicCallType

Enumerator
VariadicFunction 
VariadicBlock 
VariadicMethod 
VariadicConstructor 
VariadicDoesNotApply 

Definition at line 2145 of file Sema.h.

Constructor & Destructor Documentation

◆ Sema()

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

◆ ~Sema()

Sema::~Sema ( )

Member Function Documentation

◆ ActOnAbortSEHFinallyBlock()

void Sema::ActOnAbortSEHFinallyBlock ( )

Definition at line 4725 of file SemaStmt.cpp.

References CurrentSEHFinally.

◆ 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 3253 of file SemaDeclCXX.cpp.

References clang::DeclContext::addHiddenDecl(), clang::AS_none, Context, clang::AccessSpecDecl::Create(), CurContext, and ProcessAccessDeclAttributeList().

◆ ActOnAddrLabel()

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

◆ ActOnAfterCompoundStatementLeadingPragmas()

void Sema::ActOnAfterCompoundStatementLeadingPragmas ( )

◆ ActOnAliasDeclaration()

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

Definition at line 13523 of file SemaDeclCXX.cpp.

References ActOnDocumentableDecl(), ActOnTypedefNameDecl(), AddPragmaAttributes(), CheckRedeclarationInModule(), CheckTemplateDeclScope(), CheckTemplateParameterList(), CheckTypedefForVariablyModifiedType(), Context, clang::TypeAliasTemplateDecl::Create(), clang::TypeAliasDecl::Create(), CurContext, Diag(), DiagnoseClassNameShadow(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), FilterLookupForScope(), forRedeclarationInCurContext(), ForVisibleRedeclaration, clang::TypeLoc::getBeginLoc(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getMostRecentDecl(), GetNameFromUnqualifiedId(), clang::TypeAliasTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::TypedefNameDecl::getUnderlyingType(), handleTagNumbering(), clang::ASTContext::hasSameType(), clang::IK_Identifier, clang::ASTContext::IntTy, clang::Invalid, clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), LookupName(), LookupOrdinaryName, Previous, ProcessAPINotes(), ProcessDeclAttributeList(), PushOnScopeChains(), clang::Decl::setAccess(), clang::TypeAliasDecl::setDescribedAliasTemplate(), clang::Decl::setInvalidDecl(), clang::Redeclarable< decl_type >::setPreviousDecl(), setTagNameForLinkagePurposes(), TemplateParameterListsAreEqual(), TPC_TypeAliasTemplate, TPL_TemplateMatch, and UPPC_DeclarationType.

◆ ActOnAlignasTypeArgument()

bool Sema::ActOnAlignasTypeArgument ( StringRef  KWName,
ParsedType  Ty,
SourceLocation  OpLoc,
SourceRange  R 
)

ActOnAlignasTypeArgument - Handle alignas(type-id) and _Alignas(type-name) .

[dcl.align] An alignment-specifier of the form alignas(type-id) has the same effect as alignas(alignof(type-id)).

[N1570 6.7.5] _Alignas(type-name) is equivalent to _Alignas(_Alignof(type-name)).

Definition at line 4946 of file SemaExpr.cpp.

References CheckAlignasTypeArgument(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), and GetTypeFromParser().

◆ ActOnAnnotModuleBegin()

void Sema::ActOnAnnotModuleBegin ( SourceLocation  DirectiveLoc,
Module Mod 
)

◆ ActOnAnnotModuleEnd()

void Sema::ActOnAnnotModuleEnd ( SourceLocation  DirectiveLoc,
Module Mod 
)

◆ ActOnAnnotModuleInclude()

void Sema::ActOnAnnotModuleInclude ( SourceLocation  DirectiveLoc,
Module Mod 
)

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

Definition at line 716 of file SemaModule.cpp.

References BuildModuleInclude(), checkModuleImportContext(), and CurContext.

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

◆ ActOnArraySubscriptExpr()

ExprResult Sema::ActOnArraySubscriptExpr ( Scope S,
Expr Base,
SourceLocation  LLoc,
MultiExprArg  ArgExprs,
SourceLocation  RLoc 
)

◆ 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 6028 of file SemaExprCXX.cpp.

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

◆ ActOnAsTypeExpr()

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

__builtin_astype(...)

Parse a __builtin_astype expression.

__builtin_astype( value, dst type )

Definition at line 7422 of file SemaExpr.cpp.

References BuildAsTypeExpr(), and GetTypeFromParser().

◆ ActOnAtEnd()

Decl * Sema::ActOnAtEnd ( Scope S,
SourceRange  AtEnd,
ArrayRef< Decl * >  allMethods = std::nullopt,
ArrayRef< DeclGroupPtrTy allTUVars = std::nullopt 
)

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 3986 of file SemaDeclObjC.cpp.

References ActOnDocumentableDecl(), ActOnObjCContainerFinishDefinition(), AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), AtomicPropertySetterGetterRules(), clang::DeclGroupRef::begin(), clang::C, clang::NSAPI::ClassId_NSObject, Consumer, Context, clang::FixItHint::CreateInsertion(), CurContext, Diag(), DiagnoseCategoryDirectMembersProtocolConformance(), DiagnoseClassExtensionDupMethods(), DiagnoseDuplicateIvars(), DiagnoseMissingDesignatedInitOverrides(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseRetainableFlexibleArrayMember(), DiagnoseUnusedBackingIvarInAccessor(), DiagnoseVariableSizedIvars(), DiagnoseWeakIvars(), clang::ObjCPropertyImplDecl::Dynamic, clang::DeclGroupRef::end(), clang::NamedDecl::getDeclName(), clang::ObjCInterfaceDecl::getDefinition(), clang::Decl::getLocation(), getLocForEndOfToken(), getObjCContainerKind(), clang::ObjCMethodDecl::getSelector(), clang::ASTContext::getSourceManager(), clang::ObjCInterfaceDecl::getSuperClass(), clang::ASTConsumer::HandleTopLevelDeclInObjCContainer(), ImplMethodsVsClassMethods(), clang::ObjCMethodDecl::isInstanceMethod(), clang::SourceManager::isInSystemHeader(), clang::ObjCRuntime::isNonFragile(), clang::SourceRange::isValid(), LangOpts, LookupOrdinaryName, LookupSingleName(), clang::ast_matchers::match(), MatchTwoMethodDeclarations(), NSAPIObj, clang::LangOptions::ObjCRuntime, OCK_None, ProcessPropertyDecl(), clang::Property, clang::ObjCMethodDecl::setAsRedeclaration(), clang::Decl::setInvalidDecl(), SetIvarInitializers(), and TUScope.

◆ ActOnAttributedStmt()

StmtResult Sema::ActOnAttributedStmt ( const ParsedAttributes AttrList,
Stmt SubStmt 
)

◆ ActOnBaseSpecifier()

BaseResult Sema::ActOnBaseSpecifier ( Decl classdecl,
SourceRange  SpecifierRange,
const ParsedAttributesView 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 2847 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), CheckBaseSpecifier(), clang::Class, Diag(), DiagnoseUnexpandedParameterPack(), clang::SourceRange::getBegin(), GetTypeFromParser(), clang::AttributeCommonInfo::IgnoredAttribute, clang::SourceLocation::isInvalid(), clang::AttributeCommonInfo::UnknownAttribute, UPPC_BaseType, and clang::Virtual.

◆ 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 3029 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), and AttachBaseSpecifiers().

◆ ActOnBinOp()

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

◆ 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 16979 of file SemaExpr.cpp.

References clang::Qualifiers::addConst(), clang::BlockLiteral, BuildParmVarDeclForTypedef(), clang::Type::castAs(), CheckParmsForFunctionDef(), CheckShadow(), Context, clang::ASTContext::CreateTypeSourceInfo(), clang::ASTContext::DependentTy, Diag(), DiagnoseUnexpandedParameterPack(), clang::sema::BlockScopeInfo::FunctionType, clang::Type::getAs(), clang::TypeLoc::getAsAdjusted(), clang::Declarator::getBeginLoc(), clang::Declarator::getContext(), getCurBlock(), clang::ASTContext::getFunctionType(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifier(), getLangOpts(), clang::FunctionTypeLoc::getLocalRangeBegin(), clang::FunctionTypeLoc::getLocalRangeEnd(), clang::Decl::getLocation(), clang::FunctionTypeLoc::getNumParams(), clang::FunctionTypeLoc::getParam(), clang::FunctionTypeLoc::getReturnLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::TypeSourceInfo::getTypeLoc(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, clang::TypeLoc::initializeFullCopy(), clang::Type::isFunctionType(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::BlockDecl::parameters(), ProcessDeclAttributes(), PushOnScopeChains(), clang::Result, clang::sema::CapturingScopeInfo::ReturnType, clang::BlockDecl::setBlockMissingReturnType(), clang::Decl::setInvalidDecl(), clang::BlockDecl::setIsVariadic(), clang::BlockDecl::setParams(), clang::BlockDecl::setSignatureAsWritten(), clang::sema::BlockScopeInfo::TheDecl, clang::sema::BlockScopeInfo::TheScope, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, and UPPC_Block.

◆ 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 17100 of file SemaExpr.cpp.

References DiscardCleanupsInEvaluationContext(), PopDeclContext(), PopExpressionEvaluationContext(), and PopFunctionScopeInfo().

◆ ActOnBlockStart()

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

◆ 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 17112 of file SemaExpr.cpp.

References clang::sema::FunctionScopeInfo::addBlock(), AnalysisWarnings, BuildDeclarationNameExpr(), clang::sema::CapturingScopeInfo::Captures, clang::Type::castAs(), checkNonTrivialCUnion(), Cleanup, computeNRVO(), Context, clang::CPlusPlus, CreateRecoveryExpr(), clang::sema::CapturingScopeInfo::CXXThisCaptureIndex, deduceClosureReturnType(), Diag(), DiagnoseInvalidJumps(), DiagnoseUnguardedAvailabilityViolations(), DiagnoseUnusedParameters(), DiscardCleanupsInEvaluationContext(), clang::QualType::DK_none, ExprCleanupObjects, clang::CleanupInfo::exprNeedsCleanups(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, FinalizeVarWithDestructor(), FunctionScopes, clang::sema::BlockScopeInfo::FunctionType, clang::Type::getAs(), clang::ASTContext::getBlockPointerType(), clang::sema::Capture::getCaptureType(), clang::BlockDecl::getCaretLocation(), getCurFunction(), clang::sema::AnalysisBasedWarnings::getDefaultPolicy(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::sema::Capture::getLocation(), clang::FunctionType::getNoReturnAttr(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::sema::Capture::getVariable(), hasAnyUnrecoverableErrorsInThisFunction(), clang::Decl::hasAttr(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), ImpCastExprToType(), clang::InitializedEntity::InitializeBlock(), clang::sema::Capture::isBlockCapture(), clang::Preprocessor::isCodeCompletionEnabled(), clang::sema::Capture::isCopyCapture(), clang::DeclContext::isDependentContext(), clang::QualType::isDestructedType(), clang::sema::Capture::isInvalid(), clang::Decl::isInvalidDecl(), clang::sema::Capture::isNested(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::sema::Capture::isThisCapture(), LangOpts, MaybeCreateExprWithCleanups(), NTCUC_FunctionReturn, NTCUK_Copy, NTCUK_Destruct, clang::BlockDecl::parameters(), PerformCopyInitialization(), PopDeclContext(), PopExpressionEvaluationContext(), PopFunctionScopeInfo(), PotentiallyEvaluated, PP, clang::Result, clang::sema::CapturingScopeInfo::ReturnType, clang::BlockDecl::setBody(), clang::BlockDecl::setCaptures(), clang::CleanupInfo::setExprNeedsCleanups(), setFunctionHasBranchProtectedScope(), clang::sema::BlockScopeInfo::TheDecl, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, clang::VK_LValue, clang::ASTContext::VoidTy, and clang::FunctionType::ExtInfo::withNoReturn().

◆ ActOnBreakStmt()

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

◆ ActOnBuiltinBitCastExpr()

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

◆ ActOnBuiltinOffsetOf()

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

◆ 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 7162 of file SemaExpr.cpp.

References ActOnOpenMPCall(), BuildCallExpr(), clang::Call, clang::CPlusPlus20, Diag(), DiagnosedUnqualifiedCallsToStdFunctions(), clang::Expr::getExprLoc(), getLangOpts(), and LangOpts.

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

◆ ActOnCapScopeReturnStmt()

StmtResult Sema::ActOnCapScopeReturnStmt ( SourceLocation  ReturnLoc,
Expr RetValExp,
NamedReturnInfo NRInfo,
bool  SupressSimplerImplicitMoves 
)

◆ ActOnCapturedRegionEnd()

StmtResult Sema::ActOnCapturedRegionEnd ( Stmt S)

◆ ActOnCapturedRegionError()

void Sema::ActOnCapturedRegionError ( )

◆ ActOnCapturedRegionStart() [1/2]

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

◆ ActOnCapturedRegionStart() [2/2]

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

◆ ActOnCaseExpr()

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

◆ ActOnCaseStmt()

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

◆ ActOnCaseStmtBody()

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

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

Definition at line 544 of file SemaStmt.cpp.

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

◆ ActOnCastExpr()

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

◆ ActOnCharacterConstant()

ExprResult Sema::ActOnCharacterConstant ( const Token Tok,
Scope UDLScope = nullptr 
)

◆ ActOnChooseExpr()

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

◆ ActOnClassMessage()

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

◆ ActOnClassPropertyRefExpr()

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

◆ 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 9152 of file SemaTemplate.cpp.

References AddAlignmentAttributesForRecord(), clang::DeclContext::addDecl(), AddMsStructLayoutForRecord(), clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::AS_none, clang::AS_public, CheckClassTemplate(), CheckTemplateArgumentList(), CheckTemplateDeclScope(), CheckTemplatePartialSpecialization(), CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), ClassTemplate, Context, clang::FriendDecl::Create(), clang::ClassTemplateSpecializationDecl::Create(), clang::ClassTemplatePartialSpecializationDecl::Create(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), CurContext, Diag(), diagnoseQualifiedDeclaration(), DiagnoseUnexpandedParameterPack(), clang::Enum, clang::OpaquePtr< PtrTy >::get(), clang::ASTContext::getCanonicalTemplateName(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::ASTContext::getLangOpts(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateParameterList::getParam(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::CXXRecordDecl::getPreviousDecl(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateArgumentLoc::getSourceRange(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TemplateParameterList::getTemplateLoc(), clang::CXXRecordDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::ASTContext::getTypeDeclType(), clang::TemplateParameterList::hasAssociatedConstraints(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), clang::ASTContext::hasSameType(), hasVisibleDefinition(), clang::Invalid, isAcceptableTagRedeclaration(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, makeMergedDefinitionVisible(), makeTemplateArgumentListInfo(), MatchTemplateParametersToScopeSpecifier(), clang::Sema::SkipBodyInfo::Previous, ProcessAPINotes(), ProcessDeclAttributeList(), clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateTemplateParmDecl::removeDefaultArgument(), clang::Decl::setAccess(), clang::ClassTemplatePartialSpecializationDecl::setMemberSpecialization(), SetNestedNameSpecifier(), clang::TagDecl::setTemplateParameterListsInfo(), clang::Sema::SkipBodyInfo::ShouldSkip, clang::TemplateParameterList::size(), clang::TemplateArgumentListInfo::size(), clang::Specialization, clang::TemplateIdAnnotation::Template, clang::TemplateIdAnnotation::TemplateNameLoc, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, TUK_Definition, TUK_Friend, TUK_Reference, UPPC_ExplicitSpecialization, and UPPC_PartialSpecialization.

◆ ActOnCoawaitExpr()

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

◆ ActOnComment()

void Sema::ActOnComment ( SourceRange  Comment)

◆ 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 1146 of file SemaDeclObjC.cpp.

References clang::AliasDecl, 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 
)

◆ ActOnCompoundRequirement() [1/2]

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

Definition at line 9149 of file SemaExprCXX.cpp.

References BuildExprRequirement().

◆ ActOnCompoundRequirement() [2/2]

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

◆ ActOnCompoundStmt()

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

◆ ActOnConceptDefinition()

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

◆ ActOnCondition()

Sema::ConditionResult Sema::ActOnCondition ( Scope S,
SourceLocation  Loc,
Expr SubExpr,
ConditionKind  CK,
bool  MissingOK = false 
)

◆ ActOnConditionalOp()

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

◆ ActOnConditionVariable()

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

◆ ActOnConstantExpression()

ExprResult Sema::ActOnConstantExpression ( ExprResult  Res)

◆ ActOnContinueStmt()

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

◆ ActOnConversionDeclarator()

Decl * Sema::ActOnConversionDeclarator ( CXXConversionDecl Conversion)

◆ 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 7449 of file SemaExpr.cpp.

References GetTypeFromParser(), and SemaConvertVectorExpr().

◆ ActOnCoreturnStmt()

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

◆ ActOnCoroutineBodyStart()

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

◆ ActOnCoyieldExpr()

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

◆ ActOnCUDAExecConfigExpr()

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

◆ ActOnCXXAssumeAttr()

ExprResult Sema::ActOnCXXAssumeAttr ( Stmt St,
const ParsedAttr A,
SourceRange  Range 
)

◆ ActOnCXXBoolLiteral()

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

ActOnCXXBoolLiteral - Parse {true,false} literals.

Definition at line 817 of file SemaExprCXX.cpp.

References clang::ASTContext::BoolTy, and Context.

Referenced by ActOnObjCBoolLiteral(), and BuildEmptyCXXFoldExpr().

◆ 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 4430 of file SemaStmt.cpp.

References Context.

◆ 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 18546 of file SemaDeclCXX.cpp.

References ActOnDeclarator(), Diag(), clang::Declarator::getDeclSpec(), clang::Decl::getLocation(), 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 3631 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, Compress >::get(), clang::QualType::getAddressSpace(), clang::Qualifiers::getAddressSpaceAttributePrintValue(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::Stmt::getBeginLoc(), clang::DeclarationNameTable::getCXXOperatorName(), clang::CXXRecordDecl::getDestructor(), clang::Expr::getExprLoc(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::FunctionDecl::getParamDecl(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::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, Compress >::isInvalid(), isSFINAEContext(), clang::Type::isSizelessType(), clang::Expr::isTypeDependent(), 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::TreeTransform< Derived >::RebuildCXXDeleteExpr().

◆ 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 1089 of file SemaCXXScopeSpec.cpp.

References computeDeclContext(), EnterDeclaratorContext(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), RebuildNestedNameSpecifierInCurrentInstantiation(), and RequireCompleteDeclContext().

◆ 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 18510 of file SemaDeclCXX.cpp.

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

◆ 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 1116 of file SemaCXXScopeSpec.cpp.

References computeDeclContext(), ExitDeclaratorContext(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().

◆ 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 18531 of file SemaDeclCXX.cpp.

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

◆ ActOnCXXFoldExpr()

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

◆ ActOnCXXForRangeDecl()

void Sema::ActOnCXXForRangeDecl ( Decl D)

◆ ActOnCXXForRangeIdentifier()

StmtResult Sema::ActOnCXXForRangeIdentifier ( Scope S,
SourceLocation  IdentLoc,
IdentifierInfo Ident,
ParsedAttributes Attrs 
)

◆ ActOnCXXForRangeStmt()

StmtResult Sema::ActOnCXXForRangeStmt ( Scope S,
SourceLocation  ForLoc,
SourceLocation  CoawaitLoc,
Stmt InitStmt,
Stmt First,
SourceLocation  ColonLoc,
Expr Range,
SourceLocation  RParenLoc,
BuildForRangeKind  Kind,
ArrayRef< MaterializeTemporaryExpr * >  LifetimeExtendTemps = {} 
)

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 2514 of file SemaStmt.cpp.

References ActOnCoroutineBodyStart(), ActOnDeclStmt(), ActOnInitializerError(), ActOnObjCForCollectionStmt(), BuildCXXForRangeStmt(), BuildDeclaratorGroup(), Context, Diag(), DiagnoseUnexpandedParameterPack(), FinishForRangeVarDecl(), clang::First, clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getAutoRRefDeductType(), clang::Stmt::getBeginLoc(), clang::DeclStmt::getBeginLoc(), clang::DeclStmt::getSingleDecl(), clang::Stmt::getSourceRange(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::DeclStmt::isSingleDecl(), ObjCEnumerationCollection(), clang::StmtError(), and UPPC_Expression.

Referenced by RebuildForRangeWithDereference().

◆ ActOnCXXGlobalScopeSpecifier()

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

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

Parameters
CCLocThe location of the '::'.
SSThe 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 305 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 3450 of file SemaDeclCXX.cpp.

References clang::AS_private, clang::AS_public, CheckOverrideControl(), clang::CXXScopeSpec::clear(), clang::DeclSpec::ClearConstexprSpec(), clang::DeclSpec::ClearStorageClassSpecs(), computeDeclContext(), Context, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), CurContext, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXOperatorName, Diag(), diagnoseQualifiedDeclaration(), Diags, FieldCollector, clang::Decl::getAccess(), clang::Type::getAs(), clang::DeclSpec::getAttributes(), clang::Decl::getBeginLoc(), clang::Declarator::getBeginLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::VirtSpecifiers::getFinalLoc(), clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::VirtSpecifiers::getLastLocation(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::ParsedAttributesView::getMSPropertyAttr(), clang::Declarator::getMutableDeclSpec(), clang::Declarator::getName(), clang::DeclarationNameInfo::getName(), GetNameForDeclarator(), clang::VirtSpecifiers::getOverrideLoc(), clang::FieldDecl::getParent(), clang::ASTContext::getPrintingPolicy(), clang::CXXScopeSpec::getRange(), clang::TemplateParameterList::getRAngleLoc(), clang::Stmt::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TemplateParameterList::getTemplateLoc(), clang::ValueDecl::getType(), clang::DeclSpec::getTypeQualifiers(), HandleDeclarator(), HandleField(), HandleMSProperty(), clang::Decl::hasAttr(), clang::DeclSpec::hasConstexprSpecifier(), clang::ICIS_NoInit, clang::IK_TemplateId, InitializationHasSideEffects(), clang::Declarator::isDeclarationOfFunction(), clang::DeclContext::isDependentContext(), clang::VirtSpecifiers::isFinalSpecified(), clang::VirtSpecifiers::isFinalSpelledSealed(), clang::DeclSpec::isFriendSpecified(), clang::DiagnosticsEngine::isIgnored(), clang::Decl::isImplicit(), clang::SourceLocation::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::VirtSpecifiers::isOverrideSpecified(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, clang::Member, clang::TemplateIdAnnotation::RAngleLoc, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::Declarator::SetIdentifier(), clang::DeclSpec::SetStorageClassSpec(), clang::DeclSpec::SetTypeQual(), clang::TemplateParameterList::size(), clang::UnqualifiedId::TemplateId, clang::DeclSpec::TQ_const, and UnusedPrivateFields.

◆ 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,addrspace}_cast's.

Definition at line 278 of file SemaCast.cpp.

References BuildCXXNamedCast(), CheckExtraCXXDefaultArguments(), clang::CPlusPlus, clang::ExprError(), getLangOpts(), clang::Expr::getType(), GetTypeForDeclaratorCast(), and clang::Declarator::isInvalidType().

◆ ActOnCXXNestedNameSpecifier() [1/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
SThe scope in which this nested-name-specifier occurs.
SSThe 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).
TemplateKWLocthe location of the 'template' keyword, if any.
TemplateNamethe template name.
TemplateNameLocThe location of the template name.
LAngleLocThe location of the opening angle bracket ('<').
TemplateArgsThe template arguments.
RAngleLocThe location of the closing angle bracket ('>').
CCLocThe location of the '::'.
EnteringContextWhether we're entering the context of the nested-name-specifier.
Returns
true if an error occurred, false otherwise.

Definition at line 909 of file SemaCXXScopeSpec.cpp.

References clang::TemplateArgumentListInfo::arguments(), CheckTemplateIdType(), Context, Diag(), clang::CXXScopeSpec::Extend(), clang::OpaquePtr< PtrTy >::get(), clang::Type::getAs(), clang::TemplateName::getAsAssumedTemplateName(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::SourceRange::getBegin(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::DependentTemplateName::getIdentifier(), clang::DependentTemplateName::getQualifier(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::getWithLocInContext(), clang::Type::isDependentType(), clang::DependentTemplateName::isIdentifier(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::SourceRange::isValid(), clang::None, NoteAllFoundTemplates(), resolveAssumedTemplateNameAsType(), clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::SourceRange::setBegin(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::TemplateArgumentListInfo::size(), and translateTemplateArguments().

◆ ActOnCXXNestedNameSpecifier() [2/2]

bool Sema::ActOnCXXNestedNameSpecifier ( Scope S,
NestedNameSpecInfo IdInfo,
bool  EnteringContext,
CXXScopeSpec SS,
bool IsCorrectedToColon = nullptr,
bool  OnlyNamespace = false 
)

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

Parameters
SThe scope in which this nested-name-specifier occurs.
IdInfoParser information about an identifier in the nested-name-spec.
EnteringContextWhether we're entering the context nominated by this nested-name-specifier.
SSThe 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).
IsCorrectedToColonIf 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 '::'.
OnlyNamespaceIf true, only considers namespaces in lookup.
Returns
true if an error occurred, false otherwise.

Definition at line 831 of file SemaCXXScopeSpec.cpp.

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

◆ ActOnCXXNestedNameSpecifierDecltype()

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

◆ ActOnCXXNestedNameSpecifierIndexedPack()

bool Sema::ActOnCXXNestedNameSpecifierIndexedPack ( CXXScopeSpec SS,
const DeclSpec DS,
SourceLocation  ColonColonLoc,
QualType  Type 
)

◆ 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
StartLocThe first location of the expression.
UseGlobalTrue if 'new' was prefixed with '::'.
PlacementLParenOpening paren of the placement arguments.
PlacementArgsPlacement new arguments.
PlacementRParenClosing paren of the placement arguments.
TypeIdParensIf the type is in parens, the source range.
DThe type to be allocated, as well as array dimensions.
InitializerThe initializing expression or initializer-list, or null if there is none.

Definition at line 1885 of file SemaExprCXX.cpp.

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

◆ ActOnCXXNullPtrLiteral()

ExprResult Sema::ActOnCXXNullPtrLiteral ( SourceLocation  Loc)

ActOnCXXNullPtrLiteral - Parse 'nullptr'.

Definition at line 826 of file SemaExprCXX.cpp.

References Context, and clang::ASTContext::NullPtrTy.

◆ 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 1417 of file SemaExprCXX.cpp.

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

Referenced by buildCoroutinePromise(), CheckDestructor(), collectPlacementArgs(), and DefineImplicitLambdaToBlockPointerConversion().

◆ ActOnCXXThrow()

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

◆ ActOnCXXTryBlock()

StmtResult Sema::ActOnCXXTryBlock ( SourceLocation  TryLoc,
Stmt TryBlock,
ArrayRef< Stmt * >  Handlers 
)

◆ 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 1468 of file SemaExprCXX.cpp.

References BuildCXXTypeConstructExpr(), Context, CorrectDelayedTyposInExpr(), CreateRecoveryExpr(), clang::ExprError(), clang::TypeLoc::getBeginLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), and clang::Result.

◆ ActOnCXXTypeid()

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

◆ 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 792 of file SemaExprCXX.cpp.

References clang::QualType::addConst(), BuildCXXUuidof(), Context, clang::ExprError(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), clang::ASTContext::getMSGuidType(), clang::ASTContext::getTrivialTypeSourceInfo(), GetTypeFromParser(), and clang::QualType::isNull().

◆ ActOnDeclarator()

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

◆ ActOnDeclStmt()

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

◆ ActOnDecltypeExpression()

ExprResult Sema::ActOnDecltypeExpression ( Expr E)

◆ ActOnDecompositionDeclarator()

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

Definition at line 738 of file SemaDeclCXX.cpp.

References ActOnVariableDeclarator(), clang::DeclContext::addHiddenDecl(), clang::DecompositionDeclarator::bindings(), checkDeclIsAllowedInOpenMPTarget(), CheckShadow(), clang::Condition, Context, clang::CPlusPlus17, clang::CPlusPlus20, clang::BindingDecl::Create(), clang::FixItHint::CreateRemoval(), CurContext, Diag(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), DiagPlaceholderVariableDefinition(), FilterLookupForScope(), ForVisibleRedeclaration, clang::Declarator::getContext(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Declarator::getDecompositionDeclarator(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::DecompositionDeclarator::getLSquareLoc(), clang::Declarator::getNumTypeObjects(), clang::DeclContext::getRedeclContext(), getShadowedDeclaration(), clang::DecompositionDeclarator::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::Declarator::getTypeObject(), clang::Declarator::hasGroupingParens(), int, isDeclInScope(), clang::Declarator::isDecompositionDeclarator(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFunctionOrMethod(), clang::Type::isFunctionType(), isInOpenMPDeclareTargetContext(), clang::IdentifierInfo::isPlaceholder(), clang::Declarator::isRedeclaration(), clang::DeclContext::isTranslationUnit(), clang::SourceLocation::isValid(), clang::DeclaratorChunk::Kind, clang::TemplateIdAnnotation::Kind, LookupName(), LookupOrdinaryName, clang::Declarator::mayHaveDecompositionDeclarator(), clang::DeclaratorChunk::Paren, ParsingInitForAutoVars, Previous, PushOnScopeChains(), clang::TemplateIdAnnotation::RAngleLoc, clang::DeclaratorChunk::Reference, clang::DeclSpec::SCS_extern, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, clang::Declarator::setInvalidType(), clang::TemplateIdAnnotation::TemplateNameLoc, clang::TNK_Concept_template, clang::DeclSpec::TQ_volatile, clang::DeclSpec::TST_auto, and UPPC_DeclarationType.

Referenced by HandleDeclarator().

◆ ActOnDefaultCtorInitializers()

void Sema::ActOnDefaultCtorInitializers ( Decl CDtorDecl)

Definition at line 6005 of file SemaDeclCXX.cpp.

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

◆ ActOnDefaultStmt()

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

◆ ActOnDefinedDeclarationSpecifier()

void Sema::ActOnDefinedDeclarationSpecifier ( Decl D)

Called once it is known whether a tag declaration is an anonymous union or struct.

Definition at line 5387 of file SemaDecl.cpp.

References DiagPlaceholderFieldDeclDefinitions().

◆ 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 5107 of file SemaDeclObjC.cpp.

References clang::Class, Context, clang::CPlusPlus, clang::ObjCAtDefsFieldDecl::Create(), clang::ASTContext::DeepCollectObjCIvars(), Diag(), getLangOpts(), getObjCInterfaceDecl(), clang::ObjCRuntime::isNonFragile(), LangOpts, clang::LangOptions::ObjCRuntime, and PushOnScopeChains().

◆ 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 10796 of file SemaDeclCXX.cpp.

References clang::IdentifierResolver::AddDecl(), clang::NamedDecl::getDeclName(), and IdResolver.

◆ 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 19110 of file SemaDeclCXX.cpp.

References clang::ASTContext::adjustExceptionSpec(), checkExceptionSpecification(), CheckOverridingFunctionExceptionSpec(), checkThisInStaticMemberFunctionExceptionSpec(), Context, clang::CXXMethodDecl::isStatic(), clang::CXXMethodDecl::isVirtual(), and clang::CXXMethodDecl::overridden_methods().

◆ 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 729 of file SemaTemplate.cpp.

References BuildDependentDeclRefExpr(), Context, clang::CXXDependentScopeMemberExpr::Create(), getFunctionLevelDeclContext(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::getWithLocInContext(), and isUnevaluatedContext().

Referenced by ActOnIdExpression(), and ActOnNameClassifiedAsDependentNonType().

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

◆ ActOnDependentTag()

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

◆ ActOnDesignatedInitializer()

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

◆ ActOnDocumentableDecl()

void Sema::ActOnDocumentableDecl ( Decl D)

◆ ActOnDocumentableDecls()

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

◆ ActOnDoStmt()

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

◆ ActOnDuplicateDefinition()

bool Sema::ActOnDuplicateDefinition ( 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 18296 of file SemaDecl.cpp.

References hasStructuralCompatLayout(), makeMergedDefinitionVisible(), clang::Sema::SkipBodyInfo::New, and clang::Sema::SkipBodyInfo::Previous.

◆ ActOnDuplicateODRHashDefinition()

template<typename T , typename = std::enable_if_t<std::is_base_of<NamedDecl, T>::value>>
bool clang::Sema::ActOnDuplicateODRHashDefinition ( T *  Duplicate,
T *  Previous 
)
inline

Check ODR hashes for C/ObjC when merging types from modules.

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

Definition at line 12083 of file Sema.h.

References makeMergedDefinitionVisible(), and Previous.

◆ ActOnEmptyDeclaration()

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

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

Definition at line 16898 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), Context, clang::EmptyDecl::Create(), CurContext, and ProcessDeclAttributeList().

◆ 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 1110 of file Sema.cpp.

References ActOnEndOfTranslationUnitFragment(), AnalysisWarnings, clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::begin(), CheckCompleteVariableDeclaration(), CheckDelayedMemberExceptionSpecs(), CheckDelegatingCtorCycles(), checkUndefinedButUsed(), clang::ASTConsumer::CompleteExternalDeclaration(), clang::ASTConsumer::CompleteTentativeDefinition(), Consumer, Context, DelayedDllExportClasses, DelayedDllExportMemberFunctions, DelayedEquivalentExceptionSpecChecks, DelayedOverridingExceptionSpecChecks, DeleteExprs, Diag(), DiagnoseUnterminatedOpenMPDeclareTarget(), DiagnoseUnterminatedPragmaAlignPack(), DiagnoseUnterminatedPragmaAttribute(), DiagnoseUseOfUnimplementedSelectors(), Diags, emitAndClearUnusedLocalTypedefWarnings(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::end(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::erase(), clang::ExpectedVariableOrFunction, clang::Module::ExplicitGlobalModuleFragment, ExternalDeclarations, clang::VarDecl::getActingDefinition(), clang::ASTContext::getAsIncompleteArrayType(), getASTContext(), clang::ASTContext::getConstantArrayType(), clang::Preprocessor::getCurrentModule(), getCurrentModule(), clang::Sema::DelayedDiagnostics::getCurrentPool(), clang::VarDecl::getDefinition(), clang::VarDecl::getDescribedVarTemplate(), clang::SourceManager::getExpansionLoc(), clang::Preprocessor::getHeaderSearchInfo(), clang::Preprocessor::getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getModuleInitializers(), clang::HeaderSearch::getModuleMap(), clang::ASTContext::getSizeType(), clang::FunctionDecl::getTemplateSpecializationArgsAsWritten(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), clang::DiagnosticsEngine::hasErrorOccurred(), clang::Module::Imports, clang::Preprocessor::isCodeCompletionEnabled(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDeleted(), clang::LangOptions::IsHeaderFile, clang::DiagnosticsEngine::isIgnored(), clang::Preprocessor::isIncrementalProcessingEnabled(), clang::SourceManager::isInMainFile(), clang::Module::isInterfaceOrPartition(), clang::Decl::isInvalidDecl(), clang::Module::isNamedModuleInterfaceHasInit(), IsRecordFullyDefined(), clang::Decl::isReferenced(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), clang::TagDecl::isUnion(), LangOpts, LateParsedInstantiations, LateTemplateParserCleanup, LoadExternalWeakUndeclaredIdentifiers(), LookupOrdinaryName, LookupSingleName(), clang::Normal, Normal, OpaqueParser, ParsingInitForAutoVars, PendingInstantiations, PerformPendingInstantiations(), PP, Private, clang::Module::PrivateModuleFragment, RequireCompleteType(), clang::ModuleMap::resolveConflicts(), clang::ModuleMap::resolveExports(), clang::ModuleMap::resolveUses(), clang::SC_Static, clang::SourceRange::setEnd(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), ShouldRemoveFromUnused(), SM, SourceMgr, clang::Module::submodules(), TentativeDefinitions, clang::TU_ClangModule, clang::TU_Prefix, TUKind, TUScope, UndefinedButUsed, UnusedFileScopedDecls, UnusedPrivateFields, and WeakUndeclaredIdentifiers.

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

◆ ActOnEndOfTranslationUnitFragment()

void Sema::ActOnEndOfTranslationUnitFragment ( TUFragmentKind  Kind)

◆ ActOnEndOpenACCDeclDirective()

DeclGroupRef Sema::ActOnEndOpenACCDeclDirective ( )

Called after the directive has been completely parsed, including the declaration group or associated statement.

Definition at line 122 of file SemaOpenACC.cpp.

◆ ActOnEndOpenACCStmtDirective()

StmtResult Sema::ActOnEndOpenACCStmtDirective ( OpenACCDirectiveKind  K,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
StmtResult  AssocStmt 
)

◆ ActOnEnumBody()

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

◆ ActOnEnumConstant()

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

◆ ActOnExceptionDeclarator()

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

◆ ActOnExitFunctionContext()

void Sema::ActOnExitFunctionContext ( )

Definition at line 1474 of file SemaDecl.cpp.

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

◆ ActOnExplicitBoolSpecifier()

ExplicitSpecifier Sema::ActOnExplicitBoolSpecifier ( Expr E)

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

Definition at line 13844 of file SemaDeclCXX.cpp.

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

◆ ActOnExplicitInstantiation() [1/3]

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

Definition at line 10952 of file SemaTemplate.cpp.

References clang::TemplateSpecCandidateSet::addCandidate(), clang::UnresolvedSetImpl::addDecl(), adjustCCAndNoReturn(), clang::UnresolvedSetImpl::begin(), CheckEquivalentExceptionSpec(), CheckExplicitInstantiation(), CheckSpecializationInstantiationRedecl(), CheckVarTemplateId(), clang::DeclSpec::ClearStorageClassSpecs(), Consumer, Context, clang::CPlusPlus11, clang::FixItHint::CreateRemoval(), clang::CUDATargetMismatch, clang::DeclarationName::CXXDeductionGuideName, DeduceTemplateArguments(), Diag(), clang::UnresolvedSetImpl::end(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::DeclSpec::getAttributes(), clang::TypeLoc::getBeginLoc(), clang::DeclSpec::getBeginLoc(), clang::Declarator::getBeginLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::TargetInfo::getCXXABI(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::Decl::getLocation(), clang::TemplateSpecCandidateSet::getLocation(), getMostSpecialized(), clang::Declarator::getMutableDeclSpec(), clang::Declarator::getName(), clang::DeclarationNameInfo::getName(), GetNameForDeclarator(), clang::VarDecl::getPointOfInstantiation(), clang::FunctionDecl::getPointOfInstantiation(), clang::CXXScopeSpec::getRange(), clang::DeclSpec::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::ASTContext::getTargetInfo(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::VarDecl::getTemplateSpecializationKind(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTConsumer::HandleTopLevelDecl(), clang::DeclSpec::hasConstexprSpecifier(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), IdentifyCUDATarget(), clang::IK_TemplateId, InstantiateFunctionDefinition(), InstantiateVariableDefinition(), clang::Type::isFunctionType(), clang::DeclSpec::isInlineSpecified(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Declarator::isInvalidType(), clang::TargetCXXABI::isMicrosoft(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::VarDecl::isStaticDataMember(), clang::Type::isUndeducedType(), clang::ActionResult< PtrTy, Compress >::isUsable(), LangOpts, LookupOrdinaryName, LookupParsedName(), clang::MakeDeductionFailureInfo(), makeTemplateArgumentListInfo(), P, PDiag(), Previous, ProcessAPINotes(), ProcessDeclAttributeList(), clang::Result, ScopeSpecifierHasTemplateId(), clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::TemplateSpecCandidate::set(), clang::VarDecl::setTemplateSpecializationKind(), clang::Specialization, clang::Success, clang::UnqualifiedId::TemplateId, clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and clang::TSK_Undeclared.

◆ ActOnExplicitInstantiation() [2/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 10531 of file SemaTemplate.cpp.

References clang::Decl::addAttr(), clang::DeclContext::addDecl(), clang::ASTConsumer::AssignInheritanceModel(), CheckExplicitInstantiation(), CheckSpecializationInstantiationRedecl(), CheckTemplateArgumentList(), ClassTemplate, Consumer, Context, clang::ClassTemplateSpecializationDecl::Create(), clang::FixItHint::CreateReplacement(), CurContext, Diag(), dllExportImportClassTemplateSpecialization(), clang::Enum, clang::OpaquePtr< PtrTy >::get(), getASTContext(), clang::Decl::getAttr(), clang::TargetInfo::getCXXABI(), clang::getDLLAttr(), clang::Decl::getLocation(), getNonTagTypeDeclKind(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::ASTContext::getTargetInfo(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::TargetInfo::getTriple(), clang::ASTContext::getTypeDeclType(), clang::Decl::hasAttr(), InstantiateClassTemplateSpecialization(), InstantiateClassTemplateSpecializationMembers(), isAcceptableTagRedeclaration(), clang::SourceLocation::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::CXXScopeSpec::isSet(), MarkVTableUsed(), ProcessAPINotes(), ProcessDeclAttributeList(), SetNestedNameSpecifier(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::TargetInfo::shouldDLLImportComdatSymbols(), clang::Specialization, translateTemplateArguments(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

◆ ActOnExplicitInstantiation() [3/3]

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

◆ 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 6117 of file SemaExprCXX.cpp.

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

◆ ActOnExprStmt()

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

◆ ActOnExprStmtError()

StmtResult Sema::ActOnExprStmtError ( )

Definition at line 65 of file SemaStmt.cpp.

References DiscardCleanupsInEvaluationContext(), and 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 18536 of file SemaDecl.cpp.

References clang::AS_public, HandleField(), and clang::ICIS_NoInit.

◆ 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 19273 of file SemaDecl.cpp.

References AbstractIvarType, clang::Decl::addAttr(), AddImplicitlyDeclaredMembersToClass(), clang::C99, clang::CanNeverPassInRegs, clang::Type::castAs(), CheckAlignasUnderalignment(), CheckImplementationIvars(), checkMSInheritanceAttrOnDefinition(), ComputeSelectedDestructor(), ComputeSpecialMemberFunctionsEligiblity(), Context, clang::CPlusPlus, clang::FixItHint::CreateInsertion(), CXXDestructor, Diag(), DiagnoseDuplicateIvars(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::NamedDecl::getDeclName(), clang::QualType::getDesugaredType(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getIvarDecl(), clang::Decl::getKind(), getLangOpts(), clang::Decl::getLocation(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getObjCLifetime(), clang::ASTContext::getObjCObjectPointerType(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), getSourceManager(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSizeInChars(), clang::Decl::hasAttr(), clang::ASTContext::hasDirectOwnershipQualifier(), clang::QualType::hasNonTrivialObjCLifetime(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), clang::RecordDecl::hasObjectMember(), inTemplateInstantiation(), clang::FieldDecl::isAnonymousStructOrUnion(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::Type::isFunctionType(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), clang::QualType::isNonTrivialToPrimitiveCopy(), clang::QualType::isNonTrivialToPrimitiveDefaultInitialize(), clang::QualType::isObjCGCStrong(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::Type::isRecordType(), clang::QualType::isVolatileQualified(), clang::CharUnits::isZero(), clang::ObjCInterfaceDecl::known_extensions(), clang::LangOptionsBase::NonGC, clang::ObjC, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::QualType::PCK_Trivial, clang::QualType::PCK_VolatileTrivial, ProcessAPINotes(), ProcessDeclAttributeList(), clang::randstruct::randomizeStructureLayout(), RequireCompleteSizedType(), RequireNonAbstractType(), clang::ASTContext::ResetObjCLayout(), SetDeclDeleted(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::ValueDecl::setType(), and ShouldDeleteSpecialMember().

Referenced by ActOnCapturedRegionError(), ActOnFinishCXXMemberSpecification(), ActOnLambdaError(), BuildLambdaExpr(), and InstantiateClass().

◆ ActOnFileScopeAsmDecl()

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

◆ 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 4242 of file SemaDeclCXX.cpp.

References ActOnFinishFullExpr(), ConvertMemberDefaultInitExpression(), CorrectDelayedTyposInExpr(), DiagnoseUnexpandedParameterPack(), clang::FieldDecl::getInClassInitStyle(), clang::ValueDecl::getType(), clang::ICIS_NoInit, clang::Init, clang::Type::isDependentType(), PopFunctionScopeInfo(), clang::FieldDecl::removeInClassInitializer(), clang::FieldDecl::setInClassInitializer(), clang::Decl::setInvalidDecl(), and UPPC_Initializer.

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 14399 of file SemaDeclCXX.cpp.

References checkForMultipleExportedDefaultConstructors(), CurContext, DelayedEquivalentExceptionSpecChecks, and DelayedOverridingExceptionSpecChecks.

◆ ActOnFinishCXXMemberSpecification()

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

◆ ActOnFinishCXXNonNestedClass()

void Sema::ActOnFinishCXXNonNestedClass ( )

◆ 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 16503 of file SemaDecl.cpp.

References checkThisInStaticMemberFunctionAttributes(), ProcessAPINotes(), and ProcessDeclAttributeList().

◆ 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 10813 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), CheckConstructor(), CheckCXXDefaultArguments(), and clang::Decl::isInvalidDecl().

◆ ActOnFinishDelayedMemberDeclarations()

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

◆ ActOnFinishDelayedMemberInitializers()

void Sema::ActOnFinishDelayedMemberInitializers ( Decl Record)

Definition at line 14090 of file SemaDeclCXX.cpp.

References CheckDelayedMemberExceptionSpecs().

Referenced by InstantiateClass().

◆ ActOnFinishedFunctionDefinitionInOpenMPAssumeScope()

void Sema::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope ( Decl D)

Act on D, a function definition inside of an omp [begin/end] assumes.

Definition at line 7264 of file SemaOpenMP.cpp.

References clang::Decl::addAttr(), inTemplateInstantiation(), and clang::Decl::isInvalidDecl().

Referenced by ActOnStartOfLambdaDefinition(), and CheckFunctionDeclaration().

◆ ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope()

void Sema::ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope ( Decl D,
SmallVectorImpl< FunctionDecl * > &  Bases 
)

Register D as specialization of all base functions in Bases in the current omp begin/end declare variant scope.

Definition at line 7371 of file SemaOpenMP.cpp.

References Context, clang::DeclRefExpr::Create(), clang::Decl::getLocation(), clang::ValueDecl::getType(), Unevaluated, and clang::VK_PRValue.

Referenced by ActOnDeclarator(), and ActOnStartOfFunctionDef().

◆ ActOnFinishedOpenMPDeclareTargetContext()

void Sema::ActOnFinishedOpenMPDeclareTargetContext ( DeclareTargetContextInfo DTCI)

Called once a target context is completed, that can be when a '#pragma omp end declare target' was encountered or when a '#pragma omp declare target' without declaration-definition-seq was encountered.

Definition at line 23302 of file SemaOpenMP.cpp.

References ActOnOpenMPDeclareTargetName(), and clang::Sema::DeclareTargetContextInfo::ExplicitlyMapped.

◆ ActOnFinishExportDecl()

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

Complete the definition of an export declaration.

Definition at line 976 of file SemaModule.cpp.

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

◆ ActOnFinishFullExpr() [1/2]

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

◆ ActOnFinishFullExpr() [2/2]

ExprResult Sema::ActOnFinishFullExpr ( Expr Expr,
SourceLocation  CC,
bool  DiscardedValue,
bool  IsConstexpr = false,
bool  IsTemplateArgument = false 
)

◆ ActOnFinishFullStmt()

StmtResult Sema::ActOnFinishFullStmt ( Stmt Stmt)

Definition at line 9055 of file SemaExprCXX.cpp.

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

◆ ActOnFinishFunctionBody() [1/2]

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

◆ ActOnFinishFunctionBody() [2/2]

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

Definition at line 16070 of file SemaDecl.cpp.

References clang::Decl::addAttr(), AnalysisWarnings, clang::TargetCXXABI::canKeyFunctionBeInline(), clang::Type::castAs(), CheckCompletedCoroutineBody(), CheckConstexprFunctionDefinition(), CheckCoroutineWrapper(), CheckDestructor(), CheckImmediateEscalatingFunctionDefinition(), checkTypeSupport(), clang::Stmt::children(), clang::NSAPI::ClassId_NSObject, Cleanup, computeNRVO(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus14, clang::FixItHint::CreateInsertion(), deduceClosureReturnType(), DeduceFunctionTypeFromReturnExpr(), Definition, Diag(), Diagnose, diagnoseImplicitlyRetainedSelf(), DiagnoseInvalidJumps(), DiagnoseReturnInConstructorExceptionHandler(), DiagnoseSizeOfParametersAndReturnValue(), DiagnoseUnguardedAvailabilityViolations(), DiagnoseUnusedParameters(), clang::sema::AnalysisBasedWarnings::Policy::disableCheckFallThrough(), DiscardCleanupsInEvaluationContext(), Emitted, ExprCleanupObjects, ExprEvalContexts, clang::CleanupInfo::exprNeedsCleanups(), FindPossiblePrototype(), clang::Type::getAs(), clang::TypeLoc::getAs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::DeclaratorDecl::getBeginLoc(), clang::CXXMethodDecl::getCanonicalDecl(), getCurFunction(), getCurFunctionDecl(), getCurLambda(), getCurMethodDecl(), clang::ASTContext::getCurrentKeyFunction(), clang::TargetInfo::getCXXABI(), clang::sema::AnalysisBasedWarnings::getDefaultPolicy(), getDiagnostics(), getEmissionStatus(), clang::Decl::getEndLoc(), clang::ASTContext::getFunctionType(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::FunctionDecl::getReturnType(), getSourceManager(), clang::FunctionDecl::getStorageClass(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), hasAnyUnrecoverableErrorsInThisFunction(), clang::Decl::hasAttr(), clang::FunctionDecl::hasImplicitReturnZero(), clang::sema::FunctionScopeInfo::HasPotentialAvailabilityViolations, clang::FunctionDecl::hasSkippedBody(), hasUncompilableErrorOccurred(), clang::FunctionDecl::hasWrittenPrototype(), clang::Invalid, clang::Type::isAnyPointerType(), clang::Preprocessor::isCodeCompletionEnabled(), clang::FunctionDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::sema::FunctionScopeInfo::isCoroutine(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isDeleted(), clang::DeclContext::isDependentContext(), clang::Decl::isImplicit(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), clang::isLambdaCallOperator(), clang::FunctionDecl::isMultiVersion(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isPureVirtual(), clang::Type::isRecordType(), clang::Decl::isUnavailable(), clang::Type::isUndeducedType(), clang::CXXMethodDecl::isVirtual(), clang::isWhitespace(), LangOpts, MarkBaseAndMemberDestructorsReferenced(), MarkVTableUsed(), MaybeODRUseExprs, clang::sema::FunctionScopeInfo::NeedsScopeChecking(), NSAPIObj, clang::sema::FunctionScopeInfo::ObjCShouldCallSuper, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::LangOptions::OMPTargetTriples, clang::FunctionDecl::parameters(), PopDeclContext(), PopFunctionScopeInfo(), PP, clang::SC_None, clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::ASTContext::setNonKeyFunction(), clang::ValueDecl::setType(), clang::FunctionDecl::setWillHaveBody(), ShouldWarnAboutMissingPrototype(), SM, Unknown, clang::sema::FunctionScopeInfo::UsesFPIntrin, and clang::ASTContext::VoidTy.

◆ ActOnFinishFunctionDeclarationDeclarator()

void Sema::ActOnFinishFunctionDeclarationDeclarator ( Declarator D)

◆ ActOnFinishHLSLBuffer()

void Sema::ActOnFinishHLSLBuffer ( Decl Dcl,
SourceLocation  RBrace 
)

Definition at line 30 of file SemaHLSL.cpp.

References PopDeclContext().

◆ ActOnFinishInlineFunctionDef()

void Sema::ActOnFinishInlineFunctionDef ( FunctionDecl D)

◆ ActOnFinishKNRParamDeclarations()

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

◆ 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 16878 of file SemaDeclCXX.cpp.

References getCurrentModule(), getLangOpts(), clang::SourceLocation::isValid(), Parent, PopDeclContext(), 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 11812 of file SemaDeclCXX.cpp.

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

◆ ActOnFinishObjCImplementation()

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

◆ ActOnFinishOfCompoundStmt()

void Sema::ActOnFinishOfCompoundStmt ( )

Definition at line 403 of file SemaStmt.cpp.

References PopCompoundScope().

Referenced by clang::Sema::CompoundScopeRAII::~CompoundScopeRAII().

◆ ActOnFinishRequiresExpr()

void Sema::ActOnFinishRequiresExpr ( )

Definition at line 9320 of file SemaExprCXX.cpp.

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

◆ ActOnFinishSEHFinallyBlock()

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

◆ ActOnFinishSwitchStmt()

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

◆ ActOnFinishTopLevelStmtDecl()

void Sema::ActOnFinishTopLevelStmtDecl ( TopLevelStmtDecl D,
Stmt Statement 
)

◆ ActOnFinishTrailingRequiresClause()

ExprResult Sema::ActOnFinishTrailingRequiresClause ( ExprResult  ConstraintExpr)

Definition at line 4205 of file SemaDeclCXX.cpp.

References ActOnRequiresClause().

◆ ActOnForEachDeclStmt()

void Sema::ActOnForEachDeclStmt ( DeclGroupPtrTy  Decl)

◆ 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 2223 of file SemaStmt.cpp.

References ActOnFinishFullExpr(), CheckPlaceholderExpr(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::StmtError().

◆ ActOnForStmt()

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

◆ ActOnForwardClassDeclaration()

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

◆ ActOnForwardProtocolDeclaration()

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

◆ ActOnFriendFunctionDecl()

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

Definition at line 17798 of file SemaDeclCXX.cpp.

References ActOnFunctionDeclarator(), clang::DeclContext::addDecl(), adjustContextForLocalExternDecl(), clang::AS_public, CheckFriendAccess(), computeDeclContext(), Context, clang::CPlusPlus11, clang::FriendDecl::Create(), clang::FixItHint::CreateRemoval(), CurContext, clang::Scope::DeclScope, Diag(), DiagnoseUnexpandedParameterPack(), Diags, clang::DeclContext::Equals(), ForExternalRedeclaration, functionDeclHasDefaultArgument(), clang::SourceRange::getBegin(), clang::DeclarationNameInfo::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::Declarator::getDeclSpec(), clang::DeclSpec::getFriendSpecLoc(), clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Declarator::getName(), clang::DeclarationNameInfo::getName(), GetNameForDeclarator(), clang::DeclContext::getNonTransparentContext(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), getScopeForDeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::IK_ConstructorName, clang::IK_ConstructorTemplateId, clang::IK_ConversionFunctionId, clang::IK_DeductionGuideName, clang::IK_DestructorName, clang::IK_Identifier, clang::IK_ImplicitSelfParam, clang::IK_LiteralOperatorId, clang::IK_OperatorFunctionId, clang::IK_TemplateId, clang::NestedNameSpecifier::isDependent(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::isFunctionDefinition(), clang::Type::isFunctionType(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::CXXScopeSpec::isSet(), clang::CXXScopeSpec::isValid(), LookupLocalFriendName, LookupName(), LookupOrdinaryName, LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), Previous, PushOnScopeChains(), RequireCompleteDeclContext(), clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::Scope::setEntity(), clang::Decl::setInvalidDecl(), clang::FriendDecl::setUnsupportedFriend(), UPPC_FriendDeclaration, and warnOnReservedIdentifier().

◆ 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 17694 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, Context, clang::CPlusPlus11, clang::FriendDecl::Create(), clang::FriendTemplateDecl::Create(), clang::FixItHint::CreateInsertion(), CurContext, Diag(), DiagnoseUnexpandedParameterPack(), clang::Type::getAsRecordDecl(), clang::DeclSpec::getAtomicSpecLoc(), clang::TypeLoc::getBeginLoc(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getConstSpecLoc(), clang::DeclSpec::getFriendSpecLoc(), clang::TagDecl::getKindName(), getLangOpts(), getLocForEndOfToken(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::TagDecl::getTagKind(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getUnalignedSpecLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::Type::isElaboratedTypeSpecifier(), clang::DeclSpec::isFriendSpecified(), clang::DeclSpec::isFriendSpecifiedFirst(), clang::Declarator::isInvalidType(), clang::Member, clang::ParsedAttributesView::none(), clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, clang::DeclSpec::TQ_unaligned, clang::DeclSpec::TQ_volatile, and UPPC_FriendDeclaration.

Referenced by ParsedFreeStandingDeclSpec().

◆ ActOnFunctionDeclarator()

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

Definition at line 9848 of file SemaDecl.cpp.

References ActOnHLSLTopLevelFunction(), clang::Decl::addAttr(), AddCFAuditedAttribute(), clang::DeclContext::addDecl(), AddImplicitMSFunctionNoBuiltinAttr(), AddKnownFunctionAttributes(), AddPushedVisibilityAttribute(), AddRangeBasedOptnone(), AddSectionMSAllocText(), adjustContextForLocalExternDecl(), adjustMemberFunctionCC(), clang::Builtin::Context::allowTypeMismatch(), clang::TemplateSpecializationType::anyInstantiationDependentTemplateArguments(), clang::TemplateArgumentListInfo::arguments(), clang::AS_public, clang::ast_matchers::attr, BuildParmVarDeclForTypedef(), clang::ASTContext::BuiltinInfo, clang::Type::castAs(), clang::CC_X86StdCall, checkAttributesAfterMerging(), CheckDependentFunctionTemplateSpecialization(), checkDLLAttributeRedeclaration(), CheckFunctionDeclaration(), CheckFunctionTemplateSpecialization(), CheckHLSLEntryPoint(), checkIsValidOpenCLKernelParameter(), CheckMain(), CheckMemberSpecialization(), CheckMSVCRTEntryPoint(), checkNonTrivialCUnion(), CheckTemplateDeclScope(), CheckTemplateParameterList(), clang::CLanguageLinkage, CodeSegStack, CompleteMemberSpecialization(), clang::Consteval, clang::Constexpr, clang::DeclContext::containsDecl(), Context, clang::CPlusPlus, clang::CPlusPlus14, clang::CPlusPlus20, clang::FunctionTemplateDecl::Create(), clang::FixItHint::CreateInsertion(), CreateNewFunctionDecl(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::CUDA, CurContext, clang::Sema::PragmaStack< ValueType >::CurrentValue, clang::DeclarationName::CXXDestructorName, clang::Declaration, clang::Default, clang::Defaulted, clang::Definition, clang::Deleted, Diag(), DiagnoseInvalidRedeclaration(), DiagnoseUnexpandedParameterPack(), clang::Decl::dropAttr(), clang::EST_BasicNoexcept, ExtnameUndeclaredIdentifiers, FilterLookupForScope(), clang::LookupResult::FoundOverloaded, FriendConstraintsDependOnEnclosingTemplate(), clang::FTIHasNonVoidParameters(), clang::DeclaratorChunk::Fun, FunctionTemplate, clang::Decl::getAccess(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Declarator::getAsmLabel(), clang::Decl::getAttr(), clang::SourceRange::getBegin(), clang::DeclaratorDecl::getBeginLoc(), clang::DeclSpec::getBeginLoc(), clang::ASTContext::GetBuiltinType(), clang::QualType::getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::FunctionType::getCmseNSCallAttr(), clang::DeclSpec::getConstexprSpecifier(), clang::DeclSpec::getConstexprSpecLoc(), getCudaConfigureFuncName(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclaratorChunk::FunctionTypeInfo::getDeclsInPrototype(), clang::Declarator::getDeclSpec(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::SourceRange::getEnd(), clang::DeclSpec::getExplicitSpecLoc(), clang::DeclSpec::getExplicitSpecRange(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::Declarator::getFunctionDefinitionKind(), getFunctionStorageClass(), clang::ASTContext::getFunctionType(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifierLoc(), getImplicitCodeSegOrSectionAttrForFunction(), clang::DeclSpec::getInlineSpecLoc(), clang::Declarator::getInventedTemplateParameterList(), clang::Decl::getKind(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::FunctionDecl::getLanguageLinkage(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getName(), clang::NamedDecl::getName(), clang::DeclarationNameInfo::getName(), clang::FunctionType::getNameForCallConv(), GetNameForDeclarator(), clang::DeclSpec::getNoreturnSpecLoc(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::Decl::getOwningModule(), clang::FunctionProtoType::getParamTypes(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::CXXScopeSpec::getScopeRep(), clang::TemplateParameterList::getSourceRange(), clang::UnqualifiedId::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::FunctionDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpecLoc(), clang::StringLiteral::getString(), clang::StringLiteral::getStrTokenLoc(), getTagInjectionContext(), clang::ASTContext::getTargetInfo(), clang::FunctionTemplateSpecializationInfo::getTemplate(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getType(), clang::Declarator::getTypeObject(), clang::Type::getUnqualifiedDesugaredType(), clang::DeclSpec::getVirtualSpecLoc(), clang::Decl::hasAttr(), clang::FunctionProtoType::hasExceptionSpec(), clang::DeclSpec::hasExplicitSpecifier(), clang::TargetInfo::hasFeature(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), clang::Decl::hasOwningModule(), clang::ASTContext::hasSameFunctionTypeIgnoringExceptionSpec(), clang::HLSL, clang::Decl::IDNS_Ordinary, clang::IK_TemplateId, clang::Invalid, clang::FunctionDecl::isCPUDispatchMultiVersion(), clang::FunctionDecl::isCPUSpecificMultiVersion(), clang::Declarator::isCtorOrDtor(), isDeclExternC(), clang::NestedNameSpecifier::isDependent(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::Declarator::isExplicitObjectMemberFunction(), clang::NamedDecl::isExternallyVisible(), clang::FunctionDecl::isExternC(), clang::DeclContext::isFileContext(), clang::Redeclarable< decl_type >::isFirstDecl(), clang::Declarator::isFirstDeclarationOfMember(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::isFunctionDeclarator(), clang::Declarator::isFunctionDefinition(), clang::Type::isFunctionNoProtoType(), clang::DeclContext::isFunctionOrMethod(), clang::Type::isFunctionType(), clang::Module::isGlobalModule(), clang::Module::isHeaderLikeModule(), isIncompleteDeclExternC(), clang::Decl::isInIdentifierNamespace(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInStdNamespace(), clang::Builtin::Context::isInStdNamespace(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::FunctionDecl::isMain(), clang::DeclSpec::isModulePrivateSpecified(), clang::FunctionDecl::isMSVCRTEntryPoint(), clang::FunctionDecl::isMultiVersion(), clang::Module::isNamedModule(), clang::DeclSpec::isNoreturnSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isObjCContainer(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isPointerType(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::Type::isReferenceType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Type::isScalarType(), clang::CXXScopeSpec::isSet(), clang::Declarator::isStaticMember(), isStdBuiltin(), clang::IdentifierInfo::isStr(), clang::Decl::isTemplated(), clang::DeclContext::isTranslationUnit(), clang::Type::isUndeducedType(), clang::SourceRange::isValid(), clang::Type::isVariablyModifiedType(), clang::FunctionDecl::isVariadic(), clang::DeclSpec::isVirtualSpecified(), clang::Type::isVoidType(), clang::Type::isWebAssemblyTableType(), clang::TemplateIdAnnotation::LAngleLoc, LookupNecessaryTypesForBuiltin(), MarkUnusedFileScopedDecl(), MatchTemplateParametersToScopeSpecifier(), maybeAddCUDAHostDeviceAttrs(), ModifyFnAttributesMSPragmaOptimize(), clang::LangOptionsBase::MSVC2015, NTCUC_FunctionReturn, NTCUK_Copy, NTCUK_Destruct, clang::TemplateIdAnnotation::NumArgs, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::OpenCL, OriginalLexicalContext, clang::DeclaratorChunk::ParamInfo::Param, clang::FunctionDecl::parameters(), clang::DeclaratorChunk::FunctionTypeInfo::Params, Parent, PragmaClangTextSection, clang::Sema::PragmaClangSection::PragmaLocation, Previous, ProcessDeclAttributes(), ProcessPragmaWeak(), clang::ASTContext::PSF_Execute, clang::ASTContext::PSF_Implicit, clang::ASTContext::PSF_Read, clang::TemplateIdAnnotation::RAngleLoc, RebuildTemplateParamsInCurrentInstantiation(), RegisterLocallyScopedExternCDecl(), clang::DeclContext::removeDecl(), clang::Result, clang::SC_None, clang::SC_Static, clang::Sema::PragmaClangSection::SectionName, clang::Decl::setAccess(), clang::FunctionDecl::setConstexprKind(), clang::ASTContext::setcudaConfigureCallDecl(), clang::Decl::setDeclContext(), clang::FunctionDecl::setDefaulted(), clang::FunctionDecl::setDeletedAsWritten(), clang::FunctionDecl::setDescribedFunctionTemplate(), clang::FunctionDecl::setFriendConstraintRefersToEnclosingTemplate(), clang::FunctionDecl::setImplicitlyInline(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::FunctionDecl::setIsPureVirtual(), clang::TemplateArgumentListInfo::setLAngleLoc(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::NamedDecl::setModulePrivate(), SetNestedNameSpecifier(), clang::Decl::setNonMemberOperator(), clang::Decl::setObjectOfFriendDecl(), clang::FunctionDecl::setRangeEnd(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::Declarator::setRedeclaration(), clang::ParmVarDecl::setScopeInfo(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::Decl::setTopLevelDeclInObjCContainer(), clang::ValueDecl::setType(), clang::FunctionDecl::setVirtualAsWritten(), shouldConsiderLinkage(), clang::TemplateParameterList::size(), StrictGuardStackCheckStack, SubstAutoTypeDependent(), clang::supportsVariadicCall(), clang::UnqualifiedId::TemplateId, TPC_ClassTemplateMember, TPC_FriendFunctionTemplate, TPC_FriendFunctionTemplateDefinition, TPC_FunctionTemplate, translateTemplateArguments(), UnifySection(), clang::Unspecified, UPPC_ExplicitSpecialization, UPPC_FriendDeclaration, clang::Sema::PragmaClangSection::Valid, and clang::FunctionProtoType::ExtProtoInfo::withExceptionSpec().

Referenced by ActOnFriendFunctionDecl(), DiagnoseInvalidRedeclaration(), and HandleDeclarator().

◆ 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 243 of file SemaStmtAsm.cpp.

References clang::TargetInfo::ConstraintInfo::allowsMemory(), clang::TargetInfo::ConstraintInfo::allowsRegister(), CheckAsmLValue(), checkExprMemoryConstraintCompat(), CheckNakedParmReference(), CheckPlaceholderExpr(), CleanupVarDeclMarking(), Context, clang::FixItHint::CreateReplacement(), DefaultFunctionArrayLvalueConversion(), Diag(), DiscardCleanupsInEvaluationContext(), emitAndFixInvalidAsmCastLValue(), clang::Expr::EvaluateAsRValue(), clang::ActionResult< PtrTy, Compress >::get(), clang::CharSourceRange::getBegin(), clang::Stmt::getBeginLoc(), getClobberConflictLocation(), clang::TargetInfo::ConstraintInfo::getConstraintStr(), getCurLexicalContext(), clang::Expr::getExprLoc(), clang::ASTContext::getFunctionFeatureMap(), clang::ASTContext::getIntTypeForBitwidth(), getLocationOfStringLiteralByte(), clang::GCCAsmStmt::AsmStringPiece::getModifier(), clang::IdentifierInfo::getName(), getName(), clang::GCCAsmStmt::AsmStringPiece::getOperandNo(), clang::GCCAsmStmt::AsmStringPiece::getRange(), clang::Stmt::getSourceRange(), clang::GCCAsmStmt::AsmStringPiece::getString(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::ConstraintInfo::getTiedOperand(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameType(), clang::TargetInfo::ConstraintInfo::hasTiedOperand(), clang::Expr::IgnoreParenNoopCasts(), ImpCastExprToType(), clang::Type::isBitIntType(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::Expr::isEvaluatable(), clang::Type::isIncompleteType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isMemberPointerType(), clang::Expr::isModifiableLvalue(), clang::QualType::isNull(), clang::GCCAsmStmt::AsmStringPiece::isOperand(), isOperandMentioned(), clang::StringLiteral::isOrdinary(), clang::Type::isPointerType(), clang::Type::isRealFloatingType(), clang::Type::isStructureType(), clang::Expr::isTypeDependent(), clang::SourceLocation::isValid(), clang::TargetInfo::ConstraintInfo::isValidAsmImmediate(), clang::TargetInfo::isValidClobber(), clang::Expr::isValueDependent(), clang::Type::isVoidType(), LangOpts, clang::Expr::MLV_ArrayType, clang::Expr::MLV_IncompleteType, clang::Expr::MLV_IncompleteVoidType, clang::Expr::MLV_LValueCast, clang::Expr::MLV_Valid, NS, RequireCompleteType(), clang::TargetInfo::ConstraintInfo::requiresImmediateConstant(), clang::Result, setFunctionHasBranchIntoScope(), clang::StmtError(), targetDiag(), clang::APValue::toIntegralConstant(), toString(), clang::Expr::EvalResult::Val, clang::TargetInfo::validateConstraintModifier(), clang::TargetInfo::validateInputConstraint(), clang::TargetInfo::validateInputSize(), clang::TargetInfo::validateOutputConstraint(), and clang::TargetInfo::validateOutputSize().

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

◆ ActOnGenericSelectionExpr()

ExprResult Sema::ActOnGenericSelectionExpr ( SourceLocation  KeyLoc,
SourceLocation  DefaultLoc,
SourceLocation  RParenLoc,
bool  PredicateIsExpr,
void *  ControllingExprOrType,
ArrayRef< ParsedType ArgTypes,
ArrayRef< Expr * >  ArgExprs 
)

ControllingExprOrType is either an opaque pointer coming out of a ParsedType or an Expr *.

FIXME: it'd be better to split this interface into two so we don't take a void *, but that's awkward because one of the operands is either a ParsedType or an Expr *, which doesn't lend itself to generic code very well.

Definition at line 1636 of file SemaExpr.cpp.

References CreateGenericSelectionExpr(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), and GetTypeFromParser().

◆ 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
ModuleLocThe location of the 'module' keyword.

Definition at line 161 of file SemaModule.cpp.

References Context, clang::ASTContext::getTranslationUnitDecl(), clang::Decl::ReachableWhenImported, and clang::Decl::setModuleOwnershipKind().

◆ ActOnGNUNullExpr()

ExprResult Sema::ActOnGNUNullExpr ( SourceLocation  TokenLoc)

◆ ActOnGotoStmt()

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

◆ ActOnHLSLTopLevelFunction()

void Sema::ActOnHLSLTopLevelFunction ( FunctionDecl FD)

◆ 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 2685 of file SemaExpr.cpp.

References ActOnDependentIdExpression(), clang::LookupResult::addDecl(), clang::LookupResult::begin(), BuildDeclarationNameExpr(), BuildPossibleImplicitMemberExpr(), BuildTemplateIdExpr(), clang::LookupResult::clear(), clearDelayedTypo(), computeDeclContext(), Context, clang::DeclarationName::CXXConversionFunctionName, DecomposeUnqualifiedId(), DiagnoseEmptyLookup(), clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::LookupResult::getAsSingle(), getCurMethodDecl(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getResultKind(), clang::CXXScopeSpec::getScopeRep(), clang::IdentifierInfo::getTokenID(), getTypoExprState(), Id, clang::IK_ImplicitSelfParam, clang::IK_TemplateId, ImplicitlyDefineFunction(), clang::CorrectionCandidateCallback::IsAddressOfOperand, clang::LookupResult::isAmbiguous(), clang::IdentifierInfo::isEditorPlaceholder(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::LookupResult::isOverloadedResult(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isUnresolvableResult(), clang::SourceLocation::isValid(), clang::CXXScopeSpec::isValid(), LookupInObjCMethod(), LookupObjCImplicitSelfParam, LookupOrdinaryName, LookupParsedName(), LookupTemplateName(), clang::LookupResult::NotFoundInCurrentInstantiation, recoverFromMSUnqualifiedLookup(), RequireCompleteDeclContext(), clang::Token::setIdentifierInfo(), clang::Token::setKind(), clang::Token::setLocation(), clang::CorrectionCandidateCallback::setTypoName(), clang::CorrectionCandidateCallback::setTypoNNS(), clang::Token::startToken(), clang::TNK_Var_template, and UseArgumentDependentLookup().

Referenced by BuildIvarRefExpr(), DefaultVariadicArgumentPromotion(), and LookupInlineAsmIdentifier().

◆ ActOnIfStmt()

StmtResult Sema::ActOnIfStmt ( SourceLocation  IfLoc,
IfStatementKind  StatementKind,
SourceLocation  LParenLoc,
Stmt InitStmt,
ConditionResult  Cond,
SourceLocation  RParenLoc,
Stmt ThenVal,
SourceLocation  ElseLoc,
Stmt ElseVal 
)

◆ ActOnIndirectGotoStmt()

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

◆ ActOnInitializerError()

void Sema::ActOnInitializerError ( Decl Dcl)

ActOnInitializerError - Given that there was an error parsing an initializer for the given declaration, try to at least re-establish invariants such as whether a variable's type is either dependent or complete.

Definition at line 14015 of file SemaDecl.cpp.

References AbstractVariableType, Context, clang::ASTContext::getBaseElementType(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), clang::Type::isUndeducedType(), RequireCompleteType(), RequireNonAbstractType(), and clang::Decl::setInvalidDecl().

Referenced by ActOnCXXForRangeStmt().

◆ ActOnInitList()

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

◆ ActOnInstanceMessage()

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

◆ ActOnIntegerConstant()

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

◆ ActOnIvar()

Decl * Sema::ActOnIvar ( Scope S,
SourceLocation  DeclStart,
Declarator D,
Expr BitWidth,
tok::ObjCKeywordKind  visibility 
)

◆ ActOnLabelStmt()

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

◆ ActOnLambdaClosureParameters()

void Sema::ActOnLambdaClosureParameters ( Scope LambdaScope,
MutableArrayRef< DeclaratorChunk::ParamInfo ParamInfo 
)

◆ ActOnLambdaClosureQualifiers()

void Sema::ActOnLambdaClosureQualifiers ( LambdaIntroducer Intro,
SourceLocation  MutableLoc 
)

◆ 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 1496 of file SemaLambda.cpp.

References ActOnFields(), CheckCompletedCXXClass(), clang::Class, DiscardCleanupsInEvaluationContext(), FunctionScopes, clang::sema::LambdaScopeInfo::Lambda, PopDeclContext(), PopExpressionEvaluationContext(), and PopFunctionScopeInfo().

◆ ActOnLambdaExplicitTemplateParameterList()

void Sema::ActOnLambdaExplicitTemplateParameterList ( LambdaIntroducer Intro,
SourceLocation  LAngleLoc,
ArrayRef< NamedDecl * >  TParams,
SourceLocation  RAngleLoc,
ExprResult  RequiresClause 
)

◆ ActOnLambdaExpr()

ExprResult Sema::ActOnLambdaExpr ( SourceLocation  StartLoc,
Stmt Body 
)

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

Definition at line 1888 of file SemaLambda.cpp.

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

◆ ActOnLambdaExpressionAfterIntroducer()

void Sema::ActOnLambdaExpressionAfterIntroducer ( LambdaIntroducer Intro,
Scope CurContext 
)

Once the Lambdas capture are known, we can start to create the closure, call operator method, and keep track of the captures.

We do the capture lookup here, but they are not actually captured until after we know what the qualifiers of the call operator are.

Definition at line 1017 of file SemaLambda.cpp.

References addInitCapture(), clang::sema::LambdaScopeInfo::AfterParameterList, clang::C, clang::VarDecl::CallInit, clang::sema::LambdaScopeInfo::CallOperator, clang::sema::LambdaScopeInfo::CaptureDefaultLoc, clang::LambdaIntroducer::Captures, clang::sema::CapturingScopeInfo::Captures, CheckCXXThisCapture(), CheckShadow(), clang::VarDecl::CInit, clang::Class, clang::sema::LambdaScopeInfo::ContainsUnexpandedParameterPack, clang::CopyInit, clang::CPlusPlus14, clang::CPlusPlus17, clang::CPlusPlus20, CreateLambdaCallOperator(), createLambdaClosureType(), createLambdaInitCaptureVarDecl(), clang::FixItHint::CreateRemoval(), CurContext, clang::LambdaIntroducer::Default, clang::LambdaIntroducer::DefaultLoc, Diag(), DiagnoseEmptyLookup(), DiagnoseUnexpandedParameterPack(), DiagnoseUseOfDecl(), DiagPlaceholderVariableDefinition(), clang::DirectInit, clang::LookupResult::empty(), clang::sema::LambdaScopeInfo::ExplicitCaptureRanges, finishLambdaExplicitCaptures(), clang::LookupResult::getAsSingle(), clang::SourceRange::getBegin(), getCurLambda(), getCurrentThisType(), clang::sema::CapturingScopeInfo::getCXXThisCapture(), getLangOpts(), clang::Decl::getLocation(), clang::sema::Capture::getLocation(), getLocForEndOfToken(), clang::Scope::getParent(), clang::ValueDecl::getPotentiallyDecomposedVarDecl(), clang::Scope::getTemplateParamParent(), clang::VarDecl::hasLocalStorage(), clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::sema::LambdaScopeInfo::IntroducerRange, clang::LookupResult::isAmbiguous(), clang::sema::CapturingScopeInfo::isCXXThisCaptured(), clang::ValueDecl::isInitCapture(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Decl::isParameterPack(), clang::NamedDecl::isPlaceholderVar(), clang::sema::LambdaScopeInfo::Lambda, clang::LCD_ByCopy, clang::LCD_ByRef, clang::LCD_None, clang::LCK_ByCopy, clang::LCK_ByRef, clang::LCK_StarThis, clang::LCK_This, clang::CXXRecordDecl::LDK_AlwaysDependent, clang::CXXRecordDecl::LDK_Unknown, clang::VarDecl::ListInit, clang::ListInit, LookupName(), LookupOrdinaryName, clang::NoInit, clang::InventedTemplateParameterInfo::NumExplicitTemplateParams, PopDeclContext(), PushDeclContext(), PushOnScopeChains(), clang::LambdaIntroducer::Range, clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), TryCapture_ExplicitByRef, TryCapture_ExplicitByVal, tryCaptureVariable(), UPPC_Initializer, and V.

◆ 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 7383 of file Sema.h.

References buildLambdaInitCaptureInitialization(), clang::CopyInit, Id, clang::Init, and clang::OpaquePtr< QualType >::make().

◆ 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 19030 of file SemaDecl.cpp.

References clang::ASTContext::CharTy, Context, clang::ObjCIvarDecl::Create(), clang::IntegerLiteral::Create(), CurContext, clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeSize(), clang::ASTContext::IntTy, clang::FieldDecl::isBitField(), clang::ObjCRuntime::isFragile(), clang::FieldDecl::isZeroLengthBitField(), LangOpts, clang::LangOptions::ObjCRuntime, and clang::ObjCIvarDecl::Private.

◆ 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
OpKindeither tok::arrow or tok::period
ObjCImpDeclthe 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 1746 of file SemaExprMember.cpp.

References ActOnDependentMemberExpr(), BuildMemberReferenceExpr(), DecomposeUnqualifiedId(), Diag(), clang::ExprError(), FindFirstQualifierInScope(), clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getScopeRep(), Id, clang::IK_ConstructorName, isDependentScopeSpecifier(), clang::CXXScopeSpec::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CXXScopeSpec::isSet(), MaybeConvertParenListExprToParenExpr(), and clang::Result.

Referenced by BuildMemberReferenceExpr().

◆ ActOnMemInitializer() [1/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 4330 of file SemaDeclCXX.cpp.

References BuildMemInitializer().

◆ ActOnMemInitializer() [2/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 4346 of file SemaDeclCXX.cpp.

References BuildMemInitializer(), Context, and clang::ParenListExpr::Create().

◆ ActOnMemInitializers()

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

ActOnMemInitializers - Handle the member initializers for a constructor.

Definition at line 5794 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), Context, Diag(), DiagnoseBaseOrMemInitializerOrder(), GetKeyForMember(), clang::Init, SetCtorInitializers(), and SetDelegatingInitializer().

Referenced by InstantiateMemInitializers().

◆ 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 4726 of file SemaDeclObjC.cpp.

References ActOnDocumentableDecl(), clang::Decl::addAttr(), clang::IdentifierResolver::AddDecl(), AddPragmaAttributes(), clang::ast_matchers::attr, clang::C, CheckARCMethodDecl(), CheckFunctionReturnType(), checkObjCDirectMethodClashes(), CheckObjCMethodOverrides(), checkObjCMethodX86VectorTypes(), CheckParameter(), CheckRelatedResultTypeCompatibility(), Context, clang::ObjCMethodDecl::Create(), clang::ObjCMethodDecl::createImplicitParams(), clang::FixItHint::CreateInsertion(), CurContext, CvtQTToAstBitMask(), clang::ast_matchers::decl, Diag(), diagnoseNoescape(), clang::Decl::dropAttr(), forRedeclarationInCurContext(), clang::ASTContext::getAdjustedParameterType(), clang::Selector::getAsString(), clang::Decl::getAttr(), clang::TypeLoc::getBeginLoc(), clang::ObjCMethodDecl::getCanonicalDecl(), clang::ObjCMethodDecl::getClassInterface(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getMethodFamily(), clang::Selector::getNumArgs(), clang::ObjCDeclSpec::getObjCDeclQualifier(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::hasRelatedResultType(), IdResolver, clang::ObjCMethodDecl::isClassMethod(), clang::ObjCMethodDecl::isDirectMethod(), clang::ObjCMethodDecl::isInstanceMethod(), clang::QualType::isNull(), clang::DeclContext::isObjCContainer(), clang::Type::isObjCIndependentClassType(), clang::LookupResult::isSingleResult(), LangOpts, LookupName(), LookupOrdinaryName, mergeInterfaceMethodToImpl(), mergeObjCDirectMembers(), clang::Sema::ObjCArgInfo::Name, clang::Sema::ObjCArgInfo::NameLoc, 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::Optional, P, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::parameters(), ProcessAPINotes(), ProcessDeclAttributeList(), clang::Required, RTC_Compatible, clang::SC_None, clang::Decl::setDeclContext(), clang::Decl::setInvalidDecl(), clang::ObjCMethodDecl::setMethodParams(), clang::ParmVarDecl::setObjCDeclQualifier(), clang::ObjCMethodDecl::setObjCDeclQualifier(), clang::ParmVarDecl::setObjCMethodScopeInfo(), clang::ObjCMethodDecl::setRelatedResultType(), clang::AttributedType::stripOuterNullability(), and TUScope.

◆ ActOnModuleDecl()

Sema::DeclGroupPtrTy Sema::ActOnModuleDecl ( SourceLocation  StartLoc,
SourceLocation  ModuleLoc,
ModuleDeclKind  MDK,
ModuleIdPath  Path,
ModuleIdPath  Partition,
ModuleImportState ImportState 
)

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

Definition at line 257 of file SemaModule.cpp.

References ActOnEndOfTranslationUnitFragment(), clang::DeclContext::addDecl(), clang::ASTContext::addModuleInitializer(), clang::Module::AllVisible, clang::LangOptionsBase::CMK_HeaderUnit, clang::LangOptionsBase::CMK_ModuleInterface, clang::LangOptionsBase::CMK_ModuleMap, clang::LangOptionsBase::CMK_None, Context, ConvertDeclToDeclGroup(), clang::ImportDecl::Create(), clang::FixItHint::CreateInsertion(), CurContext, clang::LangOptions::CurrentModule, Diag(), DiagReservedModuleName(), FirstDecl, getASTContext(), clang::Preprocessor::getHeaderSearchInfo(), clang::Preprocessor::getIdentifierInfo(), clang::VisibleModuleSet::getImportLoc(), getLangOpts(), clang::SourceManager::getLocForStartOfFile(), clang::SourceManager::getMainFileID(), getModuleLoader(), clang::HeaderSearch::getModuleMap(), getSourceManager(), clang::ASTContext::getTranslationUnitDecl(), Global, GlobalFragment, Implementation, ImportAllowed, clang::Module::Imports, Interface, clang::SourceLocation::isValid(), clang::Module::Kind, clang::ModuleLoader::loadModule(), makeTransitiveImportsVisible(), clang::Module::ModulePartitionImplementation, clang::Module::ModulePartitionInterface, NotACXX20Module, PartitionImplementation, PartitionInterface, PP, clang::Decl::ReachableWhenImported, clang::ASTContext::setCurrentNamedModule(), clang::Decl::setModuleOwnershipKind(), clang::VisibleModuleSet::setVisible(), SourceMgr, and stringFromPath().

◆ ActOnModuleImport() [1/2]

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

◆ ActOnModuleImport() [2/2]

DeclResult Sema::ActOnModuleImport ( SourceLocation  StartLoc,
SourceLocation  ExportLoc,
SourceLocation  ImportLoc,
ModuleIdPath  Path,
bool  IsPartition = false 
)

The parser has processed a module import declaration.

Parameters
StartLocThe location of the first token in the declaration. This could be the location of an '@', 'export', or 'import'.
ExportLocThe location of the 'export' keyword, if any.
ImportLocThe location of the 'import' keyword.
PathThe module toplevel name as an access path.
IsPartitionIf the name is for a partition.

Definition at line 568 of file SemaModule.cpp.

References ActOnModuleImport(), clang::Module::AllVisible, currentModuleIsImplementation(), Diag(), getCurrentModule(), clang::Preprocessor::getIdentifierInfo(), getLangOpts(), getModuleLoader(), clang::Module::getPrimaryModuleInterfaceName(), clang::Module::isInterfaceOrPartition(), clang::ModuleLoader::loadModule(), clang::ObjC, PP, and stringFromPath().

Referenced by ActOnModuleImport(), and 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 
)

◆ ActOnMSDependentExistsStmt()

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

◆ ActOnMSVCUnknownTypeName()

ParsedType Sema::ActOnMSVCUnknownTypeName ( const IdentifierInfo II,
SourceLocation  NameLoc,
bool  IsTemplateTypeArg 
)

◆ 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 1253 of file SemaDecl.cpp.

References ActOnDependentIdExpression().

◆ ActOnNameClassifiedAsNonType()

ExprResult Sema::ActOnNameClassifiedAsNonType ( Scope S,
const CXXScopeSpec SS,
NamedDecl Found,
SourceLocation  NameLoc,
const Token NextToken 
)

◆ ActOnNameClassifiedAsOverloadSet()

ExprResult Sema::ActOnNameClassifiedAsOverloadSet ( Scope S,
Expr OverloadSet 
)

Act on the result of classifying a name as an overload set.

Definition at line 1280 of file SemaDecl.cpp.

References clang::CXXScopeSpec::Adopt(), BuildPossibleImplicitMemberExpr(), LookupOrdinaryName, and clang::Result.

◆ 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 1244 of file SemaDecl.cpp.

References BuildDeclarationNameExpr(), clang::CPlusPlus, getLangOpts(), LookupOrdinaryName, and clang::Result.

◆ ActOnNamespaceAliasDef()

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

◆ ActOnNestedRequirement()

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

Definition at line 9267 of file SemaExprCXX.cpp.

References BuildNestedRequirement().

◆ ActOnNoexceptExpr()

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

Definition at line 8271 of file SemaExprCXX.cpp.

References BuildCXXNoexceptExpr().

◆ ActOnNoexceptSpec()

ExprResult clang::Sema::ActOnNoexceptSpec ( Expr NoexceptExpr,
ExceptionSpecificationType EST 
)

◆ ActOnNonTypeTemplateParameter()

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

Definition at line 1502 of file SemaTemplate.cpp.

References clang::IdentifierResolver::AddDecl(), clang::AS_public, AttachTypeConstraint(), CheckFunctionOrTemplateParamDeclarator(), CheckNonTypeTemplateParameterType(), Context, clang::NonTypeTemplateParmDecl::Create(), clang::FixItHint::CreateRemoval(), Default, Diag(), DiagnoseUnexpandedParameterPack(), clang::Declarator::getBeginLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::Type::getContainedAutoType(), clang::TypeLoc::getContainedAutoTypeLoc(), clang::Type::getContainedDeducedType(), clang::Declarator::getDeclSpec(), clang::Declarator::getEllipsisLoc(), getEnclosingLambda(), clang::DeclSpec::getExplicitSpecLoc(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::DeclSpec::getNoreturnSpecLoc(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ASTContext::getTranslationUnitDecl(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclSpec::getVirtualSpecLoc(), clang::DeclSpec::hasConstexprSpecifier(), clang::Declarator::hasEllipsis(), clang::DeclSpec::hasExplicitSpecifier(), IdResolver, clang::ASTContext::IntTy, clang::Invalid, clang::DeclSpec::isInlineSpecified(), clang::DeclSpec::isNoreturnSpecified(), clang::QualType::isNull(), clang::NonTypeTemplateParmDecl::isParameterPack(), clang::DeclSpec::isVirtualSpecified(), maybeDiagnoseTemplateParameterShadow(), clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::NonTypeTemplateParmDecl::setDefaultArgument(), clang::Decl::setInvalidDecl(), clang::TSCS_unspecified, and UPPC_DefaultArgument.

◆ ActOnNullStmt()

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

Definition at line 70 of file SemaStmt.cpp.

References Context.

◆ ActOnNumericConstant()

ExprResult Sema::ActOnNumericConstant ( const Token Tok,
Scope UDLScope = nullptr 
)

Definition at line 3925 of file SemaExpr.cpp.

References clang::ASTContext::AccumTy, ActOnIntegerConstant(), clang::TemplateArgumentListInfo::addArgument(), clang::ASTContext::adjustStringLiteralBaseType(), BuildFloatingLiteral(), BuildLiteralOperatorCall(), clang::C23, clang::C99, clang::Type::castAs(), clang::ASTContext::CharTy, Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus23, clang::IntegerLiteral::Create(), clang::StringLiteral::Create(), clang::FixedPointLiteral::CreateFromRawInt(), clang::ASTContext::DeclarationNames, clang::Preprocessor::Diag(), Diag(), clang::ASTContext::DoubleTy, clang::ExprError(), clang::ASTContext::Float128Ty, clang::ASTContext::Float16Ty, clang::ASTContext::FloatTy, clang::ASTContext::FractTy, clang::ActionResult< PtrTy, Compress >::get(), clang::IdentifierTable::get(), clang::ASTContext::getBitIntType(), clang::ASTContext::getComplexType(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getCorrespondingUnsignedType(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::Preprocessor::getDiagnostics(), clang::ASTContext::getFixedPointMax(), clang::ASTContext::getFixedPointScale(), clang::TargetInfo::getIntMaxTWidth(), clang::ASTContext::getIntTypeForBitwidth(), clang::TargetInfo::getIntWidth(), clang::ASTContext::getIntWidth(), clang::BuiltinType::getKind(), clang::Preprocessor::getLangOpts(), getLangOpts(), clang::Token::getLength(), clang::Token::getLocation(), clang::TargetInfo::getLongLongWidth(), clang::TargetInfo::getLongWidth(), clang::TargetInfo::getMaxBitIntWidth(), clang::LangOptions::getOpenCLCompatibleVersion(), getOpenCLOptions(), clang::ASTContext::getSignedSizeType(), clang::ASTContext::getSizeType(), clang::TargetInfo::getSizeType(), clang::Preprocessor::getSourceManager(), clang::Preprocessor::getSpelling(), clang::Preprocessor::getSpellingOfSingleCharacterNumericConstant(), clang::ASTContext::getTargetInfo(), clang::Preprocessor::getTargetInfo(), clang::Expr::getType(), clang::ASTContext::getTypeInfo(), clang::ASTContext::getTypeSize(), clang::TargetInfo::getTypeWidth(), getUDSuffixLoc(), clang::ASTContext::HalfTy, clang::ASTContext::Idents, clang::if(), ImpCastExprToType(), clang::ASTContext::IntTy, clang::Invalid, clang::QualType::isNull(), LOLR_Cooked, LOLR_Error, LOLR_ErrorNoDiagnostic, LOLR_Raw, LOLR_StringTemplatePack, LOLR_Template, clang::ASTContext::LongAccumTy, clang::ASTContext::LongDoubleTy, clang::ASTContext::LongFractTy, clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, LookupLiteralOperator(), LookupOrdinaryName, clang::Normal, clang::OpenCL, clang::Ordinary, PP, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::ASTContext::ShortAccumTy, clang::ASTContext::ShortFractTy, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, clang::TypeInfo::Width, and clang::CanQual< T >::withConst().

◆ ActOnObjCAtCatchStmt()

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

◆ ActOnObjCAtFinallyStmt()

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

Definition at line 4315 of file SemaStmt.cpp.

References Context.

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

◆ ActOnObjCAtSynchronizedOperand()

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

◆ ActOnObjCAtSynchronizedStmt()

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

◆ ActOnObjCAtThrowStmt()

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

◆ ActOnObjCAtTryStmt()

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

◆ ActOnObjCAutoreleasePoolStmt()

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

◆ ActOnObjCAvailabilityCheckExpr()

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

◆ ActOnObjCBoolLiteral() [1/2]

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

◆ ActOnObjCBoolLiteral() [2/2]

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

◆ ActOnObjCBridgedCast()

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

◆ ActOnObjCContainerFinishDefinition()

void Sema::ActOnObjCContainerFinishDefinition ( )

Definition at line 18412 of file SemaDecl.cpp.

References PopDeclContext().

Referenced by ActOnAtEnd(), and ActOnObjCTemporaryExitContainerContext().

◆ ActOnObjCContainerStartDefinition()

void Sema::ActOnObjCContainerStartDefinition ( ObjCContainerDecl IDecl)

◆ ActOnObjCExceptionDecl()

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

◆ ActOnObjCForCollectionStmt()

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

◆ 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 6816 of file SemaType.cpp.

References Context, CreateParsedType(), clang::ASTContext::getObjCInstanceType(), and clang::ASTContext::getTrivialTypeSourceInfo().

◆ actOnObjCProtocolQualifierType()

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

◆ ActOnObjCReenterContainerContext()

void Sema::ActOnObjCReenterContainerContext ( ObjCContainerDecl ObjCCtx)

Definition at line 18423 of file SemaDecl.cpp.

References ActOnObjCContainerStartDefinition(), and OriginalLexicalContext.

◆ ActOnObjCTemporaryExitContainerContext()

void Sema::ActOnObjCTemporaryExitContainerContext ( ObjCContainerDecl ObjCCtx)

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 18417 of file SemaDecl.cpp.

References ActOnObjCContainerFinishDefinition(), CurContext, and OriginalLexicalContext.

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

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

◆ actOnObjCTypeParam()

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

◆ actOnObjCTypeParamList()

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

◆ ActOnOMPArraySectionExpr()

ExprResult Sema::ActOnOMPArraySectionExpr ( Expr Base,
SourceLocation  LBLoc,
Expr LowerBound,
SourceLocation  ColonLocFirst,
SourceLocation  ColonLocSecond,
Expr Length,
Expr Stride,
SourceLocation  RBLoc 
)

◆ ActOnOMPArrayShapingExpr()

ExprResult Sema::ActOnOMPArrayShapingExpr ( Expr Base,
SourceLocation  LParenLoc,
SourceLocation  RParenLoc,
ArrayRef< Expr * >  Dims,
ArrayRef< SourceRange Brackets 
)

◆ ActOnOMPIteratorExpr()

ExprResult Sema::ActOnOMPIteratorExpr ( Scope S,
SourceLocation  IteratorKwLoc,
SourceLocation  LLoc,
SourceLocation  RLoc,
ArrayRef< OMPIteratorData Data 
)

Act on the iterator variable declaration.

Definition at line 5606 of file SemaExpr.cpp.

References AA_Converting, ActOnConditionalOp(), ActOnFinishFullExpr(), ActOnIntegerConstant(), ActOnOpenMPIteratorVarDecl(), clang::DeclContext::addDecl(), clang::OMPIteratorExpr::IteratorDefinition::AssignmentLoc, clang::OMPIteratorExpr::IteratorRange::Begin, Begin, BuildDeclRefExpr(), clang::OMPIteratorExpr::IteratorDefinition::ColonLoc, Context, clang::OMPIteratorHelperData::CounterUpdate, clang::OMPIteratorHelperData::CounterVD, clang::VarDecl::Create(), clang::OMPIteratorExpr::Create(), CreateBuiltinBinOp(), CreateBuiltinUnaryOp(), CurContext, clang::Data, DefaultLvalueConversion(), Diag(), clang::OMPIteratorExpr::IteratorRange::End, clang::ExprError(), FilterLookupForScope(), ForVisibleRedeclaration, clang::ActionResult< PtrTy, Compress >::get(), clang::TypeLoc::getBeginLoc(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), clang::Expr::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::IntTy, clang::DeclContext::isDependentContext(), clang::Type::isIntegralType(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::OMPIteratorExpr::IteratorDefinition::IteratorDecl, LookupName(), LookupOrdinaryName, clang::ASTContext::OMPIteratorTy, PerformImplicitConversion(), Previous, PushOnScopeChains(), clang::OMPIteratorExpr::IteratorDefinition::Range, clang::Result, clang::SC_None, clang::OMPIteratorExpr::IteratorDefinition::SecondColonLoc, clang::OMPIteratorExpr::IteratorRange::Step, clang::OMPIteratorHelperData::Update, clang::OMPIteratorHelperData::Upper, and clang::VK_LValue.

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

◆ ActOnOpenACCAssociatedStmt()

StmtResult Sema::ActOnOpenACCAssociatedStmt ( OpenACCDirectiveKind  K,
StmtResult  AssocStmt 
)

Called when we encounter an associated statement for our construct, this should check legality of the statement as it appertains to this Construct.

Definition at line 95 of file SemaOpenACC.cpp.

References clang::Kernels, clang::Parallel, and clang::Serial.

Referenced by clang::Parser::ParseOpenACCDirectiveStmt(), and clang::TreeTransform< Derived >::RebuildOpenACCComputeConstruct().

◆ ActOnOpenACCClause()

bool Sema::ActOnOpenACCClause ( OpenACCClauseKind  ClauseKind,
SourceLocation  StartLoc 
)

Called after parsing an OpenACC Clause so that it can be checked.

Definition at line 40 of file SemaOpenACC.cpp.

References Diag(), and clang::Invalid.

◆ ActOnOpenACCConstruct()

void Sema::ActOnOpenACCConstruct ( OpenACCDirectiveKind  K,
SourceLocation  StartLoc 
)

Called after the construct has been parsed, but clauses haven't been parsed.

This allows us to diagnose not-implemented, as well as set up any state required for parsing the clauses.

Definition at line 50 of file SemaOpenACC.cpp.

References Diag(), clang::Invalid, clang::Kernels, clang::Parallel, and clang::Serial.

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

◆ ActOnOpenMPAcqRelClause()

OMPClause * Sema::ActOnOpenMPAcqRelClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'acq_rel' clause.

Definition at line 17792 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPAcquireClause()

OMPClause * Sema::ActOnOpenMPAcquireClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'acquire' clause.

Definition at line 17797 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPAffinityClause()

OMPClause * Sema::ActOnOpenMPAffinityClause ( SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
Expr Modifier,
ArrayRef< Expr * >  Locators 
)

◆ ActOnOpenMPAlignClause()

OMPClause * Sema::ActOnOpenMPAlignClause ( Expr Alignment,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPAlignedClause()

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

◆ ActOnOpenMPAllocateClause()

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

◆ ActOnOpenMPAllocateDirective()

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

◆ ActOnOpenMPAllocatorClause()

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

◆ ActOnOpenMPAssumesDirective()

void Sema::ActOnOpenMPAssumesDirective ( SourceLocation  Loc,
OpenMPDirectiveKind  DKind,
ArrayRef< std::string >  Assumptions,
bool  SkippedClauses 
)

Called on well-formed '#pragma omp [begin] assume[s]'.

Definition at line 3490 of file SemaOpenMP.cpp.

References Context, CurContext, clang::DeclContext::decls(), Diag(), and clang::DeclContext::getLexicalParent().

◆ ActOnOpenMPAtClause()

OMPClause * Sema::ActOnOpenMPAtClause ( OpenMPAtClauseKind  Kind,
SourceLocation  KindLoc,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'at' clause.

Definition at line 17159 of file SemaOpenMP.cpp.

References Context, Diag(), getListOfPossibleValues(), and clang::OMPC_AT_unknown.

Referenced by ActOnOpenMPSimpleClause(), and clang::TreeTransform< Derived >::RebuildOMPAtClause().

◆ 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 17144 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPSimpleClause().

◆ ActOnOpenMPAtomicDirective()

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

◆ ActOnOpenMPBarrierDirective()

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

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

Definition at line 11337 of file SemaOpenMP.cpp.

References Context, and clang::OMPBarrierDirective::Create().

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPBeginDeclareVariant()

void Sema::ActOnOpenMPBeginDeclareVariant ( SourceLocation  Loc,
OMPTraitInfo TI 
)

Handle a omp begin declare variant.

Definition at line 2707 of file SemaOpenMP.cpp.

◆ ActOnOpenMPBindClause()

OMPClause * Sema::ActOnOpenMPBindClause ( OpenMPBindClauseKind  Kind,
SourceLocation  KindLoc,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPCall()

ExprResult Sema::ActOnOpenMPCall ( ExprResult  Call,
Scope Scope,
SourceLocation  LParenLoc,
MultiExprArg  ArgExprs,
SourceLocation  RParenLoc,
Expr ExecConfig 
)

◆ ActOnOpenMPCancelDirective()

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

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

Definition at line 13609 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPCancellationPointDirective()

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

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

Definition at line 13594 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPCanonicalLoop()

StmtResult Sema::ActOnOpenMPCanonicalLoop ( Stmt AStmt)

◆ ActOnOpenMPCaptureClause()

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

Called on well-formed 'capture' clause.

Definition at line 17759 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPClause()

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

◆ ActOnOpenMPCollapseClause()

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

◆ ActOnOpenMPCompareClause()

OMPClause * Sema::ActOnOpenMPCompareClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'compare' clause.

Definition at line 17764 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPCopyinClause()

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

◆ ActOnOpenMPCopyprivateClause()

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

◆ ActOnOpenMPCriticalDirective()

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

◆ ActOnOpenMPDeclareMapperDirective()

Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareMapperDirective ( Scope S,
DeclContext DC,
DeclarationName  Name,
QualType  MapperType,
SourceLocation  StartLoc,
DeclarationName  VN,
AccessSpecifier  AS,
Expr MapperVarRef,
ArrayRef< OMPClause * >  Clauses,
Decl PrevDeclInScope = nullptr 
)

◆ ActOnOpenMPDeclareMapperDirectiveVarDecl()

ExprResult Sema::ActOnOpenMPDeclareMapperDirectiveVarDecl ( Scope S,
QualType  MapperType,
SourceLocation  StartLoc,
DeclarationName  VN 
)

◆ 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 22770 of file SemaOpenMP.cpp.

References Diag(), clang::OpaquePtr< PtrTy >::get(), GetTypeFromParser(), clang::QualType::isNull(), clang::Type::isStructureOrClassType(), and clang::Type::isUnionType().

◆ ActOnOpenMPDeclareMapperVarDecl()

TypeResult Sema::ActOnOpenMPDeclareMapperVarDecl ( Scope S,
Declarator D 
)

◆ ActOnOpenMPDeclareReductionCombinerEnd()

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

Finish current declare reduction construct initializer.

Definition at line 22660 of file SemaOpenMP.cpp.

References DiscardCleanupsInEvaluationContext(), PopDeclContext(), PopExpressionEvaluationContext(), and PopFunctionScopeInfo().

◆ ActOnOpenMPDeclareReductionCombinerStart()

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

◆ ActOnOpenMPDeclareReductionDirectiveEnd()

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

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

Definition at line 22742 of file SemaOpenMP.cpp.

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

◆ ActOnOpenMPDeclareReductionDirectiveStart()

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

◆ ActOnOpenMPDeclareReductionInitializerEnd()

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

◆ ActOnOpenMPDeclareReductionInitializerStart()

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

◆ 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 22499 of file SemaOpenMP.cpp.

References Diag(), clang::OpaquePtr< PtrTy >::get(), GetTypeFromParser(), clang::QualType::hasQualifiers(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::QualType::isNull(), and clang::Type::isReferenceType().

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

◆ ActOnOpenMPDeclareTargetInitializer()

void Sema::ActOnOpenMPDeclareTargetInitializer ( Decl D)

Adds OMPDeclareTargetDeclAttr to referenced variables in declare target directive.

Adding OMPDeclareTargetDeclAttr to variables with static storage duration that are referenced in the initializer expression list of variables with static storage duration in declare target directive.

Definition at line 23572 of file SemaOpenMP.cpp.

References GlobalDeclRefChecker::declareTargetInitializer().

Referenced by ActOnOpenMPDeclareTargetName(), and FinalizeDeclaratorGroup().

◆ ActOnOpenMPDeclareTargetName()

void Sema::ActOnOpenMPDeclareTargetName ( NamedDecl ND,
SourceLocation  Loc,
OMPDeclareTargetDeclAttr::MapTypeTy  MT,
DeclareTargetContextInfo DTCI 
)

◆ ActOnOpenMPDeclareVariantDirective()

void Sema::ActOnOpenMPDeclareVariantDirective ( FunctionDecl FD,
Expr VariantRef,
OMPTraitInfo TI,
ArrayRef< Expr * >  AdjustArgsNothing,
ArrayRef< Expr * >  AdjustArgsNeedDevicePtr,
ArrayRef< OMPInteropInfo AppendArgs,
SourceLocation  AdjustArgsLoc,
SourceLocation  AppendArgsLoc,
SourceRange  SR 
)

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

Parameters
FDFunction declaration to which declare variant directive is applied to.
VariantRefExpression that references the variant function, which must be used instead of the original one, specified in DG.
TIThe context traits associated with the function variant.
AdjustArgsNothingThe list of 'nothing' arguments.
AdjustArgsNeedDevicePtrThe list of 'need_device_ptr' arguments.
AppendArgsThe list of 'append_args' arguments.
AdjustArgsLocThe Location of an 'adjust_args' clause.
AppendArgsLocThe Location of an 'append_args' clause.
SRThe SourceRange of the 'declare variant' directive.

Definition at line 7816 of file SemaOpenMP.cpp.

References clang::Decl::addAttr(), Context, Diag(), clang::OMPTraitInfo::getAsVariantMatchInfo(), clang::VarDecl::getCanonicalDecl(), clang::Expr::getExprLoc(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), and clang::Expr::IgnoreParenImpCasts().

Referenced by instantiateOMPDeclareVariantAttr().

◆ ActOnOpenMPDefaultClause()

OMPClause * Sema::ActOnOpenMPDefaultClause ( llvm::omp::DefaultKind  Kind,
SourceLocation  KindLoc,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'default' clause.

Definition at line 17082 of file SemaOpenMP.cpp.

References Context, Diag(), DSAStack, and getListOfPossibleValues().

Referenced by ActOnOpenMPSimpleClause(), and clang::TreeTransform< Derived >::RebuildOMPDefaultClause().

◆ ActOnOpenMPDefaultmapClause()

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

◆ ActOnOpenMPDependClause()

OMPClause * Sema::ActOnOpenMPDependClause ( const OMPDependClause::DependDataTy Data,
Expr DepModifier,
ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPDepobjClause()

OMPClause * Sema::ActOnOpenMPDepobjClause ( Expr Depobj,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPDepobjDirective()

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

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

Definition at line 11444 of file SemaOpenMP.cpp.

References Context, clang::OMPDepobjDirective::Create(), Diag(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPDestroyClause()

OMPClause * Sema::ActOnOpenMPDestroyClause ( Expr InteropVar,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  VarLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'destroy' clause.

Definition at line 18020 of file SemaOpenMP.cpp.

References Context, Diag(), DSAStack, isValidInteropVariable(), and LangOpts.

Referenced by ActOnOpenMPClause(), and clang::TreeTransform< Derived >::RebuildOMPDestroyClause().

◆ ActOnOpenMPDetachClause()

OMPClause * Sema::ActOnOpenMPDetachClause ( Expr Evt,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPDeviceClause()

OMPClause * Sema::ActOnOpenMPDeviceClause ( OpenMPDeviceClauseModifier  Modifier,
Expr Device,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ModifierLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPDispatchDirective()

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

◆ ActOnOpenMPDistributeDirective()

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

◆ ActOnOpenMPDistributeParallelForDirective()

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

◆ ActOnOpenMPDistributeParallelForSimdDirective()

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

◆ ActOnOpenMPDistributeSimdDirective()

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

◆ ActOnOpenMPDistScheduleClause()

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

◆ ActOnOpenMPDoacrossClause()

OMPClause * Sema::ActOnOpenMPDoacrossClause ( OpenMPDoacrossClauseModifier  DepType,
SourceLocation  DepLoc,
SourceLocation  ColonLoc,
ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPDynamicAllocatorsClause()

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

Called on well-formed 'dynamic_allocators' clause.

Definition at line 17847 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPEndAssumesDirective()

void Sema::ActOnOpenMPEndAssumesDirective ( )

Called on well-formed '#pragma omp end assumes'.

Definition at line 3542 of file SemaOpenMP.cpp.

References isInOpenMPAssumeScope().

◆ ActOnOpenMPEndDeclareTargetDirective()

const Sema::DeclareTargetContextInfo Sema::ActOnOpenMPEndDeclareTargetDirective ( )

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

Definition at line 23296 of file SemaOpenMP.cpp.

◆ ActOnOpenMPEndDeclareVariant()

void Sema::ActOnOpenMPEndDeclareVariant ( )

Handle a omp end declare variant.

Definition at line 2712 of file SemaOpenMP.cpp.

References isInOpenMPDeclareVariantScope().

◆ ActOnOpenMPErrorDirective()

StmtResult Sema::ActOnOpenMPErrorDirective ( ArrayRef< OMPClause * >  Clauses,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
bool  InExContext = true 
)

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

Error direcitive is allowed in both declared and excutable contexts. Adding InExContext to identify which context is called from.

Definition at line 11342 of file SemaOpenMP.cpp.

References Context, clang::OMPErrorDirective::Create(), Diag(), clang::OMPAtClause::getAtKind(), clang::OMPAtClause::getAtKindKwLoc(), clang::OMPMessageClause::getMessageString(), clang::OMPSeverityClause::getSeverityKind(), clang::OMPSeverityClause::getSeverityKindKwLoc(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPExclusiveClause()

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

Called on well-formed 'exclusive' clause.

Definition at line 24111 of file SemaOpenMP.cpp.

References Context, clang::OMPExclusiveClause::Create(), Diag(), DSAStack, and getPrivateItem().

Referenced by ActOnOpenMPVarListClause(), and clang::TreeTransform< Derived >::RebuildOMPExclusiveClause().

◆ ActOnOpenMPExecutableDirective()

StmtResult Sema::ActOnOpenMPExecutableDirective ( OpenMPDirectiveKind  Kind,
const DeclarationNameInfo DirName,
OpenMPDirectiveKind  CancelRegion,
ArrayRef< OMPClause * >  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
OpenMPDirectiveKind  PrevMappedDirective = llvm::omp::OMPD_unknown 
)

Definition at line 6227 of file SemaOpenMP.cpp.

References ActOnOpenMPAtomicDirective(), ActOnOpenMPBarrierDirective(), ActOnOpenMPCancelDirective(), ActOnOpenMPCancellationPointDirective(), ActOnOpenMPCriticalDirective(), ActOnOpenMPDepobjDirective(), ActOnOpenMPDispatchDirective(), ActOnOpenMPDistributeDirective(), ActOnOpenMPDistributeParallelForDirective(), ActOnOpenMPDistributeParallelForSimdDirective(), ActOnOpenMPDistributeSimdDirective(), ActOnOpenMPErrorDirective(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPFlushDirective(), ActOnOpenMPForDirective(), ActOnOpenMPForSimdDirective(), ActOnOpenMPGenericLoopDirective(), ActOnOpenMPInteropDirective(), ActOnOpenMPMapClause(), ActOnOpenMPMaskedDirective(), ActOnOpenMPMaskedTaskLoopDirective(), ActOnOpenMPMaskedTaskLoopSimdDirective(), ActOnOpenMPMasterDirective(), ActOnOpenMPMasterTaskLoopDirective(), ActOnOpenMPMasterTaskLoopSimdDirective(), ActOnOpenMPOrderedDirective(), ActOnOpenMPParallelDirective(), ActOnOpenMPParallelForDirective(), ActOnOpenMPParallelForSimdDirective(), ActOnOpenMPParallelGenericLoopDirective(), ActOnOpenMPParallelMaskedDirective(), ActOnOpenMPParallelMaskedTaskLoopDirective(), ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), ActOnOpenMPParallelMasterDirective(), ActOnOpenMPParallelMasterTaskLoopDirective(), ActOnOpenMPParallelMasterTaskLoopSimdDirective(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPPrivateClause(), ActOnOpenMPScanDirective(), ActOnOpenMPScopeDirective(), ActOnOpenMPSectionDirective(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSimdDirective(), ActOnOpenMPSingleDirective(), ActOnOpenMPTargetDataDirective(), ActOnOpenMPTargetDirective(), ActOnOpenMPTargetEnterDataDirective(), ActOnOpenMPTargetExitDataDirective(), ActOnOpenMPTargetParallelDirective(), ActOnOpenMPTargetParallelForDirective(), ActOnOpenMPTargetParallelForSimdDirective(), ActOnOpenMPTargetParallelGenericLoopDirective(), ActOnOpenMPTargetSimdDirective(), ActOnOpenMPTargetTeamsDirective(), ActOnOpenMPTargetTeamsDistributeDirective(), ActOnOpenMPTargetTeamsDistributeParallelForDirective(), ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), ActOnOpenMPTargetTeamsDistributeSimdDirective(), ActOnOpenMPTargetTeamsGenericLoopDirective(), ActOnOpenMPTargetUpdateDirective(), ActOnOpenMPTaskDirective(), ActOnOpenMPTaskgroupDirective(), ActOnOpenMPTaskLoopDirective(), ActOnOpenMPTaskLoopSimdDirective(), ActOnOpenMPTaskwaitDirective(), ActOnOpenMPTaskyieldDirective(), ActOnOpenMPTeamsDirective(), ActOnOpenMPTeamsDistributeDirective(), ActOnOpenMPTeamsDistributeParallelForDirective(), ActOnOpenMPTeamsDistributeParallelForSimdDirective(), ActOnOpenMPTeamsDistributeSimdDirective(), ActOnOpenMPTeamsGenericLoopDirective(), ActOnOpenMPTileDirective(), ActOnOpenMPUnrollDirective(), clang::C, checkCancelRegion(), checkIfClauses(), checkNestingOfRegions(), CurContext, Diag(), DSAStack, clang::CapturedStmt::getCapturedStmt(), getLangOpts(), getOpenMPCaptureLevels(), clang::getOpenMPCaptureRegions(), clang::HIP, clang::Expr::IgnoreParenImpCasts(), clang::DeclContext::isDependentContext(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::isOpenMPLoopTransformationDirective(), clang::isOpenMPParallelDirective(), clang::isOpenMPTargetDataManagementDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskingDirective(), clang::isOpenMPTaskLoopDirective(), clang::isOpenMPTeamsDirective(), LangOpts, clang::OMPC_BIND_unknown, clang::OMPC_DEFAULTMAP_unknown, clang::OMPC_MAP_MODIFIER_unknown, P, processImplicitMapsWithDefaultMappers(), and clang::StmtError().

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

◆ ActOnOpenMPFailClause() [1/2]

OMPClause * Sema::ActOnOpenMPFailClause ( OpenMPClauseKind  Kind,
SourceLocation  KindLoc,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Definition at line 17774 of file SemaOpenMP.cpp.

References clang::checkFailClauseParameter(), Context, Diag(), and clang::Parameter.

◆ ActOnOpenMPFailClause() [2/2]

OMPClause * Sema::ActOnOpenMPFailClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'fail' clause.

Definition at line 17769 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause(), and ActOnOpenMPSimpleClause().

◆ ActOnOpenMPFilterClause()

OMPClause * Sema::ActOnOpenMPFilterClause ( Expr ThreadID,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPFinalClause()

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

◆ ActOnOpenMPFirstprivateClause()

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

Called on well-formed 'firstprivate' clause.

Definition at line 18483 of file SemaOpenMP.cpp.

References clang::DeclContext::addDecl(), AddInitializerToDecl(), buildCapture(), buildDeclRefExpr(), buildPreInits(), buildVarDecl(), clang::C, Context, clang::OMPFirstprivateClause::Create(), clang::InitializationKind::CreateCopy(), CurContext, clang::ASTContext::Deallocate(), clang::VarDecl::DeclarationOnly, DefaultLvalueConversion(), Diag(), DSAStack, clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getAttrs(), clang::ASTContext::getBaseElementType(), clang::DeclRefExpr::getDecl(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), getPrivateItem(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttrs(), clang::Init, clang::InitializedEntity::InitializeVariable(), clang::Type::isAnyPointerType(), clang::Type::isArrayType(), clang::QualType::isConstant(), clang::DeclContext::isDependentContext(), clang::SourceLocation::isInvalid(), clang::Decl::isInvalidDecl(), isOpenMPCapturedDecl(), clang::isOpenMPDistributeDirective(), clang::isOpenMPParallelDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskingDirective(), clang::isOpenMPTeamsDirective(), clang::isOpenMPWorksharingDirective(), clang::Type::isVariablyModifiedType(), LangOpts, clang::InitializationSequence::Perform(), reportOriginalDsa(), RequireCompleteType(), clang::Result, clang::VarDecl::setInit(), and clang::Decl::setInvalidDecl().

Referenced by ActOnOpenMPExecutableDirective(), ActOnOpenMPVarListClause(), and clang::TreeTransform< Derived >::RebuildOMPFirstprivateClause().

◆ ActOnOpenMPFlushClause()

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

Called on well-formed 'flush' pseudo clause.

Definition at line 20833 of file SemaOpenMP.cpp.

References Context, and clang::OMPFlushClause::Create().

Referenced by ActOnOpenMPVarListClause(), and clang::TreeTransform< Derived >::RebuildOMPFlushClause().

◆ ActOnOpenMPFlushDirective()

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

◆ ActOnOpenMPForDirective()

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

◆ ActOnOpenMPForSimdDirective()

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

◆ ActOnOpenMPFromClause()

OMPClause * Sema::ActOnOpenMPFromClause ( ArrayRef< OpenMPMotionModifierKind MotionModifiers,
ArrayRef< SourceLocation MotionModifiersLoc,
CXXScopeSpec MapperIdScopeSpec,
DeclarationNameInfo MapperId,
SourceLocation  ColonLoc,
ArrayRef< Expr * >  VarList,
const OMPVarListLocTy Locs,
ArrayRef< Expr * >  UnresolvedMappers = std::nullopt 
)

◆ ActOnOpenMPFullClause()

OMPClause * Sema::ActOnOpenMPFullClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-form 'full' clauses.

Definition at line 17280 of file SemaOpenMP.cpp.

References Context, and clang::OMPFullClause::Create().

Referenced by ActOnOpenMPClause(), and clang::TreeTransform< Derived >::RebuildOMPFullClause().

◆ ActOnOpenMPGenericLoopDirective()

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

◆ ActOnOpenMPGrainsizeClause()

OMPClause * Sema::ActOnOpenMPGrainsizeClause ( OpenMPGrainsizeClauseModifier  Modifier,
Expr Size,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ModifierLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPHasDeviceAddrClause()

OMPClause * Sema::ActOnOpenMPHasDeviceAddrClause ( ArrayRef< Expr * >  VarList,
const OMPVarListLocTy Locs 
)

◆ ActOnOpenMPHintClause()

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

◆ ActOnOpenMPIdExpression()

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

◆ ActOnOpenMPIfClause()

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

◆ ActOnOpenMPInclusiveClause()

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

Called on well-formed 'inclusive' clause.

Definition at line 24071 of file SemaOpenMP.cpp.

References Context, clang::OMPInclusiveClause::Create(), Diag(), DSAStack, and getPrivateItem().

Referenced by ActOnOpenMPVarListClause(), and clang::TreeTransform< Derived >::RebuildOMPInclusiveClause().

◆ ActOnOpenMPInitClause()

OMPClause * Sema::ActOnOpenMPInitClause ( Expr InteropVar,
OMPInteropInfo InteropInfo,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  VarLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPInReductionClause()

OMPClause * Sema::ActOnOpenMPInReductionClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId,
ArrayRef< Expr * >  UnresolvedReductions = std::nullopt 
)

◆ ActOnOpenMPInteropDirective()

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

◆ ActOnOpenMPIsDevicePtrClause()

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

◆ ActOnOpenMPIteratorVarDecl()

void Sema::ActOnOpenMPIteratorVarDecl ( VarDecl VD)

Definition at line 22890 of file SemaOpenMP.cpp.

References DSAStack.

Referenced by ActOnOMPIteratorExpr().

◆ ActOnOpenMPLastprivateClause()

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

◆ ActOnOpenMPLinearClause()

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

◆ ActOnOpenMPLoopInitialization()

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

◆ ActOnOpenMPLoopnest()

StmtResult Sema::ActOnOpenMPLoopnest ( Stmt AStmt)

Process a canonical OpenMP loop nest that can either be a canonical literal loop (ForStmt or CXXForRangeStmt), or the generated loop of an OpenMP loop transformation construct.

Definition at line 5984 of file SemaOpenMP.cpp.

References ActOnOpenMPCanonicalLoop(), clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPLoopTransformationDirective().

◆ ActOnOpenMPMapClause()

OMPClause * Sema::ActOnOpenMPMapClause ( Expr IteratorModifier,
ArrayRef< OpenMPMapModifierKind MapTypeModifiers,
ArrayRef< SourceLocation MapTypeModifiersLoc,
CXXScopeSpec MapperIdScopeSpec,
DeclarationNameInfo MapperId,
OpenMPMapClauseKind  MapType,
bool  IsMapTypeImplicit,
SourceLocation  MapLoc,
SourceLocation  ColonLoc,
ArrayRef< Expr * >  VarList,
const OMPVarListLocTy Locs,
bool  NoDiagnose = false,
ArrayRef< Expr * >  UnresolvedMappers = std::nullopt 
)

◆ ActOnOpenMPMaskedDirective()

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

Called on well-formed '#pragma omp masked' after parsing of the.

Definition at line 11040 of file SemaOpenMP.cpp.

References Context, clang::OMPMaskedDirective::Create(), setFunctionHasBranchProtectedScope(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPMaskedTaskLoopDirective()

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

◆ ActOnOpenMPMaskedTaskLoopSimdDirective()

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

◆ 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 11029 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPMasterTaskLoopDirective()

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

◆ ActOnOpenMPMasterTaskLoopSimdDirective()

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

◆ ActOnOpenMPMergeableClause()

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

Called on well-formed 'mergeable' clause.

Definition at line 17739 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPMessageClause()

OMPClause * Sema::ActOnOpenMPMessageClause ( Expr MS,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'message' clause.

passing string for message.

Definition at line 17191 of file SemaOpenMP.cpp.

References Context, Diag(), and clang::Stmt::getBeginLoc().

Referenced by ActOnOpenMPSingleExprClause(), and clang::TreeTransform< Derived >::RebuildOMPMessageClause().

◆ ActOnOpenMPMetaDirective()

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

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

◆ ActOnOpenMPNocontextClause()

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

◆ ActOnOpenMPNogroupClause()

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

Called on well-formed 'nogroup' clause.

Definition at line 17827 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPNontemporalClause()

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

Called on well-formed 'nontemporal' clause.

Definition at line 24021 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPVarListClause(), and clang::TreeTransform< Derived >::RebuildOMPNontemporalClause().

◆ ActOnOpenMPNovariantsClause()

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

◆ ActOnOpenMPNowaitClause()

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

Called on well-formed 'nowait' clause.

Definition at line 17727 of file SemaOpenMP.cpp.

References Context, and DSAStack.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPNumTasksClause()

OMPClause * Sema::ActOnOpenMPNumTasksClause ( OpenMPNumTasksClauseModifier  Modifier,
Expr NumTasks,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ModifierLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPNumTeamsClause()

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

◆ ActOnOpenMPNumThreadsClause()

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

◆ ActOnOpenMPOrderClause()

OMPClause * Sema::ActOnOpenMPOrderClause ( OpenMPOrderClauseModifier  Modifier,
OpenMPOrderClauseKind  Kind,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  MLoc,
SourceLocation  KindLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPOrderedClause()

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

◆ ActOnOpenMPOrderedDirective()

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

◆ 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 7885 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPParallelForDirective()

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

◆ ActOnOpenMPParallelForSimdDirective()

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

◆ ActOnOpenMPParallelGenericLoopDirective()

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

◆ ActOnOpenMPParallelMaskedDirective()

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

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

Definition at line 11220 of file SemaOpenMP.cpp.

References Context, clang::OMPParallelMaskedDirective::Create(), DSAStack, clang::CapturedStmt::getCapturedDecl(), setFunctionHasBranchProtectedScope(), clang::CapturedDecl::setNothrow(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPParallelMaskedTaskLoopDirective()

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

◆ ActOnOpenMPParallelMaskedTaskLoopSimdDirective()

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

◆ 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 11197 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPParallelMasterTaskLoopDirective()

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

◆ ActOnOpenMPParallelMasterTaskLoopSimdDirective()

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

◆ 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 11243 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPPartialClause()

OMPClause * Sema::ActOnOpenMPPartialClause ( Expr FactorExpr,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPPriorityClause()

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

Called on well-formed 'priority' clause.

Definition at line 22969 of file SemaOpenMP.cpp.

References Context, DSAStack, isNonNegativeIntegerValue(), and Priority.

Referenced by ActOnOpenMPSingleExprClause(), and clang::TreeTransform< Derived >::RebuildOMPPriorityClause().

◆ ActOnOpenMPPrivateClause()

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

◆ 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 17116 of file SemaOpenMP.cpp.

References Context, Diag(), getListOfPossibleValues(), and LangOpts.

Referenced by ActOnOpenMPSimpleClause(), and clang::TreeTransform< Derived >::RebuildOMPProcBindClause().

◆ ActOnOpenMPReadClause()

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

Called on well-formed 'read' clause.

Definition at line 17744 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPReductionClause()

OMPClause * Sema::ActOnOpenMPReductionClause ( ArrayRef< Expr * >  VarList,
OpenMPReductionClauseModifier  Modifier,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ModifierLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId,
ArrayRef< Expr * >  UnresolvedReductions = std::nullopt 
)

◆ ActOnOpenMPRegionEnd()

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

◆ ActOnOpenMPRegionStart()

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

◆ ActOnOpenMPRelaxedClause()

OMPClause * Sema::ActOnOpenMPRelaxedClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'relaxed' clause.

Definition at line 17807 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPReleaseClause()

OMPClause * Sema::ActOnOpenMPReleaseClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'release' clause.

Definition at line 17802 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPRequiresDirective()

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

◆ ActOnOpenMPReverseOffloadClause()

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

Called on well-formed 'reverse_offload' clause.

Definition at line 17842 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPSafelenClause()

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

◆ ActOnOpenMPScanDirective()

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

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

◆ ActOnOpenMPScopeDirective()

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

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

Definition at line 24060 of file SemaOpenMP.cpp.

References Context, clang::OMPScopeDirective::Create(), setFunctionHasBranchProtectedScope(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

◆ 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 10671 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ 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 10632 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPSeqCstClause()

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

Called on well-formed 'seq_cst' clause.

Definition at line 17787 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPSeverityClause()

OMPClause * Sema::ActOnOpenMPSeverityClause ( OpenMPSeverityClauseKind  Kind,
SourceLocation  KindLoc,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'severity' clause.

Definition at line 17175 of file SemaOpenMP.cpp.

References Context, Diag(), getListOfPossibleValues(), and clang::OMPC_SEVERITY_unknown.

Referenced by ActOnOpenMPSimpleClause(), and clang::TreeTransform< Derived >::RebuildOMPSeverityClause().

◆ ActOnOpenMPSharedClause()

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

◆ ActOnOpenMPSIMDClause()

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

Called on well-formed 'simd' clause.

Definition at line 17822 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPSimdDirective()

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

◆ ActOnOpenMPSimdlenClause()

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

◆ ActOnOpenMPSimpleClause()

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

◆ 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 10998 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPSingleExprClause()

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

◆ ActOnOpenMPSingleExprWithArgClause()

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

◆ ActOnOpenMPSizesClause()

OMPClause * Sema::ActOnOpenMPSizesClause ( ArrayRef< Expr * >  SizeExprs,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ 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 13425 of file SemaOpenMP.cpp.

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

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPTargetDirective()

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

◆ ActOnOpenMPTargetEnterDataDirective()

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

◆ ActOnOpenMPTargetExitDataDirective()

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

◆ ActOnOpenMPTargetParallelDirective()

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

◆ ActOnOpenMPTargetParallelForDirective()

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

◆ ActOnOpenMPTargetParallelForSimdDirective()

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

◆ ActOnOpenMPTargetParallelGenericLoopDirective()

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

◆ ActOnOpenMPTargetSimdDirective()

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

◆ ActOnOpenMPTargetTeamsDirective()

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

◆ ActOnOpenMPTargetTeamsDistributeDirective()

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

◆ ActOnOpenMPTargetTeamsDistributeParallelForDirective()

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

◆ ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective()

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

◆ ActOnOpenMPTargetTeamsDistributeSimdDirective()

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

◆ ActOnOpenMPTargetTeamsGenericLoopDirective()

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

◆ ActOnOpenMPTargetUpdateDirective()

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

◆ ActOnOpenMPTaskDirective()

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

◆ ActOnOpenMPTaskgroupDirective()

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

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

Definition at line 11389 of file SemaOpenMP.cpp.

References Context, clang::OMPTaskgroupDirective::Create(), DSAStack, setFunctionHasBranchProtectedScope(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPTaskLoopDirective()

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

◆ ActOnOpenMPTaskLoopSimdDirective()

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

◆ ActOnOpenMPTaskReductionClause()

OMPClause * Sema::ActOnOpenMPTaskReductionClause ( ArrayRef< Expr * >  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId,
ArrayRef< Expr * >  UnresolvedReductions = std::nullopt 
)

◆ ActOnOpenMPTaskwaitDirective()

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

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

Definition at line 11373 of file SemaOpenMP.cpp.

References Context, clang::OMPTaskwaitDirective::Create(), Diag(), and clang::StmtError().

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPTaskyieldDirective()

StmtResult Sema::ActOnOpenMPTaskyieldDirective ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

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

Definition at line 11332 of file SemaOpenMP.cpp.

References Context, and clang::OMPTaskyieldDirective::Create().

Referenced by ActOnOpenMPExecutableDirective().

◆ ActOnOpenMPTeamsDirective()

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

◆ ActOnOpenMPTeamsDistributeDirective()

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

◆ ActOnOpenMPTeamsDistributeParallelForDirective()

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

◆ ActOnOpenMPTeamsDistributeParallelForSimdDirective()

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

◆ ActOnOpenMPTeamsDistributeSimdDirective()

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

◆ ActOnOpenMPTeamsGenericLoopDirective()

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

◆ ActOnOpenMPThreadLimitClause()

OMPClause * Sema::ActOnOpenMPThreadLimitClause ( Expr ThreadLimit,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

◆ ActOnOpenMPThreadprivateDirective()

Sema::DeclGroupPtrTy Sema::ActOnOpenMPThreadprivateDirective ( SourceLocation  Loc,
ArrayRef< Expr * >  VarList 
)

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

Definition at line 3178 of file SemaOpenMP.cpp.

References clang::DeclContext::addDecl(), CheckOMPThreadPrivateDecl(), CurContext, and clang::OpaquePtr< PtrTy >::make().

◆ ActOnOpenMPThreadsClause()

OMPClause * Sema::ActOnOpenMPThreadsClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'threads' clause.

Definition at line 17817 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPTileDirective()

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

◆ ActOnOpenMPToClause()

OMPClause * Sema::ActOnOpenMPToClause ( ArrayRef< OpenMPMotionModifierKind MotionModifiers,
ArrayRef< SourceLocation MotionModifiersLoc,
CXXScopeSpec MapperIdScopeSpec,
DeclarationNameInfo MapperId,
SourceLocation  ColonLoc,
ArrayRef< Expr * >  VarList,
const OMPVarListLocTy Locs,
ArrayRef< Expr * >  UnresolvedMappers = std::nullopt 
)

◆ ActOnOpenMPUnifiedAddressClause()

OMPClause * Sema::ActOnOpenMPUnifiedAddressClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'unified_address' clause.

Definition at line 17832 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPUnifiedSharedMemoryClause()

OMPClause * Sema::ActOnOpenMPUnifiedSharedMemoryClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'unified_address' clause.

Definition at line 17837 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPUnrollDirective()

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

◆ ActOnOpenMPUntiedClause()

OMPClause * Sema::ActOnOpenMPUntiedClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'untied' clause.

Definition at line 17733 of file SemaOpenMP.cpp.

References Context, and DSAStack.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPUpdateClause() [1/2]

OMPClause * Sema::ActOnOpenMPUpdateClause ( OpenMPDependClauseKind  Kind,
SourceLocation  KindLoc,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'update' clause.

Definition at line 17242 of file SemaOpenMP.cpp.

References Context, clang::OMPUpdateClause::Create(), Diag(), getListOfPossibleValues(), LangOpts, and clang::OMPC_DEPEND_unknown.

Referenced by ActOnOpenMPClause(), and ActOnOpenMPSimpleClause().

◆ ActOnOpenMPUpdateClause() [2/2]

OMPClause * Sema::ActOnOpenMPUpdateClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'update' clause.

Definition at line 17754 of file SemaOpenMP.cpp.

References Context, and clang::OMPUpdateClause::Create().

◆ ActOnOpenMPUseClause()

OMPClause * Sema::ActOnOpenMPUseClause ( Expr InteropVar,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  VarLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'use' clause.

Definition at line 18008 of file SemaOpenMP.cpp.

References Context, and isValidInteropVariable().

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

◆ ActOnOpenMPUseDeviceAddrClause()

OMPClause * Sema::ActOnOpenMPUseDeviceAddrClause ( ArrayRef< Expr * >  VarList,
const OMPVarListLocTy Locs 
)

◆ ActOnOpenMPUseDevicePtrClause()

OMPClause * Sema::ActOnOpenMPUseDevicePtrClause ( ArrayRef< Expr * >  VarList,
const OMPVarListLocTy Locs 
)

◆ ActOnOpenMPUsesAllocatorClause()

OMPClause * Sema::ActOnOpenMPUsesAllocatorClause ( SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc,
ArrayRef< UsesAllocatorsData Data 
)

◆ ActOnOpenMPVarListClause()

OMPClause * Sema::ActOnOpenMPVarListClause ( OpenMPClauseKind  Kind,
ArrayRef< Expr * >  Vars,
const OMPVarListLocTy Locs,
OpenMPVarListDataTy Data 
)

◆ ActOnOpenMPWeakClause()

OMPClause * Sema::ActOnOpenMPWeakClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'weak' clause.

Definition at line 17812 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPWhenClause()

OMPClause * clang::Sema::ActOnOpenMPWhenClause ( OMPTraitInfo TI,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'when' clause.

◆ ActOnOpenMPWriteClause()

OMPClause * Sema::ActOnOpenMPWriteClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on well-formed 'write' clause.

Definition at line 17749 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause().

◆ ActOnOpenMPXAttributeClause()

OMPClause * Sema::ActOnOpenMPXAttributeClause ( ArrayRef< const Attr * >  Attrs,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)

Called on a well-formed 'ompx_attribute' clause.

Definition at line 24422 of file SemaOpenMP.cpp.

References Context.

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

◆ ActOnOpenMPXBareClause()

OMPClause * Sema::ActOnOpenMPXBareClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc 
)

Called on a well-formed 'ompx_bare' clause.

Definition at line 24429 of file SemaOpenMP.cpp.

References Context.

Referenced by ActOnOpenMPClause(), and clang::TreeTransform< Derived >::RebuildOMPXBareClause().

◆ ActOnOpenMPXDynCGroupMemClause()

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

◆ ActOnPackExpansion() [1/3]

ParsedTemplateArgument Sema::ActOnPackExpansion ( const ParsedTemplateArgument Arg,
SourceLocation  EllipsisLoc 
)

◆ ActOnPackExpansion() [2/3]

ExprResult Sema::ActOnPackExpansion ( Expr Pattern,
SourceLocation  EllipsisLoc 
)

Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.

Parameters
PatternThe expression preceding the ellipsis, which will become the pattern of the pack expansion.
EllipsisLocThe location of the ellipsis.

Definition at line 661 of file SemaTemplateVariadic.cpp.

References CheckPackExpansion().

◆ ActOnPackExpansion() [3/3]

TypeResult Sema::ActOnPackExpansion ( ParsedType  Type,
SourceLocation  EllipsisLoc 
)

Invoked when parsing a type followed by an ellipsis, which creates a pack expansion.

Parameters
TypeThe type preceding the ellipsis, which will become the pattern of the pack expansion.
EllipsisLocThe location of the ellipsis.

Definition at line 607 of file SemaTemplateVariadic.cpp.

References CheckPackExpansion(), CreateParsedType(), clang::TypeSourceInfo::getType(), and GetTypeFromParser().

◆ ActOnPackIndexingExpr()

ExprResult Sema::ActOnPackIndexingExpr ( Scope S,
Expr PackExpression,
SourceLocation  EllipsisLoc,
SourceLocation  LSquareLoc,
Expr IndexExpr,
SourceLocation  RSquareLoc 
)

◆ ActOnPackIndexingType()

QualType Sema::ActOnPackIndexingType ( QualType  Pattern,
Expr IndexExpr,
SourceLocation  Loc,
SourceLocation  EllipsisLoc 
)

◆ ActOnParamDeclarator()

Decl * Sema::ActOnParamDeclarator ( Scope S,
Declarator D,
SourceLocation  ExplicitThisLoc = {} 
)

ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into function prototype scope.

Definition at line 15163 of file SemaDecl.cpp.

References clang::IdentifierResolver::AddDecl(), clang::LookupResult::begin(), CheckExplicitObjectParameter(), CheckFunctionOrTemplateParamDeclarator(), CheckParameter(), clang::DeclSpec::ClearStorageClassSpecs(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus17, clang::FixItHint::CreateRemoval(), deduceOpenCLAddressSpace(), Diag(), DiagnoseFunctionSpecifiers(), DiagnoseTemplateParameterShadow(), clang::LookupResult::empty(), ForVisibleRedeclaration, clang::Declarator::getBeginLoc(), clang::DeclSpec::getConstexprSpecifier(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), getLangOpts(), clang::Decl::getLocation(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getMutableDeclSpec(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ASTContext::getTranslationUnitDecl(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::Decl::hasAttr(), clang::DeclSpec::hasConstexprSpecifier(), IdResolver, clang::DeclSpec::isInlineSpecified(), clang::Declarator::isInvalidType(), clang::DeclSpec::isModulePrivateSpecified(), clang::LookupResult::isSingleResult(), clang::Decl::isTemplateParameter(), LookupName(), LookupOrdinaryName, clang::OpenCL, ProcessDeclAttributes(), clang::SC_Auto, clang::SC_None, clang::SC_Register, clang::DeclSpec::SCS_auto, clang::DeclSpec::SCS_register, clang::DeclSpec::SCS_unspecified, clang::Declarator::SetIdentifier(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), and clang::ParmVarDecl::setScopeInfo().

Referenced by ActOnFinishKNRParamDeclarations().

◆ 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 329 of file SemaDeclCXX.cpp.

References ActOnParamDefaultArgumentError(), ConvertParamDefaultArgument(), clang::CPlusPlus, Diag(), DiagnoseUnexpandedParameterPack(), getLangOpts(), clang::Stmt::getSourceRange(), clang::VarDecl::isParameterPack(), clang::Result, clang::ParmVarDecl::setDefaultArg(), SetParamDefaultArgument(), UnparsedDefaultArgLocs, and UPPC_DefaultArgument.

◆ ActOnParamDefaultArgumentError()

void Sema::ActOnParamDefaultArgumentError ( Decl param,
SourceLocation  EqualLoc,
Expr DefaultArg 
)

ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the parameter param failed.

Definition at line 390 of file SemaDeclCXX.cpp.

References CreateRecoveryExpr(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getEndLoc(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::ParmVarDecl::setDefaultArg(), clang::Decl::setInvalidDecl(), and UnparsedDefaultArgLocs.

Referenced by ActOnParamDefaultArgument().

◆ 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 377 of file SemaDeclCXX.cpp.

References clang::ParmVarDecl::setUnparsedDefaultArg(), and UnparsedDefaultArgLocs.

◆ ActOnParenExpr()

ExprResult Sema::ActOnParenExpr ( SourceLocation  L,
SourceLocation  R,
Expr E 
)

◆ ActOnParenListExpr()

ExprResult Sema::ActOnParenListExpr ( SourceLocation  L,
SourceLocation  R,
MultiExprArg  Val 
)

◆ ActOnPopScope()

void Sema::ActOnPopScope ( SourceLocation  Loc,
Scope S 
)

We visit the decls in non-deterministic order, but we want diagnostics emitted in deterministic order. Collect any diagnostic that may be emitted and sort the diagnostics before emitting them, after we visited all decls.

Definition at line 2214 of file SemaDecl.cpp.

References CheckCountedByAttr(), CheckPoppedLabel(), clang::CPlusPlus, clang::Scope::DeclScope, Diag(), DiagnoseUnusedButSetDecl(), DiagnoseUnusedDecl(), DiagnoseUnusedNestedTypedefs(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), IdResolver, PDiag(), RefsMinusAssignments, clang::IdentifierResolver::RemoveDecl(), and clang::Scope::TemplateParamScope.

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

◆ ActOnPostfixUnaryOp()

ExprResult Sema::ActOnPostfixUnaryOp ( Scope S,
SourceLocation  OpLoc,
tok::TokenKind  Kind,
Expr Input 
)

◆ ActOnPragmaAttributeAttribute()

void Sema::ActOnPragmaAttributeAttribute ( ParsedAttr Attribute,
SourceLocation  PragmaLoc,
attr::ParsedSubjectMatchRuleSet  Rules 
)

◆ ActOnPragmaAttributeEmptyPush()

void Sema::ActOnPragmaAttributeEmptyPush ( SourceLocation  PragmaLoc,
const IdentifierInfo Namespace 
)

Definition at line 1055 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 1062 of file SemaAttr.cpp.

References Diag(), and PragmaAttributeStack.

◆ ActOnPragmaClangSection()

void Sema::ActOnPragmaClangSection ( SourceLocation  PragmaLoc,
PragmaClangSectionAction  Action,
PragmaClangSectionKind  SecKind,
StringRef  SecName 
)

◆ ActOnPragmaCXLimitedRange()

void Sema::ActOnPragmaCXLimitedRange ( SourceLocation  Loc,
LangOptions::ComplexRangeKind  Range 
)

ActOnPragmaCXLimitedRange - Called on well formed #pragma STDC CX_LIMITED_RANGE.

Definition at line 1355 of file SemaAttr.cpp.

References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, FpPragmaStack, getLangOpts(), and PSK_Set.

◆ ActOnPragmaDetectMismatch()

void Sema::ActOnPragmaDetectMismatch ( SourceLocation  Loc,
StringRef  Name,
StringRef  Value 
)

ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.

Definition at line 514 of file SemaAttr.cpp.

References clang::DeclContext::addDecl(), Consumer, Context, clang::PragmaDetectMismatchDecl::Create(), clang::ASTContext::getTranslationUnitDecl(), and clang::ASTConsumer::HandleTopLevelDecl().

◆ ActOnPragmaDump() [1/2]

void Sema::ActOnPragmaDump ( Expr E)

Called on #pragma clang __debug dump E.

Definition at line 5893 of file SemaLookup.cpp.

References clang::Stmt::dump().

◆ ActOnPragmaDump() [2/2]

void Sema::ActOnPragmaDump ( Scope S,
SourceLocation  Loc,
IdentifierInfo II 
)

◆ ActOnPragmaFEnvAccess()

void Sema::ActOnPragmaFEnvAccess ( SourceLocation  Loc,
bool  IsEnabled 
)

ActOnPragmaFenvAccess - Called on well formed #pragma STDC FENV_ACCESS.

Definition at line 1339 of file SemaAttr.cpp.

References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, Diag(), FpPragmaStack, getLangOpts(), isPreciseFPEnabled(), and PSK_Set.

◆ ActOnPragmaFEnvRound()

void Sema::ActOnPragmaFEnvRound ( SourceLocation  Loc,
llvm::RoundingMode  FPR 
)

Called to set constant rounding mode for floating point operations.

Definition at line 1324 of file SemaAttr.cpp.

References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, FpPragmaStack, getLangOpts(), and PSK_Set.

◆ ActOnPragmaFloatControl()

void Sema::ActOnPragmaFloatControl ( SourceLocation  Loc,
PragmaMsStackAction  Action,
PragmaFloatControlKind  Value 
)

◆ ActOnPragmaFPContract()

void Sema::ActOnPragmaFPContract ( SourceLocation  Loc,
LangOptions::FPModeKind  FPC 
)

◆ ActOnPragmaFPEvalMethod()

void Sema::ActOnPragmaFPEvalMethod ( SourceLocation  Loc,
LangOptions::FPEvalMethodKind  Value 
)

◆ ActOnPragmaFPExceptions()

void Sema::ActOnPragmaFPExceptions ( SourceLocation  Loc,
LangOptions::FPExceptionModeKind  FPE 
)

Called on well formed '#pragma clang fp' that has option 'exceptions'.

Definition at line 1363 of file SemaAttr.cpp.

References setExceptionMode().

◆ ActOnPragmaFPValueChangingOption()

void Sema::ActOnPragmaFPValueChangingOption ( SourceLocation  Loc,
PragmaFPKind  Kind,
bool  IsEnabled 
)

◆ ActOnPragmaMSAllocText()

void Sema::ActOnPragmaMSAllocText ( SourceLocation  PragmaLocation,
StringRef  Section,
const SmallVector< std::tuple< IdentifierInfo *, SourceLocation > > &  Functions 
)

◆ ActOnPragmaMSComment()

void Sema::ActOnPragmaMSComment ( SourceLocation  CommentLoc,
PragmaMSCommentKind  Kind,
StringRef  Arg 
)

ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").

Definition at line 506 of file SemaAttr.cpp.

References clang::DeclContext::addDecl(), Consumer, Context, clang::PragmaCommentDecl::Create(), clang::ASTContext::getTranslationUnitDecl(), and clang::ASTConsumer::HandleTopLevelDecl().

◆ ActOnPragmaMSFunction()

void Sema::ActOnPragmaMSFunction ( SourceLocation  Loc,
const llvm::SmallVectorImpl< StringRef > &  NoBuiltins 
)

Call on well formed #pragma function.

Definition at line 1155 of file SemaAttr.cpp.

References CurContext, Diag(), clang::DeclContext::getRedeclContext(), clang::DeclContext::isFileContext(), and MSFunctionNoBuiltins.

◆ ActOnPragmaMSInitSeg()

void Sema::ActOnPragmaMSInitSeg ( SourceLocation  PragmaLocation,
StringLiteral SegmentName 
)

Called on well-formed #pragma init_seg().

Definition at line 778 of file SemaAttr.cpp.

References CurInitSeg, CurInitSegLoc, and clang::StringLiteral::getString().

◆ ActOnPragmaMSOptimize()

void Sema::ActOnPragmaMSOptimize ( SourceLocation  Loc,
bool  IsOn 
)

#pragma optimize("[optimization-list]", on | off).

Definition at line 1146 of file SemaAttr.cpp.

References CurContext, Diag(), clang::DeclContext::getRedeclContext(), clang::DeclContext::isFileContext(), and MSPragmaOptimizeIsOn.

◆ 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 603 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 773 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 735 of file SemaAttr.cpp.

References BSSSegStack, checkSectionName(), CodeSegStack, ConstSegStack, Context, DataSegStack, Diag(), clang::StringLiteral::getBeginLoc(), clang::TargetInfo::getCXXABI(), clang::StringLiteral::getString(), clang::ASTContext::getTargetInfo(), clang::TargetCXXABI::isMicrosoft(), and PSK_Pop.

◆ ActOnPragmaMSStrictGuardStackCheck()

void Sema::ActOnPragmaMSStrictGuardStackCheck ( SourceLocation  PragmaLocation,
PragmaMsStackAction  Action,
bool  Value 
)

ActOnPragmaMSStrictGuardStackCheck - Called on well formed #pragma strict_gs_check.

Called on well formed #pragma strict_gs_check().

Definition at line 762 of file SemaAttr.cpp.

References clang::Sema::PragmaStack< ValueType >::Act(), Diag(), PSK_Pop, clang::Sema::PragmaStack< ValueType >::Stack, and StrictGuardStackCheckStack.

◆ ActOnPragmaMSStruct()

void Sema::ActOnPragmaMSStruct ( PragmaMSStructKind  Kind)

ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].

Definition at line 502 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 610 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 1139 of file SemaAttr.cpp.

References OptimizeOffPragmaLocation.

◆ ActOnPragmaOptionsAlign()

void Sema::ActOnPragmaOptionsAlign ( PragmaOptionsAlignKind  Kind,
SourceLocation  PragmaLoc 
)

◆ ActOnPragmaPack()

void Sema::ActOnPragmaPack ( SourceLocation  PragmaLoc,
PragmaMsStackAction  Action,
StringRef  SlotLabel,
Expr Alignment 
)

◆ 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 20547 of file SemaDecl.cpp.

References clang::Decl::addAttr(), Context, Diag(), ExtnameUndeclaredIdentifiers, clang::Decl::getLocation(), clang::IdentifierInfo::getName(), isDeclExternC(), LookupOrdinaryName, LookupSingleName(), clang::AttributeCommonInfo::Form::Pragma(), and TUScope.

◆ ActOnPragmaUnused()

void Sema::ActOnPragmaUnused ( const Token Identifier,
Scope curScope,
SourceLocation  PragmaLoc 
)

◆ ActOnPragmaVisibility()

void Sema::ActOnPragmaVisibility ( const IdentifierInfo VisType,
SourceLocation  PragmaLoc 
)

ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .

Definition at line 1253 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 20586 of file SemaDecl.cpp.

References DeclApplyPragmaWeak(), clang::Decl::hasAttr(), LookupOrdinaryName, LookupSingleName(), TUScope, and WeakUndeclaredIdentifiers.

◆ ActOnPragmaWeakID()

void Sema::ActOnPragmaWeakID ( IdentifierInfo WeakName,
SourceLocation  PragmaLoc,
SourceLocation  WeakNameLoc 
)

ActOnPragmaWeakID - Called on well formed #pragma weak ident.

Definition at line 20574 of file SemaDecl.cpp.

References clang::Decl::addAttr(), Context, LookupOrdinaryName, LookupSingleName(), TUScope, and WeakUndeclaredIdentifiers.

◆ ActOnPredefinedExpr()

ExprResult Sema::ActOnPredefinedExpr ( SourceLocation  Loc,
tok::TokenKind  Kind 
)

Definition at line 3795 of file SemaExpr.cpp.

References BuildPredefinedExpr(), and getPredefinedExprKind().

◆ ActOnPrivateModuleFragmentDecl()

Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl ( SourceLocation  ModuleLoc,
SourceLocation  PrivateLoc 
)

◆ ActOnProperty()

Decl * Sema::ActOnProperty ( Scope S,
SourceLocation  AtLoc,
SourceLocation  LParenLoc,
FieldDeclarator FD,
ObjCDeclSpec ODS,
Selector  GetterSel,
Selector  SetterSel,
tok::ObjCKeywordKind  MethodImplKind,
DeclContext lexicalDC = nullptr 
)

◆ 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 1077 of file SemaObjCProperty.cpp.

References AbstractSynthesizedIvarType, clang::DeclContext::addDecl(), clang::Qualifiers::addObjCLifetime(), clang::ObjCImplDecl::addPropertyImplementation(), BuildBinOp(), clang::ast_matchers::callExpr, clang::ASTContext::canAssignObjCInterfaces(), clang::Type::castAs(), Category, checkARCPropertyImpl(), CheckAssignmentConstraints(), Compatible, Context, clang::CPlusPlus, clang::ObjCPropertyImplDecl::Create(), clang::ObjCIvarDecl::Create(), clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateReplacement(), CurContext, clang::declaresSameEntity(), Diag(), clang::ObjCPropertyImplDecl::Dynamic, clang::DeclContextLookupResult::find_first(), clang::ObjCInterfaceDecl::FindCategoryDeclaration(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCImplDecl::FindPropertyImplDecl(), clang::ObjCImplDecl::FindPropertyImplIvarDecl(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), clang::Decl::getBeginLoc(), clang::ASTContext::getCanonicalType(), clang::ObjCImplDecl::getClassInterface(), clang::RecordType::getDecl(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), getImpliedARCOwnership(), getLangOpts(), clang::Decl::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::ObjCContainerDecl::getMethod(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::ASTContext::getObjCGCQualType(), clang::QualType::getObjCLifetime(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyImplementation(), clang::ASTContext::getQualifiedType(), clang::ObjCIvarDecl::getSynthesize(), clang::ValueDecl::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::ObjCIvarDecl::getUsageType(), clang::RecordDecl::hasFlexibleArrayMember(), clang::ASTContext::hasSameType(), hasWrittenStorageAttribute(), clang::InitializedEntity::InitializeResult(), clang::ObjCInterfaceDecl::isArcWeakrefUnavailable(), clang::Type::isArithmeticType(), clang::ObjCPropertyDecl::isDirectProperty(), clang::ObjCRuntime::isFragile(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::ObjCRuntime::isNonFragile(), clang::QualType::isObjCGCStrong(), clang::QualType::isObjCGCWeak(), clang::ObjCInterfaceDecl::isObjCRequiresPropertyDefs(), clang::Type::isObjCRetainableType(), clang::Type::isRecordType(), clang::SourceLocation::isValid(), clang::ObjCPropertyAttribute::kind_atomic, clang::ObjCPropertyAttribute::kind_nonatomic, clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_strong, clang::ObjCPropertyAttribute::kind_weak, clang::ObjCInterfaceDecl::known_extensions(), LocPropertyAttribute(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), clang::DeclContext::makeDeclVisibleInContext(), MarkDeclRefReferenced(), MaybeCreateExprWithCleanups(), clang::LangOptionsBase::NonGC, clang::OMF_autorelease, clang::OMF_release, clang::OMF_retain, clang::OMF_retainCount, P, PerformCopyInitialization(), clang::ObjCIvarDecl::Private, RedeclarePropertyAccessor(), RequireCompleteType(), RequireNonAbstractType(), Scope, SelectPropertyForSynthesisFromProtocols(), clang::ObjCPropertyImplDecl::setGetterCXXConstructor(), clang::ObjCPropertyImplDecl::setGetterMethodDecl(), setImpliedPropertyAttributeForReadOnlyProperty(), clang::Decl::setInvalidDecl(), clang::ObjCPropertyImplDecl::setSetterCXXAssignment(), clang::ObjCPropertyImplDecl::setSetterMethodDecl(), clang::ObjCPropertyImplDecl::Synthesize, clang::VK_LValue, clang::VK_PRValue, and clang::Qualifiers::Weak.

Referenced by DefaultSynthesizeProperties().

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

◆ ActOnPseudoDestructorExpr() [2/2]

ExprResult Sema::ActOnPseudoDestructorExpr ( Scope S,
Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
SourceLocation  TildeLoc,
const DeclSpec DS 
)

◆ ActOnPureSpecifier()

void Sema::ActOnPureSpecifier ( Decl D,
SourceLocation  PureSpecLoc 
)

◆ 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 10771 of file SemaDeclCXX.cpp.

References clang::IdentifierResolver::AddDecl(), clang::NamedDecl::getDeclName(), and IdResolver.

◆ ActOnReenterFunctionContext()

void Sema::ActOnReenterFunctionContext ( Scope S,
Decl D 
)

◆ ActOnReenterTemplateScope()

unsigned Sema::ActOnReenterTemplateScope ( Decl Template,
llvm::function_ref< Scope *()>  EnterScope 
)

◆ ActOnRequiresClause()

ExprResult Sema::ActOnRequiresClause ( ExprResult  ConstraintExpr)

◆ ActOnRequiresExpr()

ExprResult Sema::ActOnRequiresExpr ( SourceLocation  RequiresKWLoc,
RequiresExprBodyDecl Body,
SourceLocation  LParenLoc,
ArrayRef< ParmVarDecl * >  LocalParameters,
SourceLocation  RParenLoc,
ArrayRef< concepts::Requirement * >  Requirements,
SourceLocation  ClosingBraceLoc 
)

◆ ActOnReturnStmt()

StmtResult Sema::ActOnReturnStmt ( SourceLocation  ReturnLoc,
Expr RetValExp,
Scope CurScope 
)

◆ ActOnSEHExceptBlock()

StmtResult Sema::ActOnSEHExceptBlock ( SourceLocation  Loc,
Expr FilterExpr,
Stmt Block 
)

◆ ActOnSEHLeaveStmt()

StmtResult Sema::ActOnSEHLeaveStmt ( SourceLocation  Loc,
Scope CurScope 
)

◆ ActOnSEHTryBlock()

StmtResult Sema::ActOnSEHTryBlock ( bool  IsCXXTry,
SourceLocation  TryLoc,
Stmt TryBlock,
Stmt Handler 
)

◆ ActOnSimpleRequirement()

concepts::Requirement * Sema::ActOnSimpleRequirement ( Expr E)

Definition at line 9111 of file SemaExprCXX.cpp.

References BuildExprRequirement().

◆ 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
OpLocThe location of the "sizeof" keyword.
NameThe name of the parameter pack whose size will be determined.
NameLocThe source location of the name of the parameter pack.
RParenLocThe location of the closing parentheses.

Definition at line 1024 of file SemaTemplateVariadic.cpp.

References clang::LookupResult::Ambiguous, Context, CorrectTypo(), clang::SizeOfPackExpr::Create(), CTK_ErrorRecovery, Diag(), DiagnoseAmbiguousLookup(), diagnoseTypo(), clang::ExprError(), clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::LookupResult::getFoundDecl(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getResultKind(), clang::Decl::isParameterPack(), LookupName(), LookupOrdinaryName, MarkAnyDeclReferenced(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, and PDiag().

◆ ActOnSkippedFunctionBody()

Decl * Sema::ActOnSkippedFunctionBody ( Decl Decl)

◆ ActOnSourceLocExpr()

ExprResult Sema::ActOnSourceLocExpr ( SourceLocIdentKind  Kind,
SourceLocation  BuiltinLoc,
SourceLocation  RPLoc 
)

◆ ActOnStartCategoryImplementation()

ObjCCategoryImplDecl * Sema::ActOnStartCategoryImplementation ( SourceLocation  AtCatImplLoc,
IdentifierInfo ClassName,
SourceLocation  ClassLoc,
IdentifierInfo CatName,
SourceLocation  CatLoc,
const ParsedAttributesView AttrList 
)

◆ ActOnStartCategoryInterface()

ObjCCategoryDecl * 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 
)

◆ ActOnStartClassImplementation()

ObjCImplementationDecl * Sema::ActOnStartClassImplementation ( SourceLocation  AtClassImplLoc,
IdentifierInfo ClassName,
SourceLocation  ClassLoc,
IdentifierInfo SuperClassname,
SourceLocation  SuperClassLoc,
const ParsedAttributesView AttrList 
)

◆ ActOnStartClassInterface()

ObjCInterfaceDecl * 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,
SkipBodyInfo SkipBody 
)

◆ 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 4185 of file SemaDeclCXX.cpp.

References PushFunctionScope().

Referenced by InstantiateInClassInitializer().

◆ ActOnStartCXXMemberDeclarations()

void Sema::ActOnStartCXXMemberDeclarations ( Scope S,
Decl TagDecl,
SourceLocation  FinalLoc,
bool  IsFinalSpelledSealed,
bool  IsAbstract,
SourceLocation  LBraceLoc 
)

◆ ActOnStartCXXMemberReference()

ExprResult Sema::ActOnStartCXXMemberReference ( Scope S,
Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
ParsedType ObjectType,
bool MayBePseudoDestructor 
)

◆ 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 10788 of file SemaDeclCXX.cpp.

◆ ActOnStartDelayedMemberDeclarations()

void Sema::ActOnStartDelayedMemberDeclarations ( Scope S,
Decl Record 
)

◆ ActOnStartExportDecl()

Decl * Sema::ActOnStartExportDecl ( Scope S,
SourceLocation  ExportLoc,
SourceLocation  LBraceLoc 
)

◆ ActOnStartFunctionDeclarationDeclarator()

void Sema::ActOnStartFunctionDeclarationDeclarator ( Declarator D,
unsigned  TemplateParameterDepth 
)

◆ ActOnStartHLSLBuffer()

Decl * Sema::ActOnStartHLSLBuffer ( Scope BufferScope,
bool  CBuffer,
SourceLocation  KwLoc,
IdentifierInfo Ident,
SourceLocation  IdentLoc,
SourceLocation  LBrace 
)

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

C++ [module.unit]p7.2.3

  • Otherwise, if the declaration
    • ...
    • ...
    • appears within a linkage-specification, it is attached to the global module.

If the declaration is already in global module fragment, we don't need to attach it again.

Definition at line 16831 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::C, Context, clang::LinkageSpecDecl::Create(), CurContext, clang::CXX, Diag(), clang::Expr::getExprLoc(), getLangOpts(), clang::Stmt::getSourceRange(), clang::StringLiteral::getString(), clang::StringLiteral::isUnevaluated(), clang::SourceLocation::isValid(), PushDeclContext(), and clang::Decl::setLocalOwningModule().

◆ ActOnStartNamespaceDef()

Decl * Sema::ActOnStartNamespaceDef ( Scope S,
SourceLocation  InlineLoc,
SourceLocation  NamespaceLoc,
SourceLocation  IdentLoc,
IdentifierInfo Ident,
SourceLocation  LBrace,
const ParsedAttributesView AttrList,
UsingDirectiveDecl *&  UsingDecl,
bool  IsNested 
)

◆ ActOnStartOfCompoundStmt()

void Sema::ActOnStartOfCompoundStmt ( bool  IsStmtExpr)

Definition at line 391 of file SemaStmt.cpp.

References PushCompoundScope().

◆ ActOnStartOfFunctionDef() [1/2]

Decl * Sema::ActOnStartOfFunctionDef ( Scope S,
Decl D,
SkipBodyInfo SkipBody = nullptr,
FnBodyKind  BodyKind = FnBodyKind::Other 
)

Definition at line 15701 of file SemaDecl.cpp.

References AbstractReturnType, ActOnDocumentableDecl(), clang::ASTContext::BuiltinInfo, CheckForFunctionRedefinition(), CheckParmsForFunctionDef(), CheckShadow(), Context, currentModuleIsHeaderUnit(), clang::DeclContext::decls(), Default, Delete, Diag(), clang::Decl::dropAttr(), ExprEvalContexts, clang::External, clang::Type::getAs(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), getCurLexicalContext(), clang::TargetInfo::getCXXABI(), clang::NamedDecl::getFormalLinkage(), getLangOpts(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::ASTContext::getTargetInfo(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::TargetInfo::hasFeature(), ImmediateFunctionContext, InstantiateDefaultCtorDefaultArgs(), inTemplateInstantiation(), clang::FunctionDecl::isConsteval(), clang::Type::isDependentType(), clang::FunctionTemplateSpecializationInfo::isExplicitInstantiationOrSpecialization(), clang::isGenericLambdaCallOperatorSpecialization(), clang::FunctionDecl::isImmediateEscalating(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), clang::isLambdaCallOperator(), clang::FunctionDecl::isLateTemplateParsed(), clang::TargetCXXABI::isMicrosoft(), clang::Builtin::Context::isPredefinedLibFunction(), clang::Builtin::Context::isPredefinedRuntimeFunction(), clang::Decl::isTemplated(), clang::FunctionDecl::isTemplateInstantiation(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::FunctionDecl::isThisDeclarationInstantiatedFromAFriendDefinition(), clang::Type::isVoidType(), clang::FunctionDecl::parameters(), PushDeclContext(), PushExpressionEvaluationContext(), PushFunctionScope(), PushOnScopeChains(), RebuildLambdaScopeInfo(), RequireCompleteType(), RequireNonAbstractType(), ResolveExceptionSpec(), clang::Decl::setInvalidDecl(), clang::FunctionDecl::setWillHaveBody(), clang::Sema::SkipBodyInfo::ShouldSkip, clang::TSK_ExplicitSpecialization, and clang::FunctionDecl::willHaveBody().

◆ ActOnStartOfFunctionDef() [2/2]

Decl * Sema::ActOnStartOfFunctionDef ( Scope S,
Declarator D,
MultiTemplateParamsArg  TemplateParamLists,
SkipBodyInfo SkipBody = nullptr,
FnBodyKind  BodyKind = FnBodyKind::Other 
)

◆ ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope()

void Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope ( Scope S,
Declarator D,
MultiTemplateParamsArg  TemplateParameterLists,
SmallVectorImpl< FunctionDecl * > &  Bases 
)

◆ ActOnStartOfLambdaDefinition()

void Sema::ActOnStartOfLambdaDefinition ( LambdaIntroducer Intro,
Declarator ParamInfo,
const DeclSpec DS 
)

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 1330 of file SemaLambda.cpp.

References ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(), clang::Decl::addAttr(), AddRangeBasedOptnone(), clang::TemplateParameterList::asArray(), clang::C, clang::sema::LambdaScopeInfo::CallOperator, clang::LambdaIntroducer::Captures, clang::sema::CapturingScopeInfo::Captures, CheckCXXDefaultArguments(), CheckShadow(), clang::Class, CompleteLambdaCallOperator(), clang::CUDA, CUDASetLambdaAttrs(), Diag(), clang::sema::LambdaScopeInfo::ExplicitParams, ExprEvalContexts, clang::FTIHasSingleVoidParameter(), clang::SourceRange::getBegin(), clang::DeclSpec::getConstexprSpecifier(), getCurrentLambdaScopeUnsafe(), getCurScope(), clang::Declarator::getDeclSpec(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::SourceRange::getEnd(), clang::Declarator::getFunctionTypeInfo(), getGenericLambdaTemplateParameterList(), getImplicitCodeSegOrSectionAttrForFunction(), getLambdaType(), getLangOpts(), clang::Declarator::getNumTypeObjects(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::Declarator::getTrailingRequiresClause(), clang::Declarator::getTypeObject(), handleLambdaNumbering(), ImmediateFunctionContext, clang::FunctionDecl::isConsteval(), clang::Declarator::isFunctionDeclarator(), clang::FunctionDecl::isImmediateEscalating(), clang::ValueDecl::isInitCapture(), clang::Decl::isTemplated(), clang::sema::LambdaScopeInfo::Lambda, LangOpts, NoteTemplateParameterLocation(), P, PotentiallyEvaluated, ProcessDeclAttributes(), PushExpressionEvaluationContext(), PushOnScopeChains(), clang::LambdaIntroducer::Range, clang::SC_None, clang::SC_Static, clang::DeclSpec::SCS_static, and clang::FunctionDecl::setConstexprKind().

◆ ActOnStartOfObjCMethodDef()

void Sema::ActOnStartOfObjCMethodDef ( Scope S,
Decl D 
)

ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared, in the method definition's AST.

Definition at line 362 of file SemaDeclObjC.cpp.

References CheckParmsForFunctionDef(), Context, clang::ObjCMethodDecl::createImplicitParams(), Diag(), DiagnoseObjCImplementedDeprecations(), ExprEvalContexts, clang::LangOptionsBase::GCOnly, clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), 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::LangOptionsBase::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,
SourceLocation  LParenLoc,
Stmt InitStmt,
ConditionResult  Cond,
SourceLocation  RParenLoc 
)

◆ 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 1036 of file Sema.cpp.

References clang::LangOptionsBase::CMK_HeaderUnit, and getLangOpts().

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

◆ ActOnStartOpenACCDeclDirective()

bool Sema::ActOnStartOpenACCDeclDirective ( OpenACCDirectiveKind  K,
SourceLocation  StartLoc 
)

Called after the directive, including its clauses, have been parsed and parsing has consumed the 'annot_pragma_openacc_end' token.

This DOES happen before any associated declarations or statements have been parsed. This function is only called when we are parsing a 'Decl' context.

Definition at line 117 of file SemaOpenACC.cpp.

◆ ActOnStartOpenACCStmtDirective()

bool Sema::ActOnStartOpenACCStmtDirective ( OpenACCDirectiveKind  K,
SourceLocation  StartLoc 
)

Called after the directive, including its clauses, have been parsed and parsing has consumed the 'annot_pragma_openacc_end' token.

This DOES happen before any associated declarations or statements have been parsed. This function is only called when we are parsing a 'statement' context.

Definition at line 71 of file SemaOpenACC.cpp.

◆ ActOnStartOpenMPDeclareTargetContext()

bool Sema::ActOnStartOpenMPDeclareTargetContext ( DeclareTargetContextInfo DTCI)

◆ ActOnStartProtocolInterface()

ObjCProtocolDecl * Sema::ActOnStartProtocolInterface ( SourceLocation  AtProtoInterfaceLoc,
IdentifierInfo ProtocolName,
SourceLocation  ProtocolLoc,
Decl *const *  ProtoRefNames,
unsigned  NumProtoRefs,
const SourceLocation ProtoLocs,
SourceLocation  EndProtoLoc,
const ParsedAttributesView AttrList,
SkipBodyInfo SkipBody 
)

◆ ActOnStartRequiresExpr()

RequiresExprBodyDecl * Sema::ActOnStartRequiresExpr ( SourceLocation  RequiresKWLoc,
ArrayRef< ParmVarDecl * >  LocalParameters,
Scope BodyScope 
)

◆ ActOnStartSEHFinallyBlock()

void Sema::ActOnStartSEHFinallyBlock ( )

Definition at line 4721 of file SemaStmt.cpp.

References CurrentSEHFinally.

◆ ActOnStartStmtExpr()

void Sema::ActOnStartStmtExpr ( )

◆ ActOnStartTopLevelStmtDecl()

TopLevelStmtDecl * Sema::ActOnStartTopLevelStmtDecl ( Scope S)

◆ ActOnStartTrailingRequiresClause()

void Sema::ActOnStartTrailingRequiresClause ( Scope S,
Declarator D 
)

◆ ActOnStaticAssertDeclaration()

Decl * Sema::ActOnStaticAssertDeclaration ( SourceLocation  StaticAssertLoc,
Expr AssertExpr,
Expr AssertMessageExpr,
SourceLocation  RParenLoc 
)

◆ ActOnStmtExpr()

ExprResult Sema::ActOnStmtExpr ( Scope S,
SourceLocation  LPLoc,
Stmt SubStmt,
SourceLocation  RPLoc 
)

Definition at line 16650 of file SemaExpr.cpp.

References BuildStmtExpr(), and getTemplateDepth().

◆ ActOnStmtExprError()

void Sema::ActOnStmtExprError ( )

◆ ActOnStmtExprResult()

ExprResult Sema::ActOnStmtExprResult ( ExprResult  E)

◆ 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 2051 of file SemaExpr.cpp.

References clang::TemplateArgumentListInfo::addArgument(), clang::Lexer::AdvanceToTokenCharacter(), BuildLiteralOperatorCall(), clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::Char8Ty, clang::ASTContext::CharTy, Context, clang::CPlusPlus, clang::CPlusPlus20, clang::IntegerLiteral::Create(), clang::StringLiteral::Create(), clang::FixItHint::CreateRemoval(), clang::ASTContext::DeclarationNames, Diag(), ExpandFunctionLocalPredefinedMacros(), clang::ExprError(), clang::IdentifierTable::get(), clang::ASTContext::getArrayDecayedType(), clang::CharSourceRange::getCharRange(), clang::StringLiteral::getCodeUnit(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::ASTContext::getIntWidth(), getLangOpts(), clang::StringLiteral::getLength(), clang::ASTContext::getSizeType(), getSourceManager(), clang::ASTContext::getStringLiteralArrayType(), clang::ASTContext::getTrivialTypeSourceInfo(), getUDSuffixLoc(), clang::ASTContext::getWideCharType(), clang::ASTContext::Idents, clang::SourceLocation::isInvalid(), clang::Type::isUnsignedIntegerType(), LOLR_Cooked, LOLR_Error, LOLR_ErrorNoDiagnostic, LOLR_Raw, LOLR_StringTemplatePack, LOLR_Template, LookupLiteralOperator(), LookupOrdinaryName, clang::Ordinary, PDiag(), PP, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::ASTContext::UnsignedCharTy, clang::UTF16, clang::UTF32, clang::UTF8, and clang::Wide.

◆ ActOnSuperClassOfClassInterface()

void Sema::ActOnSuperClassOfClassInterface ( Scope S,
SourceLocation  AtInterfaceLoc,
ObjCInterfaceDecl IDecl,
IdentifierInfo ClassName,
SourceLocation  ClassLoc,
IdentifierInfo SuperName,
SourceLocation  SuperLoc,
ArrayRef< ParsedType SuperTypeArgs,
SourceRange  SuperTypeArgsRange 
)

◆ ActOnSuperMessage()

ExprResult Sema::ActOnSuperMessage ( Scope S,
SourceLocation  SuperLoc,
Selector  Sel,
SourceLocation  LBracLoc,
ArrayRef< SourceLocation SelectorLocs,
SourceLocation  RBracLoc,
MultiExprArg  Args 
)

◆ ActOnSuperScopeSpecifier()

bool Sema::ActOnSuperScopeSpecifier ( SourceLocation  SuperLoc,
SourceLocation  ColonColonLoc,
CXXScopeSpec SS 
)

The parser has parsed a '__super' nested-name-specifier.

Parameters
SuperLocThe location of the '__super' keyword.
ColonColonLocThe location of the '::'.
SSThe 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 311 of file SemaCXXScopeSpec.cpp.

References Context, Diag(), getCurLambda(), getCurScope(), clang::NamedDecl::getName(), clang::CXXRecordDecl::getNumBases(), clang::DeclContext::getParent(), and clang::CXXScopeSpec::MakeSuper().

◆ ActOnSYCLUniqueStableNameExpr()

ExprResult Sema::ActOnSYCLUniqueStableNameExpr ( SourceLocation  OpLoc,
SourceLocation  LParen,
SourceLocation  RParen,
ParsedType  ParsedTy 
)

◆ ActOnTag()

DeclResult 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,
OffsetOfKind  OOK,
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
IsTypeSpecifiertrue if this is a type-specifier (or trailing-type-specifier) other than one in an alias-declaration.
SkipBodyIf 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 17286 of file SemaDecl.cpp.

References AddAlignmentAttributesForRecord(), clang::DeclContext::addDecl(), AddMsStructLayoutForRecord(), AddPragmaAttributes(), AddPushedVisibilityAttribute(), clang::AS_none, CheckClassTemplate(), CheckEnumRedeclaration(), CheckEnumUnderlyingType(), CheckMemberSpecialization(), CheckRedeclarationInModule(), clang::Sema::SkipBodyInfo::CheckSameAsPrevious, CheckTemplateDeclScope(), clang::RecordDecl::completeDefinition(), CompleteMemberSpecialization(), computeDeclContext(), Context, clang::CPlusPlus, clang::EnumDecl::Create(), clang::CXXRecordDecl::Create(), clang::RecordDecl::Create(), createFriendTagNNSFixIt(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), CurContext, Diag(), DiagnoseClassNameShadow(), diagnoseQualifiedDeclaration(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), clang::LookupResult::Filter::done(), clang::ParsedAttributesView::empty(), clang::DeclContext::Encloses(), clang::Enum, clang::DeclContext::Equals(), clang::LookupResult::Filter::erase(), clang::Decl::FOK_Undeclared, forRedeclarationInCurContext(), clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getAccess(), clang::Type::getAs(), clang::Type::getAsTagDecl(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::CXXScopeSpec::getBeginLoc(), getCurrentModule(), clang::Decl::getDeclContext(), clang::DeclContext::getDeclKind(), clang::NamedDecl::getDeclName(), getDefinition(), clang::DeclContext::getEnclosingNamespaceContext(), clang::NamedDecl::getIdentifier(), clang::EnumDecl::getIntegerType(), getLangOpts(), clang::Decl::getLocation(), getNonFieldDeclScope(), getNonTagTypeDeclKind(), clang::Decl::getOwningModule(), clang::DeclContext::getParent(), clang::ASTContext::getPromotedIntegerType(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), getScopeForDeclContext(), clang::TagDecl::getSourceRange(), getStdAlignValT(), getStdBadAlloc(), getStdNamespace(), clang::ASTContext::getTagDeclType(), getTagInjectionContext(), getTagInjectionScope(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TypeWithKeyword::getTagTypeKindName(), clang::ASTContext::getTargetInfo(), clang::TemplateParameterList::getTemplateLoc(), clang::TargetInfo::getTriple(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::CanQual< T >::getTypePtr(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::Filter::hasNext(), hasVisibleDefinition(), inferGslOwnerPointerAttribute(), clang::ASTContext::IntTy, clang::Invalid, isAcceptableTagRedeclaration(), isAcceptableTagRedeclContext(), clang::TagDecl::isBeingDefined(), clang::EnumDecl::isComplete(), clang::NamedDecl::isCXXClassMember(), isDeclInScope(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), clang::CXXScopeSpec::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::isLocalClass(), clang::CXXScopeSpec::isNotEmpty(), clang::ASTContext::isPromotableIntegerType(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::DeclContext::isTranslationUnit(), clang::ActionResult< PtrTy, Compress >::isUnset(), clang::SourceLocation::isValid(), LookupName(), LookupQualifiedName(), LookupTagName, clang::DeclContext::makeDeclVisibleInContext(), makeMergedDefinitionVisible(), MatchTemplateParametersToScopeSpecifier(), mergeDeclAttributes(), clang::Sema::SkipBodyInfo::New, clang::LookupResult::Filter::next(), notePreviousDefinition(), NotForRedeclaration, OOK_Macro, OOK_Outside, clang::Sema::SkipBodyInfo::Previous, Previous, ProcessDeclAttributeList(), PushOnScopeChains(), RequireCompleteDeclContext(), clang::Result, clang::Decl::setAccess(), clang::ASTContext::setFILEDecl(), clang::EnumDecl::setIntegerType(), clang::EnumDecl::setIntegerTypeSourceInfo(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), SetMemberAccessSpecifier(), clang::NamedDecl::setModulePrivate(), clang::Decl::setObjectOfFriendDecl(), clang::EnumDecl::setPromotionType(), clang::TagDecl::setQualifierInfo(), clang::TagDecl::setTemplateParameterListsInfo(), clang::Sema::SkipBodyInfo::ShouldSkip, clang::TemplateParameterList::size(), clang::TagDecl::startDefinition(), StdAlignValT, StdBadAlloc, StdNamespace, clang::TSK_ExplicitSpecialization, TUK_Declaration, TUK_Definition, TUK_Friend, TUK_Reference, and UPPC_FixedUnderlyingType.

Referenced by ActOnExplicitInstantiation(), and ActOnTemplatedFriendTag().

◆ 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 18428 of file SemaDecl.cpp.

References AdjustDeclIfTemplate(), clang::RecordDecl::completeDefinition(), clang::TagDecl::isBeingDefined(), PopDeclContext(), and clang::Decl::setInvalidDecl().

◆ ActOnTagFinishDefinition()

void Sema::ActOnTagFinishDefinition ( Scope S,
Decl TagDecl,
SourceRange  BraceRange 
)

◆ ActOnTagFinishSkippedDefinition()

void Sema::ActOnTagFinishSkippedDefinition ( SkippedDefinitionContext  Context)

Definition at line 1352 of file SemaDecl.cpp.

References Context, and CurContext.

◆ 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 18282 of file SemaDecl.cpp.

References ActOnDocumentableDecl(), AddPushedVisibilityAttribute(), AdjustDeclIfTemplate(), and PushDeclContext().

◆ ActOnTagStartSkippedDefinition()

Sema::SkippedDefinitionContext Sema::ActOnTagStartSkippedDefinition ( Scope S,
Decl TD 
)

Invoked when we enter a tag definition that we're skipping.

Definition at line 1338 of file SemaDecl.cpp.

References CurContext, clang::DeclContext::getLookupParent(), and clang::Result.

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

Definition at line 4667 of file SemaTemplate.cpp.

References clang::TemplateArgumentListInfo::arguments(), CheckTemplateIdType(), Context, CreateParsedType(), clang::FixItHint::CreateReplacement(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsTemplateDecl(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::ASTContext::getElaboratedType(), clang::NamedDecl::getIdentifier(), clang::TypeWithKeyword::getKeywordForTagTypeKind(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::TemplateSpecializationTypeLoc::getNumArgs(), clang::DependentTemplateSpecializationTypeLoc::getNumArgs(), clang::CXXScopeSpec::getScopeRep(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), Id, isAcceptableTagRedeclaration(), clang::CXXScopeSpec::isInvalid(), NTK_TypeAliasTemplate, clang::TypeLocBuilder::push(), clang::Result, clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc(), translateTemplateArguments(), and TUK_Definition.

◆ ActOnTemplateDeclarator()

Decl * Sema::ActOnTemplateDeclarator ( Scope S,
MultiTemplateParamsArg  TemplateParameterLists,
Declarator D 
)

Definition at line 9528 of file SemaTemplate.cpp.

References ActOnDocumentableDecl(), and HandleDeclarator().

◆ ActOnTemplatedFriendTag()

DeclResult Sema::ActOnTemplatedFriendTag ( Scope S,
SourceLocation  FriendLoc,
unsigned  TagSpec,
SourceLocation  TagLoc,
CXXScopeSpec SS,
IdentifierInfo Name,
SourceLocation  NameLoc,
const ParsedAttributesView Attr,
MultiTemplateParamsArg  TempParamLists 
)

◆ 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,
ImplicitTypenameContext  AllowImplicitTypename = ImplicitTypenameContext::No 
)

Definition at line 4557 of file SemaTemplate.cpp.

References ActOnTypenameType(), clang::TemplateArgumentListInfo::arguments(), CheckTemplateIdType(), computeDeclContext(), Context, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), CreateParsedType(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsAssumedTemplateName(), clang::TemplateName::getAsDependentTemplateName(), clang::CXXScopeSpec::getBeginLoc(), clang::ASTContext::getDependentTemplateSpecializationType(), getElaboratedType(), getLangOpts(), clang::IdentifierInfo::getName(), clang::TemplateSpecializationTypeLoc::getNumArgs(), clang::DependentTemplateSpecializationTypeLoc::getNumArgs(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), isDependentScopeSpecifier(), clang::ElaboratedTypeLoc::isEmpty(), clang::SourceLocation::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::None, clang::TypeLocBuilder::push(), resolveAssumedTemplateNameAsType(), clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc(), translateTemplateArguments(), and clang::Yes.

Referenced by ActOnPseudoDestructorExpr().

◆ ActOnTemplateName()

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

Form a template name from a name that is syntactically required to name a template, either due to use of the 'template' keyword or because a name in this syntactic context is assumed to name a template (C++ [temp.names]p2-4).

This action forms a template name given the name of the template and its optional scope specifier. This is used when the 'template' keyword is used or when the parsing context unambiguously treats a following '<' as introducing a template argument list. Note that this may produce a non-dependent template name if we can perform the lookup now and identify the named template.

For example, given "x.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 5498 of file SemaTemplate.cpp.

References computeDeclContext(), Context, clang::CPlusPlus11, clang::FixItHint::CreateRemoval(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::ASTContext::getDependentTemplateName(), getLangOpts(), clang::DeclarationNameInfo::getName(), GetNameFromUnqualifiedId(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), GetTypeFromParser(), clang::IK_Identifier, clang::IK_LiteralOperatorId, clang::IK_OperatorFunctionId, clang::LookupResult::isAmbiguous(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), isTemplateName(), clang::SourceLocation::isValid(), LookupOrdinaryName, LookupTemplateName(), clang::OpaquePtr< TemplateName >::make(), clang::Result, TemplateNameIsRequired, clang::TNK_Dependent_template_name, clang::TNK_Function_template, and clang::TNK_Non_template.

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

◆ 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 1809 of file SemaTemplate.cpp.

References Context, clang::TemplateParameterList::Create(), Diag(), clang::SourceLocation::isValid(), P, and warnOnReservedIdentifier().

◆ ActOnTemplateTemplateParameter()

NamedDecl * Sema::ActOnTemplateTemplateParameter ( Scope S,
SourceLocation  TmpLoc,
TemplateParameterList Params,
SourceLocation  EllipsisLoc,
IdentifierInfo Name,
SourceLocation  NameLoc,
unsigned  Depth,
unsigned  Position,
SourceLocation  EqualLoc,
ParsedTemplateArgument  Default 
)

◆ 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 984 of file SemaTemplate.cpp.

References clang::CXXScopeSpec::Adopt(), Context, clang::CPlusPlus17, clang::OpaquePtr< PtrTy >::get(), clang::TypeLoc::getAs(), clang::QualType::getAsOpaquePtr(), clang::TypeLoc::getBeginLoc(), getLangOpts(), clang::ASTContext::getQualifiedTemplateName(), clang::CXXScopeSpec::getScopeRep(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::OpaquePtr< TemplateName >::make(), clang::Result, and clang::ParsedTemplateArgument::Type.

◆ ActOnTranslationUnitScope()

void Sema::ActOnTranslationUnitScope ( Scope S)

Scope actions.

Definition at line 127 of file Sema.cpp.

References Context, clang::ASTContext::getTranslationUnitDecl(), PushDeclContext(), and TUScope.

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

◆ ActOnTypeConstraint()

bool Sema::ActOnTypeConstraint ( const CXXScopeSpec SS,
TemplateIdAnnotation TypeConstraint,
TemplateTypeParmDecl ConstrainedParameter,
SourceLocation  EllipsisLoc 
)

Definition at line 1140 of file SemaTemplate.cpp.

References BuildTypeConstraint().

◆ ActOnTypedefDeclarator()

NamedDecl * Sema::ActOnTypedefDeclarator ( Scope S,
Declarator D,
DeclContext DC,
TypeSourceInfo TInfo,
LookupResult Previous 
)

◆ 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 1119 of file SemaDeclObjC.cpp.

References clang::Type::getAs(), clang::Type::isObjCObjectType(), LookupOrdinaryName, LookupSingleName(), and TUScope.

◆ ActOnTypedefNameDecl()

NamedDecl * Sema::ActOnTypedefNameDecl ( Scope S,
DeclContext DC,
TypedefNameDecl D,
LookupResult Previous,
bool Redeclaration 
)

◆ ActOnTypeName()

TypeResult Sema::ActOnTypeName ( Declarator D)

◆ ActOnTypenameType() [1/2]

TypeResult Sema::ActOnTypenameType ( Scope S,
SourceLocation  TypenameLoc,
const CXXScopeSpec SS,
const IdentifierInfo II,
SourceLocation  IdLoc,
ImplicitTypenameContext  IsImplicitTypename = ImplicitTypenameContext::No 
)

Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".

Parameters
SThe scope in which this typename type occurs.
TypenameLocthe location of the 'typename' keyword
SSthe nested-name-specifier following the typename (e.g., 'T::').
IIthe identifier we're retrieving (e.g., 'type' in the example).
IdLocthe location of the identifier.
IsImplicitTypenamecontext where T::type refers to a type.

Definition at line 11396 of file SemaTemplate.cpp.

References CheckTypenameType(), Context, clang::CPlusPlus11, CreateParsedType(), clang::FixItHint::CreateRemoval(), Diag(), getLangOpts(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::None, clang::Typename, and clang::Yes.

Referenced by ActOnTemplateIdType(), ActOnTypeRequirement(), DiagnoseUnknownTypeName(), getTypeName(), 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
SThe scope in which this typename type occurs.
TypenameLocthe location of the 'typename' keyword
SSthe nested-name-specifier following the typename (e.g., 'T::').
TemplateLocthe location of the 'template' keyword, if any.
TemplateNameThe template name.
TemplateIIThe identifier used to name the template.
TemplateIILocThe location of the template name.
LAngleLocThe location of the opening angle bracket ('<').
TemplateArgsThe template arguments.
RAngleLocThe location of the closing angle bracket ('>').

Definition at line 11426 of file SemaTemplate.cpp.

References clang::TemplateArgumentListInfo::arguments(), CheckTemplateIdType(), computeDeclContext(), Context, clang::CPlusPlus11, CreateParsedType(), clang::FixItHint::CreateRemoval(), Diag(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsDependentTemplateName(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::ASTContext::getElaboratedType(), getLangOpts(), clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::getWithLocInContext(), clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::TemplateArgumentListInfo::size(), translateTemplateArguments(), and clang::Typename.

◆ 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 1039 of file SemaTemplate.cpp.

References clang::IdentifierResolver::AddDecl(), clang::AS_public, CheckTemplateArgument(), Context, clang::TemplateTypeParmDecl::Create(), Diag(), DiagnoseUnexpandedParameterPack(), getEnclosingLambda(), clang::ASTContext::getTranslationUnitDecl(), GetTypeFromParser(), IdResolver, clang::TemplateTypeParmDecl::isParameterPack(), clang::SourceLocation::isValid(), maybeDiagnoseTemplateParameterShadow(), clang::Decl::setAccess(), clang::TemplateTypeParmDecl::setDefaultArgument(), clang::Decl::setInvalidDecl(), clang::Typename, and UPPC_DefaultArgument.

◆ ActOnTypeRequirement()

concepts::Requirement * Sema::ActOnTypeRequirement ( SourceLocation  TypenameKWLoc,
CXXScopeSpec SS,
SourceLocation  NameLoc,
IdentifierInfo TypeName,
TemplateIdAnnotation TemplateId 
)

◆ 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 5792 of file SemaExprCXX.cpp.

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

◆ 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 4914 of file SemaExpr.cpp.

References CreateUnaryExprOrTypeTraitExpr(), clang::ExprError(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), GetTypeFromParser(), and clang::Result.

Referenced by BuildCXXForRangeStmt().

◆ ActOnUnaryOp()

ExprResult Sema::ActOnUnaryOp ( Scope S,
SourceLocation  OpLoc,
tok::TokenKind  Op,
Expr Input,
bool  IsAfterAmp = false 
)

Definition at line 16616 of file SemaExpr.cpp.

References BuildUnaryOp(), and ConvertTokenKindToUnaryOpcode().

Referenced by BuildCXXForRangeStmt().

◆ 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 4504 of file SemaTemplate.cpp.

References clang::OpaquePtr< PtrTy >::get(), clang::OpaquePtr< TemplateName >::make(), resolveAssumedTemplateNameAsType(), clang::TNK_Type_template, and clang::TNK_Undeclared_template.

◆ ActOnUnevaluatedStringLiteral()

ExprResult Sema::ActOnUnevaluatedStringLiteral ( ArrayRef< Token StringToks)

◆ ActOnUninitializedDecl()

void Sema::ActOnUninitializedDecl ( Decl dcl)

Definition at line 14057 of file SemaDecl.cpp.

References AbstractVariableType, clang::TargetInfo::allowDebugInfoForExternalRef(), clang::VarDecl::CallInit, CheckCompleteVariableDeclaration(), checkNonTrivialCUnion(), Context, clang::CPlusPlus, clang::CPlusPlus17, clang::InitializationKind::CreateDefault(), CreateRecoveryExpr(), clang::VarDecl::DeclarationOnly, DeduceVariableDeclarationType(), clang::VarDecl::Definition, Diag(), ExternalDeclarations, clang::Type::getAs(), clang::ASTContext::getAsIncompleteArrayType(), clang::ASTContext::getBaseElementType(), clang::TargetInfo::getCXXABI(), getLangOpts(), clang::ASTContext::getTargetInfo(), clang::Decl::hasAttr(), clang::Init, clang::InitializedEntity::InitializeVariable(), clang::Type::isDependentType(), clang::Type::isIncompleteArrayType(), clang::TargetCXXABI::isMicrosoft(), clang::Type::isReferenceType(), clang::Type::isUndeducedType(), MaybeCreateExprWithCleanups(), NTCUC_DefaultInitializedObject, NTCUK_Init, clang::OpenCL, clang::opencl_constant, clang::opencl_local, clang::InitializationSequence::Perform(), clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::push_back(), RequireCompleteSizedType(), RequireCompleteType(), RequireNonAbstractType(), clang::SC_Extern, clang::SC_PrivateExtern, clang::SC_Static, setFunctionHasBranchProtectedScope(), clang::VarDecl::TentativeDefinition, and TentativeDefinitions.

Referenced by actOnOMPReductionKindClause(), ActOnOpenMPPrivateClause(), BuildAnonymousStructOrUnion(), buildCoroutinePromise(), EndOpenMPDSABlock(), and InstantiateVariableInitializer().

◆ ActOnUsingDeclaration()

Decl * Sema::ActOnUsingDeclaration ( Scope CurScope,
AccessSpecifier  AS,
SourceLocation  UsingLoc,
SourceLocation  TypenameLoc,
CXXScopeSpec SS,
UnqualifiedId Name,
SourceLocation  EllipsisLoc,
const ParsedAttributesView AttrList 
)

◆ ActOnUsingDirective()

Decl * Sema::ActOnUsingDirective ( Scope CurScope,
SourceLocation  UsingLoc,
SourceLocation  NamespcLoc,
CXXScopeSpec SS,
SourceLocation  IdentLoc,
IdentifierInfo NamespcName,
const ParsedAttributesView AttrList 
)

◆ ActOnUsingEnumDeclaration()

Decl * Sema::ActOnUsingEnumDeclaration ( Scope CurScope,
AccessSpecifier  AS,
SourceLocation  UsingLoc,
SourceLocation  EnumLoc,
SourceLocation  IdentLoc,
IdentifierInfo II,
CXXScopeSpec SS = nullptr 
)

◆ ActOnVAArg()

ExprResult Sema::ActOnVAArg ( SourceLocation  BuiltinLoc,
Expr E,
ParsedType  Ty,
SourceLocation  RPLoc 
)

Definition at line 17301 of file SemaExpr.cpp.

References BuildVAArgExpr(), and GetTypeFromParser().

◆ ActOnVariableDeclarator()

NamedDecl * Sema::ActOnVariableDeclarator ( Scope S,
Declarator D,
DeclContext DC,
TypeSourceInfo TInfo,
LookupResult Previous,
MultiTemplateParamsArg  TemplateParamLists,
bool AddToScope,
ArrayRef< BindingDecl * >  Bindings = std::nullopt 
)

Definition at line 7549 of file SemaDecl.cpp.

References ActOnDocumentableDecl(), ActOnVarTemplateSpecialization(), clang::Decl::addAttr(), adjustContextForLocalExternDecl(), checkDLLAttributeRedeclaration(), CheckMemberSpecialization(), checkNonTrivialCUnion(), CheckShadow(), CheckTemplateDeclScope(), CheckTemplateParameterList(), CheckVariableDeclaration(), CompleteMemberSpecialization(), computeDeclContext(), clang::Consteval, clang::Constexpr, clang::Constinit, Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus14, clang::CPlusPlus17, clang::VarTemplateDecl::Create(), clang::VarDecl::Create(), clang::DecompositionDecl::Create(), clang::FixItHint::CreateRemoval(), clang::CUDA, CurContext, clang::DeclAttrsMatchCUDAMode(), deduceOpenCLAddressSpace(), Diag(), DiagnoseFunctionSpecifiers(), DiagPlaceholderVariableDefinition(), emitReadOnlyPlacementAttrWarning(), clang::DeclContext::Equals(), ExtnameUndeclaredIdentifiers, FilterLookupForScope(), clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getAddrSpaceQualType(), clang::Type::getAs(), clang::Declarator::getAsmLabel(), clang::Decl::getAttr(), clang::DeclSpec::getBeginLoc(), clang::Declarator::getBeginLoc(), clang::DeclSpec::getConstexprSpecifier(), clang::DeclSpec::getConstexprSpecLoc(), clang::Type::getContainedDeducedType(), getCurFunctionDecl(), getCurrentMangleNumberContext(), clang::TargetInfo::getCXXABI(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::Declarator::getDecompositionDeclarator(), clang::VarDecl::getDescribedVarTemplate(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::VarTemplateDecl::getInstantiatedFromMemberTemplate(), clang::UnqualifiedId::getKind(), clang::ASTContext::getLangASForBuiltinAddressSpace(), getLangOpts(), clang::Decl::getLocation(), clang::MangleNumberingContext::getManglingNumber(), clang::DeclSpec::getModulePrivateSpecLoc(), getMSManglingNumber(), clang::Declarator::getName(), clang::DeclarationNameInfo::getName(), GetNameForDeclarator(), clang::LangOptions::getOpenCLVersionString(), clang::DeclContext::getParent(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::TemplateParameterList::getRAngleLoc(), clang::DeclContext::getRedeclContext(), getShadowedDeclaration(), getSourceManager(), clang::DeclSpec::getSpecifierName(), clang::MangleNumberingContext::getStaticLocalNumber(), clang::VarDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::StringLiteral::getString(), clang::StringLiteral::getStrTokenLoc(), clang::TagDecl::getTagKind(), clang::ASTContext::getTargetInfo(), clang::TemplateParameterList::getTemplateLoc(), clang::TemplateDecl::getTemplateParameters(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getType(), clang::ASTContext::getTypeSize(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasGlobalStorage(), clang::Declarator::hasInitializer(), clang::VarDecl::hasLocalStorage(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), hasParsedAttr(), clang::IK_TemplateId, inferObjCARCLifetime(), clang::Invalid, clang::DeclContext::isClosure(), clang::QualType::isConstQualified(), isDeclExternC(), isDeclInScope(), clang::Declarator::isDecompositionDeclarator(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isEmpty(), clang::Redeclarable< decl_type >::isFirstDecl(), clang::Declarator::isFunctionDefinition(), isFunctionDefinitionDiscarded(), clang::DeclContext::isFunctionOrMethod(), clang::Type::isFunctionPointerType(), isIncompleteDeclExternC(), clang::DeclSpec::isInlineSpecified(), clang::Type::isIntegralType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::VarDecl::isLocalVarDecl(), clang::TargetCXXABI::isMicrosoft(), clang::DeclSpec::isModulePrivateSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::IdentifierInfo::isPlaceholder(), clang::Type::isPointerType(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::CXXScopeSpec::isSet(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isStaticLocal(), clang::TargetInfo::isTLSSupported(), clang::DeclContext::isTranslationUnit(), clang::TargetInfo::isValidGCCRegisterName(), clang::Type::isVariableArrayType(), clang::Type::isWebAssemblyTableType(), Label, LangOpts, MatchTemplateParametersToScopeSpecifier(), MaybeSuggestAddingStaticToDecl(), NTCUC_AutoVar, NTCUK_Destruct, clang::OpenCL, ParsingInitForAutoVars, Previous, ProcessDeclAttributes(), ProcessPragmaWeak(), RegisterLocallyScopedExternCDecl(), clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_PrivateExtern, clang::SC_Register, clang::SC_Static, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_register, clang::DeclSpec::SCS_unspecified, clang::VarDecl::setConstexpr(), clang::VarDecl::setDescribedVarTemplate(), clang::VarDecl::setImplicitlyInline(), clang::VarDecl::setInlineSpecified(), clang::Decl::setInvalidDecl(), clang::Declarator::setInvalidType(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::ASTContext::setManglingNumber(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::NamedDecl::setModulePrivate(), SetNestedNameSpecifier(), clang::VarDecl::setPreviousDeclInSameBlockScope(), clang::Declarator::setRedeclaration(), clang::ASTContext::setStaticLocalNumber(), clang::VarDecl::setStorageClass(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::VarDecl::setTSCSpec(), clang::ValueDecl::setType(), shouldConsiderLinkage(), clang::TemplateParameterList::size(), StorageClassSpecToVarDeclStorageClass(), targetDiag(), clang::UnqualifiedId::TemplateId, TPC_ClassTemplateMember, TPC_VarTemplate, tryToFixVariablyModifiedVarType(), clang::DeclSpec::TSCS_thread_local, clang::TSCS_unspecified, and clang::Unspecified.

Referenced by ActOnDecompositionDeclarator(), and HandleDeclarator().

◆ ActOnVarTemplateSpecialization()

DeclResult Sema::ActOnVarTemplateSpecialization ( Scope S,
Declarator D,
TypeSourceInfo DI,
LookupResult Previous,
SourceLocation  TemplateKWLoc,
TemplateParameterList TemplateParams,
StorageClass  SC,
bool  IsPartialSpecialization 
)

Definition at line 4950 of file SemaTemplate.cpp.

References clang::DeclContext::addDecl(), clang::TemplateSpecializationType::anyDependentTemplateArguments(), CheckTemplateArgumentList(), CheckTemplatePartialSpecialization(), CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), Context, clang::VarTemplatePartialSpecializationDecl::Create(), clang::VarTemplateSpecializationDecl::Create(), clang::FixItHint::CreateRemoval(), CurContext, Diag(), DiagnoseUnexpandedParameterPack(), clang::OpaquePtr< PtrTy >::get(), clang::NamedDecl::getDeclName(), clang::Declarator::getIdentifierLoc(), clang::VarTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::UnqualifiedId::getKind(), clang::ASTContext::getLangOpts(), clang::Declarator::getName(), clang::VarTemplateSpecializationDecl::getPointOfInstantiation(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::VarTemplateSpecializationDecl::getSpecializationKind(), clang::VarDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::TypeSourceInfo::getType(), clang::TemplateParameterList::hasAssociatedConstraints(), clang::IK_TemplateId, clang::DeclContext::isRecord(), isSameAsPrimaryTemplate(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, makeTemplateArgumentListInfo(), Previous, clang::TemplateIdAnnotation::RAngleLoc, clang::SC_Extern, clang::VarTemplatePartialSpecializationDecl::setMemberSpecialization(), clang::TemplateArgumentListInfo::size(), clang::Specialization, clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, UPPC_ExplicitSpecialization, UPPC_PartialSpecialization, and VarTemplate.

Referenced by ActOnVariableDeclarator().

◆ ActOnWhileStmt()

StmtResult Sema::ActOnWhileStmt ( SourceLocation  WhileLoc,
SourceLocation  LParenLoc,
ConditionResult  Cond,
SourceLocation  RParenLoc,
Stmt Body 
)

◆ AddAlignedAttr() [1/2]

void Sema::AddAlignedAttr ( Decl D,
const AttributeCommonInfo CI,
Expr E,
bool  IsPackExpansion 
)

◆ AddAlignedAttr() [2/2]

void Sema::AddAlignedAttr ( Decl D,
const AttributeCommonInfo CI,
TypeSourceInfo T,
bool  IsPackExpansion 
)

◆ AddAlignmentAttributesForRecord()

void Sema::AddAlignmentAttributesForRecord ( RecordDecl RD)

◆ AddAlignValueAttr()

void Sema::AddAlignValueAttr ( Decl D,
const AttributeCommonInfo CI,
Expr E 
)

◆ AddAllocAlignAttr()

void Sema::AddAllocAlignAttr ( Decl D,
const AttributeCommonInfo CI,
Expr ParamExpr 
)

◆ addAMDGPUFlatWorkGroupSizeAttr()

void Sema::addAMDGPUFlatWorkGroupSizeAttr ( Decl D,
const AttributeCommonInfo CI,
Expr Min,
Expr Max 
)

addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size attribute to a particular declaration.

Definition at line 8012 of file SemaDeclAttr.cpp.

References clang::Decl::addAttr(), and CreateAMDGPUFlatWorkGroupSizeAttr().

Referenced by handleAMDGPUFlatWorkGroupSizeAttr(), and instantiateDependentAMDGPUFlatWorkGroupSizeAttr().

◆ addAMDGPUMaxNumWorkGroupsAttr()

void Sema::addAMDGPUMaxNumWorkGroupsAttr ( Decl D,
const AttributeCommonInfo CI,
Expr XExpr,
Expr YExpr,
Expr ZExpr 
)

addAMDGPUMaxNumWorkGroupsAttr - Adds an amdgpu_max_num_work_groups attribute to a particular declaration.

Definition at line 8151 of file SemaDeclAttr.cpp.

References clang::Decl::addAttr(), and CreateAMDGPUMaxNumWorkGroupsAttr().

Referenced by handleAMDGPUMaxNumWorkGroupsAttr(), and instantiateDependentAMDGPUMaxNumWorkGroupsAttr().

◆ addAMDGPUWavesPerEUAttr()

void Sema::addAMDGPUWavesPerEUAttr ( Decl D,
const AttributeCommonInfo CI,
Expr Min,
Expr Max 
)

addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a particular declaration.

Definition at line 8072 of file SemaDeclAttr.cpp.

References clang::Decl::addAttr(), and CreateAMDGPUWavesPerEUAttr().

Referenced by handleAMDGPUWavesPerEUAttr(), and instantiateDependentAMDGPUWavesPerEUAttr().

◆ AddAnnotationAttr()

void Sema::AddAnnotationAttr ( Decl D,
const AttributeCommonInfo CI,
StringRef  Annot,
MutableArrayRef< Expr * >  Args 
)

AddAnnotationAttr - Adds an annotation Annot with Args arguments to D.

Definition at line 4346 of file SemaDeclAttr.cpp.

References clang::Decl::addAttr(), ConstantFoldAttrArgs(), and Context.

Referenced by handleAnnotateAttr(), and instantiateDependentAnnotationAttr().

◆ AddAnyMethodToGlobalPool()

void Sema::AddAnyMethodToGlobalPool ( Decl D)

AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.

Definition at line 329 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 10102 of file SemaOverload.cpp.

References clang::AS_none, clang::ADLResult::begin(), clang::OverloadCandidateSet::begin(), clang::ADLResult::end(), clang::OverloadCandidateSet::end(), clang::ADLResult::erase(), clang::OverloadCandidateSet::getRewriteInfo(), clang::DeclAccessPair::make(), clang::Reversed, and clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed().

◆ AddAssumeAlignedAttr()

void Sema::AddAssumeAlignedAttr ( Decl D,
const AttributeCommonInfo CI,
Expr E,
Expr OE 
)

◆ 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 8435 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::AS_none, clang::ASTContext::BoolTy, clang::OverloadCandidate::BuiltinParamTypes, clang::OverloadCandidate::Conversions, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::OverloadCandidate::IgnoreObjectArgument, clang::OverloadCandidate::IsSurrogate, clang::DeclAccessPair::make(), clang::ovl_fail_bad_conversion, TryContextuallyConvertToBool(), TryCopyInitialization(), clang::Unevaluated, Unevaluated, and clang::OverloadCandidate::Viable.

Referenced by AddBuiltinAssignmentOperatorCandidates().

◆ 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 9897 of file SemaOverload.cpp.

References clang::QualifiersAndAtomic::addAtomic(), clang::QualifiersAndAtomic::addConst(), CollectVRQualifiers(), clang::NUM_OVERLOADED_OPERATORS, and clang::OO_None.

◆ 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 851 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, clang::Preprocessor::getPragmaARCCFCodeAuditedInfo(), clang::Decl::hasAttr(), clang::SourceLocation::isValid(), PP, and clang::AttributeCommonInfo::Form::Pragma().

Referenced by ActOnFunctionDeclarator().

◆ 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 7932 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::ImplicitConversionSequence::BadConversion, clang::Type::castAs(), clang::Expr::Classify(), clang::OverloadCandidate::Conversions, clang::CPlusPlus14, clang::CallExpr::CreateTemporary(), clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FinalConversion, clang::StandardConversionSequence::First, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::Type::getAs(), clang::Decl::getAttr(), clang::Stmt::getBeginLoc(), clang::ASTContext::getCanonicalType(), clang::GetConversionRank(), clang::CXXConversionDecl::getConversionType(), clang::RecordType::getDecl(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Expr::getExprLoc(), clang::ImplicitConversionSequence::getKind(), clang::OverloadCandidateSet::getLocation(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::FunctionDecl::getPrimaryTemplate(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKindForType(), clang::Decl::hasAttr(), clang::ASTContext::hasSameUnqualifiedType(), clang::ICK_Lvalue_To_Rvalue, clang::ICR_Exact_Match, clang::OverloadCandidate::IgnoreObjectArgument, isAllowableExplicitConversion(), clang::CXXConversionDecl::isExplicit(), clang::FunctionDecl::isMultiVersion(), clang::OverloadCandidateSet::isNewCandidate(), clang::Type::isRValueReferenceType(), clang::ConstraintSatisfaction::IsSatisfied, clang::OverloadCandidate::IsSurrogate, clang::Type::isUndeducedType(), clang::ImplicitCastExpr::OnStack, clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_final_conversion, clang::ovl_fail_constraints_not_satisfied, clang::ovl_fail_enable_if, clang::ovl_fail_explicit, clang::ovl_fail_final_conversion_not_exact, clang::ovl_fail_trivial_conversion, clang::ovl_non_default_multiversion_function, clang::StandardConversionSequence::Second, clang::StandardConversionSequence::setAllToTypes(), clang::StandardConversionSequence::setAsIdentityConversion(), clang::StandardConversionSequence::setFromType(), clang::ImplicitConversionSequence::Standard, clang::ImplicitConversionSequence::StandardConversion, TryCopyInitialization(), TryObjectArgumentInitialization(), clang::Unevaluated, Unevaluated, clang::OverloadCandidate::Viable, clang::VK_LValue, and clang::VK_PRValue.

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 550 of file Sema.cpp.

Referenced by clang::ASTReader::InitializeSema().

◆ AddFactoryMethodToGlobalPool()

void clang::Sema::AddFactoryMethodToGlobalPool ( ObjCMethodDecl Method,
bool  impl = false 
)
inline

AddFactoryMethodToGlobalPool - Same as above, but for factory methods.

Definition at line 12392 of file Sema.h.

Referenced by ActOnAtEnd(), AddAnyMethodToGlobalPool(), and ProcessPropertyDecl().

◆ AddFunctionCandidates()

void Sema::AddFunctionCandidates ( const UnresolvedSetImpl Functions,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
TemplateArgumentListInfo ExplicitTemplateArgs = nullptr,
bool  SuppressUserConversions = false,
bool  PartialOverloading = false,
bool  FirstArgumentIsBase = false 
)

◆ 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 10592 of file SemaDeclCXX.cpp.

References Context, clang::CPlusPlus11, clang::CPlusPlus20, DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitEqualityComparison(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), findImplicitlyDeclaredEqualityComparisons(), getASTContext(), clang::TargetInfo::getCXXABI(), getLangOpts(), clang::ASTContext::getTargetInfo(), clang::CXXRecordDecl::hasInheritedAssignment(), clang::CXXRecordDecl::hasInheritedConstructor(), clang::CXXRecordDecl::hasUserDeclaredMoveAssignment(), clang::CXXRecordDecl::hasUserDeclaredMoveConstructor(), inTemplateInstantiation(), clang::TagDecl::isDependentType(), clang::CXXRecordDecl::isDynamicClass(), clang::TargetCXXABI::isMicrosoft(), clang::CXXRecordDecl::needsImplicitCopyAssignment(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), clang::CXXRecordDecl::needsImplicitDestructor(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForCopyAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForDestructor(), clang::CXXRecordDecl::needsOverloadResolutionForMoveAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor(), clang::ASTContext::NumImplicitCopyAssignmentOperators, clang::ASTContext::NumImplicitCopyConstructors, clang::ASTContext::NumImplicitDefaultConstructors, clang::ASTContext::NumImplicitDestructors, clang::ASTContext::NumImplicitMoveAssignmentOperators, and clang::ASTContext::NumImplicitMoveConstructors.

Referenced by ActOnFields().

◆ AddImplicitMSFunctionNoBuiltinAttr()

void Sema::AddImplicitMSFunctionNoBuiltinAttr ( FunctionDecl FD)

Only called on function definitions; if there is a pragma in scope with the effect of a range-based no_builtin, consider marking the function with attribute no_builtin.

Definition at line 1209 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, MSFunctionNoBuiltins, and V.

Referenced by ActOnFunctionDeclarator().

◆ addImplicitTypedef()

void Sema::addImplicitTypedef ( StringRef  Name,
QualType  T 
)

◆ addInitCapture()

void Sema::addInitCapture ( sema::LambdaScopeInfo LSI,
VarDecl Var,
bool  ByRef 
)

◆ 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 13503 of file SemaDecl.cpp.

References AbstractVariableType, ActOnFinishFullExpr(), clang::C99, clang::VarDecl::CallInit, CheckCompleteVariableDeclaration(), CheckForConstantInitializer(), checkNonTrivialCUnionInInitializer(), checkRetainCycles(), checkUnsafeAssigns(), checkVarDeclRedefinition(), clang::Expr::containsErrors(), Context, CorrectDelayedTyposInExpr(), clang::CPlusPlus, clang::CPlusPlus11, clang::InitializationKind::CreateForInit(), clang::FixItHint::CreateInsertion(), CreateRecoveryExpr(), currentModuleIsHeaderUnit(), DeduceVariableDeclarationType(), Diag(), DiagnoseUnexpandedParameterPack(), Diags, clang::DirectInit, clang::ExprError(), clang::External, forceUnknownAnyToType(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::ASTContext::getAsIncompleteArrayType(), clang::ASTContext::getBaseElementType(), clang::DeclaratorDecl::getBeginLoc(), clang::VarDecl::getCanonicalDecl(), getCurFunction(), clang::TargetInfo::getCXXABI(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::Expr::getExprLoc(), clang::ParenListExpr::getExprs(), clang::NamedDecl::getFormalLinkage(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::ParenListExpr::getNumExprs(), clang::ASTContext::getObjCIdType(), clang::QualType::getObjCLifetime(), clang::Stmt::getSourceRange(), clang::VarDecl::getStorageClass(), clang::ASTContext::getTargetInfo(), clang::VarDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasInit(), clang::VarDecl::hasLocalStorage(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), clang::Expr::IgnoreParens(), clang::Init, clang::InitializedEntity::InitializeVariable(), clang::Type::isAggregateType(), clang::VarDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::Type::isDependentType(), clang::VarDecl::isExternC(), clang::VarDecl::isFileVarDecl(), clang::Type::isFloatingType(), clang::DiagnosticsEngine::isIgnored(), clang::VarDecl::isInline(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isLiteralType(), clang::VarDecl::isLocalVarDecl(), clang::TargetCXXABI::isMicrosoft(), clang::QualType::isNonWeakInMRRWithObjCWeak(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::VarDecl::isOutOfLine(), clang::DeclContext::isRecord(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::VarDecl::isStaticDataMember(), clang::Decl::isTemplated(), clang::isTemplateInstantiation(), clang::VarDecl::isThisDeclarationADefinition(), clang::VarDecl::isThisDeclarationADemotedDefinition(), clang::Type::isUndeducedType(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::QualType::isVolatileQualified(), LangOpts, clang::VarDecl::ListInit, clang::Qualifiers::OCL_Strong, clang::LangOptions::OMPTargetTriples, clang::opencl_constant, clang::opencl_local, clang::VarDecl::ParenListInit, clang::InitializationSequence::Perform(), RequireCompleteType(), RequireNonAbstractType(), clang::Result, clang::SC_Extern, clang::SC_Static, clang::VarDecl::setConstexpr(), setFunctionHasBranchProtectedScope(), clang::VarDecl::setInit(), clang::VarDecl::setInitStyle(), clang::Decl::setInvalidDecl(), clang::VarDecl::setStorageClass(), clang::ValueDecl::setType(), clang::InitializationSequence::SK_ParenthesizedListInit, clang::InitializationSequence::step_begin(), clang::InitializationSequence::steps(), clang::ASTContext::UnknownAnyTy, and UPPC_Initializer.

Referenced by actOnOMPReductionKindClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPTileDirective(), ActOnOpenMPUnrollDirective(), ActOnOpenMPUseDevicePtrClause(), buildCaptureDecl(), buildCoroutineParameterMoves(), BuildCXXForRangeStmt(), checkOpenMPLoop(), FinishForRangeVarDecl(), InstantiateVariableInitializer(), and precomputeExpr().

◆ 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 12386 of file Sema.h.

Referenced by ActOnAtEnd(), 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 16734 of file SemaDecl.cpp.

References clang::Decl::addAttr(), AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), clang::ASTContext::BuiltinInfo, clang::C, Context, clang::CPlusPlus, clang::CUDA, clang::EST_None, clang::LangOptionsBase::FPE_Ignore, clang::IdentifierTable::get(), clang::Type::getAs(), clang::FunctionDecl::getBuiltinID(), clang::Decl::getDeclContext(), clang::LangOptions::getDefaultExceptionMode(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::ASTContext::Idents, clang::Builtin::Context::isAuxBuiltinID(), clang::Builtin::Context::isConst(), clang::Builtin::Context::isConstWithoutErrnoAndExceptions(), clang::Builtin::Context::isConstWithoutExceptions(), clang::FunctionDecl::isExternC(), clang::Decl::isInvalidDecl(), clang::Builtin::Context::isNoThrow(), clang::Type::isObjCObjectPointerType(), clang::Builtin::Context::isPrintfLike(), clang::Builtin::Context::isPure(), clang::Builtin::Context::isReturnsTwice(), clang::Builtin::Context::isScanfLike(), clang::DeclContext::isTranslationUnit(), clang::Builtin::Context::isTSBuiltin(), P, and clang::Builtin::Context::performsCallback().

Referenced by ActOnFunctionDeclarator(), CreateBuiltin(), and ImplicitlyDefineFunction().

◆ AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction()

void Sema::AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction ( FunctionDecl FD)

If this function is a C++ replaceable global allocation function (C++2a [basic.stc.dynamic.allocation], C++2a [new.delete]), adds any function attributes that we know a priori based on the standard.

We need to check for duplicate attributes both here and where user-written attributes are applied to declarations.

Definition at line 16656 of file SemaDecl.cpp.

References clang::Decl::addAttr(), Context, clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::Decl::isInvalidDecl(), and clang::FunctionDecl::isReplaceableGlobalAllocationFunction().

Referenced by AddKnownFunctionAttributes(), and DeclareGlobalAllocationFunction().

◆ AddLaunchBoundsAttr()

void Sema::AddLaunchBoundsAttr ( Decl D,
const AttributeCommonInfo CI,
Expr MaxThreads,
Expr MinBlocks,
Expr MaxBlocks 
)

AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration.

Definition at line 5760 of file SemaDeclAttr.cpp.

References clang::Decl::addAttr(), and CreateLaunchBoundsAttr().

Referenced by handleLaunchBoundsAttr(), and instantiateDependentCUDALaunchBoundsAttr().

◆ 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 8379 of file SemaOverload.cpp.

References clang::LookupResult::begin(), clang::ASTContext::DeclarationNames, clang::LookupResult::end(), clang::Type::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), clang::OverloadCandidateSet::getRewriteInfo(), clang::Reversed, clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed(), and clang::LookupResult::suppressAccessDiagnostics().

◆ AddMethodCandidate() [1/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 = std::nullopt,
OverloadCandidateParamOrder  PO = {} 
)

AddMethodCandidate - Adds the given C++ member function to the set of candidate functions, using the given function call arguments and the object argument (Object).

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 7484 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::OverloadCandidate::Conversions, clang::CUDA, clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::Type::getAs(), clang::Decl::getAttr(), clang::OverloadCandidateSet::getLocation(), clang::FunctionDecl::getMinRequiredExplicitArguments(), clang::CXXMethodDecl::getNumExplicitParams(), clang::FunctionProtoType::getParamType(), clang::OverloadCandidateSet::getRewriteInfo(), clang::OverloadCandidateSet::OperatorRewriteInfo::getRewriteKind(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::OverloadCandidate::IgnoreObjectArgument, clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::FunctionDecl::isMultiVersion(), clang::OverloadCandidateSet::isNewCandidate(), clang::QualType::isNull(), clang::ConstraintSatisfaction::IsSatisfied, clang::CXXMethodDecl::isStatic(), clang::OverloadCandidate::IsSurrogate, clang::FunctionProtoType::isVariadic(), clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_target, clang::ovl_fail_constraints_not_satisfied, clang::ovl_fail_enable_if, clang::ovl_fail_too_few_arguments, clang::ovl_fail_too_many_arguments, clang::ovl_non_default_multiversion_function, clang::Reversed, clang::OverloadCandidate::RewriteKind, clang::shouldEnforceArgLimit(), clang::TooManyArguments, TryCopyInitialization(), TryObjectArgumentInitialization(), clang::Unevaluated, Unevaluated, and clang::OverloadCandidate::Viable.

◆ AddMethodCandidate() [2/2]

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

Definition at line 7450 of file SemaOverload.cpp.

References clang::Decl::getDeclContext().

Referenced by LookupSpecialMember().

◆ 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 = {} 
)

◆ addMethodToGlobalList()

void Sema::addMethodToGlobalList ( ObjCMethodList List,
ObjCMethodDecl Method 
)

◆ AddModeAttr()

void Sema::AddModeAttr ( Decl D,
const AttributeCommonInfo CI,
IdentifierInfo Name,
bool  InInstantiation = false 
)

◆ AddMsStructLayoutForRecord()

void Sema::AddMsStructLayoutForRecord ( RecordDecl RD)

AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.

Definition at line 89 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, clang::Sema::PragmaStack< ValueType >::CurrentValue, getLangOpts(), MSStructPragmaOn, and VtorDispStack.

Referenced by ActOnClassTemplateSpecialization(), ActOnTag(), and CheckClassTemplate().

◆ AddNonMemberOperatorCandidates()

void Sema::AddNonMemberOperatorCandidates ( const UnresolvedSetImpl Functions,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
TemplateArgumentListInfo ExplicitTemplateArgs = nullptr 
)

◆ 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 1195 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, and clang::Decl::hasAttr().

Referenced by AddRangeBasedOptnone(), and ModifyFnAttributesMSPragmaOptimize().

◆ 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 = std::nullopt,
OverloadCandidateParamOrder  PO = {},
bool  AggregateCandidateDeduction = false 
)

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
PartialOverloadingtrue if we are performing "partial" overloading based on an incomplete set of function arguments. This feature is used by code completion.

FIXME: Currently, the semantics of linkage in clang is slightly different from the semantics in C++ spec. In C++ spec, only names have linkage. So that all entities of the same should share one linkage. But in clang, different entities of the same could have different linkage.

Definition at line 6876 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::C, clang::OverloadCandidate::Conversions, clang::OverloadCandidateSet::CSK_Operator, clang::CUDA, clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::Function, clang::OverloadCandidate::Function, clang::OverloadCandidateSet::getDestAS(), clang::NamedDecl::getFormalLinkage(), clang::ExplicitSpecifier::getFromDecl(), clang::OverloadCandidateSet::getKind(), clang::OverloadCandidateSet::getLocation(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getRecordType(), clang::OverloadCandidateSet::getRewriteInfo(), clang::OverloadCandidateSet::OperatorRewriteInfo::getRewriteKind(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), clang::OverloadCandidate::IgnoreObjectArgument, clang::Internal, IsAcceptableNonMemberOperatorCandidate(), clang::Qualifiers::isAddressSpaceSupersetOf(), clang::OverloadCandidate::IsADLCandidate, clang::Decl::isImplicit(), clang::OverloadCandidateSet::isNewCandidate(), clang::ConstraintSatisfaction::IsSatisfied, clang::OverloadCandidate::IsSurrogate, clang::FunctionProtoType::isVariadic(), clang::Expr::Classification::makeSimpleLValue(), clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_target, clang::ovl_fail_constraints_not_satisfied, clang::ovl_fail_enable_if, clang::ovl_fail_explicit, clang::ovl_fail_illegal_constructor, clang::ovl_fail_inhctor_slice, clang::ovl_fail_module_mismatched, clang::ovl_fail_object_addrspace_mismatch, clang::ovl_fail_too_few_arguments, clang::ovl_fail_too_many_arguments, clang::ovl_non_default_multiversion_function, P, clang::Reversed, clang::OverloadCandidate::RewriteKind, clang::shouldEnforceArgLimit(), clang::TooManyArguments, TryCopyInitialization(), clang::Unevaluated, Unevaluated, and clang::OverloadCandidate::Viable.

Referenced by AddOverloadedCallCandidate(), ComputeSelectedDestructor(), DeduceTemplateSpecializationFromInitializer(), DiagnoseEmptyLookup(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), LookupSpecialMember(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), TryTypoCorrectionForCall(), and TryUserDefinedConversion().

◆ AddOverloadedCallCandidates() [1/2]

void Sema::AddOverloadedCallCandidates ( LookupResult R,
TemplateArgumentListInfo ExplicitTemplateArgs,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet 
)

Add the call candidates from the given set of lookup results to the given overload set.

Non-function lookup results are ignored.

Definition at line 13698 of file SemaOverload.cpp.

References AddOverloadedCallCandidate(), clang::LookupResult::begin(), and clang::LookupResult::end().

◆ AddOverloadedCallCandidates() [2/2]

void Sema::AddOverloadedCallCandidates ( UnresolvedLookupExpr ULE,
ArrayRef< Expr * >  Args,
OverloadCandidateSet CandidateSet,
bool  PartialOverloading = false 
)

◆ AddOverriddenMethods()

bool Sema::AddOverriddenMethods ( CXXRecordDecl DC,
CXXMethodDecl MD 
)

◆ AddParameterABIAttr()

void Sema::AddParameterABIAttr ( Decl D,
const AttributeCommonInfo CI,
ParameterABI  ABI 
)

◆ AddPragmaAttributes()

void Sema::AddPragmaAttributes ( Scope S,
Decl D 
)

◆ AddPushedVisibilityAttribute()

void Sema::AddPushedVisibilityAttribute ( Decl RD)

AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute.

Definition at line 1219 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, clang::NamedDecl::getExplicitVisibility(), NoVisibility, clang::ast_matchers::type, VisContext, and clang::NamedDecl::VisibilityForValue.

Referenced by ActOnFunctionDeclarator(), ActOnTag(), ActOnTagStartDefinition(), CheckClassTemplate(), and FinalizeDeclaration().

◆ 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 1165 of file SemaAttr.cpp.

References AddOptnoneAttributeIfNoConflicts(), clang::SourceLocation::isValid(), and OptimizeOffPragmaLocation.

Referenced by ActOnFunctionDeclarator(), and ActOnStartOfLambdaDefinition().

◆ AddSectionMSAllocText()

void Sema::AddSectionMSAllocText ( FunctionDecl FD)

Only called on function definitions; if there is a #pragma alloc_text that decides which code section the function should be in, add attribute section to the function.

Definition at line 1172 of file SemaAttr.cpp.

References clang::Decl::addAttr(), Context, FunctionToSectionMap, clang::NamedDecl::getIdentifier(), clang::NamedDecl::getName(), and clang::Decl::hasAttr().

Referenced by ActOnFunctionDeclarator().

◆ 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 8203 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::OverloadCandidate::Conversions, clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::OverloadCandidateSet::getLocation(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionProtoType::getParamType(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::ValueDecl::getType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), clang::OverloadCandidate::IgnoreObjectArgument, clang::ImplicitConversionSequence::isBad(), clang::OverloadCandidateSet::isNewCandidate(), clang::ConstraintSatisfaction::IsSatisfied, clang::OverloadCandidate::IsSurrogate, clang::FunctionProtoType::isVariadic(), clang::ovl_fail_bad_conversion, clang::ovl_fail_constraints_not_satisfied, clang::ovl_fail_enable_if, clang::ovl_fail_too_few_arguments, clang::ovl_fail_too_many_arguments, clang::ImplicitConversionSequence::Standard, clang::OverloadCandidate::Surrogate, TryCopyInitialization(), TryObjectArgumentInitialization(), clang::Unevaluated, Unevaluated, and clang::OverloadCandidate::Viable.

◆ AddTemplateConversionCandidate()

void Sema::AddTemplateConversionCandidate ( FunctionTemplateDecl FunctionTemplate,
DeclAccessPair  FoundDecl,
CXXRecordDecl ActingContext,
Expr From,
QualType  ToType,
OverloadCandidateSet CandidateSet,
bool  AllowObjCConversionOnExplicit,
bool  AllowExplicit,
bool  AllowResultConversion = true 
)

◆ 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 = {},
bool  AggregateCandidateDeduction = false 
)

Add a C++ function template specialization as a candidate in the candidate set, using template argument deduction to produce an appropriate function template specialization.

Definition at line 7728 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::addCandidate(), clang::sema::TemplateDeductionInfo::AggregateDeductionCandidateHasMismatchedArity, DeduceTemplateArguments(), clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::OverloadCandidateSet::getLocation(), clang::OverloadCandidateSet::getRewriteInfo(), clang::OverloadCandidateSet::OperatorRewriteInfo::getRewriteKind(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Decl::getTemplateDepth(), clang::OverloadCandidate::IgnoreObjectArgument, clang::OverloadCandidate::IsADLCandidate, clang::OverloadCandidateSet::isNewCandidate(), isNonDependentlyExplicit(), clang::OverloadCandidate::IsSurrogate, clang::MakeDeductionFailureInfo(), clang::NonDependentConversionFailure, clang::ovl_fail_bad_conversion, clang::ovl_fail_bad_deduction, clang::ovl_fail_explicit, clang::Result, clang::OverloadCandidate::RewriteKind, clang::Specialization, clang::Success, and clang::OverloadCandidate::Viable.

Referenced by AddOverloadedCallCandidate(), DeduceTemplateSpecializationFromInitializer(), DiagnoseEmptyLookup(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), LookupSpecialMember(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().

◆ AddTemplateParametersToLambdaCallOperator()

void Sema::AddTemplateParametersToLambdaCallOperator ( CXXMethodDecl CallOperator,
CXXRecordDecl Class,
TemplateParameterList TemplateParams 
)

◆ AddXConsumedAttr()

void Sema::AddXConsumedAttr ( Decl D,
const AttributeCommonInfo CI,
RetainOwnershipKind  K,
bool  IsTemplateInstantiation 
)

◆ adjustCCAndNoReturn()

QualType Sema::adjustCCAndNoReturn ( QualType  ArgFunctionType,
QualType  FunctionType,
bool  AdjustExceptionSpec = false 
)

◆ adjustContextForLocalExternDecl()

bool Sema::adjustContextForLocalExternDecl ( DeclContext *&  DC)
static

◆ 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 909 of file SemaTemplate.cpp.

Referenced by ActOnBaseSpecifier(), ActOnBaseSpecifiers(), ActOnFinishCXXMemberSpecification(), ActOnFinishDelayedCXXMethodDeclaration(), ActOnMemInitializers(), ActOnReenterTemplateScope(), ActOnStartCXXMemberDeclarations(), ActOnStartDelayedMemberDeclarations(), ActOnTagDefinitionError(), ActOnTagFinishDefinition(), ActOnTagStartDefinition(), BuildMemInitializer(), and SetDeclDeleted().

◆ 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 14441 of file SemaDeclCXX.cpp.

References Context, clang::CPlusPlus11, clang::EST_Unevaluated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::ASTContext::getFunctionType(), getLangOpts(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, clang::FunctionProtoType::ExceptionSpecInfo::Type, and clang::ASTContext::VoidTy.

Referenced by CreateNewFunctionDecl(), and clang::TemplateDeclInstantiator::InitMethodInstantiation().

◆ adjustMemberFunctionCC()

void Sema::adjustMemberFunctionCC ( QualType T,
bool  HasThisPointer,
bool  IsCtorOrDtor,
SourceLocation  Loc 
)

◆ AdjustParameterTypeForObjCAutoRefCount()

QualType Sema::AdjustParameterTypeForObjCAutoRefCount ( QualType  T,
SourceLocation  NameLoc,
TypeSourceInfo TSInfo 
)

◆ anchor()

void Sema::anchor ( )
virtual

This virtual key function only exists to limit the emission of debug info describing the Sema class.

GCC and Clang only emit debug info for a class with a vtable when the vtable is emitted. Sema is final and not polymorphic, but the debug info size savings are so significant that it is worth adding a vtable just to take advantage of this optimization.

Definition at line 259 of file Sema.cpp.

◆ anyAltivecTypes()

bool Sema::anyAltivecTypes ( QualType  srcType,
QualType  destType 
)

◆ AreConstraintExpressionsEqual()

bool Sema::AreConstraintExpressionsEqual ( const NamedDecl Old,
const Expr OldConstr,
const TemplateCompareNewDeclInfo New,
const Expr NewConstr 
)

◆ 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 8367 of file SemaExpr.cpp.

References areVectorTypesSameSize(), clang::Type::isExtVectorType(), clang::Type::isScalarType(), and clang::Type::isVectorType().

Referenced by CheckExtVectorCast(), CheckVectorCast(), and isLaxVectorConversion().

◆ areMatrixTypesOfTheSameDimension()

bool Sema::areMatrixTypesOfTheSameDimension ( QualType  srcTy,
QualType  destTy 
)

Are the two types matrix types and do they have the same dimensions i.e.

do they have the same number of rows and the same number of columns?

Definition at line 8306 of file SemaExpr.cpp.

References clang::Type::getAs(), clang::ConstantMatrixType::getNumColumns(), clang::ConstantMatrixType::getNumRows(), and clang::Type::isMatrixType().

Referenced by CheckMatrixCast().

◆ AreMultipleMethodsInGlobalPool()

bool Sema::AreMultipleMethodsInGlobalPool ( Selector  Sel,
ObjCMethodDecl BestMethod,
SourceRange  R,
bool  receiverIdOrClass,
SmallVectorImpl< ObjCMethodDecl * > &  Methods 
)

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

◆ areVectorTypesSameSize()

bool Sema::areVectorTypesSameSize ( QualType  srcType,
QualType  destType 
)

◆ ArgumentDependentLookup()

void Sema::ArgumentDependentLookup ( DeclarationName  Name,
SourceLocation  Loc,
ArrayRef< Expr * >  Args,
ADLResult Functions 
)

◆ AtomicPropertySetterGetterRules()

void Sema::AtomicPropertySetterGetterRules ( ObjCImplDecl IMPDecl,
ObjCInterfaceDecl IDecl 
)

◆ AttachBaseSpecifiers()

bool Sema::AttachBaseSpecifiers ( CXXRecordDecl Class,
MutableArrayRef< CXXBaseSpecifier * >  Bases 
)

◆ AttachTypeConstraint() [1/2]

bool Sema::AttachTypeConstraint ( AutoTypeLoc  TL,
NonTypeTemplateParmDecl NewConstrainedParm,
NonTypeTemplateParmDecl OrigConstrainedParm,
SourceLocation  EllipsisLoc 
)

◆ AttachTypeConstraint() [2/2]

bool Sema::AttachTypeConstraint ( NestedNameSpecifierLoc  NS,
DeclarationNameInfo  NameInfo,
ConceptDecl NamedConcept,
NamedDecl FoundDecl,
const TemplateArgumentListInfo TemplateArgs,
TemplateTypeParmDecl ConstrainedParameter,
SourceLocation  EllipsisLoc 
)

◆ BuildAddressSpaceAttr() [1/2]

QualType Sema::BuildAddressSpaceAttr ( QualType T,
Expr AddrSpace,
SourceLocation  AttrLoc 
)

Same as above, but constructs the AddressSpace index if not provided.

Definition at line 6900 of file SemaType.cpp.

References BuildAddressSpaceAttr(), and BuildAddressSpaceIndex().

◆ BuildAddressSpaceAttr() [2/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 6877 of file SemaType.cpp.

References Context, Diag(), DiagnoseMultipleAddrSpaceAttributes(), clang::QualType::getAddressSpace(), clang::ASTContext::getAddrSpaceQualType(), clang::Type::getAs(), clang::ASTContext::getDependentAddressSpaceType(), and clang::Expr::isValueDependent().

Referenced by BuildAddressSpaceAttr(), HandleAddressSpaceTypeAttribute(), and clang::TreeTransform< Derived >::RebuildDependentAddressSpaceType().

◆ 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 5553 of file SemaDecl.cpp.

References ActOnUninitializedDecl(), clang::DeclContext::addDecl(), clang::AS_none, clang::AS_protected, clang::AS_public, clang::C11, checkDuplicateDefaultInit(), CheckNontrivialField(), clang::DeclSpec::ClearTypeQualifiers(), Context, clang::CPlusPlus, clang::VarDecl::Create(), clang::FieldDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), Diag(), FieldCollector, clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getConstSpecLoc(), getCurrentMangleNumberContext(), getLangOpts(), clang::MangleNumberingContext::getManglingNumber(), getMSManglingNumber(), clang::ASTContext::getPrintingPolicy(), clang::DeclContext::getRedeclContext(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::MangleNumberingContext::getStaticLocalNumber(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::ASTContext::getTypeDeclType(), GetTypeForDeclarator(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getUnalignedSpecLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::ICIS_NoInit, InjectAnonymousStructOrUnionMembers(), clang::Invalid, clang::DeclContext::isNamespace(), clang::DeclContext::isRecord(), clang::DeclContext::isTranslationUnit(), clang::Member, clang::ParsedAttributesView::none(), ProcessDeclAttributes(), clang::SC_None, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), clang::ASTContext::setManglingNumber(), clang::ASTContext::setStaticLocalNumber(), clang::DeclSpec::SetStorageClassSpec(), StorageClassSpecToVarDeclStorageClass(), clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, clang::DeclSpec::TQ_unaligned, and clang::DeclSpec::TQ_volatile.

Referenced by ParsedFreeStandingDeclSpec().

◆ BuildAnonymousStructUnionMemberReference()

ExprResult Sema::BuildAnonymousStructUnionMemberReference ( const CXXScopeSpec SS,
SourceLocation  nameLoc,
IndirectFieldDecl indirectField,
DeclAccessPair  FoundDecl = DeclAccessPair::make(nullptr, AS_none),
Expr baseObjectExpr = nullptr,
SourceLocation  opLoc = SourceLocation() 
)

◆ BuildArrayType()

QualType Sema::BuildArrayType ( QualType  T,
ArraySizeModifier  ASM,
Expr ArraySize,
unsigned  Quals,
SourceRange  Brackets,
DeclarationName  Entity 
)

Build an array type.

Parameters
TThe type of each element in the array.
ASMC99 array size modifier (e.g., '*', 'static').
ArraySizeExpression describing the size of the array.
BracketsThe range from the opening '[' to the closing ']'.
EntityThe 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 2494 of file SemaType.cpp.

References checkArrayElementAlignment(), checkArraySize(), CheckPlaceholderExpr(), Context, clang::CPlusPlus, clang::CPlusPlus11, CurrentCUDATarget(), DefaultLvalueConversion(), Diag(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::ASTContext::getConstantArrayType(), getCurFunction(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getDependentSizedArrayType(), clang::ASTContext::getIncompleteArrayType(), getLangOpts(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), getPrintableNameForEntity(), clang::ASTContext::getSizeType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::getVariableArrayType(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isArrayType(), clang::Type::isBlockPointerType(), isCompleteType(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isImageType(), clang::Type::isIncompleteArrayType(), clang::Type::isIncompleteType(), isInOpenMPTaskUntiedContext(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::Type::isObjCObjectType(), clang::Type::isPipeType(), clang::Expr::isPRValue(), clang::Type::isReferenceType(), clang::Type::isSamplerT(), isSFINAEContext(), clang::Type::isSizelessType(), clang::Expr::isTypeDependent(), clang::Type::isUndeducedType(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Expr::isValueDependent(), clang::Type::isVariableArrayType(), clang::Type::isVariablyModifiedType(), clang::TargetInfo::isVLASupported(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), clang::Normal, clang::OpenCL, RequireCompleteSizedType(), RequireNonAbstractType(), clang::Result, clang::Star, targetDiag(), and toString().

Referenced by GetFullTypeForDeclarator(), and clang::TreeTransform< Derived >::RebuildArrayType().

◆ BuildArrayTypeTrait()

ExprResult Sema::BuildArrayTypeTrait ( ArrayTypeTrait  ATT,
SourceLocation  KWLoc,
TypeSourceInfo TSInfo,
Expr DimExpr,
SourceLocation  RParen 
)

◆ BuildAsTypeExpr()

ExprResult Sema::BuildAsTypeExpr ( Expr E,
QualType  DestTy,
SourceLocation  BuiltinLoc,
SourceLocation  RParenLoc 
)

◆ BuildAtomicExpr()

ExprResult Sema::BuildAtomicExpr ( SourceRange  CallRange,
SourceRange  ExprRange,
SourceLocation  RParenLoc,
MultiExprArg  Args,
AtomicExpr::AtomicOp  Op,
AtomicArgumentOrder  ArgOrder = AtomicArgumentOrder::API 
)

Definition at line 8197 of file SemaChecking.cpp.

References AST, clang::ASTContext::AtomicUsesUnsupportedLibcall(), clang::ASTContext::BoolTy, clang::Type::castAs(), CheckNonNullArgument(), Context, clang::Copy, clang::Default, DefaultFunctionArrayLvalueConversion(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::ASTContext::getAddrSpaceQualType(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::AtomicExpr::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::SourceRange::getEnd(), clang::Expr::getExprLoc(), clang::TargetInfo::getLongDoubleFormat(), clang::QualType::getObjCLifetime(), clang::Type::getPointeeType(), clang::ASTContext::getPointerDiffType(), clang::ASTContext::getPointerType(), clang::AtomicExpr::getScopeModel(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Init, clang::InitializedEntity::InitializeParameter(), clang::ASTContext::IntTy, clang::Type::isAtomicType(), clang::Type::isBitIntType(), clang::QualType::isConstQualified(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isPointerType(), clang::Type::isScalarType(), clang::Type::isSpecificBuiltinType(), clang::QualType::isTriviallyCopyableType(), isValidOrderingForOp(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::opencl_constant, PerformCopyInitialization(), clang::ast_matchers::pointerType, clang::QualType::removeLocalConst(), clang::QualType::removeLocalVolatile(), RequireCompleteType(), clang::Result, clang::Success, and clang::ASTContext::VoidTy.

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

◆ BuildAtomicType()

QualType Sema::BuildAtomicType ( QualType  T,
SourceLocation  Loc 
)

◆ BuildAttributedStmt()

StmtResult Sema::BuildAttributedStmt ( SourceLocation  AttrsLoc,
ArrayRef< const Attr * >  Attrs,
Stmt SubStmt 
)

◆ BuildBaseInitializer()

MemInitResult Sema::BuildBaseInitializer ( QualType  BaseType,
TypeSourceInfo BaseTInfo,
Expr Init,
CXXRecordDecl ClassDecl,
SourceLocation  EllipsisLoc 
)

◆ BuildBasePathArray()

void Sema::BuildBasePathArray ( const CXXBasePaths Paths,
CXXCastPath BasePath 
)

◆ BuildBinOp()

ExprResult Sema::BuildBinOp ( Scope S,
SourceLocation  OpLoc,
BinaryOperatorKind  Opc,
Expr LHSExpr,
Expr RHSExpr 
)

◆ BuildBitIntType()

QualType Sema::BuildBitIntType ( bool  IsUnsigned,
Expr BitWidth,
SourceLocation  Loc 
)

◆ BuildBlockForLambdaConversion()

ExprResult Sema::BuildBlockForLambdaConversion ( SourceLocation  CurrentLocation,
SourceLocation  ConvLocation,
CXXConversionDecl Conv,
Expr Src 
)

◆ BuildBlockPointerType()

QualType Sema::BuildBlockPointerType ( QualType  T,
SourceLocation  Loc,
DeclarationName  Entity 
)

Build a block pointer type.

Parameters
TThe type to which we'll be building a block pointer.
LocThe source location, used for diagnostics.
EntityThe 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 3196 of file SemaType.cpp.

References checkQualifiedFunction(), Context, deduceOpenCLPointeeAddrSpace(), Diag(), clang::ASTContext::getBlockPointerType(), getLangOpts(), clang::Type::isFunctionType(), and clang::OpenCL.

Referenced by GetFullTypeForDeclarator(), and clang::TreeTransform< Derived >::RebuildBlockPointerType().

◆ BuildBuiltinBitCastExpr()

ExprResult Sema::BuildBuiltinBitCastExpr ( SourceLocation  KWLoc,
TypeSourceInfo TSI,
Expr Operand,
SourceLocation  RParenLoc 
)

◆ BuildBuiltinCallExpr()

Expr * Sema::BuildBuiltinCallExpr ( SourceLocation  Loc,
Builtin::ID  Id,
MultiExprArg  CallArgs 
)

◆ BuildBuiltinOffsetOf()

ExprResult Sema::BuildBuiltinOffsetOf ( SourceLocation  BuiltinLoc,
TypeSourceInfo TInfo,
ArrayRef< OffsetOfComponent Components,
SourceLocation  RParenLoc 
)

◆ BuildCallExpr()

ExprResult Sema::BuildCallExpr ( Scope Scope,
Expr Fn,
SourceLocation  LParenLoc,
MultiExprArg  ArgExprs,
SourceLocation  RParenLoc,
Expr ExecConfig = nullptr,
bool  IsExecConfig = false,
bool  AllowRecovery = false 
)

BuildCallExpr - Handle a call to Fn with the specified array of arguments.

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

Definition at line 7195 of file SemaExpr.cpp.

References clang::ASTContext::BoundMemberTy, BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildOverloadedCallExpr(), BuildResolvedCallExpr(), checkAddressOfFunctionIsAvailable(), CheckArgsForPlaceholders(), checkDirectCallValidity(), CheckPlaceholderExpr(), clang::Expr::containsErrors(), Context, clang::CPlusPlus, clang::DeclRefExpr::Create(), clang::ImplicitCastExpr::Create(), clang::CallExpr::Create(), clang::CUDAKernelCallExpr::Create(), clang::FixItHint::CreateRemoval(), CurFPFeatureOverrides(), clang::Default, clang::ASTContext::DependentTy, Diag(), clang::ExprError(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), getASTContext(), clang::Stmt::getBeginLoc(), clang::FunctionDecl::getBuiltinID(), getLangOpts(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::DeclaratorDecl::getQualifierLoc(), clang::QualType::getQualifiers(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Expr::hasAnyTypeDependentArguments(), clang::OverloadExpr::FindResult::HasFormOfMemberPointer, clang::HIP, clang::Expr::IgnoreParens(), ImpCastExprToType(), clang::OverloadExpr::FindResult::IsAddressOfOperand, clang::ASTContext::isDependenceAllowed(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), MaybeConvertParenListExprToParenExpr(), clang::ASTContext::OverloadTy, clang::ASTContext::PseudoObjectTy, rebuildUnknownAnyFunction(), clang::Result, rewriteBuiltinFunctionDecl(), clang::Qualifiers::setAddressSpace(), tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs(), clang::ASTContext::UnknownAnyTy, clang::VK_PRValue, and clang::ASTContext::VoidTy.

Referenced by ActOnCallExpr(), ActOnCUDAExecConfigExpr(), ActOnOpenMPCall(), BuildBuiltinCallExpr(), buildCoroutineHandle(), buildMemberCall(), buildMemcpyForAssignmentOp(), BuildRecoveryCallExpr(), checkTupleLikeDecomposition(), DefaultVariadicArgumentPromotion(), EvaluateStaticAssertMessageAsString(), and tryToRecoverWithCall().

◆ BuildCallToMemberFunction()

ExprResult Sema::BuildCallToMemberFunction ( Scope S,
Expr MemExprE,
SourceLocation  LParenLoc,
MultiExprArg  Args,
SourceLocation  RParenLoc,
Expr ExecConfig = nullptr,
bool  IsExecConfig = false,
bool  AllowRecovery = false 
)

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 15383 of file SemaOverload.cpp.

References clang::AS_public, clang::OverloadCandidateSet::BestViableFunction(), clang::ASTContext::BoundMemberTy, clang::Type::castAs(), checkArgPlaceholdersForOverload(), chooseRecoveryType(), clang::Expr::Classify(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::CXXMemberCallExpr::Create(), clang::CallExpr::Create(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Normal, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), Diag(), clang::ExprError(), clang::Func, clang::ActionResult< PtrTy, Compress >::get(), clang::Qualifiers::getAsString(), clang::UnresolvedMemberExpr::getBase(), clang::MemberExpr::getBase(), clang::UnresolvedMemberExpr::getBaseType(), clang::DeclaratorDecl::getBeginLoc(), clang::MemberExpr::getBeginLoc(), clang::UnresolvedMemberExpr::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::FunctionType::getCallResultType(), clang::NamedDecl::getDeclName(), GetExplicitObjectType(), clang::MemberExpr::getExprLoc(), clang::MemberExpr::getFoundDecl(), clang::Decl::getLocation(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getMemberLoc(), clang::UnresolvedMemberExpr::getMemberLoc(), clang::UnresolvedMemberExpr::getMemberName(), clang::FunctionProtoType::getMethodQuals(), clang::OverloadExpr::getNameLoc(), clang::QualType::getNonLValueExprType(), clang::FunctionProtoType::getNumParams(), clang::DeclContext::getParent(), clang::MemberExpr::getQualifier(), clang::OverloadExpr::getQualifier(), clang::QualType::getQualifiers(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::Stmt::getSourceRange(), clang::FunctionDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKindForType(), clang::OverloadExpr::hasExplicitTemplateArgs(), clang::MemberExpr::hasQualifier(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParens(), clang::UnresolvedMemberExpr::isArrow(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CXXMethodDecl::isStatic(), clang::DeclAccessPair::make(), clang::Expr::Classification::makeSimpleLValue(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::ASTContext::OverloadTy, clang::MemberExpr::performsVirtualDispatch(), PrepareExplicitObjectArgument(), clang::Qualifiers::removeAddressSpace(), clang::Qualifiers::removeObjCGCAttr(), clang::MemberExpr::setBase(), clang::OverloadCandidateSet::size(), clang::VK_PRValue, and clang::ASTContext::VoidTy.

Referenced by BuildCallExpr(), buildSingleCopyAssignRecursively(), and tryExprAsCall().

◆ BuildCallToObjectOfClassType()

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

Definition at line 15713 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::Call, clang::Type::castAs(), checkArgPlaceholdersForOverload(), checkPlaceholderForOverload(), clang::ImplicitCastExpr::Create(), clang::CXXOperatorCallExpr::Create(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, clang::OverloadCandidateSet::empty(), clang::OverloadCandidateSet::end(), clang::ExprError(), clang::OverloadCandidate::FailureKind, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Decl::getDeclContext(), clang::DeclarationNameInfo::getInfo(), clang::DeclarationNameInfo::getLoc(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumParams(), clang::Type::getPointeeType(), clang::FunctionDecl::getReturnType(), clang::ValueDecl::getType(), clang::Expr::getValueKindForType(), clang::CXXConversionDecl::isExplicit(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::ovl_fail_constraints_not_satisfied, PrepareArgumentsForCallToObjectOfClassType(), PrepareExplicitObjectArgument(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::OverloadCandidateSet::size(), clang::OverloadCandidate::Viable, and clang::VK_PRValue.

Referenced by BuildCallExpr().

◆ BuildCaptureField()

FieldDecl * Sema::BuildCaptureField ( RecordDecl RD,
const sema::Capture Capture 
)

◆ BuildCaptureInit()

ExprResult Sema::BuildCaptureInit ( const sema::Capture Capture,
SourceLocation  ImplicitCaptureLoc,
bool  IsOpenMPMapping = false 
)

◆ 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
ReceiverTypeInfoType 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.
ReceiverTypeThe 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.
SuperLocThe location of the "super" keyword in a superclass message.
SelThe selector to which the message is being sent.
MethodThe method that this class message is invoking, if already known.
LBracLocThe location of the opening square bracket ']'.
RBracLocThe location of the closing square bracket ']'.
ArgsInThe message arguments.

Definition at line 2609 of file SemaExprObjC.cpp.

References checkCocoaAPI(), checkFoundationAPI(), CheckMessageArgumentTypes(), clang::Class, Context, clang::CPlusPlus, clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), Diag(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseUseOfDecl(), clang::ExprError(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::ObjCMethodDecl::getClassInterface(), getCurMethodDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ObjCObjectType::getInterface(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::NamedDecl::getName(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCMethodDecl::getReturnType(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), clang::ObjCMethodDecl::isDirectMethod(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), LookupFactoryMethodInGlobalPool(), MaybeBindToTemporary(), clang::OMF_initialize, RequireCompleteType(), clang::Result, and clang::VK_PRValue.

Referenced by ActOnClassMessage(), ActOnSuperMessage(), BuildClassMessageImplicit(), and clang::TreeTransform< Derived >::RebuildObjCMessageExpr().

◆ BuildClassMessageImplicit()

ExprResult Sema::BuildClassMessageImplicit ( QualType  ReceiverType,
bool  isSuperReceiver,
SourceLocation  Loc,
Selector  Sel,
ObjCMethodDecl Method,
MultiExprArg  Args 
)

◆ BuildCodeAlignAttr()

CodeAlignAttr * Sema::BuildCodeAlignAttr ( const AttributeCommonInfo CI,
Expr E 
)

◆ BuildCompoundLiteralExpr()

ExprResult Sema::BuildCompoundLiteralExpr ( SourceLocation  LParenLoc,
TypeSourceInfo TInfo,
SourceLocation  RParenLoc,
Expr LiteralExpr 
)

Definition at line 7787 of file SemaExpr.cpp.

References CheckForConstantInitializer(), checkNonTrivialCUnion(), checkNonTrivialCUnionInInitializer(), Cleanup, Context, clang::CPlusPlus, clang::ConstantExpr::Create(), clang::InitializationKind::CreateCStyleCast(), CurContext, clang::Default, Diag(), ExprCleanupObjects, clang::ExprError(), clang::QualType::getAddressSpace(), clang::ASTContext::getBaseElementType(), getCurFunction(), clang::SourceRange::getEnd(), clang::ArraySubscriptExpr::getExprLoc(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), clang::Init, clang::InitializedEntity::InitializeCompoundLiteralInit(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::DeclContext::isFunctionOrMethod(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Type::isVariableArrayType(), LangOpts, MaybeBindToTemporary(), NTCUC_CompoundLiteral, NTCUK_Destruct, clang::opencl_private, clang::InitializationSequence::Perform(), RequireCompleteSizedType(), RequireCompleteType(), clang::Result, clang::CleanupInfo::setExprNeedsCleanups(), clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), tryToFixVariablyModifiedVarType(), clang::VK_LValue, and clang::VK_PRValue.

Referenced by ActOnCompoundLiteral(), BuildVectorLiteral(), and clang::TreeTransform< Derived >::RebuildCompoundLiteralExpr().

◆ BuildConvertedConstantExpression()

ExprResult Sema::BuildConvertedConstantExpression ( Expr From,
QualType  T,
CCEKind  CCE,
NamedDecl Dest = nullptr 
)

◆ BuildCoreturnStmt()

StmtResult Sema::BuildCoreturnStmt ( SourceLocation  KwLoc,
Expr E,
bool  IsImplicit = false 
)

◆ BuildCoroutineBodyStmt()

StmtResult Sema::BuildCoroutineBodyStmt ( CoroutineBodyStmt::CtorArgs  Args)

◆ buildCoroutineParameterMoves()

bool Sema::buildCoroutineParameterMoves ( SourceLocation  Loc)

◆ buildCoroutinePromise()

VarDecl * Sema::buildCoroutinePromise ( SourceLocation  Loc)

◆ BuildCoyieldExpr()

ExprResult Sema::BuildCoyieldExpr ( SourceLocation  KwLoc,
Expr E 
)

◆ BuildCStyleCastExpr()

ExprResult Sema::BuildCStyleCastExpr ( SourceLocation  LParenLoc,
TypeSourceInfo Ty,
SourceLocation  RParenLoc,
Expr Op 
)

◆ BuildCXXAssumeExpr()

ExprResult Sema::BuildCXXAssumeExpr ( Expr Assumption,
const IdentifierInfo AttrName,
SourceRange  Range 
)

◆ BuildCXXConstructExpr() [1/3]

ExprResult Sema::BuildCXXConstructExpr ( SourceLocation  ConstructLoc,
QualType  DeclInitType,
CXXConstructorDecl Constructor,
bool  Elidable,
MultiExprArg  Exprs,
bool  HadMultipleCandidates,
bool  IsListInitialization,
bool  IsStdInitListInitialization,
bool  RequiresZeroInit,
CXXConstructionKind  ConstructKind,
SourceRange  ParenRange 
)

Build a CXXConstructExpr whose constructor has already been resolved if it denotes an inherited constructor.

BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.

Definition at line 16126 of file SemaDeclCXX.cpp.

References CheckCUDACall(), CheckForImmediateInvocation(), Context, clang::CXXConstructExpr::Create(), clang::CUDA, clang::declaresSameEntity(), clang::ExprError(), clang::Type::getAsCXXRecordDecl(), clang::Type::getBaseElementTypeUnsafe(), getLangOpts(), and MarkFunctionReferenced().

◆ BuildCXXConstructExpr() [2/3]

ExprResult Sema::BuildCXXConstructExpr ( SourceLocation  ConstructLoc,
QualType  DeclInitType,
NamedDecl FoundDecl,
CXXConstructorDecl Constructor,
bool  Elidable,
MultiExprArg  Exprs,
bool  HadMultipleCandidates,
bool  IsListInitialization,
bool  IsStdInitListInitialization,
bool  RequiresZeroInit,
CXXConstructionKind  ConstructKind,
SourceRange  ParenRange 
)

◆ BuildCXXConstructExpr() [3/3]

ExprResult Sema::BuildCXXConstructExpr ( SourceLocation  ConstructLoc,
QualType  DeclInitType,
NamedDecl FoundDecl,
CXXConstructorDecl Constructor,
MultiExprArg  Exprs,
bool  HadMultipleCandidates,
bool  IsListInitialization,
bool  IsStdInitListInitialization,
bool  RequiresZeroInit,
CXXConstructionKind  ConstructKind,
SourceRange  ParenRange 
)

BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default argument expressions.

Parameters
ConstructKind- a CXXConstructExpr::ConstructionKind

Definition at line 16061 of file SemaDeclCXX.cpp.

References BuildCXXConstructExpr(), clang::Complete, Context, clang::Decl::getDeclContext(), hasOneRealArgument(), and clang::Expr::isTemporaryObject().

Referenced by BuildCXXCastArgument(), BuildCXXConstructExpr(), CopyObject(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformImplicitConversion(), and clang::TreeTransform< Derived >::RebuildCXXConstructExpr().

◆ BuildCXXDefaultArgExpr()

ExprResult Sema::BuildCXXDefaultArgExpr ( SourceLocation  CallLoc,
FunctionDecl FD,
ParmVarDecl Param,
Expr Init = nullptr 
)

◆ BuildCXXDefaultInitExpr()

ExprResult Sema::BuildCXXDefaultInitExpr ( SourceLocation  Loc,
FieldDecl Field 
)

◆ BuildCXXFoldExpr()

ExprResult Sema::BuildCXXFoldExpr ( UnresolvedLookupExpr Callee,
SourceLocation  LParenLoc,
Expr LHS,
BinaryOperatorKind  Operator,
SourceLocation  EllipsisLoc,
Expr RHS,
SourceLocation  RParenLoc,
std::optional< unsigned NumExpansions 
)

◆ 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,
ArrayRef< MaterializeTemporaryExpr * >  LifetimeExtendTemps = {} 
)

BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.

Definition at line 2773 of file SemaStmt.cpp.

References ActOnBinOp(), ActOnCoawaitExpr(), ActOnDeclStmt(), ActOnFinishFullExpr(), ActOnOpenMPLoopInitialization(), ActOnUnaryExprOrTypeTraitExpr(), ActOnUnaryOp(), AddInitializerToDecl(), clang::InitializedEntity::allocateManglingNumber(), Begin, BFRK_Build, BFRK_Check, BuildDeclRefExpr(), BuildNonArrayForRange(), CheckBooleanCondition(), clang::Expr::containsErrors(), Context, ConvertDeclToDeclGroup(), clang::CPlusPlus17, clang::CPlusPlus23, clang::IntegerLiteral::Create(), CreateParsedType(), clang::OverloadCandidateSet::CSK_Normal, clang::ASTContext::DependentTy, Diag(), FinishForRangeVarDecl(), FRS_NoViableFunction, FRS_Success, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsArrayTypeUnsafe(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::ASTContext::getAutoDeductType(), getCurScope(), clang::DeclRefExpr::getDecl(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::ASTContext::getPointerDiffType(), clang::DeclStmt::getSingleDecl(), clang::VarDecl::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::InitializedEntity::InitializeVariable(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isPointerType(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, PDiag(), RebuildForRangeWithDereference(), RequireCompleteType(), clang::ValueDecl::setType(), clang::StmtError(), SubstAutoTypeDependent(), and clang::VK_LValue.

Referenced by ActOnCXXForRangeStmt(), and clang::TreeTransform< Derived >::RebuildCXXForRangeStmt().

◆ BuildCXXFunctionalCastExpr()

ExprResult Sema::BuildCXXFunctionalCastExpr ( TypeSourceInfo TInfo,
QualType  Type,
SourceLocation  LParenLoc,
Expr CastExpr,
SourceLocation  RParenLoc 
)

◆ BuildCXXMemberCallExpr()

ExprResult Sema::BuildCXXMemberCallExpr ( Expr Exp,
NamedDecl FoundDecl,
CXXConversionDecl Method,
bool  HadMultipleCandidates 
)

◆ BuildCXXNamedCast()

ExprResult Sema::BuildCXXNamedCast ( SourceLocation  OpLoc,
tok::TokenKind  Kind,
TypeSourceInfo Ty,
Expr E,
SourceRange  AngleBrackets,
SourceRange  Parens 
)

◆ 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
SScope in which the nested-name-specifier occurs.
IdInfoParser information about an identifier in the nested-name-spec.
EnteringContextIf true, enter the context specified by the nested-name-specifier.
SSOptional nested name specifier preceding the identifier.
ScopeLookupResultProvides the result of name lookup within the scope of the nested-name-specifier that was computed at template definition time.
ErrorRecoveryLookupSpecifies if the method is called to improve error recovery and what kind of recovery is performed.
IsCorrectedToColonIf 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 '::'.
OnlyNamespaceIf 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 473 of file SemaCXXScopeSpec.cpp.

References clang::LookupResult::addDecl(), clang::Sema::NestedNameSpecInfo::CCLoc, clang::CXXScopeSpec::clear(), clang::LookupResult::clear(), computeDeclContext(), Context, CorrectTypo(), clang::CPlusPlus11, clang::FixItHint::CreateReplacement(), CTK_ErrorRecovery, CurContext, Diag(), diagnoseTypo(), DiagnoseUnknownTypeName(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::CXXScopeSpec::Extend(), clang::LookupResult::getAsSingle(), clang::Decl::getCanonicalDecl(), getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNameLoc(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getRepresentativeDecl(), clang::ASTContext::getTypeDeclType(), GetTypeFromParser(), clang::TypeLocBuilder::getTypeLocInContext(), clang::NamedDecl::getUnderlyingDecl(), clang::ASTContext::getUsingType(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::ASTContext::hasSameType(), clang::Sema::NestedNameSpecInfo::Identifier, clang::Sema::NestedNameSpecInfo::IdentifierLoc, isAcceptableNestedNameSpecifier(), clang::LookupResult::isAmbiguous(), clang::DeclContext::isDependentContext(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::IdentifierInfo::isEditorPlaceholder(), clang::Type::isEnumeralType(), clang::DeclContext::isFunctionOrMethod(), clang::QualType::isNull(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), LookupName(), LookupNamespaceName, LookupNestedNameSpecifierName, LookupOrdinaryName, LookupQualifiedName(), clang::CXXScopeSpec::MakeTrivial(), MarkAnyDeclReferenced(), clang::Sema::NestedNameSpecInfo::ObjectType, PDiag(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), RequireCompleteDeclContext(), clang::LookupResult::setContextRange(), clang::LookupResult::setLookupName(), clang::TypeSpecTypeLoc::setNameLoc(), and clang::LookupResult::suppressDiagnostics().

Referenced by ActOnCXXNestedNameSpecifier(), IsInvalidUnlessNestedName(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().

◆ BuildCXXNew()

ExprResult Sema::BuildCXXNew ( SourceRange  Range,
bool  UseGlobal,
SourceLocation  PlacementLParen,
MultiExprArg  PlacementArgs,
SourceLocation  PlacementRParen,
SourceRange  TypeIdParens,
QualType  AllocType,
TypeSourceInfo AllocTypeInfo,
std::optional< Expr * >  ArraySize,
SourceRange  DirectInitRange,
Expr Initializer 
)

Definition at line 2007 of file SemaExprCXX.cpp.

References AA_Converting, AFS_Both, AFS_Global, clang::AlreadyDiagnosed, clang::Braces, clang::Type::castAs(), CheckAllocatedType(), CheckArgsForPlaceholders(), checkArrayElementAlignment(), CheckPlaceholderExpr(), Context, clang::CPlusPlus14, clang::CPlusPlus17, clang::CPlusPlus20, clang::IntegerLiteral::Create(), clang::CXXNewExpr::Create(), clang::InitializationKind::CreateDefault(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateRemoval(), DeduceAutoType(), DeduceTemplateSpecializationFromInitializer(), Diag(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), doesUsualArrayDeleteWantSize(), clang::ExprError(), FindAllocationFunctions(), GatherArgumentsForCall(), clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getAsConstantArrayType(), clang::SourceRange::getBegin(), clang::DeclaratorDecl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::ASTContext::getCharWidth(), clang::ASTContext::getConstantArrayType(), clang::Type::getContainedDeducedType(), clang::SourceRange::getEnd(), clang::Expr::getExprLoc(), clang::ASTContext::getIncompleteArrayType(), clang::TargetInfo::getIntWidth(), getLangOpts(), clang::ASTContext::getLifetimeQualifiedType(), clang::Decl::getLocation(), clang::ConstantArrayType::getMaxSizeBits(), clang::TargetInfo::getNewAlign(), clang::ConstantArrayType::getNumAddressingBits(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), clang::ASTContext::getPointerType(), clang::CharUnits::getQuantity(), clang::ASTContext::getSizeType(), getSourceManager(), clang::Stmt::getSourceRange(), clang::TypeLoc::getSourceRange(), getStdAlignValT(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::getTypeAlign(), clang::ASTContext::getTypeDeclType(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::getTypeSize(), clang::ASTContext::getTypeSizeInChars(), clang::Expr::hasAnyTypeDependentArguments(), clang::InitializedEntity::InitializeNew(), clang::Initializer, clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Decl::isImplicit(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isLegalArrayNewInitializer(), clang::QualType::isNull(), clang::Type::isObjCLifetimeType(), clang::SourceLocation::isValid(), clang::SourceRange::isValid(), clang::FunctionProtoType::isVariadic(), MarkFunctionReferenced(), clang::None, clang::Normal, clang::Qualifiers::OCL_None, clang::OK_Ordinary, clang::ImplicitCastExpr::OnStack, clang::Parens, clang::InitializationSequence::Perform(), PerformContextualImplicitConversion(), PerformImplicitConversion(), clang::Result, StdAlignValT, clang::Success, toString(), VariadicDoesNotApply, VariadicFunction, and clang::VK_PRValue.

Referenced by ActOnCXXNew(), and clang::TreeTransform< Derived >::RebuildCXXNewExpr().

◆ BuildCXXNoexceptExpr()

ExprResult Sema::BuildCXXNoexceptExpr ( SourceLocation  KeyLoc,
Expr Operand,
SourceLocation  RParen 
)

◆ BuildCXXThisExpr()

Expr * Sema::BuildCXXThisExpr ( SourceLocation  Loc,
QualType  Type,
bool  IsImplicit 
)

◆ BuildCXXThrow()

ExprResult Sema::BuildCXXThrow ( SourceLocation  OpLoc,
Expr Ex,
bool  IsThrownVarInScope 
)

◆ BuildCXXTypeConstructExpr()

ExprResult Sema::BuildCXXTypeConstructExpr ( TypeSourceInfo Type,
SourceLocation  LParenLoc,
MultiExprArg  Exprs,
SourceLocation  RParenLoc,
bool  ListInitialization 
)

Definition at line 1496 of file SemaExprCXX.cpp.

References clang::AlreadyDiagnosed, BuildCXXFunctionalCastExpr(), Context, clang::CPlusPlus23, clang::CXXFunctionalCastExpr::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::InitializationKind::CreateValue(), CurFPFeatureOverrides(), DeduceAutoType(), DeduceTemplateSpecializationFromInitializer(), Diag(), clang::ExprError(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::Type::getContainedDeducedType(), clang::SourceRange::getEnd(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getNonReferenceType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Expr::getValueKindForType(), clang::Expr::hasAnyTypeDependentArguments(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isArrayType(), clang::DeducedType::isDeduced(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::QualType::isNull(), clang::Type::isVoidType(), clang::InitializationSequence::Perform(), RequireCompleteType(), clang::Result, and clang::Success.

Referenced by ActOnCXXTypeConstructExpr(), clang::TreeTransform< Derived >::RebuildCXXFunctionalCastExpr(), clang::TreeTransform< Derived >::RebuildCXXScalarValueInitExpr(), clang::TreeTransform< Derived >::RebuildCXXTemporaryObjectExpr(), and clang::TreeTransform< Derived >::RebuildCXXUnresolvedConstructExpr().

◆ BuildCXXTypeId() [1/2]

ExprResult Sema::BuildCXXTypeId ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
Expr Operand,
SourceLocation  RParenLoc 
)

◆ BuildCXXTypeId() [2/2]

ExprResult Sema::BuildCXXTypeId ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
TypeSourceInfo Operand,
SourceLocation  RParenLoc 
)

◆ BuildCXXUuidof() [1/2]

ExprResult Sema::BuildCXXUuidof ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
Expr Operand,
SourceLocation  RParenLoc 
)

◆ BuildCXXUuidof() [2/2]

ExprResult Sema::BuildCXXUuidof ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
TypeSourceInfo Operand,
SourceLocation  RParenLoc 
)

Build a Microsoft __uuidof expression with a type operand.

Definition at line 748 of file SemaExprCXX.cpp.

References Context, Diag(), clang::ExprError(), and getUuidAttrOfType().

Referenced by ActOnCXXUuidof(), and clang::TreeTransform< Derived >::RebuildCXXUuidofExpr().

◆ BuildDeclarationNameExpr() [1/2]

ExprResult Sema::BuildDeclarationNameExpr ( const CXXScopeSpec SS,
const DeclarationNameInfo NameInfo,
NamedDecl D,
NamedDecl FoundD = nullptr,
const TemplateArgumentListInfo TemplateArgs = nullptr,
bool  AcceptInvalidDecl = false 
)

◆ BuildDeclarationNameExpr() [2/2]

ExprResult Sema::BuildDeclarationNameExpr ( const CXXScopeSpec SS,
LookupResult R,
bool  NeedsADL,
bool  AcceptInvalidDecl = false 
)

◆ BuildDeclaratorGroup()

Sema::DeclGroupPtrTy Sema::BuildDeclaratorGroup ( MutableArrayRef< Decl * >  Group)

◆ BuildDeclRefExpr() [1/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 
)

◆ BuildDeclRefExpr() [2/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() [3/3]

DeclRefExpr * Sema::BuildDeclRefExpr ( ValueDecl D,
QualType  Ty,
ExprValueKind  VK,
SourceLocation  Loc,
const CXXScopeSpec SS = nullptr 
)

◆ BuildDecltypeType()

QualType Sema::BuildDecltypeType ( Expr E,
bool  AsUnevaluated = true 
)

◆ BuildDelegatingInitializer()

MemInitResult Sema::BuildDelegatingInitializer ( TypeSourceInfo TInfo,
Expr Init,
CXXRecordDecl ClassDecl 
)

◆ BuildDependentDeclRefExpr()

ExprResult Sema::BuildDependentDeclRefExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo TemplateArgs 
)

◆ BuildEmptyCXXFoldExpr()

ExprResult Sema::BuildEmptyCXXFoldExpr ( SourceLocation  EllipsisLoc,
BinaryOperatorKind  Operator 
)

◆ BuildExceptionDeclaration()

VarDecl * Sema::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.

Definition at line 16913 of file SemaDeclCXX.cpp.

References AbstractVariableType, Context, clang::VarDecl::Create(), clang::InitializationKind::CreateCopy(), CurContext, Diag(), FinalizeVarWithDestructor(), clang::ASTContext::getArrayDecayedType(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), clang::CXXConstructExpr::getConstructor(), clang::ASTContext::getExceptionObjectType(), getLangOpts(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::TypeSourceInfo::getType(), inferObjCARCLifetime(), clang::InitializedEntity::InitializeVariable(), clang::Invalid, clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ObjCRuntime::isFragile(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::Type::isRValueReferenceType(), clang::Type::isSizelessType(), clang::FunctionDecl::isTrivial(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), MaybeCreateExprWithCleanups(), clang::OK_Ordinary, clang::InitializationSequence::Perform(), PotentiallyEvaluated, clang::ast_matchers::recordType, RequireCompleteType(), RequireNonAbstractType(), clang::SC_None, clang::VarDecl::setExceptionVariable(), clang::VarDecl::setInit(), clang::Decl::setInvalidDecl(), and clang::VK_LValue.

Referenced by ActOnExceptionDeclarator(), and clang::TreeTransform< Derived >::RebuildExceptionDecl().

◆ 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 8289 of file SemaTemplate.cpp.

References BuildDeclarationNameExpr(), Context, clang::NestedNameSpecifier::Create(), CreateBuiltinUnaryOp(), clang::TemplateArgument::Declaration, DefaultFunctionArrayConversion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getArrayDecayedType(), clang::Type::getArrayElementTypeNoTypeQual(), clang::Type::getAs(), clang::TemplateArgument::getAsDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::TemplateArgument::getKind(), clang::QualType::getNonLValueExprType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSimilarType(), ImpCastExprToType(), clang::Type::isArrayType(), IsFunctionConversion(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isLValue(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::DeclContext::isRecord(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Type::isVoidPointerType(), clang::CXXScopeSpec::MakeTrivial(), clang::TemplateArgument::NullPtr, and clang::ASTContext::NullPtrTy.

Referenced by BuildExpressionFromNonTypeTemplateArgument(), and getTrivialTemplateArgumentLoc().

◆ BuildExpressionFromNonTypeTemplateArgument()

ExprResult Sema::BuildExpressionFromNonTypeTemplateArgument ( const TemplateArgument Arg,
SourceLocation  Loc 
)

◆ BuildExpressionTrait()

ExprResult Sema::BuildExpressionTrait ( ExpressionTrait  OET,
SourceLocation  KWLoc,
Expr Queried,
SourceLocation  RParen 
)

◆ BuildExprRequirement() [1/2]

concepts::ExprRequirement * Sema::BuildExprRequirement ( concepts::Requirement::SubstitutionDiagnostic ExprSubstDiag,
bool  IsSatisfied,
SourceLocation  NoexceptLoc,
concepts::ExprRequirement::ReturnTypeRequirement  ReturnTypeRequirement 
)

Definition at line 9247 of file SemaExprCXX.cpp.

References Context.

◆ BuildExprRequirement() [2/2]

concepts::ExprRequirement * Sema::BuildExprRequirement ( Expr E,
bool  IsSatisfied,
SourceLocation  NoexceptLoc,
concepts::ExprRequirement::ReturnTypeRequirement  ReturnTypeRequirement 
)

◆ BuildExtVectorType()

QualType Sema::BuildExtVectorType ( QualType  T,
Expr ArraySize,
SourceLocation  AttrLoc 
)

◆ BuildFieldReferenceExpr()

ExprResult Sema::BuildFieldReferenceExpr ( Expr BaseExpr,
bool  IsArrow,
SourceLocation  OpLoc,
const CXXScopeSpec SS,
FieldDecl Field,
DeclAccessPair  FoundDecl,
const DeclarationNameInfo MemberNameInfo 
)

◆ 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 16194 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::BestViableFunction(), clang::OverloadCandidateSet::clear(), clang::OverloadCandidateSet::CSK_Normal, clang::LookupResult::empty(), clang::OverloadCandidateSet::empty(), clang::ExprError(), FinishOverloadedCallExpr(), clang::ActionResult< PtrTy, Compress >::get(), clang::UnresolvedLookupExpr::getBeginLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::OR_No_Viable_Function, and clang::OR_Success.

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
TThe return type of the function.
ParamTypesThe parameter types of the function. This array will be modified to account for adjustments to the types of the function parameters.
LocThe 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.
EntityThe name of the entity that involves the function type, if known.
EPIExtra 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 3075 of file SemaType.cpp.

References clang::TargetInfo::allowHalfArgsAndReturns(), checkExtParameterInfos(), CheckFunctionReturnType(), checkNSReturnsRetainedReturnType(), Context, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), Diag(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionProtoType::ExtProtoInfo::ExtParameterInfos, clang::ASTContext::getAdjustedParameterType(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::FunctionType::ExtInfo::getProducesResult(), clang::ASTContext::getTargetInfo(), clang::Invalid, clang::Type::isHalfType(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), and clang::Type::isWebAssemblyTableType().

Referenced by clang::TreeTransform< Derived >::RebuildFunctionProtoType(), and SubstituteExplicitTemplateArguments().

◆ BuildIfStmt()

StmtResult Sema::BuildIfStmt ( SourceLocation  IfLoc,
IfStatementKind  StatementKind,
SourceLocation  LParenLoc,
Stmt InitStmt,
ConditionResult  Cond,
SourceLocation  RParenLoc,
Stmt ThenVal,
SourceLocation  ElseLoc,
Stmt ElseVal 
)

◆ 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 1920 of file SemaExprMember.cpp.

References BuildCXXThisExpr(), BuildMemberReferenceExpr(), clang::LookupResult::empty(), clang::SourceRange::getBegin(), getCurrentThisType(), getLangOpts(), clang::LookupResult::getNameLoc(), clang::CXXScopeSpec::getRange(), clang::HLSL, clang::LookupResult::isAmbiguous(), clang::QualType::isNull(), and clang::SourceRange::isValid().

Referenced by BuildPossibleImplicitMemberExpr().

◆ BuildInitList()

ExprResult Sema::BuildInitList ( SourceLocation  LBraceLoc,
MultiExprArg  InitArgList,
SourceLocation  RBraceLoc 
)

◆ 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
ReceiverThe 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.
ReceiverTypeThe (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.
SuperLocThe location of the "super" keyword in a superclass instance message.
SelThe selector to which the message is being sent.
MethodThe method that this instance message is invoking, if already known.
LBracLocThe location of the opening square bracket ']'.
RBracLocThe location of the closing square bracket ']'.
ArgsInThe message arguments.

Definition at line 2840 of file SemaExprObjC.cpp.

References AreMultipleMethodsInGlobalPool(), checkCocoaAPI(), checkFoundationAPI(), checkInitMethod(), CheckMessageArgumentTypes(), CheckPlaceholderExpr(), checkRetainCycles(), CollectMultipleMethodsInGlobalPool(), Context, clang::CPlusPlus, clang::ObjCMessageExpr::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), CurContext, DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, Diag(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseUseOfDecl(), Diags, clang::ExprError(), clang::ObjCMethodDecl::findPropertyDecl(), forceUnknownAnyToType(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Type::getAsObjCInterfacePointerType(), clang::Type::getAsObjCQualifiedClassType(), clang::Type::getAsObjCQualifiedIdType(), clang::Stmt::getBeginLoc(), clang::ObjCMethodDecl::getClassInterface(), getCurFunction(), getCurMethodDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), getEnclosingFunction(), clang::Expr::getExprLoc(), getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::Selector::getMethodFamily(), clang::NamedDecl::getName(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCInterfaceType(), clang::QualType::getObjCLifetime(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), ImpCastExprToType(), clang::Type::isBlockPointerType(), clang::ObjCMethodDecl::isDesignatedInitializerForTheInterface(), clang::ObjCMethodDecl::isDirectMethod(), clang::DiagnosticsEngine::isIgnored(), clang::ObjCMethodDecl::isInstanceMethod(), clang::Type::isIntegerType(), clang::SourceLocation::isInvalid(), isMethodDeclaredInRootProtocol(), clang::QualType::isNull(), IsNull, clang::Expr::isNullPointerConstant(), clang::Type::isObjCClassOrClassKindOfType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdOrObjectKindOfType(), clang::Type::isObjCIdType(), clang::ASTContext::isObjCNSObjectType(), clang::Type::isObjCQualifiedClassType(), clang::Type::isObjCRetainableType(), clang::Expr::isObjCSelfExpr(), clang::Type::isPointerType(), isSelfExpr(), clang::Expr::isTypeDependent(), clang::Selector::isUnarySelector(), isUnevaluatedContext(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), clang::ObjCPropertyAttribute::kind_weak, LookupFactoryMethodInGlobalPool(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), LookupInstanceMethodInGlobalPool(), LookupMethodInQualifiedType(), clang::ObjCInterfaceDecl::lookupPrivateMethod(), MaybeBindToTemporary(), clang::Expr::NPC_ValueDependentIsNull, clang::sema::FunctionScopeInfo::ObjCIsDesignatedInit, clang::sema::FunctionScopeInfo::ObjCIsSecondaryInit, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::Qualifiers::OCL_Weak, 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, PerformContextuallyConvertToObjCPointer(), clang::sema::FunctionScopeInfo::recordUseOfWeak(), RequireCompleteType(), clang::Result, clang::ASTContext::UnknownAnyTy, and clang::VK_PRValue.

Referenced by ActOnInstanceMessage(), ActOnSuperMessage(), BuildInstanceMessageImplicit(), and clang::TreeTransform< Derived >::RebuildObjCMessageExpr().

◆ BuildInstanceMessageImplicit()

ExprResult Sema::BuildInstanceMessageImplicit ( Expr Receiver,
QualType  ReceiverType,
SourceLocation  Loc,
Selector  Sel,
ObjCMethodDecl Method,
MultiExprArg  Args 
)

Definition at line 2782 of file SemaExprObjC.cpp.

References BuildInstanceMessage().

Referenced by CheckObjCBridgeRelatedConversions().

◆ BuildIvarRefExpr()

ExprResult Sema::BuildIvarRefExpr ( Scope S,
SourceLocation  Loc,
ObjCIvarDecl IV 
)

◆ 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 2009 of file SemaLambda.cpp.

References ActOnFields(), addBlockPointerConversion(), addFunctionPointerConversions(), BuildCaptureField(), BuildCaptureInit(), clang::sema::LambdaScopeInfo::CallOperator, clang::sema::LambdaScopeInfo::CaptureDefaultLoc, clang::sema::CapturingScopeInfo::Captures, CheckCompletedCXXClass(), CheckConstexprFunctionDefinition(), CheckValid, clang::Class, clang::sema::LambdaScopeInfo::Cleanup, Cleanup, ConstantEvaluated, clang::Constexpr, clang::sema::LambdaScopeInfo::ContainsUnexpandedParameterPack, Context, clang::CPlusPlus17, clang::CPlusPlus20, clang::LambdaExpr::Create(), clang::FixItHint::CreateInsertion(), CUDACheckLambdaCapture(), CurContext, Diag(), DiagnoseShadowingLambdaDecls(), DiagnoseUnusedLambdaCapture(), DiscardedStatement, clang::sema::LambdaScopeInfo::ExplicitCaptureRanges, clang::sema::LambdaScopeInfo::ExplicitParams, clang::ExprError(), ExprEvalContexts, clang::SourceRange::getBegin(), clang::FunctionDecl::getBody(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::sema::Capture::getEllipsisLoc(), clang::SourceRange::getEnd(), getLangOpts(), clang::sema::Capture::getLocation(), getLocForEndOfToken(), clang::sema::Capture::getVariable(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::if(), ImmediateFunctionContext, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::Init, clang::sema::LambdaScopeInfo::IntroducerRange, clang::sema::Capture::isBlockCapture(), clang::FunctionDecl::isConstexpr(), clang::sema::Capture::isCopyCapture(), clang::DeclContext::isDependentContext(), clang::sema::Capture::isInitCapture(), clang::sema::Capture::isInvalid(), clang::Decl::isInvalidDecl(), 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, LangOpts, clang::LCD_ByCopy, clang::LCD_None, clang::LCK_ByCopy, clang::LCK_ByRef, clang::LCK_StarThis, clang::LCK_This, clang::LCK_VLAType, mapImplicitCaptureStyle(), MaybeBindToTemporary(), clang::CleanupInfo::mergeFrom(), clang::sema::LambdaScopeInfo::NumExplicitCaptures, clang::ObjC, PopExpressionEvaluationContext(), PotentiallyEvaluated, PotentiallyEvaluatedIfUsed, clang::FunctionDecl::setConstexprKind(), clang::Decl::setLexicalDeclContext(), Unevaluated, UnevaluatedAbstract, UnevaluatedList, and clang::Unspecified.

Referenced by ActOnLambdaExpr().

◆ buildLambdaInitCaptureInitialization()

QualType Sema::buildLambdaInitCaptureInitialization ( SourceLocation  Loc,
bool  ByRef,
SourceLocation  EllipsisLoc,
std::optional< unsigned NumExpansions,
IdentifierInfo Id,
bool  DirectInit,
Expr *&  Init 
)

◆ buildLambdaScope()

void Sema::buildLambdaScope ( sema::LambdaScopeInfo LSI,
CXXMethodDecl CallOperator,
SourceRange  IntroducerRange,
LambdaCaptureDefault  CaptureDefault,
SourceLocation  CaptureDefaultLoc,
bool  ExplicitParams,
bool  Mutable 
)

◆ BuildLiteralOperatorCall()

ExprResult Sema::BuildLiteralOperatorCall ( LookupResult R,
DeclarationNameInfo SuffixInfo,
ArrayRef< Expr * >  Args,
SourceLocation  LitEndLoc,
TemplateArgumentListInfo ExplicitTemplateArgs = nullptr 
)

◆ BuildMatrixType()

QualType Sema::BuildMatrixType ( QualType  T,
Expr NumRows,
Expr NumColumns,
SourceLocation  AttrLoc 
)

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

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

◆ BuildMemberInitializer()

MemInitResult Sema::BuildMemberInitializer ( ValueDecl Member,
Expr Init,
SourceLocation  IdLoc 
)

◆ BuildMemberPointerType()

QualType Sema::BuildMemberPointerType ( QualType  T,
QualType  Class,
SourceLocation  Loc,
DeclarationName  Entity 
)

Build a member pointer type T Class::*.

Parameters
Tthe type to which the member pointer refers.
Classthe class type into which the member pointer points.
Locthe location where this type begins
Entitythe 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 3133 of file SemaType.cpp.

References adjustMemberFunctionCC(), CheckDistantExceptionSpec(), clang::Class, Context, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, Diag(), getLangOpts(), clang::ASTContext::getMemberPointerType(), clang::DeclarationName::getNameKind(), getOpenCLOptions(), getPrintableNameForEntity(), clang::HLSL, clang::Type::isFunctionType(), clang::Type::isReferenceType(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), and clang::OpenCL.

Referenced by GetFullTypeForDeclarator(), and clang::TreeTransform< Derived >::RebuildMemberPointerType().

◆ BuildMemberReferenceExpr() [1/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 983 of file SemaExprMember.cpp.

References ActOnDependentMemberExpr(), ActOnMemberAccessExpr(), ActOnStartCXXMemberReference(), clang::LookupResult::begin(), clang::ASTContext::BoundMemberTy, BuildAnonymousStructUnionMemberReference(), BuildCXXThisExpr(), BuildDeclarationNameExpr(), BuildFieldReferenceExpr(), BuildMemberExpr(), BuildMSPropertyRefExpr(), BuildTemplateIdExpr(), clang::Type::castAs(), CheckQualifiedMemberReference(), CheckVarTemplateId(), computeDeclContext(), Context, clang::UnresolvedMemberExpr::Create(), clang::FixItHint::CreateReplacement(), Diag(), diagnoseMissingTemplateArguments(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::Enum, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), getCurFunctionDecl(), getCurScope(), clang::LookupResult::getFoundDecl(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getNameLoc(), clang::QualType::getNonReferenceType(), clang::UnresolvedSetIterator::getPair(), clang::CXXScopeSpec::getRange(), clang::Stmt::getSourceRange(), clang::VarDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::CXXScopeSpec::getWithLocInContext(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Sema::ActOnMemberAccessExtraArgs::Id, clang::Expr::IgnoreImpCasts(), int, clang::LookupResult::isAmbiguous(), clang::NamedDecl::isCXXInstanceMember(), IsInFnTryBlockHandler(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::LookupResult::isOverloadedResult(), clang::Type::isPointerType(), clang::Expr::isPRValue(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::LookupResult::isUnresolvableResult(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::SourceLocation::isValid(), clang::SourceRange::isValid(), clang::Sema::ActOnMemberAccessExtraArgs::ObjCImpDecl, clang::OK_Ordinary, clang::Sema::ActOnMemberAccessExtraArgs::S, clang::LookupResult::setBaseObjectType(), clang::VarDecl::setTemplateSpecializationKind(), clang::LookupResult::suppressDiagnostics(), TemporaryMaterializationConversion(), clang::TSK_ImplicitInstantiation, clang::ast_matchers::type, clang::VK_LValue, and clang::VK_PRValue.

◆ BuildMemberReferenceExpr() [2/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 
)

◆ 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 4445 of file SemaDeclCXX.cpp.

References AdjustDeclIfTemplate(), clang::CXXRecordDecl::bases(), BuildBaseInitializer(), BuildDecltypeType(), BuildMemberInitializer(), BuildPackIndexingType(), clang::TypeLoc::castAs(), CheckTypenameType(), clang::LookupResult::clear(), computeDeclContext(), Context, CorrectDelayedTyposInExpr(), CorrectTypo(), clang::ASTContext::CreateTypeSourceInfo(), CTK_ErrorRecovery, Diag(), diagnoseTypo(), clang::LookupResult::empty(), FindBaseInitializer(), clang::OpaquePtr< PtrTy >::get(), clang::ActionResult< PtrTy, Compress >::get(), clang::LookupResult::getAsSingle(), clang::CXXBaseSpecifier::getBeginLoc(), clang::DeclSpec::getBeginLoc(), clang::TypoCorrection::getCorrectionDeclAs(), getElaboratedType(), clang::DeclSpec::getEllipsisLoc(), getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::ElaboratedTypeLoc::getNamedTypeLoc(), clang::DeclSpec::getPackIndexingExpr(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getRepAsType(), clang::CXXBaseSpecifier::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::CXXBaseSpecifier::getType(), clang::ASTContext::getTypeDeclType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::ASTContext::hasSameTemplateName(), clang::Init, clang::LookupResult::isAmbiguous(), isDependentScopeSpecifier(), clang::QualType::isNull(), clang::TypeLoc::isNull(), clang::CXXScopeSpec::isSet(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::SourceLocation::isValid(), LookupOrdinaryName, LookupParsedName(), MarkAnyDeclReferenced(), clang::Member, clang::None, PDiag(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::LookupResult::setLookupName(), clang::DependentNameTypeLoc::setNameLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::LookupResult::suppressDiagnostics(), clang::TST_decltype, clang::TST_decltype_auto, and clang::TST_typename_pack_indexing.

Referenced by ActOnMemInitializer().

◆ BuildMicrosoftCAnonymousStruct()

Decl * Sema::BuildMicrosoftCAnonymousStruct ( Scope S,
DeclSpec DS,
RecordDecl Record 
)

◆ BuildModuleInclude()

void Sema::BuildModuleInclude ( SourceLocation  DirectiveLoc,
Module Mod 
)

◆ BuildMSDependentExistsStmt()

StmtResult Sema::BuildMSDependentExistsStmt ( SourceLocation  KeywordLoc,
bool  IsIfExists,
NestedNameSpecifierLoc  QualifierLoc,
DeclarationNameInfo  NameInfo,
Stmt Nested 
)

◆ BuildNestedRequirement() [1/2]

concepts::NestedRequirement * Sema::BuildNestedRequirement ( Expr E)

◆ BuildNestedRequirement() [2/2]

concepts::NestedRequirement * Sema::BuildNestedRequirement ( StringRef  InvalidConstraintEntity,
const ASTConstraintSatisfaction Satisfaction 
)

Definition at line 9283 of file SemaExprCXX.cpp.

References Context, and clang::ASTConstraintSatisfaction::Rebuild().

◆ BuildObjCArrayLiteral()

ExprResult Sema::BuildObjCArrayLiteral ( SourceRange  SR,
MultiExprArg  Elements 
)

◆ BuildObjCAtThrowStmt()

StmtResult Sema::BuildObjCAtThrowStmt ( SourceLocation  AtLoc,
Expr Throw 
)

◆ 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 501 of file SemaExprObjC.cpp.

References clang::Ascii, bytes(), clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::CharTy, Context, clang::ParmVarDecl::Create(), clang::ObjCMethodDecl::Create(), DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, Diag(), DiagnoseUseOfDecl(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::ASTContext::getAttributedType(), clang::SourceRange::getBegin(), clang::Expr::getExprLoc(), getLangOpts(), getNSNumberFactoryMethod(), clang::Type::getNullability(), clang::AttributedType::getNullabilityAttrKind(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ObjCMethodDecl::getReturnType(), clang::SelectorTable::getSelector(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::SelectorTable::getUnarySelector(), clang::ASTContext::getWideCharType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::Idents, clang::Expr::IgnoreParens(), clang::InitializedEntity::InitializeParameter(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isBuiltinType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isObjCBoxableRecordType(), clang::QualType::isTriviallyCopyableType(), clang::Expr::isTypeDependent(), LK_Boxed, LK_String, clang::ObjCInterfaceDecl::lookupClassMethod(), LookupObjCInterfaceDeclForLiteral(), MaybeBindToTemporary(), clang::NonNull, NSNumberPointer, NSStringDecl, NSStringPointer, NSValueDecl, NSValuePointer, clang::ObjCMethodDecl::parameters(), PerformCopyInitialization(), clang::Required, clang::SC_None, clang::ASTContext::Selectors, clang::ObjCMethodDecl::setMethodParams(), StringWithUTF8StringMethod, clang::ast_matchers::type, clang::UTF16, clang::UTF32, clang::UTF8, validateBoxingMethod(), ValueWithBytesObjCTypeMethod, clang::ASTContext::VoidPtrTy, clang::Wide, and clang::CanQual< T >::withConst().

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

◆ BuildObjCBridgedCast()

ExprResult Sema::BuildObjCBridgedCast ( SourceLocation  LParenLoc,
ObjCBridgeCastKind  Kind,
SourceLocation  BridgeKeywordLoc,
TypeSourceInfo TSInfo,
Expr SubExpr 
)

◆ BuildObjCDictionaryLiteral()

ExprResult Sema::BuildObjCDictionaryLiteral ( SourceRange  SR,
MutableArrayRef< ObjCDictionaryElement Elements 
)

◆ BuildObjCEncodeExpression()

ExprResult Sema::BuildObjCEncodeExpression ( SourceLocation  AtLoc,
TypeSourceInfo EncodedTypeInfo,
SourceLocation  RParenLoc 
)

◆ BuildObjCExceptionDecl()

VarDecl * Sema::BuildObjCExceptionDecl ( TypeSourceInfo TInfo,
QualType  ExceptionType,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
IdentifierInfo Id,
bool  Invalid = false 
)

◆ BuildObjCNumericLiteral()

ExprResult Sema::BuildObjCNumericLiteral ( SourceLocation  AtLoc,
Expr Number 
)

◆ 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,
bool  Rebuilding 
)

◆ BuildObjCStringLiteral()

ExprResult Sema::BuildObjCStringLiteral ( SourceLocation  AtLoc,
StringLiteral S 
)

◆ BuildObjCSubscriptExpression()

ExprResult Sema::BuildObjCSubscriptExpression ( SourceLocation  RB,
Expr BaseExpr,
Expr IndexExpr,
ObjCMethodDecl getterMethod,
ObjCMethodDecl setterMethod 
)

◆ 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 1057 of file SemaType.cpp.

References clang::ASTContext::applyObjCProtocolQualifiers(), Context, Diag(), and clang::Result.

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

◆ BuildOperatorCoawaitCall()

ExprResult Sema::BuildOperatorCoawaitCall ( SourceLocation  Loc,
Expr E,
UnresolvedLookupExpr Lookup 
)

Build a call to 'operator co_await' if there is a suitable operator for the given expression.

Definition at line 252 of file SemaCoroutine.cpp.

References clang::UnresolvedSetImpl::append(), CreateOverloadedUnaryOp(), clang::OverloadExpr::decls_begin(), and clang::OverloadExpr::decls_end().

Referenced by buildOperatorCoawaitCall(), BuildUnresolvedCoawaitExpr(), and clang::TreeTransform< Derived >::RebuildCoawaitExpr().

◆ BuildOperatorCoawaitLookupExpr()

ExprResult Sema::BuildOperatorCoawaitLookupExpr ( Scope S,
SourceLocation  Loc 
)

◆ 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 15984 of file SemaOverload.cpp.

References clang::LookupResult::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::Type::castAs(), checkPlaceholderForOverload(), clang::OverloadCandidateSet::CompleteCandidates(), clang::CXXOperatorCallExpr::Create(), CreateFunctionRefExpr(), clang::FixItHint::CreateReplacement(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, Diag(), clang::OverloadCandidateSet::empty(), clang::LookupResult::end(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::DeclarationNameTable::getCXXOperatorName(), clang::RecordType::getDecl(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getReturnType(), clang::ValueDecl::getType(), clang::Expr::getValueKindForType(), clang::LookupResult::isAmbiguous(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::OverloadCandidateSet::size(), and clang::LookupResult::suppressAccessDiagnostics().

Referenced by ActOnStartCXXMemberReference(), and clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr().

◆ 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 14184 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::BestViableFunction(), clang::CallExpr::Create(), clang::OverloadCandidateSet::CSK_Normal, clang::ASTContext::DependentTy, FinishOverloadedCallExpr(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::isTemplateInstantiation(), clang::Type::isUndeducedType(), markUnaddressableCandidatesUnviable(), clang::OR_Success, clang::VK_PRValue, and clang::FunctionDecl::willHaveBody().

Referenced by BuildCallExpr().

◆ buildOverloadedCallSet()

bool Sema::buildOverloadedCallSet ( Scope S,
Expr Fn,
UnresolvedLookupExpr ULE,
MultiExprArg  Args,
SourceLocation  RParenLoc,
OverloadCandidateSet CandidateSet,
ExprResult Result 
)

◆ BuildPackIndexingExpr()

ExprResult Sema::BuildPackIndexingExpr ( Expr PackExpression,
SourceLocation  EllipsisLoc,
Expr IndexExpr,
SourceLocation  RSquareLoc,
ArrayRef< Expr * >  ExpandedExprs = {},
bool  EmptyPack = false 
)

◆ BuildPackIndexingType()

QualType Sema::BuildPackIndexingType ( QualType  Pattern,
Expr IndexExpr,
SourceLocation  Loc,
SourceLocation  EllipsisLoc,
bool  FullySubstituted = false,
ArrayRef< QualType Expansions = {} 
)

◆ BuildParenType()

QualType Sema::BuildParenType ( QualType  T)

Build a paren type including T.

Definition at line 2056 of file SemaType.cpp.

References Context, and clang::ASTContext::getParenType().

Referenced by GetFullTypeForDeclarator(), and clang::TreeTransform< Derived >::RebuildParenType().

◆ BuildParmVarDeclForTypedef()

ParmVarDecl * Sema::BuildParmVarDeclForTypedef ( DeclContext DC,
SourceLocation  Loc,
QualType  T 
)

◆ BuildPointerType()

QualType Sema::BuildPointerType ( QualType  T,
SourceLocation  Loc,
DeclarationName  Entity 
)

Build a pointer type.

Parameters
TThe type to which we'll be building a pointer.
LocThe 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.
EntityThe 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 2199 of file SemaType.cpp.

References checkQualifiedFunction(), Context, deduceOpenCLPointeeAddrSpace(), Diag(), getASTContext(), getLangOpts(), getOpenCLOptions(), clang::ASTContext::getPointerType(), getPrintableNameForEntity(), clang::Type::getUnqualifiedDesugaredType(), clang::HLSL, inferARCLifetimeForPointee(), clang::Type::isFunctionType(), clang::Type::isObjCObjectType(), clang::Type::isReferenceType(), clang::SourceLocation::isValid(), clang::QualType::isWebAssemblyReferenceType(), clang::Type::isWebAssemblyTableType(), and clang::OpenCL.

Referenced by BuiltinAddPointer(), GetFullTypeForDeclarator(), and clang::TreeTransform< Derived >::RebuildPointerType().

◆ BuildPossibleImplicitMemberExpr()

ExprResult Sema::BuildPossibleImplicitMemberExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
LookupResult R,
const TemplateArgumentListInfo TemplateArgs,
const Scope S,
UnresolvedLookupExpr AsULE = nullptr 
)

◆ BuildPredefinedExpr()

ExprResult Sema::BuildPredefinedExpr ( SourceLocation  Loc,
PredefinedIdentKind  IK 
)

◆ BuildPseudoDestructorExpr()

ExprResult Sema::BuildPseudoDestructorExpr ( Expr Base,
SourceLocation  OpLoc,
tok::TokenKind  OpKind,
const CXXScopeSpec SS,
TypeSourceInfo ScopeType,
SourceLocation  CCLoc,
SourceLocation  TildeLoc,
PseudoDestructorTypeStorage  DestroyedType 
)

◆ 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 2937 of file SemaExpr.cpp.

References clang::LookupResult::begin(), BuildDeclarationNameExpr(), BuildDependentDeclRefExpr(), BuildPossibleImplicitMemberExpr(), computeDeclContext(), Context, clang::FixItHint::CreateInsertion(), Diag(), clang::LookupResult::empty(), clang::ExprEmpty(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::CXXScopeSpec::getBeginLoc(), getElaboratedType(), clang::DeclarationNameInfo::getEndLoc(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getResultKind(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::getTypeDeclType(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isAmbiguous(), clang::DeclarationName::isDependentName(), LookupOrdinaryName, LookupQualifiedName(), clang::None, clang::LookupResult::NotFoundInCurrentInstantiation, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), RequireCompleteDeclContext(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::TypeSpecTypeLoc::setNameLoc(), and clang::ElaboratedTypeLoc::setQualifierLoc().

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

◆ BuildQualifiedTemplateIdExpr()

ExprResult Sema::BuildQualifiedTemplateIdExpr ( CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo TemplateArgs 
)

◆ BuildQualifiedType() [1/2]

QualType Sema::BuildQualifiedType ( QualType  T,
SourceLocation  Loc,
Qualifiers  Qs,
const DeclSpec DS = nullptr 
)

◆ BuildQualifiedType() [2/2]

QualType Sema::BuildQualifiedType ( QualType  T,
SourceLocation  Loc,
unsigned  CVRA,
const DeclSpec DS = nullptr 
)

◆ BuildReadPipeType()

QualType Sema::BuildReadPipeType ( QualType  T,
SourceLocation  Loc 
)

Build a Read-only Pipe type.

Parameters
TThe type to which we'll be building a Pipe.
LocWe do not use it for now.
Returns
A suitable pipe type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 2347 of file SemaType.cpp.

References Context, and clang::ASTContext::getReadPipeType().

Referenced by GetFullTypeForDeclarator(), and clang::TreeTransform< Derived >::RebuildPipeType().

◆ BuildReferenceType()

QualType Sema::BuildReferenceType ( QualType  T,
bool  SpelledAsLValue,
SourceLocation  Loc,
DeclarationName  Entity 
)

Build a reference type.

Parameters
TThe type to which we'll be building a reference.
LocThe 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.
EntityThe 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 2264 of file SemaType.cpp.

References checkQualifiedFunction(), Context, deduceOpenCLPointeeAddrSpace(), Diag(), clang::Type::getAs(), getASTContext(), clang::ASTContext::getCanonicalType(), getLangOpts(), clang::ASTContext::getLValueReferenceType(), getOpenCLOptions(), clang::ASTContext::getRValueReferenceType(), clang::HLSL, inferARCLifetimeForPointee(), clang::Type::isFunctionType(), clang::SourceLocation::isValid(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), clang::Type::isWebAssemblyTableType(), clang::OpenCL, and clang::ASTContext::OverloadTy.

Referenced by buildLambdaInitCaptureInitialization(), BuiltinAddReference(), castForMoving(), CastForMoving(), checkTupleLikeDecomposition(), GetFullTypeForDeclarator(), and clang::TreeTransform< Derived >::RebuildReferenceType().

◆ 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
NDeclthe declaration being called, if available

Definition at line 7463 of file SemaExpr.cpp.

References clang::ASTContext::BoolTy, clang::ASTContext::BuiltinInfo, CallExprUnaryConversions(), clang::Type::castAs(), CheckCallReturnType(), CheckForImmediateInvocation(), CheckFunctionCall(), clang::CallExpr::computeDependence(), Context, ConvertArgumentsForCall(), CorrectDelayedTyposInExpr(), clang::CallExpr::Create(), clang::CUDAKernelCallExpr::Create(), clang::CUDA, CurFPFeatureOverrides(), DefaultArgumentPromotion(), Diag(), DiagnoseSentinelCalls(), Diags, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::CallExpr::getArgs(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::FunctionDecl::getBuiltinID(), clang::FunctionDecl::getCallResultType(), clang::FunctionType::getCallResultType(), clang::FunctionType::getCmseNSCallAttr(), getCurFunctionDecl(), clang::Expr::getExprLoc(), getLangOpts(), clang::Decl::getLocation(), clang::CallExpr::getNumArgs(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::FunctionType::getReturnType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::Expr::getValueKindForType(), clang::Decl::hasAttr(), clang::FunctionDecl::hasBody(), clang::Builtin::Context::hasCustomTypechecking(), clang::TargetInfo::hasFeature(), clang::FunctionDecl::hasPrototype(), ImpCastExprToType(), clang::InitializedEntity::InitializeParameter(), clang::ASTContext::isDependenceAllowed(), clang::DiagnosticsEngine::isIgnored(), clang::Decl::isImplicit(), clang::Type::isInstantiationDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isSpecificBuiltinType(), clang::Type::isVoidType(), MaybeBindToTemporary(), clang::FunctionDecl::param_size(), PerformCopyInitialization(), rebuildUnknownAnyFunction(), RequireCompleteType(), clang::Result, clang::CallExpr::setArg(), clang::CallExpr::setNumArgsUnsafe(), clang::Expr::setType(), clang::Expr::setValueKind(), clang::CallExpr::shrinkNumArgs(), clang::ASTContext::UnknownAnyTy, and clang::VK_PRValue.

Referenced by BuildCallExpr(), and FinishOverloadedCallExpr().

◆ BuildResolvedCoawaitExpr()

ExprResult Sema::BuildResolvedCoawaitExpr ( SourceLocation  KwLoc,
Expr Operand,
Expr Awaiter,
bool  IsImplicit = false 
)

◆ BuildReturnStmt()

StmtResult Sema::BuildReturnStmt ( SourceLocation  ReturnLoc,
Expr RetValExp,
bool  AllowRecovery = false 
)

Definition at line 4017 of file SemaStmt.cpp.

References ActOnCapScopeReturnStmt(), ActOnFinishFullExpr(), CheckSimplerImplicitMovesMSVCWorkaround(), clang::Type::containsErrors(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus14, clang::ReturnStmt::Create(), CreateRecoveryExpr(), CurContext, DeduceFunctionTypeFromReturnExpr(), Diag(), DiagnoseUnexpandedParameterPack(), ExprEvalContexts, ForceOff, FunctionScopes, clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Decl::getAttrs(), clang::Stmt::getBeginLoc(), clang::QualType::getCanonicalType(), clang::Type::getContainedAutoType(), getCopyElisionCandidate(), getCurFunction(), getCurFunctionDecl(), getCurFunctionOrMethodDecl(), getCurMethodDecl(), clang::RecordType::getDecl(), clang::Stmt::getEndLoc(), getLangOpts(), getNamedReturnInfo(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::FunctionDecl::getReturnType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), IgnoredValueConversions(), ImpCastExprToType(), clang::InitializedEntity::InitializeRelatedResult(), clang::InitializedEntity::InitializeResult(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isMain(), clang::FunctionDecl::isNoReturn(), clang::QualType::isNull(), clang::RecordDecl::isOrContainsUnion(), clang::Expr::isTypeDependent(), clang::Type::isVoidType(), Normal, PerformCopyInitialization(), PerformMoveOrCopyInitialization(), clang::Result, clang::Decl::setInvalidDecl(), clang::StmtError(), and clang::ASTContext::VoidTy.

Referenced by ActOnReturnStmt(), DefineImplicitCopyAssignment(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), and clang::TreeTransform< Derived >::RebuildReturnStmt().

◆ BuildSourceLocExpr()

ExprResult Sema::BuildSourceLocExpr ( SourceLocIdentKind  Kind,
QualType  ResultTy,
SourceLocation  BuiltinLoc,
SourceLocation  RPLoc,
DeclContext ParentContext 
)

Definition at line 17581 of file SemaExpr.cpp.

References Context.

Referenced by ActOnSourceLocExpr(), and clang::TreeTransform< Derived >::RebuildSourceLocExpr().

◆ BuildStaticAssertDeclaration()

Decl * Sema::BuildStaticAssertDeclaration ( SourceLocation  StaticAssertLoc,
Expr AssertExpr,
Expr AssertMessageExpr,
SourceLocation  RParenLoc,
bool  Failed 
)

◆ 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 12089 of file SemaDeclCXX.cpp.

References clang::TemplateArgumentListInfo::addArgument(), CheckTemplateIdType(), Context, clang::NestedNameSpecifier::Create(), clang::ASTContext::getElaboratedType(), getStdNamespace(), clang::ASTContext::getTrivialTypeSourceInfo(), LookupStdInitializerList(), clang::None, and StdInitializerList.

Referenced by DeduceAutoType().

◆ BuildStmtExpr()

ExprResult Sema::BuildStmtExpr ( SourceLocation  LPLoc,
Stmt SubStmt,
SourceLocation  RPLoc,
unsigned  TemplateDepth 
)

◆ BuildSYCLUniqueStableNameExpr()

ExprResult Sema::BuildSYCLUniqueStableNameExpr ( SourceLocation  OpLoc,
SourceLocation  LParen,
SourceLocation  RParen,
TypeSourceInfo TSI 
)

◆ BuildSynthesizedThreeWayComparison()

ExprResult Sema::BuildSynthesizedThreeWayComparison ( SourceLocation  OpLoc,
const UnresolvedSetImpl Fns,
Expr LHS,
Expr RHS,
FunctionDecl DefaultedFn 
)

◆ BuildTemplateIdExpr()

ExprResult Sema::BuildTemplateIdExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
LookupResult R,
bool  RequiresADL,
const TemplateArgumentListInfo TemplateArgs 
)

◆ BuildTypeConstraint()

bool Sema::BuildTypeConstraint ( const CXXScopeSpec SS,
TemplateIdAnnotation TypeConstraint,
TemplateTypeParmDecl ConstrainedParameter,
SourceLocation  EllipsisLoc,
bool  AllowUnexpandedPack 
)

◆ BuildTypeofExprType()

QualType Sema::BuildTypeofExprType ( Expr E,
TypeOfKind  Kind 
)

◆ BuildTypeRequirement() [1/2]

concepts::TypeRequirement * Sema::BuildTypeRequirement ( concepts::Requirement::SubstitutionDiagnostic SubstDiag)

Definition at line 9262 of file SemaExprCXX.cpp.

References Context.

◆ BuildTypeRequirement() [2/2]

concepts::TypeRequirement * Sema::BuildTypeRequirement ( TypeSourceInfo Type)

◆ BuildTypeTrait()

ExprResult Sema::BuildTypeTrait ( TypeTrait  Kind,
SourceLocation  KWLoc,
ArrayRef< TypeSourceInfo * >  Args,
SourceLocation  RParenLoc 
)

◆ BuildUnaryOp()

ExprResult Sema::BuildUnaryOp ( Scope S,
SourceLocation  OpLoc,
UnaryOperatorKind  Opc,
Expr Input,
bool  IsAfterAmp = false 
)

◆ BuildUnaryTransformType()

QualType Sema::BuildUnaryTransformType ( QualType  BaseType,
UTTKind  UKind,
SourceLocation  Loc 
)

◆ BuildUnresolvedCoawaitExpr()

ExprResult Sema::BuildUnresolvedCoawaitExpr ( SourceLocation  KwLoc,
Expr Operand,
UnresolvedLookupExpr Lookup 
)

◆ 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,
bool  IsUsingIfExists 
)

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 12858 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::LookupResult::addDecl(), clang::AS_public, clang::LookupResult::begin(), BuildUsingShadowDecl(), CheckInheritingConstructorUsingDecl(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), computeDeclContext(), Context, CorrectTypo(), clang::CPlusPlus14, clang::UsingDecl::Create(), clang::UnresolvedUsingValueDecl::Create(), clang::UnresolvedUsingTypenameDecl::Create(), clang::UnresolvedUsingIfExistsDecl::Create(), CTK_ErrorRecovery, CurContext, clang::DeclarationName::CXXConstructorName, clang::ASTContext::DeclarationNames, Diag(), diagnoseTypo(), clang::LookupResult::empty(), clang::LookupResult::end(), FilterUsingLookup(), ForVisibleRedeclaration, clang::DeclarationName::getAsIdentifierInfo(), clang::LookupResult::getAsSingle(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::DeclarationName::getNameKind(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::ASTContext::getRecordType(), clang::CXXScopeSpec::getScopeRep(), getSourceManager(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::ASTContext::getTypeDeclType(), clang::CXXScopeSpec::getWithLocInContext(), clang::Invalid, clang::LookupResult::isAmbiguous(), clang::RecordDecl::isInjectedClassName(), clang::CXXScopeSpec::isInvalid(), clang::DeclContext::isRecord(), clang::DeclContext::isStdNamespace(), clang::SourceLocation::isValid(), LookupConstructors(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupUsingDeclName, PDiag(), Previous, ProcessDeclAttributeList(), RequireCompleteDeclContext(), clang::LookupResult::resolveKind(), clang::Decl::setAccess(), clang::LookupResult::setBaseObjectType(), clang::LookupResult::setHideTags(), clang::Decl::setInvalidDecl(), clang::DeclarationNameInfo::setName(), clang::DeclarationNameInfo::setNamedTypeInfo(), and clang::LookupResult::suppressDiagnostics().

Referenced by ActOnUsingDeclaration().

◆ BuildUsingEnumDeclaration()

NamedDecl * Sema::BuildUsingEnumDeclaration ( Scope S,
AccessSpecifier  AS,
SourceLocation  UsingLoc,
SourceLocation  EnumLoc,
SourceLocation  NameLoc,
TypeSourceInfo EnumType,
EnumDecl ED 
)

◆ BuildUsingPackDecl()

NamedDecl * Sema::BuildUsingPackDecl ( NamedDecl InstantiatedFrom,
ArrayRef< NamedDecl * >  Expansions 
)

◆ BuildUsingShadowDecl()

UsingShadowDecl * Sema::BuildUsingShadowDecl ( Scope S,
BaseUsingDecl BUD,
NamedDecl Target,
UsingShadowDecl PrevDecl 
)

◆ BuildVAArgExpr()

ExprResult Sema::BuildVAArgExpr ( SourceLocation  BuiltinLoc,
Expr E,
TypeSourceInfo TInfo,
SourceLocation  RPLoc 
)

Definition at line 17308 of file SemaExpr.cpp.

References CFT_Device, CFT_Global, CFT_HostDevice, clang::TargetInfo::CharPtrBuiltinVaList, CheckForModifiableLvalue(), Context, clang::CPlusPlus, clang::CUDA, CurContext, Diag(), DiagRuntimeBehavior(), clang::ASTContext::DoubleTy, clang::ExprError(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), clang::TypeLoc::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::ASTContext::getBuiltinMSVaListType(), clang::TargetInfo::getBuiltinVaListKind(), clang::ASTContext::getBuiltinVaListType(), clang::ASTContext::getCorrespondingSignedType(), clang::ASTContext::getCorrespondingUnsignedType(), getLangOpts(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getNonLValueExprType(), clang::ASTContext::getPromotedIntegerType(), clang::Stmt::getSourceRange(), clang::TypeLoc::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::TargetInfo::hasBuiltinMSVaList(), clang::ASTContext::hasSameType(), IdentifyCUDATarget(), clang::Init, clang::InitializedEntity::InitializeParameter(), clang::Type::isArrayType(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isObjCLifetimeType(), clang::QualType::isPODType(), clang::ASTContext::isPromotableIntegerType(), clang::Type::isRecordType(), clang::Type::isSpecificBuiltinType(), clang::Expr::isTypeDependent(), clang::Type::isUnsignedIntegerType(), PDiag(), PerformCopyInitialization(), RequireCompleteType(), RequireNonAbstractType(), clang::Result, targetDiag(), clang::ASTContext::typesAreCompatible(), and UsualUnaryConversions().

Referenced by ActOnVAArg(), and clang::TreeTransform< Derived >::RebuildVAArgExpr().

◆ 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 5323 of file SemaTemplateInstantiateDecl.cpp.

References clang::DeclContext::addHiddenDecl(), CheckVariableDeclaration(), Context, CurrentInstantiationScope, DiagnoseUnusedDecl(), FindInstantiatedDecl(), ForExternalRedeclaration, forRedeclarationInCurContext(), clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDescribedVarTemplate(), clang::VarDecl::getInitStyle(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::ASTContext::getManglingNumber(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::ASTContext::getStaticLocalNumber(), clang::VarDecl::getTSCSpec(), clang::ValueDecl::getType(), clang::NamedDecl::hasLinkage(), InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), InstantiateVariableInitializer(), clang::VarDecl::isConstexpr(), clang::VarDecl::isCXXForRangeDecl(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::DeclContext::isFunctionOrMethod(), clang::VarDecl::isInitCapture(), clang::VarDecl::isInline(), clang::Decl::isInvalidDecl(), clang::Decl::isLocalExternDecl(), clang::VarDecl::isObjCForDecl(), clang::VarDecl::isOutOfLine(), clang::VarDecl::isPreviousDeclInSameBlockScope(), clang::Decl::isReferenced(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isThisDeclarationADefinition(), clang::Type::isUndeducedType(), clang::Decl::isUsed(), LookupOrdinaryName, LookupQualifiedName(), 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::ASTContext::setManglingNumber(), clang::VarDecl::setObjCForDecl(), clang::VarDecl::setPreviousDeclInSameBlockScope(), clang::Decl::setReferenced(), clang::ASTContext::setStaticLocalNumber(), clang::VarDecl::setTSCSpec(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.

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

◆ BuildVarTemplateInstantiation()

VarTemplateSpecializationDecl * Sema::BuildVarTemplateInstantiation ( VarTemplateDecl VarTemplate,
VarDecl FromVar,
const TemplateArgumentList PartialSpecArgs,
const TemplateArgumentListInfo TemplateArgsInfo,
SmallVectorImpl< TemplateArgument > &  Converted,
SourceLocation  PointOfInstantiation,
LateInstantiatedAttrVec LateAttrs = nullptr,
LocalInstantiationScope StartingScope = nullptr 
)

◆ BuildVectorLiteral()

ExprResult Sema::BuildVectorLiteral ( SourceLocation  LParenLoc,
SourceLocation  RParenLoc,
Expr E,
TypeSourceInfo TInfo 
)

◆ BuildVectorType()

QualType Sema::BuildVectorType ( QualType  T,
Expr VecSize,
SourceLocation  AttrLoc 
)

◆ BuildWritePipeType()

QualType Sema::BuildWritePipeType ( QualType  T,
SourceLocation  Loc 
)

Build a Write-only Pipe type.

Parameters
TThe type to which we'll be building a Pipe.
LocWe do not use it for now.
Returns
A suitable pipe type, if there are no errors. Otherwise, returns a NULL type.

Definition at line 2359 of file SemaType.cpp.

References Context, and clang::ASTContext::getWritePipeType().

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

◆ BuiltinAddPointer()

QualType Sema::BuiltinAddPointer ( QualType  BaseType,
SourceLocation  Loc 
)

◆ BuiltinAddReference()

QualType Sema::BuiltinAddReference ( QualType  BaseType,
UTTKind  UKind,
SourceLocation  Loc 
)

◆ BuiltinChangeCVRQualifiers()

QualType Sema::BuiltinChangeCVRQualifiers ( QualType  BaseType,
UTTKind  UKind,
SourceLocation  Loc 
)

◆ BuiltinChangeSignedness()

QualType Sema::BuiltinChangeSignedness ( QualType  BaseType,
UTTKind  UKind,
SourceLocation  Loc 
)

◆ BuiltinDecay()

QualType Sema::BuiltinDecay ( QualType  BaseType,
SourceLocation  Loc 
)

◆ BuiltinEnumUnderlyingType()

QualType Sema::BuiltinEnumUnderlyingType ( QualType  BaseType,
SourceLocation  Loc 
)

◆ BuiltinRemoveExtent()

QualType Sema::BuiltinRemoveExtent ( QualType  BaseType,
UTTKind  UKind,
SourceLocation  Loc 
)

◆ BuiltinRemovePointer()

QualType Sema::BuiltinRemovePointer ( QualType  BaseType,
SourceLocation  Loc 
)

◆ BuiltinRemoveReference()

QualType Sema::BuiltinRemoveReference ( QualType  BaseType,
UTTKind  UKind,
SourceLocation  Loc 
)

◆ 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 767 of file SemaExpr.cpp.

References Context, DefaultLvalueConversion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getPointerType(), clang::Expr::getType(), ImpCastExprToType(), clang::Type::isFunctionType(), and clang::ActionResult< PtrTy, Compress >::isInvalid().

Referenced by BuildResolvedCallExpr().

◆ CanBeGetReturnObject()

bool Sema::CanBeGetReturnObject ( const FunctionDecl FD)
static

Definition at line 16050 of file SemaDecl.cpp.

References methodHasName().

Referenced by CheckCoroutineWrapper(), and visitLifetimeBoundArguments().

◆ CanBeGetReturnTypeOnAllocFailure()

bool Sema::CanBeGetReturnTypeOnAllocFailure ( const FunctionDecl FD)
static

Definition at line 16054 of file SemaDecl.cpp.

References clang::FunctionDecl::isStatic(), and methodHasName().

Referenced by CheckCoroutineWrapper().

◆ canCalleeThrow()

CanThrowResult clang::Sema::canCalleeThrow ( Sema S,
const Expr E,
const Decl D,
SourceLocation  Loc = SourceLocation() 
)
static

◆ 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 15945 of file SemaDecl.cpp.

References clang::DeclaratorChunk::Function, clang::Declarator::getDeclSpec(), clang::Declarator::getNumTypeObjects(), GetTypeFromParser(), clang::Declarator::getTypeObject(), clang::DeclSpec::hasAutoTypeSpec(), clang::DeclSpec::hasConstexprSpecifier(), clang::QualType::isNull(), and clang::Type::isUndeducedType().

◆ 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
NewDThe new declaration.
OldDThe old declaration.
NewTThe portion of the type of the new declaration to check.
OldTThe portion of the type of the old declaration to check.

Definition at line 11115 of file SemaDecl.cpp.

References clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), and clang::Decl::isLocalExternDecl().

Referenced by MergeFunctionDecl(), and shouldLinkDependentDeclWithPrevious().

◆ 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 3329 of file SemaInit.cpp.

References clang::InitializedEntity::getType().

Referenced by TryListConversion().

◆ CanPerformCopyInitialization()

bool Sema::CanPerformCopyInitialization ( const InitializedEntity Entity,
ExprResult  Init 
)

◆ 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 15969 of file SemaDecl.cpp.

References Consumer, clang::Decl::getAsFunction(), and clang::ASTConsumer::shouldSkipFunctionBody().

◆ canThrow()

CanThrowResult clang::Sema::canThrow ( const Stmt E)

◆ CanUseDecl()

bool Sema::CanUseDecl ( NamedDecl D,
bool  TreatUnavailableAsInvalid 
)

Determine whether the use of this declaration is valid, without emitting diagnostics.

Definition at line 68 of file SemaExpr.cpp.

References clang::AR_Unavailable, clang::CPlusPlus14, CurContext, DeduceReturnType(), clang::Decl::getAvailability(), getLangOpts(), isUnavailableAlignedAllocationFunction(), and ParsingInitForAutoVars.

Referenced by canRecoverDotPseudoDestructorCallsOnPointerObjects().

◆ CaptureHasSideEffects()

bool Sema::CaptureHasSideEffects ( const sema::Capture From)

◆ CheckAdditionOperands()

QualType Sema::CheckAdditionOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
BinaryOperatorKind  Opc,
QualType CompLHSTy = nullptr 
)

◆ 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 11128 of file SemaOverload.cpp.

References clang::Function.

Referenced by BuildCallExpr(), CheckAddressOfOperand(), DefaultFunctionArrayConversion(), clang::InitializationSequence::Diagnose(), FinishOverloadedCallExpr(), isExprAnUnaddressableFunction(), IsStandardConversion(), markUnaddressableCandidatesUnviable(), maybeDiagnoseAssignmentToFunction(), clang::InitializationSequence::Perform(), and SemaBuiltinFunctionStart().

◆ CheckAddressOfMemberAccess()

Sema::AccessResult Sema::CheckAddressOfMemberAccess ( Expr OvlExpr,
DeclAccessPair  FoundDecl 
)

◆ 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 15029 of file SemaExpr.cpp.

References bool, clang::C99, checkAddressOfFunctionIsAvailable(), CheckPlaceholderExpr(), CheckUseOfCXXMethodAsAddressOfOperand(), clang::Expr::ClassifyLValue(), Context, clang::CPlusPlus, CreateMaterializeTemporaryExpr(), clang::ASTContext::DependentTy, Diag(), diagnoseAddressOfInvalidType(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsPlaceholderType(), clang::Stmt::getBeginLoc(), clang::TargetInfo::getCXXABI(), clang::DeclRefExpr::getDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Expr::getExprLoc(), getLangOpts(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getObjCObjectPointerType(), clang::Expr::getObjectKind(), clang::DeclContext::getParent(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getPointerType(), getPrimaryDecl(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParens(), clang::isa(), isCompleteType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::Type::isObjCObjectType(), clang::DeclContext::isRecord(), clang::Type::isReferenceType(), isSFINAEContext(), clang::Expr::isTypeDependent(), clang::QualType::isWebAssemblyReferenceType(), clang::Type::isWebAssemblyTableType(), LangOpts, clang::Expr::LV_ArrayTemporary, clang::Expr::LV_ClassTemporary, clang::Expr::LV_IncompleteVoidType, clang::Expr::LV_MemberFunction, clang::Expr::LV_Valid, clang::OK_BitField, clang::OK_MatrixComponent, clang::OK_VectorComponent, clang::ASTContext::OverloadTy, ResolveSingleFunctionTemplateSpecialization(), clang::SC_Register, and clang::ASTContext::UnknownAnyTy.

Referenced by CreateBuiltinUnaryOp(), and SemaBuiltinAddressof().

◆ CheckAlignasTypeArgument()

bool Sema::CheckAlignasTypeArgument ( StringRef  KWName,
TypeSourceInfo TInfo,
SourceLocation  OpLoc,
SourceRange  R 
)

◆ CheckAlignasUnderalignment()

void Sema::CheckAlignasUnderalignment ( Decl D)

◆ CheckAllocatedType()

bool Sema::CheckAllocatedType ( QualType  AllocType,
SourceLocation  Loc,
SourceRange  R 
)

◆ 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 1727 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, CheckAccess(), Context, Diagnose, clang::DeclAccessPair::getAccess(), and getLangOpts().

Referenced by FindAllocationFunctions(), FindDeallocationFunction(), and resolveAllocationOverload().

◆ checkAllowedCUDAInitializer()

void Sema::checkAllowedCUDAInitializer ( VarDecl VD)

◆ CheckAltivecInitFromScalar()

bool Sema::CheckAltivecInitFromScalar ( SourceRange  R,
QualType  VecTy,
QualType  SrcTy 
)

◆ CheckAlwaysInlineAttr()

bool Sema::CheckAlwaysInlineAttr ( const Stmt OrigSt,
const Stmt CurSt,
const AttributeCommonInfo A 
)

Definition at line 271 of file SemaStmtAttr.cpp.

Referenced by handleAlwaysInlineAttr().

◆ checkAndRewriteMustTailAttr()

bool Sema::checkAndRewriteMustTailAttr ( Stmt St,
const Attr MTA 
)

Check whether the given statement can have musttail applied to it, issuing a diagnostic and returning false if not.

In the success case, the statement is rewritten to remove implicit nodes from the return value.

Definition at line 632 of file SemaStmt.cpp.

References CurContext, clang::ReturnStmt::getRetValue(), clang::IgnoreElidableImplicitConstructorSingleStep(), clang::IgnoreExprNodes(), clang::IgnoreImplicitAsWrittenSingleStep(), clang::DeclContext::isDependentContext(), clang::Expr::isInstantiationDependent(), and clang::ReturnStmt::setRetValue().

Referenced by BuildAttributedStmt().

◆ CheckARCMethodDecl()

bool Sema::CheckARCMethodDecl ( ObjCMethodDecl method)

◆ CheckArgsForPlaceholders()

bool Sema::CheckArgsForPlaceholders ( MultiExprArg  args)

Check an argument list for placeholders that we won't try to handle later.

Definition at line 6924 of file SemaExpr.cpp.

References CheckPlaceholderExpr(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and isPlaceholderToRemoveAsArg().

Referenced by ActOnArraySubscriptExpr(), BuildCallExpr(), and BuildCXXNew().

◆ checkArrayElementAlignment()

bool Sema::checkArrayElementAlignment ( QualType  EltTy,
SourceLocation  Loc 
)

◆ CheckAssignmentConstraints() [1/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 10127 of file SemaExpr.cpp.

References clang::AltiVecBool, clang::AltiVecPixel, clang::AltiVecVector, anyAltivecTypes(), clang::ASTContext::areCompatibleRVVTypes(), clang::ASTContext::areCompatibleSveTypes(), clang::ASTContext::areCompatibleVectorTypes(), clang::ASTContext::areLaxCompatibleRVVTypes(), clang::ASTContext::areLaxCompatibleSveTypes(), clang::ASTContext::BoolTy, clang::C23, CheckAssignmentConstraints(), checkBlockPointerTypesForAssignment(), CheckObjCARCUnavailableWeakConversion(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), Compatible, Context, clang::CPlusPlus, Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::ASTContext::getCanonicalType(), clang::Expr::getExprLoc(), getLangOpts(), clang::VectorType::getNumElements(), clang::ASTContext::getObjCClassRedefinitionType(), clang::Type::getPointeeType(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::CanQual< T >::getUnqualifiedType(), clang::VectorType::getVectorKind(), clang::ASTContext::hasCvrSimilarType(), clang::ASTContext::hasSameType(), ImpCastExprToType(), Incompatible, IncompatibleObjCWeakRef, IncompatiblePointer, IncompatibleVectors, IntToBlockPointer, IntToPointer, clang::Type::isArithmeticType(), clang::Type::isBlockCompatibleObjCPointerType(), clang::Type::isBlockPointerType(), clang::Type::isEnumeralType(), clang::Type::isExtVectorType(), clang::Type::isIntegerType(), isLaxVectorConversion(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), clang::Type::isObjCClassType(), clang::Type::isObjCIdType(), clang::Type::isObjCObjectPointerType(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isSamplerT(), clang::Type::isScalarType(), clang::Type::isSVESizelessBuiltinType(), clang::Type::isVectorType(), clang::Type::isVoidPointerType(), maybeExtendBlockObject(), clang::Expr::NPC_ValueDependentIsNull, clang::ObjC, PointerToInt, PrepareScalarCast(), prepareVectorSplat(), clang::ASTContext::typesAreCompatible(), and unsupportedTypeConversion().

◆ CheckAssignmentConstraints() [2/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 10088 of file SemaExpr.cpp.

References CheckAssignmentConstraints(), and clang::VK_PRValue.

Referenced by ActOnPropertyImplDecl(), CheckAssignmentConstraints(), CheckAssignmentOperands(), CheckSingleAssignmentConstraints(), CheckTransparentUnionArgumentConstraints(), DiagnosePropertyAccessorMismatch(), handleCleanupAttr(), and PerformImplicitConversion().

◆ CheckAssignmentOperands()

QualType Sema::CheckAssignmentOperands ( Expr LHSExpr,
ExprResult RHS,
SourceLocation  Loc,
QualType  CompoundType,
BinaryOperatorKind  Opc 
)

◆ CheckAttrNoArgs()

bool Sema::CheckAttrNoArgs ( const ParsedAttr CurrAttr)

◆ CheckAttrTarget()

bool Sema::CheckAttrTarget ( const ParsedAttr CurrAttr)

◆ 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
ForceChecktrue if this check should be performed even if access control is disabled; some things rely on this for semantics
ForceUnprivilegedtrue if this check should proceed as if the context had no special privileges

Definition at line 1874 of file SemaAccess.cpp.

References clang::CXXBasePath::Access, AR_accessible, AR_dependent, AR_inaccessible, clang::AS_public, clang::Type::castAs(), CheckAccess(), CheckEffectiveAccess(), Context, clang::RecordType::getDecl(), and getLangOpts().

Referenced by buildDeclareReductionRef(), buildUserDefinedMapperRef(), CheckDerivedToBaseConversion(), findDecomposableBaseClass(), and handlerCanCatch().

◆ CheckBaseSpecifier()

CXXBaseSpecifier * Sema::CheckBaseSpecifier ( CXXRecordDecl Class,
SourceRange  SpecifierRange,
bool  Virtual,
AccessSpecifier  Access,
TypeSourceInfo TInfo,
SourceLocation  EllipsisLoc 
)

◆ CheckBitwiseOperands()

QualType Sema::CheckBitwiseOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
BinaryOperatorKind  Opc 
)
inline

◆ 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 21143 of file SemaExpr.cpp.

References CheckCXXBooleanCondition(), CheckPlaceholderExpr(), clang::CPlusPlus, DefaultFunctionArrayLvalueConversion(), Diag(), DiagnoseAssignmentAsCondition(), DiagnoseEqualityWithExtraParens(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isScalarType(), and clang::Expr::isTypeDependent().

Referenced by ActOnCondition(), ActOnDoStmt(), ActOnOpenMPFinalClause(), ActOnOpenMPIfClause(), ActOnOpenMPNocontextClause(), ActOnOpenMPNovariantsClause(), BuildCXXForRangeStmt(), and CheckConditionVariable().

◆ CheckCallingConvAttr()

bool Sema::CheckCallingConvAttr ( const ParsedAttr attr,
CallingConv CC,
const FunctionDecl FD = nullptr,
CUDAFunctionTarget  CFT = CFT_InvalidTarget 
)

Check validaty of calling convention attribute attr.

If FD is not null pointer, use FD to determine the CUDA/HIP host/device target. Otherwise, it is specified by CFT.

Definition at line 5382 of file SemaDeclAttr.cpp.

References clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::CC_AArch64SVEPCS, clang::CC_AArch64VectorCall, clang::CC_AMDGPUKernelCall, clang::CC_C, clang::CC_IntelOclBicc, clang::CC_M68kRTD, clang::CC_PreserveAll, clang::CC_PreserveMost, clang::CC_PreserveNone, clang::CC_Swift, clang::CC_SwiftAsync, clang::CC_Win64, clang::CC_X86_64SysV, clang::CC_X86FastCall, clang::CC_X86Pascal, clang::CC_X86RegCall, clang::CC_X86StdCall, clang::CC_X86ThisCall, clang::CC_X86VectorCall, clang::TargetInfo::CCCR_Error, clang::TargetInfo::CCCR_Ignore, clang::TargetInfo::CCCR_OK, clang::TargetInfo::CCCR_Warning, CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, CFT_InvalidTarget, clang::TargetInfo::checkCallingConvention(), clang::ParsedAttr::checkExactlyNumArgs(), checkStringLiteralArgumentAttr(), Context, Diag(), ForThisTarget, clang::ASTContext::getAuxTargetInfo(), clang::ASTContext::getDefaultCallingConvention(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getProcessingCache(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ParsedAttr::hasProcessingCache(), IdentifyCUDATarget(), int, clang::NamedDecl::isCXXInstanceMember(), clang::ParsedAttr::isInvalid(), clang::FunctionDecl::isVariadic(), LangOpts, clang::ParsedAttr::setInvalid(), and clang::ParsedAttr::setProcessingCache().

Referenced by getCCForDeclaratorChunk(), handleCallConvAttr(), 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 21015 of file SemaExpr.cpp.

References Diag(), clang::Sema::ExpressionEvaluationContextRecord::EK_Decltype, ExprEvalContexts, clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), clang::Type::isIncompleteType(), clang::Type::isVoidType(), and RequireCompleteType().

Referenced by ActOnDecltypeExpression(), and BuildResolvedCallExpr().

◆ CheckCaseExpression()

bool Sema::CheckCaseExpression ( Expr E)

◆ CheckCastAlign()

void Sema::CheckCastAlign ( Expr Op,
QualType  T,
SourceRange  TRange 
)

◆ CheckCategoryVsClassMethodMatches()

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

Definition at line 2947 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().

Referenced by ImplMethodsVsClassMethods().

◆ checkClassLevelCodeSegAttribute()

void Sema::checkClassLevelCodeSegAttribute ( CXXRecordDecl Class)

Definition at line 6534 of file SemaDeclCXX.cpp.

References clang::Class, and getImplicitCodeSegOrSectionAttrForFunction().

Referenced by CheckCompletedCXXClass().

◆ checkClassLevelDLLAttribute()

void Sema::checkClassLevelDLLAttribute ( CXXRecordDecl Class)

◆ 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 1842 of file SemaTemplate.cpp.

References ActOnDocumentableDecl(), AddAlignmentAttributesForRecord(), clang::DeclContext::addDecl(), AddMsStructLayoutForRecord(), AddPushedVisibilityAttribute(), clang::AS_none, clang::AS_public, CheckRedeclarationInModule(), CheckTemplateDeclScope(), CheckTemplateParameterList(), computeDeclContext(), Context, clang::ClassTemplateDecl::Create(), clang::FriendDecl::Create(), clang::CXXRecordDecl::Create(), clang::FixItHint::CreateReplacement(), CurContext, Diag(), DiagnoseClassNameShadow(), diagnoseQualifiedDeclaration(), DiagnoseTemplateParameterShadow(), clang::DeclContext::Encloses(), clang::Enum, clang::DeclContext::Equals(), forRedeclarationInCurContext(), clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::RecordDecl::getDefinition(), clang::Scope::getFlags(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ASTContext::getInjectedClassNameType(), clang::ClassTemplateDecl::getInstantiatedFromMemberTemplate(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::DeclContext::getLookupParent(), clang::Scope::getParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), getScopeForDeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::TagDecl::getTagKind(), clang::TypeWithKeyword::getTagTypeKindForTypeSpec(), clang::ClassTemplateDecl::getTemplatedDecl(), GetTemplateParameterList(), clang::TemplateDecl::getTemplateParameters(), hasVisibleDefinition(), inferGslOwnerPointerAttribute(), clang::Invalid, isAcceptableTagRedeclaration(), isDeclInScope(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFileContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), clang::DeclContext::isTransparentContext(), clang::SourceLocation::isValid(), clang::CXXScopeSpec::isValid(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupTagName, clang::DeclContext::makeDeclVisibleInContext(), makeMergedDefinitionVisible(), mergeDeclAttributes(), clang::Sema::SkipBodyInfo::Previous, Previous, ProcessAPINotes(), ProcessDeclAttributeList(), PushOnScopeChains(), RebuildTemplateParamsInCurrentInstantiation(), RequireCompleteDeclContext(), clang::Decl::setAccess(), clang::CXXRecordDecl::setDescribedClassTemplate(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), SetMemberAccessSpecifier(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::NamedDecl::setModulePrivate(), SetNestedNameSpecifier(), clang::Decl::setObjectOfFriendDecl(), clang::Redeclarable< decl_type >::setPreviousDecl(), clang::TagDecl::setTemplateParameterListsInfo(), clang::Sema::SkipBodyInfo::ShouldSkip, clang::TemplateParameterList::size(), clang::TagDecl::startDefinition(), TemplateParameterListsAreEqual(), clang::Scope::TemplateParamScope, TPC_ClassTemplate, TPC_ClassTemplateMember, TPC_FriendClassTemplate, TPL_TemplateMatch, TUK_Definition, TUK_Friend, and TUK_Reference.

Referenced by ActOnClassTemplateSpecialization(), ActOnTag(), and ActOnTemplatedFriendTag().

◆ checkCommonAttributeFeatures() [1/2]

bool Sema::checkCommonAttributeFeatures ( const Decl D,
const ParsedAttr A,
bool  SkipArgCountCheck = false 
)

Handles semantic checking for features that are common to all attributes, such as checking whether a parameter was properly specified, or the correct number of arguments were passed, etc.

Returns true if the attribute has been diagnosed.

Definition at line 1458 of file SemaAttr.cpp.

Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().

◆ checkCommonAttributeFeatures() [2/2]

bool Sema::checkCommonAttributeFeatures ( const Stmt S,
const ParsedAttr A,
bool  SkipArgCountCheck = false 
)

Definition at line 1462 of file SemaAttr.cpp.

◆ CheckCompareOperands()

QualType Sema::CheckCompareOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
BinaryOperatorKind  Opc 
)

Definition at line 13070 of file SemaExpr.cpp.

References clang::ASTContext::areComparableObjCPointerTypes(), clang::Type::castAs(), CCK_ImplicitConversion, checkArithmeticNull(), checkArithmeticOrEnumeralCompare(), CheckComparisonCategoryType(), CheckObjCConversion(), CheckPtrComparisonWithNullChar(), CheckSizelessVectorCompareOperands(), CheckVectorCompareOperands(), Context, convertPointersToCompositeType(), clang::CPlusPlus, CurContext, DefaultFunctionArrayLvalueConversion(), DefaultLvalueConversion(), Diag(), DiagnoseAlwaysNonNullPointer(), diagnoseDistinctPointerComparison(), diagnoseFunctionPointerToVoidComparison(), diagnoseLogicalNotOnLHSofCheck(), diagnoseObjCLiteralComparison(), diagnoseTautologicalComparison(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::getComparisonCategoryForBuiltinCmp(), getLangOpts(), clang::ASTContext::getLogicalOperationType(), clang::DeclContext::getParent(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), ImpCastExprToType(), InvalidOperands(), clang::QualType::isAddressSpaceOverlapping(), clang::Type::isAnyPointerType(), clang::Type::isArithmeticType(), clang::Type::isBlockCompatibleObjCPointerType(), clang::Type::isBlockPointerType(), clang::Type::isClkEventT(), clang::Type::isEnumeralType(), clang::BinaryOperator::isEqualityOp(), clang::Type::isFunctionPointerType(), clang::Type::isFunctionType(), clang::Type::isIncompleteType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isMemberPointerType(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), isObjCObjectLiteral(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isQueueT(), clang::Type::isReferenceType(), clang::BinaryOperator::isRelationalOp(), isSFINAEContext(), clang::Type::isSveVLSBuiltinType(), clang::Type::isVectorType(), clang::Type::isVoidPointerType(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), LangOpts, clang::Expr::NPC_ValueDependentIsNull, clang::Expr::NPCK_NotNull, clang::OpenCL, OperatorInExpression, and clang::ASTContext::typesAreCompatible().

Referenced by CreateBuiltinBinOp().

◆ CheckComparisonCategoryType()

QualType Sema::CheckComparisonCategoryType ( ComparisonCategoryType  Kind,
SourceLocation  Loc,
ComparisonCategoryUsage  Usage 
)

◆ CheckCompatibleReinterpretCast()

void Sema::CheckCompatibleReinterpretCast ( QualType  SrcType,
QualType  DestType,
bool  IsDereference,
SourceRange  Range 
)

◆ CheckCompletedCoroutineBody()

void Sema::CheckCompletedCoroutineBody ( FunctionDecl FD,
Stmt *&  Body 
)

◆ 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
SThe scope in which the class was parsed. Null if we didn't just parse a class definition.
RecordThe completed class.

Definition at line 7013 of file SemaDeclCXX.cpp.

References clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), clang::AS_public, clang::Sema::DefaultedFunctionKind::asComparison(), clang::DeclContextLookupResult::begin(), clang::CanNeverPassInRegs, clang::CannotPassInRegs, canPassInRegisters(), clang::CanPassInRegs, CheckAbstractClassUsage(), checkClassLevelCodeSegAttribute(), checkClassLevelDLLAttribute(), checkCUDADeviceBuiltinSurfaceClassTemplate(), checkCUDADeviceBuiltinTextureClassTemplate(), CheckExplicitlyDefaultedFunction(), checkIllFormedTrivialABIStruct(), Context, clang::FixItHint::CreateInsertion(), clang::CUDA, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXInvalid, CXXMoveConstructor, DefineDefaultedFunction(), DelayedDllExportMemberFunctions, Diag(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAbstractType(), DiagnoseDeletedDefaultedFunction(), DiagnoseHiddenVirtualMethods(), clang::DeclContextLookupResult::end(), clang::Decl::getAccess(), clang::TargetInfo::getCallingConvKind(), clang::TargetInfo::getCXXABI(), clang::NamedDecl::getDeclName(), getDefaultedFunctionKind(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::ASTContext::getRecordType(), getSpecialMember(), clang::FunctionDecl::getStorageClass(), clang::ASTContext::getTargetInfo(), clang::NamedDecl::getUnderlyingDecl(), clang::Incomplete, clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::CXXMethodDecl::isVirtual(), MarkVTableUsed(), clang::LangOptionsBase::MSVC2015, NotEqual, Relational, ReportOverrides(), clang::SC_Static, SpecialMemberIsTrivial(), TAH_ConsiderTrivialABI, V, and clang::LangOptionsBase::Ver4.

Referenced by ActOnFinishCXXMemberSpecification(), ActOnLambdaError(), BuildLambdaExpr(), and InstantiateClass().

◆ CheckCompleteDecompositionDeclaration()

void Sema::CheckCompleteDecompositionDeclaration ( DecompositionDecl DD)

◆ CheckCompleteDestructorVariant()

void Sema::CheckCompleteDestructorVariant ( SourceLocation  CurrentLocation,
CXXDestructorDecl Dtor 
)

Do semantic checks to allow the complete destructor variant to be emitted when the destructor is defined in another translation unit.

In the Itanium C++ ABI, destructor variants are emitted together. In the MS C++ ABI, they can be emitted in separate TUs. To emit the complete variant, run a subset of the checks performed when emitting a regular destructor.

Definition at line 14378 of file SemaDeclCXX.cpp.

References Context, clang::TargetInfo::getCXXABI(), clang::CXXRecordDecl::getNumVBases(), clang::ASTContext::getTargetInfo(), clang::TargetCXXABI::isMicrosoft(), MarkVirtualBaseDestructorsReferenced(), and Scope.

Referenced by MarkFunctionReferenced().

◆ CheckCompleteVariableDeclaration()

void Sema::CheckCompleteVariableDeclaration ( VarDecl VD)

Definition at line 14425 of file SemaDecl.cpp.

References clang::Decl::addAttr(), clang::sema::FunctionScopeInfo::addByrefBlockVar(), clang::ASTContext::addModuleInitializer(), clang::AttributeCommonInfo::AS_Declspec, BSSSegStack, clang::C23, CheckCompleteDecompositionDeclaration(), clang::VarDecl::checkForConstantInitialization(), ConstSegStack, Context, clang::CPlusPlus, clang::CPlusPlus11, clang::FixItHint::CreateInsertion(), CurInitSeg, CurInitSegLoc, DataSegStack, clang::ASTContext::DeclMustBeEmitted(), Diag(), clang::QualType::DK_nontrivial_c_struct, clang::Decl::dropAttr(), FinalizeVarWithDestructor(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), getCurFunction(), clang::Decl::getDeclContext(), clang::VarDecl::getDescribedVarTemplate(), getDiagnostics(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), getLangOpts(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::Preprocessor::getLocForEndOfToken(), clang::QualType::getObjCLifetime(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::AttributeCommonInfo::getRange(), clang::DeclContext::getRedeclContext(), clang::Stmt::getSourceRange(), clang::VarDecl::getStorageClass(), clang::StringLiteral::getString(), clang::ASTContext::getTargetInfo(), clang::VarDecl::getTemplateSpecializationKind(), clang::VarDecl::getTLSKind(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Decl::hasAttr(), clang::VarDecl::hasGlobalStorage(), clang::VarDecl::hasInit(), clang::NamedDecl::hasLinkage(), clang::VarDecl::hasLocalStorage(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::Init, int, inTemplateInstantiation(), clang::Type::isBlockPointerType(), clang::Expr::isConstantInitializer(), clang::VarDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::QualType::isDestructedType(), clang::NamedDecl::isExternallyVisible(), clang::DeclContext::isFileContext(), clang::VarDecl::isInline(), clang::Decl::isInvalidDecl(), clang::QualType::isNonConstantStorage(), clang::Type::isReferenceType(), clang::VarDecl::isStaticLocal(), clang::Type::isStructureType(), clang::isTemplateInstantiation(), clang::VarDecl::isThisDeclarationADefinition(), MaybeAddCUDAConstantAttr(), clang::VarDecl::mightBeUsableInConstantExpressions(), clang::QualType::NonTrivialCtor, clang::ObjC, clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::OpenCL, PDiag(), PP, clang::ASTContext::PSF_Implicit, clang::ASTContext::PSF_Read, clang::ASTContext::PSF_Write, clang::ast_matchers::recordType, clang::SC_Register, setFunctionHasBranchProtectedScope(), clang::Decl::setInvalidDecl(), clang::VarDecl::TLS_Static, clang::ast_matchers::type, and UnifySection().

Referenced by ActOnEndOfTranslationUnit(), ActOnUninitializedDecl(), AddInitializerToDecl(), buildCoroutinePromise(), and checkTupleLikeDecomposition().

◆ CheckConceptRedefinition()

void Sema::CheckConceptRedefinition ( ConceptDecl NewDecl,
LookupResult Previous,
bool AddToScope 
)

◆ CheckConceptTemplateId()

ExprResult Sema::CheckConceptTemplateId ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo ConceptNameInfo,
NamedDecl FoundDecl,
ConceptDecl NamedConcept,
const TemplateArgumentListInfo TemplateArgs 
)

◆ 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 9191 of file SemaExpr.cpp.

References ACK_Conditional, checkBlockType(), checkCondition(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), CheckPlaceholderExpr(), checkPointerIntegerMismatch(), CheckVectorOperands(), clang::Expr::containsErrors(), Context, clang::CPlusPlus, CXXCheckConditionalOperands(), clang::ASTContext::DependentTy, Diag(), DiagnoseConditionalForNull(), FindCompositeObjCPointerType(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::ASTContext::getCommonSugaredType(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), ImpCastExprToType(), clang::Type::isArithmeticType(), clang::Type::isBitIntType(), clang::Type::isBlockPointerType(), clang::ASTContext::isDependenceAllowed(), clang::Type::isExtVectorType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Type::isNullPtrType(), clang::Type::isPointerType(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::Type::isWebAssemblyTableType(), clang::OK_Ordinary, clang::OpenCL, OpenCLCheckVectorConditional(), PrepareScalarCast(), unsupportedTypeConversion(), UsualArithmeticConversions(), UsualUnaryConversions(), and clang::VK_PRValue.

Referenced by ActOnConditionalOp().

◆ CheckConditionVariable()

ExprResult Sema::CheckConditionVariable ( VarDecl ConditionVar,
SourceLocation  StmtLoc,
ConditionKind  CK 
)

◆ CheckConflictingOverridingMethod()

void Sema::CheckConflictingOverridingMethod ( ObjCMethodDecl Method,
ObjCMethodDecl Overridden,
bool  IsProtocolMethodDecl 
)

◆ checkConstantPointerAuthKey()

bool Sema::checkConstantPointerAuthKey ( Expr keyExpr,
unsigned key 
)

◆ CheckConstexprFunctionDefinition()

bool Sema::CheckConstexprFunctionDefinition ( const FunctionDecl FD,
CheckConstexprKind  Kind 
)

◆ CheckConstraintExpression()

bool Sema::CheckConstraintExpression ( const Expr CE,
Token  NextToken = Token(),
bool PossibleNonPrimary = nullptr,
bool  IsTrailingRequiresClause = false 
)

◆ CheckConstraintSatisfaction() [1/3]

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 occurred and satisfaction could not be determined.

Returns
true if an error occurred, false otherwise.

Definition at line 538 of file SemaConcept.cpp.

References calculateConstraintSatisfaction(), isInvalid(), and PerformContextuallyConvertToBool().

◆ CheckConstraintSatisfaction() [2/3]

bool clang::Sema::CheckConstraintSatisfaction ( const NamedDecl Template,
ArrayRef< const Expr * >  ConstraintExprs,
const MultiLevelTemplateArgumentList TemplateArgLists,
SourceRange  TemplateIDRange,
ConstraintSatisfaction Satisfaction 
)
inline

Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given template arguments.

Parameters
Templatethe template-like entity that triggered the constraints check (either a concept or a constrained entity).
ConstraintExprsa list of constraint expressions, treated as if they were 'AND'ed together.
TemplateArgListsthe list of template arguments to substitute into the constraint expression.
TemplateIDRangeThe source range of the template id that caused the constraints check.
Satisfactionif 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 11484 of file Sema.h.

References CheckConstraintSatisfaction().

Referenced by BuildNestedRequirement(), BuildStaticAssertDeclaration(), CheckConceptTemplateId(), CheckConstraintSatisfaction(), CheckDeducedArgumentConstraints(), CheckDeducedPlaceholderConstraints(), CheckFunctionConstraints(), CheckInstantiatedFunctionTemplateConstraints(), and EnsureTemplateArgumentListConstraints().

◆ CheckConstraintSatisfaction() [3/3]

bool Sema::CheckConstraintSatisfaction ( const NamedDecl Template,
ArrayRef< const Expr * >  ConstraintExprs,
llvm::SmallVectorImpl< Expr * > &  ConvertedConstraints,
const MultiLevelTemplateArgumentList TemplateArgList,
SourceRange  TemplateIDRange,
ConstraintSatisfaction Satisfaction 
)

Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given template arguments.

Additionally, takes an empty list of Expressions which is populated with the instantiated versions of the ConstraintExprs.

Parameters
Templatethe template-like entity that triggered the constraints check (either a concept or a constrained entity).
ConstraintExprsa list of constraint expressions, treated as if they were 'AND'ed together.
ConvertedConstraintsa out parameter that will get populated with the instantiated version of the ConstraintExprs if we successfully checked satisfaction.
TemplateArgListthe multi-level list of template arguments to substitute into the constraint expression. This should be relative to the top-level (hence multi-level), since we need to instantiate fully at the time of checking.
TemplateIDRangeThe source range of the template id that caused the constraints check.
Satisfactionif 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 475 of file SemaConcept.cpp.

References CheckConstraintSatisfaction(), Context, clang::ConstraintSatisfaction::IsSatisfied, and clang::ConstraintSatisfaction::Profile().

◆ 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 10923 of file SemaDeclCXX.cpp.

References Context, clang::FixItHint::CreateInsertion(), Diag(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getTagDeclType(), clang::CanQual< T >::getUnqualifiedType(), and clang::TSK_ImplicitInstantiation.

Referenced by ActOnFinishDelayedCXXMethodDeclaration(), and CheckFunctionDeclaration().

◆ CheckConstructorAccess() [1/2]

Sema::AccessResult Sema::CheckConstructorAccess ( SourceLocation  Loc,
CXXConstructorDecl D,
DeclAccessPair  FoundDecl,
const InitializedEntity Entity,
bool  IsCopyBindingRefToTemp = false 
)

◆ CheckConstructorAccess() [2/2]

Sema::AccessResult Sema::CheckConstructorAccess ( SourceLocation  Loc,
CXXConstructorDecl D,
DeclAccessPair  FoundDecl,
const InitializedEntity Entity,
const PartialDiagnostic PDiag 
)

◆ 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 10860 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), checkMethodTypeQualifiers(), Context, clang::FixItHint::CreateRemoval(), Diag(), diagnoseIgnoredQualifiers(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::FunctionProtoType::getParamTypes(), 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::FunctionProtoType::ExtProtoInfo::RefQualifier, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierIsLValueRef, clang::RQ_None, clang::SC_None, clang::SC_Static, clang::Declarator::setInvalidType(), clang::FunctionProtoType::ExtProtoInfo::TypeQuals, and clang::ASTContext::VoidTy.

Referenced by CreateNewFunctionDecl().

◆ 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 11135 of file SemaDeclCXX.cpp.

References clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::Type::castAs(), Context, clang::UnqualifiedId::ConversionFunctionId, clang::CPlusPlus11, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateInsertionFromRange(), clang::FixItHint::CreateRemoval(), Diag(), extendLeft(), extendRight(), clang::First, clang::DeclaratorChunk::Function, clang::SourceRange::getBegin(), clang::Declarator::getDeclSpec(), clang::TypeLoc::getEndLoc(), clang::DeclSpec::getExplicitSpecLoc(), clang::DeclSpec::getExplicitSpecRange(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), getLangOpts(), getLocForEndOfToken(), clang::Declarator::getName(), clang::ASTContext::getPointerType(), clang::TypeLoc::getSourceRange(), clang::UnqualifiedId::getSourceRange(), clang::DeclSpec::getStorageClassSpecLoc(), clang::CharSourceRange::getTokenRange(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::DeclSpec::hasExplicitSpecifier(), clang::DeclSpec::hasTypeSpecifier(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Declarator::isInvalidType(), clang::SourceRange::isValid(), clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, 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().

Referenced by CreateNewFunctionDecl().

◆ CheckConversionToObjCLiteral()

bool Sema::CheckConversionToObjCLiteral ( QualType  DstType,
Expr *&  SrcExpr,
bool  Diagnose = true 
)

◆ CheckConvertedConstantExpression() [1/2]

ExprResult Sema::CheckConvertedConstantExpression ( Expr From,
QualType  T,
APValue Value,
CCEKind  CCE,
NamedDecl Dest = nullptr 
)

Definition at line 6284 of file SemaOverload.cpp.

◆ CheckConvertedConstantExpression() [2/2]

ExprResult Sema::CheckConvertedConstantExpression ( Expr From,
QualType  T,
llvm::APSInt &  Value,
CCEKind  CCE 
)

◆ CheckCoroutineWrapper()

void Sema::CheckCoroutineWrapper ( FunctionDecl FD)

◆ CheckCountedByAttr()

bool Sema::CheckCountedByAttr ( Scope Scope,
const FieldDecl FD 
)

◆ 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 860 of file SemaCUDA.cpp.

References CFP_Never, CFP_WrongSide, clang::CUDA, clang::ASTContext::CUDAExternalDeviceDeclODRUsedByHost, currentEvaluationContext(), Emitted, getASTContext(), getCurFunctionDecl(), clang::FunctionDecl::getDescribedFunctionTemplate(), getEmissionStatus(), clang::ASTContext::GetGVALinkageForFunction(), getLangOpts(), clang::GVA_StrongExternal, IdentifyCUDAPreference(), clang::Sema::SemaDiagnosticBuilder::K_Deferred, clang::Sema::SemaDiagnosticBuilder::K_ImmediateWithCallStack, clang::Sema::SemaDiagnosticBuilder::K_Nop, LangOpts, and LocsWithCUDACallDiags.

Referenced by BuildCXXConstructExpr(), DiagnoseUseOfDecl(), and MarkFunctionReferenced().

◆ checkCUDATargetOverload()

void Sema::checkCUDATargetOverload ( FunctionDecl NewFD,
const LookupResult Previous 
)

◆ 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 4079 of file SemaExprCXX.cpp.

References clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isValueDependent(), PerformContextuallyConvertToBool(), and VerifyIntegerConstantExpression().

Referenced by CheckBooleanCondition(), and CXXCheckConditionalOperands().

◆ CheckCXXDefaultArgExpr()

bool Sema::CheckCXXDefaultArgExpr ( SourceLocation  CallLoc,
FunctionDecl FD,
ParmVarDecl Param,
Expr Init = nullptr,
bool  SkipImmediateInvocations = true 
)

◆ CheckCXXDefaultArguments()

void Sema::CheckCXXDefaultArguments ( FunctionDecl FD)

◆ 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
LocThe location at which the capture of 'this' occurs.
ExplicitWhether 'this' is explicitly captured in a lambda capture list.
FunctionScopeIndexToStopAtIf 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 1305 of file SemaExprCXX.cpp.

References clang::sema::CapturingScopeInfo::addThisCapture(), buildLambdaThisCaptureFixit(), clang::sema::LambdaScopeInfo::CallOperator, 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::Decl::setInvalidDecl().

Referenced by ActOnLambdaClosureQualifiers(), ActOnLambdaExpressionAfterIntroducer(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), DiagnoseDependentMemberLookup(), clang::getStackIndexOfNearestEnclosingCaptureCapableLambda(), MarkThisReferenced(), tryCaptureOpenMPLambdas(), and tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs().

◆ CheckCXXThrowOperand()

bool Sema::CheckCXXThrowOperand ( SourceLocation  ThrowLoc,
QualType  ThrowTy,
Expr E 
)

◆ checkDeclIsAllowedInOpenMPTarget()

void Sema::checkDeclIsAllowedInOpenMPTarget ( Expr E,
Decl D,
SourceLocation  IdLoc = SourceLocation() 
)

◆ CheckDeductionGuideDeclarator()

bool 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. Return true on invalid deduction-guide.

Definition at line 11487 of file SemaDeclCXX.cpp.

References Context, CurContext, Diag(), clang::DeclContext::Equals(), clang::DeclaratorChunk::Function, clang::OpaquePtr< PtrTy >::get(), clang::UnionOpaquePtr< T >::get(), clang::TypeLoc::getAsAdjusted(), clang::TemplateName::getAsTemplateDecl(), clang::TypeLoc::getBeginLoc(), clang::DeclSpec::getBeginLoc(), clang::UnqualifiedId::getBeginLoc(), clang::Decl::getDeclContext(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifierLoc(), clang::TemplateName::getKind(), clang::Declarator::getMutableDeclSpec(), clang::Declarator::getName(), clang::DeclContext::getRedeclContext(), clang::TypeLoc::getSourceRange(), clang::Declarator::getSourceRange(), clang::TypeSourceInfo::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::hasQualifiers(), clang::ASTContext::hasSameTemplateName(), clang::Type::isDependentType(), clang::Declarator::isFunctionDefinition(), clang::Declarator::isInvalidType(), NoteTemplateLocation(), clang::DeclaratorChunk::Paren, clang::SC_None, clang::TemplateName::Template, clang::UnqualifiedId::TemplateName, clang::Declarator::type_objects(), and clang::TemplateName::UsingTemplate.

Referenced by CreateNewFunctionDecl().

◆ CheckDeductionGuideTemplate()

void Sema::CheckDeductionGuideTemplate ( FunctionTemplateDecl TD)

◆ CheckDelayedMemberExceptionSpecs()

void Sema::CheckDelayedMemberExceptionSpecs ( )

◆ CheckDelegatingCtorCycles()

void Sema::CheckDelegatingCtorCycles ( )

◆ 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 9877 of file SemaTemplate.cpp.

References Context, Diag(), clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::Decl::FOK_None, clang::Decl::getDeclContext(), clang::Decl::getFriendObjectKind(), clang::Decl::getLocation(), clang::DeclContext::getRedeclContext(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::Filter::hasNext(), clang::DeclContext::InEnclosingNamespaceSetOf(), clang::LookupResult::Filter::next(), P, Previous, and clang::FunctionDecl::setDependentTemplateSpecialization().

Referenced by ActOnFunctionDeclarator().

◆ CheckDerivedToBaseConversion() [1/2]

bool Sema::CheckDerivedToBaseConversion ( QualType  Derived,
QualType  Base,
SourceLocation  Loc,
SourceRange  Range,
CXXCastPath BasePath = nullptr,
bool  IgnoreAccess = false 
)

◆ CheckDerivedToBaseConversion() [2/2]

bool Sema::CheckDerivedToBaseConversion ( QualType  Derived,
QualType  Base,
unsigned  InaccessibleBaseID,
unsigned  AmbiguousBaseConvID,
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 AmbiguousBaseConvID 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 3124 of file SemaDeclCXX.cpp.

References AR_accessible, AR_delayed, AR_dependent, AR_inaccessible, BuildBasePathArray(), CheckBaseClassAccess(), Context, Diag(), getAmbiguousPathsDisplayString(), clang::ASTContext::getCanonicalType(), getLangOpts(), clang::CanQual< T >::getUnqualifiedType(), and IsDerivedFrom().

◆ 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 10958 of file SemaDeclCXX.cpp.

References AA_Passing, ActOnCXXThis(), clang::declaresSameEntity(), Diag(), DiagnoseUseOfDecl(), FindDeallocationFunctionForDestructor(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getLocation(), MarkFunctionReferenced(), and PerformImplicitConversion().

Referenced by ActOnFinishFunctionBody(), DefineImplicitDestructor(), and MarkVTableUsed().

◆ CheckDestructorAccess()

Sema::AccessResult Sema::CheckDestructorAccess ( SourceLocation  Loc,
CXXDestructorDecl Dtor,
const PartialDiagnostic PDiag,
QualType  objectType = QualType() 
)

◆ 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 11013 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), checkMethodTypeQualifiers(), Context, clang::FixItHint::CreateRemoval(), clang::UnqualifiedId::DestructorName, Diag(), diagnoseIgnoredQualifiers(), clang::DeclaratorChunk::FunctionTypeInfo::freeParams(), clang::FTIHasNonVoidParameters(), clang::Type::getAs(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getName(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getStorageClassSpecLoc(), GetTypeFromParser(), 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(), clang::FunctionProtoType::ExtProtoInfo::Variadic, and clang::ASTContext::VoidTy.

Referenced by CreateNewFunctionDecl().

◆ 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 195 of file SemaExceptionSpec.cpp.

References clang::CPlusPlus17, clang::Type::getAs(), getLangOpts(), clang::Type::getPointeeType(), and clang::FunctionProtoType::hasExceptionSpec().

Referenced by BuildMemberPointerType(), and GetFullTypeForDeclarator().

◆ CheckEnableIf()

EnableIfAttr * Sema::CheckEnableIf ( FunctionDecl Function,
SourceLocation  CallLoc,
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 7277 of file SemaOverload.cpp.

References convertArgsForAvailabilityChecks(), clang::Function, and clang::Result.

Referenced by checkDirectCallValidity().

◆ CheckEnumConstant()

EnumConstantDecl * Sema::CheckEnumConstant ( EnumDecl Enum,
EnumConstantDecl LastEnumConst,
SourceLocation  IdLoc,
IdentifierInfo Id,
Expr val 
)

◆ 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 17004 of file SemaDecl.cpp.

References Context, Diag(), clang::EnumDecl::getIntegerType(), clang::EnumDecl::getIntegerTypeRange(), clang::Decl::getLocation(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isDependentType(), clang::EnumDecl::isFixed(), and clang::EnumDecl::isScoped().

Referenced by ActOnTag().

◆ CheckEnumUnderlyingType()

bool Sema::CheckEnumUnderlyingType ( TypeSourceInfo TI)

Check that this is a valid underlying type for an enum declaration.

Definition at line 16985 of file SemaDecl.cpp.

References Diag(), clang::Type::getAs(), clang::TypeLoc::getBeginLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isBitIntType(), and clang::Type::isDependentType().

Referenced by ActOnTag().

◆ CheckEquivalentExceptionSpec() [1/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 497 of file SemaExceptionSpec.cpp.

References clang::CheckEquivalentExceptionSpecImpl(), getLangOpts(), PDiag(), and clang::Result.

◆ CheckEquivalentExceptionSpec() [2/3]

bool clang::Sema::CheckEquivalentExceptionSpec ( const PartialDiagnostic DiagID,
const PartialDiagnostic NoteID,
const FunctionProtoType Old,
SourceLocation  OldLoc,
const FunctionProtoType New,
SourceLocation  NewLoc 
)

◆ CheckEquivalentExceptionSpec() [3/3]

bool clang::Sema::CheckEquivalentExceptionSpec ( FunctionDecl Old,
FunctionDecl New 
)

Definition at line 298 of file SemaExceptionSpec.cpp.

References clang::Type::castAs(), clang::CheckEquivalentExceptionSpecImpl(), Context, clang::CPlusPlus11, 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::ExceptionSpecInfo::Exceptions, clang::exceptionSpecNotKnownYet(), clang::Type::getAs(), clang::TypeLoc::getAs(), clang::FunctionDecl::getBuiltinID(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), getPrintingPolicy(), clang::ASTContext::getSourceManager(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::hasImplicitExceptionSpec(), clang::TypeLoc::IgnoreParens(), clang::isDynamicExceptionSpec(), clang::FunctionDecl::isExternC(), clang::SourceManager::isInSystemHeader(), clang::SourceLocation::isInvalid(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::SourceLocation::isValid(), OS, PDiag(), clang::Decl::setInvalidDecl(), and clang::ValueDecl::setType().

Referenced by ActOnExplicitInstantiation(), areMultiversionVariantFunctionsCompatible(), CheckDelayedMemberExceptionSpecs(), clang::CheckSpecForTypesEquivalent(), MergeFunctionDecl(), and MergeVarDeclExceptionSpecs().

◆ CheckExceptionSpecCompatibility()

bool clang::Sema::CheckExceptionSpecCompatibility ( Expr From,
QualType  ToType 
)

◆ checkExceptionSpecification()

void Sema::checkExceptionSpecification ( bool  IsTopLevel,
ExceptionSpecificationType  EST,
ArrayRef< ParsedType DynamicExceptions,
ArrayRef< SourceRange DynamicExceptionRanges,
Expr NoexceptExpr,
SmallVectorImpl< QualType > &  Exceptions,
FunctionProtoType::ExceptionSpecInfo ESI 
)

◆ CheckExceptionSpecSubset()

bool clang::Sema::CheckExceptionSpecSubset ( const PartialDiagnostic DiagID,
const PartialDiagnostic NestedDiagID,
const PartialDiagnostic NoteID,
const PartialDiagnostic NoThrowDiagID,
const FunctionProtoType Superset,
bool  SkipSupersetFirstParameter,
SourceLocation  SuperLoc,
const FunctionProtoType Subset,
bool  SkipSubsetFirstParameter,
SourceLocation  SubLoc 
)

◆ CheckExplicitlyDefaultedComparison()

bool Sema::CheckExplicitlyDefaultedComparison ( Scope S,
FunctionDecl MD,
DefaultedComparisonKind  DCK 
)

Definition at line 8823 of file SemaDeclCXX.cpp.

References clang::Qualifiers::addConst(), clang::QualType::addConst(), clang::ASTContext::adjustDeducedFunctionResultType(), clang::ASTContext::AutoDeductTy, clang::ASTContext::BoolTy, clang::Type::castAs(), CheckComparisonCategoryType(), CheckConstexprParameterTypes(), CheckConstexprReturnType(), clang::Constexpr, Context, clang::CPlusPlus23, clang::FunctionDecl::DefaultedFunctionInfo::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), DefaultedOperator, Diag(), Diagnose, clang::EST_None, clang::EST_Unevaluated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::First, clang::CXXRecordDecl::friends(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::ASTContext::getAutoDeductType(), clang::SourceRange::getBegin(), clang::DeclaratorDecl::getBeginLoc(), clang::FunctionDecl::getCanonicalDecl(), clang::CXXRecordDecl::getCanonicalDecl(), clang::FunctionDecl::getDeclaredReturnType(), clang::FunctionDecl::getDefaultLoc(), clang::FunctionDecl::getExceptionSpecType(), clang::ParmVarDecl::getExplicitObjectParamThisLoc(), clang::Decl::getFriendObjectKind(), clang::CXXMethodDecl::getFunctionObjectParameterType(), clang::ASTContext::getFunctionType(), clang::FunctionDecl::getFunctionTypeLoc(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::ASTContext::getLValueReferenceType(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getRecordType(), clang::CXXMethodDecl::getRefQualifier(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), clang::ASTContext::hasSameType(), int, inTemplateInstantiation(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::TagDecl::isDependentType(), clang::Type::isDependentType(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::Decl::isImplicit(), clang::SourceLocation::isInvalid(), clang::QualType::isNull(), clang::CXXMethodDecl::isStatic(), clang::Type::isUndeducedAutoType(), clang::SourceLocation::isValid(), clang::CXXMethodDecl::isVolatile(), lookupOperatorsForDefaultedComparison(), None, clang::UnresolvedSetImpl::pairs(), clang::FunctionDecl::parameters(), clang::FunctionProtoType::ExtProtoInfo::RefQualifier, clang::Qualifiers::removeVolatile(), RequireCompleteType(), clang::RQ_None, clang::RQ_RValue, clang::FunctionDecl::setConstexprKind(), SetDeclDeleted(), clang::FunctionDecl::setDefaultedFunctionInfo(), clang::ValueDecl::setType(), SubstAutoType(), ThreeWay, clang::FunctionProtoType::ExceptionSpecInfo::Type, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, and clang::QualType::withConst().

Referenced by CheckExplicitlyDefaultedFunction(), and SetDeclDefaulted().

◆ CheckExplicitlyDefaultedFunction()

void Sema::CheckExplicitlyDefaultedFunction ( Scope S,
FunctionDecl MD 
)

◆ CheckExplicitlyDefaultedSpecialMember()

bool Sema::CheckExplicitlyDefaultedSpecialMember ( CXXMethodDecl MD,
CXXSpecialMember  CSM,
SourceLocation  DefaultLoc 
)

Definition at line 7695 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), clang::Consteval, clang::Constexpr, Context, clang::CPlusPlus14, clang::CPlusPlus20, clang::FixItHint::CreateReplacement(), CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXInvalid, CXXMoveAssignment, defaultedSpecialMemberIsConstexpr(), Diag(), clang::EST_Unevaluated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::First, clang::Qualifiers::getAddressSpace(), clang::ASTContext::getAddrSpaceQualType(), clang::DeclaratorDecl::getBeginLoc(), clang::CXXMethodDecl::getCanonicalDecl(), clang::ASTContext::getElaboratedType(), clang::CXXMethodDecl::getFunctionObjectParameterType(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getNonReferenceType(), clang::CXXMethodDecl::getNumExplicitParams(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::ASTContext::getRecordType(), clang::FunctionDecl::getSourceRange(), clang::FunctionDecl::getTemplatedKind(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::CXXRecordDecl::implicitCopyAssignmentHasConstParam(), clang::CXXRecordDecl::implicitCopyConstructorHasConstParam(), inTemplateInstantiation(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::TagDecl::isDependentType(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::Type::isReferenceType(), clang::FunctionDecl::isTemplateInstantiation(), clang::SourceLocation::isValid(), clang::FunctionDecl::isVariadic(), clang::QualType::isVolatileQualified(), clang::None, clang::FunctionDecl::setConstexprKind(), SetDeclDeleted(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, clang::FunctionDecl::TK_NonTemplate, clang::FunctionProtoType::ExceptionSpecInfo::Type, clang::Unspecified, clang::CXXRecordDecl::vbases(), and clang::ASTContext::VoidTy.

Referenced by CheckExplicitlyDefaultedFunction(), and SetDeclDefaulted().

◆ CheckExplicitObjectLambda()

void Sema::CheckExplicitObjectLambda ( Declarator D)

Definition at line 11370 of file SemaDeclCXX.cpp.

References CheckExplicitObjectMemberFunction().

Referenced by getLambdaType().

◆ CheckExplicitObjectMemberFunction() [1/2]

void Sema::CheckExplicitObjectMemberFunction ( Declarator D,
DeclarationName  Name,
QualType  R,
bool  IsLambda,
DeclContext DC = nullptr 
)

◆ CheckExplicitObjectMemberFunction() [2/2]

void Sema::CheckExplicitObjectMemberFunction ( DeclContext DC,
Declarator D,
DeclarationName  Name,
QualType  R 
)

Definition at line 11365 of file SemaDeclCXX.cpp.

References CheckExplicitObjectMemberFunction().

◆ CheckExplicitObjectOverride()

bool Sema::CheckExplicitObjectOverride ( CXXMethodDecl New,
const CXXMethodDecl Old 
)

◆ CheckExtraCXXDefaultArguments()

void Sema::CheckExtraCXXDefaultArguments ( Declarator D)

◆ CheckExtVectorCast()

ExprResult Sema::CheckExtVectorCast ( SourceRange  R,
QualType  DestTy,
Expr CastExpr,
CastKind Kind 
)

◆ 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 18651 of file SemaDecl.cpp.

References AbstractFieldType, CheckAlignasUnderalignment(), checkDuplicateDefaultInit(), CheckNontrivialField(), clang::Type::containsErrors(), Context, clang::CPlusPlus, clang::FieldDecl::Create(), Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::Type::getBaseElementTypeUnsafe(), getCurScope(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::CXXRecordDecl::getDefinition(), getLangOpts(), clang::Decl::getLocation(), getOpenCLOptions(), clang::DeclSpec::getStorageClassSpecLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::QualType::hasAddressSpace(), clang::Decl::hasAttrs(), clang::QualType::hasQualifiers(), clang::ICIS_NoInit, inferObjCARCLifetime(), clang::ASTContext::IntTy, clang::Type::isBlockPointerType(), clang::QualType::isConstQualified(), clang::Type::isDependentAddressSpaceType(), clang::Type::isDependentType(), clang::Type::isEventT(), clang::Type::isImageType(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::QualType::isNull(), clang::QualType::isObjCGCWeak(), clang::NamedDecl::isPlaceholderVar(), clang::Type::isReferenceType(), clang::Type::isSamplerT(), clang::SourceLocation::isValid(), clang::Type::isVariablyModifiedType(), LangOpts, ProcessDeclAttributes(), RequireCompleteSizedType(), RequireNonAbstractType(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), tryToFixVariablyModifiedVarType(), and VerifyBitField().

Referenced by HandleField().

◆ checkFinalSuspendNoThrow()

bool Sema::checkFinalSuspendNoThrow ( const Stmt FinalSuspend)

Check that the expression co_await promise.final_suspend() shall not be potentially-throwing.

Definition at line 669 of file SemaCoroutine.cpp.

References checkNoThrow(), Diag(), and clang::Decl::getEndLoc().

Referenced by ActOnCoroutineBodyStart().

◆ CheckFloatComparison()

void Sema::CheckFloatComparison ( SourceLocation  Loc,
Expr LHS,
Expr RHS,
BinaryOperatorKind  Opcode 
)

◆ CheckForConstantInitializer()

bool Sema::CheckForConstantInitializer ( Expr e,
QualType  t 
)

type checking declaration initializers (C99 6.7.8)

Definition at line 12680 of file SemaDecl.cpp.

References Context, Diag(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), and clang::Init.

Referenced by AddInitializerToDecl(), and BuildCompoundLiteralExpr().

◆ CheckForFunctionRedefinition()

void Sema::CheckForFunctionRedefinition ( FunctionDecl FD,
const FunctionDecl EffectiveDefinition = nullptr,
SkipBodyInfo SkipBody = nullptr 
)

◆ CheckForImmediateInvocation()

ExprResult Sema::CheckForImmediateInvocation ( ExprResult  E,
FunctionDecl Decl 
)

◆ CheckForwardProtocolDeclarationForCircularDependency()

bool Sema::CheckForwardProtocolDeclarationForCircularDependency ( IdentifierInfo PName,
SourceLocation PLoc,
SourceLocation  PrevLoc,
const ObjCList< ObjCProtocolDecl > &  PList 
)

◆ CheckFriendAccess()

Sema::AccessResult Sema::CheckFriendAccess ( NamedDecl D)

◆ CheckFunctionCall()

bool Sema::CheckFunctionCall ( FunctionDecl FDecl,
CallExpr TheCall,
const FunctionProtoType Proto 
)

◆ CheckFunctionConstraints()

bool Sema::CheckFunctionConstraints ( const FunctionDecl FD,
ConstraintSatisfaction Satisfaction,
SourceLocation  UsageLoc = SourceLocation(),
bool  ForOverloadResolution = false 
)

◆ CheckFunctionDeclaration()

bool Sema::CheckFunctionDeclaration ( Scope S,
FunctionDecl NewFD,
LookupResult Previous,
bool  IsMemberSpecialization,
bool  DeclIsDefn 
)

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
IsMemberSpecializationwhether 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 11970 of file SemaDecl.cpp.

References clang::FunctionProtoType::ExtProtoInfo::AArch64SMEAttributes, ActOnConversionDeclarator(), ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(), clang::Decl::addAttr(), clang::Qualifiers::addConst(), AddOverriddenMethods(), AllowOverloadingOfFunction(), clang::FunctionType::ARM_None, clang::Type::castAs(), CheckConstPureAttributesUsage(), CheckConstructor(), checkCUDATargetOverload(), CheckCXXDefaultArguments(), CheckDeductionGuideTemplate(), checkForConflictWithNonVisibleExternC(), CheckLiteralOperatorDeclaration(), CheckMultiVersionFunction(), CheckOverload(), CheckOverloadedOperatorDeclaration(), checkThisInStaticMemberFunctionType(), Context, clang::CPlusPlus, clang::CPlusPlus14, clang::CPlusPlus17, clang::FixItHint::CreateInsertion(), CurContext, clang::ASTContext::DeclarationNames, Diag(), clang::Decl::FOK_None, clang::FunctionType::getArmZAState(), clang::FunctionType::getArmZT0State(), clang::Type::getAs(), clang::TypeLoc::getAs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::Stmt::getBeginLoc(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXDestructorName(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionProtoType::getExtProtoInfo(), clang::Decl::getFriendObjectKind(), clang::ASTContext::getFunctionFeatureMap(), clang::ASTContext::getFunctionType(), clang::FunctionTemplateDecl::getInstantiatedFromMemberTemplate(), getLangOpts(), clang::FunctionDecl::getLiteralIdentifier(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::CXXMethodDecl::getMethodQualifiers(), clang::FunctionProtoType::getParamTypes(), clang::Type::getPointeeType(), clang::FunctionDecl::getPrimaryTemplate(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::ASTContext::getTargetInfo(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::Qualifiers::hasConst(), clang::TypeLoc::IgnoreParens(), inTemplateInstantiation(), clang::FunctionDecl::isConstexpr(), clang::NamedDecl::isCXXClassMember(), clang::FunctionDecl::isExternC(), clang::Type::isIncompleteType(), clang::Type::isObjCObjectPointerType(), IsOverload(), clang::FunctionDecl::isOverloadedOperator(), clang::QualType::isPODType(), clang::DeclContext::isRecord(), clang::CXXMethodDecl::isStatic(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), LangOpts, MergeFunctionDecl(), clang::FunctionTemplateDecl::mergePrevDecl(), Ovl_Match, Ovl_NonFunction, Ovl_Overload, Previous, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::FunctionDecl::setPreviousDeclaration(), clang::ValueDecl::setType(), shouldLinkDependentDeclWithPrevious(), clang::FunctionType::SME_PStateSMEnabledMask, clang::TSK_ExplicitSpecialization, and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.

Referenced by ActOnFunctionDeclarator(), CheckImplicitSpecialMemberDeclaration(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

◆ CheckFunctionOrTemplateParamDeclarator()

void Sema::CheckFunctionOrTemplateParamDeclarator ( Scope S,
Declarator D 
)

◆ CheckFunctionReturnType()

bool Sema::CheckFunctionReturnType ( QualType  T,
SourceLocation  Loc 
)

◆ 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
FDthe function declaration, which will be updated to become a function template specialization.
ExplicitTemplateArgsthe 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.
Previousthe set of declarations that may be specialized by this function specialization.
QualifiedFriendwhether 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 9941 of file SemaTemplate.cpp.

References clang::TemplateSpecCandidateSet::addCandidate(), clang::Qualifiers::addConst(), clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::begin(), clang::Type::castAs(), CheckSpecializationInstantiationRedecl(), CheckTemplateSpecializationScope(), Context, clang::TemplateArgumentList::CreateCopy(), clang::CRK_None, clang::CUDATargetMismatch, DeduceTemplateArguments(), Diag(), clang::UnresolvedSetImpl::empty(), clang::UnresolvedSetImpl::end(), clang::Decl::FOK_None, clang::FunctionDecl::getConstexprKind(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::FunctionProtoType::getExtProtoInfo(), clang::Decl::getFriendObjectKind(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::TemplateSpecCandidateSet::getLocation(), getMostSpecialized(), clang::FunctionProtoType::getParamTypes(), clang::FunctionTemplateSpecializationInfo::getPointOfInstantiation(), clang::DeclContext::getRedeclContext(), clang::FunctionType::getReturnType(), clang::FunctionTemplateSpecializationInfo::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), IdentifyCUDATarget(), clang::DeclContext::InEnclosingNamespaceSetOf(), inheritCUDATargetAttrs(), clang::CXXMethodDecl::isConst(), clang::FunctionDecl::isConstexpr(), clang::FunctionTemplateSpecializationInfo::isExplicitSpecialization(), clang::isUnresolvedExceptionSpec(), LangOpts, clang::MakeDeductionFailureInfo(), MarkUnusedFileScopedDecl(), clang::TemplateSpecCandidateSet::NoteCandidates(), NoteOverloadCandidate(), PDiag(), Previous, ResolveExceptionSpec(), clang::Result, clang::TemplateSpecCandidate::set(), clang::FunctionTemplateSpecializationInfo::setTemplateSpecializationKind(), clang::Specialization, clang::Success, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.

Referenced by ActOnFunctionDeclarator(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

◆ CheckHLSLBuiltinFunctionCall()

bool Sema::CheckHLSLBuiltinFunctionCall ( unsigned  BuiltinID,
CallExpr TheCall 
)

◆ CheckHLSLEntryPoint()

void Sema::CheckHLSLEntryPoint ( FunctionDecl FD)

◆ CheckHLSLSemanticAnnotation()

void Sema::CheckHLSLSemanticAnnotation ( FunctionDecl EntryPoint,
const Decl Param,
const HLSLAnnotationAttr AnnotationAttr 
)

◆ CheckIfFunctionSpecializationIsImmediate()

bool Sema::CheckIfFunctionSpecializationIsImmediate ( FunctionDecl FD,
SourceLocation  Loc 
)

◆ 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 3370 of file SemaDeclCXX.cpp.

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

Referenced by AddOverriddenMethods().

◆ checkIllFormedTrivialABIStruct()

void Sema::checkIllFormedTrivialABIStruct ( CXXRecordDecl RD)

◆ CheckImmediateEscalatingFunctionDefinition()

bool Sema::CheckImmediateEscalatingFunctionDefinition ( FunctionDecl FD,
const sema::FunctionScopeInfo FSI 
)

◆ CheckImplementationIvars()

void Sema::CheckImplementationIvars ( ObjCImplementationDecl ImpDecl,
ObjCIvarDecl **  Fields,
unsigned  nIvars,
SourceLocation  Loc 
)

◆ CheckImplicitNullabilityTypeSpecifier()

bool Sema::CheckImplicitNullabilityTypeSpecifier ( QualType Type,
NullabilityKind  Nullability,
SourceLocation  DiagLoc,
bool  AllowArrayTypes,
bool  OverrideExisting 
)

Check whether a nullability type specifier can be added to the given type through some means not written in source (e.g.

API notes).

Parameters
TypeThe type to which the nullability specifier will be added. On success, this type will be updated appropriately.
NullabilityThe nullability specifier to add.
DiagLocThe location to use for diagnostics.
AllowArrayTypesWhether to accept nullability specifiers on an array type (e.g., because it will decay to a pointer).
OverrideExistingWhether to override an existing, locally-specified nullability specifier rather than complaining about the conflict.
Returns
true if nullability cannot be applied, false otherwise.

Definition at line 7724 of file SemaType.cpp.

References CheckNullabilityTypeSpecifier().

Referenced by applyNullability().

◆ CheckImplicitSpecialMemberDeclaration()

void Sema::CheckImplicitSpecialMemberDeclaration ( Scope S,
FunctionDecl FD 
)

◆ CheckInheritingConstructorUsingDecl()

bool Sema::CheckInheritingConstructorUsingDecl ( UsingDecl UD)

◆ checkInitializerLifetime()

void Sema::checkInitializerLifetime ( const InitializedEntity Entity,
Expr Init 
)

◆ 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 42 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::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::ObjCObjectType::isObjCClass(), clang::ObjCObjectType::isObjCId(), clang::ObjCInterfaceDecl::isSuperClassOf(), and clang::Decl::setInvalidDecl().

Referenced by BuildInstanceMessage(), and CheckARCMethodDecl().

◆ CheckInstantiatedFunctionTemplateConstraints()

bool Sema::CheckInstantiatedFunctionTemplateConstraints ( SourceLocation  PointOfInstantiation,
FunctionDecl Decl,
ArrayRef< TemplateArgument TemplateArgs,
ConstraintSatisfaction Satisfaction 
)

◆ CheckLiteralKind()

Sema::ObjCLiteralKind Sema::CheckLiteralKind ( Expr FromE)

◆ 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 16655 of file SemaDeclCXX.cpp.

References clang::ASTContext::Char16Ty, clang::ASTContext::Char32Ty, clang::ASTContext::Char8Ty, clang::ASTContext::CharTy, checkLiteralOperatorTemplateParameterList(), Context, Diag(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::DeclarationName::getCXXLiteralIdentifier(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::DeclContext::getExternCContext(), getLangOpts(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::FunctionDecl::getParamDecl(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::FunctionDecl::getPrimaryTemplate(), clang::ASTContext::getSizeType(), getSourceManager(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::QualType::isConstQualified(), clang::FunctionDecl::isExternC(), clang::Type::isIntegerType(), clang::Type::isRealFloatingType(), clang::IdentifierInfo::isReservedLiteralSuffixId(), clang::Type::isSpecificBuiltinType(), clang::StringLiteralParser::isValidUDSuffix(), clang::QualType::isVolatileQualified(), clang::ASTContext::LongDoubleTy, clang::NotReserved, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_size(), clang::FunctionDecl::parameters(), clang::ASTContext::UnsignedLongLongTy, and clang::ASTContext::WideCharTy.

Referenced by CheckFunctionDeclaration().

◆ checkLiteralOperatorId()

bool Sema::checkLiteralOperatorId ( const CXXScopeSpec SS,
const UnqualifiedId Id,
bool  IsUDSuffix 
)

◆ CheckLogicalOperands()

QualType Sema::CheckLogicalOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
BinaryOperatorKind  Opc 
)
inline

◆ CheckLookupAccess()

void Sema::CheckLookupAccess ( const LookupResult R)

◆ CheckLoopHintExpr()

bool Sema::CheckLoopHintExpr ( Expr E,
SourceLocation  Loc 
)

◆ CheckLValueToRValueConversionOperand()

ExprResult Sema::CheckLValueToRValueConversionOperand ( Expr E)

◆ CheckMain()

void Sema::CheckMain ( FunctionDecl FD,
const DeclSpec D 
)

Definition at line 12347 of file SemaDecl.cpp.

References clang::ASTContext::adjustFunctionType(), clang::Type::castAs(), clang::CC_C, clang::ASTContext::CharTy, Context, clang::CPlusPlus, clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), Diag(), clang::Qualifiers::empty(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::FunctionType::getCallConv(), clang::ASTContext::getCanonicalType(), clang::DeclSpec::getConstexprSpecLoc(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionType::getExtInfo(), clang::DeclSpec::getInlineSpecLoc(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::DeclSpec::getNoreturnSpecLoc(), clang::FunctionDecl::getNumParams(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::PointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::FunctionDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpecLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Decl::hasAttr(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::IntTy, clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::Type::isFunctionType(), clang::FunctionDecl::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isNoreturnSpecified(), clang::SourceRange::isValid(), clang::FunctionProtoType::isVariadic(), clang::OpenCL, clang::Qualifiers::removeConst(), clang::SC_Static, clang::FunctionDecl::setConstexprKind(), clang::FunctionDecl::setHasImplicitReturnZero(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::QualifierCollector::strip(), clang::Unspecified, and clang::FunctionType::ExtInfo::withCallingConv().

Referenced by ActOnFunctionDeclarator().

◆ CheckMatrixCast()

bool Sema::CheckMatrixCast ( SourceRange  R,
QualType  DestTy,
QualType  SrcTy,
CastKind Kind 
)

◆ CheckMatrixElementwiseOperands()

QualType Sema::CheckMatrixElementwiseOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign 
)

◆ CheckMatrixMultiplyOperands()

QualType Sema::CheckMatrixMultiplyOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign 
)

◆ CheckMemberAccess()

Sema::AccessResult Sema::CheckMemberAccess ( SourceLocation  UseLoc,
CXXRecordDecl NamingClass,
DeclAccessPair  Found 
)

Checks access to a member.

Definition at line 1747 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, CheckAccess(), Context, clang::DeclAccessPair::getAccess(), and getLangOpts().

◆ CheckMemberOperatorAccess() [1/3]

Sema::AccessResult Sema::CheckMemberOperatorAccess ( SourceLocation  Loc,
Expr ObjectExpr,
ArrayRef< Expr * >  ArgExprs,
DeclAccessPair  FoundDecl 
)

Definition at line 1805 of file SemaAccess.cpp.

References CheckMemberOperatorAccess().

◆ CheckMemberOperatorAccess() [2/3]

Sema::AccessResult Sema::CheckMemberOperatorAccess ( SourceLocation  Loc,
Expr ObjectExpr,
const SourceRange Range,
DeclAccessPair  FoundDecl 
)

◆ CheckMemberOperatorAccess() [3/3]

Sema::AccessResult Sema::CheckMemberOperatorAccess ( SourceLocation  Loc,
Expr ObjectExpr,
Expr ArgExpr,
DeclAccessPair  FoundDecl 
)

Checks access to an overloaded member operator, including conversion operators.

Definition at line 1796 of file SemaAccess.cpp.

References CheckMemberOperatorAccess(), and clang::Stmt::getSourceRange().

◆ 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 3511 of file SemaOverload.cpp.

References BuildBasePathArray(), Diag(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::ASTContext::getCanonicalType(), clang::MemberPointerType::getClass(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::isNullPointerConstant(), clang::Type::isRecordType(), and clang::Expr::NPC_ValueDependentIsNull.

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
Memberthe member declaration, which will be updated to become a specialization.
Previousthe 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 10211 of file SemaTemplate.cpp.

References adjustCCAndNoReturn(), CheckSpecializationInstantiationRedecl(), CheckTemplateSpecializationScope(), Context, Diag(), clang::Decl::FOK_None, clang::Function, clang::FunctionDecl::getCanonicalDecl(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::Decl::getLocation(), clang::VarDecl::getMemberSpecializationInfo(), clang::EnumDecl::getMemberSpecializationInfo(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), getTemplateSpecializationKind(), hasExplicitCallingConv(), clang::ASTContext::hasSameType(), clang::FunctionDecl::isDeleted(), clang::VarDecl::isStaticDataMember(), clang::Member, Previous, clang::FunctionDecl::setDeletedAsWritten(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.

Referenced by ActOnFunctionDeclarator(), ActOnTag(), and ActOnVariableDeclarator().

◆ 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 1711 of file SemaExprObjC.cpp.

References checkUnknownAnyArg(), Context, clang::FixItHint::CreateReplacement(), DefaultArgumentPromotion(), DefaultVariadicArgumentPromotion(), Diag(), DiagnoseSentinelCalls(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), clang::Selector::getAsString(), clang::SourceRange::getBegin(), clang::Decl::getDeclContext(), getLangOpts(), getMessageSendResultType(), clang::Selector::getNumArgs(), clang::ASTContext::getObjCIdType(), clang::Type::getObjCSubstitutions(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::Stmt::getSourceRange(), clang::ObjCMethodDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getValueKindForType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParenNoopCasts(), clang::InitializedEntity::InitializeParameter(), clang::Type::isBlockPointerType(), clang::SourceRange::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isObjCObjectPointerType(), clang::Selector::isUnarySelector(), clang::ObjCMethodDecl::isVariadic(), maybeExtendBlockObject(), clang::ObjCMethodDecl::param_size(), clang::Parameter, clang::ObjCMethodDecl::parameters(), PerformCopyInitialization(), RequireCompleteType(), SelectorsForTypoCorrection(), clang::ValueDecl::setType(), stripARCUnbridgedCast(), clang::QualType::substObjCTypeArgs(), clang::ASTContext::UnknownAnyTy, VariadicMethod, and clang::VK_PRValue.

Referenced by BuildClassMessage(), and BuildInstanceMessage().

◆ CheckMicrosoftIfExistsSymbol() [1/2]

Sema::IfExistsResult Sema::CheckMicrosoftIfExistsSymbol ( Scope S,
CXXScopeSpec SS,
const DeclarationNameInfo TargetNameInfo 
)

◆ CheckMicrosoftIfExistsSymbol() [2/2]

Sema::IfExistsResult Sema::CheckMicrosoftIfExistsSymbol ( Scope S,
SourceLocation  KeywordLoc,
bool  IsIfExists,
CXXScopeSpec SS,
UnqualifiedId Name 
)

◆ checkMSInheritanceAttrOnDefinition()

bool Sema::checkMSInheritanceAttrOnDefinition ( CXXRecordDecl RD,
SourceRange  Range,
bool  BestCase,
MSInheritanceModel  SemanticSpelling 
)

◆ CheckMSVCRTEntryPoint()

void Sema::CheckMSVCRTEntryPoint ( FunctionDecl FD)

◆ CheckMultiplyDivideOperands()

QualType Sema::CheckMultiplyDivideOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign,
bool  IsDivide 
)

◆ CheckNoInlineAttr()

bool Sema::CheckNoInlineAttr ( const Stmt OrigSt,
const Stmt CurSt,
const AttributeCommonInfo A 
)

Definition at line 266 of file SemaStmtAttr.cpp.

Referenced by handleNoInlineAttr().

◆ 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 7811 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::allocateConversionSequences(), clang::OverloadCandidateSet::getLocation(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::Reversed, TryCopyInitialization(), TryObjectArgumentInitialization(), clang::Unevaluated, and Unevaluated.

◆ checkNonTrivialCUnion()

void Sema::checkNonTrivialCUnion ( QualType  QT,
SourceLocation  Loc,
NonTrivialCUnionContext  UseContext,
unsigned  NonTrivialKind 
)

◆ 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 13227 of file SemaDecl.cpp.

References checkNonTrivialCUnion(), checkNonTrivialCUnionInInitializer(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), clang::Init, clang::SourceLocation::isValid(), NTCUC_CopyInit, NTCUC_DefaultInitializedObject, NTCUK_Copy, and NTCUK_Init.

Referenced by AddInitializerToDecl(), BuildCompoundLiteralExpr(), and checkNonTrivialCUnionInInitializer().

◆ CheckNontrivialField()

bool Sema::CheckNontrivialField ( FieldDecl FD)

◆ CheckNonTypeTemplateParameterType() [1/2]

QualType Sema::CheckNonTypeTemplateParameterType ( QualType  T,
SourceLocation  Loc 
)

◆ CheckNonTypeTemplateParameterType() [2/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 1320 of file SemaTemplate.cpp.

References CheckNonTypeTemplateParameterType(), clang::TypeSourceInfo::getType(), clang::Type::isUndeducedType(), and SubstAutoTypeSourceInfoDependent().

Referenced by ActOnNonTypeTemplateParameter(), CheckNonTypeTemplateParameterType(), and CheckTemplateArgument().

◆ checkNSReturnsRetainedReturnType()

bool Sema::checkNSReturnsRetainedReturnType ( SourceLocation  loc,
QualType  type 
)

◆ CheckObjCARCUnavailableWeakConversion()

bool Sema::CheckObjCARCUnavailableWeakConversion ( QualType  castType,
QualType  ExprType 
)

◆ CheckObjCBridgeRelatedCast()

void Sema::CheckObjCBridgeRelatedCast ( QualType  castType,
Expr castExpr 
)

◆ checkObjCBridgeRelatedComponents()

bool Sema::checkObjCBridgeRelatedComponents ( SourceLocation  Loc,
QualType  DestType,
QualType  SrcType,
ObjCInterfaceDecl *&  RelatedClass,
ObjCMethodDecl *&  ClassMethod,
ObjCMethodDecl *&  InstanceMethod,
TypedefNameDecl *&  TDNDecl,
bool  CfToNs,
bool  Diagnose = true 
)

◆ CheckObjCBridgeRelatedConversions()

bool Sema::CheckObjCBridgeRelatedConversions ( SourceLocation  Loc,
QualType  DestType,
QualType  SrcType,
Expr *&  SrcExpr,
bool  Diagnose = true 
)

◆ CheckObjCConversion()

Sema::ARCConversionResult Sema::CheckObjCConversion ( SourceRange  castRange,
QualType  castType,
Expr *&  op,
CheckedConversionKind  CCK,
bool  Diagnose = true,
bool  DiagnoseCFAudited = false,
BinaryOperatorKind  Opc = BO_PtrMemD 
)

◆ 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 5088 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(), ActOnStartClassInterface(), and ActOnStartProtocolInterface().

◆ CheckObjCForCollectionOperand()

ExprResult Sema::CheckObjCForCollectionOperand ( SourceLocation  forLoc,
Expr collection 
)

◆ CheckObjCMethodDirectOverrides()

void Sema::CheckObjCMethodDirectOverrides ( ObjCMethodDecl method,
ObjCMethodDecl overridden 
)

◆ CheckObjCMethodOverride()

void Sema::CheckObjCMethodOverride ( ObjCMethodDecl NewMethod,
const ObjCMethodDecl Overridden 
)

◆ CheckObjCMethodOverrides()

void Sema::CheckObjCMethodOverrides ( ObjCMethodDecl ObjCMethod,
ObjCInterfaceDecl CurrentClass,
ResultTypeCompatibilityKind  RTC 
)

◆ CheckObjCPropertyAttributes()

void Sema::CheckObjCPropertyAttributes ( Decl PropertyPtrTy,
SourceLocation  Loc,
unsigned Attributes,
bool  propertyInPrimaryClass 
)

◆ 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 3547 of file SemaOpenMP.cpp.

References Context, clang::OMPRequiresDecl::Create(), Diag(), DSAStack, getCurLexicalContext(), and clang::SourceLocation::isInvalid().

Referenced by ActOnOpenMPRequiresDirective().

◆ CheckOMPThreadPrivateDecl()

OMPThreadPrivateDecl * Sema::CheckOMPThreadPrivateDecl ( SourceLocation  Loc,
ArrayRef< Expr * >  VarList 
)

◆ checkOpenMPDeclareVariantFunction()

std::optional< std::pair< FunctionDecl *, Expr * > > Sema::checkOpenMPDeclareVariantFunction ( Sema::DeclGroupPtrTy  DG,
Expr VariantRef,
OMPTraitInfo TI,
unsigned  NumAppendArgs,
SourceRange  SR 
)

Checks '#pragma omp declare variant' variant function and original functions after parsing of the associated method/function.

Parameters
DGFunction declaration to which declare variant directive is applied to.
VariantRefExpression that references the variant function, which must be used instead of the original one, specified in DG.
TIThe trait info object representing the match clause.
NumAppendArgsThe number of omp_interop_t arguments to account for in checking.
Returns
std::nullopt, if the function/variant function are not compatible with the pragma, pair of original function/variant ref expression otherwise.

Definition at line 7513 of file SemaOpenMP.cpp.

References AA_Converting, clang::OMPTraitInfo::anyScoreOrCondition(), areMultiversionVariantFunctionsCompatible(), bool, CheckPlaceholderExpr(), clang::Expr::containsUnexpandedParameterPack(), Context, CreateBuiltinUnaryOp(), clang::ASTContext::DeclMustBeEmitted(), Definition, Diag(), clang::OpaquePtr< PtrTy >::get(), clang::ActionResult< PtrTy, Compress >::get(), clang::IdentifierTable::get(), clang::Type::getAsAdjusted(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::FieldDecl::getCanonicalDecl(), getCurScope(), clang::Expr::getExprLoc(), clang::ASTContext::getFunctionType(), clang::Decl::getLocation(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getPointerType(), getRange(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttr(), clang::ASTContext::Idents, clang::Expr::IgnoreImplicit(), clang::Expr::IgnoreParenImpCasts(), clang::ImplicitConversionSequence::isFailure(), clang::Type::isFunctionNoProtoType(), clang::Type::isFunctionProtoType(), clang::Type::isFunctionType(), clang::Expr::isInstantiationDependent(), clang::Expr::isIntegerConstantExpr(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Decl::isUsed(), clang::Expr::isValueDependent(), LangOpts, LookupName(), LookupOrdinaryName, clang::ASTContext::mergeFunctionTypes(), PDiag(), PerformImplicitConversion(), clang::Result, setPrototype(), and TryImplicitConversion().

Referenced by instantiateOMPDeclareVariantAttr().

◆ CheckOpenMPLinearDecl()

bool Sema::CheckOpenMPLinearDecl ( const ValueDecl D,
SourceLocation  ELoc,
OpenMPLinearClauseKind  LinKind,
QualType  Type,
bool  IsDeclareSimd = false 
)

◆ CheckOpenMPLinearModifier()

bool Sema::CheckOpenMPLinearModifier ( OpenMPLinearClauseKind  LinKind,
SourceLocation  LinLoc 
)

Checks correctness of linear modifiers.

Definition at line 20257 of file SemaOpenMP.cpp.

References Diag(), LangOpts, and clang::OMPC_LINEAR_unknown.

Referenced by ActOnOpenMPLinearClause().

◆ 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 1177 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.

Referenced by CheckFunctionDeclaration(), and CheckUsingShadowDecl().

◆ CheckOverloadedOperatorDeclaration()

bool Sema::CheckOverloadedOperatorDeclaration ( FunctionDecl FnDecl)

◆ CheckOverrideControl()

void Sema::CheckOverrideControl ( NamedDecl D)

◆ CheckOverridingFunctionAttributes()

bool Sema::CheckOverridingFunctionAttributes ( const CXXMethodDecl New,
const CXXMethodDecl Old 
)

◆ CheckOverridingFunctionExceptionSpec()

bool clang::Sema::CheckOverridingFunctionExceptionSpec ( const CXXMethodDecl New,
const CXXMethodDecl Old 
)

◆ CheckOverridingFunctionReturnType()

bool Sema::CheckOverridingFunctionReturnType ( const CXXMethodDecl New,
const CXXMethodDecl Old 
)

◆ CheckPackExpansion() [1/3]

ExprResult Sema::CheckPackExpansion ( Expr Pattern,
SourceLocation  EllipsisLoc,
std::optional< unsigned NumExpansions 
)

Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.

Parameters
PatternThe expression preceding the ellipsis, which will become the pattern of the pack expansion.
EllipsisLocThe location of the ellipsis.

Definition at line 665 of file SemaTemplateVariadic.cpp.

References clang::Expr::containsUnexpandedParameterPack(), Context, CorrectDelayedTyposInExpr(), clang::ASTContext::DependentTy, Diag(), clang::ExprError(), and clang::Stmt::getSourceRange().

◆ CheckPackExpansion() [2/3]

QualType Sema::CheckPackExpansion ( QualType  Pattern,
SourceRange  PatternRange,
SourceLocation  EllipsisLoc,
std::optional< unsigned NumExpansions 
)

Construct a pack expansion type from the pattern of the pack expansion.

Definition at line 640 of file SemaTemplateVariadic.cpp.

References clang::Type::containsUnexpandedParameterPack(), Context, Diag(), clang::Type::getContainedDeducedType(), and clang::ASTContext::getPackExpansionType().

◆ CheckPackExpansion() [3/3]

TypeSourceInfo * Sema::CheckPackExpansion ( TypeSourceInfo Pattern,
SourceLocation  EllipsisLoc,
std::optional< unsigned NumExpansions 
)

◆ CheckParameter()

ParmVarDecl * Sema::CheckParameter ( DeclContext DC,
SourceLocation  StartLoc,
SourceLocation  NameLoc,
IdentifierInfo Name,
QualType  T,
TypeSourceInfo TSInfo,
StorageClass  SC 
)

Definition at line 15359 of file SemaDecl.cpp.

References clang::Sema::DelayedDiagnostics::add(), checkNonTrivialCUnion(), Context, clang::ParmVarDecl::Create(), clang::FixItHint::CreateInsertion(), clang::Default, Diag(), clang::QualType::getAddressSpace(), clang::ASTContext::getAdjustedParameterType(), getEnclosingLambda(), clang::TypeLoc::getEndLoc(), getLangOpts(), clang::ASTContext::getLifetimeQualifiedType(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), clang::ASTContext::getObjCObjectPointerType(), clang::ParmVarDecl::getOriginalType(), clang::TypeLoc::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), clang::Type::isArrayType(), clang::QualType::isConstQualified(), clang::Type::isFunctionPointerType(), clang::Type::isObjCLifetimeType(), clang::Type::isObjCObjectType(), clang::VarDecl::isParameterPack(), clang::sema::DelayedDiagnostic::makeForbiddenType(), NTCUC_FunctionParam, NTCUK_Copy, NTCUK_Destruct, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::OpenCL, clang::opencl_private, clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::Sema::DelayedDiagnostics::shouldDelayDiagnostics(), and clang::wasm_funcref.

Referenced by ActOnMethodDeclaration(), ActOnParamDeclarator(), and SubstParmVarDecl().

◆ CheckParameterPacksForExpansion()

bool Sema::CheckParameterPacksForExpansion ( SourceLocation  EllipsisLoc,
SourceRange  PatternRange,
ArrayRef< UnexpandedParameterPack Unexpanded,
const MultiLevelTemplateArgumentList TemplateArgs,
bool ShouldExpand,
bool RetainExpansion,
std::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
EllipsisLocThe location of the ellipsis that identifies the pack expansion.
PatternRangeThe source range that covers the entire pattern of the pack expansion.
UnexpandedThe set of unexpanded parameter packs within the pattern.
ShouldExpandWill be set to true if the transformer should expand the corresponding pack expansions into separate arguments. When set, NumExpansions must also be set.
RetainExpansionWhether 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.
NumExpansionsThe 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 686 of file SemaTemplateVariadic.cpp.

References CurrentInstantiationScope, Diag(), clang::LocalInstantiationScope::findInstantiationOf(), clang::getDepthAndIndex(), clang::NamedDecl::getIdentifier(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::LocalInstantiationScope::getPartiallySubstitutedPack(), and clang::MultiLevelTemplateArgumentList::hasTemplateArgument().

Referenced by instantiateDependentAlignedAttr(), InstantiateMemInitializers(), and SubstBaseSpecifiers().

◆ CheckParamExceptionSpec()

bool clang::Sema::CheckParamExceptionSpec ( const PartialDiagnostic DiagID,
const PartialDiagnostic NoteID,
const FunctionProtoType Target,
bool  SkipTargetFirstParameter,
SourceLocation  TargetLoc,
const FunctionProtoType Source,
bool  SkipSourceFirstParameter,
SourceLocation  SourceLoc 
)

CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalent exception specs.

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

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 17998 of file SemaChecking.cpp.

References AbstractParamType, clang::C23, clang::CPlusPlus, Diag(), diagnoseArrayStarInParamType(), DiagnoseUseOfDecl(), clang::Type::getAsCXXRecordDecl(), getLangOpts(), clang::DeclContext::getParent(), clang::Attr::getSpelling(), clang::DeclContext::isFunctionOrMethod(), clang::Type::isWebAssemblyTableType(), LangOpts, LookupDestructor(), MarkFunctionReferenced(), RequireCompleteType(), and RequireNonAbstractType().

Referenced by ActOnBlockArguments(), ActOnStartOfFunctionDef(), ActOnStartOfObjCMethodDef(), and CompleteLambdaCallOperator().

◆ 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 21731 of file SemaExpr.cpp.

References clang::CXXScopeSpec::Adopt(), BuildDeclRefExpr(), clang::ASTContext::BuiltinInfo, checkPseudoObjectRValue(), Context, clang::DeclRefExpr::copyTemplateArgumentsInto(), CorrectDelayedTyposInExpr(), clang::CPlusPlus20, clang::CallExpr::Create(), clang::DeclarationName::CXXDestructorName, Diag(), diagnoseARCUnbridgedCast(), diagnoseUnknownAnyExpr(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsPlaceholderType(), clang::Stmt::getBeginLoc(), clang::DeclRefExpr::getDecl(), clang::DeclRefExpr::getFoundDecl(), clang::BuiltinType::getKind(), getLangOpts(), clang::DeclRefExpr::getNameInfo(), clang::ASTContext::getPointerType(), clang::DeclRefExpr::getQualifierLoc(), clang::DeclRefExpr::getTemplateKeywordLoc(), clang::Expr::getType(), clang::DeclRefExpr::hasExplicitTemplateArgs(), clang::DeclRefExpr::hasQualifier(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParens(), ImpCastExprToType(), InstantiateFunctionDefinition(), clang::ASTContext::IntTy, clang::ASTContext::isDependenceAllowed(), clang::Builtin::Context::isInStdNamespace(), PDiag(), resolveAndFixAddressOfSingleOverloadCandidate(), ResolveAndFixSingleFunctionTemplateSpecialization(), clang::Result, stripARCUnbridgedCast(), tryToRecoverWithCall(), clang::VK_LValue, and clang::VK_PRValue.

Referenced by ActOnArraySubscriptExpr(), ActOnCoawaitExpr(), ActOnConditionalOp(), ActOnDecltypeExpression(), ActOnFinishFullExpr(), ActOnForEachLValueExpr(), ActOnGCCAsmStmt(), ActOnOMPArraySectionExpr(), ActOnOMPArrayShapingExpr(), ActOnStartCXXMemberReference(), BuildArrayType(), BuildBinOp(), BuildCallExpr(), BuildCoreturnStmt(), BuildCoyieldExpr(), BuildCXXAssumeExpr(), BuildCXXNew(), BuildCXXNoexceptExpr(), BuildCXXTypeId(), BuildExpressionTrait(), BuildInitList(), BuildInstanceMessage(), BuildObjCSubscriptExpression(), BuildResolvedCoawaitExpr(), BuildUnaryOp(), BuildUnresolvedCoawaitExpr(), CheckAddressOfOperand(), CheckArgsForPlaceholders(), CheckArrow(), CheckBooleanCondition(), CheckCommaOperands(), CheckConditionalOperands(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckObjCCollectionLiteralElement(), checkOpenMPDeclareVariantFunction(), checkPlaceholderForOverload(), checkPointerAuthValue(), checkPseudoObjectAssignment(), CheckRealImagOperand(), CreateBuiltinMatrixSubscriptExpr(), CreateUnaryExprOrTypeTraitExpr(), DeduceAutoType(), DefaultFunctionArrayConversion(), DefaultLvalueConversion(), DefaultVariadicArgumentPromotion(), HandleExprEvaluationContextForTypeof(), IgnoredValueConversions(), clang::InitializationSequence::InitializeFrom(), LookupInlineAsmIdentifier(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), PerformMemberExprBaseConversion(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), and clang::TreeTransform< Derived >::TransformExprRequirement().

◆ 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 3383 of file SemaOverload.cpp.

References clang::ASTContext::BoolTy, Diag(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isFunctionType(), clang::Expr::isNullPointerConstant(), clang::Type::isRecordType(), clang::Expr::NPC_ValueDependentIsNotNull, clang::Expr::NPC_ValueDependentIsNull, and clang::Expr::NPCK_ZeroExpression.

Referenced by CheckSingleAssignmentConstraints(), and PerformImplicitConversion().

◆ CheckPointerToMemberOperands()

QualType Sema::CheckPointerToMemberOperands ( ExprResult LHS,
ExprResult RHS,
ExprValueKind VK,
SourceLocation  OpLoc,
bool  isIndirect 
)

◆ checkPseudoObjectAssignment()

ExprResult Sema::checkPseudoObjectAssignment ( Scope S,
SourceLocation  OpLoc,
BinaryOperatorKind  Opcode,
Expr LHS,
Expr RHS 
)

◆ checkPseudoObjectIncDec()

ExprResult Sema::checkPseudoObjectIncDec ( Scope S,
SourceLocation  OpLoc,
UnaryOperatorKind  Opcode,
Expr Op 
)

◆ checkPseudoObjectRValue()

ExprResult Sema::checkPseudoObjectRValue ( Expr E)

Definition at line 1533 of file SemaPseudoObject.cpp.

References clang::Expr::IgnoreParens().

Referenced by CheckPlaceholderExpr().

◆ CheckPtrComparisonWithNullChar()

void Sema::CheckPtrComparisonWithNullChar ( ExprResult E,
ExprResult NullE 
)

◆ CheckPureMethod()

bool Sema::CheckPureMethod ( CXXMethodDecl Method,
SourceRange  InitRange 
)

◆ CheckQualifiedFunctionForTypeId()

bool Sema::CheckQualifiedFunctionForTypeId ( QualType  T,
SourceLocation  Loc 
)

◆ CheckQualifiedMemberReference()

bool Sema::CheckQualifiedMemberReference ( Expr BaseExpr,
QualType  BaseType,
const CXXScopeSpec SS,
const LookupResult R 
)

◆ CheckRebuiltStmtAttributes()

bool Sema::CheckRebuiltStmtAttributes ( ArrayRef< const Attr * >  Attrs)

◆ CheckRedeclarationExported()

bool Sema::CheckRedeclarationExported ( NamedDecl New,
NamedDecl Old 
)

◆ CheckRedeclarationInModule()

bool Sema::CheckRedeclarationInModule ( NamedDecl New,
NamedDecl Old 
)

◆ CheckRedeclarationModuleOwnership()

bool Sema::CheckRedeclarationModuleOwnership ( NamedDecl New,
NamedDecl Old 
)

◆ CheckRegparmAttr()

bool Sema::CheckRegparmAttr ( const ParsedAttr attr,
unsigned value 
)

◆ CheckRemainderOperands()

QualType Sema::CheckRemainderOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign = false 
)

◆ checkRetainCycles() [1/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 19071 of file SemaChecking.cpp.

References diagnoseRetainCycle(), findCapturingExpr(), and findRetainCycleOwner().

◆ checkRetainCycles() [2/3]

void Sema::checkRetainCycles ( ObjCMessageExpr msg)

◆ checkRetainCycles() [3/3]

void Sema::checkRetainCycles ( VarDecl Var,
Expr Init 
)

◆ checkSectionName()

bool Sema::checkSectionName ( SourceLocation  LiteralLoc,
StringRef  Str 
)

Definition at line 3336 of file SemaDeclAttr.cpp.

References Diag(), isValidSectionSpecifier(), and toString().

Referenced by ActOnPragmaMSSeg(), and handleSectionAttr().

◆ CheckShadow() [1/2]

void Sema::CheckShadow ( NamedDecl D,
NamedDecl ShadowedDecl,
const LookupResult R 
)

◆ CheckShadow() [2/2]

void Sema::CheckShadow ( Scope S,
VarDecl D 
)

◆ 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 8516 of file SemaDecl.cpp.

References clang::CPlusPlus, Diag(), clang::Decl::getDeclContext(), getLangOpts(), 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 
)

◆ 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
LHSTypeThe destination type for the assignment.
RHSThe source expression for the assignment.
DiagnoseIf 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.
DiagnoseCFAuditedIf true, the target is a function parameter in an audited Core Foundation API and does not need to be checked for ARC retain issues.
ConvertRHSIf true, RHS will be updated to model the conversions necessary to perform the assignment. If false, Diagnose must also be false.

Definition at line 10562 of file SemaExpr.cpp.

References AA_Assigning, ACR_okay, clang::C23, CCK_ImplicitConversion, CheckAssignmentConstraints(), CheckConversionToObjCLiteral(), CheckObjCARCUnavailableWeakConversion(), CheckObjCBridgeRelatedConversions(), CheckObjCConversion(), CheckPointerConversion(), Compatible, Context, clang::CPlusPlus, DefaultFunctionArrayLvalueConversion(), Diag(), Diagnose, FixOverloadedFunctionReference(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::QualType::getAtomicUnqualifiedType(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getNonLValueExprType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), ImpCastExprToType(), Incompatible, IncompatibleObjCWeakRef, clang::Type::isAtomicType(), clang::Type::isBlockPointerType(), clang::Type::isBooleanType(), clang::ImplicitConversionSequence::isFailure(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isQueueT(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Expr::NPC_ValueDependentIsNull, clang::ObjC, clang::ASTContext::OverloadTy, PerformImplicitConversion(), ResolveAddressOfOverloadedFunction(), TryImplicitConversion(), clang::VK_PRValue, and clang::ASTContext::VoidPtrTy.

Referenced by ActOnIndirectGotoStmt(), CheckAssignmentOperands(), checkObjCCollectionLiteralElement(), IsStandardConversion(), and clang::InitializationSequence::Perform().

◆ CheckSizelessVectorCompareOperands()

QualType Sema::CheckSizelessVectorCompareOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
BinaryOperatorKind  Opc 
)

◆ CheckSizelessVectorConditionalTypes()

QualType Sema::CheckSizelessVectorConditionalTypes ( ExprResult Cond,
ExprResult LHS,
ExprResult RHS,
SourceLocation  QuestionLoc 
)

◆ CheckSizelessVectorOperands()

QualType Sema::CheckSizelessVectorOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign,
ArithConvKind  OperationKind 
)

◆ 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
NewLocthe location of the new explicit specialization or instantiation.
NewTSKthe kind of the new explicit specialization or instantiation.
PrevDeclthe previous declaration of the entity.
PrevTSKthe kind of the old explicit specialization or instantiatin.
PrevPointOfInstantiationif valid, indicates where the previous declaration was instantiated (either implicitly or explicitly).
HasNoEffectwill 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 9697 of file SemaTemplate.cpp.

References Context, Diag(), DiagLocForExplicitInstantiation(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::getPreviousDecl(), clang::ASTContext::getTargetInfo(), getTemplateSpecializationKind(), clang::TargetInfo::getTriple(), 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 ActOnExplicitInstantiation(), CheckFunctionTemplateSpecialization(), CheckMemberSpecialization(), InstantiateClassMembers(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

◆ checkSpecializationReachability()

void Sema::checkSpecializationReachability ( SourceLocation  Loc,
NamedDecl Spec 
)

◆ 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/reachable, and diagnose if not.

Definition at line 12154 of file SemaTemplate.cpp.

References getLangOpts(), and Visible.

Referenced by checkSpecializationReachability(), and 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]TThe exception type. This will be decayed to a pointer type when the input is an array or a function type.

Definition at line 121 of file SemaExceptionSpec.cpp.

References clang::Type::castAs(), Context, Diag(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), getLangOpts(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Type::isArrayType(), clang::TagType::isBeingDefined(), clang::Type::isFunctionType(), clang::Type::isRecordType(), clang::Type::isSizelessType(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), and RequireCompleteType().

Referenced by checkExceptionSpecification(), and clang::TreeTransform< Derived >::TransformExceptionSpec().

◆ 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 6803 of file SemaExpr.cpp.

References Context, clang::CPlusPlus, Diag(), DiagnoseCalleeStaticArrayParam(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getAsConstantArrayType(), getASTContext(), clang::ArrayType::getElementType(), getLangOpts(), clang::ParmVarDecl::getOriginalType(), clang::ConstantArrayType::getSize(), clang::ArrayType::getSizeModifier(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInCharsIfKnown(), clang::Expr::IgnoreParenCasts(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_NeverValueDependent, and clang::Static.

Referenced by GatherArgumentsForCall().

◆ 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 14734 of file SemaDecl.cpp.

References clang::Decl::addAttr(), getASTContext(), clang::Decl::getAttr(), clang::getDLLAttr(), clang::Decl::getParentFunctionOrMethod(), clang::Decl::hasAttr(), and clang::VarDecl::isStaticLocal().

Referenced by FinalizeDeclaration().

◆ checkStringLiteralArgumentAttr() [1/2]

bool Sema::checkStringLiteralArgumentAttr ( const AttributeCommonInfo CI,
const Expr E,
StringRef &  Str,
SourceLocation ArgLocation = nullptr 
)

Check if the argument E is a ASCII string literal.

If not emit an error and return false, otherwise set Str to the value of the string literal and return true.

Definition at line 346 of file SemaDeclAttr.cpp.

References clang::AANT_ArgumentString, Diag(), clang::Stmt::getBeginLoc(), and clang::Expr::IgnoreParenCasts().

Referenced by CheckCallingConvAttr(), checkFunctionConditionAttr(), checkStringLiteralArgumentAttr(), handleAbiTagAttr(), handleAcquireHandleAttr(), handleAliasAttr(), handleAnnotateAttr(), HandleAnnotateTypeAttr(), handleARMInterruptAttr(), handleArmNewAttr(), handleArmStateAttribute(), handleAttrWithMessage(), handleBTFDeclTagAttr(), handleCallableWhenAttr(), handleCapabilityAttr(), handleCodeModelAttr(), handleCodeSegAttr(), handleDeprecatedAttr(), handleDiagnoseIfAttr(), handleEnforceTCBAttr(), handleErrorAttr(), handleFunctionReturnThunksAttr(), handleHandleAttr(), handleHLSLShaderAttr(), handleIFuncAttr(), handleMipsInterruptAttr(), handleNoBuiltinAttr(), handleNoSanitizeAttr(), handleObjCRuntimeName(), handleOMPAssumeAttr(), handleRISCVInterruptAttr(), handleSectionAttr(), handleSuppressAttr(), handleSwiftAsyncName(), handleSwiftAttrAttr(), handleSwiftBridge(), handleSwiftName(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTLSModelAttr(), handleUuidAttr(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakRefAttr(), handleWebAssemblyExportNameAttr(), handleWebAssemblyImportModuleAttr(), handleWebAssemblyImportNameAttr(), handleZeroCallUsedRegsAttr(), and instantiateDependentAnnotationAttr().

◆ checkStringLiteralArgumentAttr() [2/2]

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, checkStringLiteralArgumentAttr(), clang::FixItHint::CreateInsertion(), Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Stmt::getBeginLoc(), getLocForEndOfToken(), 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 1763 of file SemaAccess.cpp.

References AR_accessible, clang::AS_public, CheckAccess(), Context, getLangOpts(), and clang::ASTContext::getRecordType().

Referenced by checkMemberDecomposition().

◆ CheckSubscriptingKind()

Sema::ObjCSubscriptKind Sema::CheckSubscriptingKind ( Expr FromE)

◆ CheckSubtractionOperands()

QualType Sema::CheckSubtractionOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
QualType CompLHSTy = nullptr 
)

Definition at line 11968 of file SemaExpr.cpp.

References ACK_Arithmetic, ACK_CompAssign, checkArithmeticBinOpPointerOperands(), checkArithmeticNull(), checkArithmeticOnObjCPointer(), checkArithmeticOpPointerOperand(), CheckMatrixElementwiseOperands(), CheckSizelessVectorOperands(), CheckVectorOperands(), Context, clang::CPlusPlus, Diag(), diagnoseArithmeticOnNullPointer(), diagnosePointerIncompatibility(), diagnoseSubtractionOnNullPointer(), clang::Expr::EvaluateAsInt(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::APValue::getInt(), getLangOpts(), clang::Type::getPointeeType(), clang::ASTContext::getPointerDiffType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInChars(), clang::CanQual< T >::getUnqualifiedType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::IgnoreParenCasts(), InvalidOperands(), clang::Type::isAnyPointerType(), clang::Type::isArithmeticType(), clang::Type::isConstantMatrixType(), clang::Type::isFunctionType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Expr::isNullPointerConstant(), clang::Type::isObjCObjectPointerType(), clang::Type::isSveVLSBuiltinType(), clang::Expr::isValueDependent(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::CharUnits::isZero(), clang::Expr::NPC_ValueDependentIsNotNull, clang::ASTContext::typesAreCompatible(), UsualArithmeticConversions(), and clang::Expr::EvalResult::Val.

Referenced by CreateBuiltinBinOp().

◆ CheckSwitchCondition()

ExprResult Sema::CheckSwitchCondition ( SourceLocation  SwitchLoc,
Expr Cond 
)

◆ checkTargetAttr()

bool Sema::checkTargetAttr ( SourceLocation  LiteralLoc,
StringRef  Str 
)

◆ checkTargetClonesAttrString()

bool Sema::checkTargetClonesAttrString ( SourceLocation  LiteralLoc,
StringRef  Str,
const StringLiteral Literal,
Decl D,
bool HasDefault,
bool HasCommas,
bool HasNotDefault,
SmallVectorImpl< SmallString< 64 > > &  StringsBuffer 
)

◆ checkTargetVersionAttr()

bool Sema::checkTargetVersionAttr ( SourceLocation  LiteralLoc,
Decl D,
StringRef &  Str,
bool isDefault 
)

◆ CheckTemplateArgument() [1/3]

bool Sema::CheckTemplateArgument ( NamedDecl Param,
TemplateArgumentLoc Arg,
NamedDecl Template,
SourceLocation  TemplateLoc,
SourceLocation  RAngleLoc,
unsigned  ArgumentPackIndex,
SmallVectorImpl< TemplateArgument > &  SugaredConverted,
SmallVectorImpl< TemplateArgument > &  CanonicalConverted,
CheckTemplateArgumentKind  CTAK 
)

Check that the given template argument corresponds to the given template parameter.

Parameters
ParamThe template parameter against which the argument will be checked.
ArgThe template argument, which may be updated due to conversions.
TemplateThe template in which the template argument resides.
TemplateLocThe location of the template name for the template whose argument list we're matching.
RAngleLocThe location of the right angle bracket ('>') that closes the template argument list.
ArgumentPackIndexThe index into the argument pack where this argument will be placed. Only valid if the parameter is a parameter pack.
ConvertedThe checked, converted argument will be added to the end of this small vector.
CTAKDescribes how we arrived at this particular template argument: explicitly written, deduced, etc.
Returns
true on error, false otherwise.

Definition at line 6027 of file SemaTemplate.cpp.

References ActOnPackExpansion(), clang::CXXScopeSpec::Adopt(), CheckNonTypeTemplateParameterType(), CheckTemplateArgument(), CheckTemplateTemplateArgument(), CheckTemplateTypeArgument(), Context, convertTypeTemplateArgumentToTemplate(), clang::DependentScopeDeclRefExpr::Create(), CTAK_Specified, CurContext, clang::TemplateArgument::Declaration, Diag(), clang::TemplateArgument::Expression, clang::ActionResult< PtrTy, Compress >::get(), clang::TemplateArgumentLoc::getArgument(), clang::Type::getAs(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalTemplateArgument(), clang::Decl::getDeclContext(), clang::TemplateTemplateParmDecl::getExpansionTemplateParameters(), clang::TemplateArgument::getKind(), getLangOpts(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateArgumentLoc::getTemplateEllipsisLoc(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateDecl::getTemplateParameters(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::TypeSourceInfo::getTypeLoc(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::TemplateArgument::Integral, clang::DeclContext::isDependentContext(), clang::TemplateTemplateParmDecl::isExpandedParameterPack(), clang::Type::isFunctionType(), clang::Type::isInstantiationDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::TemplateArgument::isNull(), clang::QualType::isNull(), NoteTemplateParameterLocation(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, NumSFINAEErrors, clang::TemplateArgument::Pack, Scope, clang::TemplateArgument::StructuralValue, SubstTemplateParams(), SubstType(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

Referenced by ActOnTypeParameter(), CheckTemplateArgument(), CheckTemplateArgumentList(), CheckTemplateTypeArgument(), ConvertDeducedTemplateArgument(), ConvertDeducedTemplateArguments(), and LookupLiteralOperator().

◆ CheckTemplateArgument() [2/3]

ExprResult Sema::CheckTemplateArgument ( NonTypeTemplateParmDecl Param,
QualType  ParamType,
Expr Arg,
TemplateArgument SugaredConverted,
TemplateArgument CanonicalConverted,
CheckTemplateArgumentKind  CTAK 
)

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 7541 of file SemaTemplate.cpp.

References ActOnConstantExpression(), ActOnFinishFullExpr(), clang::AlreadyDiagnosed, BuildConvertedConstantExpression(), clang::Type::castAs(), CCEK_TemplateArg, CheckConvertedConstantExpression(), CheckNonTypeTemplateParameterType(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), ConstantEvaluated, Context, clang::CPlusPlus11, clang::CPlusPlus17, clang::CPlusPlus20, clang::InitializationKind::CreateForInit(), CTAK_Deduced, DeduceAutoType(), DeduceTemplateSpecializationFromInitializer(), DefaultLvalueConversion(), Diag(), DiagnoseUseOfDecl(), clang::Enum, EvaluateConvertedConstantExpression(), clang::ExprError(), FixOverloadedFunctionReference(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::Decl::getCanonicalDecl(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTContext::getCanonicalType(), clang::Type::getContainedDeducedType(), clang::NamedDecl::getDeclName(), clang::NonTypeTemplateParmDecl::getDepth(), clang::Expr::getExprLoc(), clang::ASTContext::getIntWidth(), getLangOpts(), clang::Decl::getLocation(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::ReferenceType::getPointeeType(), clang::MemberPointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::QualType::hasQualifiers(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::IgnoreParenImpCasts(), ImpCastExprToType(), clang::InitializedEntity::InitializeTemplateParameter(), clang::Type::isArrayType(), clang::Type::isBitIntType(), clang::Type::isBooleanType(), clang::DeducedType::isDeduced(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Type::isFunctionType(), clang::Type::isIncompleteOrObjectType(), clang::Type::isIntegralOrEnumerationType(), IsIntegralPromotion(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isLValueReferenceType(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), isNullPointerValueTemplateArgument(), clang::Type::isNullPtrType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Type::isRValueReferenceType(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Expr::isTypeDependent(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::Expr::isValueDependent(), NoteTemplateParameterLocation(), NPV_Error, NPV_NotNullPointer, NPV_NullPointer, clang::ASTContext::OverloadTy, clang::InitializationSequence::Perform(), ResolveAddressOfOverloadedFunction(), clang::Result, clang::Success, toString(), VerifyIntegerConstantExpression(), clang::VK_LValue, clang::VK_PRValue, and clang::VK_XValue.

◆ CheckTemplateArgument() [3/3]

bool Sema::CheckTemplateArgument ( 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 6932 of file SemaTemplate.cpp.

References Context, Diag(), clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalType(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::hasUnnamedOrLocalType(), clang::Type::isVariablyModifiedType(), LangOpts, and clang::ASTContext::OverloadTy.

◆ CheckTemplateArgumentList()

bool Sema::CheckTemplateArgumentList ( TemplateDecl Template,
SourceLocation  TemplateLoc,
TemplateArgumentListInfo TemplateArgs,
bool  PartialTemplateArgs,
SmallVectorImpl< TemplateArgument > &  SugaredConverted,
SmallVectorImpl< TemplateArgument > &  CanonicalConverted,
bool  UpdateArgsWithConversions = true,
bool ConstraintsNotSatisfied = nullptr 
)

Check that the given template arguments can 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
TemplateThe template to which the template arguments are being provided.
TemplateLocThe location of the template name in the source.
TemplateArgsThe 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.
PartialTemplateArgsTrue if the list of template arguments is intentionally partial, e.g., because we're checking just the initial set of template arguments.
ConvertedWill receive the converted, canonicalized template arguments.
UpdateArgsWithConversionsIf true, update TemplateArgs to contain the converted forms of the template arguments as written. Otherwise, TemplateArgs will not be modified.
ConstraintsNotSatisfiedIf provided, and an error occurred, 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 6315 of file SemaTemplate.cpp.

References clang::TemplateArgumentListInfo::addArgument(), clang::TemplateParameterList::begin(), clang::Decl::castToDeclContext(), CheckTemplateArgument(), clang::ConstraintsNotSatisfied, Context, clang::TemplateArgument::CreatePackCopy(), CTAK_Specified, CurrentInstantiationScope, Diag(), diagnoseMissingArgument(), clang::TemplateParameterList::end(), EnsureTemplateArgumentListConstraints(), getArgument(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::ASTContext::getCanonicalTemplateArgument(), clang::Decl::getDeclContext(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateParameterList::getDepth(), clang::getExpandedPackSize(), clang::Decl::getKind(), clang::NamedDecl::getMostRecentDecl(), clang::LocalInstantiationScope::getPartiallySubstitutedPack(), clang::TemplateArgumentListInfo::getRAngleLoc(), clang::TemplateParameterList::getSourceRange(), clang::TemplateDecl::getTemplatedDecl(), getTemplateInstantiationArgs(), getTemplateNameKindForDiagnostics(), clang::TemplateArgumentLoc::getTemplateNameLoc(), GetTemplateParameterList(), clang::TypeSourceInfo::getType(), hasReachableDefaultArgument(), int, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::isSubstitutedDefaultArgument(), NoteTemplateLocation(), NoteTemplateParameterLocation(), clang::TemplateArgumentListInfo::size(), and SubstDefaultTemplateArgument().

Referenced by ActOnClassTemplateSpecialization(), ActOnExplicitInstantiation(), ActOnVarTemplateSpecialization(), CheckConceptTemplateId(), CheckDeducedPlaceholderConstraints(), CheckTemplateIdType(), CheckVarTemplateId(), FinishTemplateArgumentDeduction(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), isTemplateTemplateParameterAtLeastAsSpecializedAs(), SubstituteExplicitTemplateArguments(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

◆ CheckTemplateDeclScope()

bool Sema::CheckTemplateDeclScope ( Scope S,
TemplateParameterList TemplateParams 
)

◆ CheckTemplateIdType()

QualType Sema::CheckTemplateIdType ( TemplateName  Template,
SourceLocation  TemplateLoc,
TemplateArgumentListInfo TemplateArgs 
)

Definition at line 4295 of file SemaTemplate.cpp.

References clang::MultiLevelTemplateArgumentList::addOuterRetainedLevels(), clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), AliasTemplate, clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::TemplateArgumentListInfo::arguments(), checkBuiltinTemplateIdType(), CheckTemplateArgumentList(), ClassTemplate, Context, clang::ClassTemplateSpecializationDecl::Create(), CurContext, Diag(), DiagnoseUseOfDecl(), clang::TemplateArgument::Expression, findFailedBooleanCondition(), clang::ASTContext::getCanonicalTemplateSpecializationType(), clang::Type::getCanonicalTypeInternal(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::DependentTemplateName::getIdentifier(), clang::DeclContext::getLookupParent(), clang::DependentTemplateName::getQualifier(), clang::Stmt::getSourceRange(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTypeDeclType(), clang::TypedefNameDecl::getUnderlyingType(), InstantiateAttrsForDecl(), clang::QualType::isCanonical(), isEnableIfAliasTemplate(), clang::DependentTemplateName::isIdentifier(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), isSFINAEContext(), clang::None, NoteAllFoundTemplates(), PDiag(), resolveAssumedTemplateNameAsType(), Scope, clang::Decl::setLexicalDeclContext(), SubstType(), and clang::TSK_Undeclared.

Referenced by ActOnCXXNestedNameSpecifier(), ActOnTagTemplateIdType(), ActOnTemplateIdType(), ActOnTypenameType(), BuildStdInitializerList(), checkBuiltinTemplateIdType(), FindInstantiatedDecl(), lookupCoroutineHandleType(), lookupPromiseType(), lookupStdTypeTraitMember(), and clang::TreeTransform< Derived >::RebuildTemplateSpecializationType().

◆ 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
NewParamsTemplate 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.
OldParamsIf 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.
TPCDescribes the context in which we are checking the given template parameter list.
SkipBodyIf 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 3251 of file SemaTemplate.cpp.

References clang::TemplateParameterList::begin(), Context, Diag(), DiagnoseDefaultTemplateArgument(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TemplateParameterList::end(), getASTContext(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateTypeParmDecl::getDefaultArgumentLoc(), clang::NonTypeTemplateParmDecl::getDefaultArgumentLoc(), clang::Module::getFullModuleName(), clang::Decl::getImportedOwningModule(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::Decl::getOwningModule(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateTypeParmDecl::hasDefaultArgument(), clang::NonTypeTemplateParmDecl::hasDefaultArgument(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), hasVisibleDefaultArgument(), clang::Invalid, clang::TemplateTemplateParmDecl::isPackExpansion(), clang::TemplateTemplateParmDecl::isParameterPack(), clang::TemplateTemplateParmDecl::removeDefaultArgument(), clang::TemplateTemplateParmDecl::setInheritedDefaultArgument(), clang::Sema::SkipBodyInfo::ShouldSkip, TPC_ClassTemplate, TPC_FriendClassTemplate, TPC_TypeAliasTemplate, TPC_VarTemplate, and UPPC_NonTypeTemplateParameterType.

Referenced by ActOnAliasDeclaration(), ActOnFunctionDeclarator(), ActOnVariableDeclarator(), CheckClassTemplate(), MatchTemplateParametersToScopeSpecifier(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

◆ CheckTemplatePartialSpecialization() [1/2]

void Sema::CheckTemplatePartialSpecialization ( ClassTemplatePartialSpecializationDecl Partial)

◆ CheckTemplatePartialSpecialization() [2/2]

void Sema::CheckTemplatePartialSpecialization ( VarTemplatePartialSpecializationDecl Partial)

Definition at line 4922 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
TemplateNameLocthe location of the template name.
PrimaryTemplatethe template parameters of the primary class template.
NumExplicitthe number of explicitly-specified template arguments.
TemplateArgsthe template arguments of the class template partial specialization.
Returns
true if there was an error, false otherwise.

Definition at line 9127 of file SemaTemplate.cpp.

References CheckNonTypeTemplatePartialSpecializationArgs(), clang::Decl::getDeclContext(), clang::TemplateParameterList::getParam(), clang::TemplateDecl::getTemplateParameters(), clang::DeclContext::isDependentContext(), and clang::TemplateParameterList::size().

Referenced by ActOnClassTemplateSpecialization(), ActOnVarTemplateSpecialization(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().

◆ CheckTemplateTemplateArgument()

bool Sema::CheckTemplateTemplateArgument ( TemplateTemplateParmDecl Param,
TemplateParameterList Params,
TemplateArgumentLoc Arg 
)

◆ CheckTemplateTypeArgument()

bool Sema::CheckTemplateTypeArgument ( TemplateTypeParmDecl Param,
TemplateArgumentLoc Arg,
SmallVectorImpl< TemplateArgument > &  SugaredConverted,
SmallVectorImpl< TemplateArgument > &  CanonicalConverted 
)

Definition at line 5625 of file SemaTemplate.cpp.

References clang::CXXScopeSpec::Adopt(), clang::Sema::CodeSynthesisContext::BuildingDeductionGuides, CheckTemplateArgument(), CodeSynthesisContexts, Context, clang::FixItHint::CreateInsertion(), Diag(), diagnoseMissingTemplateArguments(), clang::TemplateArgument::Expression, clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsExpr(), clang::DeclarationName::getAsIdentifierInfo(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getDependentNameType(), clang::SourceRange::getEnd(), clang::TemplateArgument::getKind(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::QualType::getObjCLifetime(), clang::ASTContext::getQualifiedType(), clang::CXXScopeSpec::getScopeRep(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::Type::isObjCLifetimeType(), LookupOrdinaryName, LookupParsedName(), NoteTemplateParameterLocation(), clang::LookupResult::NotFoundInCurrentInstantiation, clang::Qualifiers::OCL_Strong, clang::TemplateArgument::Pack, clang::TypeLocBuilder::push(), clang::Result, clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::Qualifiers::setObjCLifetime(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, clang::TemplateArgument::Type, and clang::Typename.

Referenced by CheckTemplateArgument().

◆ 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 19014 of file SemaDeclCXX.cpp.

References clang::Decl::attrs().

Referenced by ActOnFinishDelayedAttribute(), and checkThisInStaticMemberFunctionType().

◆ checkThisInStaticMemberFunctionExceptionSpec()

bool Sema::checkThisInStaticMemberFunctionExceptionSpec ( CXXMethodDecl Method)

◆ checkThisInStaticMemberFunctionType()

bool Sema::checkThisInStaticMemberFunctionType ( CXXMethodDecl Method)

◆ CheckThreadLocalForLargeAlignment()

void Sema::CheckThreadLocalForLargeAlignment ( VarDecl VD)

◆ CheckTollFreeBridgeCast()

void Sema::CheckTollFreeBridgeCast ( QualType  castType,
Expr castExpr 
)

◆ CheckTollFreeBridgeStaticCast()

bool Sema::CheckTollFreeBridgeStaticCast ( QualType  castType,
Expr castExpr,
CastKind Kind 
)

◆ CheckTransparentUnionArgumentConstraints()

Sema::AssignConvertType Sema::CheckTransparentUnionArgumentConstraints ( QualType  ArgType,
ExprResult RHS 
)

◆ CheckTypeConstraint()

bool Sema::CheckTypeConstraint ( TemplateIdAnnotation TypeConstraint)

◆ CheckTypedefForVariablyModifiedType()

void Sema::CheckTypedefForVariablyModifiedType ( Scope S,
TypedefNameDecl D 
)

◆ CheckTypenameType() [1/2]

QualType Sema::CheckTypenameType ( ElaboratedTypeKeyword  Keyword,
SourceLocation  KeywordLoc,
NestedNameSpecifierLoc  QualifierLoc,
const IdentifierInfo II,
SourceLocation  IILoc,
bool  DeducedTSTContext = true 
)

◆ CheckTypenameType() [2/2]

QualType Sema::CheckTypenameType ( ElaboratedTypeKeyword  Keyword,
SourceLocation  KeywordLoc,
NestedNameSpecifierLoc  QualifierLoc,
const IdentifierInfo II,
SourceLocation  IILoc,
TypeSourceInfo **  TSI,
bool  DeducedTSTContext 
)

◆ checkTypeSupport()

void Sema::checkTypeSupport ( QualType  Ty,
SourceLocation  Loc,
ValueDecl D = nullptr 
)

Check if the type is allowed to be used for the current target.

Definition at line 1934 of file Sema.cpp.

References clang::C, Context, deepTypeCheckForSYCLDevice(), Diag(), clang::ASTContext::DoubleTy, clang::Builtin::evaluateRequiredTargetFeatures(), clang::ASTContext::FloatTy, clang::QualType::getCanonicalType(), getCurLexicalContext(), clang::ASTContext::getFloatTypeSemantics(), clang::ASTContext::getFunctionFeatureMap(), clang::Decl::getLocation(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::TargetInfo::hasBFloat16Type(), clang::TargetInfo::hasBitIntType(), clang::FunctionDecl::hasBody(), clang::TargetInfo::hasFloat128Type(), clang::TargetInfo::hasFloat16Type(), clang::TargetInfo::hasFPReturn(), clang::TargetInfo::hasIbm128Type(), clang::TargetInfo::hasInt128Type(), clang::TargetInfo::hasLongDoubleType(), clang::TargetInfo::hasRISCVVTypes(), clang::Type::isBFloat16Type(), clang::Type::isBitIntType(), clang::Type::isDependentType(), clang::Type::isFloat128Type(), clang::Type::isFloat16Type(), clang::Type::isIbm128Type(), clang::Type::isIntegerType(), clang::QualType::isNull(), clang::Type::isRealFloatingType(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isSVESizelessBuiltinType(), isUnevaluatedContext(), LangOpts, clang::ASTContext::LongDoubleTy, PDiag(), targetDiag(), and Visited.

Referenced by ActOnFinishFunctionBody(), CreateBuiltinBinOp(), and DiagnoseUseOfDecl().

◆ CheckTypeTraitArity()

bool Sema::CheckTypeTraitArity ( unsigned  Arity,
SourceLocation  Loc,
size_t  N 
)

Definition at line 5738 of file SemaExprCXX.cpp.

References Diag(), and int.

Referenced by BuildTypeTrait().

◆ CheckUnaryExprOrTypeTraitOperand() [1/2]

bool Sema::CheckUnaryExprOrTypeTraitOperand ( Expr E,
UnaryExprOrTypeTrait  ExprKind 
)

◆ CheckUnaryExprOrTypeTraitOperand() [2/2]

bool Sema::CheckUnaryExprOrTypeTraitOperand ( QualType  ExprType,
SourceLocation  OpLoc,
SourceRange  ExprRange,
UnaryExprOrTypeTrait  ExprKind,
StringRef  KWName 
)

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 4753 of file SemaExpr.cpp.

References captureVariablyModifiedType(), CheckExtensionTraitOperandType(), CheckObjCTraitOperandConstraints(), CheckVecStepTraitOperandType(), CheckVectorElementsTraitOperandType(), clang::DeclContext::containsDecl(), Context, Diag(), FunctionScopes, clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::Type::getPointeeType(), clang::ASTContext::getTargetInfo(), clang::getTraitSpelling(), clang::TargetInfo::getTriple(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isVariablyModifiedType(), clang::Type::isWebAssemblyTableType(), and RequireCompleteSizedType().

◆ CheckUnevaluatedOperand()

ExprResult Sema::CheckUnevaluatedOperand ( Expr E)

◆ checkUnknownAnyArg()

ExprResult Sema::checkUnknownAnyArg ( SourceLocation  callLoc,
Expr result,
QualType paramType 
)

◆ 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 21639 of file SemaExpr.cpp.

References clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::Expr::getValueKind(), clang::ActionResult< PtrTy, Compress >::isUsable(), and RequireCompleteType().

◆ CheckUnresolvedLookupAccess()

Sema::AccessResult Sema::CheckUnresolvedLookupAccess ( UnresolvedLookupExpr E,
DeclAccessPair  FoundDecl 
)

◆ CheckUnresolvedMemberAccess()

Sema::AccessResult Sema::CheckUnresolvedMemberAccess ( UnresolvedMemberExpr E,
DeclAccessPair  FoundDecl 
)

◆ 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 19137 of file SemaChecking.cpp.

References checkUnsafeAssignObject(), clang::QualType::getObjCLifetime(), LT, clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Weak.

Referenced by AddInitializerToDecl(), and checkUnsafeExprAssigns().

◆ checkUnsafeExprAssigns()

void Sema::checkUnsafeExprAssigns ( SourceLocation  Loc,
Expr LHS,
Expr RHS 
)

◆ checkUnusedDeclAttributes()

void Sema::checkUnusedDeclAttributes ( Declarator D)

checkUnusedDeclAttributes - Given a declarator which is not being used to build a declaration, complain about any decl attributes which might be lying around on it.

Definition at line 10081 of file SemaDeclAttr.cpp.

References checkUnusedDeclAttributes(), clang::DeclSpec::getAttributes(), clang::Declarator::getAttributes(), clang::DeclaratorChunk::getAttrs(), clang::Declarator::getDeclarationAttributes(), clang::Declarator::getDeclSpec(), clang::Declarator::getNumTypeObjects(), and clang::Declarator::getTypeObject().

Referenced by ActOnCastExpr(), ActOnTypeName(), and checkUnusedDeclAttributes().

◆ 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 18291 of file SemaExpr.cpp.

References clang::CPlusPlus20, ExprEvalContexts, getLangOpts(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), and clang::QualType::isVolatileQualified().

Referenced by CheckUnevaluatedOperand(), and IgnoredValueConversions().

◆ CheckUseOfCXXMethodAsAddressOfOperand()

bool Sema::CheckUseOfCXXMethodAsAddressOfOperand ( SourceLocation  OpLoc,
const Expr Op,
const CXXMethodDecl MD 
)

◆ CheckUsingDeclQualifier()

bool Sema::CheckUsingDeclQualifier ( SourceLocation  UsingLoc,
bool  HasTypename,
const CXXScopeSpec SS,
const DeclarationNameInfo NameInfo,
SourceLocation  NameLoc,
const LookupResult R = nullptr,
const UsingDecl UD = nullptr 
)

Checks that the given nested-name qualifier used in a using decl in the current context is appropriately related to the current scope.

If an error is found, diagnoses it and returns true. R is nullptr, if the caller has not (yet) done a lookup, otherwise it's the result of that lookup. UD is likewise nullptr, except when we have an already-populated UsingDecl whose shadow decls contain the same information (i.e. we're instantiating a UsingDecl with non-dependent scope).

Definition at line 13294 of file SemaDeclCXX.cpp.

References computeDeclContext(), clang::CPlusPlus11, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), CurContext, Diag(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclarationNameInfo::getEndLoc(), getLangOpts(), getLocForEndOfToken(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::UsingShadowDecl::getTargetDecl(), clang::DeclContext::isDependentContext(), isProvablyNotDerivedFrom(), clang::DeclContext::isRecord(), RequireCompleteDeclContext(), clang::BaseUsingDecl::shadow_begin(), and clang::BaseUsingDecl::shadow_size().

Referenced by BuildUsingDeclaration().

◆ 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 13212 of file SemaDeclCXX.cpp.

References clang::LookupResult::begin(), Context, CurContext, Diag(), clang::LookupResult::end(), clang::ASTContext::getCanonicalNestedNameSpecifier(), clang::Decl::getLocation(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::NestedNameSpecifier::isDependent(), and clang::DeclContext::isRecord().

Referenced by BuildUsingDeclaration().

◆ CheckUsingShadowDecl()

bool Sema::CheckUsingShadowDecl ( BaseUsingDecl BUD,
NamedDecl Target,
const LookupResult PreviousDecls,
UsingShadowDecl *&  PrevShadow 
)

◆ checkVarDeclRedefinition()

bool Sema::checkVarDeclRedefinition ( VarDecl Old,
VarDecl New 
)

◆ 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 8987 of file SemaDecl.cpp.

References checkForConflictWithNonVisibleExternC(), CheckVariableDeclarationType(), clang::Decl::isInvalidDecl(), MergeVarDecl(), and Previous.

Referenced by ActOnVariableDeclarator(), and BuildVariableInstantiation().

◆ CheckVariableDeclarationType()

void Sema::CheckVariableDeclarationType ( VarDecl NewVD)

Definition at line 8687 of file SemaDecl.cpp.

References clang::C23, CheckAlignasUnderalignment(), CheckC23ConstexprVarType(), Context, clang::CPlusPlus, clang::FixItHint::CreateInsertion(), CurContext, clang::Default, Diag(), diagnoseOpenCLTypes(), clang::Builtin::evaluateRequiredTargetFeatures(), clang::QualType::getAddressSpace(), clang::ASTContext::getAsVariableArrayType(), getCurFunctionDecl(), getCurScope(), clang::ASTContext::getFunctionFeatureMap(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getObjCObjectPointerType(), getOpenCLOptions(), clang::VariableArrayType::getSizeExpr(), clang::Stmt::getSourceRange(), clang::VarDecl::getStorageClass(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getType(), clang::QualType::getTypePtr(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasGlobalStorage(), clang::NamedDecl::hasLinkage(), clang::VarDecl::hasLocalStorage(), clang::Type::isBlockPointerType(), clang::VarDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::Type::isDependentType(), clang::VarDecl::isFileVarDecl(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDecl(), clang::QualType::isNull(), clang::QualType::isObjCGCWeak(), clang::Type::isObjCObjectType(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isSamplerT(), clang::Type::isSizelessType(), clang::VarDecl::isStaticLocal(), clang::Type::isSVESizelessBuiltinType(), clang::VarDecl::isThisDeclarationADefinition(), clang::Type::isUndeducedType(), clang::Type::isVariableArrayType(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), clang::Type::isWebAssemblyTableType(), clang::LangOptionsBase::NonGC, clang::OpenCL, clang::opencl_constant, clang::opencl_global, clang::opencl_local, clang::opencl_private, RequireLiteralType(), clang::SC_Static, setFunctionHasBranchProtectedScope(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::DeclaratorDecl::setTypeSourceInfo(), TryToFixInvalidVariablyModifiedType(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().

Referenced by buildCoroutinePromise(), CheckVariableDeclaration(), and DeduceVariableDeclarationType().

◆ checkVariadicArgument()

void Sema::checkVariadicArgument ( const Expr E,
VariadicCallType  CT 
)

◆ CheckVarTemplateId() [1/2]

ExprResult Sema::CheckVarTemplateId ( const CXXScopeSpec SS,
const DeclarationNameInfo NameInfo,
VarTemplateDecl Template,
NamedDecl FoundD,
SourceLocation  TemplateLoc,
const TemplateArgumentListInfo TemplateArgs 
)

Form a reference to the specialization of the given variable template corresponding to the specified argument list, or a null-but-valid result if the arguments are dependent.

Definition at line 5304 of file SemaTemplate.cpp.

References BuildDeclarationNameExpr(), CheckVarTemplateId(), clang::ExprError(), clang::DeclarationNameInfo::getLoc(), clang::VarDecl::getTemplateSpecializationKind(), clang::VarDecl::setTemplateSpecializationKind(), and clang::TSK_ImplicitInstantiation.

◆ CheckVarTemplateId() [2/2]

DeclResult Sema::CheckVarTemplateId ( VarTemplateDecl Template,
SourceLocation  TemplateLoc,
SourceLocation  TemplateNameLoc,
const TemplateArgumentListInfo TemplateArgs 
)

◆ CheckVecStepExpr()

bool Sema::CheckVecStepExpr ( Expr E)

◆ CheckVectorCast()

bool Sema::CheckVectorCast ( SourceRange  R,
QualType  VectorTy,
QualType  Ty,
CastKind Kind 
)

◆ CheckVectorCompareOperands()

QualType Sema::CheckVectorCompareOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
BinaryOperatorKind  Opc 
)

◆ CheckVectorConditionalTypes()

QualType Sema::CheckVectorConditionalTypes ( ExprResult Cond,
ExprResult LHS,
ExprResult RHS,
SourceLocation  QuestionLoc 
)

◆ CheckVectorLogicalOperands()

QualType Sema::CheckVectorLogicalOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc 
)

◆ CheckVectorOperands()

QualType Sema::CheckVectorOperands ( ExprResult LHS,
ExprResult RHS,
SourceLocation  Loc,
bool  IsCompAssign,
bool  AllowBothBool,
bool  AllowBoolConversion,
bool  AllowBoolOperation,
bool  ReportInvalid 
)

type checking for vector binary operators.

Definition at line 11071 of file SemaExpr.cpp.

References clang::AltiVecBool, clang::AltiVecVector, anyAltivecTypes(), clang::ASTContext::areCompatibleVectorTypes(), Context, DefaultFunctionArrayLvalueConversion(), Diag(), clang::Generic, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::ASTContext::getCommonSugaredType(), clang::VectorType::getElementType(), getLangOpts(), clang::VectorType::getNumElements(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::VectorType::getVectorKind(), clang::ASTContext::hasSameType(), ImpCastExprToType(), InvalidOperands(), clang::Type::isExtVectorBoolType(), clang::Type::isExtVectorType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isLaxVectorConversion(), clang::Expr::isLValue(), clang::Type::isRealType(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isScalarType(), clang::Type::isSizelessBuiltinType(), clang::Type::isSVESizelessBuiltinType(), clang::Type::isVectorType(), clang::OpenCL, clang::RVVFixedLengthData, clang::RVVFixedLengthMask, clang::SveFixedLengthData, clang::SveFixedLengthPredicate, tryGCCVectorConvertAndSplat(), tryVectorConvertAndSplat(), and clang::Vector.

Referenced by CheckAdditionOperands(), CheckBitwiseOperands(), CheckConditionalOperands(), CheckMultiplyDivideOperands(), CheckRemainderOperands(), CheckSubtractionOperands(), CheckVectorCompareOperands(), CheckVectorConditionalTypes(), CheckVectorLogicalOperands(), CXXCheckConditionalOperands(), and OpenCLCheckVectorConditional().

◆ CheckVirtualDtorCall()

void Sema::CheckVirtualDtorCall ( CXXDestructorDecl dtor,
SourceLocation  Loc,
bool  IsDelete,
bool  CallCanBeVirtual,
bool  WarnOnNonAbstractTypes,
SourceLocation  DtorLoc 
)

◆ 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
SThe scope in which we're performing name lookup.
SSThe nested-name-specifier that precedes the name.
NameThe identifier. If typo correction finds an alternative name, this pointer parameter will be updated accordingly.
NameLocThe location of the identifier.
NextTokenThe token following the identifier. Used to help disambiguate the name.
CCCThe correction callback, if typo correction is desired.

Definition at line 875 of file SemaDecl.cpp.

References clang::LookupResult::Ambiguous, buildNamedType(), clang::Class, computeDeclContext(), clang::Sema::NameClassification::Concept(), Context, CorrectTypo(), clang::CPlusPlus, clang::CPlusPlus20, clang::UnresolvedLookupExpr::Create(), CTK_ErrorRecovery, clang::Sema::NameClassification::DependentNonType(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::Sema::NameClassification::Error(), FilterAcceptableTemplateNames(), FirstDecl, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::Sema::NameClassification::FunctionTemplate(), clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getAssumedTemplateName(), getAsTemplateNameDecl(), getCurMethodDecl(), getLangOpts(), clang::DeclarationNameInfo::getName(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getOverloadedTemplateName(), clang::ASTContext::getQualifiedTemplateName(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::UsingShadowDecl::getTargetDecl(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::getUsingType(), clang::CXXScopeSpec::getWithLocInContext(), hasAnyAcceptableTemplateNames(), ImplicitlyDefineFunction(), clang::Token::is(), isCurrentClassName(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Token::isNot(), clang::CXXScopeSpec::isNotEmpty(), clang::Token::isOneOf(), isResultTypeOrTemplate(), clang::CXXScopeSpec::isSet(), isTagTypeWithMissingTag(), clang::ActionResult< PtrTy, Compress >::isUsable(), LookupBuiltin(), LookupIvarInObjCMethod(), LookupOrdinaryName, LookupParsedName(), clang::OpaquePtr< QualType >::make(), MarkAnyDeclReferenced(), clang::Sema::NameClassification::NonType(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, clang::Sema::NameClassification::OverloadSet(), PDiag(), recoverFromTypeInKnownDependentBase(), clang::Result, clang::Sema::NameClassification::TypeTemplate(), clang::Sema::NameClassification::UndeclaredNonType(), clang::Sema::NameClassification::UndeclaredTemplate(), clang::Sema::NameClassification::Unknown(), UseArgumentDependentLookup(), and clang::Sema::NameClassification::VarTemplate().

◆ CleanupVarDeclMarking()

void Sema::CleanupVarDeclMarking ( )

◆ clearDelayedTypo()

void Sema::clearDelayedTypo ( TypoExpr TE)

Clears the state of the given TypoExpr.

Definition at line 5880 of file SemaLookup.cpp.

Referenced by ActOnIdExpression(), and buildMemberCall().

◆ CodeCompleteAfterFunctionEquals()

void Sema::CodeCompleteAfterFunctionEquals ( Declarator D)

◆ CodeCompleteAfterIf()

void Sema::CodeCompleteAfterIf ( Scope S,
bool  IsBracedThen 
)

◆ CodeCompleteAttribute()

void Sema::CodeCompleteAttribute ( AttributeCommonInfo::Syntax  Syntax,
AttributeCompletion  Completion = AttributeCompletion::Attribute,
const IdentifierInfo Scope = nullptr 
)

◆ CodeCompleteAvailabilityPlatformName()

void Sema::CodeCompleteAvailabilityPlatformName ( )

◆ CodeCompleteBracketDeclarator()

void Sema::CodeCompleteBracketDeclarator ( Scope S)

Definition at line 5978 of file SemaCodeComplete.cpp.

◆ CodeCompleteCase()

void Sema::CodeCompleteCase ( Scope S)

◆ CodeCompleteConstructorInitializer()

void Sema::CodeCompleteConstructorInitializer ( Decl Constructor,
ArrayRef< CXXCtorInitializer * >  Initializers 
)

◆ CodeCompleteDeclSpec()

void Sema::CodeCompleteDeclSpec ( Scope S,
DeclSpec DS,
bool  AllowNonIdentifiers,
bool  AllowNestedNameSpecifiers 
)

◆ CodeCompleteDesignator()

void Sema::CodeCompleteDesignator ( const QualType  BaseType,
llvm::ArrayRef< Expr * >  InitExprs,
const Designation D 
)

Trigger code completion for a record of BaseType.

InitExprs are expressions in the initializer list seen so far and D is the current Designation being parsed.

Definition at line 6538 of file SemaCodeComplete.cpp.

References clang::CodeCompletionContext::CCC_DotMemberAccess, getAsRecordDecl(), getDesignatedType(), HandleCodeCompleteResults(), clang::QualType::isNull(), and clang::Result.

◆ CodeCompleteExpression() [1/2]

void Sema::CodeCompleteExpression ( Scope S,
const CodeCompleteExpressionData Data 
)

◆ CodeCompleteExpression() [2/2]

void Sema::CodeCompleteExpression ( Scope S,
QualType  PreferredType,
bool  IsParenthesized = false 
)

Definition at line 4914 of file SemaCodeComplete.cpp.

◆ CodeCompleteFunctionQualifiers()

void Sema::CodeCompleteFunctionQualifiers ( DeclSpec DS,
Declarator D,
const VirtSpecifiers VS = nullptr 
)

◆ CodeCompleteIncludedFile()

void Sema::CodeCompleteIncludedFile ( llvm::StringRef  Dir,
bool  IsAngled 
)

◆ CodeCompleteInitializer()

void Sema::CodeCompleteInitializer ( Scope S,
Decl D 
)

Definition at line 6573 of file SemaCodeComplete.cpp.

References clang::Data, and clang::ValueDecl::getType().

◆ CodeCompleteInPreprocessorConditionalExclusion()

void Sema::CodeCompleteInPreprocessorConditionalExclusion ( Scope S)

Definition at line 10000 of file SemaCodeComplete.cpp.

References PCC_Namespace, and PCC_RecoveryInFunction.

◆ CodeCompleteLambdaIntroducer()

void Sema::CodeCompleteLambdaIntroducer ( Scope S,
LambdaIntroducer Intro,
bool  AfterAmpersand 
)

◆ CodeCompleteMemberReferenceExpr()

void Sema::CodeCompleteMemberReferenceExpr ( Scope S,
Expr Base,
Expr OtherOpBase,
SourceLocation  OpLoc,
bool  IsArrow,
bool  IsBaseExprStatement,
QualType  PreferredType 
)

◆ CodeCompleteModuleImport()

void Sema::CodeCompleteModuleImport ( SourceLocation  ImportLoc,
ModuleIdPath  Path 
)

◆ CodeCompleteNamespaceAliasDecl()

void Sema::CodeCompleteNamespaceAliasDecl ( Scope S)

◆ CodeCompleteNamespaceDecl()

void Sema::CodeCompleteNamespaceDecl ( Scope S)

◆ CodeCompleteNaturalLanguage()

void Sema::CodeCompleteNaturalLanguage ( )

◆ CodeCompleteObjCAtDirective()

void Sema::CodeCompleteObjCAtDirective ( Scope S)

◆ CodeCompleteObjCAtExpression()

void Sema::CodeCompleteObjCAtExpression ( Scope S)

◆ CodeCompleteObjCAtStatement()

void Sema::CodeCompleteObjCAtStatement ( Scope S)

◆ CodeCompleteObjCAtVisibility()

void Sema::CodeCompleteObjCAtVisibility ( Scope S)

◆ CodeCompleteObjCClassForwardDecl()

void Sema::CodeCompleteObjCClassForwardDecl ( Scope S)

◆ CodeCompleteObjCClassMessage()

void Sema::CodeCompleteObjCClassMessage ( Scope S,
ParsedType  Receiver,
ArrayRef< IdentifierInfo * >  SelIdents,
bool  AtArgumentExpression,
bool  IsSuper = false 
)

◆ CodeCompleteObjCClassPropertyRefExpr()

void Sema::CodeCompleteObjCClassPropertyRefExpr ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc,
bool  IsBaseExprStatement 
)

◆ CodeCompleteObjCForCollection()

void Sema::CodeCompleteObjCForCollection ( Scope S,
DeclGroupPtrTy  IterationVar 
)

◆ CodeCompleteObjCImplementationCategory()

void Sema::CodeCompleteObjCImplementationCategory ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc 
)

◆ CodeCompleteObjCImplementationDecl()

void Sema::CodeCompleteObjCImplementationDecl ( Scope S)

◆ CodeCompleteObjCInstanceMessage()

void Sema::CodeCompleteObjCInstanceMessage ( Scope S,
Expr Receiver,
ArrayRef< IdentifierInfo * >  SelIdents,
bool  AtArgumentExpression,
ObjCInterfaceDecl Super = nullptr 
)

◆ CodeCompleteObjCInterfaceCategory()

void Sema::CodeCompleteObjCInterfaceCategory ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc 
)

◆ CodeCompleteObjCInterfaceDecl()

void Sema::CodeCompleteObjCInterfaceDecl ( Scope S)

◆ CodeCompleteObjCMessageReceiver()

void Sema::CodeCompleteObjCMessageReceiver ( Scope S)

◆ CodeCompleteObjCMethodDecl()

void Sema::CodeCompleteObjCMethodDecl ( Scope S,
std::optional< bool IsInstanceMethod,
ParsedType  ReturnType 
)

◆ CodeCompleteObjCMethodDeclSelector()

void Sema::CodeCompleteObjCMethodDeclSelector ( Scope S,
bool  IsInstanceMethod,
bool  AtParameterName,
ParsedType  ReturnType,
ArrayRef< IdentifierInfo * >  SelIdents 
)

◆ CodeCompleteObjCPassingType()

void Sema::CodeCompleteObjCPassingType ( Scope S,
ObjCDeclSpec DS,
bool  IsParameter 
)

◆ CodeCompleteObjCPropertyDefinition()

void Sema::CodeCompleteObjCPropertyDefinition ( Scope S)

◆ CodeCompleteObjCPropertyFlags()

void Sema::CodeCompleteObjCPropertyFlags ( Scope S,
ObjCDeclSpec ODS 
)

◆ CodeCompleteObjCPropertyGetter()

void Sema::CodeCompleteObjCPropertyGetter ( Scope S)

◆ CodeCompleteObjCPropertySetter()

void Sema::CodeCompleteObjCPropertySetter ( Scope S)

◆ CodeCompleteObjCPropertySynthesizeIvar()

void Sema::CodeCompleteObjCPropertySynthesizeIvar ( Scope S,
IdentifierInfo PropertyName 
)

◆ CodeCompleteObjCProtocolDecl()

void Sema::CodeCompleteObjCProtocolDecl ( Scope S)

◆ CodeCompleteObjCProtocolReferences()

void Sema::CodeCompleteObjCProtocolReferences ( ArrayRef< IdentifierLocPair Protocols)

◆ CodeCompleteObjCSelector()

void Sema::CodeCompleteObjCSelector ( Scope S,
ArrayRef< IdentifierInfo * >  SelIdents 
)

◆ CodeCompleteObjCSuperclass()

void Sema::CodeCompleteObjCSuperclass ( Scope S,
IdentifierInfo ClassName,
SourceLocation  ClassNameLoc 
)

◆ CodeCompleteObjCSuperMessage()

void Sema::CodeCompleteObjCSuperMessage ( Scope S,
SourceLocation  SuperLoc,
ArrayRef< IdentifierInfo * >  SelIdents,
bool  AtArgumentExpression 
)

◆ CodeCompleteOperatorName()

void Sema::CodeCompleteOperatorName ( Scope S)

◆ CodeCompleteOrdinaryName()

void Sema::CodeCompleteOrdinaryName ( Scope S,
ParserCompletionContext  CompletionContext 
)

◆ CodeCompletePostfixExpression()

void Sema::CodeCompletePostfixExpression ( Scope S,
ExprResult  LHS,
QualType  PreferredType 
)

◆ CodeCompletePreprocessorDirective()

void Sema::CodeCompletePreprocessorDirective ( bool  InConditional)

◆ CodeCompletePreprocessorExpression()

void Sema::CodeCompletePreprocessorExpression ( )

◆ CodeCompletePreprocessorMacroArgument()

void Sema::CodeCompletePreprocessorMacroArgument ( Scope S,
IdentifierInfo Macro,
MacroInfo MacroInfo,
unsigned  Argument 
)

Definition at line 10056 of file SemaCodeComplete.cpp.

◆ CodeCompletePreprocessorMacroName()

void Sema::CodeCompletePreprocessorMacroName ( bool  IsDefinition)

◆ CodeCompleteQualifiedId()

void Sema::CodeCompleteQualifiedId ( Scope S,
CXXScopeSpec SS,
bool  EnteringContext,
bool  IsUsingDeclaration,
QualType  BaseType,
QualType  PreferredType 
)

◆ CodeCompleteTag()

void Sema::CodeCompleteTag ( Scope S,
unsigned  TagSpec 
)

◆ CodeCompleteTypeQualifiers()

void Sema::CodeCompleteTypeQualifiers ( DeclSpec DS)

◆ CodeCompleteUsing()

void Sema::CodeCompleteUsing ( Scope S)

◆ CodeCompleteUsingDirective()

void Sema::CodeCompleteUsingDirective ( Scope S)

◆ CollectIvarsToConstructOrDestruct()

void Sema::CollectIvarsToConstructOrDestruct ( ObjCInterfaceDecl OI,
SmallVectorImpl< ObjCIvarDecl * > &  Ivars 
)

CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.

Definition at line 5252 of file SemaDeclObjC.cpp.

References clang::ObjCInterfaceDecl::all_declared_ivar_begin(), Context, clang::ASTContext::getBaseElementType(), clang::ObjCIvarDecl::getNextIvar(), and clang::Type::isRecordType().

Referenced by SetIvarInitializers().

◆ 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 3517 of file SemaDeclObjC.cpp.

References clang::Sema::GlobalMethodPool::end(), FilterMethodsByTypeBound(), clang::Sema::GlobalMethodPool::find(), clang::ObjCMethodList::getNext(), MethodPool, and ReadMethodPool().

Referenced by BuildInstanceMessage().

◆ collectUnexpandedParameterPacks() [1/6]

void Sema::collectUnexpandedParameterPacks ( const DeclarationNameInfo NameInfo,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Collect the set of unexpanded parameter packs within the given name.

Parameters
NameInfoThe name that will be traversed to find unexpanded parameter packs.

Definition at line 559 of file SemaTemplateVariadic.cpp.

◆ collectUnexpandedParameterPacks() [2/6]

void Sema::collectUnexpandedParameterPacks ( NestedNameSpecifierLoc  NNS,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Collect the set of unexpanded parameter packs within the given nested-name-specifier.

Parameters
NNSThe nested-name-specifier that will be traversed to find unexpanded parameter packs.

Definition at line 552 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
TThe type that will be traversed to find unexpanded parameter packs.

Definition at line 542 of file SemaTemplateVariadic.cpp.

◆ collectUnexpandedParameterPacks() [4/6]

void Sema::collectUnexpandedParameterPacks ( TemplateArgument  Arg,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Collect the set of unexpanded parameter packs within the given template argument.

Parameters
ArgThe template argument that will be traversed to find unexpanded parameter packs.

Definition at line 530 of file SemaTemplateVariadic.cpp.

Referenced by checkExceptionSpecification(), collectUnexpandedParameterPacks(), instantiateDependentAlignedAttr(), InstantiateMemInitializers(), SubstBaseSpecifiers(), clang::TreeTransform< Derived >::TransformExceptionSpec(), and clang::TreeTransform< Derived >::TransformFunctionTypeParams().

◆ collectUnexpandedParameterPacks() [5/6]

void Sema::collectUnexpandedParameterPacks ( TemplateArgumentLoc  Arg,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Collect the set of unexpanded parameter packs within the given template argument.

Parameters
ArgThe template argument that will be traversed to find unexpanded parameter packs.

Definition at line 536 of file SemaTemplateVariadic.cpp.

◆ collectUnexpandedParameterPacks() [6/6]

void Sema::collectUnexpandedParameterPacks ( TypeLoc  TL,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)

Collect the set of unexpanded parameter packs within the given type.

Parameters
TLThe type that will be traversed to find unexpanded parameter packs.

Definition at line 547 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 4917 of file SemaOverload.cpp.

References clang::ASTContext::canBindObjCObjectType(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getUnqualifiedArrayType(), clang::ASTContext::hasSameUnqualifiedType(), clang::ASTContext::hasSimilarType(), clang::Type::isFunctionType(), clang::Type::isObjCObjectOrInterfaceType(), isQualificationConversionStep(), clang::Type::isReferenceType(), clang::ASTContext::UnwrapSimilarTypes(), and withoutUnaligned().

Referenced by CXXCheckConditionalOperands(), FindConversionForRefInit(), TryListConversion(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), and TryRefInitWithConversionFunction().

◆ CompleteConstructorCall()

bool Sema::CompleteConstructorCall ( CXXConstructorDecl Constructor,
QualType  DeclInitType,
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 16216 of file SemaDeclCXX.cpp.

References DiagnoseSentinelCalls(), GatherArgumentsForCall(), clang::FunctionProtoType::getNumParams(), clang::Invalid, VariadicConstructor, and VariadicDoesNotApply.

Referenced by BuildCXXCastArgument(), CopyObject(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), and PerformImplicitConversion().

◆ completeExprArrayBound()

void Sema::completeExprArrayBound ( Expr E)

◆ CompleteLambdaCallOperator()

void Sema::CompleteLambdaCallOperator ( CXXMethodDecl Method,
SourceLocation  LambdaLoc,
SourceLocation  CallOperatorLoc,
Expr TrailingRequiresClause,
TypeSourceInfo MethodTyInfo,
ConstexprSpecKind  ConstexprKind,
StorageClass  SC,
ArrayRef< ParmVarDecl * >  Params,
bool  HasExplicitResultType 
)

◆ CompleteMemberSpecialization()

void Sema::CompleteMemberSpecialization ( NamedDecl Member,
LookupResult Previous 
)

◆ CompleteVarTemplateSpecializationDecl()

VarTemplateSpecializationDecl * Sema::CompleteVarTemplateSpecializationDecl ( VarTemplateSpecializationDecl VarSpec,
VarDecl PatternDecl,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ computeDeclContext() [1/2]

DeclContext * Sema::computeDeclContext ( const CXXScopeSpec SS,
bool  EnteringContext = false 
)

Compute the DeclContext that is associated with the given scope specifier.

Parameters
SSthe C++ scope specifier as it appears in the source
EnteringContextwhen 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 ClassTemplate, Context, ContextType, diagnoseMissingImport(), clang::Type::getAs(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getAsType(), clang::ASTContext::getCanonicalType(), getCurrentInstantiationOf(), clang::TagType::getDecl(), clang::TemplateParameterList::getDepth(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::NamespaceAliasDecl::getNamespace(), clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::getTemplateParamLists(), clang::ASTContext::getTranslationUnitDecl(), clang::NestedNameSpecifier::Global, clang::CXXRecordDecl::hasDefinition(), hasReachableDefinition(), clang::ASTContext::hasSameType(), 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.

◆ computeDeclContext() [2/2]

DeclContext * Sema::computeDeclContext ( QualType  T)

Compute the DeclContext that is associated with the given type.

Parameters
Tthe 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(), and clang::Type::isDependentType().

Referenced by ActOnCXXEnterDeclaratorScope(), ActOnCXXExitDeclaratorScope(), ActOnCXXMemberDeclarator(), ActOnFriendFunctionDecl(), ActOnIdExpression(), ActOnPseudoDestructorExpr(), ActOnTag(), ActOnTemplateIdType(), ActOnTemplateName(), ActOnTypenameType(), ActOnVariableDeclarator(), buildCoroutineHandle(), BuildCXXNestedNameSpecifier(), BuildMemberReferenceExpr(), BuildMemInitializer(), BuildQualifiedDeclarationNameExpr(), BuildQualifiedTemplateIdExpr(), BuildUsingDeclaration(), CheckClassTemplate(), CheckQualifiedMemberReference(), CheckTypenameType(), CheckUsingDeclQualifier(), ClassifyName(), DiagnoseEmptyLookup(), DiagnoseUnknownTemplateName(), DiagnoseUnknownTypeName(), emitEmptyLookupTypoDiagnostic(), getCurrentClass(), getDestructorName(), GetFullTypeForDeclarator(), getTypeName(), HandleDeclarator(), isCurrentClassNameTypo(), isDeclaratorFunctionLike(), LookupMemberExprInRecord(), LookupParsedName(), LookupTemplateName(), MatchTemplateParametersToScopeSpecifier(), clang::TreeTransform< Derived >::RebuildDependentNameType(), TryNamespaceTypoCorrection(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

◆ 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 15934 of file SemaDecl.cpp.

References clang::ReturnStmt::setNRVOCandidate().

Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().

◆ ConditionError()

static ConditionResult clang::Sema::ConditionError ( )
inlinestatic

◆ ConstantFoldAttrArgs()

bool Sema::ConstantFoldAttrArgs ( const AttributeCommonInfo CI,
MutableArrayRef< Expr * >  Args 
)

ConstantFoldAttrArgs - Folds attribute arguments into ConstantExprs (unless they are value dependent or type dependent).

Returns false and emits a diagnostic if one or more of the arguments could not be folded into a constant.

Result means the expression can be folded to a constant. Note.empty() means the expression is a valid constant expression in the current language mode.

Definition at line 388 of file SemaAttr.cpp.

References clang::AANT_ArgumentConstantExpr, Context, clang::ConstantExpr::Create(), clang::ImplicitCastExpr::Create(), clang::Expr::EvalStatus::Diag, Diag(), clang::Expr::EvaluateAsConstantExpr(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::QualType::getNonReferenceType(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::APValue::hasValue(), ImpCastExprToType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Expr::isLValue(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Note, clang::Result, clang::Expr::EvalResult::Val, and clang::VK_PRValue.

Referenced by AddAnnotationAttr(), and HandleAnnotateTypeAttr().

◆ ConstraintExpressionDependsOnEnclosingTemplate()

bool Sema::ConstraintExpressionDependsOnEnclosingTemplate ( const FunctionDecl Friend,
unsigned  TemplateDepth,
const Expr Constraint 
)

◆ 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 874 of file SemaTemplateVariadic.cpp.

References clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::Expr::containsUnexpandedParameterPack(), clang::NestedNameSpecifier::containsUnexpandedParameterPack(), clang::Type::containsUnexpandedParameterPack(), clang::EST_Dynamic, clang::DeclaratorChunk::FunctionTypeInfo::Exceptions, clang::DeclaratorChunk::Fun, clang::DeclaratorChunk::Function, clang::OpaquePtr< PtrTy >::get(), 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::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_BFloat16, clang::TST_bitint, 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_ibm128, clang::TST_int, clang::TST_int128, clang::TST_interface, clang::TST_struct, clang::TST_typename, clang::TST_typename_pack_indexing, clang::TST_typeof_unqualExpr, clang::TST_typeof_unqualType, clang::TST_typeofExpr, clang::TST_typeofType, clang::TST_union, clang::TST_unknown_anytype, clang::TST_unspecified, clang::TST_void, clang::TST_wchar, and clang::DeclaratorChunk::TypeAndRange::Ty.

◆ ConvertArgumentsForCall()

bool Sema::ConvertArgumentsForCall ( CallExpr Call,
Expr Fn,
FunctionDecl FDecl,
const FunctionProtoType Proto,
ArrayRef< Expr * >  Args,
SourceLocation  RParenLoc,
bool  IsExecConfig = false 
)

◆ ConvertDeclToDeclGroup()

Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup ( Decl Ptr,
Decl OwnedType = nullptr 
)

◆ ConvertMemberDefaultInitExpression()

ExprResult Sema::ConvertMemberDefaultInitExpression ( FieldDecl FD,
Expr InitExpr,
SourceLocation  InitLoc 
)

◆ ConvertParamDefaultArgument()

ExprResult Sema::ConvertParamDefaultArgument ( ParmVarDecl Param,
Expr DefaultArg,
SourceLocation  EqualLoc 
)

◆ CorrectDelayedTyposInExpr() [1/2]

ExprResult Sema::CorrectDelayedTyposInExpr ( Expr E,
VarDecl InitDecl = nullptr,
bool  RecoverUncorrectedTypos = false,
llvm::function_ref< ExprResult(Expr *)>  Filter = [](Expr *E) -> ExprResult { return E; } 
)

Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and returning a new Expr if there were typos that were all successfully corrected and ExprError if one or more typos could not be corrected.

Parameters
EThe Expr to check for TypoExprs.
InitDeclA VarDecl to avoid because the Expr being corrected is its initializer.
RecoverUncorrectedTyposIf true, when typo correction fails, it will rebuild the given Expr with all TypoExprs degraded to RecoveryExprs.
FilterA 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 8929 of file SemaExprCXX.cpp.

References CreateRecoveryExpr(), ExprEvalContexts, clang::TypoExpr::getBeginLoc(), clang::TypoExpr::getEndLoc(), clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Result.

Referenced by ActOnCaseExpr(), ActOnCastExpr(), ActOnCoawaitExpr(), ActOnConditionalOp(), ActOnConstantExpression(), ActOnCoreturnStmt(), ActOnCoyieldExpr(), ActOnCXXFoldExpr(), ActOnCXXTypeConstructExpr(), ActOnFinishCXXInClassMemberInitializer(), ActOnFinishFullExpr(), ActOnPackIndexingExpr(), ActOnRequiresClause(), ActOnReturnStmt(), AddInitializerToDecl(), BuildCXXAssumeExpr(), BuildMemInitializer(), BuildResolvedCallExpr(), CheckObjCForCollectionOperand(), CheckPackExpansion(), CheckPlaceholderExpr(), CorrectDelayedTyposInBinOp(), FinishForRangeVarDecl(), clang::Parser::ParseConstraintExpression(), clang::Parser::ParseConstraintLogicalAndExpression(), clang::Parser::ParseConstraintLogicalOrExpression(), and clang::Parser::ParseOpenMPVarList().

◆ CorrectDelayedTyposInExpr() [2/2]

ExprResult clang::Sema::CorrectDelayedTyposInExpr ( ExprResult  ER,
VarDecl InitDecl = nullptr,
bool  RecoverUncorrectedTypos = false,
llvm::function_ref< ExprResult(Expr *)>  Filter = [](Expr *E) -> ExprResult { return E; } 
)
inline

Definition at line 7095 of file Sema.h.

◆ 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
TypoNamethe DeclarationNameInfo structure that contains the name that was present in the source code along with its location.
LookupKindthe name-lookup criteria used to search for the name.
Sthe scope in which name lookup occurs.
SSthe nested-name-specifier that precedes the name we're looking for, if present.
CCCA CorrectionCandidateCallback object that provides further validation of typo correction candidates. It also provides flags for determining the set of keywords permitted.
MemberContextif non-NULL, the context in which to look for a member access expression.
EnteringContextwhether we're entering the context described by the nested-name-specifier SS.
OPTwhen 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 5357 of file SemaLookup.cpp.

References checkCorrectionVisibility(), Consumer, CTK_ErrorRecovery, clang::DeclarationName::getAsIdentifierInfo(), clang::DeclarationName::getAsString(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getEditDistance(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::Result, clang::TypoCorrection::setCorrectionRange(), clang::CorrectionCandidateCallback::WantObjCSuper, and clang::CorrectionCandidateCallback::WantRemainingKeywords.

Referenced by actOnObjCTypeArgsOrProtocolQualifiers(), ActOnOpenMPIdExpression(), ActOnSizeofParameterPackExpr(), ActOnStartClassImplementation(), ActOnSuperClassOfClassInterface(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), BuildUsingDeclaration(), ClassifyName(), DiagnoseEmptyLookup(), diagnoseExprIntendedAsTemplateName(), DiagnoseInvalidRedeclaration(), DiagnoseUnknownTypeName(), FindProtocolDeclaration(), getObjCInterfaceDecl(), getObjCMessageKind(), getTypeName(), HandleExprPropertyRefExpr(), ImplicitlyDefineFunction(), LookupMemberExpr(), lookupOpenMPDeclareTargetName(), LookupTemplateName(), resolveAssumedTemplateNameAsType(), TryNamespaceTypoCorrection(), and TryTypoCorrectionForCall().

◆ 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
TypoNamethe DeclarationNameInfo structure that contains the name that was present in the source code along with its location.
LookupKindthe name-lookup criteria used to search for the name.
Sthe scope in which name lookup occurs.
SSthe nested-name-specifier that precedes the name we're looking for, if present.
CCCA CorrectionCandidateCallback object that provides further validation of typo correction candidates. It also provides flags for determining the set of keywords permitted.
TDGA TypoDiagnosticGenerator functor that will be used to print diagnostics when the actual typo correction is attempted.
TRCA TypoRecoveryCallback functor that will be used to build an Expr from a typo correction candidate.
MemberContextif non-NULL, the context in which to look for a member access expression.
EnteringContextwhether we're entering the context described by the nested-name-specifier SS.
OPTwhen 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 5492 of file SemaLookup.cpp.

References Consumer, CTK_ErrorRecovery, ExprEvalContexts, clang::DeclarationName::getAsIdentifierInfo(), clang::DeclarationNameInfo::getLoc(), and clang::DeclarationNameInfo::getName().

Referenced by DiagnoseEmptyLookup(), and LookupMemberExprInRecord().

◆ CreateAMDGPUFlatWorkGroupSizeAttr()

AMDGPUFlatWorkGroupSizeAttr * Sema::CreateAMDGPUFlatWorkGroupSizeAttr ( const AttributeCommonInfo CI,
Expr Min,
Expr Max 
)

Create an AMDGPUWavesPerEUAttr attribute.

Definition at line 8002 of file SemaDeclAttr.cpp.

References checkAMDGPUFlatWorkGroupSizeArguments(), and Context.

Referenced by addAMDGPUFlatWorkGroupSizeAttr().

◆ CreateAMDGPUMaxNumWorkGroupsAttr()

AMDGPUMaxNumWorkGroupsAttr * Sema::CreateAMDGPUMaxNumWorkGroupsAttr ( const AttributeCommonInfo CI,
Expr XExpr,
Expr YExpr,
Expr ZExpr 
)

Create an AMDGPUMaxNumWorkGroupsAttr attribute.

Definition at line 8140 of file SemaDeclAttr.cpp.

References checkAMDGPUMaxNumWorkGroupsArguments(), and Context.

Referenced by addAMDGPUMaxNumWorkGroupsAttr().

◆ CreateAMDGPUWavesPerEUAttr()

AMDGPUWavesPerEUAttr * Sema::CreateAMDGPUWavesPerEUAttr ( const AttributeCommonInfo CI,
Expr Min,
Expr Max 
)

Create an AMDGPUWavesPerEUAttr attribute.

Definition at line 8062 of file SemaDeclAttr.cpp.

References checkAMDGPUWavesPerEUArguments(), and Context.

Referenced by addAMDGPUWavesPerEUAttr().

◆ CreateBuiltin()

FunctionDecl * Sema::CreateBuiltin ( IdentifierInfo II,
QualType  Type,
unsigned  ID,
SourceLocation  Loc 
)

◆ CreateBuiltinArraySubscriptExpr()

ExprResult Sema::CreateBuiltinArraySubscriptExpr ( Expr Base,
SourceLocation  LLoc,
Expr Idx,
SourceLocation  RLoc 
)

Definition at line 5898 of file SemaExpr.cpp.

References BuildObjCSubscriptExpression(), captureVariablyModifiedType(), clang::Type::castAs(), clang::DeclContext::containsDecl(), Context, clang::CPlusPlus, clang::CPlusPlus11, DefaultFunctionArrayLvalueConversion(), Diag(), clang::ExprError(), FunctionScopes, clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getArrayDecayedType(), clang::Type::getAs(), getASTContext(), clang::Stmt::getBeginLoc(), getDependentArraySubscriptType(), clang::Expr::getIntegerConstantExpr(), getLangOpts(), clang::Type::getPointeeType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::Type::getSveEltType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::QualType::hasQualifiers(), clang::Expr::IgnoreParenImpCasts(), ImpCastExprToType(), clang::Type::isArrayType(), clang::Type::isBuiltinType(), clang::QualType::isCForbiddenLValueType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPRValue(), clang::Type::isSpecificBuiltinType(), clang::LangOptions::isSubscriptPointerArithmetic(), clang::BuiltinType::isSVEBool(), clang::Type::isSveVLSBuiltinType(), clang::Expr::isTypeDependent(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), LangOpts, clang::OK_Ordinary, clang::OK_VectorComponent, RequireCompleteSizedType(), clang::Result, TemporaryMaterializationConversion(), clang::VK_LValue, clang::VK_PRValue, and clang::VK_XValue.

Referenced by ActOnArraySubscriptExpr(), actOnOMPReductionKindClause(), checkArrayLikeDecomposition(), and clang::InitializationSequence::Perform().

◆ 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 15604 of file SemaExpr.cpp.

References CheckAdditionOperands(), CheckAssignmentOperands(), CheckBitwiseOperands(), CheckCommaOperands(), CheckCompareOperands(), CheckLogicalOperands(), CheckMultiplyDivideOperands(), checkNonTrivialCUnion(), checkObjCPointerIntrospection(), CheckPointerToMemberOperands(), CheckRemainderOperands(), CheckShiftOperands(), CheckSubtractionOperands(), checkTypeSupport(), Context, convertHalfVecBinOp(), CorrectDelayedTyposInBinOp(), clang::CPlusPlus, clang::CPlusPlus11, clang::BinaryOperator::Create(), clang::CompoundAssignOperator::Create(), clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), CurFPFeatureOverrides(), Diag(), DiagnoseDirectIsaAccess(), DiagnoseSelfAssignment(), DiagnoseSelfMove(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::IdentifierTable::get(), clang::Type::getAsCXXRecordDecl(), clang::Stmt::getBeginLoc(), getCurScope(), clang::Stmt::getEndLoc(), clang::Expr::getExprLoc(), getLangOpts(), getLocForEndOfToken(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::HalfTy, clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::ASTContext::Idents, clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParens(), clang::Init, clang::InitializedEntity::InitializeTemporary(), InvalidOperands(), clang::Type::isAtomicType(), clang::Type::isBlockPointerType(), clang::Type::isFixedPointType(), clang::Type::isImageType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Type::isPipeType(), clang::Type::isSamplerT(), clang::ActionResult< PtrTy, Compress >::isUsable(), isVector(), LookupOrdinaryName, LookupSingleName(), needsConversionOfHalfVec(), NTCUC_Assignment, NTCUK_Copy, clang::OK_ObjCProperty, clang::OK_Ordinary, clang::OpenCL, clang::InitializationSequence::Perform(), RecordModifiableNonNullParam(), TUScope, UsualUnaryConversions(), clang::VK_LValue, and clang::VK_PRValue.

Referenced by ActOnOMPIteratorExpr(), actOnOMPReductionKindClause(), BuildBinOp(), buildCounterUpdate(), buildPostUpdate(), buildSingleCopyAssignRecursively(), and clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr().

◆ CreateBuiltinMatrixSubscriptExpr()

ExprResult Sema::CreateBuiltinMatrixSubscriptExpr ( Expr Base,
Expr RowIdx,
Expr ColumnIdx,
SourceLocation  RBLoc 
)

◆ CreateBuiltinUnaryOp()

ExprResult Sema::CreateBuiltinUnaryOp ( SourceLocation  OpLoc,
UnaryOperatorKind  Opc,
Expr InputExpr,
bool  IsAfterAmp = false 
)

Definition at line 16292 of file SemaExpr.cpp.

References clang::AltiVecBool, clang::ASTContext::BoolTy, clang::Type::castAs(), CheckAddressOfOperand(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckRealImagOperand(), Context, convertVector(), clang::CPlusPlus, clang::UnaryOperator::Create(), CurFPFeatureOverrides(), DefaultFunctionArrayLvalueConversion(), DefaultLvalueConversion(), Diag(), clang::ExprError(), ExprEvalContexts, clang::ASTContext::FloatTy, clang::Generic, clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::ASTContext::getLogicalOperationType(), clang::Expr::getObjectKind(), clang::LangOptions::getOpenCLCompatibleVersion(), clang::Type::getPointeeType(), GetSignedVectorType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::VectorType::getVectorKind(), clang::ASTContext::HalfTy, clang::Type::hasIntegerRepresentation(), clang::HLSL, ImpCastExprToType(), clang::Type::isAnyComplexType(), clang::Type::isArithmeticType(), clang::Type::isAtomicType(), clang::Type::isBlockPointerType(), clang::Type::isComplexIntegerType(), clang::Type::isComplexType(), clang::Type::isDependentType(), clang::Type::isExtVectorType(), clang::Expr::isGLValue(), clang::Type::isHalfType(), clang::Type::isImageType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), isOverflowingIntegerType(), clang::Type::isPipeType(), clang::Type::isPointerType(), clang::Type::isSamplerT(), clang::Type::isScalarType(), isScopedEnumerationType(), clang::Type::isSveVLSBuiltinType(), isUnevaluatedContext(), clang::SourceLocation::isValid(), clang::Type::isVectorType(), clang::QualType::isWebAssemblyReferenceType(), needsConversionOfHalfVec(), clang::OK_Ordinary, clang::OpenCL, RecordModifiableNonNullParam(), ScalarTypeToBooleanCastKind(), UsualUnaryConversions(), and clang::VK_PRValue.

Referenced by ActOnOMPIteratorExpr(), actOnOMPReductionKindClause(), ActOnOpenMPAffinityClause(), ActOnOpenMPDependClause(), buildCapture(), buildCaptureDecl(), BuildCaptureInit(), buildCoroutinePromise(), BuildExpressionFromDeclTemplateArgument(), BuildUnaryOp(), checkOpenMPDeclareVariantFunction(), collectPlacementArgs(), DefineImplicitLambdaToBlockPointerConversion(), and getOpenMPCapturedExpr().

◆ CreateCapturedStmtRecordDecl()

RecordDecl * Sema::CreateCapturedStmtRecordDecl ( CapturedDecl *&  CD,
SourceLocation  Loc,
unsigned  NumParams 
)

◆ CreateGenericSelectionExpr()

ExprResult Sema::CreateGenericSelectionExpr ( SourceLocation  KeyLoc,
SourceLocation  DefaultLoc,
SourceLocation  RParenLoc,
bool  PredicateIsExpr,
void *  ControllingExprOrType,
ArrayRef< TypeSourceInfo * >  Types,
ArrayRef< Expr * >  Exprs 
)

◆ 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 819 of file SemaModule.cpp.

References clang::DeclContext::addDecl(), clang::Module::AllVisible, Consumer, clang::ImportDecl::CreateImplicit(), getASTContext(), getLangOpts(), getModuleLoader(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTConsumer::HandleImplicitImportDecl(), isSFINAEContext(), clang::VisibleModuleSet::isVisible(), clang::ModuleLoader::makeModuleVisible(), and clang::VisibleModuleSet::setVisible().

Referenced by diagnoseMissingImport().

◆ CreateLambdaCallOperator()

CXXMethodDecl * Sema::CreateLambdaCallOperator ( SourceRange  IntroducerRange,
CXXRecordDecl Class 
)

◆ createLambdaClosureType()

CXXRecordDecl * Sema::createLambdaClosureType ( SourceRange  IntroducerRange,
TypeSourceInfo Info,
unsigned  LambdaDependencyKind,
LambdaCaptureDefault  CaptureDefault 
)

◆ createLambdaInitCaptureVarDecl()

VarDecl * Sema::createLambdaInitCaptureVarDecl ( SourceLocation  Loc,
QualType  InitCaptureType,
SourceLocation  EllipsisLoc,
IdentifierInfo Id,
unsigned  InitStyle,
Expr Init,
DeclContext DeclCtx 
)

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 807 of file SemaLambda.cpp.

References Context, clang::VarDecl::Create(), clang::TypeLoc::getAs(), getCurLambda(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), Id, clang::Init, clang::VarDecl::isParameterPack(), clang::sema::LambdaScopeInfo::LocalPacks, clang::Decl::markUsed(), clang::SC_Auto, clang::VarDecl::setInit(), clang::VarDecl::setInitCapture(), clang::VarDecl::setInitStyle(), and clang::Decl::setReferenced().

Referenced by ActOnLambdaExpressionAfterIntroducer().

◆ CreateLaunchBoundsAttr()

CUDALaunchBoundsAttr * Sema::CreateLaunchBoundsAttr ( const AttributeCommonInfo CI,
Expr MaxThreads,
Expr MinBlocks,
Expr MaxBlocks 
)

◆ CreateMaterializeTemporaryExpr()

MaterializeTemporaryExpr * Sema::CreateMaterializeTemporaryExpr ( QualType  T,
Expr Temporary,
bool  BoundToLvalueReference 
)

◆ CreateOverloadedArraySubscriptExpr()

ExprResult Sema::CreateOverloadedArraySubscriptExpr ( SourceLocation  LLoc,
SourceLocation  RLoc,
Expr Base,
MultiExprArg  Args 
)

◆ 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
OpLocThe location of the operator itself (e.g., '+').
OpcThe BinaryOperatorKind that describes this operator.
FnsThe 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().
LHSLeft-hand argument.
RHSRight-hand argument.
PerformADLWhether to consider operator candidates found by ADL.
AllowRewrittenCandidatesWhether to consider candidates found by C++20 operator rewrites.
DefaultedFnIf 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 14609 of file SemaOverload.cpp.

References allowAmbiguity(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::OverloadCandidateSet::BestViableFunction(), clang::ImplicitConversionSequence::Better, checkPlaceholderForOverload(), CompareImplicitConversionSequences(), clang::OverloadCandidateSet::CompleteCandidates(), clang::CPlusPlus20, clang::IntegerLiteral::Create(), clang::BinaryOperator::Create(), clang::CompoundAssignOperator::Create(), clang::CXXOperatorCallExpr::Create(), CreateFunctionRefExpr(), clang::CRK_DifferentOperator, clang::CRK_None, clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, clang::declaresSameEntity(), clang::ASTContext::DependentTy, Diag(), DiagnoseTwoPhaseOperatorLookup(), clang::UnresolvedSetImpl::empty(), clang::Sema::CodeSynthesisContext::Entity, clang::OverloadCandidateSet::exclude(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::DeclarationNameTable::getCXXOperatorName(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::QualType::getNonLValueExprType(), clang::BinaryOperator::getOpcodeStr(), clang::getOperatorSpelling(), clang::BinaryOperator::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getPointerType(), clang::FunctionDecl::getReturnType(), clang::OverloadCandidateSet::getRewriteInfo(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Expr::getValueKindForType(), clang::ASTContext::hasSameUnqualifiedType(), clang::InitializedEntity::InitializeParameter(), clang::ASTContext::IntTy, clang::Type::isBooleanType(), clang::Sema::DefaultedFunctionKind::isComparison(), clang::BinaryOperator::isCompoundAssignmentOp(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), isRecordType(), clang::OverloadCandidateSet::OperatorRewriteInfo::isReversible(), clang::Sema::DefaultedFunctionKind::isSpecialMember(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Sema::CodeSynthesisContext::Kind, clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OK_ObjCProperty, clang::OK_Ordinary, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::Result, clang::Sema::CodeSynthesisContext::RewritingOperatorAsSpaceship, clang::OverloadCandidateSet::shouldDeferDiags(), clang::OverloadCandidateSet::size(), clang::VK_LValue, and clang::VK_PRValue.

Referenced by BuildOverloadedBinOp(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), and clang::TreeTransform< Derived >::RebuildCXXRewrittenBinaryOperator().

◆ 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
OpLocThe location of the operator itself (e.g., '*').
OpcThe UnaryOperatorKind that describes this operator.
FnsThe 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().
InputThe input argument.

Definition at line 14339 of file SemaOverload.cpp.

References clang::OverloadCandidateSet::BestViableFunction(), clang::Type::castAs(), checkPlaceholderForOverload(), clang::IntegerLiteral::Create(), clang::UnaryOperator::Create(), clang::CXXOperatorCallExpr::Create(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, clang::ASTContext::DeclarationNames, clang::ASTContext::DependentTy, DiagnoseTwoPhaseOperatorLookup(), clang::UnresolvedSetImpl::empty(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::DeclarationNameTable::getCXXOperatorName(), clang::QualType::getNonLValueExprType(), clang::UnaryOperator::getOpcodeStr(), clang::UnaryOperator::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), clang::ASTContext::IntTy, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OK_Ordinary, clang::OO_None, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::OverloadCandidateSet::size(), and clang::VK_PRValue.

Referenced by BuildOperatorCoawaitCall(), BuildUnaryOp(), and clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr().

◆ CreateParsedType()

ParsedType Sema::CreateParsedType ( QualType  T,
TypeSourceInfo TInfo 
)

◆ 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 558 of file SemaObjCProperty.cpp.

References clang::DeclContext::addDecl(), clang::ObjCRuntime::allowsDirectDispatch(), clang::ObjCInterfaceDecl::ClassImplementsProtocol(), Context, clang::ObjCPropertyDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FieldDeclarator::D, Diag(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::TypeLoc::getBeginLoc(), clang::NamedDecl::getDeclName(), clang::TypeLoc::getEndLoc(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::ASTContext::getObjCObjectPointerType(), getOwnershipRule(), clang::ObjCPropertyDecl::getQueryKind(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), clang::Decl::hasAttr(), clang::ASTContext::Idents, clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Type::isObjCObjectType(), clang::Type::isObjCRetainableType(), clang::ObjCPropertyAttribute::kind_assign, clang::ObjCPropertyAttribute::kind_atomic, clang::ObjCPropertyAttribute::kind_class, clang::ObjCPropertyAttribute::kind_copy, clang::ObjCPropertyAttribute::kind_direct, clang::ObjCPropertyAttribute::kind_getter, clang::ObjCPropertyAttribute::kind_nonatomic, clang::ObjCPropertyAttribute::kind_null_resettable, clang::ObjCPropertyAttribute::kind_nullability, clang::ObjCPropertyAttribute::kind_readonly, clang::ObjCPropertyAttribute::kind_readwrite, clang::ObjCPropertyAttribute::kind_retain, clang::ObjCPropertyAttribute::kind_setter, clang::ObjCPropertyAttribute::kind_strong, clang::ObjCPropertyAttribute::kind_unsafe_unretained, clang::ObjCPropertyAttribute::kind_weak, LookupProtocol(), makePropertyAttributesAsWritten(), clang::LangOptionsBase::NonGC, clang::ObjCPropertyDecl::Optional, ProcessDeclAttributes(), clang::ObjCPropertyDecl::Required, clang::ObjCPropertyDecl::setGetterName(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::ObjCPropertyDecl::setPropertyAttributes(), clang::ObjCPropertyDecl::setPropertyAttributesAsWritten(), clang::ObjCPropertyDecl::setPropertyImplementation(), and clang::ObjCPropertyDecl::setSetterName().

Referenced by ActOnProperty(), and HandlePropertyInClassExtension().

◆ CreateRecoveryExpr()

ExprResult Sema::CreateRecoveryExpr ( SourceLocation  Begin,
SourceLocation  End,
ArrayRef< Expr * >  SubExprs,
QualType  T = QualType() 
)

◆ CreateUnaryExprOrTypeTraitExpr() [1/2]

ExprResult Sema::CreateUnaryExprOrTypeTraitExpr ( Expr E,
SourceLocation  OpLoc,
UnaryExprOrTypeTrait  ExprKind 
)

◆ CreateUnaryExprOrTypeTraitExpr() [2/2]

ExprResult Sema::CreateUnaryExprOrTypeTraitExpr ( TypeSourceInfo TInfo,
SourceLocation  OpLoc,
UnaryExprOrTypeTrait  ExprKind,
SourceRange  R 
)

◆ CreateUnresolvedLookupExpr()

ExprResult Sema::CreateUnresolvedLookupExpr ( CXXRecordDecl NamingClass,
NestedNameSpecifierLoc  NNSLoc,
DeclarationNameInfo  DNI,
const UnresolvedSetImpl Fns,
bool  PerformADL = true 
)

◆ CUDACheckLambdaCapture()

void Sema::CUDACheckLambdaCapture ( CXXMethodDecl D,
const sema::Capture Capture 
)

◆ CUDADiagIfDeviceCode()

Sema::SemaDiagnosticBuilder Sema::CUDADiagIfDeviceCode ( SourceLocation  Loc,
unsigned  DiagID 
)

Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device code".

  • If CurContext is a host function, does not emit any diagnostics unless EmitOnBothSides is true.
  • 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 801 of file SemaCUDA.cpp.

References CFT_Device, CFT_Global, CFT_HostDevice, clang::CUDA, CurrentCUDATarget(), Diags, Emitted, getCurFunctionDecl(), clang::DiagnosticsEngine::getDiagnosticIDs(), getEmissionStatus(), getLangOpts(), IsLastErrorImmediate, clang::Sema::SemaDiagnosticBuilder::K_Deferred, clang::Sema::SemaDiagnosticBuilder::K_Immediate, clang::Sema::SemaDiagnosticBuilder::K_ImmediateWithCallStack, and clang::Sema::SemaDiagnosticBuilder::K_Nop.

Referenced by ActOnCXXTryBlock(), BuildCXXThrow(), Diag(), and targetDiag().

◆ CUDADiagIfHostCode()

Sema::SemaDiagnosticBuilder Sema::CUDADiagIfHostCode ( SourceLocation  Loc,
unsigned  DiagID 
)

◆ CUDARecordImplicitHostDeviceFuncUsedByDevice()

void Sema::CUDARecordImplicitHostDeviceFuncUsedByDevice ( const FunctionDecl FD)

Record FD if it is a CUDA/HIP implicit host device function used on device side in device compilation.

Definition at line 690 of file SemaCUDA.cpp.

References CFT_Device, CFT_Global, CFT_HostDevice, clang::ASTContext::CUDAImplicitHostDeviceFunUsedByDevice, getASTContext(), getCurFunctionDecl(), IdentifyCUDATarget(), and isCUDAImplicitHostDeviceFunction().

Referenced by MarkFunctionReferenced().

◆ CUDASetLambdaAttrs()

void Sema::CUDASetLambdaAttrs ( CXXMethodDecl Method)

Set device or host device attributes on the given lambda operator() method.

CUDA lambdas by default is host device function unless it has explicit host or device attribute.

Definition at line 974 of file SemaCUDA.cpp.

References clang::Decl::addAttr(), Context, clang::CUDA, getLangOpts(), and clang::Decl::hasAttr().

Referenced by ActOnStartOfLambdaDefinition().

◆ CurFPFeatureOverrides()

FPOptionsOverride clang::Sema::CurFPFeatureOverrides ( )
inline

◆ CurrentCUDATarget()

CUDAFunctionTarget clang::Sema::CurrentCUDATarget ( )
inline

Gets the CUDA target for the current context.

Definition at line 13185 of file Sema.h.

References CurContext, and IdentifyCUDATarget().

Referenced by ActOnCXXTryBlock(), BuildArrayType(), BuildCXXThrow(), CUDADiagIfDeviceCode(), CUDADiagIfHostCode(), and handleSharedAttr().

◆ currentEvaluationContext()

const ExpressionEvaluationContextRecord & clang::Sema::currentEvaluationContext ( ) const
inline

◆ currentModuleIsHeaderUnit()

bool clang::Sema::currentModuleIsHeaderUnit ( ) const
inline

Is the module scope we are in a C++ Header Unit?

Definition at line 2770 of file Sema.h.

References false.

Referenced by ActOnStartOfFunctionDef(), and AddInitializerToDecl().

◆ currentModuleIsImplementation()

bool clang::Sema::currentModuleIsImplementation ( ) const
inline

Is the module scope we are an implementation unit?

Definition at line 7998 of file Sema.h.

References false.

Referenced by ActOnModuleImport(), and ActOnStartExportDecl().

◆ 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 and the OpenCL/ext_vector_type extension for conditionals. The vector extensions permit 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.

The expressions are evaluated differently for GCC's and OpenCL's extensions. For the GCC extension, the ?: operator is evaluated as (a[0] != 0 ? b[0] : c[0], .. , a[n] != 0 ? b[n] : c[n]). For the OpenCL extensions, the ?: operator is evaluated as (most-significant-bit-set(a[0]) ? b[0] : c[0], .. , most-significant-bit-set(a[n]) ? b[n] : c[n]).

Definition at line 6695 of file SemaExprCXX.cpp.

References ACK_Conditional, CheckCXXBooleanCondition(), CheckSizelessVectorConditionalTypes(), CheckVectorConditionalTypes(), CheckVectorOperands(), CompareReferenceRelationship(), Context, ConvertForConditional(), DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DependentTy, Diag(), DiagnoseConditionalForNull(), FindCompositeObjCPointerType(), FindCompositePointerType(), FindConditionalOverload(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::ASTContext::getCommonSugaredType(), clang::Expr::getObjectKind(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), clang::Expr::IgnoreParenImpCasts(), ImpCastExprToType(), clang::InitializedEntity::InitializeTemporary(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Expr::isOrdinaryOrBitFieldObject(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), isValidSizelessVectorForConditionalCondition(), isValidVectorForConditionalCondition(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::Type::isWebAssemblyTableType(), clang::OK_BitField, clang::OK_Ordinary, PerformCopyInitialization(), PrepareScalarCast(), Ref_Compatible, clang::Expr::refersToBitField(), clang::Expr::refersToVectorElement(), TryClassUnification(), UsualArithmeticConversions(), and clang::VK_PRValue.

Referenced by CheckConditionalOperands().

◆ DeclApplyPragmaWeak()

void Sema::DeclApplyPragmaWeak ( Scope S,
NamedDecl ND,
const 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 3146 of file SemaExprCXX.cpp.

References clang::Decl::addAttr(), clang::DeclContext::addDecl(), AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), clang::DeclContextLookupResult::begin(), Context, clang::ParmVarDecl::Create(), clang::FunctionDecl::Create(), clang::DeclContextLookupResult::end(), clang::EST_BasicNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::FunctionProtoType::ExceptionSpecInfo::Exceptions, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::Func, clang::ASTContext::getCanonicalType(), getCurFPFeatures(), clang::ASTContext::getDefaultCallingConvention(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Decl::getLocation(), getStdBadAlloc(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::getTypeDeclType(), clang::LangOptions::hasGlobalAllocationFunctionVisibility(), clang::LangOptions::hasHiddenGlobalAllocationFunctionVisibility(), clang::LangOptions::hasProtectedGlobalAllocationFunctionVisibility(), IdResolver, LangOpts, clang::DeclContext::lookup(), P, clang::Decl::ReachableWhenImported, clang::SC_None, clang::Decl::setImplicit(), clang::Decl::setLocalOwningModule(), clang::Decl::setModuleOwnershipKind(), clang::Decl::setVisibleDespiteOwningModule(), StdBadAlloc, clang::IdentifierResolver::tryAddTopLevelDecl(), and clang::FunctionProtoType::ExceptionSpecInfo::Type.

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 3015 of file SemaExprCXX.cpp.

References clang::Class, Context, clang::CPlusPlus11, clang::EnumDecl::Create(), clang::CXXRecordDecl::Create(), clang::ASTContext::DeclarationNames, DeclareGlobalAllocationFunction(), clang::IdentifierTable::get(), getCurrentModule(), clang::DeclarationNameTable::getCXXOperatorName(), clang::Preprocessor::getIdentifierTable(), getLangOpts(), getOrCreateStdNamespace(), clang::ASTContext::getPointerType(), clang::ASTContext::getSizeType(), getStdAlignValT(), getStdBadAlloc(), clang::ASTContext::getTypeDeclType(), GlobalNewDeleteDeclared, PP, clang::Decl::ReachableWhenImported, clang::Decl::setImplicit(), clang::Decl::setLocalOwningModule(), clang::Decl::setModuleOwnershipKind(), StdAlignValT, StdBadAlloc, and clang::ASTContext::VoidTy.

Referenced by FindAllocationFunctions(), and FindUsualDeallocationFunction().

◆ DeclareImplicitCopyAssignment()

CXXMethodDecl * Sema::DeclareImplicitCopyAssignment ( CXXRecordDecl ClassDecl)

Declare the implicit copy assignment operator for the given class.

Parameters
ClassDeclThe class declaration into which the implicit copy assignment operator will be added.
Returns
The implicitly-declared copy assignment operator.

Definition at line 14899 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::Constexpr, Context, clang::CXXMethodDecl::Create(), clang::ParmVarDecl::Create(), clang::CUDA, CXXCopyAssignment, clang::ASTContext::DeclarationNames, clang::Default, defaultedSpecialMemberIsConstexpr(), clang::ASTContext::getAddrSpaceQualType(), getASTContext(), getCurFPFeatures(), clang::DeclarationNameTable::getCXXOperatorName(), getDefaultCXXMethodAddrSpace(), clang::ASTContext::getElaboratedType(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialCopyAssignment(), clang::CXXRecordDecl::implicitCopyAssignmentHasConstParam(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitCopyAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForCopyAssignment(), clang::None, clang::ASTContext::NumImplicitCopyAssignmentOperatorsDeclared, PushOnScopeChains(), clang::SC_None, clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::Decl::setImplicit(), clang::CXXRecordDecl::setImplicitCopyAssignmentIsDeleted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), clang::Unspecified, and clang::QualType::withConst().

Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and ForceDeclarationOfImplicitMembers().

◆ DeclareImplicitCopyConstructor()

CXXConstructorDecl * Sema::DeclareImplicitCopyConstructor ( CXXRecordDecl ClassDecl)

Declare the implicit copy constructor for the given class.

Parameters
ClassDeclThe class declaration into which the implicit copy constructor will be added.
Returns
The implicitly-declared copy constructor.

Definition at line 15642 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::Constexpr, Context, clang::CXXConstructorDecl::Create(), clang::ParmVarDecl::Create(), clang::CUDA, CXXCopyConstructor, clang::ASTContext::DeclarationNames, clang::Default, defaultedSpecialMemberIsConstexpr(), clang::ASTContext::getAddrSpaceQualType(), getASTContext(), clang::ASTContext::getCanonicalType(), getCurFPFeatures(), clang::DeclarationNameTable::getCXXConstructorName(), getDefaultCXXMethodAddrSpace(), clang::ASTContext::getElaboratedType(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), getScopeForContext(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ASTContext::getTypeDeclType(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::hasTrivialCopyConstructorForCall(), clang::CXXRecordDecl::implicitCopyConstructorHasConstParam(), inferCUDATargetForImplicitSpecialMember(), inTemplateInstantiation(), clang::CXXRecordDecl::isLambda(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor(), clang::None, clang::ASTContext::NumImplicitCopyConstructorsDeclared, PushOnScopeChains(), clang::SC_None, clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::CXXRecordDecl::setImplicitCopyConstructorIsDeleted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::FunctionDecl::setTrivialForCall(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), TAH_ConsiderTrivialABI, clang::Unspecified, clang::ASTContext::VoidTy, and clang::QualType::withConst().

Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and ForceDeclarationOfImplicitMembers().

◆ DeclareImplicitDeductionGuideFromInitList()

FunctionTemplateDecl * Sema::DeclareImplicitDeductionGuideFromInitList ( TemplateDecl Template,
MutableArrayRef< QualType ParamTypes,
SourceLocation  Loc 
)

◆ DeclareImplicitDeductionGuides()

void Sema::DeclareImplicitDeductionGuides ( TemplateDecl Template,
SourceLocation  Loc 
)

◆ DeclareImplicitDefaultConstructor()

CXXConstructorDecl * Sema::DeclareImplicitDefaultConstructor ( CXXRecordDecl ClassDecl)

◆ DeclareImplicitDestructor()

CXXDestructorDecl * Sema::DeclareImplicitDestructor ( CXXRecordDecl ClassDecl)

◆ DeclareImplicitEqualityComparison()

void Sema::DeclareImplicitEqualityComparison ( CXXRecordDecl RD,
FunctionDecl Spaceship 
)

◆ DeclareImplicitMoveAssignment()

CXXMethodDecl * Sema::DeclareImplicitMoveAssignment ( CXXRecordDecl ClassDecl)

Declare the implicit move assignment operator for the given class.

Parameters
ClassDeclThe 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 15254 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::Constexpr, Context, clang::CXXMethodDecl::Create(), clang::ParmVarDecl::Create(), clang::CUDA, CXXMoveAssignment, clang::ASTContext::DeclarationNames, clang::Default, defaultedSpecialMemberIsConstexpr(), clang::ASTContext::getAddrSpaceQualType(), getASTContext(), getCurFPFeatures(), clang::DeclarationNameTable::getCXXOperatorName(), getDefaultCXXMethodAddrSpace(), clang::ASTContext::getElaboratedType(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialMoveAssignment(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForMoveAssignment(), clang::None, clang::ASTContext::NumImplicitMoveAssignmentOperatorsDeclared, PushOnScopeChains(), clang::SC_None, clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::Decl::setImplicit(), clang::CXXRecordDecl::setImplicitMoveAssignmentIsDeleted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), and clang::Unspecified.

Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and ForceDeclarationOfImplicitMembers().

◆ DeclareImplicitMoveConstructor()

CXXConstructorDecl * Sema::DeclareImplicitMoveConstructor ( CXXRecordDecl ClassDecl)

Declare the implicit move constructor for the given class.

Parameters
ClassDeclThe 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 15790 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::Constexpr, Context, clang::CXXConstructorDecl::Create(), clang::ParmVarDecl::Create(), clang::CUDA, CXXMoveConstructor, clang::ASTContext::DeclarationNames, clang::Default, defaultedSpecialMemberIsConstexpr(), clang::ASTContext::getAddrSpaceQualType(), getASTContext(), clang::ASTContext::getCanonicalType(), getCurFPFeatures(), clang::DeclarationNameTable::getCXXConstructorName(), getDefaultCXXMethodAddrSpace(), clang::ASTContext::getElaboratedType(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getRValueReferenceType(), getScopeForContext(), clang::ASTContext::getTypeDeclType(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasTrivialMoveConstructor(), clang::CXXRecordDecl::hasTrivialMoveConstructorForCall(), inferCUDATargetForImplicitSpecialMember(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor(), clang::None, clang::ASTContext::NumImplicitMoveConstructorsDeclared, PushOnScopeChains(), clang::SC_None, clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::CXXRecordDecl::setImplicitMoveConstructorIsDeleted(), clang::FunctionDecl::setParams(), clang::FunctionDecl::setTrivial(), clang::FunctionDecl::setTrivialForCall(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), TAH_ConsiderTrivialABI, clang::Unspecified, and clang::ASTContext::VoidTy.

Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and ForceDeclarationOfImplicitMembers().

◆ DeclClonePragmaWeak()

NamedDecl * Sema::DeclClonePragmaWeak ( NamedDecl ND,
const 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 2344 of file SemaExpr.cpp.

References Context, clang::ASTContext::getNameForTemplate(), GetNameFromUnqualifiedId(), Id, clang::IK_TemplateId, clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), and translateTemplateArguments().

Referenced by ActOnIdExpression(), and ActOnMemberAccessExpr().

◆ DeduceAutoType()

TemplateDeductionResult Sema::DeduceAutoType ( TypeLoc  Type,
Expr Init,
QualType Result,
sema::TemplateDeductionInfo Info,
bool  DependentDeduction = false,
bool  IgnoreConstraints = false,
TemplateSpecCandidateSet FailedTSC = nullptr 
)

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
Typethe type pattern using the auto type-specifier.
Initthe initializer for the variable whose type is to be deduced.
Resultif type deduction was successful, this will be set to the deduced type.
Infothe argument will be updated to provide additional information about template argument deduction.
DependentDeductionSet if we should permit deduction in dependent cases. This is necessary for template partial ordering with 'auto' template parameters. The template parameter depth to be used should be specified in the 'Info' parameter.
IgnoreConstraintsSet if we should not fail if the deduced type does not satisfy the type-constraint in the auto type.

Definition at line 5012 of file SemaTemplateDeduction.cpp.

References clang::AlreadyDiagnosed, bool, BuildStdInitializerList(), clang::C23, CheckDeducedPlaceholderConstraints(), CheckOriginalCallArgDeduction(), CheckPlaceholderExpr(), Context, clang::CPlusPlus, clang::TemplateTypeParmDecl::Create(), DeduceTemplateArgumentsFromCallArgument(), Diag(), clang::sema::TemplateDeductionInfo::FirstArg, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), getASTContext(), clang::ASTContext::getCommonSugaredType(), clang::Type::getContainedAutoType(), getDecltypeForExpr(), clang::sema::TemplateDeductionInfo::getDeducedDepth(), clang::AutoType::getKeyword(), getKind(), getLangOpts(), clang::sema::TemplateDeductionInfo::getLocation(), clang::TypeDecl::getTypeForDecl(), clang::ASTContext::hasSameType(), clang::Incomplete, clang::Inconsistent, clang::Init, int, clang::Invalid, clang::Type::isArrayType(), clang::AutoType::isConstrained(), clang::AutoType::isDecltypeAuto(), clang::Type::isDependentType(), clang::SourceRange::isInvalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::TemplateArgument::Null, clang::Result, clang::sema::TemplateDeductionInfo::SecondArg, clang::Success, and clang::TemplateArgument::Type.

Referenced by ActOnObjCForCollectionStmt(), BuildCXXNew(), BuildCXXTypeConstructExpr(), CheckTemplateArgument(), DeduceFunctionTypeFromReturnExpr(), deduceVarTypeFromInitializer(), and FinishForRangeVarDecl().

◆ deduceClosureReturnType()

void Sema::deduceClosureReturnType ( sema::CapturingScopeInfo CSI)

◆ DeduceFunctionTypeFromReturnExpr()

bool Sema::DeduceFunctionTypeFromReturnExpr ( FunctionDecl FD,
SourceLocation  ReturnLoc,
Expr RetExpr,
const AutoType AT 
)

◆ deduceOpenCLAddressSpace()

void Sema::deduceOpenCLAddressSpace ( ValueDecl decl)

◆ DeduceReturnType()

bool Sema::DeduceReturnType ( FunctionDecl FD,
SourceLocation  Loc,
bool  Diagnose = true 
)

◆ DeduceTemplateArguments() [1/7]

TemplateDeductionResult Sema::DeduceTemplateArguments ( ClassTemplatePartialSpecializationDecl Partial,
ArrayRef< TemplateArgument TemplateArgs,
sema::TemplateDeductionInfo Info 
)

◆ DeduceTemplateArguments() [2/7]

TemplateDeductionResult Sema::DeduceTemplateArguments ( FunctionTemplateDecl FunctionTemplate,
QualType  ObjectType,
Expr::Classification  ObjectClassification,
QualType  ToType,
CXXConversionDecl *&  Specialization,
sema::TemplateDeductionInfo Info 
)

◆ DeduceTemplateArguments() [3/7]

TemplateDeductionResult Sema::DeduceTemplateArguments ( FunctionTemplateDecl FunctionTemplate,
TemplateArgumentListInfo ExplicitTemplateArgs,
ArrayRef< Expr * >  Args,
FunctionDecl *&  Specialization,
sema::TemplateDeductionInfo Info,
bool  PartialOverloading,
bool  AggregateDeductionCandidate,
QualType  ObjectType,
Expr::Classification  ObjectClassification,
llvm::function_ref< bool(ArrayRef< QualType >)>  CheckNonDependent 
)

Perform template argument deduction from a function call (C++ [temp.deduct.call]).

Parameters
FunctionTemplatethe function template for which we are performing template argument deduction.
ExplicitTemplateArgsthe explicit template arguments provided for this call.
Argsthe function call arguments
Specializationif template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction.
Infothe argument will be updated to provide additional information about template argument deduction.
CheckNonDependentA 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 TemplateDeductionResult::NonDependentConversionFailure. The callback is passed the parameter types (after substituting explicit template arguments).
Returns
the result of template argument deduction.

Definition at line 4269 of file SemaTemplateDeduction.cpp.

References CurContext, DeduceTemplateArgumentsFromCallArgument(), clang::Function, FunctionTemplate, getASTContext(), getFirstInnerIndex(), clang::sema::TemplateDeductionInfo::getLocation(), clang::PackExpansionType::getNumExpansions(), clang::PackExpansionType::getPattern(), hasDeducibleTemplateParameters(), clang::Invalid, clang::Result, runWithSufficientStackSpace(), clang::TemplateParameterList::size(), clang::Success, clang::TooFewArguments, and clang::TooManyArguments.

◆ DeduceTemplateArguments() [4/7]

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
FunctionTemplatethe function template for which we are performing template argument deduction.
ExplicitTemplateArgsthe explicitly-specified template arguments.
Specializationif template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction.
Infothe argument will be updated to provide additional information about template argument deduction.
IsAddressOfFunctionIf 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 4845 of file SemaTemplateDeduction.cpp.

References DeduceTemplateArguments(), FunctionTemplate, and clang::Specialization.

◆ DeduceTemplateArguments() [5/7]

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
FunctionTemplatethe function template for which we are performing template argument deduction.
ExplicitTemplateArgsthe explicitly-specified template arguments.
ArgFunctionTypethe 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.
Specializationif template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction.
Infothe argument will be updated to provide additional information about template argument deduction.
IsAddressOfFunctionIf 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 4557 of file SemaTemplateDeduction.cpp.

References adjustCCAndNoReturn(), CheckIfFunctionSpecializationIsImmediate(), Context, clang::CPlusPlus14, clang::CPlusPlus20, DeduceReturnType(), DeduceTemplateArgumentsByTypeMatch(), clang::sema::TemplateDeductionInfo::FirstArg, clang::Function, FunctionTemplate, clang::ASTContext::getCanonicalType(), getLangOpts(), clang::sema::TemplateDeductionInfo::getLocation(), clang::ASTContext::hasSameFunctionTypeIgnoringExceptionSpec(), clang::Invalid, clang::QualType::isNull(), isSameOrCompatibleFunctionType(), clang::isUnresolvedExceptionSpec(), clang::MiscellaneousDeductionFailure, clang::NonDeducedMismatch, ResolveExceptionSpec(), clang::Result, runWithSufficientStackSpace(), clang::sema::TemplateDeductionInfo::SecondArg, clang::TemplateParameterList::size(), clang::Specialization, SubstAutoType(), SubstAutoTypeDependent(), clang::Success, clang::TDF_AllowCompatibleFunctionType, clang::TDF_TopLevelParameterTypeList, and Unevaluated.

◆ DeduceTemplateArguments() [6/7]

TemplateDeductionResult Sema::DeduceTemplateArguments ( TemplateParameterList TemplateParams,
ArrayRef< TemplateArgument Ps,
ArrayRef< TemplateArgument As,
sema::TemplateDeductionInfo Info,
SmallVectorImpl< DeducedTemplateArgument > &  Deduced,
bool  NumberOfArgumentsMustMatch 
)

Definition at line 2534 of file SemaTemplateDeduction.cpp.

◆ DeduceTemplateArguments() [7/7]

TemplateDeductionResult Sema::DeduceTemplateArguments ( VarTemplatePartialSpecializationDecl Partial,
ArrayRef< TemplateArgument TemplateArgs,
sema::TemplateDeductionInfo Info 
)

◆ DeduceTemplateSpecializationFromInitializer()

QualType Sema::DeduceTemplateSpecializationFromInitializer ( TypeSourceInfo TInfo,
const InitializedEntity Entity,
const InitializationKind Kind,
MultiExprArg  Init 
)

Definition at line 10712 of file SemaInit.cpp.

References AddOverloadCandidate(), AddTemplateOverloadCandidate(), clang::Aggregate, AggregateDeductionCandidates, AliasTemplate, clang::AS_public, clang::LookupResult::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::OverloadCandidateSet::clear(), clang::Complete, Context, clang::CPlusPlus20, clang::OverloadCandidateSet::CSK_Normal, clang::ASTContext::DeclarationNames, DeclareImplicitDeductionGuideFromInitList(), Diag(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::Type::getAsCXXRecordDecl(), getASTContext(), clang::TemplateName::getAsTemplateDecl(), clang::TypeLoc::getBeginLoc(), clang::Type::getContainedDeducedType(), clang::DeclarationNameTable::getCXXDeductionGuideName(), clang::Decl::getDeclContext(), clang::RecordDecl::getDefinition(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::TypeLoc::getEndLoc(), getLangOpts(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRecordType(), clang::ASTContext::getRValueReferenceType(), clang::TypeLoc::getSourceRange(), clang::FunctionTemplateDecl::getTemplatedDecl(), getTemplateNameKindForDiagnostics(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::ASTContext::getTypeDeclType(), clang::TypeSourceInfo::getTypeLoc(), clang::Expr::hasAnyTypeDependentArguments(), clang::InitializationKind::IK_Direct, int, isCompleteType(), clang::TemplateName::isDependent(), isInitListConstructor(), clang::Decl::isInvalidDecl(), isOrIsDerivedFromSpecializationOf(), clang::ListInit, LookupOrdinaryName, LookupQualifiedName(), clang::DeclAccessPair::make(), MarkFunctionReferenced(), clang::OverloadCandidateSet::NoteCandidates(), NoteDeletedFunction(), NoteTemplateLocation(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, PDiag(), clang::VectorType::Profile(), clang::Result, SubstAutoType(), SubstAutoTypeDependent(), and clang::LookupResult::suppressDiagnostics().

Referenced by BuildCXXNew(), BuildCXXTypeConstructExpr(), CheckTemplateArgument(), and deduceVarTypeFromInitializer().

◆ DeduceVariableDeclarationType()

bool Sema::DeduceVariableDeclarationType ( VarDecl VDecl,
bool  DirectInit,
Expr Init 
)

◆ deduceVarTypeFromInitializer()

QualType Sema::deduceVarTypeFromInitializer ( VarDecl VDecl,
DeclarationName  Name,
QualType  Type,
TypeSourceInfo TSI,
SourceRange  Range,
bool  DirectInit,
Expr Init 
)

◆ deepTypeCheckForSYCLDevice()

void Sema::deepTypeCheckForSYCLDevice ( SourceLocation  UsedAt,
llvm::DenseSet< QualType Visited,
ValueDecl DeclToCheck 
)

◆ DefaultArgumentPromotion()

ExprResult Sema::DefaultArgumentPromotion ( Expr E)

◆ DefaultFunctionArrayConversion()

ExprResult Sema::DefaultFunctionArrayConversion ( Expr E,
bool  Diagnose = true 
)

◆ DefaultFunctionArrayLvalueConversion()

ExprResult Sema::DefaultFunctionArrayLvalueConversion ( Expr E,
bool  Diagnose = true 
)

◆ DefaultLvalueConversion()

ExprResult Sema::DefaultLvalueConversion ( Expr E)

Definition at line 645 of file SemaExpr.cpp.

References clang::Atomic, CheckForNullPointerDereference(), CheckLValueToRValueConversionOperand(), CheckPlaceholderExpr(), Cleanup, Context, clang::CPlusPlus, clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), CurFPFeatureOverrides(), Diag(), DiagnoseDirectIsaAccess(), clang::QualType::DK_nontrivial_c_struct, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::IdentifierTable::get(), clang::Type::getAs(), clang::TargetInfo::getCXXABI(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getObjCLifetime(), getOpenCLOptions(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::hasPlaceholderType(), clang::QualType::hasQualifiers(), clang::ASTContext::Idents, clang::Expr::IgnoreParenCasts(), clang::Type::isArrayType(), isCompleteType(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::Type::isFunctionType(), clang::Expr::isGLValue(), clang::Type::isHalfType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isMemberPointerType(), clang::TargetCXXABI::isMicrosoft(), clang::QualType::isNull(), clang::Type::isNullPtrType(), clang::Type::isRecordType(), clang::Type::isVoidType(), LookupOrdinaryName, LookupSingleName(), clang::Qualifiers::OCL_Weak, clang::OpenCL, clang::ASTContext::OverloadTy, clang::CleanupInfo::setExprNeedsCleanups(), TUScope, and clang::VK_PRValue.

Referenced by ActOnCaseExpr(), ActOnCXXDelete(), ActOnObjCAtSynchronizedOperand(), ActOnOMPArraySectionExpr(), ActOnOMPArrayShapingExpr(), ActOnOMPIteratorExpr(), actOnOMPReductionKindClause(), ActOnOpenMPAllocateClause(), ActOnOpenMPAllocatorClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPTileDirective(), ActOnOpenMPUnrollDirective(), ActOnOpenMPUseDevicePtrClause(), ActOnOpenMPUsesAllocatorClause(), BuildArrayType(), BuildBuiltinOffsetOf(), buildCapture(), BuildIvarRefExpr(), BuildObjCAtThrowStmt(), BuildObjCSubscriptExpression(), BuildVectorLiteral(), CallExprUnaryConversions(), CheckCompareOperands(), CheckEnumConstant(), CheckObjCCollectionLiteralElement(), checkOpenMPIterationSpace(), CheckPointerToMemberOperands(), CheckRealImagOperand(), CheckTemplateArgument(), CreateBuiltinUnaryOp(), DefaultFunctionArrayLvalueConversion(), finishContextualImplicitConversion(), FinishOpenMPLinearClause(), getOpenMPCapturedExpr(), IgnoredValueConversions(), LookupMemberExpr(), PerformImplicitConversion(), processImplicitMapsWithDefaultMappers(), SemaBuiltinDumpStruct(), SemaBuiltinPopcountg(), and VerifyIntegerConstantExpression().

◆ DefaultSynthesizeProperties() [1/2]

void Sema::DefaultSynthesizeProperties ( Scope S,
Decl D,
SourceLocation  AtEnd 
)

◆ DefaultSynthesizeProperties() [2/2]

void Sema::DefaultSynthesizeProperties ( Scope S,
ObjCImplDecl IMPDecl,
ObjCInterfaceDecl IDecl,
SourceLocation  AtEnd 
)

◆ DefaultVariadicArgumentPromotion()

ExprResult Sema::DefaultVariadicArgumentPromotion ( Expr E,
VariadicCallType  CT,
FunctionDecl FDecl 
)

◆ DefineDefaultedComparison()

void Sema::DefineDefaultedComparison ( SourceLocation  Loc,
FunctionDecl FD,
DefaultedComparisonKind  DCK 
)

◆ DefineImplicitCopyAssignment()

void Sema::DefineImplicitCopyAssignment ( SourceLocation  CurrentLocation,
CXXMethodDecl MethodDecl 
)

Defines an implicitly-declared copy assignment operator.

Definition at line 15032 of file SemaDeclCXX.cpp.

References ActOnCompoundStmt(), clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases(), BuildReturnStmt(), buildSingleCopyAssign(), clang::Type::castAs(), Context, clang::Copy, clang::CPlusPlus11, Diag(), diagnoseDeprecatedCopyOperation(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::RecordDecl::fields(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), getASTMutationListener(), clang::ASTContext::getBaseElementType(), getCurrentThisType(), clang::Decl::getEndLoc(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getNonObjectParameter(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::RecordDecl::hasFlexibleArrayMember(), clang::Invalid, clang::QualType::isConstQualified(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::Decl::isImplicit(), clang::Type::isIncompleteArrayType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isLValueReferenceType(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::SourceLocation::isValid(), LangOpts, LookupMemberName, clang::Decl::markUsed(), Other, ResolveExceptionSpec(), clang::LookupResult::resolveKind(), Scope, clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::VK_LValue, and clang::FunctionDecl::willHaveBody().

Referenced by DefineDefaultedFunction(), and MarkFunctionReferenced().

◆ DefineImplicitCopyConstructor()

void Sema::DefineImplicitCopyConstructor ( SourceLocation  CurrentLocation,
CXXConstructorDecl Constructor 
)

◆ DefineImplicitDefaultConstructor()

void Sema::DefineImplicitDefaultConstructor ( SourceLocation  CurrentLocation,
CXXConstructorDecl Constructor 
)

DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default constructor.

Definition at line 14046 of file SemaDeclCXX.cpp.

References Context, getASTMutationListener(), clang::Decl::isInvalidDecl(), MarkVTableUsed(), ResolveExceptionSpec(), Scope, and SetCtorInitializers().

Referenced by DefineDefaultedFunction(), MarkFunctionReferenced(), 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 14336 of file SemaDeclCXX.cpp.

References CheckDestructor(), Context, getASTMutationListener(), MarkBaseAndMemberDestructorsReferenced(), MarkVTableUsed(), ResolveExceptionSpec(), and Scope.

Referenced by DefineDefaultedFunction(), and MarkFunctionReferenced().

◆ 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 15992 of file SemaDeclCXX.cpp.

References ActOnCXXThis(), BuildBlockForLambdaConversion(), BuildReturnStmt(), Context, clang::CompoundStmt::Create(), clang::ImplicitCastExpr::Create(), CreateBuiltinUnaryOp(), Diag(), clang::ActionResult< PtrTy, Compress >::get(), getASTMutationListener(), getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::Expr::getType(), clang::CXXRecordDecl::isGenericLambda(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::markUsed(), Scope, clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::VK_PRValue.

Referenced by MarkFunctionReferenced().

◆ DefineImplicitLambdaToFunctionPointerConversion()

void Sema::DefineImplicitLambdaToFunctionPointerConversion ( SourceLocation  CurrentLoc,
CXXConversionDecl Conv 
)

◆ DefineImplicitMoveAssignment()

void Sema::DefineImplicitMoveAssignment ( SourceLocation  CurrentLocation,
CXXMethodDecl MethodDecl 
)

Defines an implicitly-declared move assignment operator.

Definition at line 15415 of file SemaDeclCXX.cpp.

References ActOnCompoundStmt(), clang::LookupResult::addDecl(), clang::CXXRecordDecl::bases(), BuildReturnStmt(), buildSingleCopyAssign(), clang::Type::castAs(), checkMoveAssignmentForRepeatedMove(), Context, Diag(), clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::RecordDecl::fields(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), getASTMutationListener(), clang::ASTContext::getBaseElementType(), getCurrentThisType(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::FunctionDecl::getNonObjectParameter(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::RecordDecl::hasFlexibleArrayMember(), clang::Invalid, clang::QualType::isConstQualified(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::Type::isIncompleteArrayType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::SourceLocation::isValid(), LookupMemberName, clang::Decl::markUsed(), Other, ResolveExceptionSpec(), clang::LookupResult::resolveKind(), Scope, clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::VK_LValue, clang::VK_XValue, and clang::FunctionDecl::willHaveBody().

Referenced by DefineDefaultedFunction(), and MarkFunctionReferenced().

◆ DefineImplicitMoveConstructor()

void Sema::DefineImplicitMoveConstructor ( SourceLocation  CurrentLocation,
CXXConstructorDecl Constructor 
)

◆ DefineInheritingConstructor()

void Sema::DefineInheritingConstructor ( SourceLocation  UseLoc,
CXXConstructorDecl Constructor 
)

◆ DefineUsedVTables()

bool Sema::DefineUsedVTables ( )

◆ Diag() [1/2]

Sema::SemaDiagnosticBuilder Sema::Diag ( SourceLocation  Loc,
const PartialDiagnostic PD,
bool  DeferHint = false 
)

Emit a partial diagnostic.

Definition at line 1613 of file Sema.cpp.

References Diag(), and clang::PartialDiagnostic::getDiagID().

◆ Diag() [2/2]

Sema::SemaDiagnosticBuilder Sema::Diag ( SourceLocation  Loc,
unsigned  DiagID,
bool  DeferHint = false 
)

Emit a diagnostic.

Definition at line 1911 of file Sema.cpp.

References CUDADiagIfDeviceCode(), CUDADiagIfHostCode(), DeferDiags, Diags, getCurFunctionDecl(), clang::DiagnosticsEngine::getDiagnosticIDs(), getLangOpts(), clang::DiagnosticIDs::isDeferrable(), clang::Sema::SemaDiagnosticBuilder::isImmediate(), IsLastErrorImmediate, clang::Sema::SemaDiagnosticBuilder::K_Immediate, and LangOpts.

Referenced by ActOnAliasDeclaration(), ActOnArraySubscriptExpr(), ActOnAtEnd(), ActOnBaseSpecifier(), ActOnBlockArguments(), ActOnBlockStmtExpr(), ActOnBreakStmt(), ActOnCallExpr(), ActOnCapScopeReturnStmt(), ActOnCaseStmt(), ActOnCastExpr(), ActOnCharacterConstant(), ActOnClassPropertyRefExpr(), ActOnClassTemplateSpecialization(), ActOnComment(), ActOnCompatibilityAlias(), ActOnCompoundStmt(), ActOnConceptDefinition(), ActOnContinueStmt(), ActOnConversionDeclarator(), ActOnCoroutineBodyStart(), ActOnCUDAExecConfigExpr(), ActOnCXXAssumeAttr(), ActOnCXXConditionDeclaration(), ActOnCXXDelete(), ActOnCXXFoldExpr(), ActOnCXXForRangeDecl(), ActOnCXXForRangeStmt(), ActOnCXXMemberDeclarator(), ActOnCXXNestedNameSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnCXXThis(), ActOnCXXTryBlock(), ActOnCXXTypeid(), ActOnDecompositionDeclarator(), ActOnDefaultStmt(), ActOnDefs(), ActOnDependentMemberExpr(), ActOnDependentTag(), ActOnDesignatedInitializer(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnExplicitInstantiation(), ActOnFields(), ActOnFinishCXXMemberSpecification(), ActOnFinishFunctionBody(), ActOnFinishKNRParamDeclarations(), ActOnFinishSwitchStmt(), ActOnForEachDeclStmt(), ActOnForStmt(), ActOnForwardClassDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnGCCAsmStmt(), ActOnHLSLTopLevelFunction(), ActOnInitList(), ActOnIvar(), ActOnLabelStmt(), ActOnLambdaClosureQualifiers(), ActOnLambdaExpressionAfterIntroducer(), ActOnMemberAccessExpr(), ActOnMemInitializers(), ActOnMethodDeclaration(), ActOnModuleDecl(), ActOnModuleImport(), ActOnMSAsmStmt(), ActOnMSVCUnknownTypeName(), ActOnNamespaceAliasDef(), ActOnNonTypeTemplateParameter(), ActOnNumericConstant(), ActOnObjCAtSynchronizedOperand(), ActOnObjCAtThrowStmt(), ActOnObjCAtTryStmt(), ActOnObjCExceptionDecl(), ActOnObjCForCollectionStmt(), actOnObjCTypeArgsOrProtocolQualifiers(), actOnObjCTypeParam(), actOnObjCTypeParamList(), ActOnOMPArraySectionExpr(), ActOnOMPArrayShapingExpr(), ActOnOMPIteratorExpr(), actOnOMPReductionKindClause(), ActOnOpenACCClause(), ActOnOpenACCConstruct(), ActOnOpenMPAffinityClause(), ActOnOpenMPAlignedClause(), ActOnOpenMPAllocateDirective(), ActOnOpenMPAssumesDirective(), ActOnOpenMPAtClause(), ActOnOpenMPAtomicDefaultMemOrderClause(), ActOnOpenMPAtomicDirective(), ActOnOpenMPBindClause(), ActOnOpenMPCall(), ActOnOpenMPCancelDirective(), ActOnOpenMPCancellationPointDirective(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPCriticalDirective(), ActOnOpenMPDeclareMapperDirective(), ActOnOpenMPDeclareMapperType(), ActOnOpenMPDeclareReductionDirectiveStart(), ActOnOpenMPDeclareReductionType(), ActOnOpenMPDeclareSimdDirective(), ActOnOpenMPDeclareTargetName(), ActOnOpenMPDeclareVariantDirective(), ActOnOpenMPDefaultClause(), ActOnOpenMPDefaultmapClause(), ActOnOpenMPDependClause(), ActOnOpenMPDepobjClause(), ActOnOpenMPDepobjDirective(), ActOnOpenMPDestroyClause(), ActOnOpenMPDetachClause(), ActOnOpenMPDeviceClause(), ActOnOpenMPDispatchDirective(), ActOnOpenMPDistScheduleClause(), ActOnOpenMPDoacrossClause(), ActOnOpenMPErrorDirective(), ActOnOpenMPExclusiveClause(), ActOnOpenMPExecutableDirective(), ActOnOpenMPFailClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPFlushDirective(), ActOnOpenMPFromClause(), ActOnOpenMPGrainsizeClause(), ActOnOpenMPHasDeviceAddrClause(), ActOnOpenMPIdExpression(), ActOnOpenMPInclusiveClause(), ActOnOpenMPInitClause(), ActOnOpenMPInteropDirective(), ActOnOpenMPIsDevicePtrClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPLoopInitialization(), ActOnOpenMPMapClause(), ActOnOpenMPMessageClause(), ActOnOpenMPNontemporalClause(), ActOnOpenMPNumTasksClause(), ActOnOpenMPOrderClause(), ActOnOpenMPOrderedDirective(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPPrivateClause(), ActOnOpenMPProcBindClause(), ActOnOpenMPReductionClause(), ActOnOpenMPRegionEnd(), ActOnOpenMPRequiresDirective(), ActOnOpenMPScanDirective(), ActOnOpenMPScheduleClause(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSeverityClause(), ActOnOpenMPSharedClause(), ActOnOpenMPSingleDirective(), ActOnOpenMPTargetDataDirective(), ActOnOpenMPTargetDirective(), ActOnOpenMPTargetEnterDataDirective(), ActOnOpenMPTargetExitDataDirective(), ActOnOpenMPTargetTeamsDirective(), ActOnOpenMPTargetUpdateDirective(), ActOnOpenMPTaskwaitDirective(), ActOnOpenMPTeamsDirective(), ActOnOpenMPToClause(), ActOnOpenMPUnrollDirective(), ActOnOpenMPUpdateClause(), ActOnOpenMPUseDevicePtrClause(), ActOnOpenMPUsesAllocatorClause(), ActOnPackExpansion(), ActOnPackIndexingExpr(), ActOnPackIndexingType(), ActOnParamDeclarator(), ActOnParamDefaultArgument(), ActOnPopScope(), ActOnPragmaAttributeAttribute(), ActOnPragmaAttributePop(), ActOnPragmaClangSection(), ActOnPragmaFEnvAccess(), ActOnPragmaFloatControl(), ActOnPragmaFPEvalMethod(), ActOnPragmaFPValueChangingOption(), ActOnPragmaMSAllocText(), ActOnPragmaMSFunction(), ActOnPragmaMSOptimize(), ActOnPragmaMSSeg(), ActOnPragmaMSStrictGuardStackCheck(), ActOnPragmaMSVtorDisp(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaRedefineExtname(), ActOnPragmaUnused(), ActOnPragmaVisibility(), ActOnPrivateModuleFragmentDecl(), ActOnPropertyImplDecl(), ActOnPseudoDestructorExpr(), ActOnPureSpecifier(), ActOnReturnStmt(), ActOnSEHExceptBlock(), ActOnSEHLeaveStmt(), ActOnSEHTryBlock(), ActOnSizeofParameterPackExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberReference(), ActOnStartExportDecl(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnStartOfObjCMethodDef(), ActOnStartOfSwitchStmt(), ActOnStartOpenMPDeclareTargetContext(), ActOnStartProtocolInterface(), ActOnStartRequiresExpr(), ActOnStringLiteral(), ActOnSuperClassOfClassInterface(), ActOnSuperMessage(), ActOnSuperScopeSpecifier(), ActOnTag(), ActOnTagFinishDefinition(), ActOnTagTemplateIdType(), ActOnTemplatedFriendTag(), ActOnTemplateIdType(), ActOnTemplateName(), ActOnTemplateParameterList(), ActOnTemplateTemplateParameter(), ActOnTypedefDeclarator(), ActOnTypenameType(), ActOnTypeParameter(), ActOnUnevaluatedStringLiteral(), ActOnUninitializedDecl(), ActOnUsingDeclaration(), ActOnUsingDirective(), ActOnUsingEnumDeclaration(), ActOnVariableDeclarator(), ActOnVarTemplateSpecialization(), AddAlignedAttr(), AddAlignValueAttr(), AddAllocAlignAttr(), AddAssumeAlignedAttr(), AddInitializerToDecl(), AddInitializerToDiag(), AddModeAttr(), AddParameterABIAttr(), adjustMemberFunctionCC(), AdjustParameterTypeForObjCAutoRefCount(), AnalyzeAssignment(), AnalyzeBitFieldAssignment(), AnalyzeCompoundAssignment(), AnalyzeImplicitConversions(), applyCocoaAPICheck(), applyObjCTypeArgs(), areMultiversionVariantFunctionsCompatible(), AtomicPropertySetterGetterRules(), AttachBaseSpecifiers(), AttachTypeConstraint(), attrNonNullArgCheck(), BuildAddressSpaceAttr(), BuildAddressSpaceIndex(), BuildAnonymousStructOrUnion(), BuildArrayType(), BuildAsTypeExpr(), BuildAtomicExpr(), BuildAtomicType(), BuildBaseInitializer(), BuildBinOp(), BuildBitIntType(), BuildBlockPointerType(), BuildBuiltinOffsetOf(), BuildCallExpr(), BuildClassMessage(), buildCoawaitCalls(), BuildCodeAlignAttr(), BuildCompoundLiteralExpr(), BuildConvertedConstantExpression(), buildCoroutineHandle(), BuildCXXAssumeExpr(), BuildCXXDefaultInitExpr(), BuildCXXForRangeStmt(), BuildCXXNamedCast(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildCXXNoexceptExpr(), BuildCXXThrow(), BuildCXXTypeConstructExpr(), BuildCXXTypeId(), BuildCXXUuidof(), BuildDeclarationNameExpr(), BuildDeclaratorGroup(), buildDeclareReductionRef(), BuildDecltypeType(), BuildDelegatingInitializer(), BuildEmptyCXXFoldExpr(), BuildExceptionDeclaration(), BuildExtVectorType(), BuildFloatingLiteral(), BuildFunctionType(), BuildImplicitMemberInitializer(), BuildInstanceMessage(), BuildIvarRefExpr(), buildLambdaCaptureFixit(), BuildLambdaExpr(), buildLambdaInitCaptureInitialization(), buildLambdaThisCaptureFixit(), BuildMatrixType(), buildMemberCall(), BuildMemberPointerType(), BuildMemberReferenceExpr(), BuildMemInitializer(), BuildNonArrayForRange(), BuildObjCArrayLiteral(), BuildObjCAtThrowStmt(), BuildObjCBoxedExpr(), BuildObjCBridgedCast(), BuildObjCDictionaryLiteral(), BuildObjCEncodeExpression(), BuildObjCExceptionDecl(), BuildObjCObjectType(), BuildObjCStringLiteral(), BuildObjCTypeParamType(), BuildPackIndexingExpr(), BuildPackIndexingType(), BuildPointerType(), BuildPossibleImplicitMemberExpr(), BuildPredefinedExpr(), BuildPseudoDestructorExpr(), BuildQualifiedDeclarationNameExpr(), BuildQualifiedTemplateIdExpr(), BuildQualifiedType(), BuildReferenceType(), BuildResolvedCallExpr(), BuildReturnStmt(), BuildStaticAssertDeclaration(), buildStdNoThrowDeclRef(), BuildTypeofExprType(), BuildUnresolvedCoawaitExpr(), buildUserDefinedMapperRef(), BuildUsingDeclaration(), BuildUsingEnumDeclaration(), BuildVAArgExpr(), BuildVectorLiteral(), BuildVectorType(), BuiltinChangeSignedness(), BuiltinEnumUnderlyingType(), calculateConstraintSatisfaction(), captureInBlock(), captureInLambda(), ChangeIntegralSignedness(), checkAcquireOrderAttrCommon(), checkAddressOfFunctionIsAvailable(), CheckAddressOfOperand(), CheckAlignasUnderalignment(), CheckAlignOfExpr(), checkAllocateClauses(), CheckAllocatedType(), checkAllowedCUDAInitializer(), CheckAltivecInitFromScalar(), checkAMDGPUFlatWorkGroupSizeArguments(), checkAMDGPUMaxNumWorkGroupsArguments(), checkAMDGPUWavesPerEUArguments(), CheckAnonMemberRedeclaration(), checkAPINotesReplacementType(), CheckARCMethodDecl(), checkARCPropertyImpl(), checkArgCount(), checkArgCountAtLeast(), checkArgCountAtMost(), CheckArgsTypesAreCorrect(), checkArithmeticBinOpPointerOperands(), checkArithmeticNull(), checkArithmeticOnObjCPointer(), checkArmNewAttrMutualExclusion(), checkArmStreamingBuiltin(), CheckArrayDesignatorExpr(), checkArrayElementAlignment(), checkArraySize(), CheckArrow(), CheckAssignmentConstraints(), CheckAssignmentOperands(), checkAtomicPropertyMismatch(), checkAttrArgsAreCapabilityObjs(), checkAttributeNumArgsImpl(), checkAttributesAfterMerging(), checkAttrMutualExclusion(), CheckAttrTarget(), checkAvailabilityAttr(), CheckBaseSpecifier(), checkBlockType(), CheckBooleanCondition(), CheckBuiltinTargetInSupported(), CheckBuiltinTargetNotInUnsupported(), checkBuiltinTemplateIdType(), CheckC23ConstexprInitConversion(), CheckC23ConstexprInitStringLiteral(), CheckC23ConstexprVarType(), CheckCallingConvAttr(), CheckCallReturnType(), checkCancelRegion(), checkCaseValue(), CheckCastAlign(), checkClassLevelDLLAttribute(), CheckClassTemplate(), checkCodeSegName(), CheckCompareOperands(), CheckComparisonCategoryType(), CheckCompatibleReinterpretCast(), CheckCompletedCoroutineBody(), CheckCompletedCXXClass(), CheckCompleteDecompositionDeclaration(), CheckCompleteParameterTypesForMangler(), CheckCompleteVariableDeclaration(), CheckConceptRedefinition(), checkCondition(), checkConditionalBlockPointerCompatibility(), CheckConditionalOperands(), checkConditionalPointerCompatibility(), CheckConditionVariable(), CheckConflictingOverridingMethod(), checkConstantPointerAuthKey(), CheckConstexprCtorInitializer(), CheckConstexprDeclStmt(), CheckConstexprDestructorSubobjects(), CheckConstexprFunctionBody(), CheckConstexprFunctionDefinition(), CheckConstexprFunctionStmt(), CheckConstPureAttributesUsage(), CheckConstraintExpression(), CheckConstructor(), CheckConstructorDeclarator(), CheckConversionDeclarator(), CheckConversionToObjCLiteral(), CheckCoroutineWrapper(), CheckCountedByAttr(), checkCUDADeviceBuiltinSurfaceClassTemplate(), checkCUDADeviceBuiltinTextureClassTemplate(), checkCUDATargetOverload(), CheckCXX98CompatAccessibleCopy(), CheckCXXDefaultArgExpr(), CheckCXXDefaultArguments(), CheckCXXThisCapture(), CheckCXXThrowOperand(), CheckDeclInExpr(), checkDeclInTargetContext(), checkDeclIsAllowedInOpenMPTarget(), CheckDeducedPlaceholderConstraints(), CheckDeductionGuideDeclarator(), CheckDeductionGuideTemplate(), CheckDependentFunctionTemplateSpecialization(), CheckDerivedToBaseConversion(), CheckDestructor(), CheckDestructorDeclarator(), checkDirectCallValidity(), checkDLLAttributeRedeclaration(), checkDuplicateDefaultInit(), checkEnumArithmeticConversions(), CheckEnumConstant(), CheckEnumRedeclaration(), checkEnumTypesInSwitchStmt(), CheckEnumUnderlyingType(), CheckEquivalentExceptionSpec(), clang::CheckEquivalentExceptionSpecImpl(), CheckExceptionSpecSubset(), CheckExplicitInstantiation(), CheckExplicitInstantiationScope(), CheckExplicitlyDefaultedComparison(), CheckExplicitlyDefaultedSpecialMember(), CheckExplicitObjectMemberFunction(), CheckExplicitObjectOverride(), CheckExplicitObjectParameter(), checkExportedDecl(), checkExprMemoryConstraintCompat(), CheckExtensionTraitOperandType(), checkExtParameterInfos(), CheckExtraCXXDefaultArguments(), CheckExtVectorCast(), CheckExtVectorComponent(), CheckFallThroughForBody(), CheckFieldDecl(), checkFinalSuspendNoThrow(), CheckFloatComparison(), CheckFoldOperand(), CheckForConstantInitializer(), checkForConsumableClass(), CheckForDuplicateEnumValues(), CheckForDuplicateLoopAttrs(), CheckForFunctionRedefinition(), CheckForIncompatibleAttributes(), CheckForModifiableLvalue(), checkForMultipleExportedDefaultConstructors(), CheckForReference(), CheckForwardProtocolDeclarationForCircularDependency(), checkFoundationAPI(), checkFPMathBuiltinElementType(), checkFunctionConditionAttr(), CheckFunctionDeclaration(), checkFunctionOrMethodParameterIndex(), CheckFunctionOrTemplateParamDeclarator(), CheckFunctionReturnType(), CheckFunctionTemplateSpecialization(), checkGenericLoopLastprivate(), checkGlobalOrExternCConflict(), CheckHLSLEntryPoint(), checkIBOutletCommon(), CheckIdentityFieldAssignment(), checkIfClauses(), CheckIfOverriddenFunctionIsMarkedFinal(), checkIllFormedTrivialABIStruct(), CheckImmediateEscalatingFunctionDefinition(), CheckImplementationIvars(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckInheritingConstructorUsingDecl(), checkInitializerLifetime(), checkInitMethod(), CheckInvalidVLENandLMUL(), checkIsValidOpenCLKernelParameter(), CheckJumpOutOfSEHFinally(), CheckLiteralOperatorDeclaration(), checkLiteralOperatorId(), checkLiteralOperatorTemplateParameterList(), CheckLogicalOperands(), CheckLoopHintExpr(), CheckMain(), checkMapClauseExpressionBase(), checkMapConflicts(), checkMappableExpressionList(), checkMathBuiltinElementType(), CheckMatrixCast(), CheckMemaccessSize(), checkMemberDecomposition(), CheckMemberSpecialization(), CheckMemorySizeofForComparison(), CheckMessageArgumentTypes(), checkMethodFamilyMismatch(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), checkMethodTypeQualifiers(), checkModuleImportContext(), checkMoreSpecializedThanPrimary(), checkMoveAssignmentForRepeatedMove(), CheckMoveOnConstruction(), checkMSInheritanceAttrOnDefinition(), CheckMSVCRTEntryPoint(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionAdditionalRules(), CheckMultiVersionFunction(), CheckMultiVersionValue(), checkMutualExclusion(), checkMutuallyExclusiveClauses(), CheckNakedParmReference(), checkNestingOfRegions(), checkNewAttributesAfterDef(), checkNonMultiVersionCompatAttributes(), CheckNontrivialField(), CheckNonTypeTemplateParameterType(), CheckNonTypeTemplatePartialSpecializationArgs(), checkNoThrow(), checkNSReturnsRetainedReturnType(), CheckNullabilityTypeSpecifier(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), CheckObjCBridgeRelatedConversions(), CheckObjCCollectionLiteralElement(), checkObjCCollectionLiteralElement(), CheckObjCConversion(), CheckObjCDeclScope(), CheckObjCDictionaryLiteralDuplicateKeys(), checkObjCDirectMethodClashes(), CheckObjCForCollectionOperand(), checkObjCKindOfType(), CheckObjCMethodDirectOverrides(), CheckObjCMethodOverride(), CheckObjCMethodOverrides(), checkObjCMethodX86VectorTypes(), checkObjCPointerIntrospection(), CheckObjCPropertyAttributes(), CheckObjCTraitOperandConstraints(), checkOmittedBlockReturnType(), checkOMPAssumeAttr(), CheckOMPRequiresDecl(), CheckOMPThreadPrivateDecl(), checkOpenCLBlockArgs(), checkOpenCLConditionVector(), checkOpenCLEnqueueIntType(), checkOpenCLEnqueueVariadicArgs(), checkOpenCLPipeArg(), checkOpenCLPipePacketType(), checkOpenCLSubgroupExt(), checkOpenMPDeclareVariantFunction(), checkOpenMPIterationSpace(), CheckOpenMPLinearDecl(), CheckOpenMPLinearModifier(), checkOpenMPLoop(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), checkOrderedOrderSpecified(), CheckOverloadedOperatorDeclaration(), CheckOverrideControl(), CheckOverridingFunctionAttributes(), CheckOverridingFunctionReturnType(), CheckPackExpansion(), CheckParameter(), CheckParameterPacksForExpansion(), checkParamIsIntegerType(), CheckParmsForFunctionDef(), CheckPlaceholderExpr(), checkPointerAuthEnabled(), checkPointerAuthValue(), checkPointerIntegerMismatch(), CheckPointerToMemberOperands(), checkPositiveIntArgument(), checkPreviousOMPAllocateAttribute(), checkPropertyDeclWithOwnership(), checkPseudoObjectIncDec(), CheckPtrComparisonWithNullChar(), CheckPureMethod(), checkQualifiedFunction(), CheckQualifiedFunctionForTypeId(), CheckRealImagOperand(), checkRecursiveFunction(), CheckRedeclarationExported(), CheckRedeclarationModuleOwnership(), checkReductionClauses(), checkReductionClauseWithNogroup(), CheckRegparmAttr(), checkScheduleModifiers(), checkSectionName(), CheckShadow(), CheckShadowingDeclModification(), checkSimdlenSafelenSpecified(), checkSimpleDecomposition(), CheckSingleAssignmentConstraints(), CheckSizelessVectorCompareOperands(), CheckSizelessVectorConditionalTypes(), CheckSizelessVectorOperands(), checkSizelessVectorShift(), CheckSpecializationInstantiationRedecl(), CheckSpecifiedExceptionType(), CheckStaticArrayArgument(), CheckStmtInlineAttr(), CheckStringInit(), checkStringLiteralArgumentAttr(), CheckSubscriptingKind(), CheckSubtractionOperands(), checkSuspensionContext(), checkSwiftAsyncErrorBlock(), CheckSwitchCondition(), checkTargetAttr(), CheckTargetCausesMultiVersioning(), checkTargetClonesAttrString(), checkTargetVersionAttr(), CheckTautologicalComparison(), CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentList(), CheckTemplateArgumentPointerToMember(), CheckTemplateDeclScope(), CheckTemplateIdType(), CheckTemplateParameterList(), checkTemplatePartialSpecialization(), CheckTemplateSpecializationScope(), CheckTemplateTemplateArgument(), CheckTemplateTypeArgument(), CheckThreadLocalForLargeAlignment(), checkThreeWayNarrowingConversion(), checkTrivialClassMembers(), checkTrivialSubobjectCall(), checkTryLockFunAttrCommon(), checkTupleLikeDecomposition(), CheckTypeConstraint(), CheckTypedefForVariablyModifiedType(), checkTypeMappable(), CheckTypenameType(), checkTypeParamListConsistency(), checkTypeSupport(), CheckTypeTraitArity(), checkUInt32Argument(), CheckUnaryExprOrTypeTraitOperand(), checkUndefinedButUsed(), checkUnsafeAssignLiteral(), checkUnsafeAssignObject(), checkUnsafeExprAssigns(), checkUnusedDeclAttributes(), CheckUseOfCXXMethodAsAddressOfOperand(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), checkUsingShadowRedecl(), checkVarDeclRedefinition(), CheckVariableDeclarationType(), checkVariadicArgument(), CheckVarTemplateId(), checkVAStartABI(), checkVAStartIsInVariadicFunction(), CheckVecStepTraitOperandType(), CheckVectorCast(), CheckVectorCompareOperands(), CheckVectorConditionalTypes(), CheckVectorElementCallArgs(), CheckVectorElementsTraitOperandType(), CheckVectorOperands(), checkVectorResult(), checkVectorShift(), CheckVirtualDtorCall(), CheckWasmBuiltinArgIsInteger(), CheckWasmBuiltinArgIsTable(), ConstantFoldAttrArgs(), ConvertArgumentsForCall(), ConvertDeclSpecToType(), ConvertDeducedTemplateArgument(), CopyObject(), CreateBuiltinArraySubscriptExpr(), CreateBuiltinBinOp(), CreateBuiltinMatrixSubscriptExpr(), CreateBuiltinUnaryOp(), CreateGenericSelectionExpr(), CreateLaunchBoundsAttr(), CreateNewFunctionDecl(), CreatePropertyDecl(), CreateUnaryExprOrTypeTraitExpr(), CXXCheckConditionalOperands(), DeduceAutoType(), deduceClosureReturnType(), DeduceFunctionTypeFromReturnExpr(), DeduceReturnType(), DeduceTemplateSpecializationFromInitializer(), deduceVarTypeFromInitializer(), DefaultLvalueConversion(), DefaultSynthesizeProperties(), DefineImplicitCopyAssignment(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitMoveAssignment(), DefineUsedVTables(), DelegatingCycleHelper(), Diag(), DiagIfReachable(), clang::InitializationSequence::Diagnose(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAbstractType(), DiagnoseAccessPath(), DiagnoseAdditionInShift(), diagnoseAddressOfInvalidType(), DiagnoseAlwaysNonNullPointer(), clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), DiagnoseAmbiguousLookup(), diagnoseAndRemoveTypeQualifiers(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnNullPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), DiagnoseArityMismatch(), diagnoseArrayStarInParamType(), DiagnoseAssignmentAsCondition(), DiagnoseAssignmentEnum(), DiagnoseAssignmentResult(), DiagnoseAutoDeductionFailure(), DiagnoseBadAccess(), diagnoseBadCast(), DiagnoseBadConversion(), DiagnoseBadDeduction(), diagnoseBadDirectAccess(), DiagnoseBadShiftValues(), DiagnoseBadTarget(), diagnoseBadTypeAttribute(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseBitwiseOpInBitwiseOp(), DiagnoseCalleeStaticArrayParam(), DiagnoseCategoryDirectMembersProtocolConformance(), DiagnoseClassExtensionDupMethods(), DiagnoseClassNameShadow(), DiagnoseCommaOperator(), DiagnoseConditionalForNull(), DiagnoseConstAssignment(), DiagnoseCStringFormatDirectiveInCFAPI(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseDefaultTemplateArgument(), DiagnoseDependentMemberLookup(), diagnoseDeprecatedCopyOperation(), diagnoseDiagnoseIfAttrsWith(), DiagnoseDirectIsaAccess(), diagnoseDistinctPointerComparison(), DiagnoseDivisionSizeofPointerOrArray(), DiagnosedUnqualifiedCallsToStdFunctions(), DiagnoseDuplicateIvars(), DiagnoseEmptyLookup(), DiagnoseEmptyLoopBody(), DiagnoseEmptyStmtBody(), DiagnoseEqualityWithExtraParens(), diagnoseExprIntendedAsTemplateName(), DiagnoseFailedEnableIfAttr(), DiagnoseFailedExplicitSpec(), DiagnoseFloatingImpCast(), clang::Sema::VerifyICEDiagnoser::diagnoseFold(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), diagnoseFunctionPointerToVoidComparison(), DiagnoseFunctionSpecifiers(), DiagnoseHiddenVirtualMethods(), DiagnoseHLSLAttrStageMismatch(), diagnoseIgnoredQualifiers(), DiagnoseImmediateEscalatingReason(), DiagnoseImpCast(), diagnoseImplicitlyRetainedSelf(), DiagnoseIndirectOrAsmJumpStmt(), diagnoseInstanceReference(), DiagnoseIntInBoolContext(), DiagnoseInvalidExplicitObjectParameterInLambda(), DiagnoseInvalidRedeclaration(), DiagnoseInvisibleNamespace(), clang::ParsedAttr::diagnoseLangOpts(), diagnoseListInit(), diagnoseLogicalNotOnLHSofCheck(), DiagnoseMisalignedMembers(), DiagnoseMismatchedNewDelete(), diagnoseMissingArgument(), diagnoseMissingConstinit(), DiagnoseMissingDesignatedInitOverrides(), diagnoseMissingImport(), diagnoseMissingTemplateArguments(), DiagnoseMultipleAddrSpaceAttributes(), DiagnoseMultipleMethodInGlobalPool(), DiagnoseNamespaceInlineMismatch(), DiagnoseNarrowingInInitList(), DiagnoseNoDiscard(), diagnoseNoescape(), DiagnoseNonDefaultPragmaAlignPack(), diagnoseNullableToNonnullConversion(), DiagnoseNullConversion(), diagnoseNullResettableSynthesizedSetters(), diagnoseObjCARCConversion(), DiagnoseObjCImplementedDeprecations(), diagnoseObjCLiteralComparison(), diagnoseOpenCLTypes(), DiagnoseOwningPropertyGetterSynthesis(), diagnosePointerIncompatibility(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), diagnoseQualifiedDeclaration(), DiagnoseQualifiedMemberReference(), DiagnoseRecursiveConstFields(), diagnoseRepeatedUseOfWeak(), DiagnoseRetainableFlexibleArrayMember(), diagnoseRetainCycle(), DiagnoseSelfAssignment(), DiagnoseSelfMove(), DiagnoseSentinelCalls(), DiagnoseShadowingLambdaDecls(), DiagnoseShiftCompare(), DiagnoseSizeOfParametersAndReturnValue(), DiagnoseStaticAssertDetails(), DiagnoseSwiftName(), DiagnoseSwitchLabelsFallthrough(), diagnoseTautologicalComparison(), DiagnoseTemplateParameterListArityMismatch(), DiagnoseTemplateParameterShadow(), DiagnoseTwoPhaseLookup(), DiagnoseTypeArgsAndProtocols(), diagnoseTypo(), diagnoseUnavailableAlignedAllocation(), diagnoseUncapturableValueReferenceOrBinding(), DiagnoseUnexpandedParameterPacks(), DiagnoseUnimplementedAccessor(), DiagnoseUninitializedConstRefUse(), DiagnoseUninitializedReference(), DiagnoseUninitializedUse(), DiagnoseUninstantiableTemplate(), diagnoseUnknownAnyExpr(), DiagnoseUnknownTemplateName(), DiagnoseUnknownTypeName(), diagnoseUnsatisfiedConstraintExpr(), diagnoseUnsatisfiedRequirement(), DiagnoseUnterminatedOpenMPDeclareTarget(), DiagnoseUnterminatedPragmaAlignPack(), DiagnoseUnterminatedPragmaAttribute(), DiagnoseUnusedBackingIvarInAccessor(), DiagnoseUnusedComparison(), DiagnoseUnusedDecl(), DiagnoseUnusedExprResult(), DiagnoseUnusedLambdaCapture(), DiagnoseUnusedNestedTypedefs(), DiagnoseUnusedOfDecl(), DiagnoseUnusedParameters(), DiagnoseUseOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), DiagnoseUseOfUnimplementedSelectors(), diagnoseVarDeclTypeMismatch(), DiagnoseVariableSizedIvars(), DiagnoseWeakIvars(), diagnoseWellFormedUnsatisfiedConstraintExpr(), diagnoseXorMisusedAsPow(), diagnoseZeroToNullptrConversion(), diagOpenCLBuiltinTypeError(), DiagPlaceholderVariableDefinition(), DiagRecursiveConstraintEval(), DiagRedefinedPlaceholderFieldDecl(), DiagReservedModuleName(), diagReturnOnAllocFailure(), DiagUninitUse(), DoEmitAvailabilityWarning(), emitAndClearUnusedLocalTypedefWarnings(), emitAndFixInvalidAsmCastLValue(), emitBadConversionNotes(), EmitCurrentDiagnostic(), EmitDiagForCXXThrowInNonThrowingFunc(), emitEmptyLookupTypoDiagnostic(), emitNullabilityConsistencyWarning(), emitReadOnlyPlacementAttrWarning(), EmitRelatedResultTypeNote(), EmitRelatedResultTypeNoteForReturn(), emitReplacement(), EndOpenMPDSABlock(), EnsureTemplateArgumentListConstraints(), EvaluateAndDiagnoseImmediateInvocation(), EvaluateStaticAssertMessageAsString(), ExpandFunctionLocalPredefinedMacros(), FinalizeDeclaration(), FinalizeDeclaratorGroup(), finalizeOpenMPDelayedAnalysis(), FinalizeVarWithDestructor(), FindAllocationFunctions(), FindCompositeObjCPointerType(), FindDeallocationFunction(), findDecomposableBaseClass(), FindInstantiatedDecl(), findOMPAllocatorHandleT(), findOMPAlloctraitT(), findOMPDependT(), findOMPEventHandleT(), FindProtocolDeclaration(), clang::DeclSpec::Finish(), FinishForRangeVarDecl(), FinishOpenMPLinearClause(), flushDiagnostics(), getAndVerifyMatrixDimension(), getConstructorName(), getDarwinSDKInfoForAvailabilityChecking(), GetDeclSpecTypeForDeclarator(), getDestructorName(), getDestructorTypeForDecltype(), GetFullTypeForDeclarator(), getFunctionStorageClass(), getLambdaType(), getMostSpecialized(), GetNameFromUnqualifiedId(), getNSNumberFactoryMethod(), getPatternForClassTemplateSpecialization(), getPrivateItem(), getTupleLikeElementType(), getTypeName(), handleAbiTagAttr(), handleAcquireHandleAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAllocSizeAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), HandleAnnotateTypeAttr(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), handleArmBuiltinAliasAttr(), handleARMInterruptAttr(), handleArmNewAttr(), handleArmStateAttribute(), HandleArmSveVectorBitsTypeAttr(), handleAvailabilityAttr(), handleAVRInterruptAttr(), handleAVRSignalAttr(), handleBlocksAttr(), HandleBTFTypeTagAttribute(), handleBuiltinAliasAttr(), handleCallableWhenAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCalledOnceAttr(), handleCFGuardAttr(), handleCleanupAttr(), handleCmseNSEntryAttr(), handleCodeModelAttr(), handleCodeSegAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleCountedByAttr(), handleCPUSpecificAttr(), HandleDeclarator(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), handleDeprecatedAttr(), handleDestroyAttr(), handleDeviceAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnforceTCBAttr(), handleEnumExtensibilityAttr(), HandleExprPropertyRefExpr(), HandleExtVectorTypeAttr(), handleFallThroughAttr(), HandleField(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionReturnThunksAttr(), handleFunctionTypeAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleHLSLNumThreadsAttr(), handleHLSLResourceBindingAttr(), handleHLSLShaderAttr(), handleHLSLSV_DispatchThreadIDAttr(), handleIBOutletCollection(), handleIFuncAttr(), HandleImmediateInvocations(), handleInitPriorityAttr(), handleLayoutVersion(), handleLifetimeCategoryAttr(), handleLikely(), handleLoopHintAttr(), handleM68kInterruptAttr(), handleManagedAttr(), HandleMatrixTypeAttr(), handleMIGServerRoutineAttr(), handleMinVectorWidthAttr(), handleMipsInterruptAttr(), handleModeAttr(), handleMSAllocatorAttr(), handleMSConstexprAttr(), handleMSInheritanceAttr(), handleMSP430InterruptAttr(), handleMSPointerTypeQualifierAttr(), HandleMSProperty(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoBuiltinAttr(), handleNoCfCheckAttr(), handleNoEscapeAttr(), handleNoInlineAttr(), handleNoMergeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleNSErrorDomain(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCDirectAttr(), handleObjCDirectMembersAttr(), handleObjCExternallyRetainedAttr(), handleObjCGCTypeAttr(), handleObjCIndependentClass(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipAttr(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCSuppresProtocolAttr(), HandleOpenCLAccessAttr(), handleOpenCLAccessAttr(), handleOpenCLNoSVMAttr(), handleOpenCLUnrollHint(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handlePreferredName(), handlePreferredTypeAttr(), HandlePropertyInClassExtension(), handleRestrictAttr(), handleReturnTypestateAttr(), handleRISCVInterruptAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedAttr(), handleSimpleAttributeOrDiagnose(), handleStandardNoReturnAttr(), handleSubGroupSize(), handleSuppressAttr(), handleSwiftAsyncAttr(), handleSwiftAsyncError(), handleSwiftBridge(), handleSwiftError(), handleSwiftNewType(), handleSYCLKernelAttr(), handleTargetClonesAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTypeTagForDatatypeAttr(), handleUnlikely(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), HandleVectorSizeAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWebAssemblyExportNameAttr(), HandleWebAssemblyFuncrefAttr(), handleWebAssemblyImportModuleAttr(), handleWebAssemblyImportNameAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), handleXReturnsXRetainedAttr(), handleZeroCallUsedRegsAttr(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), ImpCastExprToType(), ImplicitlyDefineFunction(), inferARCLifetimeForPointee(), inferCUDATargetForImplicitSpecialMember(), inferObjCARCLifetime(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), instantiateDependentAnnotationAttr(), instantiateDependentFunctionAttrCondition(), InstantiateExceptionSpec(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), InstantiateVariableDefinition(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::interp::interp__builtin_is_constant_evaluated(), InvalidLogicalVectorOperands(), InvalidOperands(), isAcceptableTagRedeclaration(), isIncompatibleTypedef(), isMemberAccessibleForDeletion(), IsMicrosoftUsingDeclarationAccessBug(), isNonNegativeIntegerValue(), isNullPointerValueTemplateArgument(), IsOverloadOrOverrideImpl(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), isTagTypeWithMissingTag(), isTupleLike(), isValidCoroutineContext(), isValidInteropVariable(), isVariableCapturable(), IsVectorConversion(), LazilyCreateBuiltin(), lookupCoroutineHandleType(), lookupCoroutineTraits(), LookupIvarInObjCMethod(), LookupLiteralOperator(), LookupMemberExpr(), LookupMemberExprInRecord(), lookupOpenMPDeclareTargetName(), lookupPromiseType(), LookupStdInitializerList(), LookupStdSourceLocationImpl(), lookupStdTypeTraitMember(), LookupTemplateName(), makeLaunchBoundsArgExpr(), MatchTemplateParameterKind(), MatchTemplateParametersToScopeSpecifier(), maybeAddCUDAHostDeviceAttrs(), MaybeEmitAmbiguousAtomicConstraintsDiagnostic(), MaybeSuggestAddingStaticToDecl(), maybeTailCall(), mergeAlignedAttrs(), mergeAlwaysInlineAttr(), mergeAvailabilityAttr(), mergeCodeSegAttr(), MergeCXXFunctionDecl(), mergeDeclAttributes(), mergeDLLExportAttr(), mergeDLLImportAttr(), mergeEnforceTCBAttrImpl(), mergeErrorAttr(), MergeFunctionDecl(), mergeHLSLNumThreadsAttr(), mergeHLSLParamModifierAttr(), mergeHLSLShaderAttr(), mergeImportModuleAttr(), mergeImportNameAttr(), mergeInternalLinkageAttr(), mergeMinSizeAttr(), mergeMSInheritanceAttr(), mergeOptimizeNoneAttr(), mergeParamDeclAttributes(), mergeParamDeclTypes(), mergeSectionAttr(), mergeSwiftNameAttr(), MergeTypedefNameDecl(), mergeTypeNullabilityForRedecl(), mergeUuidAttr(), MergeVarDecl(), mergeVisibilityAttr(), NoteAllFoundTemplates(), NoteBuiltinOperatorCandidate(), clang::OverloadCandidateSet::NoteCandidates(), clang::TemplateSpecCandidateSet::NoteCandidates(), NoteDeletedFunction(), NoteFunctionCandidate(), NoteHiddenVirtualMethods(), noteLocation(), noteMemberDeclaredHere(), noteNonDeducibleParameters(), noteOperatorArrows(), noteOverloads(), notePreviousDefinition(), NoteSurrogateCandidate(), OpenCLArithmeticConversions(), OpenCLConvertScalarsToVectors(), ParsedFreeStandingDeclSpec(), ParseObjCProtocolExpression(), ParseObjCSelectorExpression(), ParseObjCStringLiteral(), ParseTypedefDecl(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), PerformOpenMPImplicitIntegerConversion(), PopExpressionEvaluationContext(), PopFunctionScopeInfo(), PopPragmaVisibility(), PrepareScalarCast(), ProcessAccessDeclAttributeList(), ProcessDeclAttribute(), ProcessDeclAttributeList(), ProcessOpenMPDoacrossClauseCommon(), ProcessPropertyDecl(), ProcessStmtAttribute(), propagateDLLAttrToBaseClassTemplate(), clang::TreeTransform< Derived >::RebuildCXXForRangeStmt(), clang::TreeTransform< Derived >::RebuildDependentNameType(), RebuildForRangeWithDereference(), clang::TreeTransform< Derived >::RebuildQualifiedType(), recoverFromMSUnqualifiedLookup(), recoverFromTypeInKnownDependentBase(), rejectConstNotMutableType(), reportOriginalDsa(), ReportOverrides(), RequireCompleteEnumDecl(), RequireLiteralType(), RequireStructuralType(), resolveAllocationOverload(), resolveAssumedTemplateNameAsType(), resolveBuiltinNewDeleteOverload(), ResolveExceptionSpec(), SelectPropertyForSynthesisFromProtocols(), SemaBuiltinAlignment(), SemaBuiltinAnnotation(), SemaBuiltinCallWithStaticChain(), SemaBuiltinCommitRWPipe(), SemaBuiltinCpu(), SemaBuiltinDumpStruct(), SemaBuiltinFunctionStart(), SemaBuiltinLaunder(), SemaBuiltinMSVCAnnotation(), SemaBuiltinOverflow(), SemaBuiltinPipePackets(), SemaBuiltinPopcountg(), SemaBuiltinReserveRWPipe(), SemaBuiltinRWPipe(), SemaBuiltinSEHScopeCheck(), SemaBuiltinShuffleVector(), SemaBuiltinVectorMath(), SemaConvertVectorExpr(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinKernelWorkGroupSize(), SemaOpenCLBuiltinNDRangeAndBlock(), SemaOpenCLBuiltinToAddr(), SetCtorInitializers(), SetDeclDefaulted(), SetDeclDeleted(), SetMemberAccessSpecifier(), setTagNameForLinkagePurposes(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), SubstDefaultArgument(), SubstituteExplicitTemplateArguments(), SubstParmVarDecl(), SuggestInitializationFixit(), TemplateParameterListsAreEqual(), threadSafetyCheckIsPointer(), clang::TreeTransform< Derived >::TransformAttributedType(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), tryCaptureVariable(), TryDiagnoseProtectedAccess(), tryMakeVariablePseudoStrong(), TryOrBuildParenListInitialization(), tryToFixVariablyModifiedVarType(), tryToRecoverWithCall(), UnifySection(), validateAlignasAppliedType(), validateBoxingMethod(), ValidateObjCLiteralInterfaceDecl(), validateSwiftFunctionName(), VerifyBitField(), VerifyIntegerConstantExpression(), VerifyPositiveIntegerConstantInClause(), verifyValidIntegerConstantExpr(), warnAboutAmbiguousFunction(), warnAboutRedundantParens(), warnBracedScalarInit(), WarnConflictingTypedMethods(), WarnExactTypedMethods(), WarnOnPendingNoDerefs(), warnOnReservedIdentifier(), warnOnSizeofOnArrayDecay(), warnStackExhausted(), and WarnUndefinedMethod().

◆ diagIfOpenMPDeviceCode()

Sema::SemaDiagnosticBuilder Sema::diagIfOpenMPDeviceCode ( SourceLocation  Loc,
unsigned  DiagID,
const FunctionDecl FD 
)

Creates a SemaDiagnosticBuilder 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 2049 of file SemaOpenMP.cpp.

References CUDADiscarded, Emitted, getEmissionStatus(), isOpenMPDeviceDelayedContext(), clang::Sema::SemaDiagnosticBuilder::K_Deferred, clang::Sema::SemaDiagnosticBuilder::K_Immediate, clang::Sema::SemaDiagnosticBuilder::K_Nop, LangOpts, OMPDiscarded, TemplateDiscarded, and Unknown.

Referenced by targetDiag().

◆ diagIfOpenMPHostCode()

Sema::SemaDiagnosticBuilder Sema::diagIfOpenMPHostCode ( SourceLocation  Loc,
unsigned  DiagID,
const FunctionDecl FD 
)

Creates a SemaDiagnosticBuilder 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 2086 of file SemaOpenMP.cpp.

References CUDADiscarded, Emitted, getEmissionStatus(), clang::Sema::SemaDiagnosticBuilder::K_Deferred, clang::Sema::SemaDiagnosticBuilder::K_Immediate, clang::Sema::SemaDiagnosticBuilder::K_Nop, LangOpts, OMPDiscarded, TemplateDiscarded, and Unknown.

Referenced by targetDiag().

◆ DiagIfReachable()

bool Sema::DiagIfReachable ( SourceLocation  Loc,
ArrayRef< const Stmt * >  Stmts,
const PartialDiagnostic PD 
)

Conditionally issue a diagnostic based on the statements's reachability analysis.

Emit a diagnostic when statements are reachable.

Parameters
StmtsIf Stmts is non-empty, 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.

FIXME: check for reachability even in expressions for which we don't build a CFG (eg, in the initializer of a global or in a constant expression). For example, namespace { auto *p = new double[3][false ? (1, 2) : 3]; }

Definition at line 20939 of file SemaExpr.cpp.

References Diag(), ExprEvalContexts, FunctionScopes, and getCurFunctionOrMethodDecl().

Referenced by DiagnoseUnusedExprResult(), and DiagRuntimeBehavior().

◆ DiagnoseAbsenceOfOverrideControl()

void Sema::DiagnoseAbsenceOfOverrideControl ( NamedDecl D,
bool  Inconsistent 
)

◆ DiagnoseAbstractType()

void Sema::DiagnoseAbstractType ( const CXXRecordDecl RD)

◆ DiagnoseAlwaysNonNullPointer()

void Sema::DiagnoseAlwaysNonNullPointer ( Expr E,
Expr::NullPointerConstantKind  NullKind,
bool  IsEqual,
SourceRange  Range 
)

Diagnose pointers that are always non-null.

Parameters
Ethe expression containing the pointer
NullKindNPCK_NotNull if E is a cast to bool, otherwise, E is compared to a null pointer
IsEqualTrue when the comparison is equal to a null pointer
RangeExtra SourceRange to highlight in the diagnostic

Definition at line 16797 of file SemaChecking.cpp.

References clang::Call, CheckForReference(), clang::FixItHint::CreateInsertion(), Diag(), clang::Stmt::getBeginLoc(), getCurFunction(), clang::Stmt::getEndLoc(), clang::Expr::getExprLoc(), getLocForEndOfToken(), getPrintingPolicy(), getSourceManager(), clang::Stmt::getSourceRange(), clang::FunctionDecl::getTemplatedKind(), clang::ValueDecl::getType(), clang::Expr::IgnoreImpCasts(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParens(), inTemplateInstantiation(), clang::Type::isArrayType(), clang::Type::isFunctionType(), IsInAnyMacroBody(), clang::Type::isIntegerType(), clang::SourceLocation::isMacroID(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::Type::isSpecificBuiltinType(), clang::ValueDecl::isWeak(), clang::NonNull, clang::Expr::NPCK_NotNull, clang::Expr::NPCK_ZeroExpression, clang::Expr::NPCK_ZeroLiteral, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), clang::FunctionDecl::parameters(), PDiag(), clang::Stmt::printPretty(), SM, clang::Decl::specific_attrs(), clang::FunctionDecl::TK_FunctionTemplate, and tryExprAsCall().

Referenced by CheckCompareOperands(), and CheckImplicitConversion().

◆ DiagnoseAmbiguousLookup()

void Sema::DiagnoseAmbiguousLookup ( LookupResult Result)

◆ diagnoseARCUnbridgedCast()

void Sema::diagnoseARCUnbridgedCast ( Expr e)

◆ 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 7349 of file SemaOverload.cpp.

References diagnoseDiagnoseIfAttrsWith(), clang::Function, and clang::Result.

◆ 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 7367 of file SemaOverload.cpp.

References diagnoseDiagnoseIfAttrsWith(), EvaluateAsBooleanCondition(), and clang::Result.

Referenced by DiagnoseUseOfDecl().

◆ DiagnoseAssignmentAsCondition()

void Sema::DiagnoseAssignmentAsCondition ( Expr E)

◆ DiagnoseAssignmentEnum()

void Sema::DiagnoseAssignmentEnum ( QualType  DstType,
QualType  SrcType,
Expr SrcExpr 
)

◆ 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 17663 of file SemaExpr.cpp.

References AA_Assigning, AA_Casting, AA_Converting, AA_Initializing, AA_Passing, AA_Passing_CFAudited, AA_Returning, AA_Sending, clang::Type::castAs(), Compatible, CompatiblePointerDiscardsQualifiers, Context, clang::CPlusPlus, Diag(), DiagnoseAssignmentEnum(), EmitRelatedResultTypeNote(), EmitRelatedResultTypeNoteForReturn(), clang::OverloadExpr::find(), FunctionVoidPointer, clang::Qualifiers::getAddressSpace(), clang::ASTContext::getArrayDecayedType(), clang::ObjCObjectPointerType::getInterfaceType(), getLangOpts(), clang::Decl::getLocation(), clang::Qualifiers::getObjCLifetime(), clang::Type::getPointeeOrArrayElementType(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::QualType::getUnqualifiedType(), HandleFunctionTypeMismatch(), clang::ObjCInterfaceDecl::hasDefinition(), clang::ConversionFixItGenerator::Hints, Incompatible, IncompatibleBlockPointer, IncompatibleFunctionPointer, IncompatibleFunctionPointerStrict, IncompatibleNestedPointerAddressSpaceMismatch, IncompatibleNestedPointerQualifiers, IncompatibleObjCQualifiedId, IncompatibleObjCWeakRef, IncompatiblePointer, IncompatiblePointerDiscardsQualifiers, IncompatiblePointerSign, IncompatibleVectors, IntToBlockPointer, IntToPointer, clang::Type::isArrayType(), isInvalid(), clang::ConversionFixItGenerator::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedIdType(), clang::Type::isSpecificBuiltinType(), IsStringLiteralToNonConstPointerConversion(), clang::ConversionFixItGenerator::Kind, maybeDiagnoseAssignmentToFunction(), NoteAllOverloadCandidates(), clang::ASTContext::OverloadTy, PDiag(), PointerToInt, clang::ObjCObjectPointerType::quals(), and clang::ConversionFixItGenerator::tryToFixConversion().

Referenced by ActOnIndirectGotoStmt(), CheckAssignmentOperands(), clang::InitializationSequence::Perform(), and PerformImplicitConversion().

◆ DiagnoseAutoDeductionFailure()

void Sema::DiagnoseAutoDeductionFailure ( VarDecl VDecl,
Expr Init 
)

◆ DiagnoseAvailabilityOfDecl()

void 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 1767 of file SemaDeclObjC.cpp.

References Diag(), clang::Decl::getLocation(), clang::ObjCMethodDecl::isInstanceMethod(), MatchTwoMethodDeclarations(), and clang::ObjCContainerDecl::methods().

Referenced by ActOnAtEnd().

◆ 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 6182 of file SemaDecl.cpp.

References Diag(), clang::DeclarationNameInfo::getLoc(), and clang::DeclarationNameInfo::getName().

Referenced by ActOnAliasDeclaration(), ActOnEnumConstant(), ActOnTag(), CheckClassTemplate(), CheckUsingShadowDecl(), and HandleDeclarator().

◆ DiagnoseCommaOperator()

void Sema::DiagnoseCommaOperator ( const Expr LHS,
SourceLocation  Loc 
)

◆ DiagnoseConditionalForNull()

bool Sema::DiagnoseConditionalForNull ( const Expr LHSExpr,
const Expr RHSExpr,
SourceLocation  QuestionLoc 
)

◆ DiagnoseDeletedDefaultedFunction()

void Sema::DiagnoseDeletedDefaultedFunction ( FunctionDecl FD)

◆ DiagnoseDependentMemberLookup()

bool Sema::DiagnoseDependentMemberLookup ( const LookupResult R)

Diagnose a lookup that found results in an enclosing class during error recovery.

This usually indicates that the results were found in a dependent base class that could not be searched as part of a template definition. Always issues a diagnostic (though this may be only a warning in MS compatibility mode).

Return true if the error is unrecoverable, or false if the caller should attempt to recover using these lookup results.

Definition at line 2407 of file SemaExpr.cpp.

References clang::LookupResult::begin(), CheckCXXThisCapture(), CodeSynthesisContexts, clang::FixItHint::CreateInsertion(), CurContext, clang::Sema::CodeSynthesisContext::DefaultFunctionArgumentInstantiation, Diag(), clang::DeclContext::Equals(), clang::Decl::getDeclContext(), getLangOpts(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::LookupResult::getNamingClass(), clang::DeclContext::getParent(), and clang::LookupResult::getRepresentativeDecl().

Referenced by BuildRecoveryCallExpr(), and DiagnoseEmptyLookup().

◆ DiagnoseDuplicateIvars()

void Sema::DiagnoseDuplicateIvars ( ObjCInterfaceDecl ID,
ObjCInterfaceDecl SID 
)

DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementation.

This becomes necessary 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 3773 of file SemaDeclObjC.cpp.

References Diag(), clang::Decl::getLocation(), and clang::ObjCInterfaceDecl::lookupInstanceVariable().

Referenced by ActOnAtEnd(), and ActOnFields().

◆ DiagnoseEmptyLookup()

bool Sema::DiagnoseEmptyLookup ( Scope S,
CXXScopeSpec SS,
LookupResult R,
CorrectionCandidateCallback CCC,
TemplateArgumentListInfo ExplicitTemplateArgs = nullptr,
ArrayRef< Expr * >  Args = std::nullopt,
DeclContext LookupCtx = nullptr,
TypoExpr **  Out = nullptr 
)

Diagnose an empty lookup.

Returns
false if new lookup candidates were found

Definition at line 2469 of file SemaExpr.cpp.

References clang::LookupResult::addDecl(), AddOverloadCandidate(), AddOverloadedCallCandidates(), AddTemplateOverloadCandidate(), clang::AS_none, clang::OverloadCandidateSet::BestViableFunction(), clang::LookupResult::clear(), computeDeclContext(), CorrectTypo(), CorrectTypoDelayed(), clang::CPlusPlus, clang::OverloadCandidateSet::CSK_Normal, CTK_ErrorRecovery, CurContext, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, Diag(), DiagnoseDependentMemberLookup(), diagnoseTypo(), clang::LookupResult::empty(), clang::Type::getAsCXXRecordDecl(), clang::TypoCorrection::getAsString(), clang::NestedNameSpecifier::getAsType(), clang::getAsTypeTemplateDecl(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getCorrectionDeclAs(), clang::TypoCorrection::getCorrectionSpecifier(), clang::Decl::getDeclContext(), clang::TypoCorrection::getFoundDecl(), getLangOpts(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::DeclContext::getLookupParent(), clang::LookupResult::getNameLoc(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::NamedDecl::getUnderlyingDecl(), clang::NamedDecl::isCXXClassMember(), clang::CXXScopeSpec::isEmpty(), clang::TypoCorrection::isOverloaded(), LookupQualifiedName(), clang::DeclAccessPair::make(), clang::OR_Success, PDiag(), clang::LookupResult::resolveKind(), clang::LookupResult::setLookupName(), clang::LookupResult::setNamingClass(), clang::TemplateArgumentListInfo::size(), clang::LookupResult::suppressDiagnostics(), and clang::TypoCorrection::WillReplaceSpecifier().

Referenced by ActOnIdExpression(), ActOnLambdaExpressionAfterIntroducer(), BuildRecoveryCallExpr(), and CheckCountedByAttr().

◆ 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 19266 of file SemaChecking.cpp.

References CurrentInstantiationScope, Diag(), Diags, clang::Stmt::getBeginLoc(), clang::SourceManager::getPresumedColumnNumber(), clang::NullStmt::getSemiLoc(), clang::DiagnosticsEngine::isIgnored(), ShouldDiagnoseEmptyStmtBody(), and SourceMgr.

Referenced by ActOnCompoundStmt().

◆ 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 19245 of file SemaChecking.cpp.

References CurrentInstantiationScope, Diag(), clang::NullStmt::getSemiLoc(), ShouldDiagnoseEmptyStmtBody(), and SourceMgr.

Referenced by ActOnFinishSwitchStmt(), ActOnIfStmt(), and FinishCXXForRangeStmt().

◆ DiagnoseEqualityWithExtraParens()

void Sema::DiagnoseEqualityWithExtraParens ( ParenExpr ParenE)

◆ diagnoseEquivalentInternalLinkageDeclarations()

void Sema::diagnoseEquivalentInternalLinkageDeclarations ( SourceLocation  Loc,
const NamedDecl D,
ArrayRef< const NamedDecl * >  Equiv 
)

◆ diagnoseExprIntendedAsTemplateName()

void Sema::diagnoseExprIntendedAsTemplateName ( Scope S,
ExprResult  TemplateName,
SourceLocation  Less,
SourceLocation  Greater 
)

◆ DiagnoseFunctionSpecifiers()

void Sema::DiagnoseFunctionSpecifiers ( const DeclSpec DS)

◆ DiagnoseHiddenVirtualMethods()

void Sema::DiagnoseHiddenVirtualMethods ( CXXMethodDecl MD)

Diagnose methods which overload virtual methods in a base class without overriding any.

Definition at line 10433 of file SemaDeclCXX.cpp.

References Diag(), Diags, FindHiddenVirtualMethods(), clang::Decl::getLocation(), clang::DiagnosticsEngine::isIgnored(), clang::Decl::isInvalidDecl(), and NoteHiddenVirtualMethods().

Referenced by CheckCompletedCXXClass().

◆ DiagnoseHLSLAttrStageMismatch()

void Sema::DiagnoseHLSLAttrStageMismatch ( const Attr A,
HLSLShaderAttr::ShaderType  Stage,
std::initializer_list< HLSLShaderAttr::ShaderType >  AllowedStages 
)

◆ 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() 
)

◆ DiagnoseImmediateEscalatingReason()

void Sema::DiagnoseImmediateEscalatingReason ( FunctionDecl FD)

◆ DiagnoseInvalidExplicitObjectParameterInLambda()

void Sema::DiagnoseInvalidExplicitObjectParameterInLambda ( CXXMethodDecl Method)

◆ DiagnoseInvalidJumps()

void Sema::DiagnoseInvalidJumps ( Stmt Body)

Definition at line 1031 of file JumpDiagnostics.cpp.

Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().

◆ 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 19874 of file SemaChecking.cpp.

References Diag(), clang::NamedDecl::getName(), and clang::Decl::getSourceRange().

◆ DiagnoseMissingDesignatedInitOverrides()

void Sema::DiagnoseMissingDesignatedInitOverrides ( const ObjCImplementationDecl ImplD,
const ObjCInterfaceDecl IFD 
)

◆ diagnoseMissingImport() [1/2]

void Sema::diagnoseMissingImport ( SourceLocation  Loc,
const NamedDecl Decl,
MissingImportKind  MIK,
bool  Recover = true 
)

Diagnose that the specified declaration needs to be visible but isn't, and suggest a module import that would resolve the problem.

Definition at line 5680 of file SemaLookup.cpp.

References Context, diagnoseMissingImport(), getDefinitionToImport(), clang::Decl::getLocation(), clang::ASTContext::getModulesWithMergedDefinition(), and getOwningModule().

Referenced by computeDeclContext(), diagnoseMissingArgument(), diagnoseMissingImport(), diagnoseTypo(), DiagnoseUninstantiableTemplate(), and RequireCompleteEnumDecl().

◆ diagnoseMissingImport() [2/2]

void Sema::diagnoseMissingImport ( SourceLocation  Loc,
const NamedDecl Decl,
SourceLocation  DeclLoc,
ArrayRef< Module * >  Modules,
MissingImportKind  MIK,
bool  Recover 
)

◆ diagnoseMissingTemplateArguments()

void Sema::diagnoseMissingTemplateArguments ( TemplateName  Name,
SourceLocation  Loc 
)

◆ DiagnoseMultipleMethodInGlobalPool()

void Sema::DiagnoseMultipleMethodInGlobalPool ( SmallVectorImpl< ObjCMethodDecl * > &  Methods,
Selector  Sel,
SourceRange  R,
bool  receiverIdOrClass 
)

◆ DiagnoseMultipleUserDefinedConversion()

bool Sema::DiagnoseMultipleUserDefinedConversion ( Expr From,
QualType  ToType 
)

◆ DiagnoseNonDefaultPragmaAlignPack()

void Sema::DiagnoseNonDefaultPragmaAlignPack ( PragmaAlignPackDiagnoseKind  Kind,
SourceLocation  IncludeLoc 
)

◆ DiagnoseNontrivial()

void Sema::DiagnoseNontrivial ( const CXXRecordDecl Record,
CXXSpecialMember  CSM 
)

Diagnose why the specified class does not have a trivial special member of the given kind.

Definition at line 10150 of file SemaDeclCXX.cpp.

References checkTrivialSubobjectCall(), Context, CXXCopyAssignment, CXXCopyConstructor, clang::Decl::getLocation(), clang::ASTContext::getRecordType(), TAH_IgnoreTrivialABI, and TSK_CompleteObject.

Referenced by CheckNontrivialField().

◆ 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 573 of file Sema.cpp.

References Diag(), clang::Type::getNullability(), clang::NonNull, clang::Nullable, and clang::NullableResult.

Referenced by ImpCastExprToType(), and PerformImplicitConversion().

◆ diagnoseNullResettableSynthesizedSetters()

void Sema::diagnoseNullResettableSynthesizedSetters ( const ObjCImplDecl impDecl)

◆ DiagnoseOwningPropertyGetterSynthesis()

void Sema::DiagnoseOwningPropertyGetterSynthesis ( const ObjCImplementationDecl D)

◆ DiagnosePropertyAccessorMismatch()

bool Sema::DiagnosePropertyAccessorMismatch ( ObjCPropertyDecl PD,
ObjCMethodDecl Getter,
SourceLocation  Loc 
)

◆ DiagnosePropertyMismatch()

void Sema::DiagnosePropertyMismatch ( ObjCPropertyDecl Property,
ObjCPropertyDecl SuperProperty,
const IdentifierInfo Name,
bool  OverridingProtocolProperty 
)

◆ diagnoseQualifiedDeclaration()

bool Sema::diagnoseQualifiedDeclaration ( CXXScopeSpec SS,
DeclContext DC,
DeclarationName  Name,
SourceLocation  Loc,
TemplateIdAnnotation TemplateId,
bool  IsMemberSpecialization 
)

Diagnose a declaration whose declarator-id has the given nested-name-specifier.

Parameters
SSThe nested-name-specifier of the declarator-id.
DCThe declaration context to which the nested-name-specifier resolves.
NameThe name of the entity being declared.
LocThe location of the name of the entity being declared.
IsMemberSpecializationWhether we are declaring a member specialization.
TemplateIdThe template-id, if any.
Returns
true if we cannot safely recover from this error, false otherwise.

Definition at line 6215 of file SemaDecl.cpp.

References clang::CXXScopeSpec::clear(), Context, clang::FixItHint::CreateRemoval(), CurContext, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, Diag(), clang::DeclContext::Encloses(), clang::DeclContext::Equals(), clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifierLoc::getLocalSourceRange(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), clang::DeclContext::getParent(), clang::NestedNameSpecifierLoc::getPrefix(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLoc::getSourceRange(), clang::TypeLoc::getTemplateKeywordLoc(), clang::ASTContext::getTypeDeclType(), clang::NestedNameSpecifierLoc::getTypeLoc(), clang::ASTContext::hasSameType(), clang::DeclContext::isRecord(), clang::SourceLocation::isValid(), clang::CXXScopeSpec::isValid(), LangOpts, clang::CXXScopeSpec::location_data(), clang::TemplateIdAnnotation::TemplateKWLoc, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

Referenced by ActOnClassTemplateSpecialization(), ActOnCXXMemberDeclarator(), ActOnTag(), CheckClassTemplate(), and HandleDeclarator().

◆ DiagnoseReturnInConstructorExceptionHandler()

void Sema::DiagnoseReturnInConstructorExceptionHandler ( CXXTryStmt TryBlock)

◆ DiagnoseSelfMove()

void Sema::DiagnoseSelfMove ( const Expr LHSExpr,
const Expr RHSExpr,
SourceLocation  OpLoc 
)

◆ DiagnoseSentinelCalls()

void Sema::DiagnoseSentinelCalls ( const NamedDecl D,
SourceLocation  Loc,
ArrayRef< Expr * >  Args 
)

◆ 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 8475 of file SemaDecl.cpp.

References computeShadowedDeclKind(), Diag(), getCaptureLocation(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::sema::CapturingScopeInfo::isCXXThisCaptured(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), and clang::sema::LambdaScopeInfo::ShadowingDecls.

Referenced by BuildLambdaExpr().

◆ 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 15302 of file SemaDecl.cpp.

References Context, Diag(), clang::Decl::getLocation(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::Type::isDependentType(), clang::QualType::isPODType(), LangOpts, and clang::Parameter.

Referenced by ActOnFinishFunctionBody().

◆ DiagnoseStaticAssertDetails()

void Sema::DiagnoseStaticAssertDetails ( const Expr E)

Try to print more useful information about a failed static_assert with expression \E.

Definition at line 17295 of file SemaDeclCXX.cpp.

References Context, ConvertAPValueToString(), Diag(), clang::Expr::EvaluateAsRValue(), clang::Expr::getType(), clang::Type::isBooleanType(), clang::Result, and UsefulToPrintExpr().

Referenced by BuildStaticAssertDeclaration().

◆ DiagnoseSwiftName()

bool Sema::DiagnoseSwiftName ( Decl D,
StringRef  Name,
SourceLocation  Loc,
const ParsedAttr AL,
bool  IsAsync 
)

Do a check to make sure Name looks like a legal argument for the swift_name attribute applied to decl D.

Raise a diagnostic if the name is invalid for the given declaration.

AL is used to provide caret diagnostics in case of a malformed name.

Returns
true if the name is a valid swift name for D, false otherwise.

Definition at line 6899 of file SemaDeclAttr.cpp.

References Diag(), clang::ExpectedFunctionWithProtoType, clang::Type::getPointeeType(), clang::ValueDecl::getType(), clang::QualType::isConstQualified(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::isValidAsciiIdentifier(), and validateSwiftFunctionName().

Referenced by handleSwiftAsyncName(), handleSwiftName(), and ProcessAPINotes().

◆ DiagnoseTemplateParameterShadow()

void Sema::DiagnoseTemplateParameterShadow ( SourceLocation  Loc,
Decl PrevDecl,
bool  SupportedForCompatibility = false 
)

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.

Parameters
LocThe location of the declaration that shadows a template parameter.
PrevDeclThe template parameter that the declaration shadows.
SupportedForCompatibilityWhether to issue the diagnostic as a warning for compatibility with older versions of clang. Ignored when MSVC compatibility is enabled.

Definition at line 884 of file SemaTemplate.cpp.

References Diag(), getLangOpts(), clang::Decl::isTemplateParameter(), and NoteTemplateParameterLocation().

Referenced by ActOnAliasDeclaration(), ActOnDecompositionDeclarator(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnNamespaceAliasDef(), ActOnParamDeclarator(), ActOnTag(), CheckClassTemplate(), HandleDeclarator(), HandleField(), HandleMSProperty(), and maybeDiagnoseTemplateParameterShadow().

◆ DiagnoseTypeArgsAndProtocols()

void Sema::DiagnoseTypeArgsAndProtocols ( IdentifierInfo ProtocolId,
SourceLocation  ProtocolLoc,
IdentifierInfo TypeArgId,
SourceLocation  TypeArgLoc,
bool  SelectProtocolFirst = false 
)

Definition at line 1418 of file SemaDeclObjC.cpp.

References Diag().

Referenced by actOnObjCTypeArgsOrProtocolQualifiers().

◆ diagnoseTypo() [1/2]

void Sema::diagnoseTypo ( const TypoCorrection Correction,
const PartialDiagnostic TypoDiag,
bool  ErrorRecovery = true 
)

◆ 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
CorrectionThe result of performing typo correction.
TypoDiagThe diagnostic to produce. This will have the corrected string added to it (and usually also a fixit).
PrevNoteA note to use when indicating the location of the entity to which we are correcting. Will have the correction string added to it.
ErrorRecoveryIf 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 5825 of file SemaLookup.cpp.

References clang::FixItHint::CreateReplacement(), Declaration, Diag(), diagnoseMissingImport(), clang::TypoCorrection::getAsString(), clang::SourceRange::getBegin(), clang::TypoCorrection::getCorrectionRange(), clang::PartialDiagnostic::getDiagID(), clang::TypoCorrection::getExtraDiagnostics(), clang::TypoCorrection::getFoundDecl(), getLangOpts(), clang::TypoCorrection::getQuoted(), clang::TypoCorrection::isKeyword(), and clang::TypoCorrection::requiresImport().

◆ diagnoseUnavailableAlignedAllocation()

void Sema::diagnoseUnavailableAlignedAllocation ( const FunctionDecl FD,
SourceLocation  Loc 
)

◆ DiagnoseUnexpandedParameterPack() [1/6]

bool Sema::DiagnoseUnexpandedParameterPack ( const CXXScopeSpec SS,
UnexpandedParameterPackContext  UPPC 
)

If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error.

Parameters
SSThe nested-name-specifier that is being checked for unexpanded parameter packs.
Returns
true if an error occurred, false otherwise.

Definition at line 450 of file SemaTemplateVariadic.cpp.

References clang::NestedNameSpecifier::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getRange(), and clang::CXXScopeSpec::getScopeRep().

◆ DiagnoseUnexpandedParameterPack() [2/6]

bool Sema::DiagnoseUnexpandedParameterPack ( const DeclarationNameInfo NameInfo,
UnexpandedParameterPackContext  UPPC 
)

◆ DiagnoseUnexpandedParameterPack() [3/6]

bool Sema::DiagnoseUnexpandedParameterPack ( Expr E,
UnexpandedParameterPackContext  UPPC = UPPC_Expression 
)

If the given expression contains an unexpanded parameter pack, diagnose the error.

Parameters
EThe expression that is being checked for unexpanded parameter packs.
Returns
true if an error occurred, false otherwise.

Definition at line 406 of file SemaTemplateVariadic.cpp.

References clang::Expr::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::Stmt::getBeginLoc(), and getEnclosingLambda().

◆ DiagnoseUnexpandedParameterPack() [4/6]

bool Sema::DiagnoseUnexpandedParameterPack ( SourceLocation  Loc,
TemplateName  Template,
UnexpandedParameterPackContext  UPPC 
)

If the given template name contains an unexpanded parameter pack, diagnose the error.

Parameters
LocThe location of the template name.
TemplateThe template name that is being checked for unexpanded parameter packs.
Returns
true if an error occurred, false otherwise.

Definition at line 503 of file SemaTemplateVariadic.cpp.

References clang::TemplateName::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), and clang::TemplateName::isNull().

◆ DiagnoseUnexpandedParameterPack() [5/6]

bool Sema::DiagnoseUnexpandedParameterPack ( SourceLocation  Loc,
TypeSourceInfo T,
UnexpandedParameterPackContext  UPPC 
)

If the given type contains an unexpanded parameter pack, diagnose the error.

Parameters
LocThe source location where a diagnostc should be emitted.
TThe type that is being checked for unexpanded parameter packs.
Returns
true if an error occurred, false otherwise.

Definition at line 390 of file SemaTemplateVariadic.cpp.

References clang::Type::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TypeSourceInfo::getType(), and clang::TypeSourceInfo::getTypeLoc().

Referenced by ActOnAliasDeclaration(), ActOnBaseSpecifier(), ActOnBlockArguments(), ActOnCaseExpr(), ActOnClassTemplateSpecialization(), ActOnConceptDefinition(), ActOnCXXForRangeStmt(), ActOnDecompositionDeclarator(), ActOnExceptionDeclarator(), ActOnFinishCXXInClassMemberInitializer(), ActOnFinishFullExpr(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnLambdaExpressionAfterIntroducer(), ActOnNonTypeTemplateParameter(), ActOnParamDefaultArgument(), ActOnRequiresClause(), ActOnStaticAssertDeclaration(), ActOnTag(), ActOnTemplateTemplateParameter(), ActOnTypeParameter(), ActOnUsingDeclaration(), ActOnVarTemplateSpecialization(), AddInitializerToDecl(), BuildBaseInitializer(), BuildMemberInitializer(), BuildReturnStmt(), BuildTypeConstraint(), checkAMDGPUMaxNumWorkGroupsArguments(), checkAMDGPUWavesPerEUArguments(), CheckEnumConstant(), checkExceptionSpecification(), CheckMicrosoftIfExistsSymbol(), CheckTemplateParameterList(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), getLambdaType(), handleAlignedAttr(), HandleDeclarator(), HandleField(), HandleMSProperty(), InventTemplateParameter(), makeLaunchBoundsArgExpr(), and VerifyBitField().

◆ DiagnoseUnexpandedParameterPack() [6/6]

bool Sema::DiagnoseUnexpandedParameterPack ( TemplateArgumentLoc  Arg,
UnexpandedParameterPackContext  UPPC 
)

If the given template argument contains an unexpanded parameter pack, diagnose the error.

Parameters
ArgThe template argument that is being checked for unexpanded parameter packs.
Returns
true if an error occurred, false otherwise.

Definition at line 517 of file SemaTemplateVariadic.cpp.

References clang::TemplateArgument::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgumentLoc::getLocation(), and clang::TemplateArgument::isNull().

◆ DiagnoseUnexpandedParameterPackInRequiresExpr()

bool Sema::DiagnoseUnexpandedParameterPackInRequiresExpr ( RequiresExpr RE)

If the given requirees-expression contains an unexpanded reference to one of its own parameter packs, diagnose the error.

Parameters
REThe requiress-expression that is being checked for unexpanded parameter packs.
Returns
true if an error occurred, false otherwise.

Definition at line 427 of file SemaTemplateVariadic.cpp.

References clang::Expr::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::RequiresExpr::getBeginLoc(), clang::RequiresExpr::getLocalParameters(), and UPPC_Requirement.

Referenced by ActOnRequiresExpr().

◆ 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
LocThe location at which we should emit the diagnostic.
UPPCThe context in which we are diagnosing unexpanded parameter packs.
Unexpandedthe set of unexpanded parameter packs.
Returns
true if an error occurred, false otherwise.

Definition at line 300 of file SemaTemplateVariadic.cpp.

References clang::declaresSameEntity(), Diag(), clang::Func, FunctionScopes, getEnclosingLambda(), getIdentifier(), and int.

Referenced by checkExceptionSpecification(), CheckTemplateParameterList(), DiagnoseUnexpandedParameterPack(), and DiagnoseUnexpandedParameterPackInRequiresExpr().

◆ DiagnoseUnguardedAvailabilityViolations()

void Sema::DiagnoseUnguardedAvailabilityViolations ( Decl FD)

Issue any -Wunguarded-availability warnings in FD.

Definition at line 927 of file SemaAvailability.cpp.

References clang::Decl::getAsFunction().

Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().

◆ DiagnoseUnimplementedProperties()

void Sema::DiagnoseUnimplementedProperties ( Scope S,
ObjCImplDecl IMPDecl,
ObjCContainerDecl CDecl,
bool  SynthesizeProperties 
)

◆ DiagnoseUninstantiableTemplate()

bool Sema::DiagnoseUninstantiableTemplate ( SourceLocation  PointOfInstantiation,
NamedDecl Instantiation,
bool  InstantiatedFromMember,
const NamedDecl Pattern,
const NamedDecl PatternDef,
TemplateSpecializationKind  TSK,
bool  Complain = true 
)

◆ DiagnoseUnknownTemplateName()

bool Sema::DiagnoseUnknownTemplateName ( const IdentifierInfo II,
SourceLocation  IILoc,
Scope S,
const CXXScopeSpec SS,
TemplateTy SuggestedTemplate,
TemplateNameKind SuggestedKind 
)

◆ DiagnoseUnknownTypeName()

void Sema::DiagnoseUnknownTypeName ( IdentifierInfo *&  II,
SourceLocation  IILoc,
Scope S,
CXXScopeSpec SS,
ParsedType SuggestedType,
bool  IsTemplateName = false 
)

◆ DiagnoseUnsatisfiedConstraint() [1/2]

void Sema::DiagnoseUnsatisfiedConstraint ( const ASTConstraintSatisfaction Satisfaction,
bool  First = true 
)

Emit diagnostics explaining why a constraint expression was deemed unsatisfied.

Definition at line 1196 of file SemaConcept.cpp.

References diagnoseUnsatisfiedConstraintExpr(), clang::First, and clang::ASTConstraintSatisfaction::IsSatisfied.

◆ DiagnoseUnsatisfiedConstraint() [2/2]

void Sema::DiagnoseUnsatisfiedConstraint ( const ConstraintSatisfaction Satisfaction,
bool  First = true 
)

◆ DiagnoseUnterminatedOpenMPDeclareTarget()

void Sema::DiagnoseUnterminatedOpenMPDeclareTarget ( )

Report unterminated 'omp declare target' or 'omp begin declare target' at the end of a compilation unit.

Definition at line 23308 of file SemaOpenMP.cpp.

References Diag(), clang::Sema::DeclareTargetContextInfo::Kind, and clang::Sema::DeclareTargetContextInfo::Loc.

Referenced by ActOnEndOfTranslationUnit().

◆ DiagnoseUnterminatedPragmaAlignPack()

void Sema::DiagnoseUnterminatedPragmaAlignPack ( )

◆ DiagnoseUnterminatedPragmaAttribute()

void Sema::DiagnoseUnterminatedPragmaAttribute ( )

Definition at line 1133 of file SemaAttr.cpp.

References Diag(), and PragmaAttributeStack.

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 5347 of file SemaDeclObjC.cpp.

References DIAG, Diag(), Diags, GetIvarBackingPropertyAccessor(), clang::Decl::getLocation(), clang::ObjCContainerDecl::instance_methods(), clang::DiagnosticsEngine::isIgnored(), and clang::Decl::isReferenced().

Referenced by ActOnAtEnd().

◆ DiagnoseUnusedButSetDecl()

void Sema::DiagnoseUnusedButSetDecl ( const VarDecl VD,
DiagReceiverTy  DiagReceiver 
)

◆ DiagnoseUnusedDecl() [1/2]

void Sema::DiagnoseUnusedDecl ( const NamedDecl ND)

◆ DiagnoseUnusedDecl() [2/2]

void Sema::DiagnoseUnusedDecl ( const NamedDecl ND,
DiagReceiverTy  DiagReceiver 
)

DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused).

Definition at line 2120 of file SemaDecl.cpp.

References Context, GenerateFixForUnusedDecl(), getLangOpts(), clang::Decl::getLocation(), PDiag(), ShouldDiagnoseUnusedDecl(), and UnusedLocalTypedefNameCandidates.

◆ DiagnoseUnusedExprResult()

void Sema::DiagnoseUnusedExprResult ( const Stmt S,
unsigned  DiagID 
)

◆ DiagnoseUnusedLambdaCapture()

bool Sema::DiagnoseUnusedLambdaCapture ( SourceRange  CaptureRange,
const sema::Capture From 
)

◆ DiagnoseUnusedNestedTypedefs() [1/2]

void Sema::DiagnoseUnusedNestedTypedefs ( const RecordDecl D)

Definition at line 2095 of file SemaDecl.cpp.

References Diag(), and DiagnoseUnusedNestedTypedefs().

Referenced by ActOnPopScope(), and DiagnoseUnusedNestedTypedefs().

◆ DiagnoseUnusedNestedTypedefs() [2/2]

void Sema::DiagnoseUnusedNestedTypedefs ( const RecordDecl D,
DiagReceiverTy  DiagReceiver 
)

◆ DiagnoseUnusedParameters()

void Sema::DiagnoseUnusedParameters ( ArrayRef< ParmVarDecl * >  Parameters)

Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.

Definition at line 15286 of file SemaDecl.cpp.

References Diag(), inTemplateInstantiation(), and clang::Parameter.

Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().

◆ DiagnoseUseOfDecl()

bool Sema::DiagnoseUseOfDecl ( NamedDecl D,
ArrayRef< SourceLocation Locs,
const ObjCInterfaceDecl UnknownObjCClass = nullptr,
bool  ObjCPropertyAccess = false,
bool  AvoidPartialAvailabilityChecks = false,
ObjCInterfaceDecl ClassReceiver = nullptr,
bool  SkipTrailingRequiresClause = false 
)

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 224 of file SemaExpr.cpp.

References CheckCUDACall(), CheckFunctionConstraints(), checkTypeSupport(), clang::DeclContext::containsDecl(), Context, clang::CPlusPlus, clang::CPlusPlus14, clang::CUDA, CurContext, DeduceReturnType(), Diag(), diagnoseArgIndependentDiagnoseIfAttrs(), DiagnoseAvailabilityOfDecl(), diagnoseUnavailableAlignedAllocation(), DiagnoseUnsatisfiedConstraint(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), clang::LangOptionsBase::FEM_UnsetOnCommandLine, clang::ObjCPropertyDecl::findPropertyDecl(), clang::Decl::getCanonicalDecl(), getCurFunction(), clang::Preprocessor::getCurrentFPEvalMethod(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Preprocessor::getLastFPEvalPragmaLocation(), clang::Decl::getLocation(), clang::NamedDecl::getName(), getOpenMPDeclareMapperVarName(), clang::ASTContext::getTargetInfo(), clang::Decl::hasAttr(), clang::sema::FunctionScopeInfo::HasOMPDeclareReductionCombiner, isOpenMPDeclareMapperVarDeclAllowed(), clang::ConstraintSatisfaction::IsSatisfied, clang::TargetInfo::isTLSSupported(), isUnevaluatedContext(), clang::SourceLocation::isValid(), LangOpts, NoteDeletedFunction(), ParsingInitForAutoVars, PP, SuppressedDiagnostics, targetDiag(), and clang::VarDecl::TLS_None.

Referenced by ActOnClassPropertyRefExpr(), ActOnCXXDelete(), ActOnDecltypeExpression(), ActOnLambdaExpressionAfterIntroducer(), ActOnNamespaceAliasDef(), actOnObjCTypeArgsOrProtocolQualifiers(), ActOnSuperClassOfClassInterface(), ActOnUsingDirective(), BuildClassMessage(), BuildCXXCastArgument(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildDeclarationNameExpr(), BuildInstanceMessage(), BuildIvarRefExpr(), BuildMemberReferenceExpr(), BuildObjCBoxedExpr(), BuildTypeofExprType(), CheckCXXThrowOperand(), CheckDestructor(), checkDestructorReference(), CheckParmsForFunctionDef(), CheckTemplateArgument(), CheckTemplateIdType(), ClassifyName(), ConvertDeclSpecToType(), CreateFunctionRefExpr(), DeduceTemplateSpecializationFromInitializer(), DiagnoseUseOfOverloadedDecl(), diagnoseUseOfProtocols(), FinalizeVarWithDestructor(), FindProtocolDeclaration(), FinishOverloadedCallExpr(), getConstructorName(), GetEnumUnderlyingType(), getObjCMessageKind(), getTypeName(), HandleExprPropertyRefExpr(), LookupMemberExpr(), MarkBaseAndMemberDestructorsReferenced(), MarkVirtualBaseDestructorsReferenced(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformImplicitConversion(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), and SetDelegatingInitializer().

◆ DiagnoseUseOfOverloadedDecl()

bool clang::Sema::DiagnoseUseOfOverloadedDecl ( NamedDecl D,
SourceLocation  Loc 
)
inline

Definition at line 5394 of file Sema.h.

References DiagnoseUseOfDecl().

Referenced by BuildCXXConstructExpr().

◆ DiagnoseUseOfUnimplementedSelectors()

void Sema::DiagnoseUseOfUnimplementedSelectors ( )

◆ diagnoseZeroToNullptrConversion()

void Sema::diagnoseZeroToNullptrConversion ( CastKind  Kind,
const Expr E 
)

◆ DiagPlaceholderFieldDeclDefinitions()

void Sema::DiagPlaceholderFieldDeclDefinitions ( RecordDecl Record)

Emit diagnostic warnings for placeholder members.

We can only do that after the class is fully constructed, as anonymous union/structs can insert placeholders in their parent scope (which might be a Record).

Definition at line 5396 of file SemaDecl.cpp.

References clang::CPlusPlus, DiagPlaceholderVariableDefinition(), clang::First, getLangOpts(), clang::Decl::getLocation(), and clang::NamedDecl::isPlaceholderVar().

Referenced by ActOnDefinedDeclarationSpecifier().

◆ DiagPlaceholderVariableDefinition()

void Sema::DiagPlaceholderVariableDefinition ( SourceLocation  Loc)

◆ DiagRedefinedPlaceholderFieldDecl()

bool Sema::DiagRedefinedPlaceholderFieldDecl ( SourceLocation  Loc,
RecordDecl ClassDecl,
const IdentifierInfo Name 
)

◆ DiagRuntimeBehavior() [1/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 20982 of file SemaExpr.cpp.

References ConstantEvaluated, DiagIfReachable(), DiscardedStatement, ExprEvalContexts, ImmediateFunctionContext, PotentiallyEvaluated, PotentiallyEvaluatedIfUsed, Unevaluated, UnevaluatedAbstract, and UnevaluatedList.

◆ DiagRuntimeBehavior() [2/2]

bool Sema::DiagRuntimeBehavior ( SourceLocation  Loc,
const Stmt Statement,
const PartialDiagnostic PD 
)

Conditionally issue a diagnostic based on the current evaluation context.

Parameters
StatementIf 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 21009 of file SemaExpr.cpp.

References DiagRuntimeBehavior().

Referenced by AnalyzeComparison(), BuildVAArgExpr(), CheckForNullPointerDereference(), CheckImplicitConversion(), CheckNonNullArgument(), CheckTautologicalComparison(), checkVariadicArgument(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseFloatingImpCast(), DiagnoseImpCast(), diagnoseSubtractionOnNullPointer(), diagnoseTautologicalComparison(), DiagRuntimeBehavior(), and LookupMemberExpr().

◆ DiscardCleanupsInEvaluationContext()

void Sema::DiscardCleanupsInEvaluationContext ( )

◆ 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 19887 of file SemaChecking.cpp.

References Context, clang::Type::getPointeeType(), clang::ASTContext::getTypeAlignInChars(), clang::Expr::IgnoreParens(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Type::isIntegerType(), and clang::Type::isPointerType().

Referenced by ActOnCastExpr(), BuildCXXNamedCast(), CheckImplicitConversion(), and clang::InitializationSequence::Perform().

◆ emitAndClearUnusedLocalTypedefWarnings()

void Sema::emitAndClearUnusedLocalTypedefWarnings ( )

Definition at line 1020 of file Sema.cpp.

References Diag(), and UnusedLocalTypedefNameCandidates.

Referenced by ActOnEndOfTranslationUnit().

◆ EmitCurrentDiagnostic()

void Sema::EmitCurrentDiagnostic ( unsigned  DiagID)

◆ emitDeferredDiags()

void Sema::emitDeferredDiags ( )

Definition at line 1807 of file Sema.cpp.

References DeviceDeferredDiags, and LangOpts.

Referenced by ActOnEndOfTranslationUnitFragment().

◆ EmitRelatedResultTypeNote()

void Sema::EmitRelatedResultTypeNote ( const Expr E)

◆ 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 1656 of file SemaExprObjC.cpp.

References Context, CurContext, Diag(), findExplicitInstancetypeDeclarer(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::ASTContext::getObjCInstanceType(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::hasRelatedResultType(), clang::ASTContext::hasSameUnqualifiedType(), and clang::SourceLocation::isInvalid().

Referenced by DiagnoseAssignmentResult(), and emitBadConversionNotes().

◆ EndOpenMPClause()

void Sema::EndOpenMPClause ( )

End analysis of clauses.

Definition at line 2788 of file SemaOpenMP.cpp.

References CleanupVarDeclMarking(), and DSAStack.

◆ EndOpenMPDSABlock()

void Sema::EndOpenMPDSABlock ( Stmt CurDirective)

◆ EnsureTemplateArgumentListConstraints()

bool Sema::EnsureTemplateArgumentListConstraints ( TemplateDecl Template,
const MultiLevelTemplateArgumentList 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
TemplateThe template to which the template arguments are being provided.
TemplateArgsThe converted, canonicalized template arguments.
TemplateIDRangeThe 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 888 of file SemaConcept.cpp.

References CheckConstraintSatisfaction(), Diag(), DiagnoseUnsatisfiedConstraint(), clang::TemplateDecl::getAssociatedConstraints(), clang::SourceRange::getBegin(), clang::MultiLevelTemplateArgumentList::getInnermost(), getTemplateArgumentBindingsText(), getTemplateNameKindForDiagnostics(), clang::TemplateDecl::getTemplateParameters(), int, and clang::ConstraintSatisfaction::IsSatisfied.

Referenced by CheckTemplateArgumentList().

◆ 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 1359 of file SemaDecl.cpp.

References CurContext, EnterTemplatedContext(), clang::Scope::getEntity(), and clang::Scope::getParent().

Referenced by ActOnCXXEnterDeclaratorScope(), and ActOnCXXEnterDeclInitializer().

◆ EnterTemplatedContext()

void Sema::EnterTemplatedContext ( Scope S,
DeclContext DC 
)

Enter a template parameter scope, after it's been associated with a particular DeclContext.

Causes lookup within the scope to chain through enclosing contexts in the correct order.

Definition at line 1407 of file SemaDecl.cpp.

References clang::DeclContext::getLookupParent(), and getTemplateDepth().

Referenced by ActOnReenterTemplateScope(), and EnterDeclaratorContext().

◆ 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 308 of file SemaCUDA.cpp.

References IdentifyCUDAPreference().

Referenced by FindAllocationFunctions().

◆ EvaluateConvertedConstantExpression()

ExprResult Sema::EvaluateConvertedConstantExpression ( Expr E,
QualType  T,
APValue Value,
Sema::CCEKind  CCE,
bool  RequireInt,
const APValue PreNarrowingValue 
)

◆ EvaluateImplicitExceptionSpec()

void Sema::EvaluateImplicitExceptionSpec ( SourceLocation  Loc,
FunctionDecl FD 
)

Evaluate the implicit exception specification for a defaulted special member function.

Definition at line 7662 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), computeImplicitExceptionSpec(), clang::EST_Unevaluated, clang::FunctionProtoType::getExceptionSpecType(), clang::ValueDecl::getType(), and UpdateExceptionSpec().

Referenced by ResolveExceptionSpec().

◆ EvaluateStaticAssertMessageAsString()

bool Sema::EvaluateStaticAssertMessageAsString ( Expr Message,
std::string &  Result,
ASTContext Ctx,
bool  ErrorOnInvalidMessage 
)

◆ ExitDeclaratorContext()

void Sema::ExitDeclaratorContext ( Scope S)

◆ ExpandFunctionLocalPredefinedMacros()

std::vector< Token > Sema::ExpandFunctionLocalPredefinedMacros ( ArrayRef< Token Toks)

◆ ExtractUnqualifiedFunctionType()

QualType Sema::ExtractUnqualifiedFunctionType ( QualType  PossiblyAFunctionType)

◆ FillInlineAsmIdentifierInfo()

void Sema::FillInlineAsmIdentifierInfo ( Expr Res,
llvm::InlineAsmIdentifierInfo &  Info 
)

◆ FilterAcceptableTemplateNames()

void Sema::FilterAcceptableTemplateNames ( LookupResult R,
bool  AllowFunctionTemplates = true,
bool  AllowDependent = true 
)

◆ FilterLookupForScope()

void Sema::FilterLookupForScope ( LookupResult R,
DeclContext Ctx,
Scope S,
bool  ConsiderLinkage,
bool  AllowInlineNamespace 
)

◆ FilterUsingLookup()

void Sema::FilterUsingLookup ( Scope S,
LookupResult Previous 
)

Remove decls we can't actually see from a lookup being used to declare shadow using decls.

Parameters
S- The scope of the potential shadow decl
Previous- The lookup of a potential shadow decl's name.

Definition at line 12835 of file SemaDeclCXX.cpp.

References CurContext, clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::Decl::getIdentifierNamespace(), clang::LookupResult::Filter::hasNext(), clang::Decl::IDNS_Ordinary, isDeclInScope(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isLocalExternDecl(), clang::LookupResult::Filter::next(), and Previous.

Referenced by BuildUsingDeclaration(), and BuildUsingEnumDeclaration().

◆ FinalizeDeclaration()

void Sema::FinalizeDeclaration ( Decl D)

FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions necessary after any initializer has been attached.

Definition at line 14793 of file SemaDecl.cpp.

References clang::Decl::addAttr(), AddPushedVisibilityAttribute(), checkAllowedCUDAInitializer(), checkAttributesAfterMerging(), CheckStaticLocalForDllExport(), CheckThreadLocalForLargeAlignment(), Context, clang::CUDA, Diag(), clang::Decl::dropAttr(), FinalizeDeclaration(), clang::Decl::getAttr(), clang::Decl::getDeclContext(), clang::getDLLAttr(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::VarDecl::getInit(), clang::Expr::getIntegerConstantExpr(), getLangOpts(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::Decl::getParentFunctionOrMethod(), clang::DeclContext::getRedeclContext(), clang::Stmt::getSourceRange(), clang::VarDecl::getTLSKind(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasGlobalStorage(), inTemplateInstantiation(), clang::NamedDecl::isExternallyVisible(), clang::DeclContext::isFileContext(), clang::VarDecl::isFileVarDecl(), clang::Attr::isInherited(), clang::Type::isIntegralOrEnumerationType(), clang::VarDecl::isOutOfLine(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isStaticLocal(), clang::VarDecl::isThisDeclarationADefinition(), LangOpts, MarkUnusedFileScopedDecl(), ParsingInitForAutoVars, PragmaClangBSSSection, PragmaClangDataSection, PragmaClangRelroSection, PragmaClangRodataSection, clang::Sema::PragmaClangSection::PragmaLocation, RegisterTypeTagForDatatype(), clang::Sema::PragmaClangSection::SectionName, clang::Decl::setInvalidDecl(), clang::Decl::specific_attrs(), and clang::Sema::PragmaClangSection::Valid.

Referenced by ActOnCXXForRangeIdentifier(), FinalizeDeclaration(), and FinishForRangeVarDecl().

◆ FinalizeDeclaratorGroup()

Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup ( Scope S,
const DeclSpec DS,
ArrayRef< Decl * >  Group 
)

◆ finalizeOpenMPDelayedAnalysis()

void Sema::finalizeOpenMPDelayedAnalysis ( const FunctionDecl Caller,
const FunctionDecl Callee,
SourceLocation  Loc 
)

Finishes analysis of the deferred functions calls that may be declared as host/nohost during device/host compilation.

Definition at line 2719 of file SemaOpenMP.cpp.

References Diag(), getLangOpts(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::getOpenMPSimpleClauseTypeName(), and LangOpts.

◆ FinalizeVarWithDestructor()

void Sema::FinalizeVarWithDestructor ( VarDecl VD,
const RecordType DeclInitType 
)

◆ 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 2679 of file SemaExprCXX.cpp.

References adjustCCAndNoReturn(), AFS_Class, AFS_Global, clang::AS_public, clang::LookupResult::begin(), clang::Type::castAs(), CheckAllocationAccess(), clang::LookupResult::clear(), Context, clang::CPlusPlus11, clang::CUDA, clang::ASTContext::DeclarationNames, DeclareGlobalNewDelete(), DeduceTemplateArguments(), Diag(), Diagnose, clang::LookupResult::empty(), clang::LookupResult::end(), EraseUnwantedCUDAMatches(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getBaseElementType(), getCurFunctionDecl(), clang::DeclarationNameTable::getCXXOperatorName(), clang::DeclarationName::getCXXOverloadedOperator(), clang::RecordType::getDecl(), clang::NamedDecl::getDeclName(), clang::ASTContext::getFunctionType(), getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getNamingClass(), clang::ASTContext::getSizeType(), getStdAlignValT(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::getTypeSize(), hasNewExtendedAlignment(), clang::ASTContext::hasSameType(), clang::LookupResult::isAmbiguous(), clang::Decl::isImplicit(), isNonPlacementDeallocationFunction(), clang::Type::isRecordType(), clang::FunctionDecl::isVariadic(), LookupOrdinaryName, LookupQualifiedName(), clang::DeclAccessPair::make(), clang::LookupResult::makeFilter(), clang::FunctionDecl::param_size(), resolveAllocationOverload(), resolveDeallocationOverload(), clang::Success, clang::LookupResult::suppressDiagnostics(), clang::FunctionProtoType::ExtProtoInfo::Variadic, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.

Referenced by BuildCXXNew().

◆ 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 3261 of file SemaLookup.cpp.

References addAssociatedClassesAndNamespaces(), Context, clang::OverloadExpr::decls(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::Decl::getAsFunction(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::ASTContext::OverloadTy, and clang::Result.

Referenced by ArgumentDependentLookup(), argumentDependentLookup(), and DiagnoseTwoPhaseLookup().

◆ FindCompositeObjCPointerType()

QualType Sema::FindCompositeObjCPointerType ( ExprResult LHS,
ExprResult RHS,
SourceLocation  QuestionLoc 
)

◆ 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
LocThe location of the operator requiring these two expressions to be converted to the composite pointer type.
ConvertArgsIf 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 7006 of file SemaExprCXX.cpp.

References clang::Class, Context, clang::CPlusPlus, clang::CPlusPlus17, clang::CPlusPlus20, clang::InitializationKind::CreateCopy(), clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::Qualifiers::fromCVRUMask(), clang::ActionResult< PtrTy, Compress >::get(), clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::MemberPointerType::getClass(), clang::ASTContext::getCommonSugaredType(), clang::ASTContext::getConstantArrayType(), clang::Qualifiers::getCVRUQualifiers(), clang::ArrayType::getElementType(), clang::ASTContext::getFunctionType(), clang::ASTContext::getIncompleteArrayType(), getLangOpts(), clang::ASTContext::getMemberPointerType(), clang::FunctionType::ExtInfo::getNoReturn(), clang::Qualifiers::getObjCGCAttr(), clang::Qualifiers::getObjCLifetime(), 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::Qualifiers::isAddressSpaceSupersetOf(), clang::Type::isAnyPointerType(), IsDerivedFrom(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjectType(), clang::isPtrSizeAddressSpace(), clang::Type::isVoidPointerType(), clang::Type::isVoidType(), clang::ASTContext::mergeExceptionSpecs(), clang::Expr::NPC_ValueDependentIsNull, clang::InitializationSequence::Perform(), Pointer, clang::Qualifiers::setAddressSpace(), clang::Qualifiers::setObjCGCAttr(), clang::Qualifiers::setObjCLifetime(), and clang::FunctionType::ExtInfo::withNoReturn().

Referenced by convertPointersToCompositeType(), CXXCheckConditionalOperands(), and FindCompositePointerType().

◆ FindCompositePointerType() [2/2]

QualType clang::Sema::FindCompositePointerType ( SourceLocation  Loc,
ExprResult E1,
ExprResult E2,
bool  ConvertArgs = true 
)
inline

◆ FindDeallocationFunction()

bool Sema::FindDeallocationFunction ( SourceLocation  StartLoc,
CXXRecordDecl RD,
DeclarationName  Name,
FunctionDecl *&  Operator,
bool  Diagnose = true,
bool  WantSize = false,
bool  WantAligned = false 
)

◆ FindDeallocationFunctionForDestructor()

FunctionDecl * Sema::FindDeallocationFunctionForDestructor ( SourceLocation  StartLoc,
CXXRecordDecl RD 
)

◆ 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 4252 of file SemaTemplate.cpp.

References collectConjunctionTerms(), ConstantEvaluated, Context, getPrintingPolicy(), clang::Expr::IgnoreParenImpCasts(), lookThroughRangesV3Condition(), PP, clang::PrintingPolicy::PrintCanonicalTypes, and clang::Stmt::printPretty().

Referenced by BuildStaticAssertDeclaration(), CheckTemplateIdType(), and CheckTypenameType().

◆ 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 393 of file SemaCXXScopeSpec.cpp.

References clang::NestedNameSpecifier::getAsIdentifier(), clang::LookupResult::getFoundDecl(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Identifier, isAcceptableNestedNameSpecifier(), clang::LookupResult::isAmbiguous(), clang::LookupResult::isSingleResult(), LookupName(), LookupNestedNameSpecifierName, and clang::Result.

Referenced by ActOnMemberAccessExpr().

◆ FindHiddenVirtualMethods()

void Sema::FindHiddenVirtualMethods ( CXXMethodDecl MD,
SmallVectorImpl< CXXMethodDecl * > &  OverloadedMethods 
)

◆ findInheritingConstructor()

CXXConstructorDecl * Sema::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.

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 14098 of file SemaDeclCXX.cpp.

References clang::DeclContext::addDecl(), clang::Type::castAs(), clang::TypeLoc::castAs(), clang::Constexpr, Context, clang::CXXConstructorDecl::Create(), clang::ParmVarDecl::Create(), CXXDefaultConstructor, clang::declaresSameEntity(), defaultedSpecialMemberIsConstexpr(), clang::EST_Unevaluated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::Decl::getAccess(), clang::FunctionDecl::getConstexprKind(), getCurFPFeatures(), clang::NamedDecl::getDeclName(), clang::CXXConstructorDecl::getExplicitSpecifier(), clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Decl::getLocation(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionProtoType::getParamType(), clang::FunctionProtoType::getParamTypes(), clang::ConstructorUsingShadowDecl::getParent(), clang::FunctionType::getReturnType(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLoc::IgnoreParens(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::DeclContext::lookup(), mergeDeclAttributes(), clang::SC_None, clang::Decl::setAccess(), SetDeclDeleted(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), clang::FunctionTypeLoc::setParam(), clang::FunctionDecl::setParams(), clang::ParmVarDecl::setScopeInfo(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), clang::FunctionProtoType::ExceptionSpecInfo::Type, and clang::Unspecified.

Referenced by BuildCXXConstructExpr(), 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 6109 of file SemaTemplateInstantiateDecl.cpp.

References FindInstantiatedDecl().

Referenced by FindInstantiatedDecl(), 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>;
static Decl::Kind getKind(const Decl *D)
Definition: DeclBase.cpp:1110

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 6157 of file SemaTemplateInstantiateDecl.cpp.

References clang::TemplateArgumentListInfo::addArgument(), ArgumentPackSubstitutionIndex, clang::DeclContextLookupResult::begin(), clang::Sema::CodeSynthesisContext::BuildingDeductionGuides, CheckTemplateIdType(), ClassTemplate, CodeSynthesisContexts, Context, CurContext, CurrentInstantiationScope, clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), Diag(), clang::DeclContextLookupResult::end(), clang::Enum, clang::DeclContext::Equals(), FindInstantiatedContext(), FindInstantiatedDecl(), findInstantiationOf(), clang::LocalInstantiationScope::findInstantiationOf(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::RecordType::getDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Decl::getFriendObjectKind(), clang::MultiLevelTemplateArgumentList::getInnermost(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::Decl::getNonTransparentDeclContext(), clang::MultiLevelTemplateArgumentList::getNumRetainedOuterLevels(), clang::DeclContext::getParent(), clang::TemplateDecl::getTemplateParameters(), clang::EnumDecl::getTemplateSpecializationKind(), clang::CXXRecordDecl::getTemplateSpecializationKind(), getTrivialTemplateArgumentLoc(), clang::ASTContext::getTypeDeclType(), hasUncompilableErrorOccurred(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::TagType::isBeingDefined(), isDependentContextAtLevel(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), isInstantiationOf(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::DeclContext::lookup(), clang::TemplateArgument::Pack, RequireCompleteType(), clang::Result, clang::TemplateParameterList::size(), SubstDecl(), SubstDeclarationNameInfo(), clang::TSK_ExplicitSpecialization, and usesPartialOrExplicitSpecialization().

Referenced by BuildVariableInstantiation(), FindInstantiatedContext(), FindInstantiatedDecl(), HandleDependentAccessCheck(), InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::SubstDefaultedFunction(), SubstParmVarDecl(), clang::TemplateDeclInstantiator::VisitBaseUsingDecls(), 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 6738 of file SemaDecl.cpp.

References Context, clang::ASTContext::getExternCContextDecl(), clang::DeclContext::lookup(), and clang::Result.

Referenced by checkForConflictWithNonVisibleExternC(), checkGlobalOrExternCConflict(), and ImplicitlyDefineFunction().

◆ 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 2094 of file Sema.cpp.

References clang::SourceManager::getExpansionLoc(), getPreprocessor(), getSourceManager(), and clang::SourceLocation::isMacroID().

Referenced by AnalyzeBitFieldAssignment(), diagnoseBadTypeAttribute(), DiagnoseConditionalForNull(), DiagnoseUnusedExprResult(), and 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 1316 of file SemaDeclObjC.cpp.

References CorrectTypo(), CTK_ErrorRecovery, Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::TypoCorrection::getCorrectionDeclAs(), clang::ObjCProtocolDecl::getDefinition(), clang::Decl::getLocation(), clang::ObjCProtocolDecl::isThisDeclarationADefinition(), LookupObjCProtocolName, LookupProtocol(), NestedProtocolHasNoDefinition(), PDiag(), and TUScope.

◆ FindUsualDeallocationFunction()

FunctionDecl * Sema::FindUsualDeallocationFunction ( SourceLocation  StartLoc,
bool  CanProvideSize,
bool  Overaligned,
DeclarationName  Name 
)

◆ 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 3304 of file SemaStmt.cpp.

References DiagnoseEmptyStmtBody(), DiagnoseForRangeVariableCopies(), FinishObjCForCollectionStmt(), clang::ForStmt::getRParenLoc(), clang::ForStmt::setBody(), and clang::StmtError().

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

◆ finishLambdaExplicitCaptures()

void Sema::finishLambdaExplicitCaptures ( sema::LambdaScopeInfo LSI)

Note that we have finished the explicit captures for the given lambda.

Definition at line 498 of file SemaLambda.cpp.

References clang::sema::LambdaScopeInfo::finishedExplicitCaptures().

Referenced by ActOnLambdaExpressionAfterIntroducer().

◆ FinishObjCForCollectionStmt()

StmtResult Sema::FinishObjCForCollectionStmt ( Stmt ForCollection,
Stmt Body 
)

FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.

Definition at line 3111 of file SemaStmt.cpp.

References clang::ForStmt::setBody(), and clang::StmtError().

Referenced by FinishCXXForRangeStmt(), and clang::TreeTransform< Derived >::RebuildObjCForCollectionStmt().

◆ FinishTemplateArgumentDeduction()

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
OriginalCallArgsIf non-NULL, the original call arguments against which the deduced argument types should be compared.

Definition at line 3690 of file SemaTemplateDeduction.cpp.

References clang::Sema::OriginalCallArg::ArgIdx, clang::TemplateArgumentList::asArray(), clang::sema::TemplateDeductionInfo::AssociatedConstraintsSatisfaction, CheckInstantiatedFunctionTemplateConstraints(), CheckOriginalCallArgDeduction(), clang::ConstraintsNotSatisfied, Context, ConvertDeducedTemplateArguments(), clang::TemplateArgumentList::CreateCopy(), CurrentInstantiationScope, clang::Sema::OriginalCallArg::DecomposedParam, clang::Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution, clang::sema::TemplateDeductionInfo::diag_begin(), clang::sema::TemplateDeductionInfo::diag_end(), clang::Decl::FOK_None, FunctionTemplate, clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::sema::TemplateDeductionInfo::getLocation(), getPackIndexForParam(), clang::Sema::SFINAETrap::hasErrorOccurred(), instantiateExplicitSpecifierDeferred(), clang::InstantiationDepth, clang::FunctionDecl::isDefined(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::QualType::isNull(), clang::ConstraintSatisfaction::IsSatisfied, clang::MiscellaneousDeductionFailure, clang::NonDependentConversionFailure, clang::Sema::OriginalCallArg::OriginalParamType, clang::sema::TemplateDeductionInfo::reset(), clang::Result, clang::Specialization, SubstDecl(), clang::SubstitutionFailure, SubstType(), clang::Success, SuppressedDiagnostics, clang::sema::TemplateDeductionInfo::takeCanonical(), clang::sema::TemplateDeductionInfo::takeSugared(), and Unevaluated.

◆ FixOverloadedFunctionReference() [1/2]

ExprResult 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 16261 of file SemaOverload.cpp.

References clang::ASTContext::BoundMemberTy, clang::ASTContext::BuiltinFnTy, clang::ASTContext::BuiltinInfo, clang::UnaryOperator::Create(), clang::ImplicitCastExpr::Create(), clang::GenericSelectionExpr::Create(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::FunctionDecl::getBuiltinID(), clang::TargetInfo::getCXXABI(), clang::DeclAccessPair::getDecl(), clang::Decl::getDeclContext(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::getTypeDeclType(), clang::QualType::getTypePtr(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), clang::Builtin::Context::isDirectlyAddressable(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::TargetCXXABI::isMicrosoft(), clang::OK_Ordinary, clang::DeclRefExpr::setHadMultipleCandidates(), clang::ast_matchers::type, clang::VK_LValue, and clang::VK_PRValue.

Referenced by CheckSingleAssignmentConstraints(), CheckTemplateArgument(), FinishOverloadedCallExpr(), clang::InitializationSequence::Perform(), and PerformImplicitConversion().

◆ FixOverloadedFunctionReference() [2/2]

ExprResult Sema::FixOverloadedFunctionReference ( ExprResult  E,
DeclAccessPair  FoundDecl,
FunctionDecl Fn 
)

Definition at line 16456 of file SemaOverload.cpp.

References clang::ActionResult< PtrTy, Compress >::get().

◆ ForceDeclarationOfImplicitMembers()

void Sema::ForceDeclarationOfImplicitMembers ( CXXRecordDecl Class)

◆ forceUnknownAnyToType()

ExprResult Sema::forceUnknownAnyToType ( Expr E,
QualType  ToType 
)

Force an expression with unknown-type to an expression of the given type.

Definition at line 21659 of file SemaExpr.cpp.

Referenced by ActOnFinishFullExpr(), AddInitializerToDecl(), BuildInstanceMessage(), and deduceVarTypeFromInitializer().

◆ FormatStringHasSArg()

bool Sema::FormatStringHasSArg ( const StringLiteral FExpr)

◆ forRedeclarationInCurContext()

RedeclarationKind clang::Sema::forRedeclarationInCurContext ( ) const
inline

◆ FreeVisContext()

void Sema::FreeVisContext ( )

FreeVisContext - Deallocate and null out VisContext.

Definition at line 1239 of file SemaAttr.cpp.

References VisContext.

Referenced by PopPragmaVisibility(), and ~Sema().

◆ FriendConstraintsDependOnEnclosingTemplate()

bool Sema::FriendConstraintsDependOnEnclosingTemplate ( const FunctionDecl FD)

◆ FunctionNonObjectParamTypesAreEqual()

bool Sema::FunctionNonObjectParamTypesAreEqual ( const FunctionDecl OldFunction,
const FunctionDecl NewFunction,
unsigned ArgPos = nullptr,
bool  Reversed = false 
)

◆ FunctionParamTypesAreEqual() [1/2]

bool Sema::FunctionParamTypesAreEqual ( ArrayRef< QualType Old,
ArrayRef< QualType New,
unsigned ArgPos = nullptr,
bool  Reversed = false 
)

FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their parameter types.

Caller has already checked that they have same number of parameters. If the parameters are different, ArgPos will have the parameter index of the first different parameter. If Reversed is true, the parameters of NewType will be compared in reverse order. That's useful if one of the functions is being used as a C++20 synthesized operator overload with a reversed parameter order.

Definition at line 3321 of file SemaOverload.cpp.

References clang::ASTContext::hasSameType(), clang::ASTContext::removePtrSizeAddrSpace(), and clang::Reversed.

Referenced by IsOverloadOrOverrideImpl().

◆ FunctionParamTypesAreEqual() [2/2]

bool Sema::FunctionParamTypesAreEqual ( const FunctionProtoType OldType,
const FunctionProtoType NewType,
unsigned ArgPos = nullptr,
bool  Reversed = false 
)

Definition at line 3348 of file SemaOverload.cpp.

References clang::FunctionProtoType::param_types(), and clang::Reversed.

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

◆ GatherGlobalCodeCompletions()

void Sema::GatherGlobalCodeCompletions ( CodeCompletionAllocator Allocator,
CodeCompletionTUInfo CCTUInfo,
SmallVectorImpl< CodeCompletionResult > &  Results 
)

◆ 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 3229 of file SemaDeclCXX.cpp.

References Context, clang::QualType::getAsString(), and clang::ASTContext::getTypeDeclType().

Referenced by AttachBaseSpecifiers(), CheckDerivedToBaseConversion(), DiagnoseAmbiguousLookup(), and findDecomposableBaseClass().

◆ getASTConsumer()

ASTConsumer & clang::Sema::getASTConsumer ( ) const
inline

Definition at line 502 of file Sema.h.

References Consumer.

Referenced by getASTMutationListener(), and clang::ParseAST().

◆ getASTContext()

ASTContext & clang::Sema::getASTContext ( ) const
inline

Definition at line 501 of file Sema.h.

References Context.

Referenced by ActOnArraySubscriptExpr(), ActOnCapturedRegionEnd(), ActOnCXXNestedNameSpecifierIndexedPack(), ActOnEndOfTranslationUnit(), ActOnEndOpenACCStmtDirective(), ActOnExplicitInstantiation(), ActOnHLSLTopLevelFunction(), ActOnModuleDecl(), ActOnOpenMPCall(), ActOnOpenMPCanonicalLoop(), ActOnOpenMPRegionEnd(), ActOnPseudoDestructorExpr(), AddImplicitlyDeclaredMembersToClass(), clang::TypoCorrectionConsumer::addNamespaces(), AddOverrideResults(), clang::ExternalASTMerger::AddSources(), AnalyzeCompoundAssignment(), assignInheritanceModel(), BuildBitIntType(), BuildCallExpr(), buildCapture(), buildCaptureDecl(), BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), buildDeclRefExpr(), buildDistanceFunc(), buildLambdaCaptureFixit(), buildLoopVarFunc(), BuildModuleInclude(), BuildPackIndexingExpr(), BuildPointerType(), BuildReferenceType(), canPassInRegisters(), checkArrayExpressionDoesNotReferToUnitySize(), checkArrayExpressionDoesNotReferToWholeSize(), CheckBuiltinTargetInSupported(), CheckBuiltinTargetNotInUnsupported(), checkBuiltinTemplateIdType(), checkClassLevelDLLAttribute(), CheckConversionToObjCLiteral(), CheckCUDACall(), CheckForImmediateInvocation(), checkFormatStringExpr(), CheckImplicitConversion(), checkMappableExpressionList(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionAdditionalRules(), CheckMultiVersionFunction(), CheckMultiVersionValue(), checkNoThrow(), CheckObjCDictionaryLiteralDuplicateKeys(), checkObjCMethodX86VectorTypes(), CheckOMPThreadPrivateDecl(), checkOpenMPLoop(), checkSizelessVectorShift(), CheckStaticArrayArgument(), CheckStaticLocalForDllExport(), CheckTargetCausesMultiVersioning(), CheckTemplateParameterList(), compareEnableIfAttrs(), convertHalfVecBinOp(), clang::CoroutineStmtBuilder::CoroutineStmtBuilder(), CreateBuiltinArraySubscriptExpr(), createImplicitModuleImportForErrorRecovery(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), clang::CStyleCastPtrExpr(), CUDARecordImplicitHostDeviceFuncUsedByDevice(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DeduceAutoType(), deduceClosureReturnType(), DeduceFromInitializerList(), deduceOpenCLPointeeAddrSpace(), DeduceTemplateArguments(), DeduceTemplateSpecializationFromInitializer(), DiagnoseInvalidExplicitObjectParameterInLambda(), DiagnoseNarrowingInInitList(), diagnoseObjCLiteralComparison(), diagnoseRepeatedUseOfWeak(), diagnoseUnavailableAlignedAllocation(), DoEmitAvailabilityWarning(), emitBadConversionNotes(), emitReadOnlyPlacementAttrWarning(), clang::PreferredTypeBuilder::enterCondition(), clang::PreferredTypeBuilder::enterSubscript(), EvaluateAndDiagnoseImmediateInvocation(), FinalizeVarWithDestructor(), findOMPAllocatorHandleT(), clang::Interpreter::FindRuntimeInterface(), FixDependencyOfIdExpressionsInLambdaWithDependentObjectParameter(), getAllocatorKind(), getDefaultCXXMethodAddrSpace(), getEmissionStatus(), GetExplicitObjectExpr(), getImplicitCodeSegAttrFromClass(), getImplicitCodeSegOrSectionAttrForFunction(), getMoreSpecialized(), getOpenCLKernelParameterType(), getPreferredTypeOfBinaryRHS(), getPreferredTypeOfUnaryArg(), HandleHLSLParamModifierAttr(), handleHLSLResourceBindingAttr(), handleMIGServerRoutineAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handlePackedAttr(), handleVecTypeHint(), hasNewExtendedAlignment(), clang::InitializationSequence::InitializeFrom(), clang::HLSLExternalSemaSource::InitializeSema(), instantiateDependentAllocAlignAttr(), instantiateDependentDiagnoseIfAttr(), instantiateDependentEnableIfAttr(), instantiateDependentHLSLParamModifierAttr(), instantiateDependentSYCLKernelAttr(), instantiateOMPDeclareVariantAttr(), InstantiateVariableDefinition(), InstantiateVariableInitializer(), clang::FilenamePatternConstraint::isAutoGenerated(), isConstNotMutableType(), IsLayoutCompatible(), isMacroDefined(), isOpenMPCapturedByRef(), IsRedefinitionInModule(), IsStandardConversion(), IsVectorConversion(), IsZeroInitializer(), isZeroSizedArray(), LookupBuiltin(), mapCodeCompletionContext(), MarkFunctionReferenced(), MarkVarDeclODRUsed(), MaybeAddCUDAConstantAttr(), mergeEnforceTCBAttrImpl(), MergeFunctionDecl(), mergeParamDeclTypes(), clang::ParseAST(), clang::Parser::ParseFirstTopLevelDecl(), clang::Parser::parseMapperModifier(), parseOpenMPReductionId(), PerformPendingInstantiations(), ProcessAPINotes(), ProcessAPINotes(), propagateDLLAttrToBaseClassTemplate(), clang::TreeTransform< Derived >::RebuildQualifiedType(), rejectConstNotMutableType(), clang::ExternalASTMerger::RemoveSources(), repeatForLambdaConversionFunctionCallingConvs(), reportOriginalDsa(), sameFunctionParameterTypeLists(), SemaBuiltinFunctionStart(), SemaBuiltinOverflow(), setPrototype(), ShouldDiagnoseAvailabilityOfDecl(), SubstDefaultArgument(), clang::Interpreter::SynthesizeExpr(), tryGCCVectorConvertAndSplat(), TryOrBuildParenListInitialization(), and updateAttrsForLateParsedTemplate().

◆ getAsTemplateNameDecl()

NamedDecl * Sema::getAsTemplateNameDecl ( NamedDecl D,
bool  AllowFunctionTemplates = true,
bool  AllowDependent = true 
)
static

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
DA declaration found by name lookup.
AllowFunctionTemplatesWhether function templates should be considered valid results.
AllowDependentWhether 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 103 of file SemaTemplate.cpp.

References clang::NamedDecl::getUnderlyingDecl().

Referenced by ClassifyName(), diagnoseExprIntendedAsTemplateName(), FilterAcceptableTemplateNames(), hasAnyAcceptableTemplateNames(), isTemplateName(), LookupQualifiedName(), and LookupTemplateName().

◆ getASTMutationListener()

ASTMutationListener * Sema::getASTMutationListener ( ) const

◆ 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 3515 of file SemaDecl.cpp.

References clang::Type::getAs(), clang::AttributedType::getModifiedType(), and clang::AttributedType::isCallingConv().

Referenced by handleFunctionTypeAttr(), and MergeFunctionDecl().

◆ getCapturedDeclRefType()

QualType Sema::getCapturedDeclRefType ( ValueDecl Var,
SourceLocation  Loc 
)

Given a variable, determine the type that a reference to that variable will have in the given scope.

Definition at line 20026 of file SemaExpr.cpp.

References TryCapture_Implicit, and tryCaptureVariable().

Referenced by BuildDeclarationNameExpr(), and getDecltypeForExpr().

◆ getCompletedType()

QualType Sema::getCompletedType ( Expr E)

Get the type of expression E, triggering instantiation to complete the type if necessary – that is, if the expression refers to a templated static data member of incomplete array type.

May still return an incomplete type if instantiation was not possible or if the type is incomplete for a different reason. Use RequireCompleteExprType instead if a diagnostic is expected for an incomplete expression type.

Definition at line 9190 of file SemaType.cpp.

References completeExprArrayBound(), clang::Expr::getType(), and clang::Type::isIncompleteArrayType().

Referenced by AdjustFunctionParmAndArgTypesForDeduction(), RequireCompleteExprType(), TryReferenceInitialization(), and TryReferenceListInitialization().

◆ getConstructorName()

ParsedType Sema::getConstructorName ( IdentifierInfo II,
SourceLocation  NameLoc,
Scope S,
CXXScopeSpec SS,
bool  EnteringContext 
)

◆ getCopyElisionCandidate()

const VarDecl * Sema::getCopyElisionCandidate ( NamedReturnInfo Info,
QualType  ReturnType 
)

Updates given NamedReturnInfo's move-eligible and copy-elidable statuses, considering the function return type criteria as applicable to return statements.

Parameters
InfoThe NamedReturnInfo object to update.
ReturnTypeThis is the return type of the function.
Returns
The copy elision candidate, in case the initial return expression was copy elidable, or nullptr otherwise.

Definition at line 3542 of file SemaStmt.cpp.

References clang::Sema::NamedReturnInfo::Candidate, Context, clang::ValueDecl::getType(), clang::Type::getTypeClass(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isCanonicalUnqualified(), clang::Sema::NamedReturnInfo::isCopyElidable(), clang::Type::isDependentType(), clang::Type::isRecordType(), clang::Type::isSpecificBuiltinType(), clang::Sema::NamedReturnInfo::MoveEligible, and clang::Sema::NamedReturnInfo::S.

Referenced by ActOnCapScopeReturnStmt(), and BuildReturnStmt().

◆ 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 1036 of file SemaCUDA.cpp.

References Context, clang::CUDA_USES_NEW_LAUNCH, clang::CudaFeatureEnabled(), getLangOpts(), clang::TargetInfo::getSDKVersion(), clang::ASTContext::getTargetInfo(), and clang::HIP.

Referenced by ActOnCUDAExecConfigExpr(), and ActOnFunctionDeclarator().

◆ getCurBlock()

BlockScopeInfo * Sema::getCurBlock ( )

◆ getCurCapturedRegion()

CapturedRegionScopeInfo * Sema::getCurCapturedRegion ( )

Retrieve the current captured region, if any.

Definition at line 2713 of file Sema.cpp.

References FunctionScopes.

Referenced by ActOnOpenMPRegionStart(), checkDeclInTargetContext(), and isOpenMPCapturedDecl().

◆ getCurCompoundScope()

sema::CompoundScopeInfo & Sema::getCurCompoundScope ( ) const

◆ getCurFPFeatures()

FPOptions & clang::Sema::getCurFPFeatures ( )
inline

◆ getCurFunction()

sema::FunctionScopeInfo * clang::Sema::getCurFunction ( ) const
inline

◆ getCurFunctionAvailabilityContext()

FunctionScopeInfo * Sema::getCurFunctionAvailabilityContext ( )

Retrieve the current function, if any, that should be analyzed for potential availability violations.

Definition at line 952 of file SemaAvailability.cpp.

References FunctionScopes.

Referenced by ActOnObjCAvailabilityCheckExpr(), and DiagnoseAvailabilityOfDecl().

◆ getCurFunctionDecl()

FunctionDecl * Sema::getCurFunctionDecl ( bool  AllowLambda = false) const

Returns a pointer to the innermost enclosing function, or nullptr if the current context is not inside a function.

getCurFunctionDecl - If inside of a function body, this returns a pointer to the function decl for the function being parsed.

If AllowLambda is true, this can return the call operator of an enclosing lambda, otherwise lambdas are skipped when looking for an enclosing function.

If we're currently in a 'block', this returns the containing context.

Definition at line 1489 of file Sema.cpp.

References getFunctionLevelDeclContext().

Referenced by ActOnFinishFunctionBody(), ActOnOpenMPCall(), ActOnStartOfFunctionDef(), ActOnVariableDeclarator(), clang::OverloadCandidateSet::BestViableFunction(), BuildMemberReferenceExpr(), BuildResolvedCallExpr(), BuildReturnStmt(), CheckCUDACall(), CheckVariableDeclarationType(), checkVAStartABI(), CUDACheckLambdaCapture(), CUDADiagIfDeviceCode(), CUDADiagIfHostCode(), CUDARecordImplicitHostDeviceFuncUsedByDevice(), Diag(), DiagnoseBadTarget(), diagnoseUseOfInternalDeclInInlineFunction(), diagnoseZeroToNullptrConversion(), FindAllocationFunctions(), getSelfAssignmentClassMemberCandidate(), clang::isBetterOverloadCandidate(), IsSimplyAccessible(), isUsualDeallocationFunction(), LookupMemberExpr(), and targetDiag().

◆ getCurFunctionOrMethodDecl()

NamedDecl * Sema::getCurFunctionOrMethodDecl ( ) const

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 1501 of file Sema.cpp.

References getFunctionLevelDeclContext().

Referenced by AddKeywordsToConsumer(), BuildReturnStmt(), DiagIfReachable(), and handleInitPriorityAttr().

◆ getCurGenericLambda()

LambdaScopeInfo * Sema::getCurGenericLambda ( )

Retrieve the current generic lambda info, if any.

Definition at line 2400 of file Sema.cpp.

References getCurLambda().

Referenced by clang::getStackIndexOfNearestEnclosingCaptureCapableLambda().

◆ getCurLambda()

LambdaScopeInfo * Sema::getCurLambda ( bool  IgnoreNonLambdaCapturingScope = false)

◆ getCurLexicalContext()

DeclContext * clang::Sema::getCurLexicalContext ( ) const
inline

◆ getCurMethodDecl()

ObjCMethodDecl * Sema::getCurMethodDecl ( )

◆ getCurObjCLexicalContext()

const DeclContext * clang::Sema::getCurObjCLexicalContext ( ) const
inline

Definition at line 5984 of file Sema.h.

References getCurLexicalContext().

Referenced by DiagnoseUnusedOfDecl().

◆ 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 2603 of file SemaDeclCXX.cpp.

References computeDeclContext(), clang::CPlusPlus, CurContext, getLangOpts(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isNotEmpty().

Referenced by getConstructorName(), and isCurrentClassName().

◆ 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
NNSa dependent nested name specifier.

Definition at line 198 of file SemaCXXScopeSpec.cpp.

References clang::CPlusPlus, CurContext, clang::NestedNameSpecifier::getAsType(), getLangOpts(), and clang::NestedNameSpecifier::isDependent().

Referenced by computeDeclContext().

◆ getCurrentMangleNumberContext()

std::tuple< MangleNumberingContext *, Decl * > Sema::getCurrentMangleNumberContext ( const DeclContext DC)

◆ getCurrentModule()

Module * clang::Sema::getCurrentModule ( ) const
inline

◆ getCurrentThisType()

QualType Sema::getCurrentThisType ( )

◆ getCurScope()

Scope * clang::Sema::getCurScope ( ) const
inline

◆ getDarwinSDKInfoForAvailabilityChecking() [1/2]

DarwinSDKInfo * Sema::getDarwinSDKInfoForAvailabilityChecking ( )

◆ getDarwinSDKInfoForAvailabilityChecking() [2/2]

DarwinSDKInfo * Sema::getDarwinSDKInfoForAvailabilityChecking ( SourceLocation  Loc,
StringRef  Platform 
)

Definition at line 65 of file Sema.cpp.

References Diag(), and getDarwinSDKInfoForAvailabilityChecking().

Referenced by handleAvailabilityAttr().

◆ getDecltypeForExpr()

QualType Sema::getDecltypeForExpr ( Expr E)

getDecltypeForExpr - Given an expr, will return the decltype for that expression, according to the rules in C++11 [dcl.type.simple]p4 and C++11 [expr.lambda.prim]p18.

Definition at line 9760 of file SemaType.cpp.

References Context, clang::ASTContext::DependentTy, getCapturedDeclRefType(), getCurLambda(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getReferenceQualifiedType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::IgnoreParens(), clang::QualType::isNull(), and clang::Expr::isTypeDependent().

Referenced by BuildDecltypeType(), and DeduceAutoType().

◆ getDefaultCXXMethodAddrSpace()

LangAS Sema::getDefaultCXXMethodAddrSpace ( ) const

◆ getDefaultedComparisonKind()

DefaultedComparisonKind clang::Sema::getDefaultedComparisonKind ( const FunctionDecl FD)
inline

◆ getDefaultedFunctionKind()

Sema::DefaultedFunctionKind Sema::getDefaultedFunctionKind ( const FunctionDecl FD)

◆ getDestructorName()

ParsedType Sema::getDestructorName ( IdentifierInfo II,
SourceLocation  NameLoc,
Scope S,
CXXScopeSpec SS,
ParsedType  ObjectType,
bool  EnteringContext 
)

◆ getDestructorTypeForDecltype()

ParsedType Sema::getDestructorTypeForDecltype ( const DeclSpec DS,
ParsedType  ObjectType 
)

◆ getDiagnostics()

DiagnosticsEngine & clang::Sema::getDiagnostics ( ) const
inline

◆ 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 9733 of file SemaType.cpp.

References Context, clang::ASTContext::getElaboratedType(), clang::CXXScopeSpec::getScopeRep(), clang::QualType::isNull(), and clang::CXXScopeSpec::isValid().

Referenced by ActOnTemplateIdType(), BuildMemInitializer(), buildNamedType(), BuildQualifiedDeclarationNameExpr(), and ConvertDeclSpecToType().

◆ getEmissionStatus()

Sema::FunctionEmissionStatus Sema::getEmissionStatus ( const FunctionDecl Decl,
bool  Final = false 
)

◆ getEnclosingFunction()

FunctionScopeInfo * Sema::getEnclosingFunction ( ) const

◆ 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 2358 of file Sema.cpp.

References CodeSynthesisContexts, CurContext, and FunctionScopes.

Referenced by ActOnNonTypeTemplateParameter(), ActOnTemplateTemplateParameter(), ActOnTypeParameter(), CheckParameter(), DiagnoseUnexpandedParameterPack(), and DiagnoseUnexpandedParameterPacks().

◆ getExprRange()

SourceRange Sema::getExprRange ( Expr E) const

Definition at line 512 of file SemaExpr.cpp.

References clang::Stmt::getSourceRange().

◆ getExternalSource()

ExternalSemaSource * clang::Sema::getExternalSource ( ) const
inline

Definition at line 504 of file Sema.h.

Referenced by AddClassMessageCompletions(), and CheckExtVectorComponent().

◆ getFixItZeroInitializerForType()

std::string Sema::getFixItZeroInitializerForType ( QualType  T,
SourceLocation  Loc 
) const

◆ getFixItZeroLiteralForType()

std::string Sema::getFixItZeroLiteralForType ( QualType  T,
SourceLocation  Loc 
) const

Definition at line 223 of file SemaFixItUtils.cpp.

References getScalarZeroExpressionForType().

Referenced by DiagnoseNullConversion().

◆ GetFormatNSStringIdx()

bool Sema::GetFormatNSStringIdx ( const FormatAttr *  Format,
unsigned Idx 
)
static

◆ getFormatStringInfo()

bool Sema::getFormatStringInfo ( const FormatAttr *  Format,
bool  IsCXXMember,
bool  IsVariadic,
FormatStringInfo FSI 
)
static

Given a FunctionDecl's FormatAttr, attempts to populate the FomatStringInfo parameter with the FormatAttr's correct format_idx and firstDataArg.

Returns true when the format fits the function and the FormatStringInfo has been populated.

Definition at line 7541 of file SemaChecking.cpp.

References clang::Sema::FormatStringInfo::ArgPassingKind, FAPK_Fixed, FAPK_VAList, FAPK_Variadic, clang::Sema::FormatStringInfo::FirstDataArg, and clang::Sema::FormatStringInfo::FormatIdx.

Referenced by checkFormatStringExpr(), and GetFormatNSStringIdx().

◆ GetFormatStringType()

Sema::FormatStringType Sema::GetFormatStringType ( const FormatAttr *  Format)
static

◆ getFullyPackExpandedSize()

std::optional< unsigned > Sema::getFullyPackExpandedSize ( TemplateArgument  Arg)

◆ getFunctionLevelDeclContext()

DeclContext * Sema::getFunctionLevelDeclContext ( bool  AllowLambda = false) const

◆ getFunctionScopes()

ArrayRef< sema::FunctionScopeInfo * > clang::Sema::getFunctionScopes ( ) const
inline

Definition at line 9066 of file Sema.h.

References FunctionScopes, and FunctionScopesStart.

Referenced by getTemplateDepth().

◆ getIdentityTemplateArgumentLoc()

TemplateArgumentLoc Sema::getIdentityTemplateArgumentLoc ( NamedDecl 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 2699 of file SemaTemplateDeduction.cpp.

References Context, clang::ASTContext::getInjectedTemplateArg(), and getTrivialTemplateArgumentLoc().

Referenced by substituteParameterMappings().

◆ 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
FDFunction being declared.
IsDefinitionWhether it is a definition or just a declaration.
Returns
A CodeSegAttr or SectionAttr to apply to the function or nullptr if no attribute should be added.

Definition at line 11095 of file SemaDecl.cpp.

References CodeSegStack, getASTContext(), getImplicitCodeSegAttrFromClass(), and clang::Decl::hasAttr().

Referenced by ActOnFunctionDeclarator(), ActOnStartOfLambdaDefinition(), and checkClassLevelCodeSegAttribute().

◆ getInheritingConstructorName()

ParsedType Sema::getInheritingConstructorName ( CXXScopeSpec SS,
SourceLocation  NameLoc,
IdentifierInfo Name 
)

◆ getInventedParameterInfos()

ArrayRef< InventedTemplateParameterInfo > clang::Sema::getInventedParameterInfos ( ) const
inline

Definition at line 9057 of file Sema.h.

References InventedParameterInfos, and InventedParameterInfosStart.

Referenced by getTemplateDepth().

◆ 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 5286 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().

Referenced by DiagnoseUnusedBackingIvarInAccessor().

◆ getLambdaConversionFunctionResultType()

QualType Sema::getLambdaConversionFunctionResultType ( const FunctionProtoType CallOpType,
CallingConv  CC 
)

◆ getLangOpts()

const LangOptions & clang::Sema::getLangOpts ( ) const
inline

Definition at line 494 of file Sema.h.

References LangOpts.

Referenced by ActOnAnnotModuleBegin(), ActOnAnnotModuleEnd(), ActOnArraySubscriptExpr(), ActOnBlockArguments(), ActOnBlockStmtExpr(), ActOnCallExpr(), ActOnCapScopeReturnStmt(), ActOnCaseExpr(), ActOnCastExpr(), ActOnCharacterConstant(), ActOnCompoundStmt(), ActOnConditionalOp(), ActOnCXXAssumeAttr(), ActOnCXXDelete(), ActOnCXXMemberDeclarator(), ActOnCXXNamedCast(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnCXXTryBlock(), ActOnCXXTypeid(), ActOnDecltypeExpression(), ActOnDecompositionDeclarator(), ActOnDefs(), ActOnDependentIdExpression(), ActOnDependentMemberExpr(), ActOnDoStmt(), ActOnEnumBody(), ActOnEnumConstant(), ActOnExplicitInstantiation(), ActOnFields(), ActOnFinishFullExpr(), ActOnFinishFunctionBody(), ActOnFinishKNRParamDeclarations(), ActOnFinishLinkageSpecification(), ActOnForEachDeclStmt(), ActOnForStmt(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnIdExpression(), ActOnIfStmt(), ActOnInitList(), ActOnIvar(), ActOnLabelStmt(), ActOnLambdaExpressionAfterIntroducer(), ActOnMemberAccessExpr(), ActOnMethodDeclaration(), ActOnModuleDecl(), ActOnModuleImport(), ActOnMSVCUnknownTypeName(), ActOnNameClassifiedAsUndeclaredNonType(), ActOnNumericConstant(), ActOnObjCAtSynchronizedOperand(), ActOnObjCAtThrowStmt(), ActOnObjCAtTryStmt(), ActOnObjCBoolLiteral(), ActOnObjCExceptionDecl(), actOnOMPReductionKindClause(), ActOnOpenMPAlignedClause(), ActOnOpenMPDeclareMapperVarDecl(), ActOnOpenMPDeclareSimdDirective(), ActOnOpenMPDeclareTargetName(), ActOnOpenMPDefaultmapClause(), ActOnOpenMPExecutableDirective(), ActOnOpenMPLinearClause(), ActOnOpenMPLoopInitialization(), ActOnOpenMPRegionEnd(), ActOnOpenMPRegionStart(), ActOnOpenMPTeamsDirective(), ActOnPackIndexingExpr(), ActOnPackIndexingType(), ActOnParamDeclarator(), ActOnParamDefaultArgument(), ActOnParenExpr(), ActOnPopScope(), ActOnPragmaCXLimitedRange(), ActOnPragmaFEnvAccess(), ActOnPragmaFEnvRound(), ActOnPragmaFloatControl(), ActOnPragmaFPContract(), ActOnPragmaFPEvalMethod(), ActOnPragmaFPValueChangingOption(), ActOnPragmaMSAllocText(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPropertyImplDecl(), ActOnSEHTryBlock(), ActOnStartCXXMemberReference(), ActOnStartLinkageSpecification(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnStartOfObjCMethodDef(), ActOnStartOfTranslationUnit(), ActOnStartOpenMPDeclareTargetContext(), ActOnStartProtocolInterface(), ActOnStringLiteral(), ActOnTag(), ActOnTemplateIdType(), ActOnTemplateName(), ActOnTemplateTypeArgument(), ActOnTypedefDeclarator(), ActOnTypeName(), ActOnTypenameType(), ActOnUnevaluatedStringLiteral(), ActOnUninitializedDecl(), ActOnUsingDeclaration(), ActOnVariableDeclarator(), AddAlignmentAttributesForRecord(), clang::TypoCorrectionConsumer::addCorrection(), addFixitForObjCARCConversion(), addFunctionPointerConversion(), AddImplicitlyDeclaredMembersToClass(), AddInitializerToDecl(), AddKeywordsToConsumer(), AddKnownFunctionAttributes(), AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), addMethodToGlobalList(), AddModeAttr(), AddMsStructLayoutForRecord(), AddOrdinaryNameResults(), AddRecordMembersCompletionResults(), AddXConsumedAttr(), AdjustDestructorExceptionSpec(), AdjustFunctionParmAndArgTypesForDeduction(), AdjustParameterTypeForObjCAutoRefCount(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeImplicitConversions(), ArgumentDependentLookup(), AtomicPropertySetterGetterRules(), clang::OverloadCandidateSet::BestViableFunction(), BuildAnonymousStructOrUnion(), BuildArrayType(), BuildAtomicType(), BuildBinOp(), BuildBlockPointerType(), BuildCallExpr(), buildCapture(), buildCaptureDecl(), buildCapturedStmtCaptureList(), BuildClassMessage(), BuildCompoundLiteralExpr(), BuildConvertedConstantExpression(), BuildCStyleCastExpr(), BuildCXXConstructExpr(), BuildCXXForRangeStmt(), BuildCXXNamedCast(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildCXXThrow(), BuildCXXTypeConstructExpr(), BuildDeclarationNameExpr(), buildDeclareReductionRef(), BuildDeclRefExpr(), BuildExceptionDeclaration(), BuildExpressionFromIntegralTemplateArgumentValue(), BuildExtVectorType(), BuildFieldReferenceExpr(), BuildFunctionType(), BuildImplicitMemberExpr(), BuildInstanceMessage(), BuildIvarRefExpr(), buildLambdaCaptureFixit(), BuildLambdaExpr(), buildLambdaInitCaptureInitialization(), buildLambdaThisCaptureFixit(), BuildMemberPointerType(), BuildMemInitializer(), BuildModuleInclude(), BuildObjCArrayLiteral(), BuildObjCBoxedExpr(), BuildObjCDictionaryLiteral(), BuildObjCExceptionDecl(), BuildObjCStringLiteral(), BuildPointerType(), BuildPseudoDestructorExpr(), BuildQualifiedDeclarationNameExpr(), BuildRecoveryCallExpr(), BuildReferenceType(), BuildResolvedCallExpr(), BuildReturnStmt(), buildSingleCopyAssignRecursively(), BuildStaticAssertDeclaration(), BuildTypeofExprType(), BuildUnaryOp(), buildUserDefinedMapperRef(), BuildUsingDeclaration(), BuildVAArgExpr(), BuildVectorLiteral(), canPassInRegisters(), CanUseDecl(), captureInBlock(), captureInCapturedRegion(), CheckAdditionOperands(), CheckAddressOfMemberAccess(), CheckAddressOfOperand(), checkAllocateClauses(), CheckAllocatedType(), CheckAllocationAccess(), CheckAltivecInitFromScalar(), CheckAnonMemberRedeclaration(), checkARCPropertyImpl(), checkArithmeticBinOpPointerOperands(), checkArithmeticOpPointerOperand(), checkArraySize(), CheckAssignmentConstraints(), CheckAssignmentOperands(), CheckBaseClassAccess(), CheckBaseSpecifier(), CheckBitwiseOperands(), checkBlockPointerTypesForAssignment(), CheckBooleanCondition(), CheckBoolLikeConversion(), CheckC23ConstexprInitConversion(), CheckC23ConstexprInitStringLiteral(), clang::interp::CheckCallable(), clang::interp::CheckCallDepth(), checkCaseValue(), checkClassLevelDLLAttribute(), CheckCommaOperands(), CheckCompareOperands(), CheckComparisonCategoryType(), CheckCompletedCXXClass(), CheckCompleteVariableDeclaration(), checkCondition(), CheckConditionalOperand(), CheckConditionalOperands(), checkConditionalPointerCompatibility(), clang::interp::CheckConstant(), CheckConstexprCtorInitializer(), CheckConstexprDeclStmt(), CheckConstexprDestructorSubobjects(), CheckConstexprFunctionBody(), CheckConstexprFunctionDefinition(), CheckConstexprFunctionStmt(), CheckConstexprParameterTypes(), CheckConstexprReturnType(), CheckConstraintExpression(), CheckConstructorAccess(), CheckConversionDeclarator(), CheckConversionToObjCLiteral(), CheckCUDACall(), checkCUDATargetOverload(), CheckCXX98CompatAccessibleCopy(), CheckCXXThrowOperand(), checkDeclIsAllowedInOpenMPTarget(), CheckDerivedToBaseConversion(), CheckDestructorAccess(), CheckDistantExceptionSpec(), CheckEffectiveAccess(), checkEnumArithmeticConversions(), CheckEnumConstant(), CheckEquivalentExceptionSpec(), clang::CheckEquivalentExceptionSpecImpl(), checkEscapingByref(), CheckExceptionSpecCompatibility(), CheckExceptionSpecSubset(), CheckExplicitInstantiationScope(), CheckExplicitlyDefaultedComparison(), CheckExplicitlyDefaultedSpecialMember(), CheckExplicitObjectParameter(), clang::interp::CheckExtern(), CheckExtVectorCast(), CheckExtVectorComponent(), CheckFieldDecl(), clang::interp::CheckFloatResult(), checkForConflictWithNonVisibleExternC(), CheckForFunctionRedefinition(), CheckFormatString(), CheckForModifiableLvalue(), CheckFriendAccess(), CheckFunctionCall(), CheckFunctionDeclaration(), CheckFunctionOrTemplateParamDeclarator(), CheckFunctionReturnType(), CheckFunctionTemplateSpecialization(), clang::interp::CheckGlobalInitialized(), checkGlobalOrExternCConflict(), CheckImmediateEscalatingFunctionDefinition(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), CheckLogicalOperands(), CheckLookupAccess(), CheckMain(), checkMapClauseExpressionBase(), checkMappableExpressionList(), CheckMemaccessSize(), CheckMemberAccess(), CheckMemberOperatorAccess(), CheckMessageArgumentTypes(), CheckMultiplyDivideOperands(), checkNestingOfRegions(), checkNewAttributesAfterDef(), CheckNontrivialField(), CheckNonTypeTemplateParameterType(), CheckObjCCollectionLiteralElement(), CheckObjCConversion(), CheckObjCForCollectionOperand(), CheckObjCMethodOverride(), checkObjCPointerIntrospection(), CheckObjCPropertyAttributes(), CheckOMPThreadPrivateDecl(), checkOpenCLSubgroupExt(), checkOpenMPIterationSpace(), checkOpenMPLoop(), CheckOperatorNewDeleteTypes(), CheckOriginalCallArgDeduction(), CheckOverridingFunctionExceptionSpec(), CheckParameter(), CheckParmsForFunctionDef(), CheckPlaceholderExpr(), checkPointerAuthEnabled(), CheckPointerToMemberOperands(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckRemainderOperands(), CheckShadow(), CheckShadowingDeclModification(), CheckSimplerImplicitMovesMSVCWorkaround(), CheckSingleAssignmentConstraints(), CheckSpecializationInstantiationRedecl(), checkSpecializationReachability(), checkSpecializationVisibility(), CheckSpecifiedExceptionType(), CheckStaticArrayArgument(), CheckStringInit(), CheckStructuredBindingMemberAccess(), CheckSubscriptingKind(), CheckSubtractionOperands(), checkTargetClonesAttrString(), CheckTautologicalComparison(), CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), CheckTemplateSpecializationScope(), CheckTemplateTemplateArgument(), CheckTemplateTypeArgument(), clang::interp::CheckThis(), CheckTollFreeBridgeCast(), CheckTollFreeBridgeStaticCast(), CheckTypenameType(), checkUndefinedButUsed(), CheckUnresolvedLookupAccess(), CheckUnresolvedMemberAccess(), CheckUnusedVolatileAssignment(), CheckUsingDeclQualifier(), CheckUsingShadowDecl(), CheckVariableDeclarationType(), checkVariadicArgument(), CheckVectorCompareOperands(), CheckVectorLogicalOperands(), CheckVectorOperands(), ClassifyImplicitMemberAccess(), ClassifyName(), compareConversionFunctions(), CompareImplicitConversionSequences(), CompareStandardConversionSequences(), completeFunctionType(), CompleteNonViableCandidate(), CompleteVarTemplateSpecializationDecl(), ConvertDeclSpecToType(), ConvertDeducedTemplateArguments(), CreateBuiltin(), CreateBuiltinArraySubscriptExpr(), CreateBuiltinBinOp(), CreateBuiltinUnaryOp(), CreateCapturedStmtRecordDecl(), createImplicitModuleImportForErrorRecovery(), CreateNewFunctionDecl(), CreatePropertyDecl(), CUDACheckLambdaCapture(), CUDADiagIfDeviceCode(), CUDADiagIfHostCode(), CUDASetLambdaAttrs(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMemberFunctionsWithName(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DeduceAutoType(), deduceClosureReturnType(), DeduceFunctionTypeFromReturnExpr(), DeduceNonTypeTemplateArgument(), deduceOpenCLAddressSpace(), deducePropertyOwnershipFromType(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateSpecializationFromInitializer(), DeduceVariableDeclarationType(), deduceVarTypeFromInitializer(), deepTypeCheckForSYCLDevice(), DefaultArgumentPromotion(), defaultedSpecialMemberIsConstexpr(), DefaultFunctionArrayConversion(), DefaultLvalueConversion(), DefaultVariadicArgumentPromotion(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitLambdaToBlockPointerConversion(), Diag(), clang::InitializationSequence::Diagnose(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnNullPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), DiagnoseAssignmentResult(), DiagnoseBadShiftValues(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseCommaOperator(), DiagnoseDefaultTemplateArgument(), DiagnoseDependentMemberLookup(), DiagnoseEmptyLookup(), diagnoseExprIntendedAsTemplateName(), clang::ParsedAttr::diagnoseLangOpts(), diagnoseListInit(), DiagnoseMismatchedNewDelete(), diagnoseMissingConstinit(), DiagnoseMultipleMethodInGlobalPool(), DiagnoseNarrowingInInitList(), diagnoseNonConstVariable(), DiagnoseNullConversion(), diagnoseOpenCLTypes(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseRetainableFlexibleArrayMember(), DiagnoseSentinelCalls(), diagnoseSubtractionOnNullPointer(), diagnoseTautologicalComparison(), DiagnoseTemplateParameterShadow(), diagnoseTypo(), diagnoseUncapturableValueReferenceOrBinding(), clang::interp::diagnoseUnknownDecl(), DiagnoseUnknownTypeName(), DiagnoseUnusedButSetDecl(), DiagnoseUnusedDecl(), DiagnoseUnusedExprResult(), DiagnoseUnusedLambdaCapture(), DiagnoseUseOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), DiagnoseWeakIvars(), diagnoseXorMisusedAsPow(), diagnoseZeroToNullptrConversion(), DiagPlaceholderFieldDeclDefinitions(), DiagPlaceholderVariableDefinition(), DiagRedefinedPlaceholderFieldDecl(), DiagReservedModuleName(), DiagUninitUse(), DoEmitAvailabilityWarning(), emitAndFixInvalidAsmCastLValue(), EmitCurrentDiagnostic(), EmitDiagForCXXThrowInNonThrowingFunc(), emitEmptyLookupTypoDiagnostic(), emitReplacement(), clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext(), ExpandFunctionLocalPredefinedMacros(), filterNonConflictingPreviousTypedefDecls(), FinalizeDeclaration(), FinalizeDeclaratorGroup(), finalizeOpenMPDelayedAnalysis(), FindAllocationFunctions(), FindCompositeObjCPointerType(), FindCompositePointerType(), findDeleteForPromise(), clang::DeclSpec::Finish(), FinishForRangeVarDecl(), ForceDeclarationOfImplicitMembers(), FormatStringHasSArg(), funcHasParameterSizeMangling(), clang::FunctionCallFilterCCC::FunctionCallFilterCCC(), GatherArgumentsForCall(), getCCForDeclaratorChunk(), getCudaConfigureFuncName(), getCurrentClass(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), getDefaultCXXMethodAddrSpace(), getDefaultedFunctionKind(), getDummyLambdaType(), GetFullTypeForDeclarator(), getLambdaType(), getNamedReturnInfo(), getNonFieldDeclScope(), getNonOdrUseReasonInCurrentContext(), getNonTagTypeDeclKind(), getNSNumberFactoryMethod(), getOpenCLKernelParameterType(), getOpenMPCapturedExpr(), getPrivateItem(), getTopMostPointOfInstantiation(), GetTypeForDeclarator(), GetTypeForDeclaratorCast(), getTypeName(), GetTypeOfFunction(), getUDSuffixLoc(), HandleAddressSpaceTypeAttribute(), HandleArmSveVectorBitsTypeAttr(), handleConstructorAttr(), HandleDeclarator(), handleDelayedForbiddenType(), handleDeprecatedAttr(), handleFallThroughAttr(), HandleField(), handleFloatConversion(), handleFunctionTypeAttr(), handleGlobalAttr(), handleInitPriorityAttr(), handleLambdaNumbering(), handleLikely(), HandleMatrixTypeAttr(), handleMSConstexprAttr(), HandleMSProperty(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoCfCheckAttr(), handleObjCDirectAttr(), handleObjCDirectMembersAttr(), handleObjCOwnershipTypeAttr(), handleOpenCLAccessAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleSharedAttr(), handleStandardNoReturnAttr(), handleTagNumbering(), handleUnlikely(), handleUnusedAttr(), handleWarnUnusedResult(), handleXReturnsXRetainedAttr(), hasAcceptableDefinition(), HasAccess(), hasNewExtendedAlignment(), IdentifyCUDAPreference(), IgnoredValueConversions(), ImpCastExprToType(), ImplicitlyDefineFunction(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), Initialize(), clang::InitializationSequence::InitializeFrom(), clang::TemplateDeclInstantiator::InitMethodInstantiation(), InsertOCLBuiltinDeclarationsFromTable(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), InstantiateVariableInitializer(), clang::interp::interp__builtin_classify_type(), isAbstractType(), isAcceptableTagRedeclContext(), clang::isBetterOverloadCandidate(), isCapturingReferenceToHostVarInCUDADeviceLambda(), isConstNotMutableType(), isCurrentClassNameTypo(), IsCXX98CompatWarning(), IsDerivedFrom(), IsEnumConstOrFromMacro(), isExternalWithNoLinkageType(), isFunctionDefinitionDiscarded(), isIncompleteDeclExternC(), isLibstdcxxPointerReturnFalseHack(), isMainFileLoc(), isMemberAccessibleForDeletion(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isObjCSignedCharBool(), IsOverloadOrOverrideImpl(), isResultTypeOrTemplate(), IsSimplyAccessible(), IsStandardConversion(), isStdInitializerList(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), isTagTypeWithMissingTag(), isTemplateName(), isUnavailableAlignedAllocationFunction(), isUsualDeallocationFunction(), isValidVarArgType(), isVariableCapturable(), IsVectorConversion(), LookupBinOp(), LookupBuiltin(), LookupDirect(), LookupInlineAsmField(), LookupIvarInObjCMethod(), LookupMemberExpr(), LookupName(), LookupObjCInterfaceDeclForLiteral(), LookupSpecialMember(), LookupTemplateName(), mapCodeCompletionContext(), MarkDeclRefReferenced(), MarkExpressionAsImmediateEscalating(), MarkExprReferenced(), MarkFunctionReferenced(), MarkMemberReferenced(), MatchTwoMethodDeclarations(), MaybeAddCUDAConstantAttr(), maybeAddCUDAHostDeviceAttrs(), MaybeBindToTemporary(), maybeExtendBlockObject(), MaybeProduceObjCObject(), MergeCompatibleFunctionDecls(), MergeCXXFunctionDecl(), mergeDeclAttribute(), MergeFunctionDecl(), mergeInternalLinkageAttr(), mergeParamDeclAttributes(), MergeTypedefNameDecl(), mergeTypeWithPrevious(), MergeVarDecl(), MergeVarDeclExceptionSpecs(), MergeVarDeclTypes(), mightBeIntendedToBeTemplateName(), NoteFunctionCandidate(), OpenCLCheckVectorConditional(), ParsedFreeStandingDeclSpec(), ParseObjCSelectorExpression(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), PerformMoveOrCopyInitialization(), PopExpressionEvaluationContext(), PopForceCUDAHostDevice(), PrintInstantiationStack(), processImplicitMapsWithDefaultMappers(), ProcessPropertyDecl(), PushCapturedRegionScope(), PushForceCUDAHostDevice(), PushOnScopeChains(), RegisterLocallyScopedExternCDecl(), repeatForLambdaConversionFunctionCallingConvs(), RequireLiteralType(), RequireStructuralType(), ResolveConstructorOverload(), Sema(), SemaBuiltinDumpStruct(), SemaBuiltinOverflow(), SetDeclDefaulted(), setExceptionMode(), SetIvarInitializers(), clang::DeclSpec::SetStorageClassSpec(), setTagNameForLinkagePurposes(), clang::OverloadCandidateSet::shouldDeferDiags(), ShouldDeleteSpecialMember(), ShouldDiagnoseAvailabilityInContext(), shouldIgnoreDueToReservedName(), shouldSkipAnonEnumBody(), ShouldSplatAltivecScalarInCast(), SubstituteExplicitTemplateArguments(), SYCLDiagIfDeviceCode(), targetDiag(), TemporaryMaterializationConversion(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), tryCaptureVariable(), TryConstructorInitialization(), TryDefaultInitialization(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), tryLookupUnambiguousFieldDecl(), TryNamespaceTypoCorrection(), TryOCLSamplerInitialization(), TryOCLZeroOpaqueTypeInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryUserDefinedConversion(), TryValueInitialization(), tryVectorConvertAndSplat(), UseArgumentDependentLookup(), UsualUnaryConversions(), ValidateObjCLiteralInterfaceDecl(), VerifyBitField(), VerifyIntegerConstantExpression(), warnAboutRedundantParens(), WarnConflictingTypedMethods(), and warnOnReservedIdentifier().

◆ getLocationOfStringLiteralByte()

SourceLocation Sema::getLocationOfStringLiteralByte ( const StringLiteral SL,
unsigned  ByteNo 
) const

◆ getLocForEndOfToken()

SourceLocation Sema::getLocForEndOfToken ( SourceLocation  Loc,
unsigned  Offset = 0 
)

Calls Lexer::getLocForEndOfToken()

Definition at line 58 of file Sema.cpp.

References clang::Lexer::getLocForEndOfToken(), LangOpts, and SourceMgr.

Referenced by ActOnAtEnd(), ActOnCXXDelete(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnLambdaExpressionAfterIntroducer(), actOnObjCTypeArgsOrProtocolQualifiers(), actOnObjCTypeParam(), addFixitForObjCARCConversion(), adornObjCBoolConversionDiagWithTernaryFixit(), AtomicPropertySetterGetterRules(), BuildLambdaExpr(), CheckCompletedCXXClass(), CheckConversionDeclarator(), CheckEquivalentExceptionSpec(), CheckExplicitlyDefaultedComparison(), CheckFunctionDeclaration(), CheckLogicalOperands(), CheckMain(), CheckMemorySizeofForComparison(), CheckObjCBridgeRelatedConversions(), CheckParameter(), checkStringLiteralArgumentAttr(), checkTypeParamListConsistency(), CheckUsingDeclQualifier(), CreateBuiltinBinOp(), CreateIfFixit(), CreatePropertyDecl(), clang::InitializationSequence::Diagnose(), DiagnoseAlwaysNonNullPointer(), DiagnoseAssignmentAsCondition(), DiagnoseDirectIsaAccess(), diagnoseLogicalNotOnLHSofCheck(), DiagnoseMismatchedNewDelete(), DiagnoseNarrowingInInitList(), diagnoseNoViableConversion(), diagnoseObjCARCConversion(), diagnoseObjCLiteralComparison(), DiagnoseSentinelCalls(), diagnoseXorMisusedAsPow(), DoEmitAvailabilityWarning(), clang::DeclSpec::Finish(), fixItNullability(), GetFullTypeForDeclarator(), handleFallThroughAttr(), isNullPointerValueTemplateArgument(), maybeRecoverWithZeroInitialization(), ParseObjCEncodeExpression(), SemaBuiltinDumpStruct(), setTagNameForLinkagePurposes(), SuggestInitializationFixit(), clang::ConversionFixItGenerator::tryToFixConversion(), tryToRecoverWithCall(), warnAboutAmbiguousFunction(), 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 1569 of file SemaLookup.cpp.

References CodeSynthesisContextLookupModules, CodeSynthesisContexts, getDefiningModule(), and LookupModulesCache.

Referenced by isModuleVisible().

◆ getMessageSendResultType()

QualType Sema::getMessageSendResultType ( const Expr Receiver,
QualType  ReceiverType,
ObjCMethodDecl Method,
bool  isClassMessage,
bool  isSuperMessage 
)

◆ 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 2721 of file Sema.cpp.

References DeleteExprs.

◆ getModuleLoader()

ModuleLoader & Sema::getModuleLoader ( ) const

Retrieve the module loader associated with the preprocessor.

Definition at line 62 of file Sema.cpp.

References clang::Preprocessor::getModuleLoader(), and PP.

Referenced by ActOnModuleDecl(), ActOnModuleImport(), BuildModuleInclude(), and createImplicitModuleImportForErrorRecovery().

◆ getMoreSpecializedPartialSpecialization() [1/2]

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
PS1the first class template partial specialization
PS2the 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 6064 of file SemaTemplateDeduction.cpp.

References clang::ClassTemplatePartialSpecializationDecl::getInjectedSpecializationType(), and getMoreSpecialized().

Referenced by CheckVarTemplateId(), and getPatternForClassTemplateSpecialization().

◆ getMoreSpecializedPartialSpecialization() [2/2]

VarTemplatePartialSpecializationDecl * Sema::getMoreSpecializedPartialSpecialization ( VarTemplatePartialSpecializationDecl PS1,
VarTemplatePartialSpecializationDecl PS2,
SourceLocation  Loc 
)

◆ getMoreSpecializedTemplate()

FunctionTemplateDecl * Sema::getMoreSpecializedTemplate ( FunctionTemplateDecl FT1,
FunctionTemplateDecl FT2,
SourceLocation  Loc,
TemplatePartialOrderingContext  TPOC,
unsigned  NumCallArguments1,
QualType  RawObj1Ty = {},
QualType  RawObj2Ty = {},
bool  Reversed = false 
)

Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]).

Parameters
FT1the first function template
FT2the second function template
TPOCthe context in which we are performing partial ordering of function templates.
NumCallArguments1The number of arguments in the call to FT1, used only when TPOC is TPOC_Call.
RawObj1TyThe type of the object parameter of FT1 if a member function only used if TPOC is TPOC_Call and FT1 is a Function template from a member function
RawObj2TyThe type of the object parameter of FT2 if a member function only used if TPOC is TPOC_Call and FT2 is a Function template from a member function
ReversedIf true, exactly one of FT1 and FT2 is an overload candidate with a reversed parameter order. In this case, the corresponding P/A pairs between FT1 and FT2 are reversed.
Returns
the more specialized function template. If neither template is more specialized, returns NULL.

Definition at line 5503 of file SemaTemplateDeduction.cpp.

References Context, clang::Type::getAs(), clang::TemplateDecl::getAssociatedConstraints(), GetImplicitObjectParameterType(), clang::TemplateArgument::getKind(), clang::ASTContext::getLangOpts(), clang::CXXMethodDecl::getRefQualifier(), clang::FunctionDecl::getReturnType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), IsAtLeastAsConstrained(), isAtLeastAsSpecializedAs(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::Type::isRValueReferenceType(), P, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_elements(), clang::TemplateArgument::pack_size(), clang::FunctionDecl::param_size(), clang::FunctionProtoType::param_type_begin(), clang::FunctionProtoType::param_type_end(), clang::FunctionDecl::parameters(), clang::Reversed, clang::RQ_RValue, clang::TemplateParameterList::size(), TemplateParameterListsAreEqual(), TPL_TemplateParamsEquivalent, clang::TPOC_Call, and clang::TPOC_Conversion.

Referenced by getMostSpecialized(), and clang::isBetterOverloadCandidate().

◆ 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
SpecBeginthe start iterator of the function template specializations that we will be comparing.
SpecEndthe end iterator of the function template specializations, paired with SpecBegin.
Locthe location where the ambiguity or no-specializations diagnostic should occur.
NoneDiagpartial diagnostic used to diagnose cases where there are no matching candidates.
AmbigDiagpartial diagnostic used to diagnose an ambiguity, if one occurs.
CandidateDiagpartial 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 5742 of file SemaTemplateDeduction.cpp.

References Diag(), getMoreSpecializedTemplate(), getTemplateArgumentBindingsText(), HandleFunctionTypeMismatch(), clang::QualType::isNull(), isSameTemplate(), clang::TemplateSpecCandidateSet::NoteCandidates(), and clang::TPOC_Other.

Referenced by ActOnExplicitInstantiation(), and CheckFunctionTemplateSpecialization().

◆ getNamedReturnInfo() [1/2]

Sema::NamedReturnInfo Sema::getNamedReturnInfo ( const VarDecl VD)

Determine whether the given NRVO candidate variable is move-eligible or copy-elidable, without considering function return type.

Parameters
VDThe NRVO candidate variable.
Returns
An aggregate which contains the Candidate and isMoveEligible and isCopyElidable methods. If Candidate is non-null, it means isMoveEligible() would be true under the most permissive language standard.

Definition at line 3481 of file SemaStmt.cpp.

References Context, clang::ASTContext::getDeclAlign(), clang::Decl::getKind(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::Decl::hasAttr(), clang::VarDecl::hasDependentAlignment(), clang::VarDecl::hasLocalStorage(), clang::VarDecl::isExceptionVariable(), clang::Type::isObjectType(), clang::Type::isRValueReferenceType(), clang::QualType::isVolatileQualified(), clang::Sema::NamedReturnInfo::MoveEligible, and clang::Sema::NamedReturnInfo::MoveEligibleAndCopyElidable.

◆ getNamedReturnInfo() [2/2]

Sema::NamedReturnInfo Sema::getNamedReturnInfo ( Expr *&  E,
SimplerImplicitMoveMode  Mode = SimplerImplicitMoveMode::Normal 
)

Determine whether the given expression might be move-eligible or copy-elidable in either a (co_)return statement or throw expression, without considering function return type, if applicable.

Parameters
EThe expression being returned from the function or block, being thrown, or being co_returned from a coroutine. This expression might be modified by the implementation.
ModeOverrides detection of current language mode and uses the rules for C++23.
Returns
An aggregate which contains the Candidate and isMoveEligible and isCopyElidable methods. If Candidate is non-null, it means isMoveEligible() would be true under the most permissive language standard.

Definition at line 3447 of file SemaStmt.cpp.

References clang::Sema::NamedReturnInfo::Candidate, clang::Expr::containsErrors(), Context, clang::CPlusPlus23, clang::ImplicitCastExpr::Create(), ForceOff, ForceOn, clang::VarDecl::getInit(), getLangOpts(), getNamedReturnInfo(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::Expr::IgnoreParens(), clang::Expr::isXValue(), and clang::VK_XValue.

Referenced by BuildCoreturnStmt(), BuildCXXThrow(), BuildReturnStmt(), and getNamedReturnInfo().

◆ GetNameForDeclarator()

DeclarationNameInfo Sema::GetNameForDeclarator ( Declarator D)

◆ GetNameFromUnqualifiedId()

DeclarationNameInfo Sema::GetNameFromUnqualifiedId ( const UnqualifiedId Name)

Retrieves the declaration name from a parsed unqualified-id.

Definition at line 5889 of file SemaDecl.cpp.

References Context, CurContext, clang::ASTContext::DeclarationNames, Diag(), clang::TemplateName::getAsTemplateDecl(), clang::ASTContext::getCanonicalType(), clang::DeclarationNameTable::getCXXConstructorName(), clang::DeclarationNameTable::getCXXConversionFunctionName(), clang::DeclarationNameTable::getCXXDeductionGuideName(), clang::DeclarationNameTable::getCXXDestructorName(), clang::DeclarationNameTable::getCXXLiteralOperatorName(), clang::DeclarationNameTable::getCXXOperatorName(), clang::NamedDecl::getIdentifier(), clang::ASTContext::getNameForTemplate(), getTemplateNameKindForDiagnostics(), clang::ASTContext::getTypeDeclType(), GetTypeFromParser(), clang::IK_ConstructorName, clang::IK_ConstructorTemplateId, clang::IK_ConversionFunctionId, clang::IK_DeductionGuideName, clang::IK_DestructorName, clang::IK_Identifier, clang::IK_ImplicitSelfParam, clang::IK_LiteralOperatorId, clang::IK_OperatorFunctionId, clang::IK_TemplateId, int, clang::QualType::isNull(), NoteTemplateLocation(), clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::DeclarationNameInfo::setLoc(), clang::DeclarationNameInfo::setName(), and clang::DeclarationNameInfo::setNamedTypeInfo().

Referenced by ActOnAliasDeclaration(), ActOnMSDependentExistsStmt(), ActOnTemplateName(), ActOnUsingDeclaration(), CheckMicrosoftIfExistsSymbol(), DecomposeUnqualifiedId(), GetNameForDeclarator(), and clang::Parser::ParseOpenMPVarList().

◆ 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 2359 of file SemaDecl.cpp.

References clang::CPlusPlus, clang::Scope::DeclScope, and getLangOpts().

Referenced by ActOnEnumConstant(), ActOnTag(), and MergeTypedefNameDecl().

◆ 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 2247 of file SemaExpr.cpp.

References Context, getLangOpts(), isCapturingReferenceToHostVarInCUDADeviceLambda(), isOpenMPCapturedDecl(), isUnevaluatedContext(), clang::NOUR_Constant, clang::NOUR_None, and clang::NOUR_Unevaluated.

Referenced by BuildDeclRefExpr(), and BuildMemberExpr().

◆ getNonTagTypeDeclKind()

Sema::NonTagKind Sema::getNonTagTypeDeclKind ( const Decl D,
TagTypeKind  TTK 
)

◆ getNormalizedAssociatedConstraints()

const NormalizedConstraint * Sema::getNormalizedAssociatedConstraints ( NamedDecl ConstrainedDecl,
ArrayRef< const Expr * >  AssociatedConstraints 
)

◆ getNSErrorIdent()

IdentifierInfo * Sema::getNSErrorIdent ( )

Retrieve the identifier "NSError".

Definition at line 4254 of file SemaType.cpp.

References clang::Preprocessor::getIdentifierInfo(), and PP.

Referenced by checkSwiftAsyncErrorBlock(), classifyPointerDeclarator(), isCFError(), and isErrorParameter().

◆ getNullabilityKeyword()

IdentifierInfo * Sema::getNullabilityKeyword ( NullabilityKind  nullability)

◆ getNumArgumentsInExpansion()

std::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 821 of file SemaTemplateVariadic.cpp.

References CurrentInstantiationScope, clang::LocalInstantiationScope::findInstantiationOf(), clang::getDepthAndIndex(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::MultiLevelTemplateArgumentList::hasTemplateArgument(), and clang::Result.

Referenced by getPackIndexForParam(), and clang::TemplateDeclInstantiator::SubstFunctionType().

◆ getObjCContainerKind()

Sema::ObjCContainerKind Sema::getObjCContainerKind ( ) const

◆ getObjCDeclContext()

ObjCContainerDecl * Sema::getObjCDeclContext ( ) const

Definition at line 20604 of file SemaDecl.cpp.

References CurContext.

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
IdThe 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.
IdLocThe location of the name in the translation unit.
DoTypoCorrectionIf 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 2310 of file SemaDecl.cpp.

References clang::C, CorrectTypo(), CTK_ErrorRecovery, diagnoseTypo(), clang::ObjCInterfaceDecl::getDefinition(), clang::NamedDecl::getIdentifier(), Id, LookupOrdinaryName, LookupSingleName(), PDiag(), and TUScope.

Referenced by ActOnClassPropertyRefExpr(), ActOnDefs(), ActOnStartCategoryImplementation(), and ActOnStartCategoryInterface().

◆ getObjCMessageKind()

Sema::ObjCMessageKind Sema::getObjCMessageKind ( Scope S,
IdentifierInfo Name,
SourceLocation  NameLoc,
bool  IsSuper,
bool  HasTrailingDot,
ParsedType ReceiverType 
)

◆ getOpenCLOptions()

OpenCLOptions & clang::Sema::getOpenCLOptions ( )
inline

◆ getOpenMPCapturedExpr()

ExprResult Sema::getOpenMPCapturedExpr ( VarDecl Capture,
ExprValueKind  VK,
ExprObjectKind  OK,
SourceLocation  Loc 
)

◆ getOpenMPCaptureLevels()

int Sema::getOpenMPCaptureLevels ( OpenMPDirectiveKind  Kind)
static

◆ getOpenMPDeclareMapperVarName()

const ValueDecl * Sema::getOpenMPDeclareMapperVarName ( ) const

Definition at line 22910 of file SemaOpenMP.cpp.

References DSAStack, and LangOpts.

Referenced by DiagnoseUseOfDecl().

◆ 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 1626 of file Sema.h.

References OptimizeOffPragmaLocation.

◆ GetOrCreateMSAsmLabel()

LabelDecl * Sema::GetOrCreateMSAsmLabel ( StringRef  ExternalLabelName,
SourceLocation  Location,
bool  AlwaysCreate 
)

◆ getOrCreateStdNamespace()

NamespaceDecl * Sema::getOrCreateStdNamespace ( )

◆ getOwningModule()

Module * clang::Sema::getOwningModule ( const Decl Entity)
inline

Get the module owning an entity.

Definition at line 2776 of file Sema.h.

References clang::Decl::getOwningModule().

Referenced by diagnoseMissingImport(), getDefiningModule(), and hasAcceptableDefaultArgument().

◆ getPreprocessor()

Preprocessor & clang::Sema::getPreprocessor ( ) const
inline

◆ getPrintable() [1/13]

static bool clang::Sema::getPrintable ( bool  B)
inlinestatic

Definition at line 11675 of file Sema.h.

◆ getPrintable() [2/13]

static const char * clang::Sema::getPrintable ( const char *  S)
inlinestatic

Definition at line 11676 of file Sema.h.

◆ getPrintable() [3/13]

static SourceRange clang::Sema::getPrintable ( const Expr E)
inlinestatic

Definition at line 11686 of file Sema.h.

References clang::Stmt::getSourceRange().

◆ getPrintable() [4/13]

static const IdentifierInfo * clang::Sema::getPrintable ( const IdentifierInfo II)
inlinestatic

Definition at line 11679 of file Sema.h.

◆ getPrintable() [5/13]

static const std::string & clang::Sema::getPrintable ( const std::string &  S)
inlinestatic

Definition at line 11678 of file Sema.h.

◆ getPrintable() [6/13]

static DeclarationName clang::Sema::getPrintable ( DeclarationName  N)
inlinestatic

Definition at line 11682 of file Sema.h.

◆ getPrintable() [7/13]

static int clang::Sema::getPrintable ( int  I)
inlinestatic

Definition at line 11673 of file Sema.h.

◆ getPrintable() [8/13]

static QualType clang::Sema::getPrintable ( QualType  T)
inlinestatic

Definition at line 11683 of file Sema.h.

◆ getPrintable() [9/13]

static SourceRange clang::Sema::getPrintable ( SourceLocation  L)
inlinestatic

Definition at line 11685 of file Sema.h.

◆ getPrintable() [10/13]

static SourceRange clang::Sema::getPrintable ( SourceRange  R)
inlinestatic

Definition at line 11684 of file Sema.h.

◆ getPrintable() [11/13]

static StringRef clang::Sema::getPrintable ( StringRef  S)
inlinestatic

Definition at line 11677 of file Sema.h.

◆ getPrintable() [12/13]

static SourceRange clang::Sema::getPrintable ( TypeLoc  TL)
inlinestatic

Definition at line 11687 of file Sema.h.

References clang::TypeLoc::getSourceRange().

◆ getPrintable() [13/13]

static unsigned clang::Sema::getPrintable ( unsigned  I)
inlinestatic

Definition at line 11674 of file Sema.h.

◆ getPrintingPolicy() [1/2]

PrintingPolicy clang::Sema::getPrintingPolicy ( ) const
inline

◆ getPrintingPolicy() [2/2]

PrintingPolicy Sema::getPrintingPolicy ( const ASTContext Ctx,
const Preprocessor PP 
)
static

◆ getReturnTypeLoc()

TypeLoc Sema::getReturnTypeLoc ( FunctionDecl FD) const

◆ 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 2122 of file Sema.cpp.

References clang::Scope::DeclScope, getCurScope(), clang::DeclContext::getPrimaryContext(), and clang::Scope::TemplateParamScope.

Referenced by DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), handleIBOutletCollection(), and TryTypoCorrectionForCall().

◆ 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 1580 of file SemaDecl.cpp.

References clang::DeclContext::getPrimaryContext().

Referenced by ActOnFriendFunctionDecl(), ActOnTag(), and CheckClassTemplate().

◆ getSelfAssignmentClassMemberCandidate()

const FieldDecl * Sema::getSelfAssignmentClassMemberCandidate ( const ValueDecl SelfAssigned)

Returns a field in a CXXRecordDecl that has the same name as the decl SelfAssigned when inside a CXXMethodDecl.

Definition at line 15388 of file SemaExpr.cpp.

References getCurFunctionDecl(), clang::NamedDecl::getDeclName(), and Parent.

Referenced by DiagnoseSelfAssignment(), and DiagnoseSelfMove().

◆ getShadowedDeclaration() [1/3]

NamedDecl * Sema::getShadowedDeclaration ( const BindingDecl D,
const LookupResult R 
)

Return the declaration shadowed by the given variable D, or null if it doesn't shadow any declaration or shadowing warnings are disabled.

Definition at line 8338 of file SemaDecl.cpp.

References Diags, clang::LookupResult::getFoundDecl(), and shouldWarnIfShadowedDecl().

◆ getShadowedDeclaration() [2/3]

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 8323 of file SemaDecl.cpp.

References Diags, clang::Decl::getDeclContext(), clang::LookupResult::getFoundDecl(), clang::DeclContext::isRecord(), and shouldWarnIfShadowedDecl().

Referenced by ActOnDecompositionDeclarator(), ActOnTypedefNameDecl(), ActOnVariableDeclarator(), and CheckShadow().

◆ getShadowedDeclaration() [3/3]

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 8307 of file SemaDecl.cpp.

References Diags, clang::LookupResult::getFoundDecl(), clang::VarDecl::hasGlobalStorage(), clang::VarDecl::isStaticLocal(), and shouldWarnIfShadowedDecl().

◆ GetSignedSizelessVectorType()

QualType Sema::GetSignedSizelessVectorType ( QualType  V)

◆ GetSignedVectorType()

QualType Sema::GetSignedVectorType ( QualType  V)

◆ getSourceManager()

SourceManager & clang::Sema::getSourceManager ( ) const
inline

Definition at line 499 of file Sema.h.

References SourceMgr.

Referenced by ActOnAnnotModuleEnd(), ActOnCXXTryBlock(), ActOnFields(), ActOnFinishFunctionBody(), ActOnModuleDecl(), ActOnStringLiteral(), ActOnVariableDeclarator(), addFixitForObjCARCConversion(), BuildCXXNew(), BuildCXXThrow(), BuildModuleInclude(), BuildUsingDeclaration(), checkInitMethod(), CheckLiteralOperatorDeclaration(), CheckMemaccessSize(), CheckMoveOnConstruction(), CheckNontrivialField(), checkTargetClonesAttrString(), CheckUnreachable(), CheckVirtualDtorCall(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAlwaysNonNullPointer(), DiagnoseBaseOrMemInitializerOrder(), diagnoseIgnoredQualifiers(), DiagnoseMismatchedNewDelete(), diagnoseRepeatedUseOfWeak(), diagnoseUseOfInternalDeclInInlineFunction(), diagnoseXorMisusedAsPow(), DiagReservedModuleName(), DoEmitAvailabilityWarning(), EmitDiagForCXXThrowInNonThrowingFunc(), clang::sema::SemaPPCallbacks::FileChanged(), findMacroSpelling(), clang::DeclSpec::Finish(), GetFullTypeForDeclarator(), getLocationOfStringLiteralByte(), getUDSuffixLoc(), handleInitPriorityAttr(), handleObjCOwnershipTypeAttr(), handleStandardNoReturnAttr(), InstantiateFunctionDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), InstantiateVariableDefinition(), IsEnumConstOrFromMacro(), isLibstdcxxPointerReturnFalseHack(), isSameWidthConstantConversion(), maybeAddCUDAHostDeviceAttrs(), notePreviousDefinition(), ParseObjCSelectorExpression(), clang::PrintingCodeCompleteConsumer::ProcessOverloadCandidates(), and SemaBuiltinOverflow().

◆ getSpecialMember()

CXXSpecialMember clang::Sema::getSpecialMember ( const CXXMethodDecl MD)
inline

◆ getStdAlignValT()

EnumDecl * Sema::getStdAlignValT ( ) const

◆ getStdBadAlloc()

CXXRecordDecl * Sema::getStdBadAlloc ( ) const

◆ getStdNamespace()

NamespaceDecl * Sema::getStdNamespace ( ) const

◆ getSuperIdentifier()

IdentifierInfo * Sema::getSuperIdentifier ( ) const

Definition at line 2695 of file Sema.cpp.

References Context, clang::IdentifierTable::get(), and clang::ASTContext::Idents.

◆ getTemplateArgumentBindingsText() [1/2]

std::string Sema::getTemplateArgumentBindingsText ( const TemplateParameterList Params,
const TemplateArgument Args,
unsigned  NumArgs 
)

◆ getTemplateArgumentBindingsText() [2/2]

std::string Sema::getTemplateArgumentBindingsText ( const TemplateParameterList Params,
const TemplateArgumentList Args 
)

◆ getTemplateArgumentPackExpansionPattern()

TemplateArgumentLoc Sema::getTemplateArgumentPackExpansionPattern ( TemplateArgumentLoc  OrigLoc,
SourceLocation Ellipsis,
std::optional< unsigned > &  NumExpansions 
) const

Returns the pattern of the pack expansion for a template argument.

Parameters
OrigLocThe template argument to expand.
EllipsisWill be set to the location of the ellipsis.
NumExpansionsWill be set to the number of expansions that will be generated from this pack expansion, if known a priori.

Definition at line 1132 of file SemaTemplateVariadic.cpp.

References clang::TypeLoc::castAs(), Context, clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsType(), clang::PackExpansionExpr::getEllipsisLoc(), clang::PackExpansionTypeLoc::getEllipsisLoc(), clang::TemplateArgument::getKind(), clang::PackExpansionExpr::getNumExpansions(), clang::PackExpansionType::getNumExpansions(), clang::TemplateArgument::getNumTemplateExpansions(), clang::TemplateArgument::getPackExpansionPattern(), clang::PackExpansionExpr::getPattern(), clang::PackExpansionTypeLoc::getPatternLoc(), clang::TemplateArgumentLoc::getTemplateEllipsisLoc(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeLoc::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TemplateArgument::Integral, clang::TemplateArgument::isPackExpansion(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TypeLocBuilder::pushFullCopy(), clang::TemplateArgument::StructuralValue, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

◆ getTemplateDepth()

unsigned Sema::getTemplateDepth ( Scope S) const

Determine the number of levels of enclosing template parameters.

This is only usable while parsing. Note that this does not include dependent contexts in which no template parameters have yet been declared, such as in a terse function template or generic lambda before the first 'auto' is encountered.

Definition at line 56 of file SemaTemplate.cpp.

References getFunctionScopes(), and getInventedParameterInfos().

Referenced by ActOnStmtExpr(), and EnterTemplatedContext().

◆ getTemplateInstantiationArgs()

MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs ( const NamedDecl ND,
const DeclContext DC = nullptr,
bool  Final = false,
std::optional< ArrayRef< TemplateArgument > >  Innermost = std::nullopt,
bool  RelativeToPrimary = false,
const FunctionDecl Pattern = nullptr,
bool  ForConstraintInstantiation = false,
bool  SkipForSpecialization = false 
)

Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.

Parameters
NDthe declaration for which we are computing template instantiation arguments.
DCIn the event we don't HAVE a declaration yet, we instead provide the decl context where it will be created. In this case, the Innermost should likely be provided. If ND is non-null, this is ignored.
Innermostif non-NULL, specifies a template argument list for the template declaration passed as ND.
RelativeToPrimarytrue 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.
PatternIf non-NULL, indicates the pattern from which we will be instantiating the definition of the given declaration, ND. This is used to determine the proper set of template instantiation arguments for friend function template specializations.
ForConstraintInstantiationwhen collecting arguments, ForConstraintInstantiation indicates we should continue looking when encountering a lambda generic call operator, and continue looking for arguments on an enclosing class template.

Definition at line 368 of file SemaTemplateInstantiate.cpp.

References clang::Decl::castFromDeclContext(), Context, clang::Function, clang::Decl::isFileContextDecl(), and clang::Result.

Referenced by ActOnExplicitInstantiation(), BuildCXXDefaultInitExpr(), CalculateTemplateDepthForConstraints(), CheckDeducedArgumentConstraints(), CheckTemplateArgumentList(), InstantiateClassTemplateSpecialization(), InstantiateClassTemplateSpecializationMembers(), InstantiateDefaultArgument(), InstantiateExceptionSpec(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), RequireCompleteEnumDecl(), SubstDefaultArgument(), SubstituteConstraintExpressionWithoutSatisfaction(), SubstituteExplicitTemplateArguments(), and substituteParameterMappings().

◆ getTemplateNameKindForDiagnostics()

Sema::TemplateNameKindForDiagnostics Sema::getTemplateNameKindForDiagnostics ( TemplateName  Name)

◆ getTopMostPointOfInstantiation()

SourceLocation Sema::getTopMostPointOfInstantiation ( const NamedDecl N) const

Returns the top most location responsible for the definition of N.

If N is a a template specialization, this is the location of the top of the instantiation stack. Otherwise, the location of N is returned.

Definition at line 12177 of file SemaTemplate.cpp.

References CodeSynthesisContexts, clang::CPlusPlus, getLangOpts(), clang::Decl::getLocation(), clang::isa(), and clang::FunctionDecl::isFunctionTemplateSpecialization().

Referenced by DoEmitAvailabilityWarning().

◆ 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
ArgThe template argument we are producing template argument location information for.
NTTPTypeFor 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.
LocThe source location to use for the resulting template argument.

Definition at line 2637 of file SemaTemplateDeduction.cpp.

References BuildExpressionFromDeclTemplateArgument(), BuildExpressionFromNonTypeTemplateArgument(), Context, clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateArgument::getAsExpr(), clang::TemplateName::getAsQualifiedTemplateName(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getNullPtrType(), clang::TemplateArgument::getParamTypeForDecl(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TemplateArgument::Integral, clang::QualType::isNull(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::StructuralValue, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

Referenced by checkBuiltinTemplateIdType(), ConvertDeducedTemplateArgument(), FindInstantiatedDecl(), formImmediatelyDeclaredConstraint(), getIdentityTemplateArgumentLoc(), getTrivialIntegralTemplateArgument(), getTrivialTypeTemplateArgument(), and isTemplateTemplateParameterAtLeastAsSpecializedAs().

◆ GetTypeForDeclarator()

TypeSourceInfo * Sema::GetTypeForDeclarator ( Declarator D)

◆ GetTypeForDeclaratorCast()

TypeSourceInfo * Sema::GetTypeForDeclaratorCast ( Declarator D,
QualType  FromTy 
)

◆ GetTypeFromParser()

QualType Sema::GetTypeFromParser ( ParsedType  Ty,
TypeSourceInfo **  TInfo = nullptr 
)
static

Definition at line 3213 of file SemaType.cpp.

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

Referenced by ActOnAliasDeclaration(), ActOnAlignasTypeArgument(), ActOnArrayTypeTrait(), ActOnAsTypeExpr(), ActOnBaseSpecifier(), ActOnBuiltinOffsetOf(), ActOnClassMessage(), ActOnCompoundLiteral(), ActOnConvertVectorExpr(), ActOnCXXTypeConstructExpr(), ActOnCXXTypeid(), ActOnCXXUuidof(), ActOnGenericSelectionExpr(), ActOnMethodDeclaration(), ActOnObjCBridgedCast(), actOnObjCTypeArgsAndProtocolQualifiers(), actOnObjCTypeArgsOrProtocolQualifiers(), actOnObjCTypeParam(), ActOnOMPIteratorExpr(), ActOnOpenMPDeclareMapperType(), ActOnOpenMPDeclareReductionType(), ActOnPackExpansion(), ActOnPseudoDestructorExpr(), ActOnSuperClassOfClassInterface(), ActOnSYCLUniqueStableNameExpr(), ActOnTag(), ActOnTemplateName(), ActOnTemplateTypeArgument(), ActOnTypeParameter(), ActOnTypeRequirement(), ActOnTypeTrait(), ActOnUnaryExprOrTypeTraitExpr(), ActOnUsingEnumDeclaration(), ActOnVAArg(), AddClassMessageCompletions(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), canDelayFunctionBody(), CheckConversionDeclarator(), CheckDeductionGuideDeclarator(), CheckDestructorDeclarator(), checkExceptionSpecification(), ConvertDeclSpecToType(), CreateNewFunctionDecl(), GetDeclSpecTypeForDeclarator(), getDestructorName(), getDestructorTypeForDecltype(), GetFullTypeForDeclarator(), GetNameFromUnqualifiedId(), handleAlignedAttr(), handleIBOutletCollection(), handleLifetimeCategoryAttr(), handlePreferredName(), handlePreferredTypeAttr(), handleTypeTagForDatatypeAttr(), handleVecTypeHint(), ParseObjCEncodeExpression(), ProcessAPINotes(), RebuildDeclaratorInCurrentInstantiation(), 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,
ImplicitTypenameContext  AllowImplicitTypename = ImplicitTypenameContext::No,
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 286 of file SemaDecl.cpp.

References ActOnTypenameType(), clang::LookupResult::Ambiguous, clang::LookupResult::AmbiguousTagHiding, buildNamedType(), CheckTypenameType(), computeDeclContext(), Context, CorrectTypo(), clang::CPlusPlus, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), CreateParsedType(), CTK_ErrorRecovery, clang::declaresSameEntity(), Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::OpaquePtr< PtrTy >::get(), clang::ActionResult< PtrTy, Compress >::get(), clang::getAsTypeTemplateDecl(), clang::SourceRange::getBegin(), clang::TypoCorrection::getCorrectionAsIdentifierInfo(), clang::TypoCorrection::getCorrectionSpecifier(), clang::ASTContext::getDeducedTemplateSpecializationType(), clang::ASTContext::getDependentNameType(), getLangOpts(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::ASTContext::getObjCInterfaceType(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::UsingShadowDecl::getTargetDecl(), clang::ASTContext::getTypeDeclType(), getTypeName(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::NamedDecl::getUnderlyingDecl(), clang::ASTContext::getUsingType(), clang::CXXScopeSpec::getWithLocInContext(), clang::ASTContext::IntTy, clang::DeclContext::isDependentContext(), isDependentScopeSpecifier(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isNotEmpty(), clang::QualType::isNull(), clang::Type::isRecordType(), isTemplateName(), LookupName(), LookupNestedNameSpecifierName, LookupOrdinaryName, LookupQualifiedName(), clang::OpaquePtr< QualType >::make(), clang::CXXScopeSpec::MakeTrivial(), MarkAnyDeclReferenced(), clang::No, clang::None, clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, PDiag(), clang::TypeLocBuilder::push(), recoverFromTypeInKnownDependentBase(), RequireCompleteDeclContext(), clang::Result, clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::Typename, and clang::Yes.

Referenced by ActOnPseudoDestructorExpr(), ActOnUsingEnumDeclaration(), DiagnoseUnknownTypeName(), findOMPAllocatorHandleT(), findOMPAlloctraitT(), findOMPDependT(), findOMPEventHandleT(), getTypeName(), handleIBOutletCollection(), and clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().

◆ getTypoExprState()

const Sema::TypoExprState & Sema::getTypoExprState ( TypoExpr TE) const

Definition at line 5873 of file SemaLookup.cpp.

Referenced by ActOnIdExpression().

◆ 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 814 of file Sema.cpp.

References clang::VarDecl::DeclarationOnly, clang::Decl::hasAttr(), isExternalWithNoLinkageType(), clang::Decl::isInvalidDecl(), and UndefinedButUsed.

Referenced by checkUndefinedButUsed().

◆ getVariadicCallType()

Sema::VariadicCallType Sema::getVariadicCallType ( FunctionDecl FDecl,
const FunctionProtoType Proto,
Expr Fn 
)

◆ HandleDeclarator()

NamedDecl * Sema::HandleDeclarator ( Scope S,
Declarator D,
MultiTemplateParamsArg  TemplateParameterLists 
)

Get the innermost enclosing declaration scope.

Definition at line 6344 of file SemaDecl.cpp.

References ActOnDecompositionDeclarator(), ActOnFunctionDeclarator(), ActOnTypedefDeclarator(), ActOnVariableDeclarator(), checkDeclIsAllowedInOpenMPTarget(), CheckExtraCXXDefaultArguments(), computeDeclContext(), clang::CPlusPlus, CurContext, Diag(), DiagnoseClassNameShadow(), diagnoseQualifiedDeclaration(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForExternalRedeclaration, forRedeclarationInCurContext(), clang::DeclSpec::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::DeclContext::getEnclosingNamespaceContext(), clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::Declarator::getName(), clang::DeclarationNameInfo::getName(), GetNameForDeclarator(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::CXXScopeSpec::getScopeRep(), clang::DeclSpec::getSourceRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), hasDefinition(), clang::IK_TemplateId, clang::Declarator::isDecompositionDeclarator(), clang::DeclContext::isDependentContext(), clang::DeclSpec::isFriendSpecified(), clang::DeclContext::isFunctionOrMethod(), clang::Type::isFunctionType(), isInOpenMPDeclareTargetContext(), clang::CXXScopeSpec::isInvalid(), clang::Declarator::isInvalidType(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), clang::DeclContext::isTranslationUnit(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupRedeclarationWithLinkage, Previous, PushOnScopeChains(), RebuildDeclaratorInCurrentInstantiation(), RemoveUsingDecls(), RequireCompleteDeclContext(), clang::DeclSpec::SCS_extern, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, clang::Declarator::setInvalidType(), clang::UnqualifiedId::TemplateId, UPPC_DeclarationQualifier, and UPPC_DeclarationType.

Referenced by ActOnCXXMemberDeclarator(), ActOnDeclarator(), ActOnStartOfFunctionDef(), ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), and ActOnTemplateDeclarator().

◆ HandleDelayedAccessCheck()

void Sema::HandleDelayedAccessCheck ( sema::DelayedDiagnostic DD,
Decl Ctx 
)

◆ handleDelayedAvailabilityCheck()

void Sema::handleDelayedAvailabilityCheck ( sema::DelayedDiagnostic DD,
Decl Ctx 
)

◆ HandleDependentAccessCheck()

void Sema::HandleDependentAccessCheck ( const DependentDiagnostic DD,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ HandleExprEvaluationContextForTypeof()

ExprResult Sema::HandleExprEvaluationContextForTypeof ( Expr E)

◆ 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 1975 of file SemaExprObjC.cpp.

References clang::SelectorTable::constructSetterSelector(), Context, CorrectTypo(), clang::FixItHint::CreateReplacement(), CTK_ErrorRecovery, Diag(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::ExprError(), clang::ObjCMethodDecl::findPropertyDecl(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::DeclarationName::getAsIdentifierInfo(), clang::Type::getAsObjCInterfacePointerType(), clang::ObjCInterfaceType::getDecl(), clang::Preprocessor::getIdentifierTable(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::ObjCObjectPointerType::getInterfaceType(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::SelectorTable::getNullarySelector(), clang::ObjCObjectPointerType::getPointeeType(), clang::Preprocessor::getSelectorTable(), clang::Stmt::getSourceRange(), HandleExprPropertyRefExpr(), clang::DeclarationName::isIdentifier(), clang::Decl::isImplicit(), clang::ObjCMethodDecl::isPropertyAccessor(), clang::ObjCPropertyAttribute::kind_setter, clang::ObjCInterfaceDecl::lookupInstanceMethod(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), LookupMethodInQualifiedType(), LookupOrdinaryName, clang::ObjCInterfaceDecl::lookupPrivateMethod(), clang::Member, clang::OBJC_PR_query_instance, clang::OK_ObjCProperty, PDiag(), PP, clang::ASTContext::PseudoObjectTy, clang::ObjCObjectPointerType::quals(), RequireCompleteType(), and clang::VK_LValue.

Referenced by ActOnClassPropertyRefExpr(), HandleExprPropertyRefExpr(), and LookupMemberExpr().

◆ 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 18546 of file SemaDecl.cpp.

References clang::LookupResult::Ambiguous, CheckExtraCXXDefaultArguments(), CheckFieldDecl(), Context, clang::CPlusPlus, Diag(), DiagnoseFunctionSpecifiers(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForVisibleRedeclaration, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::Declarator::getBeginLoc(), clang::Declarator::getDeclSpec(), clang::Declarator::getDecompositionDeclarator(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), getLangOpts(), clang::DecompositionDeclarator::getLSquareLoc(), clang::DecompositionDeclarator::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::ASTContext::IntTy, isDeclInScope(), clang::Declarator::isDecompositionDeclarator(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isModulePrivateSpecified(), clang::Decl::isTemplateParameter(), LookupMemberName, LookupName(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, Previous, PushOnScopeChains(), clang::DeclSpec::SCS_mutable, clang::Declarator::setInvalidType(), clang::NamedDecl::setModulePrivate(), and UPPC_DataMemberType.

Referenced by ActOnCXXMemberDeclarator(), and ActOnField().

◆ HandleFunctionTypeMismatch()

void Sema::HandleFunctionTypeMismatch ( PartialDiagnostic PDiag,
QualType  FromType,
QualType  ToType 
)

◆ handleLambdaNumbering()

void Sema::handleLambdaNumbering ( CXXRecordDecl Class,
CXXMethodDecl Method,
std::optional< CXXRecordDecl::LambdaNumbering NumberingOverride = std::nullopt 
)

◆ 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 19149 of file SemaDeclCXX.cpp.

References clang::LookupResult::Ambiguous, CheckExtraCXXDefaultArguments(), Context, clang::CPlusPlus, clang::MSPropertyDecl::Create(), Diag(), DiagnoseFunctionSpecifiers(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForVisibleRedeclaration, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::Declarator::getBeginLoc(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), getLangOpts(), clang::ParsedAttr::getPropertyDataGetter(), clang::ParsedAttr::getPropertyDataSetter(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::ASTContext::IntTy, isDeclInScope(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isModulePrivateSpecified(), clang::Decl::isTemplateParameter(), LookupMemberName, LookupName(), clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, Previous, ProcessDeclAttributes(), PushOnScopeChains(), clang::Decl::setAccess(), clang::Declarator::setInvalidType(), clang::NamedDecl::setModulePrivate(), TUScope, and UPPC_DataMemberType.

Referenced by ActOnCXXMemberDeclarator().

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

◆ handlerCanCatch()

bool clang::Sema::handlerCanCatch ( QualType  HandlerType,
QualType  ExceptionType 
)

◆ handleTagNumbering()

void Sema::handleTagNumbering ( const TagDecl Tag,
Scope TagScope 
)

◆ hasAcceptableDefaultArgument()

bool Sema::hasAcceptableDefaultArgument ( const NamedDecl D,
llvm::SmallVectorImpl< Module * > *  Modules,
Sema::AcceptableKind  Kind 
)

Determine if the template parameter D has a reachable default argument.

Definition at line 1658 of file SemaLookup.cpp.

References P.

Referenced by hasReachableDefaultArgument(), and hasVisibleDefaultArgument().

◆ hasAcceptableDefinition() [1/2]

bool clang::Sema::hasAcceptableDefinition ( NamedDecl D,
AcceptableKind  Kind 
)
inline

Definition at line 12010 of file Sema.h.

References hasAcceptableDefinition().

◆ hasAcceptableDefinition() [2/2]

bool Sema::hasAcceptableDefinition ( NamedDecl D,
NamedDecl **  Suggested,
AcceptableKind  Kind,
bool  OnlyNeedComplete = false 
)

◆ hasAnyAcceptableTemplateNames()

bool Sema::hasAnyAcceptableTemplateNames ( LookupResult R,
bool  AllowFunctionTemplates = true,
bool  AllowDependent = true,
bool  AllowNonTemplateFunctions = false 
)

◆ hasAnyUnrecoverableErrorsInThisFunction()

bool Sema::hasAnyUnrecoverableErrorsInThisFunction ( ) const

Determine whether any errors occurred within this function/method/ block.

Definition at line 2307 of file Sema.cpp.

References getCurFunction(), and clang::sema::FunctionScopeInfo::hasUnrecoverableErrorOccurred().

Referenced by ActOnBlockStmtExpr(), ActOnFinishFunctionBody(), and BuildStmtExpr().

◆ 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 12038 of file SemaChecking.cpp.

References clang::Expr::getType().

Referenced by checkVariadicArgument().

◆ hasExplicitCallingConv()

bool Sema::hasExplicitCallingConv ( QualType  T)

◆ hasGlobalOpenMPAssumes()

bool clang::Sema::hasGlobalOpenMPAssumes ( ) const
inline

Check if there is an active global omp assumes directive.

Definition at line 13581 of file Sema.h.

◆ hasMergedDefinitionInCurrentModule()

bool Sema::hasMergedDefinitionInCurrentModule ( const NamedDecl Def)

◆ hasReachableDeclaration()

bool clang::Sema::hasReachableDeclaration ( const NamedDecl D,
llvm::SmallVectorImpl< Module * > *  Modules = nullptr 
)
inline

Determine whether any declaration of an entity is reachable.

Definition at line 7815 of file Sema.h.

References hasReachableDeclarationSlow(), and isReachable().

◆ hasReachableDeclarationSlow()

bool Sema::hasReachableDeclarationSlow ( const NamedDecl D,
llvm::SmallVectorImpl< Module * > *  Modules = nullptr 
)

Definition at line 2047 of file SemaLookup.cpp.

References hasAcceptableDeclarationImpl(), isReachable(), and Reachable.

Referenced by hasReachableDeclaration().

◆ hasReachableDefaultArgument()

bool Sema::hasReachableDefaultArgument ( const NamedDecl D,
llvm::SmallVectorImpl< Module * > *  Modules = nullptr 
)

Determine if the template parameter D has a reachable default argument.

Definition at line 1677 of file SemaLookup.cpp.

References hasAcceptableDefaultArgument(), and Reachable.

Referenced by CheckTemplateArgumentList(), diagnoseMissingArgument(), and SubstDefaultTemplateArgumentIfAvailable().

◆ hasReachableDefinition() [1/2]

bool clang::Sema::hasReachableDefinition ( NamedDecl D)
inline

Definition at line 12002 of file Sema.h.

References hasReachableDefinition().

◆ hasReachableDefinition() [2/2]

bool Sema::hasReachableDefinition ( NamedDecl D,
NamedDecl **  Suggested,
bool  OnlyNeedComplete = false 
)

Determine if D has a reachable definition.

Determine whether there is any declaration of D that was ever a definition (perhaps before module merging) and is currently reachable.

If not, suggest a declaration that should be made reachable to expose the definition.

Parameters
DThe definition of the entity.
SuggestedFilled in with the declaration that should be made reachable in order to provide a definition of this entity.
OnlyNeedCompleteIf 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 9388 of file SemaType.cpp.

References hasAcceptableDefinition(), and Reachable.

Referenced by CheckConceptRedefinition(), computeDeclContext(), DiagnoseUninstantiableTemplate(), hasReachableDefinition(), clang::LookupResult::isAvailableForLookup(), and RequireCompleteEnumDecl().

◆ hasReachableExplicitSpecialization()

bool Sema::hasReachableExplicitSpecialization ( const NamedDecl D,
llvm::SmallVectorImpl< Module * > *  Modules = nullptr 
)

Determine if there is a reachable declaration of D that is an explicit specialization declaration for a specialization of a template.

(For a member specialization, use hasReachableMemberSpecialization.)

Definition at line 1738 of file SemaLookup.cpp.

References Reachable.

◆ hasReachableMemberSpecialization()

bool Sema::hasReachableMemberSpecialization ( const NamedDecl D,
llvm::SmallVectorImpl< Module * > *  Modules = nullptr 
)

Determine if there is a reachable declaration of D that is a member specialization declaration (as opposed to an instantiated declaration).

Definition at line 1772 of file SemaLookup.cpp.

References hasAcceptableMemberSpecialization(), and Reachable.

◆ 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 9263 of file SemaType.cpp.

References clang::Default, clang::Decl::getASTContext(), and clang::StructuralEquivalenceContext::IsEquivalent().

Referenced by ActOnDuplicateDefinition().

◆ hasUncompilableErrorOccurred()

bool Sema::hasUncompilableErrorOccurred ( ) const

Whether uncompilable error has occurred.

This includes error happens in deferred diagnostics.

Definition at line 1617 of file Sema.cpp.

References CurContext, DeviceDeferredDiags, getDiagnostics(), hasUncompilableErrorOccurred(), and clang::DiagnosticIDs::isDefaultMappingAsError().

Referenced by ActOnFinishFunctionBody(), FindInstantiatedDecl(), hasUncompilableErrorOccurred(), and clang::sema::AnalysisBasedWarnings::IssueWarnings().

◆ 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 7806 of file Sema.h.

References hasVisibleDeclarationSlow(), and isVisible().

◆ hasVisibleDeclarationSlow()

bool Sema::hasVisibleDeclarationSlow ( const NamedDecl D,
llvm::SmallVectorImpl< Module * > *  Modules 
)

Definition at line 2039 of file SemaLookup.cpp.

References hasAcceptableDeclarationImpl(), isVisible(), and Visible.

Referenced by hasVisibleDeclaration().

◆ 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 1671 of file SemaLookup.cpp.

References hasAcceptableDefaultArgument(), and Visible.

Referenced by CheckDeductionGuideTemplate(), CheckTemplateParameterList(), and isPreferredLookupResult().

◆ hasVisibleDefinition() [1/2]

bool clang::Sema::hasVisibleDefinition ( const NamedDecl D)
inline

Definition at line 11993 of file Sema.h.

References hasVisibleDefinition().

◆ hasVisibleDefinition() [2/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
DThe definition of the entity.
SuggestedFilled in with the declaration that should be made visible in order to provide a definition of this entity.
OnlyNeedCompleteIf 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 9371 of file SemaType.cpp.

References hasAcceptableDefinition(), and Visible.

Referenced by ActOnClassTemplateSpecialization(), ActOnStartClassInterface(), ActOnStartProtocolInterface(), ActOnTag(), CheckClassTemplate(), CheckForFunctionRedefinition(), checkVarDeclRedefinition(), hasVisibleDefinition(), MergeTypedefNameDecl(), and shouldSkipAnonEnumBody().

◆ 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 1732 of file SemaLookup.cpp.

References Visible.

◆ 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 1766 of file SemaLookup.cpp.

References hasAcceptableMemberSpecialization(), and Visible.

◆ hasVisibleMergedDefinition()

bool Sema::hasVisibleMergedDefinition ( const NamedDecl Def)

◆ 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 12709 of file SemaDeclCXX.cpp.

References clang::DeclarationName::CXXConversionFunctionName, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::UsingShadowDecl::getIntroducer(), clang::DeclarationName::getNameKind(), IdResolver, clang::DeclContext::removeDecl(), clang::IdentifierResolver::RemoveDecl(), and clang::BaseUsingDecl::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
Callerfunction which needs address of Callee. nullptr in case of global context.
Calleetarget function
Returns
preference value for particular Caller/Callee combination.

Definition at line 225 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, CTCK_InitGlobalVar, CurCUDATargetCtx, getLangOpts(), IdentifyCUDATarget(), clang::Sema::CUDATargetContext::Kind, and clang::Sema::CUDATargetContext::Target.

Referenced by clang::OverloadCandidateSet::BestViableFunction(), CheckCUDACall(), EraseUnwantedCUDAMatches(), IsAllowedCUDACall(), clang::isBetterOverloadCandidate(), and isUsualDeallocationFunction().

◆ IdentifyCUDATarget() [1/3]

Sema::CUDAFunctionTarget Sema::IdentifyCUDATarget ( const FunctionDecl D,
bool  IgnoreImplicitHDAttr = false 
)

◆ IdentifyCUDATarget() [2/3]

Sema::CUDAFunctionTarget Sema::IdentifyCUDATarget ( const ParsedAttributesView Attrs)

Definition at line 68 of file SemaCUDA.cpp.

References CFT_Device, CFT_Global, CFT_Host, CFT_HostDevice, and CFT_InvalidTarget.

◆ IdentifyCUDATarget() [3/3]

Sema::CUDAVariableTarget Sema::IdentifyCUDATarget ( const VarDecl D)

◆ IgnoredValueConversions()

ExprResult Sema::IgnoredValueConversions ( Expr E)

◆ ImpCastExprToType()

ExprResult Sema::ImpCastExprToType ( Expr E,
QualType  Ty,
CastKind  Kind,
ExprValueKind  VK = VK_PRValue,
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 636 of file Sema.cpp.

References Context, clang::CPlusPlus, clang::CPlusPlus11, clang::ImplicitCastExpr::Create(), CreateMaterializeTemporaryExpr(), CurFPFeatureOverrides(), Diag(), diagnoseNullableToNonnullConversion(), diagnoseZeroToNullptrConversion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::ASTContext::getCanonicalType(), clang::CastExpr::getCastKindName(), clang::Expr::getExprLoc(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPRValue(), clang::SC_Register, and clang::VK_PRValue.

Referenced by ActOnBlockStmtExpr(), ActOnCaseExpr(), ActOnCXXDelete(), ActOnGCCAsmStmt(), ActOnNumericConstant(), ActOnObjCBoolLiteral(), BuildCallExpr(), BuildCXXTypeId(), BuildExpressionFromDeclTemplateArgument(), BuildImplicitBaseInitializer(), BuildInstanceMessage(), BuildResolvedCallExpr(), BuildReturnStmt(), BuildVectorLiteral(), CallExprUnaryConversions(), checkArithmeticOrEnumeralThreeWayCompare(), CheckAssignmentConstraints(), CheckCompareOperands(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), CheckConditionalOperands(), checkConditionalPointerCompatibility(), CheckEnumConstant(), checkMemberDecomposition(), CheckPlaceholderExpr(), checkPointerIntegerMismatch(), CheckPointerToMemberOperands(), CheckSingleAssignmentConstraints(), CheckSizelessVectorConditionalTypes(), checkSizelessVectorShift(), CheckTemplateArgument(), CheckTemplateArgumentPointerToMember(), CheckTransparentUnionArgumentConstraints(), CheckVectorConditionalTypes(), CheckVectorOperands(), checkVectorShift(), ConstantFoldAttrArgs(), convertVector(), CreateBuiltinArraySubscriptExpr(), CreateBuiltinUnaryOp(), CreateFunctionRefExpr(), CXXCheckConditionalOperands(), DeduceNullPtrTemplateArgument(), DefaultArgumentPromotion(), DefaultFunctionArrayConversion(), FindCompositeObjCPointerType(), FindCompositePointerType(), handleComplexFloatConversion(), handleComplexIntConversion(), handleComplexIntegerToFloatConversion(), handleFloatConversion(), handleIntToFloatConversion(), IgnoredValueConversions(), LookupMemberExpr(), OpenCLConvertScalarsToVectors(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), PerformObjectMemberConversion(), PerformQualificationConversion(), PrepareScalarCast(), prepareVectorSplat(), rebuildPotentialResultsAsNonOdrUsed(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), SemaBuiltinCallWithStaticChain(), ShouldTryAgainWithRedefinitionType(), tryGCCVectorConvertAndSplat(), tryVectorConvertAndSplat(), UsualArithmeticConversions(), and UsualUnaryConversions().

◆ ImplicitlyDefineFunction()

NamedDecl * Sema::ImplicitlyDefineFunction ( SourceLocation  Loc,
IdentifierInfo II,
Scope S 
)

◆ ImplMethodsVsClassMethods()

void Sema::ImplMethodsVsClassMethods ( Scope S,
ObjCImplDecl IMPDecl,
ObjCContainerDecl IDecl,
bool  IncompleteImpl = false 
)

◆ incrementMSManglingNumber()

void clang::Sema::incrementMSManglingNumber ( ) const
inline

◆ 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
ClassDeclthe class for which the member is being created.
CSMthe kind of special member.
MemberDeclthe special member itself.
ConstRHStrue if this is a copy operation with a const object on its RHS.
Diagnosetrue 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 360 of file SemaCUDA.cpp.

References clang::Decl::addAttr(), clang::CXXRecordDecl::bases(), CFT_Device, CFT_Host, Context, Diag(), Diagnose, clang::RecordDecl::fields(), clang::Type::getAs(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::DeclContext::getLexicalParent(), clang::Decl::getLocation(), clang::Sema::SpecialMemberOverloadResult::getMethod(), clang::CXXMethodDecl::getParent(), clang::Decl::hasAttr(), IdentifyCUDATarget(), clang::CXXRecordDecl::isAbstract(), LookupSpecialMember(), resolveCalleeCUDATargetConflict(), and clang::CXXRecordDecl::vbases().

Referenced by DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DiagnoseBadTarget(), and ShouldDeleteSpecialMember().

◆ inferGslOwnerPointerAttribute()

void Sema::inferGslOwnerPointerAttribute ( CXXRecordDecl Record)

Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types.

Definition at line 167 of file SemaAttr.cpp.

References Context, and inferGslPointerAttribute().

Referenced by ActOnTag(), and CheckClassTemplate().

◆ inferGslPointerAttribute() [1/2]

void Sema::inferGslPointerAttribute ( NamedDecl ND,
CXXRecordDecl UnderlyingRecord 
)

Add gsl::Pointer attribute to std::container::iterator.

Parameters
NDThe declaration that introduces the name std::container::iterator.
UnderlyingRecordThe record named by ND.

Definition at line 111 of file SemaAttr.cpp.

References Context, clang::Decl::getDeclContext(), clang::NamedDecl::getName(), and Parent.

Referenced by ActOnTypedefNameDecl(), inferGslOwnerPointerAttribute(), inferGslPointerAttribute(), and clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl().

◆ inferGslPointerAttribute() [2/2]

void Sema::inferGslPointerAttribute ( TypedefNameDecl TD)

◆ inferObjCARCLifetime()

bool Sema::inferObjCARCLifetime ( ValueDecl decl)

◆ inheritCUDATargetAttrs()

void Sema::inheritCUDATargetAttrs ( FunctionDecl FD,
const FunctionTemplateDecl TD 
)

Copies target attributes from the template TD to the function FD.

Definition at line 1028 of file SemaCUDA.cpp.

References clang::FunctionTemplateDecl::getTemplatedDecl().

Referenced by CheckFunctionTemplateSpecialization().

◆ Initialize()

void Sema::Initialize ( )

Perform initialization that occurs after the parser has been initialized but before it parses anything.

Definition at line 267 of file Sema.cpp.

References addImplicitTypedef(), clang::OpenCLOptions::addSupport(), clang::IdentifierResolver::begin(), clang::ASTContext::buildImplicitRecord(), clang::Class, Consumer, Context, clang::CPlusPlus, clang::ASTContext::DoubleTy, clang::IdentifierResolver::end(), clang::ASTContext::FloatTy, clang::IdentifierTable::get(), clang::ASTContext::getAtomicType(), clang::ASTContext::getAuxTargetInfo(), 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(), clang::LangOptions::getOpenCLCompatibleVersion(), getOpenCLOptions(), clang::ASTContext::getPointerDiffType(), clang::ASTContext::getSizeType(), clang::TargetInfo::getSupportedOpenCLOpts(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ASTContext::getTypeSize(), clang::ASTContext::getUInt128Decl(), clang::ASTContext::getUIntPtrType(), clang::ASTContext::HalfTy, clang::TargetInfo::hasAArch64SVETypes(), clang::TargetInfo::hasBuiltinMSVaList(), clang::TargetInfo::hasFeature(), clang::TargetInfo::hasInt128Type(), clang::TargetInfo::hasRISCVVTypes(), Id, clang::ASTContext::Idents, IdResolver, clang::ASTContext::IntTy, clang::ASTContext::LongTy, clang::ObjC, clang::ASTContext::OCLClkEventTy, clang::ASTContext::OCLEventTy, clang::ASTContext::OCLQueueTy, clang::ASTContext::OCLReserveIDTy, clang::ASTContext::OCLSamplerTy, clang::OpenCL, PP, PushOnScopeChains(), TUScope, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongTy, and VAListTagName.

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

◆ InitializeExplicitObjectArgument()

ExprResult Sema::InitializeExplicitObjectArgument ( Sema S,
Expr Obj,
FunctionDecl Fun 
)

◆ InnermostDeclarationWithDelayedImmediateInvocations()

std::optional< ExpressionEvaluationContextRecord::InitializationContext > clang::Sema::InnermostDeclarationWithDelayedImmediateInvocations ( ) const
inline

◆ InstantiateAttrs()

void Sema::InstantiateAttrs ( const MultiLevelTemplateArgumentList TemplateArgs,
const Decl Pattern,
Decl Inst,
LateInstantiatedAttrVec LateAttrs = nullptr,
LocalInstantiationScope OuterMostScope = nullptr 
)

◆ InstantiateAttrsForDecl()

void Sema::InstantiateAttrsForDecl ( const MultiLevelTemplateArgumentList TemplateArgs,
const Decl Pattern,
Decl Inst,
LateInstantiatedAttrVec LateAttrs = nullptr,
LocalInstantiationScope OuterMostScope = nullptr 
)

◆ 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
PointOfInstantiationThe point of instantiation within the source code.
Instantiationis the declaration whose definition is being instantiated. This will be either a class template specialization or a member class of a class template specialization.
Patternis 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.
TemplateArgsThe template arguments to be substituted into the pattern.
TSKthe kind of implicit or explicit instantiation to perform.
Complainwhether 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 3357 of file SemaTemplateInstantiate.cpp.

References ActOnFields(), ActOnFinishCXXNonNestedClass(), ActOnFinishDelayedMemberInitializers(), CheckCompletedCXXClass(), Consumer, Context, CurrentInstantiationScope, clang::DeclContext::decls(), clang::TemplateDeclInstantiator::delayed_partial_spec_begin(), clang::TemplateDeclInstantiator::delayed_partial_spec_end(), clang::TemplateDeclInstantiator::delayed_var_partial_spec_begin(), clang::TemplateDeclInstantiator::delayed_var_partial_spec_end(), clang::LocalInstantiationScope::deleteScopes(), DiagnoseUninstantiableTemplate(), clang::TemplateDeclInstantiator::disableLateAttributeInstantiation(), clang::TemplateDeclInstantiator::enableLateAttributeInstantiation(), clang::Enum, clang::TagDecl::getBraceRange(), clang::CXXRecordDecl::getDefinition(), clang::Decl::getFriendObjectKind(), clang::TagDecl::getInnerLocStart(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::Decl::getLocation(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::NamedDecl::getNameForDiagnostic(), clang::CXXRecordDecl::getNumBases(), getPrintingPolicy(), clang::TemplateDeclInstantiator::getStartingScope(), clang::TagDecl::getTagKind(), clang::ASTConsumer::HandleTagDeclDefinition(), InstantiateAttrs(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::sema::instantiateTemplateAttribute(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::Sema::InstantiatingTemplate::isAlreadyInstantiating(), clang::FunctionDecl::isConstexpr(), clang::Decl::isDefinedOutsideFunctionOrMethod(), clang::DeclContext::isDependentContext(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isVirtualAsWritten(), MarkVirtualMembersReferenced(), MarkVTableUsed(), clang::Member, OS, P, PerformDependentDiagnostics(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, Scope, clang::TagDecl::setBraceRange(), clang::TemplateDeclInstantiator::setEvaluateConstraints(), clang::Decl::setInvalidDecl(), clang::Decl::setLocation(), clang::TypeDecl::setLocStart(), clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::TagDecl::setTagKind(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::MemberSpecializationInfo::setTemplateSpecializationKind(), clang::Decl::setVisibleDespiteOwningModule(), clang::TagDecl::startDefinition(), SubstBaseSpecifiers(), clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, and clang::declvisitor::Base< Ptr, ImplClass, RetTy >::Visit().

Referenced by ActOnExplicitInstantiation(), 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 3952 of file SemaTemplateInstantiate.cpp.

References CheckFunctionConstraints(), CheckSpecializationInstantiationRedecl(), Consumer, Context, clang::DeclContext::decls(), clang::Enum, clang::DeclContextLookupResult::find_first(), clang::Function, clang::EnumDecl::getDefinition(), clang::CXXRecordDecl::getDefinition(), clang::VarDecl::getDefinition(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::VarDecl::getMemberSpecializationInfo(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::ASTContext::getTargetInfo(), clang::CXXRecordDecl::getTemplateInstantiationPattern(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::TargetInfo::getTriple(), clang::ASTConsumer::HandleTopLevelDecl(), clang::Decl::hasAttr(), InstantiateClass(), InstantiateClassMembers(), InstantiateEnum(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), InstantiateVariableDefinition(), clang::CXXRecordDecl::isLocalClass(), clang::ConstraintSatisfaction::IsSatisfied, clang::VarDecl::isStaticDataMember(), clang::DeclContext::lookup(), MarkVTableUsed(), PendingLocalImplicitInstantiations, clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::MemberSpecializationInfo::setTemplateSpecializationKind(), clang::VarDecl::setTemplateSpecializationKind(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.

Referenced by ActOnExplicitInstantiation(), InstantiateClassMembers(), and InstantiateClassTemplateSpecializationMembers().

◆ InstantiateClassTemplateSpecialization()

bool Sema::InstantiateClassTemplateSpecialization ( SourceLocation  PointOfInstantiation,
ClassTemplateSpecializationDecl ClassTemplateSpec,
TemplateSpecializationKind  TSK,
bool  Complain = true 
)

◆ 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 4184 of file SemaTemplateInstantiate.cpp.

References getTemplateInstantiationArgs(), and InstantiateClassMembers().

Referenced by ActOnExplicitInstantiation().

◆ InstantiateDefaultArgument()

bool Sema::InstantiateDefaultArgument ( SourceLocation  CallLoc,
FunctionDecl FD,
ParmVarDecl Param 
)

◆ InstantiateDefaultCtorDefaultArgs()

void Sema::InstantiateDefaultCtorDefaultArgs ( CXXConstructorDecl Ctor)

In the MS ABI, we need to instantiate default arguments of dllexported default constructors along with the constructor definition.

This allows IR gen to emit a constructor closure which calls the default constructor with its default arguments.

Definition at line 910 of file SemaTemplateInstantiateDecl.cpp.

References CheckCXXDefaultArgExpr(), CleanupVarDeclMarking(), Context, clang::Decl::getAttr(), clang::TargetInfo::getCXXABI(), clang::Attr::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getTargetInfo(), clang::CXXConstructorDecl::isDefaultConstructor(), and clang::TargetCXXABI::isMicrosoft().

Referenced by ActOnStartOfFunctionDef(), InstantiateFunctionDefinition(), and ReferenceDllExportedMembers().

◆ 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
PointOfInstantiationThe point of instantiation within the source code.
Instantiationis 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.
PatternThe templated declaration from which the instantiation occurs.
TemplateArgsThe template arguments to be substituted into the pattern.
TSKThe kind of implicit or explicit instantiation to perform.
Returns
true if an error occurred, false otherwise.

Definition at line 3616 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, Scope, clang::EnumDecl::setTemplateSpecializationKind(), and clang::Decl::setVisibleDespiteOwningModule().

Referenced by InstantiateClassMembers(), and RequireCompleteEnumDecl().

◆ InstantiateExceptionSpec()

void Sema::InstantiateExceptionSpec ( SourceLocation  PointOfInstantiation,
FunctionDecl Function 
)

◆ instantiateExplicitSpecifier()

ExplicitSpecifier Sema::instantiateExplicitSpecifier ( const MultiLevelTemplateArgumentList TemplateArgs,
ExplicitSpecifier  ES 
)

◆ InstantiateFunctionDeclaration()

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 4888 of file SemaTemplateInstantiateDecl.cpp.

References clang::TemplateArgumentList::asArray(), clang::DeclContext::getParent(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Sema::InstantiatingTemplate::isInvalid(), and SubstDecl().

Referenced by CheckIfFunctionSpecializationIsImmediate(), DeduceReturnType(), DefineImplicitLambdaToFunctionPointerConversion(), and instantiateOMPDeclareVariantAttr().

◆ 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
PointOfInstantiationthe point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the function, but it's close.
Functionthe already-instantiated declaration of a function template specialization or member function of a class template specialization.
Recursiveif true, recursively instantiates any functions that are required by this instantiation.
DefinitionRequiredif 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 4922 of file SemaTemplateInstantiateDecl.cpp.

References ActOnFinishFunctionBody(), ActOnSkippedFunctionBody(), ActOnStartOfFunctionDef(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), Consumer, Context, clang::CPlusPlus11, CurFPFeatures, CXXCopyAssignment, CXXCopyConstructor, CXXMoveAssignment, CXXMoveConstructor, Diag(), DiagnoseUninstantiableTemplate(), FpPragmaStack, clang::Function, clang::ActionResult< PtrTy, Compress >::get(), getASTMutationListener(), clang::DeclaratorDecl::getBeginLoc(), clang::FunctionDecl::getBody(), clang::Type::getContainedAutoType(), clang::TargetInfo::getCXXABI(), clang::RecordType::getDecl(), clang::Decl::getDeclContext(), getDefaultedFunctionKind(), clang::FunctionDecl::getDefinition(), getDiagnostics(), clang::Decl::getEndLoc(), clang::DeclaratorDecl::getInnerLocStart(), getLangOpts(), clang::Decl::getLocation(), clang::TypeSpecTypeLoc::getNameLoc(), clang::Decl::getPreviousDecl(), getPrintingPolicy(), clang::FunctionDecl::getReturnType(), getSourceManager(), clang::ASTContext::getTargetInfo(), getTemplateInstantiationArgs(), clang::TypeSourceInfo::getType(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::ASTConsumer::HandleTopLevelDecl(), clang::FunctionDecl::hasSkippedBody(), InstantiateDefaultCtorDefaultArgs(), InstantiateMemInitializers(), clang::Sema::InstantiatingTemplate::isAlreadyInstantiating(), clang::FunctionDecl::isDefaulted(), clang::Decl::isFromASTFile(), clang::FunctionDecl::isInlined(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::FunctionDecl::isLateTemplateParsed(), clang::TargetCXXABI::isMicrosoft(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::FunctionDecl::isThisDeclarationInstantiatedFromAFriendDefinition(), LateParsedInstantiations, LateParsedTemplateMap, LateTemplateParser, OpaqueParser, OS, PendingInstantiations, clang::Sema::LocalEagerInstantiationScope::perform(), PerformDependentDiagnostics(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::TypeLocBuilder::push(), Scope, SetDeclDefaulted(), clang::TypeSpecTypeLoc::setNameLoc(), clang::ValueDecl::setType(), clang::DeclaratorDecl::setTypeSourceInfo(), SubstQualifier(), SubstStmt(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, updateAttrsForLateParsedTemplate(), and clang::FunctionDecl::willHaveBody().

Referenced by ActOnExplicitInstantiation(), CheckIfFunctionSpecializationIsImmediate(), CheckPlaceholderExpr(), DeduceReturnType(), InstantiateClassMembers(), instantiateOMPDeclareVariantAttr(), isEmptyCudaConstructor(), isEmptyCudaDestructor(), MarkFunctionReferenced(), and PerformPendingInstantiations().

◆ InstantiateInClassInitializer()

bool Sema::InstantiateInClassInitializer ( SourceLocation  PointOfInstantiation,
FieldDecl Instantiation,
FieldDecl Pattern,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Instantiate the definition of a field from the given pattern.

Parameters
PointOfInstantiationThe point of instantiation within the source code.
Instantiationis 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.
PatternThe templated declaration from which the instantiation occurs.
TemplateArgsThe template arguments to be substituted into the pattern.
Returns
true if an error occurred, false otherwise.

Definition at line 3681 of file SemaTemplateInstantiate.cpp.

References ActOnFinishCXXInClassMemberInitializer(), ActOnStartCXXInClassMemberInitializer(), Context, CurContext, Diag(), ExprEvalContexts, clang::ActionResult< PtrTy, Compress >::get(), getASTMutationListener(), clang::FieldDecl::getInClassInitializer(), clang::FieldDecl::getInClassInitStyle(), clang::DeclContext::getOuterLexicalRecordContext(), clang::FieldDecl::getParent(), clang::FieldDecl::hasInClassInitializer(), clang::Init, clang::Sema::InstantiatingTemplate::isAlreadyInstantiating(), clang::Sema::InstantiatingTemplate::isInvalid(), PotentiallyEvaluated, Scope, clang::Decl::setInvalidDecl(), and SubstInitializer().

Referenced by BuildCXXDefaultInitExpr(), and InstantiateClassMembers().

◆ InstantiateMemInitializers()

void Sema::InstantiateMemInitializers ( CXXConstructorDecl New,
const CXXConstructorDecl Tmpl,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ 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
PointOfInstantiationthe point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the variable, but it's close.
Varthe already-instantiated declaration of a templated variable.
Recursiveif true, recursively instantiates any functions that are required by this instantiation.
DefinitionRequiredif 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 5539 of file SemaTemplateInstantiateDecl.cpp.

References clang::TemplateArgumentListInfo::addArgument(), clang::TemplateArgumentList::asArray(), CompleteVarTemplateSpecializationDecl(), Consumer, Context, clang::CPlusPlus11, Diag(), DiagnoseUninstantiableTemplate(), getASTContext(), clang::DeclaratorDecl::getBeginLoc(), clang::Decl::getDeclContext(), clang::VarDecl::getDefinition(), getDiagnostics(), clang::Redeclarable< decl_type >::getFirstDecl(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::VarDecl::getPointOfInstantiation(), getSourceManager(), clang::VarTemplateSpecializationDecl::getSpecializedTemplate(), clang::VarTemplateSpecializationDecl::getSpecializedTemplateOrPartial(), clang::VarTemplateSpecializationDecl::getTemplateArgs(), clang::VarTemplateSpecializationDecl::getTemplateArgsInfo(), clang::VarTemplateSpecializationDecl::getTemplateInstantiationArgs(), getTemplateInstantiationArgs(), clang::VarDecl::getTemplateInstantiationPattern(), clang::VarDecl::getTemplateSpecializationKind(), clang::VarDecl::getTemplateSpecializationKindForInstantiation(), clang::ASTConsumer::HandleCXXStaticMemberVarInstantiation(), clang::VarDecl::hasInit(), InstantiateVariableInitializer(), clang::Sema::InstantiatingTemplate::isAlreadyInstantiating(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::VarDecl::isOutOfLine(), clang::DeclContext::isRecord(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::mightBeUsableInConstantExpressions(), PendingInstantiations, clang::Sema::LocalEagerInstantiationScope::perform(), clang::Sema::GlobalEagerInstantiationScope::perform(), clang::Sema::ContextRAII::pop(), clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::VarDecl::setTemplateSpecializationKind(), clang::Decl::setVisibleDespiteOwningModule(), SubstDecl(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

Referenced by ActOnExplicitInstantiation(), completeExprArrayBound(), DoMarkVarDeclReferenced(), InstantiateClassMembers(), and PerformPendingInstantiations().

◆ InstantiateVariableInitializer()

void Sema::InstantiateVariableInitializer ( VarDecl Var,
VarDecl OldVar,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ inTemplateInstantiation()

bool clang::Sema::inTemplateInstantiation ( ) const
inline

◆ InvalidLogicalVectorOperands()

QualType Sema::InvalidLogicalVectorOperands ( SourceLocation  Loc,
ExprResult LHS,
ExprResult RHS 
)

◆ InvalidOperands()

QualType Sema::InvalidOperands ( SourceLocation  Loc,
ExprResult LHS,
ExprResult RHS 
)

◆ InventAbbreviatedTemplateParameterTypeName()

IdentifierInfo * Sema::InventAbbreviatedTemplateParameterTypeName ( IdentifierInfo ParamName,
unsigned  Index 
)

Invent a new identifier for parameters of abbreviated templates.

Definition at line 93 of file Sema.cpp.

References Context, clang::IdentifierTable::get(), clang::IdentifierInfo::getName(), clang::ASTContext::Idents, and OS.

Referenced by InventTemplateParameter().

◆ isAbstractType()

bool Sema::isAbstractType ( SourceLocation  Loc,
QualType  T 
)

◆ isAcceptable()

bool clang::Sema::isAcceptable ( const NamedDecl D,
AcceptableKind  Kind 
)
inline

Determine whether a declaration is acceptable (visible/reachable).

Definition at line 11981 of file Sema.h.

References isReachable(), isVisible(), and Visible.

Referenced by hasAcceptableDeclarationImpl(), hasAcceptableDefaultArgument(), and hasAcceptableDefinition().

◆ 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
SDDeclaration checked for nested-name-specifier.
IsExtensionIf not null and the declaration is accepted as an extension, the pointed variable is assigned true.

Definition at line 349 of file SemaCXXScopeSpec.cpp.

References Context, clang::ASTContext::getLangOpts(), clang::ASTContext::getTypeDeclType(), clang::NamedDecl::getUnderlyingDecl(), and clang::Type::isDependentType().

Referenced by BuildCXXNestedNameSpecifier(), and FindFirstQualifierInScope().

◆ isAcceptableTagRedeclaration()

bool Sema::isAcceptableTagRedeclaration ( const TagDecl Previous,
TagTypeKind  NewTag,
bool  isDefinition,
SourceLocation  NewTagLoc,
const IdentifierInfo Name 
)

◆ 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 13219 of file Sema.h.

References CFP_Never, and IdentifyCUDAPreference().

◆ isAlwaysConstantEvaluatedContext()

bool clang::Sema::isAlwaysConstantEvaluatedContext ( ) const
inline

◆ IsAtLeastAsConstrained()

bool Sema::IsAtLeastAsConstrained ( NamedDecl D1,
MutableArrayRef< const Expr * >  AC1,
NamedDecl D2,
MutableArrayRef< 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
ResultIf 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 1492 of file SemaConcept.cpp.

References CalculateTemplateDepthForConstraints(), Context, clang::FunctionDecl::getTemplatedKind(), clang::Result, clang::AtomicConstraint::subsumes(), subsumes(), clang::FunctionDecl::TK_FunctionTemplate, and clang::FunctionDecl::TK_NonTemplate.

Referenced by CheckTemplateTemplateArgument(), getMoreSpecialized(), getMoreSpecializedTemplate(), clang::isBetterOverloadCandidate(), and SetEligibleMethods().

◆ IsBlockPointerConversion()

bool Sema::IsBlockPointerConversion ( QualType  FromType,
QualType  ToType,
QualType ConvertedType 
)

◆ isCast()

static bool clang::Sema::isCast ( CheckedConversionKind  CCK)
inlinestatic

◆ isCFError()

bool Sema::isCFError ( RecordDecl D)

◆ isCheckingDefaultArgumentOrInitializer()

bool clang::Sema::isCheckingDefaultArgumentOrInitializer ( ) const
inline

◆ isCompleteType()

bool clang::Sema::isCompleteType ( SourceLocation  Loc,
QualType  T,
CompleteTypeKind  Kind = CompleteTypeKind::Default 
)
inline

◆ 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 2618 of file SemaOverload.cpp.

References clang::Type::getAs(), and clang::ComplexType::getElementType().

Referenced by IsStandardConversion().

◆ isConstantEvaluatedContext()

bool clang::Sema::isConstantEvaluatedContext ( ) const
inline

◆ isCUDAImplicitHostDeviceFunction()

bool Sema::isCUDAImplicitHostDeviceFunction ( const FunctionDecl D)
static

◆ 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 2621 of file SemaDeclCXX.cpp.

References getCurrentClass(), and clang::NamedDecl::getIdentifier().

Referenced by ClassifyName(), and 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 2630 of file SemaDeclCXX.cpp.

References computeDeclContext(), clang::CPlusPlus, CurContext, clang::NamedDecl::getIdentifier(), getLangOpts(), clang::IdentifierInfo::getLength(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().

◆ isDeclaratorFunctionLike()

bool Sema::isDeclaratorFunctionLike ( Declarator D)

◆ isDeclInScope()

bool Sema::isDeclInScope ( NamedDecl D,
DeclContext Ctx,
Scope S = nullptr,
bool  AllowInlineNamespace = false 
) const

isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns true if 'D' belongs to the given declaration context.

Parameters
AllowInlineNamespaceIf true, allow the declaration to be in the enclosing namespace set of the context, rather than contained directly within it.

Definition at line 1575 of file SemaDecl.cpp.

References IdResolver, and clang::IdentifierResolver::isDeclInScope().

Referenced by ActOnDecompositionDeclarator(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnIvar(), ActOnOpenMPIdExpression(), ActOnTag(), ActOnVariableDeclarator(), CheckAnonMemberRedeclaration(), CheckClassTemplate(), FilterLookupForScope(), FilterUsingLookup(), HandleField(), HandleMSProperty(), and MergeCXXFunctionDecl().

◆ isDeductionGuideName()

bool Sema::isDeductionGuideName ( Scope S,
const IdentifierInfo Name,
SourceLocation  NameLoc,
CXXScopeSpec SS,
ParsedTemplateTy Template = nullptr 
)

◆ isDependentScopeSpecifier()

bool Sema::isDependentScopeSpecifier ( const CXXScopeSpec SS)

◆ IsDerivedFrom() [1/2]

bool Sema::IsDerivedFrom ( SourceLocation  Loc,
QualType  Derived,
QualType  Base 
)

◆ 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 3067 of file SemaDeclCXX.cpp.

References clang::CPlusPlus, clang::Type::getAsCXXRecordDecl(), getLangOpts(), clang::TagDecl::isBeingDefined(), isCompleteType(), and clang::CXXRecordDecl::isDerivedFrom().

◆ isEmptyCudaConstructor()

bool Sema::isEmptyCudaConstructor ( SourceLocation  Loc,
CXXConstructorDecl CD 
)

◆ isEmptyCudaDestructor()

bool Sema::isEmptyCudaDestructor ( SourceLocation  Loc,
CXXDestructorDecl CD 
)

◆ 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 10761 of file SemaOverload.cpp.

References clang::ASTContext::hasSameType().

Referenced by clang::OverloadCandidateSet::BestViableFunction(), and CheckUsingShadowDecl().

◆ isExternalWithNoLinkageType()

bool Sema::isExternalWithNoLinkageType ( const ValueDecl VD) const

Determine if VD, which must be a variable or function, is an external symbol that nonetheless can't be referenced from outside this translation unit because its type has no linkage and it's not extern "C".

Determine whether ND is an external-linkage function or variable whose type has no linkage.

Definition at line 803 of file Sema.cpp.

References getLangOpts(), clang::Type::getLinkage(), clang::ValueDecl::getType(), clang::NamedDecl::hasExternalFormalLinkage(), clang::isExternalFormalLinkage(), and isFunctionOrVarDeclExternC().

Referenced by checkUndefinedButUsed(), getUndefinedButUsed(), MarkFunctionReferenced(), 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 2583 of file SemaOverload.cpp.

References clang::CPlusPlus, and clang::Type::getAs().

Referenced by IsStandardConversion(), and IsVectorElementConversion().

◆ IsFunctionConversion()

bool Sema::IsFunctionConversion ( QualType  FromType,
QualType  ToType,
QualType ResultTy 
)

◆ isImmediateFunctionContext()

bool clang::Sema::isImmediateFunctionContext ( ) const
inline

◆ isImplicitlyDeleted()

bool Sema::isImplicitlyDeleted ( FunctionDecl FD)

Determine whether the given function is an implicitly-deleted special member function.

Definition at line 15919 of file SemaDeclCXX.cpp.

References clang::FunctionDecl::isDefaulted(), and clang::FunctionDecl::isDeleted().

Referenced by clang::InitializationSequence::Diagnose().

◆ isIncompatibleTypedef()

bool Sema::isIncompatibleTypedef ( TypeDecl Old,
TypedefNameDecl New 
)

◆ isInitListConstructor()

bool Sema::isInitListConstructor ( const FunctionDecl Ctor)

◆ isInLifetimeExtendingContext()

bool clang::Sema::isInLifetimeExtendingContext ( ) const
inline

◆ isInMaterializeTemporaryObjectContext()

bool clang::Sema::isInMaterializeTemporaryObjectContext ( ) const
inline

Definition at line 6727 of file Sema.h.

References ExprEvalContexts.

Referenced by IgnoredValueConversions().

◆ isInOpenMPAssumeScope()

bool clang::Sema::isInOpenMPAssumeScope ( ) const
inline

Check if there is an active global omp begin assumes directive.

Definition at line 13578 of file Sema.h.

Referenced by ActOnOpenMPEndAssumesDirective().

◆ isInOpenMPDeclareTargetContext()

bool clang::Sema::isInOpenMPDeclareTargetContext ( ) const
inline

◆ isInOpenMPDeclareVariantScope()

bool clang::Sema::isInOpenMPDeclareVariantScope ( ) const
inline

Can we exit an OpenMP declare variant scope at the moment.

Definition at line 13446 of file Sema.h.

Referenced by ActOnDeclarator(), ActOnOpenMPEndDeclareVariant(), and ActOnStartOfFunctionDef().

◆ isInOpenMPTargetExecutionDirective()

bool Sema::isInOpenMPTargetExecutionDirective ( ) const

Return true inside OpenMP target region.

Definition at line 2316 of file SemaOpenMP.cpp.

References DSAStack, and clang::isOpenMPTargetExecutionDirective().

Referenced by isOpenMPCapturedDecl(), isOpenMPDeviceDelayedContext(), isOpenMPGlobalCapturedDecl(), and MarkVTableUsed().

◆ isInOpenMPTaskUntiedContext()

bool Sema::isInOpenMPTaskUntiedContext ( ) const

Return true if currently in OpenMP task with untied clause context.

Definition at line 2311 of file SemaOpenMP.cpp.

References DSAStack, and clang::isOpenMPTaskingDirective().

Referenced by BuildArrayType().

◆ IsInsideALocalClassWithinATemplateFunction()

bool Sema::IsInsideALocalClassWithinATemplateFunction ( )

◆ IsIntegralPromotion()

bool Sema::IsIntegralPromotion ( Expr From,
QualType  FromType,
QualType  ToType 
)

◆ IsInvalidSMECallConversion()

bool Sema::IsInvalidSMECallConversion ( QualType  FromType,
QualType  ToType 
)

◆ 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 899 of file SemaCXXScopeSpec.cpp.

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

◆ isKnownName()

bool Sema::isKnownName ( StringRef  name)

◆ isLaxVectorConversion()

bool Sema::isLaxVectorConversion ( QualType  srcType,
QualType  destType 
)

◆ IsLayoutCompatible()

bool Sema::IsLayoutCompatible ( QualType  T1,
QualType  T2 
) const

Definition at line 19602 of file SemaChecking.cpp.

References getASTContext(), and isLayoutCompatible().

◆ 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: 2014-11-14 libstdc++ had 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. Libstdc++ 6.1 (released 2016-04-27) appears to have resolved it as side-effect of commit ddb63209a8d (2015-06-05).

Definition at line 45 of file SemaExceptionSpec.cpp.

References Context, CurContext, clang::Declarator::getBeginLoc(), clang::Declarator::getIdentifier(), clang::ASTContext::getSourceManager(), clang::SourceManager::isInSystemHeader(), and clang::IdentifierInfo::isStr().

◆ isMemberAccessibleForDeletion() [1/2]

bool clang::Sema::isMemberAccessibleForDeletion ( CXXRecordDecl NamingClass,
DeclAccessPair  Found,
QualType  ObjectType 
)
inline

Definition at line 1270 of file Sema.h.

References isMemberAccessibleForDeletion(), and PDiag().

◆ isMemberAccessibleForDeletion() [2/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 1593 of file SemaAccess.cpp.

References AR_accessible, AR_delayed, AR_dependent, AR_inaccessible, clang::AS_public, CheckAccess(), Context, Diag(), clang::DeclAccessPair::getAccess(), and getLangOpts().

Referenced by isMemberAccessibleForDeletion().

◆ 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 3469 of file SemaOverload.cpp.

References clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::MemberPointerType::getClass(), clang::ASTContext::getMemberPointerType(), clang::MemberPointerType::getPointeeType(), clang::QualType::getTypePtr(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, and clang::Expr::NPC_ValueDependentIsNull.

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.
};
#define TYPE(DERIVED, BASE)
Definition: ASTFwd.h:26

Definition at line 680 of file SemaDecl.cpp.

References clang::CXXRecordDecl::bases(), Context, CurContext, clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getScopeRep(), clang::ASTContext::hasSameUnqualifiedType(), clang::DeclContext::isFunctionOrMethod(), clang::DeclContext::isRecord(), and clang::NestedNameSpecifier::Super.

Referenced by DiagnoseUnknownTypeName().

◆ isModuleVisible()

bool Sema::isModuleVisible ( const Module M,
bool  ModulePrivate = false 
)

◆ isMoreSpecializedThanPrimary() [1/2]

bool Sema::isMoreSpecializedThanPrimary ( ClassTemplatePartialSpecializationDecl T,
sema::TemplateDeductionInfo Info 
)

◆ isMoreSpecializedThanPrimary() [2/2]

bool Sema::isMoreSpecializedThanPrimary ( VarTemplatePartialSpecializationDecl T,
sema::TemplateDeductionInfo Info 
)

◆ isObjCMethodDecl()

bool clang::Sema::isObjCMethodDecl ( Decl D)
inline

Definition at line 12263 of file Sema.h.

◆ isObjCPointerConversion()

bool Sema::isObjCPointerConversion ( QualType  FromType,
QualType  ToType,
QualType ConvertedType,
bool IncompatibleObjC 
)

◆ 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
FromTypeThe type we're converting form.
ToTypeThe type we're converting to.
ConvertedTypeThe 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 3043 of file SemaOverload.cpp.

References clang::Qualifiers::compatiblyIncludes(), clang::Qualifiers::empty(), clang::Type::getAs(), clang::Qualifiers::getObjCLifetime(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isObjCLifetimeType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::Qualifiers::setObjCLifetime(), clang::ASTContext::typesAreCompatible(), and clang::Qualifiers::withoutObjCLifetime().

Referenced by IsStandardConversion(), and tryObjCWritebackConversion().

◆ isOpenMPCapturedByRef()

bool Sema::isOpenMPCapturedByRef ( const ValueDecl D,
unsigned  Level,
unsigned  OpenMPCaptureLevel 
) const

◆ 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 2350 of file SemaOpenMP.cpp.

References buildCaptureDecl(), BuildCXXThisExpr(), buildDeclRefExpr(), BuildMemberExpr(), clang::C, checkDeclIsAllowedInOpenMPTarget(), clang::CR_OpenMP, CurContext, DSAStack, FunctionScopes, clang::Decl::getAccess(), getCanonicalDecl(), getCurBlock(), getCurCapturedRegion(), getCurLambda(), getCurrentThisType(), clang::DeclRefExpr::getDecl(), clang::NamedDecl::getIdentifier(), clang::QualType::getNonReferenceType(), clang::getOpenMPCaptureRegions(), clang::DeclContext::getParent(), clang::ValueDecl::getType(), clang::VarDecl::hasLocalStorage(), clang::VarDecl::isConstexpr(), isInOpenMPDeclareTargetContext(), isInOpenMPTargetExecutionDirective(), clang::QualType::isNull(), clang::isOpenMPPrivate(), clang::isOpenMPThreadPrivate(), LangOpts, clang::DeclAccessPair::make(), clang::OK_Ordinary, clang::sema::CapturedRegionScopeInfo::OpenMPCaptureLevel, clang::sema::CapturedRegionScopeInfo::OpenMPLevel, and clang::VK_LValue.

Referenced by actOnOMPReductionKindClause(), ActOnOpenMPAlignedClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPLoopInitialization(), ActOnOpenMPSharedClause(), buildCapture(), BuildFieldReferenceExpr(), captureInBlock(), captureInCapturedRegion(), getNonOdrUseReasonInCurrentContext(), and tryCaptureVariable().

◆ isOpenMPDeclareMapperVarDeclAllowed()

bool Sema::isOpenMPDeclareMapperVarDeclAllowed ( const VarDecl VD) const

◆ isOpenMPGlobalCapturedDecl()

bool Sema::isOpenMPGlobalCapturedDecl ( ValueDecl D,
unsigned  Level,
unsigned  CaptureLevel 
) const

Check if the specified global variable must be captured by outer capture regions.

Parameters
LevelRelative level of nested OpenMP construct for that the check is performed.

Definition at line 2675 of file SemaOpenMP.cpp.

References DSAStack, getOpenMPCaptureLevels(), clang::VarDecl::hasLocalStorage(), isInOpenMPTargetExecutionDirective(), and LangOpts.

Referenced by tryCaptureVariable().

◆ isOpenMPPrivateDecl()

OpenMPClauseKind Sema::isOpenMPPrivateDecl ( ValueDecl D,
unsigned  Level,
unsigned  CapLevel 
) const

◆ isOpenMPRebuildMemberExpr()

bool Sema::isOpenMPRebuildMemberExpr ( ValueDecl D)

The member expression(this->fd) needs to be rebuilt in the template instantiation to generate private copy for OpenMP when default clause is used.

The function will return true if default cluse is used.

Definition at line 2327 of file SemaOpenMP.cpp.

References clang::C, DSAStack, and clang::isOpenMPPrivate().

◆ isOpenMPTargetCapturedDecl()

bool Sema::isOpenMPTargetCapturedDecl ( const ValueDecl D,
unsigned  Level,
unsigned  CaptureLevel 
) const

Check if the specified variable is captured by 'target' directive.

Parameters
LevelRelative level of nested OpenMP construct for that the check is performed.

Definition at line 2661 of file SemaOpenMP.cpp.

References DSAStack, clang::getOpenMPCaptureRegions(), clang::VarDecl::hasLocalStorage(), clang::isOpenMPTargetExecutionDirective(), and LangOpts.

Referenced by tryCaptureVariable().

◆ IsOverload()

bool Sema::IsOverload ( FunctionDecl New,
FunctionDecl Old,
bool  UseMemberUsingDeclRules,
bool  ConsiderCudaAttrs = true 
)

◆ IsOverride()

bool Sema::IsOverride ( FunctionDecl MD,
FunctionDecl BaseMD,
bool  UseMemberUsingDeclRules,
bool  ConsiderCudaAttrs = true 
)

Definition at line 1573 of file SemaOverload.cpp.

References IsOverloadOrOverrideImpl().

Referenced by AddOverriddenMethods().

◆ 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 2712 of file SemaOverload.cpp.

References clang::ASTContext::areCompatibleVectorTypes(), BuildSimilarlyQualifiedPointerType(), clang::Type::castAs(), clang::CPlusPlus, clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::PointerType::getPointeeType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isBlockPointerType(), clang::Type::isFunctionType(), clang::Type::isIncompleteOrObjectType(), isNullPointerConstantForConversion(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isVectorType(), clang::Type::isVoidType(), and clang::ASTContext::typesAreCompatible().

Referenced by IsStandardConversion().

◆ isPreciseFPEnabled()

bool clang::Sema::isPreciseFPEnabled ( )
inline

Are precise floating point semantics currently enabled?

Definition at line 1710 of file Sema.h.

References CurFPFeatures.

Referenced by ActOnPragmaFEnvAccess(), and ActOnPragmaFloatControl().

◆ 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
ObjCLifetimeConversionOutput parameter that will be set to indicate when the qualification conversion involves a change in the Objective-C object lifetime.

Definition at line 3671 of file SemaOverload.cpp.

References clang::ASTContext::getCanonicalType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameUnqualifiedType(), isQualificationConversionStep(), and clang::ASTContext::UnwrapSimilarTypes().

Referenced by CheckOriginalCallArgDeduction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), CompareQualificationConversions(), handlerCanCatch(), isAllowableExplicitConversion(), 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 16534 of file SemaExpr.cpp.

References clang::NamedDecl::isCXXClassMember().

Referenced by BuildUnaryOp().

◆ isReachable()

bool clang::Sema::isReachable ( const NamedDecl D)
inline

Determine whether a declaration is reachable.

Definition at line 11974 of file Sema.h.

References clang::Decl::isUnconditionallyVisible(), and Reachable.

Referenced by ArgumentDependentLookup(), hasReachableDeclaration(), hasReachableDeclarationSlow(), isAcceptable(), and IsRedefinitionInModule().

◆ IsRedefinitionInModule()

bool Sema::IsRedefinitionInModule ( const NamedDecl New,
const NamedDecl Old 
) const

◆ isSameOrCompatibleFunctionType()

bool Sema::isSameOrCompatibleFunctionType ( QualType  P,
QualType  A 
)

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
Pthe template parameter type.
Athe argument type.

Definition at line 1223 of file SemaTemplateDeduction.cpp.

References Context, clang::Type::getAs(), clang::ASTContext::hasSameType(), IsFunctionConversion(), and P.

Referenced by DeduceTemplateArguments(), and DeduceTemplateArgumentsByTypeMatch().

◆ isSelfExpr() [1/2]

bool Sema::isSelfExpr ( Expr RExpr)

Private Helper predicate to check for 'self'.

Definition at line 1918 of file SemaExprObjC.cpp.

References CurContext, clang::DeclContext::getNonClosureAncestor(), and isSelfExpr().

Referenced by BuildInstanceMessage(), DiagnoseAssignmentAsCondition(), isSelfExpr(), and LookupMethodInReceiverType().

◆ isSelfExpr() [2/2]

bool Sema::isSelfExpr ( Expr RExpr,
const ObjCMethodDecl Method 
)

◆ isSFINAEContext()

std::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 1139 of file SemaTemplateInstantiate.cpp.

References clang::Sema::CodeSynthesisContext::BuildingBuiltinDumpStructCall, clang::Sema::CodeSynthesisContext::BuildingDeductionGuides, CodeSynthesisContexts, clang::Sema::CodeSynthesisContext::ConstraintNormalization, clang::Sema::CodeSynthesisContext::ConstraintsCheck, clang::Sema::CodeSynthesisContext::ConstraintSubstitution, 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, clang::Sema::CodeSynthesisContext::ExceptionSpecEvaluation, clang::Sema::CodeSynthesisContext::ExceptionSpecInstantiation, clang::Sema::CodeSynthesisContext::ExplicitTemplateArgumentSubstitution, clang::Sema::CodeSynthesisContext::InitializingStructuredBinding, InNonInstantiationSFINAEContext, clang::Sema::CodeSynthesisContext::LambdaExpressionSubstitution, clang::Sema::CodeSynthesisContext::MarkingClassDllexported, clang::Sema::CodeSynthesisContext::Memoization, clang::Sema::CodeSynthesisContext::NestedRequirementConstraintsCheck, clang::Sema::CodeSynthesisContext::ParameterMappingSubstitution, clang::Sema::CodeSynthesisContext::PriorTemplateArgumentSubstitution, clang::Sema::CodeSynthesisContext::RequirementInstantiation, clang::Sema::CodeSynthesisContext::RequirementParameterInstantiation, clang::Sema::CodeSynthesisContext::RewritingOperatorAsSpaceship, and clang::Sema::CodeSynthesisContext::TemplateInstantiation.

Referenced by ActOnCXXDelete(), ActOnPseudoDestructorExpr(), BuildArrayType(), BuildCXXDefaultInitExpr(), CheckAddressOfOperand(), CheckArrow(), CheckCompareOperands(), CheckTemplateIdType(), computeDeclContext(), CopyObject(), createImplicitModuleImportForErrorRecovery(), CreateRecoveryExpr(), diagnoseNoViableConversion(), DiagnoseUninstantiableTemplate(), DiagnoseUnusedExprResult(), EmitCurrentDiagnostic(), LookupMemberExpr(), MaybeEmitAmbiguousAtomicConstraintsDiagnostic(), recordConversion(), RequireCompleteEnumDecl(), clang::Sema::SFINAETrap::SFINAETrap(), and tryToRecoverWithCall().

◆ 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
Targetthe declaration to check if it can be accessed
NamingClassthe class in which the lookup was started.
BaseTypetype 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 1942 of file SemaAccess.cpp.

References AR_inaccessible, clang::AS_none, Context, clang::CPlusPlus, CurContext, clang::declaresSameEntity(), getCurFunctionDecl(), getCurMethodDecl(), getLangOpts(), clang::ObjCInterfaceDecl::isSuperClassOf(), clang::DeclAccessPair::make(), clang::sema::AccessedEntity::Member, clang::ObjCIvarDecl::Package, clang::ObjCIvarDecl::Private, and clang::ObjCIvarDecl::Public.

◆ isStdInitializerList()

bool Sema::isStdInitializerList ( QualType  Ty,
QualType Element 
)

◆ IsStringInit()

bool Sema::IsStringInit ( Expr Init,
const ArrayType AT 
)

Definition at line 166 of file SemaInit.cpp.

References Context, clang::Init, and SIF_None.

Referenced by TryListConversion().

◆ 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 4111 of file SemaExprCXX.cpp.

References Context, clang::Type::getAs(), clang::Type::getPointeeType(), clang::ASTContext::getWideCharType(), clang::Expr::IgnoreParens(), clang::Ordinary, clang::ASTContext::typesAreCompatible(), clang::Unevaluated, clang::UTF16, clang::UTF32, clang::UTF8, and clang::Wide.

Referenced by DiagnoseAssignmentResult(), and 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 642 of file SemaDecl.cpp.

References clang::Class, clang::Enum, clang::LookupResult::Found, clang::LookupResult::getAsSingle(), clang::LookupResult::getResultKind(), clang::Interface, LookupName(), LookupTagName, clang::Struct, clang::LookupResult::suppressDiagnostics(), clang::DeclSpec::TST_class, clang::DeclSpec::TST_enum, clang::DeclSpec::TST_interface, clang::DeclSpec::TST_struct, clang::DeclSpec::TST_union, clang::DeclSpec::TST_unspecified, and clang::Union.

◆ isTemplateName()

TemplateNameKind Sema::isTemplateName ( Scope S,
CXXScopeSpec SS,
bool  hasTemplateKeyword,
const UnqualifiedId Name,
ParsedType  ObjectType,
bool  EnteringContext,
TemplateTy Template,
bool MemberOfUnknownSpecialization,
bool  Disambiguation = false 
)

◆ isTemplateTemplateParameterAtLeastAsSpecializedAs()

bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs ( TemplateParameterList PParam,
TemplateDecl AArg,
SourceLocation  Loc 
)

◆ 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 1451 of file SemaExprCXX.cpp.

References clang::Class, CXXThisTypeOverride, clang::Type::getAsCXXRecordDecl(), and clang::QualType::isNull().

Referenced by ActOnStartCXXMemberReference(), and 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 1976 of file SemaExprCXX.cpp.

References getLangOpts(), clang::FunctionDecl::isDefined(), and clang::FunctionDecl::isReplaceableGlobalAllocationFunction().

Referenced by CanUseDecl(), and diagnoseUnavailableAlignedAllocation().

◆ isUnevaluatedContext()

bool clang::Sema::isUnevaluatedContext ( ) const
inline

◆ 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 290 of file SemaTemplateVariadic.cpp.

References FunctionScopes.

◆ isUsualDeallocationFunction()

bool Sema::isUsualDeallocationFunction ( const CXXMethodDecl FD)

◆ isValidPointerAttrType()

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

Definition at line 1554 of file SemaDeclAttr.cpp.

References clang::RecordDecl::fields(), clang::Type::getAsUnionType(), clang::QualType::getNonReferenceType(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), and clang::Type::isReferenceType().

Referenced by AddAllocAlignAttr(), AddAssumeAlignedAttr(), attrNonNullArgCheck(), CheckNonNullArguments(), handleNoEscapeAttr(), and handleNonNullAttr().

◆ isValidRVVBitcast()

bool Sema::isValidRVVBitcast ( QualType  srcTy,
QualType  destTy 
)

Are the two types RVV-bitcast-compatible types? I.e.

is bitcasting from the first RVV type (e.g. an RVV scalable type) to the second type (e.g. an RVV VLS type) allowed?

This will also return false if the two given types do not make sense from the perspective of RVV bitcasts.

Definition at line 8289 of file SemaExpr.cpp.

References clang::VectorType::getVectorKind(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isVectorType(), and clang::RVVFixedLengthData.

◆ isValidSectionSpecifier()

llvm::Error Sema::isValidSectionSpecifier ( StringRef  SecName)

Used to implement to perform semantic checking on attribute((section("foo"))) specifiers.

In this case, "foo" is passed in to be checked. If the section specifier is invalid, return an Error that indicates the problem.

This is a simple quality of implementation feature to catch errors and give good diagnostics in cases when the assembler or code generator would otherwise reject the section specifier.

Definition at line 3324 of file SemaDeclAttr.cpp.

References Context, clang::ASTContext::getTargetInfo(), and clang::TargetInfo::getTriple().

Referenced by ActOnPragmaClangSection(), checkCodeSegName(), and checkSectionName().

◆ isValidSveBitcast()

bool Sema::isValidSveBitcast ( QualType  srcTy,
QualType  destTy 
)

Are the two types SVE-bitcast-compatible types? I.e.

is bitcasting from the first SVE type (e.g. an SVE VLAT) to the second type (e.g. an SVE VLST) allowed?

This will also return false if the two given types do not make sense from the perspective of SVE bitcasts.

Definition at line 8268 of file SemaExpr.cpp.

References clang::VectorType::getVectorKind(), clang::Type::isSVESizelessBuiltinType(), clang::Type::isVectorType(), and clang::SveFixedLengthData.

◆ isValidVarArgType()

Sema::VarArgKind Sema::isValidVarArgType ( const QualType Ty)

◆ 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 20247 of file SemaDecl.cpp.

References clang::EnumDecl::enumerators(), FlagBitsCache, clang::EnumDecl::isClosedFlag(), and clang::TagDecl::isCompleteDefinition().

Referenced by ActOnEnumBody(), DiagnoseAssignmentEnum(), and ShouldDiagnoseSwitchCaseNotInEnum().

◆ isVisible()

bool clang::Sema::isVisible ( const NamedDecl D)
inline

◆ 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 1835 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 BuildIvarRefExpr(), and LookupMemberExpr().

◆ keepInLifetimeExtendingContext()

void clang::Sema::keepInLifetimeExtendingContext ( )
inline

keepInLifetimeExtendingContext - Pull down InLifetimeExtendingContext flag from previous context.

Definition at line 6560 of file Sema.h.

References ExprEvalContexts.

Referenced by BuildCXXDefaultArgExpr(), and InstantiateVariableInitializer().

◆ keepInMaterializeTemporaryObjectContext()

void clang::Sema::keepInMaterializeTemporaryObjectContext ( )
inline

keepInMaterializeTemporaryObjectContext - Pull down InMaterializeTemporaryObjectContext flag from previous context.

Definition at line 6573 of file Sema.h.

References ExprEvalContexts.

Referenced by BuildCXXDefaultArgExpr(), and InstantiateVariableInitializer().

◆ LazilyCreateBuiltin()

NamedDecl * Sema::LazilyCreateBuiltin ( IdentifierInfo II,
unsigned  ID,
Scope S,
bool  ForRedeclaration,
SourceLocation  Loc 
)

◆ LoadExternalVTableUses()

void Sema::LoadExternalVTableUses ( )

Load any externally-stored vtable uses.

Definition at line 18567 of file SemaDeclCXX.cpp.

References VTablesUsed, and VTableUses.

Referenced by DefineUsedVTables(), and MarkVTableUsed().

◆ LoadExternalWeakUndeclaredIdentifiers()

void Sema::LoadExternalWeakUndeclaredIdentifiers ( )

Load weak undeclared identifiers from the external source.

Definition at line 929 of file Sema.cpp.

References WeakUndeclaredIdentifiers.

Referenced by ActOnEndOfTranslationUnit(), and ProcessPragmaWeak().

◆ LookupBinOp()

void Sema::LookupBinOp ( Scope S,
SourceLocation  OpLoc,
BinaryOperatorKind  Opc,
UnresolvedSetImpl Functions 
)

◆ LookupBuiltin()

bool Sema::LookupBuiltin ( LookupResult R)

◆ LookupConstructors()

DeclContext::lookup_result Sema::LookupConstructors ( CXXRecordDecl Class)

◆ 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 3610 of file SemaLookup.cpp.

References clang::Class, clang::Qualifiers::Const, CXXCopyAssignment, LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.

◆ LookupCopyingConstructor()

CXXConstructorDecl * Sema::LookupCopyingConstructor ( CXXRecordDecl Class,
unsigned  Quals 
)

Look up the copying constructor for the given class.

Definition at line 3569 of file SemaLookup.cpp.

References clang::Class, clang::Qualifiers::Const, CXXCopyConstructor, LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.

Referenced by CheckCXXThrowOperand().

◆ lookupCoroutineTraits()

ClassTemplateDecl * Sema::lookupCoroutineTraits ( SourceLocation  KwLoc,
SourceLocation  FuncLoc 
)

Lookup 'coroutine_traits' in std namespace and std::experimental namespace.

The namespace found is recorded in Namespace.

Definition at line 1926 of file SemaCoroutine.cpp.

References Diag(), clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::Decl::getLocation(), getStdNamespace(), LookupOrdinaryName, LookupQualifiedName(), PP, clang::Result, and StdCoroutineTraitsCache.

Referenced by lookupPromiseType().

◆ LookupDefaultConstructor()

CXXConstructorDecl * Sema::LookupDefaultConstructor ( CXXRecordDecl Class)

Look up the default constructor for the given class.

Definition at line 3560 of file SemaLookup.cpp.

References clang::Class, CXXDefaultConstructor, LookupSpecialMember(), and clang::Result.

Referenced by TryConstructorInitialization(), TryListInitialization(), and TryValueInitialization().

◆ LookupDestructor()

CXXDestructorDecl * Sema::LookupDestructor ( CXXRecordDecl Class)

◆ 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 12693 of file Sema.h.

Referenced by BuildClassMessage(), BuildInstanceMessage(), and ParseObjCSelectorExpression().

◆ LookupImplementedMethodInGlobalPool()

ObjCMethodDecl * Sema::LookupImplementedMethodInGlobalPool ( Selector  Sel)

LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.

Definition at line 3655 of file SemaDeclObjC.cpp.

References clang::Sema::GlobalMethodPool::end(), clang::Sema::GlobalMethodPool::find(), clang::ObjCMethodDecl::isDefined(), clang::ObjCMethodDecl::isPropertyAccessor(), and MethodPool.

Referenced by DiagnoseUseOfUnimplementedSelectors().

◆ LookupInlineAsmField()

bool Sema::LookupInlineAsmField ( StringRef  Base,
StringRef  Member,
unsigned Offset,
SourceLocation  AsmLoc 
)

◆ LookupInlineAsmIdentifier()

ExprResult Sema::LookupInlineAsmIdentifier ( CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
UnqualifiedId Id,
bool  IsUnevaluatedContext 
)

◆ LookupInlineAsmVarDeclField()

ExprResult Sema::LookupInlineAsmVarDeclField ( Expr RefExpr,
StringRef  Member,
SourceLocation  AsmLoc 
)

◆ 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 3165 of file SemaExpr.cpp.

References BuildIvarRefExpr(), clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::LookupResult::getNameLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::ActionResult< PtrTy, Compress >::isUsable(), LookupBuiltin(), and LookupIvarInObjCMethod().

Referenced by ActOnIdExpression(), and 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 12684 of file Sema.h.

Referenced by BuildInstanceMessage(), hasIsEqualMethod(), and ParseObjCSelectorExpression().

◆ LookupInSuper()

bool Sema::LookupInSuper ( LookupResult R,
CXXRecordDecl Class 
)

Perform qualified name lookup into all base classes of the given class.

Parameters
Rcaptures both the lookup criteria and any lookup results found.
ClassThe 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 2763 of file SemaLookup.cpp.

References clang::LookupResult::addDecl(), clang::Class, Context, clang::LookupResult::empty(), clang::RecordType::getDecl(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::ASTContext::getRecordType(), LookupQualifiedName(), clang::CXXRecordDecl::MergeAccess(), clang::LookupResult::resolveKind(), clang::Result, and clang::LookupResult::setNamingClass().

Referenced by LookupParsedName(), and LookupQualifiedName().

◆ 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 3028 of file SemaExpr.cpp.

References clang::declaresSameEntity(), Diag(), clang::LookupResult::empty(), clang::ObjCIvarDecl::getAccessControl(), clang::ObjCMethodDecl::getClassInterface(), getCurMethodDecl(), clang::NamedDecl::getDeclName(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::LookupResult::getNameLoc(), clang::ObjCMethodDecl::isClassMethod(), clang::Decl::isDefinedOutsideFunctionOrMethod(), clang::ObjCMethodDecl::isInstanceMethod(), clang::LookupResult::isSingleResult(), clang::ObjCInterfaceDecl::lookupInstanceVariable(), and clang::ObjCIvarDecl::Private.

Referenced by ClassifyName(), and LookupInObjCMethod().

◆ LookupLiteralOperator()

Sema::LiteralOperatorLookupResult Sema::LookupLiteralOperator ( Scope S,
LookupResult R,
ArrayRef< QualType ArgTys,
bool  AllowRaw,
bool  AllowTemplate,
bool  AllowStringTemplatePack,
bool  DiagnoseMissing,
StringLiteral StringLit = nullptr 
)

◆ LookupMethodInObjectType()

ObjCMethodDecl * Sema::LookupMethodInObjectType ( Selector  Sel,
QualType  Ty,
bool  IsInstance 
)

◆ LookupMethodInQualifiedType()

ObjCMethodDecl * Sema::LookupMethodInQualifiedType ( Selector  Sel,
const ObjCObjectPointerType OPT,
bool  IsInstance 
)

LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective pointer type.

Definition at line 1960 of file SemaExprObjC.cpp.

References clang::ObjCObjectPointerType::quals().

Referenced by BuildInstanceMessage(), CheckObjCForCollectionOperand(), HandleExprPropertyRefExpr(), and 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 3627 of file SemaLookup.cpp.

References clang::Class, clang::Qualifiers::Const, CXXMoveAssignment, LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.

◆ LookupMovingConstructor()

CXXConstructorDecl * Sema::LookupMovingConstructor ( CXXRecordDecl Class,
unsigned  Quals 
)

Look up the moving constructor for the given class.

Definition at line 3581 of file SemaLookup.cpp.

References clang::Class, clang::Qualifiers::Const, CXXMoveConstructor, LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.

◆ LookupName()

bool Sema::LookupName ( LookupResult R,
Scope S,
bool  AllowBuiltinCreation = false,
bool  ForceNoCPlusPlus = 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
SThe scope from which unqualified name lookup will begin. If the lookup criteria permits, name lookup may also search in the parent scopes.
[in,out]RSpecifies 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 2182 of file SemaLookup.cpp.

References clang::LookupResult::addDecl(), clang::IdentifierResolver::begin(), clang::CPlusPlus, clang::Scope::DeclScope, clang::IdentifierResolver::end(), clang::DeclContext::Equals(), clang::LookupResult::getAcceptableDecl(), getLangOpts(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::DeclContext::getRedeclContext(), IdResolver, isNamespaceOrTranslationUnitScope(), LookupBuiltin(), LookupObjCImplicitSelfParam, LookupRedeclarationWithLinkage, clang::LookupResult::resolveKind(), and clang::LookupResult::setShadowed().

Referenced by ActOnAliasDeclaration(), ActOnConceptDefinition(), ActOnDecompositionDeclarator(), ActOnEnumConstant(), ActOnFriendFunctionDecl(), ActOnLambdaExpressionAfterIntroducer(), ActOnMethodDeclaration(), ActOnNamespaceAliasDef(), ActOnObjCBoolLiteral(), ActOnOMPIteratorExpr(), ActOnOpenMPDeclareMapperDirective(), ActOnOpenMPDeclareReductionDirectiveStart(), ActOnParamDeclarator(), ActOnPragmaDump(), ActOnSizeofParameterPackExpr(), ActOnTag(), BuildBuiltinCallExpr(), BuildCXXNestedNameSpecifier(), buildMemcpyForAssignmentOp(), BuildOperatorCoawaitLookupExpr(), BuildUsingDeclaration(), BuildUsingEnumDeclaration(), CheckAnonMemberRedeclaration(), CheckClassTemplate(), CheckCountedByAttr(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), checkOpenMPDeclareVariantFunction(), CheckShadow(), CheckTypenameType(), DiagnoseInvalidRedeclaration(), emitReplacement(), FindFirstQualifierInScope(), getDestructorName(), getObjCMessageKind(), getOpenCLEnumType(), getOpenCLTypedefType(), getTypeName(), HandleDeclarator(), HandleField(), HandleMSProperty(), handleNSErrorDomain(), isKnownName(), isTagName(), isValidInteropVariable(), LookupInlineAsmField(), LookupLiteralOperator(), clang::LookupNamed(), clang::LookupNamespace(), LookupOverloadedOperatorName(), LookupParsedName(), LookupPredefedObjCSuperType(), LookupSingleName(), LookupTemplateName(), ProcessAPINotes(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().

◆ LookupNecessaryTypesForBuiltin()

void Sema::LookupNecessaryTypesForBuiltin ( Scope S,
unsigned  ID 
)

Definition at line 991 of file SemaLookup.cpp.

References LookupPredefedObjCSuperType().

Referenced by ActOnFunctionDeclarator(), and LazilyCreateBuiltin().

◆ lookupOpenMPDeclareTargetName()

NamedDecl * Sema::lookupOpenMPDeclareTargetName ( Scope CurScope,
CXXScopeSpec ScopeSpec,
const DeclarationNameInfo Id 
)

◆ 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 4432 of file SemaLookup.cpp.

References Context, clang::LabelDecl::Create(), CurContext, clang::Decl::getDeclContext(), clang::Scope::getFnParent(), clang::SourceLocation::isValid(), LookupLabel, LookupSingleName(), NotForRedeclaration, and PushOnScopeChains().

Referenced by GetOrCreateMSAsmLabel().

◆ LookupOverloadedBinOp()

void Sema::LookupOverloadedBinOp ( OverloadCandidateSet CandidateSet,
OverloadedOperatorKind  Op,
const UnresolvedSetImpl Fns,
ArrayRef< Expr * >  Args,
bool  RequiresADL = true 
)

◆ LookupOverloadedOperatorName()

void Sema::LookupOverloadedOperatorName ( OverloadedOperatorKind  Op,
Scope S,
UnresolvedSetImpl Functions 
)

◆ 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
SThe scope from which unqualified name lookup will begin.
SSAn optional C++ scope-specifier, e.g., "::N::M".
EnteringContextIndicates 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 2719 of file SemaLookup.cpp.

References computeDeclContext(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), LookupInSuper(), LookupName(), LookupQualifiedName(), RequireCompleteDeclContext(), clang::LookupResult::setContextRange(), clang::LookupResult::setNotFoundInCurrentInstantiation(), and clang::NestedNameSpecifier::Super.

Referenced by ActOnExplicitInstantiation(), ActOnIdExpression(), ActOnNamespaceAliasDef(), ActOnOpenMPIdExpression(), ActOnPragmaUnused(), ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), ActOnUsingDirective(), buildDeclareReductionRef(), BuildMemInitializer(), buildUserDefinedMapperRef(), CheckMicrosoftIfExistsSymbol(), CheckTemplateTypeArgument(), ClassifyName(), isTagTypeWithMissingTag(), lookupOpenMPDeclareTargetName(), and LookupPotentialTypoResult().

◆ LookupProtocol()

ObjCProtocolDecl * Sema::LookupProtocol ( IdentifierInfo II,
SourceLocation  IdLoc,
RedeclarationKind  Redecl = NotForRedeclaration 
)

◆ 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
Rcaptures both the lookup criteria and any lookup results found.
LookupCtxThe 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.
InUnqualifiedLookuptrue 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 2421 of file SemaLookup.cpp.

References clang::AS_none, clang::DeclContextLookupResult::begin(), Context, clang::DeclListNode::iterator::end(), clang::QualType::getAsOpaquePtr(), getAsTemplateNameDecl(), clang::Decl::getCanonicalDecl(), clang::QualType::getCanonicalType(), clang::CXXRecordDecl::getDefinition(), clang::LookupResult::getIdentifierNamespace(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::ASTContext::getTypeDeclType(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), clang::LookupResult::isForRedeclaration(), clang::Decl::isInIdentifierNamespace(), clang::LookupResult::isTemplateNameLookup(), clang::DeclContext::lookup(), LookupDirect(), clang::CXXRecordDecl::lookupInBases(), LookupLabel, LookupNamespaceName, LookupObjCProtocolName, LookupOperatorName, LookupQualifiedNameInUsingDirectives(), clang::LookupResult::resolveKind(), clang::Result, clang::LookupResult::setNamingClass(), clang::LookupResult::setNotFoundInCurrentInstantiation(), clang::DeclContext::setUseQualifiedLookup(), clang::DeclContext::shouldUseQualifiedLookup(), and Specifier.

Referenced by ActOnCXXTypeid(), ActOnFriendFunctionDecl(), ActOnStartNamespaceDef(), ActOnTag(), BuildBuiltinOffsetOf(), buildCoroutineHandle(), BuildCXXNestedNameSpecifier(), buildDeclareReductionRef(), BuildNonArrayForRange(), BuildQualifiedDeclarationNameExpr(), buildSingleCopyAssignRecursively(), buildStdNoThrowDeclRef(), BuildUsingDeclaration(), BuildVariableInstantiation(), CheckClassTemplate(), checkTupleLikeDecomposition(), CheckTypenameType(), CXXRecordMembersNamed(), DeduceTemplateSpecializationFromInitializer(), DiagnoseEmptyLookup(), DiagnoseInvalidRedeclaration(), DiagnoseTwoPhaseLookup(), doesUsualArrayDeleteWantSize(), emitReplacement(), EvaluateStaticAssertMessageAsString(), FindAllocationFunctions(), FindDeallocationFunction(), clang::Interpreter::FindRuntimeInterface(), FindUsualDeallocationFunction(), getDestructorName(), getTypeName(), handleAliasAttr(), HandleDeclarator(), clang::HLSLExternalSemaSource::InitializeSema(), isDeclaratorFunctionLike(), lookupCoroutineHandleType(), lookupCoroutineTraits(), LookupInlineAsmField(), LookupInlineAsmVarDeclField(), LookupInSuper(), lookupMember(), LookupMemberExprInRecord(), clang::LookupNamed(), clang::LookupNamespace(), LookupParsedName(), LookupPotentialTypoResult(), lookupPromiseType(), LookupQualifiedName(), LookupStdInitializerList(), LookupStdSourceLocationImpl(), lookupStdTypeTraitMember(), LookupTemplateName(), clang::TreeTransform< Derived >::RebuildDependentNameType(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), shouldAddReversedEqEq(), 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
Rcaptures both the lookup criteria and any lookup results found.
LookupCtxThe context in which qualified name lookup will search.
SSAn optional C++ scope-specifier.
Returns
true if lookup succeeded, false if it failed.

Definition at line 2690 of file SemaLookup.cpp.

References clang::CXXScopeSpec::getScopeRep(), LookupInSuper(), LookupQualifiedName(), and clang::NestedNameSpecifier::Super.

◆ LookupSingleName()

NamedDecl * Sema::LookupSingleName ( Scope S,
DeclarationName  Name,
SourceLocation  Loc,
LookupNameKind  NameKind,
RedeclarationKind  Redecl = NotForRedeclaration 
)

◆ LookupSpecialMember()

Sema::SpecialMemberOverloadResult Sema::LookupSpecialMember ( CXXRecordDecl D,
CXXSpecialMember  SM,
bool  ConstArg,
bool  VolatileArg,
bool  RValueThis,
bool  ConstThis,
bool  VolatileThis 
)

Definition at line 3340 of file SemaLookup.cpp.

References clang::QualType::addConst(), AddMethodCandidate(), AddMethodTemplateCandidate(), AddOverloadCandidate(), AddTemplateOverloadCandidate(), clang::QualType::addVolatile(), clang::Sema::SpecialMemberOverloadResult::Ambiguous, clang::AS_public, clang::DeclContextLookupResult::begin(), clang::OverloadCandidateSet::BestViableFunction(), BumpAlloc, CanDeclareSpecialMemberFunction(), clang::Expr::Classify(), Context, clang::CPlusPlus11, clang::OverloadCandidateSet::CSK_Normal, CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXMoveAssignment, CXXMoveConstructor, clang::ASTContext::DeclarationNames, clang::DeclContextLookupResult::empty(), clang::DeclContextLookupResult::end(), clang::ASTContext::getCanonicalType(), clang::getConstructorInfo(), clang::DeclarationNameTable::getCXXConstructorName(), clang::DeclarationNameTable::getCXXOperatorName(), clang::DeclAccessPair::getDecl(), clang::CXXRecordDecl::getDefinition(), clang::CXXRecordDecl::getDestructor(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getTagDeclType(), clang::NamedDecl::getUnderlyingDecl(), clang::FunctionDecl::isDeleted(), clang::DeclContext::lookup(), clang::DeclAccessPair::make(), clang::CXXRecordDecl::needsImplicitCopyAssignment(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), clang::CXXRecordDecl::needsImplicitDestructor(), clang::CXXRecordDecl::needsImplicitMoveAssignment(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), clang::Sema::SpecialMemberOverloadResult::NoMemberOrDeleted, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::Result, runWithSufficientStackSpace(), SM, SpecialMemberCache, clang::Sema::SpecialMemberOverloadResult::Success, clang::VK_LValue, and clang::VK_PRValue.

Referenced by checkMoveAssignmentForRepeatedMove(), inferCUDATargetForImplicitSpecialMember(), lookupCallFromSpecialMember(), LookupCopyingAssignment(), LookupCopyingConstructor(), LookupDefaultConstructor(), LookupDestructor(), LookupMovingAssignment(), and LookupMovingConstructor().

◆ LookupTemplateName()

bool Sema::LookupTemplateName ( LookupResult R,
Scope S,
CXXScopeSpec SS,
QualType  ObjectType,
bool  EnteringContext,
bool MemberOfUnknownSpecialization,
RequiredTemplateKind  RequiredTemplate = SourceLocation(),
AssumedTemplateKind ATK = nullptr,
bool  AllowTypoCorrection = true 
)

Definition at line 376 of file SemaTemplate.cpp.

References clang::LookupResult::addDecl(), clang::Type::castAs(), clang::LookupResult::clear(), computeDeclContext(), CorrectTypo(), clang::CPlusPlus11, CTK_ErrorRecovery, Diag(), diagnoseTypo(), clang::LookupResult::empty(), FilterAcceptableTemplateNames(), FoundFunctions, FoundNothing, clang::Type::getAs(), getAsTemplateNameDecl(), clang::Decl::getCanonicalDecl(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNameLoc(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getRepresentativeDecl(), clang::Sema::RequiredTemplateKind::getTemplateKeywordLoc(), clang::NamedDecl::getUnderlyingDecl(), clang::Sema::RequiredTemplateKind::hasTemplateKeyword(), clang::LookupResult::isAmbiguous(), clang::TagType::isBeingDefined(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::CXXScopeSpec::isEmpty(), clang::DeclarationName::isIdentifier(), clang::Type::isIncompleteType(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::QualType::isNull(), clang::Type::isObjCObjectOrInterfaceType(), clang::LookupResult::isSingleResult(), clang::LookupResult::isSuppressingAmbiguousDiagnostics(), clang::Type::isVectorType(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), None, PDiag(), RequireCompleteDeclContext(), clang::LookupResult::setLookupName(), clang::LookupResult::setTemplateNameLookup(), clang::CorrectionCandidateCallback::WantTypeSpecifiers, and clang::LookupResult::wasNotFoundInCurrentInstantiation().

Referenced by ActOnIdExpression(), ActOnTemplateName(), BuildQualifiedTemplateIdExpr(), isDeductionGuideName(), isTemplateName(), and LookupMemberExprInRecord().

◆ LookupVisibleDecls() [1/2]

void Sema::LookupVisibleDecls ( DeclContext Ctx,
LookupNameKind  Kind,
VisibleDeclConsumer Consumer,
bool  IncludeGlobalScope = true,
bool  IncludeDependentBases = false,
bool  LoadExternal = true 
)

Definition at line 4420 of file SemaLookup.cpp.

References Consumer.

◆ LookupVisibleDecls() [2/2]

void Sema::LookupVisibleDecls ( Scope S,
LookupNameKind  Kind,
VisibleDeclConsumer Consumer,
bool  IncludeGlobalScope = true,
bool  LoadExternal = true 
)

Definition at line 4412 of file SemaLookup.cpp.

References Consumer.

Referenced by AddRecordMembersCompletionResults().

◆ MakeFullDiscardedValueExpr()

FullExprArg clang::Sema::MakeFullDiscardedValueExpr ( Expr Arg)
inline

◆ MakeFullExpr() [1/2]

FullExprArg clang::Sema::MakeFullExpr ( Expr Arg)
inline

◆ MakeFullExpr() [2/2]

FullExprArg clang::Sema::MakeFullExpr ( Expr Arg,
SourceLocation  CC 
)
inline

Definition at line 6062 of file Sema.h.

References ActOnFinishFullExpr().

◆ makeMergedDefinitionVisible()

void Sema::makeMergedDefinitionVisible ( NamedDecl ND)

◆ makeModuleVisible()

void clang::Sema::makeModuleVisible ( Module Mod,
SourceLocation  ImportLoc 
)
inline

Definition at line 8006 of file Sema.h.

◆ 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 520 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 20815 of file SemaExpr.cpp.

References MarkFunctionReferenced(), MarkVariableReferenced(), and clang::Decl::setReferenced().

Referenced by ActOnSizeofParameterPackExpr(), BuildCXXNestedNameSpecifier(), BuildIvarRefExpr(), BuildMemInitializer(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTypenameType(), ClassifyName(), getConstructorName(), getDestructorName(), getTypeName(), LookupInlineAsmField(), and MarkExprReferenced().

◆ MarkAsLateParsedTemplate()

void Sema::MarkAsLateParsedTemplate ( FunctionDecl FD,
Decl FnD,
CachedTokens Toks 
)

◆ MarkBaseAndMemberDestructorsReferenced()

void Sema::MarkBaseAndMemberDestructorsReferenced ( SourceLocation  Loc,
CXXRecordDecl Record 
)

◆ MarkCaptureUsedInEnclosingContext()

void Sema::MarkCaptureUsedInEnclosingContext ( ValueDecl Capture,
SourceLocation  Loc,
unsigned  CapturingScopeIndex 
)

◆ MarkDeclarationsReferencedInExpr()

void Sema::MarkDeclarationsReferencedInExpr ( Expr E,
bool  SkipLocalVariables = false,
ArrayRef< const Expr * >  StopAt = std::nullopt 
)

Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced".

Parameters
SkipLocalVariablesIf true, don't mark local variables as 'referenced'.
StopAtSubexpressions that we shouldn't recurse into.

Definition at line 20928 of file SemaExpr.cpp.

Referenced by ActOnOpenMPLoopInitialization(), ActOnOpenMPRegionEnd(), BuildCXXDefaultInitExpr(), and CheckCXXDefaultArgExpr().

◆ 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 20868 of file SemaExpr.cpp.

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

◆ MarkDeclRefReferenced()

void Sema::MarkDeclRefReferenced ( DeclRefExpr E,
const Expr Base = nullptr 
)

◆ MarkDeducedTemplateParameters() [1/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 6686 of file SemaTemplateDeduction.cpp.

References clang::Function, FunctionTemplate, clang::TemplateParameterList::getDepth(), MarkUsedTemplateParameters(), and clang::TemplateParameterList::size().

◆ MarkDeducedTemplateParameters() [2/2]

void clang::Sema::MarkDeducedTemplateParameters ( const FunctionTemplateDecl FunctionTemplate,
llvm::SmallBitVector &  Deduced 
)
inline

◆ MarkExpressionAsImmediateEscalating()

void Sema::MarkExpressionAsImmediateEscalating ( Expr E)

◆ MarkFunctionParmPackReferenced()

void Sema::MarkFunctionParmPackReferenced ( FunctionParmPackExpr E)

Perform reference-marking and odr-use handling for a FunctionParmPackExpr.

Definition at line 20805 of file SemaExpr.cpp.

References clang::FunctionParmPackExpr::getParameterPackLocation(), MarkExprReferenced(), and RefsMinusAssignments.

◆ 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 18892 of file SemaExpr.cpp.

References CheckCompleteDestructorVariant(), CheckCompleteParameterTypesForMangler(), CheckCUDACall(), checkSpecializationReachability(), CodeSynthesisContexts, Consumer, Context, clang::ASTContext::CUDAImplicitHostDeviceFunUsedByDevice, CUDARecordImplicitHostDeviceFuncUsedByDevice(), CurContext, DefineDefaultedComparison(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), clang::Func, funcHasParameterSizeMangling(), getASTContext(), clang::TargetInfo::getCXXABI(), getDefaultedComparisonKind(), clang::FunctionProtoType::getExceptionSpecType(), getLangOpts(), clang::ASTContext::getTargetInfo(), clang::ASTConsumer::HandleCXXImplicitFunctionInstantiation(), ImmediateFunctionContext, clang::Init, InstantiateFunctionDefinition(), isExternalWithNoLinkageType(), isImplicitlyDefinableConstexprFunction(), clang::SourceLocation::isInvalid(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), clang::TargetCXXABI::isMicrosoft(), isOdrUseContext(), isPotentiallyConstantEvaluatedContext(), clang::isUnresolvedExceptionSpec(), LangOpts, MarkFunctionReferenced(), MarkVTableUsed(), None, Parent, PendingInstantiations, PendingLocalImplicitInstantiations, PotentiallyEvaluated, ResolveExceptionSpec(), runWithSufficientStackSpace(), clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, and UndefinedButUsed.

Referenced by ActOnCUDAExecConfigExpr(), ActOnCXXDelete(), ActOnDecltypeExpression(), BuildCXXConstructExpr(), BuildCXXNew(), CheckCXXThrowOperand(), CheckDestructor(), checkDestructorReference(), CheckParmsForFunctionDef(), DeduceTemplateSpecializationFromInitializer(), DefineImplicitLambdaToFunctionPointerConversion(), DefineInheritingConstructor(), FinalizeVarWithDestructor(), findDeleteForPromise(), MarkAnyDeclReferenced(), MarkBaseAndMemberDestructorsReferenced(), MarkFunctionReferenced(), MarkVirtualBaseDestructorsReferenced(), MarkVirtualMembersReferenced(), MarkVTableUsed(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), ReferenceDllExportedMembers(), SetDelegatingInitializer(), SetIvarInitializers(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

◆ MarkMemberReferenced()

void Sema::MarkMemberReferenced ( MemberExpr E)

◆ MarkThisReferenced()

void Sema::MarkThisReferenced ( CXXThisExpr This)

Definition at line 1447 of file SemaExprCXX.cpp.

References CheckCXXThisCapture().

Referenced by BuildCXXThisExpr().

◆ MarkTypoCorrectedFunctionDefinition()

void Sema::MarkTypoCorrectedFunctionDefinition ( const NamedDecl F)

Definition at line 9114 of file SemaDecl.cpp.

References TypoCorrectedFunctionDefinitions.

Referenced by DiagnoseInvalidRedeclaration().

◆ MarkUnusedFileScopedDecl()

void Sema::MarkUnusedFileScopedDecl ( const DeclaratorDecl D)

◆ 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
Ethe expression from which template parameters will be deduced.
Useda bit vector whose elements will be set to true to indicate when the corresponding template parameter will be deduced.

Definition at line 6652 of file SemaTemplateDeduction.cpp.

References Context, MarkUsedTemplateParameters(), and Used.

Referenced by checkTemplatePartialSpecialization(), MarkDeducedTemplateParameters(), MarkUsedTemplateParameters(), and substituteParameterMappings().

◆ 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
TemplateArgsthe template argument list from which template parameters will be deduced.
Useda bit vector whose elements will be set to true to indicate when the corresponding template parameter will be deduced.

Definition at line 6668 of file SemaTemplateDeduction.cpp.

References clang::TemplateArgumentList::asArray(), Context, hasPackExpansionBeforeEnd(), MarkUsedTemplateParameters(), clang::TemplateArgumentList::size(), and Used.

◆ 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 20680 of file SemaExpr.cpp.

References DoMarkVarDeclReferenced(), and RefsMinusAssignments.

Referenced by ActOnOpenMPRegionEnd(), CheckComparisonCategoryType(), MarkAnyDeclReferenced(), ReferenceDllExportedMembers(), and tryCaptureOpenMPLambdas().

◆ MarkVirtualBaseDestructorsReferenced()

void Sema::MarkVirtualBaseDestructorsReferenced ( SourceLocation  Location,
CXXRecordDecl ClassDecl,
llvm::SmallPtrSetImpl< const RecordType * > *  DirectVirtualBases = nullptr 
)

Mark destructors of virtual bases of this class referenced.

In the Itanium C++ ABI, this is done when emitting a destructor for any non-abstract class. In the Microsoft C++ ABI, this is done any time a class's destructor is referenced.

Definition at line 5965 of file SemaDeclCXX.cpp.

References AR_accessible, clang::Type::castAs(), CheckDerivedToBaseConversion(), CheckDestructorAccess(), Context, DiagnoseUseOfDecl(), clang::RecordType::getDecl(), clang::Decl::getLocation(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::Decl::isInvalidDecl(), LookupDestructor(), MarkFunctionReferenced(), PDiag(), and clang::CXXRecordDecl::vbases().

Referenced by CheckCompleteDestructorVariant(), and MarkBaseAndMemberDestructorsReferenced().

◆ 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 18743 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::methods(), and ResolveExceptionSpec().

Referenced by DefineUsedVTables().

◆ MarkVirtualMembersReferenced()

void Sema::MarkVirtualMembersReferenced ( SourceLocation  Loc,
const CXXRecordDecl RD,
bool  ConstexprOnly = false 
)

◆ MarkVTableUsed()

void Sema::MarkVTableUsed ( SourceLocation  Loc,
CXXRecordDecl Class,
bool  DefinitionRequired = false 
)

◆ 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 2834 of file SemaDeclObjC.cpp.

References clang::ObjCContainerDecl::class_methods(), clang::ObjCContainerDecl::getClassMethod(), clang::ObjCContainerDecl::getInstanceMethod(), clang::ObjCContainerDecl::instance_methods(), clang::ObjCMethodDecl::isSynthesizedAccessorStub(), MatchAllMethodDeclarations(), WarnConflictingTypedMethods(), WarnExactTypedMethods(), and WarnUndefinedMethod().

Referenced by CheckCategoryVsClassMethodMatches(), ImplMethodsVsClassMethods(), and MatchAllMethodDeclarations().

◆ 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
DeclStartLocthe start of the declaration that has a scope specifier or a template parameter list.
DeclLocThe location of the declaration itself.
SSthe scope specifier that will be matched to the given template parameter lists. This scope specifier precedes a qualified name that is being declared.
TemplateIdThe template-id following the scope specifier, if there is one. Used to check for a missing 'template<>'.
ParamListsthe template parameter lists, from the outermost to the innermost template parameter lists.
IsFriendWhether to apply the slightly different rules for matching template parameters to scope specifiers in friend declarations.
IsMemberSpecializationwill 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 3686 of file SemaTemplate.cpp.

References CheckTemplateParameterList(), computeDeclContext(), Context, clang::TemplateParameterList::Create(), clang::FixItHint::CreateInsertion(), DependsOnTemplateParameters(), Diag(), clang::Enum, clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::NestedNameSpecifier::getAsType(), clang::Decl::getDeclContext(), getRangeOfTypeInNestedNameSpecifier(), clang::CXXScopeSpec::getScopeRep(), clang::TemplateDecl::getTemplateParameters(), clang::ASTContext::getTypeDeclType(), clang::Invalid, clang::Type::isDependentType(), clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, Parent, clang::TemplateIdAnnotation::RAngleLoc, TemplateParameterListsAreEqual(), TPC_ClassTemplateMember, TPL_TemplateMatch, and clang::TSK_ExplicitSpecialization.

Referenced by ActOnClassTemplateSpecialization(), ActOnFunctionDeclarator(), ActOnStartFunctionDeclarationDeclarator(), ActOnTag(), ActOnTemplatedFriendTag(), and ActOnVariableDeclarator().

◆ 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 3263 of file SemaDeclObjC.cpp.

References Context, getLangOpts(), clang::ObjCMethodDecl::getReturnType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isDirectMethod(), clang::Decl::isUnconditionallyVisible(), matchTypes(), clang::ObjCMethodDecl::param_begin(), and clang::ObjCMethodDecl::param_end().

Referenced by ActOnAtEnd(), addMethodToGlobalList(), DiagnoseClassExtensionDupMethods(), DiagnoseMultipleMethodInGlobalPool(), and HelperToDiagnoseMismatchedMethodsInGlobalPool().

◆ MaybeAddCUDAConstantAttr()

void Sema::MaybeAddCUDAConstantAttr ( VarDecl VD)

◆ maybeAddCUDAHostDeviceAttrs()

void Sema::maybeAddCUDAHostDeviceAttrs ( FunctionDecl FD,
const LookupResult Previous 
)

◆ 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 7378 of file SemaExprCXX.cpp.

References clang::Bind, clang::ASTContext::BoundMemberTy, clang::Call, clang::Type::castAs(), CheckDestructorAccess(), Cleanup, Context, clang::CPlusPlus, clang::CXXTemporary::Create(), clang::CXXBindTemporaryExpr::Create(), clang::ImplicitCastExpr::Create(), DiagnoseUseOfDecl(), clang::QualType::DK_nontrivial_c_struct, 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::QualType::isDestructedType(), clang::Expr::isGLValue(), clang::Decl::isInvalidDecl(), clang::Type::isObjCARCImplicitlyUnretainedType(), clang::Type::isObjCRetainableType(), LookupDestructor(), MarkFunctionReferenced(), clang::LangOptions::ObjCRuntime, clang::OMF_performSelector, PDiag(), clang::CleanupInfo::setExprNeedsCleanups(), and clang::VK_PRValue.

Referenced by BuildClassMessage(), BuildCompoundLiteralExpr(), BuildCXXCastArgument(), BuildInstanceMessage(), BuildLambdaExpr(), BuildObjCArrayLiteral(), BuildObjCBoxedExpr(), BuildObjCNumericLiteral(), BuildResolvedCallExpr(), BuildStmtExpr(), CopyObject(), clang::InitializationSequence::Perform(), and PerformConstructorInitialization().

◆ MaybeConvertParenListExprToParenExpr()

ExprResult Sema::MaybeConvertParenListExprToParenExpr ( Scope S,
Expr ME 
)

◆ MaybeCreateExprWithCleanups() [1/2]

Expr * Sema::MaybeCreateExprWithCleanups ( Expr SubExpr)

◆ MaybeCreateExprWithCleanups() [2/2]

ExprResult Sema::MaybeCreateExprWithCleanups ( ExprResult  SubExpr)

◆ MaybeCreateStmtWithCleanups()

Stmt * Sema::MaybeCreateStmtWithCleanups ( Stmt SubStmt)

◆ 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 1553 of file SemaConcept.cpp.

References clang::AtomicConstraint::ConstraintExpr, Context, Diag(), clang::Stmt::getBeginLoc(), getNormalizedAssociatedConstraints(), clang::Stmt::getSourceRange(), clang::AtomicConstraint::hasMatchingParameterMapping(), isSFINAEContext(), makeCNF(), makeDNF(), clang::Stmt::Profile(), clang::AtomicConstraint::subsumes(), and subsumes().

Referenced by checkMoreSpecializedThanPrimary(), CheckTemplateTemplateArgument(), and MaybeDiagnoseAmbiguousConstraints().

◆ maybeExtendBlockObject()

void Sema::maybeExtendBlockObject ( ExprResult E)

◆ MaybeSuggestAddingStaticToDecl()

void Sema::MaybeSuggestAddingStaticToDecl ( const FunctionDecl D)

◆ mergeAlwaysInlineAttr()

AlwaysInlineAttr * Sema::mergeAlwaysInlineAttr ( Decl D,
const AttributeCommonInfo CI,
const IdentifierInfo Ident 
)

◆ mergeAvailabilityAttr()

AvailabilityAttr * 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 
)

◆ mergeBTFDeclTagAttr()

BTFDeclTagAttr * Sema::mergeBTFDeclTagAttr ( Decl D,
const BTFDeclTagAttr &  AL 
)

Definition at line 7781 of file SemaDeclAttr.cpp.

References Context, and hasBTFDeclTagAttr().

Referenced by mergeDeclAttribute().

◆ mergeCodeSegAttr()

CodeSegAttr * Sema::mergeCodeSegAttr ( Decl D,
const AttributeCommonInfo CI,
StringRef  Name 
)

◆ 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 4346 of file SemaDecl.cpp.

References Context, clang::CPlusPlus, getLangOpts(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::FunctionDecl::isPureVirtual(), clang::Decl::isUsed(), MergeCXXFunctionDecl(), mergeDeclAttributes(), mergeParamDeclAttributes(), mergeParamDeclTypes(), clang::ASTContext::mergeTypes(), clang::FunctionDecl::setIsPureVirtual(), clang::Decl::setIsUsed(), and clang::ValueDecl::setType().

Referenced by MergeFunctionDecl().

◆ 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 469 of file SemaDeclCXX.cpp.

References CheckForFunctionRedefinition(), Diag(), clang::Decl::FOK_None, clang::Decl::FOK_Undeclared, functionDeclHasDefaultArgument(), clang::FunctionDecl::getConstexprKind(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::getDefaultArgRange(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getFriendObjectKind(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::FunctionDecl::getMinRequiredArguments(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Redeclarable< decl_type >::getPreviousDecl(), getSpecialMember(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::ParmVarDecl::hasDefaultArg(), clang::ParmVarDecl::hasInheritedDefaultArg(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUnparsedDefaultArg(), clang::Invalid, clang::NamedDecl::isCXXClassMember(), isDeclInScope(), clang::FunctionDecl::isDefined(), clang::DeclContext::isDependentContext(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::FunctionDecl::isInlined(), clang::FunctionDecl::isInlineSpecified(), clang::Decl::isLocalExternDecl(), clang::FunctionDecl::isThisDeclarationInstantiatedFromAFriendDefinition(), isVisible(), clang::LookupResult::isVisible(), clang::ParmVarDecl::setDefaultArg(), clang::ParmVarDecl::setHasInheritedDefaultArg(), clang::ParmVarDecl::setUninstantiatedDefaultArg(), clang::ParmVarDecl::setUnparsedDefaultArg(), clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by MergeCompatibleFunctionDecls().

◆ mergeDeclAttributes()

void Sema::mergeDeclAttributes ( NamedDecl New,
Decl Old,
AvailabilityMergeKind  AMK = AMK_Redeclaration 
)

◆ mergeDLLExportAttr()

DLLExportAttr * Sema::mergeDLLExportAttr ( Decl D,
const AttributeCommonInfo CI 
)

◆ mergeDLLImportAttr()

DLLImportAttr * Sema::mergeDLLImportAttr ( Decl D,
const AttributeCommonInfo CI 
)

◆ mergeEnforceTCBAttr()

EnforceTCBAttr * Sema::mergeEnforceTCBAttr ( Decl D,
const EnforceTCBAttr &  AL 
)

Definition at line 9004 of file SemaDeclAttr.cpp.

Referenced by mergeDeclAttribute().

◆ mergeEnforceTCBLeafAttr()

EnforceTCBLeafAttr * Sema::mergeEnforceTCBLeafAttr ( Decl D,
const EnforceTCBLeafAttr &  AL 
)

Definition at line 9009 of file SemaDeclAttr.cpp.

Referenced by mergeDeclAttribute().

◆ mergeErrorAttr()

ErrorAttr * Sema::mergeErrorAttr ( Decl D,
const AttributeCommonInfo CI,
StringRef  NewUserDiagnostic 
)

◆ mergeFormatAttr()

FormatAttr * 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,
bool  NewDeclIsDefn 
)

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 3648 of file SemaDecl.cpp.

References clang::Decl::addAttr(), adjustDeclContextForDeclaratorDecl(), clang::ASTContext::adjustFunctionType(), BuiltinFunction, clang::ASTContext::BuiltinInfo, canFullyTypeCheckRedeclaration(), canRedefineFunction(), clang::Type::castAs(), CheckEquivalentExceptionSpec(), CheckRedeclarationInModule(), Context, clang::CPlusPlus, clang::ParmVarDecl::Create(), Diag(), clang::Decl::dropAttr(), clang::First, clang::Decl::FOK_None, clang::Type::getAs(), clang::Decl::getAsFunction(), getASTContext(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), getCallingConvAttributedType(), clang::FunctionDecl::getCanonicalDecl(), clang::ASTContext::getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::Type::getContainedAutoType(), clang::FunctionDecl::getDeclaredReturnType(), clang::NamedDecl::getDeclName(), clang::DeducedType::getDeducedType(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::Decl::getFriendObjectKind(), clang::ASTContext::getFunctionType(), clang::FunctionType::ExtInfo::getHasRegParm(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::FunctionType::getNameForCallConv(), clang::FunctionType::ExtInfo::getNoCallerSavedRegs(), clang::FunctionType::ExtInfo::getNoReturn(), getNoteDiagForInvalidRedeclaration(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionType::ExtInfo::getProducesResult(), clang::FunctionType::ExtInfo::getRegParm(), clang::FunctionType::getRegParmType(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), getSpecialMember(), clang::FunctionDecl::getStorageClass(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), hasIdenticalPassObjectSizeAttrs(), clang::FunctionDecl::hasInheritedPrototype(), clang::FunctionDecl::hasPrototype(), clang::ASTContext::hasSameFunctionTypeIgnoringExceptionSpec(), clang::ASTContext::hasSameFunctionTypeIgnoringPtrSizes(), clang::ASTContext::hasSameType(), clang::FunctionDecl::hasWrittenPrototype(), haveIncompatibleLanguageLinkages(), int, inTemplateInstantiation(), clang::QualType::isCanonical(), clang::NamedDecl::isCXXClassMember(), clang::DeducedType::isDeduced(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::Decl::isImplicit(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), IsInvalidSMECallConversion(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::FunctionDecl::isOutOfLine(), clang::Builtin::Context::isPredefinedLibFunction(), clang::DeclContext::isRecord(), clang::CXXMethodDecl::isStatic(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::FunctionDecl::isTrivial(), clang::Decl::isUsed(), MergeCompatibleFunctionDecls(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), notePreviousDefinition(), clang::Redeclarable< decl_type >::redecls(), clang::Redeclarable< decl_type >::redecls_end(), clang::SC_None, clang::SC_Static, clang::FunctionDecl::setHasInheritedPrototype(), clang::Decl::setImplicit(), clang::ParmVarDecl::setScopeInfo(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), SubstAutoType(), SubstAutoTypeDependent(), clang::ASTContext::typesAreCompatible(), UndefinedButUsed, clang::FunctionType::ExtInfo::withCallingConv(), clang::FunctionType::ExtInfo::withNoCallerSavedRegs(), clang::FunctionType::ExtInfo::withNoReturn(), clang::FunctionType::ExtInfo::withProducesResult(), and clang::FunctionType::ExtInfo::withRegParm().

Referenced by CheckFunctionDeclaration().

◆ mergeHLSLNumThreadsAttr()

HLSLNumThreadsAttr * Sema::mergeHLSLNumThreadsAttr ( Decl D,
const AttributeCommonInfo AL,
int  X,
int  Y,
int  Z 
)

◆ mergeHLSLParamModifierAttr()

HLSLParamModifierAttr * Sema::mergeHLSLParamModifierAttr ( Decl D,
const AttributeCommonInfo AL,
HLSLParamModifierAttr::Spelling  Spelling 
)

◆ mergeHLSLShaderAttr()

HLSLShaderAttr * Sema::mergeHLSLShaderAttr ( Decl D,
const AttributeCommonInfo AL,
HLSLShaderAttr::ShaderType  ShaderType 
)

◆ mergeImportModuleAttr()

WebAssemblyImportModuleAttr * Sema::mergeImportModuleAttr ( Decl D,
const WebAssemblyImportModuleAttr &  AL 
)

Definition at line 7811 of file SemaDeclAttr.cpp.

References Context, Diag(), clang::Decl::getAttr(), and clang::FunctionDecl::hasBody().

Referenced by mergeDeclAttribute().

◆ mergeImportNameAttr()

WebAssemblyImportNameAttr * Sema::mergeImportNameAttr ( Decl D,
const WebAssemblyImportNameAttr &  AL 
)

Definition at line 7831 of file SemaDeclAttr.cpp.

References Context, Diag(), clang::Decl::getAttr(), and clang::FunctionDecl::hasBody().

Referenced by mergeDeclAttribute().

◆ mergeInternalLinkageAttr() [1/2]

InternalLinkageAttr * Sema::mergeInternalLinkageAttr ( Decl D,
const InternalLinkageAttr &  AL 
)

◆ mergeInternalLinkageAttr() [2/2]

InternalLinkageAttr * Sema::mergeInternalLinkageAttr ( Decl D,
const ParsedAttr AL 
)

◆ mergeMinSizeAttr()

MinSizeAttr * Sema::mergeMinSizeAttr ( Decl D,
const AttributeCommonInfo CI 
)

◆ mergeMSInheritanceAttr()

MSInheritanceAttr * Sema::mergeMSInheritanceAttr ( Decl D,
const AttributeCommonInfo CI,
bool  BestCase,
MSInheritanceModel  Model 
)

◆ mergeObjCMethodDecls()

void Sema::mergeObjCMethodDecls ( ObjCMethodDecl New,
ObjCMethodDecl Old 
)

◆ mergeOptimizeNoneAttr()

OptimizeNoneAttr * Sema::mergeOptimizeNoneAttr ( Decl D,
const AttributeCommonInfo CI 
)

◆ mergeSectionAttr()

SectionAttr * Sema::mergeSectionAttr ( Decl D,
const AttributeCommonInfo CI,
StringRef  Name 
)

◆ mergeSwiftNameAttr()

SwiftNameAttr * Sema::mergeSwiftNameAttr ( Decl D,
const SwiftNameAttr &  SNA,
StringRef  Name 
)

Definition at line 5023 of file SemaDeclAttr.cpp.

References Context, Diag(), clang::Decl::dropAttr(), and clang::Decl::getAttr().

Referenced by mergeDeclAttribute().

◆ 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 2568 of file SemaDecl.cpp.

References clang::C11, clang::Type::castAs(), Context, clang::CPlusPlus, CurContext, Diag(), clang::TypedefNameDecl::getAnonDeclWithTypedefName(), clang::LookupResult::getAsSingle(), clang::NamedDecl::getDeclName(), getDiagnostics(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::Decl::getLocation(), getNonFieldDeclScope(), clang::ASTContext::getObjCClassType(), clang::ASTContext::getObjCIdType(), clang::ASTContext::getObjCSelType(), clang::LookupResult::getRepresentativeDecl(), clang::ASTContext::getSourceManager(), clang::QualType::getTypePtr(), clang::TypedefNameDecl::getUnderlyingType(), hasVisibleDefinition(), IdResolver, clang::Scope::isDeclScope(), clang::Decl::isImplicit(), isIncompatibleTypedef(), clang::SourceManager::isInSystemHeader(), clang::Decl::isInvalidDecl(), clang::Type::isPointerType(), clang::Type::isStructureType(), clang::SourceLocation::isValid(), clang::Type::isVoidPointerType(), makeMergedDefinitionVisible(), mergeDeclAttributes(), notePreviousDefinition(), clang::ObjC, clang::Scope::RemoveDecl(), clang::IdentifierResolver::RemoveDecl(), clang::Decl::setInvalidDecl(), clang::TypedefNameDecl::setModedTypeSourceInfo(), clang::ASTContext::setObjCClassRedefinitionType(), clang::ASTContext::setObjCIdRedefinitionType(), clang::ASTContext::setObjCSelRedefinitionType(), clang::Redeclarable< decl_type >::setPreviousDecl(), clang::TypeDecl::setTypeForDecl(), and clang::TypedefNameDecl::setTypeSourceInfo().

Referenced by ActOnTypedefNameDecl().

◆ mergeTypeVisibilityAttr()

TypeVisibilityAttr * Sema::mergeTypeVisibilityAttr ( Decl D,
const AttributeCommonInfo CI,
TypeVisibilityAttr::VisibilityType  Vis 
)

Definition at line 2898 of file SemaDeclAttr.cpp.

Referenced by handleVisibilityAttr(), and mergeDeclAttribute().

◆ mergeUuidAttr()

UuidAttr * Sema::mergeUuidAttr ( Decl D,
const AttributeCommonInfo CI,
StringRef  UuidAsWritten,
MSGuidDecl GuidDecl 
)

◆ 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 4552 of file SemaDecl.cpp.

References adjustDeclContextForDeclaratorDecl(), CheckRedeclarationInModule(), checkVarDeclRedefinition(), clang::CPlusPlus, clang::VarDecl::Definition, Diag(), clang::Decl::dropAttr(), clang::Decl::getAccess(), clang::Decl::getAttr(), clang::VarDecl::getCanonicalDecl(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::VarDecl::getDescribedVarTemplate(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getMostRecentDecl(), getNoteDiagForInvalidRedeclaration(), 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::VarDecl::isStaticDataMember(), clang::VarDecl::isThisDeclarationADefinition(), clang::Decl::isUsed(), mergeDeclAttributes(), mergeTypeWithPrevious(), MergeVarDeclTypes(), notePreviousDefinition(), Previous, clang::SC_None, clang::SC_Static, clang::Decl::setAccess(), clang::VarDecl::setImplicitlyInline(), clang::Decl::setInvalidDecl(), clang::Decl::setIsUsed(), clang::Redeclarable< decl_type >::setPreviousDecl(), TemplateParameterListsAreEqual(), clang::VarDecl::TLS_Dynamic, TPL_TemplateMatch, and UndefinedButUsed.

Referenced by CheckVariableDeclaration().

◆ 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 1609 of file SemaDeclCXX.cpp.

References clang::Type::castAs(), CheckEquivalentExceptionSpec(), Context, clang::Type::getAs(), getLangOpts(), clang::Decl::getLocation(), clang::Type::getPointeeType(), clang::ValueDecl::getType(), clang::ASTContext::hasSameType(), clang::Type::isFunctionProtoType(), P, and clang::Decl::setInvalidDecl().

Referenced by MergeVarDeclTypes().

◆ MergeVarDeclTypes()

void Sema::MergeVarDeclTypes ( VarDecl New,
VarDecl Old,
bool  MergeTypeWithOld 
)

◆ mergeVisibilityAttr()

VisibilityAttr * Sema::mergeVisibilityAttr ( Decl D,
const AttributeCommonInfo CI,
VisibilityAttr::VisibilityType  Vis 
)

Definition at line 2891 of file SemaDeclAttr.cpp.

Referenced by handleVisibilityAttr(), and mergeDeclAttribute().

◆ 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 3029 of file Sema.h.

References clang::CPlusPlus, clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), and clang::ActionResult< PtrTy, Compress >::isInvalid().

◆ ModifyFnAttributesMSPragmaOptimize()

void Sema::ModifyFnAttributesMSPragmaOptimize ( FunctionDecl FD)

Only called on function definitions; if there is a MSVC #pragma optimize in scope, consider changing the function's attributes based on the optimization list passed to the pragma.

Definition at line 1188 of file SemaAttr.cpp.

References AddOptnoneAttributeIfNoConflicts(), clang::DeclaratorDecl::getBeginLoc(), and MSPragmaOptimizeIsOn.

Referenced by ActOnFunctionDeclarator().

◆ NeedToCaptureVariable()

bool Sema::NeedToCaptureVariable ( ValueDecl Var,
SourceLocation  Loc 
)

Checks if the variable must be captured.

Definition at line 20018 of file SemaExpr.cpp.

References TryCapture_Implicit, and tryCaptureVariable().

Referenced by BuildDeclRefExpr().

◆ NoteAllFoundTemplates()

void Sema::NoteAllFoundTemplates ( TemplateName  Name)

◆ NoteAllOverloadCandidates()

void Sema::NoteAllOverloadCandidates ( Expr E,
QualType  DestType = QualType(),
bool  TakingAddress = false 
)

◆ NoteDeletedFunction()

void Sema::NoteDeletedFunction ( FunctionDecl FD)

◆ NoteDeletedInheritingConstructor()

void Sema::NoteDeletedInheritingConstructor ( CXXConstructorDecl CD)

◆ NoteHiddenVirtualMethods()

void Sema::NoteHiddenVirtualMethods ( CXXMethodDecl MD,
SmallVectorImpl< CXXMethodDecl * > &  OverloadedMethods 
)

◆ NoteOverloadCandidate()

void Sema::NoteOverloadCandidate ( const NamedDecl Found,
const FunctionDecl Fn,
OverloadCandidateRewriteKind  RewriteKind = OverloadCandidateRewriteKind(),
QualType  DestType = QualType(),
bool  TakingAddress = false 
)

◆ notePreviousDefinition()

void Sema::notePreviousDefinition ( const NamedDecl Old,
SourceLocation  New 
)

◆ NoteTemplateLocation()

void Sema::NoteTemplateLocation ( const NamedDecl Decl,
std::optional< SourceRange ParamRange = {} 
)

◆ NoteTemplateParameterLocation()

void Sema::NoteTemplateParameterLocation ( const NamedDecl Decl)

◆ OutermostDeclarationWithDelayedImmediateInvocations()

std::optional< ExpressionEvaluationContextRecord::InitializationContext > clang::Sema::OutermostDeclarationWithDelayedImmediateInvocations ( ) const
inline

Definition at line 6542 of file Sema.h.

References ExprEvalContexts, and PotentiallyEvaluated.

Referenced by BuildCXXDefaultArgExpr(), and BuildCXXDefaultInitExpr().

◆ ParsedFreeStandingDeclSpec() [1/2]

Decl * Sema::ParsedFreeStandingDeclSpec ( Scope S,
AccessSpecifier  AS,
DeclSpec DS,
const ParsedAttributesView DeclAttrs,
MultiTemplateParamsArg  TemplateParams,
bool  IsExplicitInstantiation,
RecordDecl *&  AnonRecord 
)

ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.

"struct foo;") is parsed. It also accepts template parameters to cope with template friend declarations.

Definition at line 5095 of file SemaDecl.cpp.

References ActOnDocumentableDecl(), ActOnFriendTypeDecl(), BuildAnonymousStructOrUnion(), BuildMicrosoftCAnonymousStruct(), Context, clang::CPlusPlus, clang::FixItHint::CreateRemoval(), CurContext, Diag(), DiagnoseFunctionSpecifiers(), clang::ParsedAttributesView::empty(), clang::Enum, clang::OpaquePtr< PtrTy >::get(), clang::Type::getAsStructureType(), clang::Type::getAsUnionType(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getAttributes(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getConstexprSpecifier(), clang::DeclSpec::getConstexprSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), GetDiagnosticTypeSpecifierID(), clang::DeclSpec::getInlineSpecLoc(), getLangOpts(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::ASTContext::getPrintingPolicy(), clang::DeclSpec::getRepAsDecl(), clang::DeclSpec::getRepAsType(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::TagDecl::getTagKind(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getUnalignedSpecLoc(), handleTagNumbering(), clang::DeclSpec::hasConstexprSpecifier(), clang::DeclSpec::isExternInLinkageSpec(), clang::DeclSpec::isFriendSpecified(), clang::DeclContext::isFunctionOrMethod(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isMissingDeclaratorOk(), clang::DeclSpec::isModulePrivateSpecified(), clang::DeclContext::isRecord(), clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, clang::TagDecl::setFreeStanding(), clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, clang::DeclSpec::TQ_unaligned, clang::DeclSpec::TQ_volatile, clang::DeclSpec::TST_class, clang::DeclSpec::TST_enum, clang::DeclSpec::TST_error, clang::DeclSpec::TST_interface, clang::DeclSpec::TST_struct, clang::DeclSpec::TST_typename, and clang::DeclSpec::TST_union.

◆ ParsedFreeStandingDeclSpec() [2/2]

Decl * Sema::ParsedFreeStandingDeclSpec ( Scope S,
AccessSpecifier  AS,
DeclSpec DS,
const ParsedAttributesView DeclAttrs,
RecordDecl *&  AnonRecord 
)

ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g.

"struct foo;") is parsed.

Definition at line 4871 of file SemaDecl.cpp.

References ParsedFreeStandingDeclSpec().

Referenced by ParsedFreeStandingDeclSpec().

◆ ParseObjCEncodeExpression()

ExprResult Sema::ParseObjCEncodeExpression ( SourceLocation  AtLoc,
SourceLocation  EncodeLoc,
SourceLocation  LParenLoc,
ParsedType  Ty,
SourceLocation  RParenLoc 
)

◆ ParseObjCProtocolExpression()

ExprResult Sema::ParseObjCProtocolExpression ( IdentifierInfo ProtocolName,
SourceLocation  AtLoc,
SourceLocation  ProtoLoc,
SourceLocation  LParenLoc,
SourceLocation  ProtoIdLoc,
SourceLocation  RParenLoc 
)

◆ ParseObjCSelectorExpression()

ExprResult Sema::ParseObjCSelectorExpression ( Selector  Sel,
SourceLocation  AtLoc,
SourceLocation  SelLoc,
SourceLocation  LParenLoc,
SourceLocation  RParenLoc,
bool  WarnMultipleSelectors 
)

◆ ParseObjCStringLiteral()

ExprResult Sema::ParseObjCStringLiteral ( SourceLocation AtLocs,
ArrayRef< Expr * >  Strings 
)

◆ ParseTypedefDecl()

TypedefDecl * Sema::ParseTypedefDecl ( Scope S,
Declarator D,
QualType  T,
TypeSourceInfo TInfo 
)

◆ 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(), ActOnDecltypeExpression(), ActOnExplicitInstantiation(), actOnObjCTypeArgsOrProtocolQualifiers(), ActOnOpenMPIdExpression(), ActOnPopScope(), ActOnSizeofParameterPackExpr(), ActOnStartClassImplementation(), ActOnStringLiteral(), ActOnSuperClassOfClassInterface(), AnalyzeComparison(), BuildCXXForRangeStmt(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), BuildNonArrayForRange(), BuildUsingDeclaration(), BuildVAArgExpr(), calculateConstraintSatisfaction(), CheckCompleteVariableDeclaration(), CheckConstructorAccess(), CheckCXX98CompatAccessibleCopy(), CheckCXXThrowOperand(), CheckDestructorAccess(), checkDestructorReference(), CheckEquivalentExceptionSpec(), CheckExceptionSpecCompatibility(), CheckFormatString(), CheckForNullPointerDereference(), CheckFunctionTemplateSpecialization(), CheckImplicitConversion(), CheckMultiVersionAdditionalRules(), CheckNonNullArgument(), checkOpenMPDeclareVariantFunction(), CheckOverridingFunctionExceptionSpec(), CheckParamExceptionSpec(), CheckPlaceholderExpr(), CheckPoppedLabel(), CheckTautologicalComparison(), CheckTemplateIdType(), checkTypeSupport(), checkVariadicArgument(), ClassifyName(), ComputeSelectedDestructor(), ConvertArgumentsForCall(), CopyObject(), DeduceTemplateSpecializationFromInitializer(), clang::InitializationSequence::Diagnose(), DiagnoseAdditionInShift(), DiagnoseAlwaysNonNullPointer(), DiagnoseAssignmentResult(), DiagnoseBadConversion(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseBitwiseOpInBitwiseOp(), DiagnoseEmptyLookup(), diagnoseExprIntendedAsTemplateName(), DiagnoseFloatingImpCast(), DiagnoseImpCast(), DiagnoseInvalidRedeclaration(), DiagnoseShiftCompare(), diagnoseSubtractionOnNullPointer(), diagnoseTautologicalComparison(), diagnoseTypo(), DiagnoseUnknownTypeName(), DiagnoseUnusedButSetDecl(), DiagnoseUnusedDecl(), DiagnoseUnusedExprResult(), emitEmptyLookupTypoDiagnostic(), FinalizeVarWithDestructor(), FindProtocolDeclaration(), FinishOverloadedCallExpr(), getObjCInterfaceDecl(), getObjCMessageKind(), getTypeName(), HandleExprPropertyRefExpr(), ImplicitlyDefineFunction(), isMemberAccessibleForDeletion(), LookupMemberExpr(), lookupOpenMPDeclareTargetName(), LookupTemplateName(), MarkBaseAndMemberDestructorsReferenced(), MarkVirtualBaseDestructorsReferenced(), MaybeBindToTemporary(), NoteAmbiguousUserConversions(), NoteHiddenVirtualMethods(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), resolveAllocationOverload(), resolveAssumedTemplateNameAsType(), resolveBuiltinNewDeleteOverload(), clang::Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder(), SetIvarInitializers(), tryDiagnoseOverloadedCast(), 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
LocThe source location of the construct that requires the conversion.
FromThe expression we're converting from.
ConverterUsed to control and diagnose the conversion process.
Returns
The expression, converted to an integral or enumeration type if successful.

Definition at line 6644 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(), clang::ExprError(), finishContextualImplicitConversion(), clang::ActionResult< PtrTy, Compress >::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, Compress >::isInvalid(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), 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(), BuildCXXNew(), CheckSwitchCondition(), PerformOpenMPImplicitIntegerConversion(), and VerifyIntegerConstantExpression().

◆ PerformContextuallyConvertToBool()

ExprResult Sema::PerformContextuallyConvertToBool ( Expr From)

◆ 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 6420 of file SemaOverload.cpp.

References checkPlaceholderForOverload(), clang::ExprError(), clang::ASTContext::getObjCIdType(), clang::ImplicitConversionSequence::isBad(), and TryContextuallyConvertToObjCPointer().

Referenced by ActOnObjCAtSynchronizedOperand(), and BuildInstanceMessage().

◆ PerformCopyInitialization()

ExprResult Sema::PerformCopyInitialization ( const InitializedEntity Entity,
SourceLocation  EqualLoc,
ExprResult  Init,
bool  TopLevelOfInitList = false,
bool  AllowExplicit = false 
)

◆ PerformDependentDiagnostics()

void Sema::PerformDependentDiagnostics ( const DeclContext Pattern,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ PerformImplicitConversion() [1/3]

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 1761 of file SemaOverload.cpp.

References checkPlaceholderForOverload(), clang::ExprError(), clang::Stmt::getBeginLoc(), clang::Expr::getType(), and TryImplicitConversion().

◆ PerformImplicitConversion() [2/3]

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 4217 of file SemaExprCXX.cpp.

References AA_Converting, clang::UserDefinedConversionSequence::After, clang::ImplicitConversionSequence::AmbiguousConversion, clang::ImplicitConversionSequence::BadConversion, clang::UserDefinedConversionSequence::Before, BuildCXXCastArgument(), CCK_ForBuiltinOverloadedOp, CheckAssignmentConstraints(), Compatible, Context, clang::UserDefinedConversionSequence::ConversionFunction, clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), DiagnoseAssignmentResult(), clang::UserDefinedConversionSequence::EllipsisConversion, clang::ImplicitConversionSequence::EllipsisConversion, clang::ExprError(), clang::UserDefinedConversionSequence::FoundConversionFunction, clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::ImplicitConversionSequence::getKind(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getParamDecl(), clang::Stmt::getSourceRange(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::UserDefinedConversionSequence::HadMultipleCandidates, Incompatible, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isRecordType(), PDiag(), PerformImplicitConversion(), clang::ImplicitConversionSequence::Standard, clang::ImplicitConversionSequence::StandardConversion, clang::ImplicitConversionSequence::StaticObjectArgumentConversion, clang::ImplicitConversionSequence::UserDefined, and clang::ImplicitConversionSequence::UserDefinedConversion.

Referenced by ActOnCXXDelete(), ActOnOMPIteratorExpr(), ActOnOpenMPAllocateClause(), ActOnOpenMPAllocatorClause(), BuildConvertedConstantExpression(), buildCounterInit(), buildCounterUpdate(), BuildCXXNew(), CheckDestructor(), checkOpenMPDeclareVariantFunction(), checkOpenMPLoop(), CheckSingleAssignmentConstraints(), findOMPAllocatorHandleT(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), and widenIterationCount().

◆ PerformImplicitConversion() [3/3]

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 4320 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(), CheckPlaceholderExpr(), CheckPointerConversion(), CheckTransparentUnionArgumentConstraints(), Compatible, clang::Complete, CompleteConstructorCall(), Context, clang::StandardConversionSequence::CopyConstructor, clang::CPlusPlus11, clang::ImplicitCastExpr::Create(), DefaultLvalueConversion(), clang::StandardConversionSequence::DeprecatedStringLiteralToCharPtr, Diag(), diagnoseNullableToNonnullConversion(), DiagnoseUseOfDecl(), clang::StandardConversionSequence::Element, EmitRelatedResultTypeNote(), clang::ExprError(), clang::StandardConversionSequence::First, FixOverloadedFunctionReference(), clang::ASTContext::FloatTy, clang::StandardConversionSequence::FoundCopyConstructor, clang::ActionResult< PtrTy, Compress >::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::Expr::getExprLoc(), clang::ASTContext::getExtVectorType(), getLangOpts(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::VectorType::getNumElements(), clang::ASTContext::getObjCObjectPointerType(), clang::Expr::getObjectKind(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKind(), clang::AtomicType::getValueType(), clang::Type::hasFloatingRepresentation(), clang::ASTContext::hasSameType(), clang::ASTContext::hasSameUnqualifiedType(), clang::Qualifiers::hasUnaligned(), 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_Fixed_Point_Conversion, clang::ICK_Floating_Conversion, clang::ICK_Floating_Integral, clang::ICK_Floating_Promotion, clang::ICK_Function_Conversion, clang::ICK_Function_To_Pointer, clang::ICK_HLSL_Vector_Truncation, 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_RVV_Vector_Conversion, clang::ICK_SVE_Vector_Conversion, 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::Type::isExtVectorType(), clang::EnumDecl::isFixed(), clang::Type::isFixedPointType(), clang::Type::isFloatingType(), clang::Type::isHalfType(), clang::Type::isIntegerType(), clang::Type::isIntegralType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isMatrixType(), clang::TargetCXXABI::isMicrosoft(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Expr::isPRValue(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), clang::Type::isVectorType(), clang::OK_ObjCProperty, clang::ASTContext::OverloadTy, PrepareCastToObjCObjectPointer(), prepareVectorSplat(), clang::ASTContext::removeAddrSpaceQualType(), ResolveAddressOfOverloadedFunction(), ScalarTypeToBooleanCastKind(), clang::StandardConversionSequence::Second, TemporaryMaterializationConversion(), clang::StandardConversionSequence::Third, and clang::VK_PRValue.

◆ PerformImplicitObjectArgumentInitialization()

ExprResult Sema::PerformImplicitObjectArgumentInitialization ( Expr From,
NestedNameSpecifier Qualifier,
NamedDecl FoundDecl,
CXXMethodDecl Method 
)

PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the given Method with the given expression.

Definition at line 5912 of file SemaOverload.cpp.

References clang::ImplicitConversionSequence::Bad, clang::BadConversionSequence::bad_qualifiers, clang::Expr::Classify(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::Qualifiers::getCVRQualifiers(), clang::NamedDecl::getDeclName(), clang::CXXMethodDecl::getFunctionObjectParameterType(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::CXXMethodDecl::getRefQualifier(), clang::Stmt::getSourceRange(), clang::CXXMethodDecl::getThisType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameType(), clang::ICK_Derived_To_Base, clang::ImplicitConversionSequence::isBad(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Expr::isPRValue(), clang::Expr::Classification::isRValue(), clang::BadConversionSequence::Kind, clang::BadConversionSequence::lvalue_ref_to_rvalue, clang::Expr::Classification::makeSimpleLValue(), clang::BadConversionSequence::no_conversion, clang::RQ_RValue, clang::BadConversionSequence::rvalue_ref_to_lvalue, clang::StandardConversionSequence::Second, clang::ImplicitConversionSequence::Standard, clang::BadConversionSequence::too_few_initializers, clang::BadConversionSequence::too_many_initializers, TryObjectArgumentInitialization(), and clang::BadConversionSequence::unrelated_class.

Referenced by convertArgsForAvailabilityChecks().

◆ PerformMemberExprBaseConversion()

ExprResult Sema::PerformMemberExprBaseConversion ( Expr Base,
bool  IsArrow 
)

Perform conversions on the LHS of a member access expression.

Definition at line 1260 of file SemaExprMember.cpp.

References CheckPlaceholderExpr(), and DefaultFunctionArrayLvalueConversion().

Referenced by LookupMemberExpr(), and clang::TreeTransform< Derived >::RebuildMemberExpr().

◆ PerformMoveOrCopyInitialization()

ExprResult Sema::PerformMoveOrCopyInitialization ( const InitializedEntity Entity,
const NamedReturnInfo NRInfo,
Expr Value,
bool  SupressSimplerImplicitMoves = false 
)

Perform the initialization of a potentially-movable value, which is the result of return value.

This routine implements C++20 [class.copy.elision]p3, 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 3605 of file SemaStmt.cpp.

References Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus23, clang::ImplicitCastExpr::Create(), clang::InitializationKind::CreateCopy(), getLangOpts(), clang::Value::getType(), clang::Sema::NamedReturnInfo::isMoveEligible(), clang::ImplicitCastExpr::OnStack, clang::OR_Deleted, clang::OR_Success, PerformCopyInitialization(), clang::Seq, VerifyInitializationSequenceCXX98(), and clang::VK_XValue.

Referenced by ActOnCapScopeReturnStmt(), BuildCXXThrow(), BuildReturnStmt(), and checkEscapingByref().

◆ PerformObjectMemberConversion()

ExprResult Sema::PerformObjectMemberConversion ( Expr From,
NestedNameSpecifier Qualifier,
NamedDecl FoundDecl,
NamedDecl Member 
)

Cast a base object to a member's actual type.

There are two relevant checks:

C++ [class.access.base]p7:

If a class member access operator [...] is used to access a non-static data member or non-static member function, the reference is ill-formed if the left operand [...] cannot be implicitly converted to a pointer to the naming class of the right operand.

C++ [expr.ref]p7:

If E2 is a non-static data member or a non-static member function, the program is ill-formed if the class of which E2 is directly a member is an ambiguous base (11.8) of the naming class (11.9.3) of E2.

Note that the latter check does not consider access; the access of the "real" base class is checked as appropriate when checking the access of the member name.

Definition at line 3203 of file SemaExpr.cpp.

References clang::Type::castAs(), CheckDerivedToBaseConversion(), Context, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::ASTContext::getAddrSpaceQualType(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::ASTContext::getCanonicalType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeDeclType(), clang::Expr::getValueKind(), clang::ASTContext::hasSameUnqualifiedType(), ImpCastExprToType(), clang::Type::isDependentType(), IsDerivedFrom(), clang::Type::isRecordType(), clang::Member, and clang::ASTContext::removeAddrSpaceQualType().

Referenced by BuildFieldReferenceExpr(), and clang::TreeTransform< Derived >::RebuildMemberExpr().

◆ PerformOpenMPImplicitIntegerConversion()

ExprResult Sema::PerformOpenMPImplicitIntegerConversion ( SourceLocation  OpLoc,
Expr Op 
)

◆ PerformPendingInstantiations()

void Sema::PerformPendingInstantiations ( bool  LocalOnly = false)

◆ PerformQualificationConversion()

ExprResult Sema::PerformQualificationConversion ( Expr E,
QualType  Ty,
ExprValueKind  VK = VK_PRValue,
CheckedConversionKind  CCK = CCK_ImplicitConversion 
)

◆ popCodeSynthesisContext()

void Sema::popCodeSynthesisContext ( )

◆ PopCompoundScope()

void Sema::PopCompoundScope ( )

◆ PopDeclContext()

void Sema::PopDeclContext ( )

◆ PopExpressionEvaluationContext()

void Sema::PopExpressionEvaluationContext ( )

◆ 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 42 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
WPThe warning policy to use for CFG-based warnings, or null if such warnings should not be produced.
DThe declaration corresponding to this function scope, if producing CFG-based warnings.
BlockTypeThe type of the block expression, if D is a BlockDecl.

Definition at line 2260 of file Sema.cpp.

References AnalysisWarnings, Diag(), FunctionScopes, clang::sema::AnalysisBasedWarnings::IssueWarnings(), LangOpts, markEscapingByrefs(), and Scope.

Referenced by ActOnBlockError(), ActOnBlockStmtExpr(), ActOnCapturedRegionEnd(), ActOnCapturedRegionError(), ActOnFinishCXXInClassMemberInitializer(), ActOnFinishFunctionBody(), ActOnFinishTopLevelStmtDecl(), ActOnLambdaError(), ActOnOpenMPDeclareReductionCombinerEnd(), ActOnOpenMPDeclareReductionInitializerEnd(), and clang::Sema::FunctionScopeRAII::~FunctionScopeRAII().

◆ popObjCTypeParamList()

void Sema::popObjCTypeParamList ( Scope S,
ObjCTypeParamList typeParamList 
)

◆ PopParsingClass()

void clang::Sema::PopParsingClass ( ParsingClassState  state)
inline

Definition at line 5007 of file Sema.h.

References clang::Sema::DelayedDiagnostics::popUndelayed().

◆ PopParsingDeclaration()

void Sema::PopParsingDeclaration ( ParsingDeclState  state,
Decl decl 
)

◆ 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 1377 of file SemaAttr.cpp.

References Diag(), FreeVisContext(), NoVisibility, and VisContext.

Referenced by ActOnFinishNamespaceDef(), and ActOnPragmaVisibility().

◆ PopSatisfactionStackEntry()

void clang::Sema::PopSatisfactionStackEntry ( )
inline

Definition at line 11427 of file Sema.h.

◆ PreferredConditionType()

QualType clang::Sema::PreferredConditionType ( ConditionKind  K) const
inline

Definition at line 6228 of file Sema.h.

References clang::ASTContext::BoolTy, Context, clang::ASTContext::IntTy, and Switch.

Referenced by ActOnCondition().

◆ PrepareCastToObjCObjectPointer()

CastKind Sema::PrepareCastToObjCObjectPointer ( ExprResult E)

Prepare a conversion of the given expression to an ObjC object pointer type.

Definition at line 8021 of file SemaExpr.cpp.

References clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getType(), maybeExtendBlockObject(), and clang::ast_matchers::type.

Referenced by PerformImplicitConversion().

◆ PrepareScalarCast()

CastKind Sema::PrepareScalarCast ( ExprResult src,
QualType  destType 
)

◆ prepareVectorSplat()

ExprResult Sema::prepareVectorSplat ( QualType  VectorTy,
Expr SplattedExpr 
)

◆ PrintContextStack()

void clang::Sema::PrintContextStack ( )
inline

◆ PrintInstantiationStack()

void Sema::PrintInstantiationStack ( )

Prints the current instantiation stack through a series of notes.

Definition at line 792 of file SemaTemplateInstantiate.cpp.

References clang::Sema::DefaultedFunctionKind::asComparison(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::Sema::CodeSynthesisContext::BuildingBuiltinDumpStructCall, clang::Sema::CodeSynthesisContext::BuildingDeductionGuides, CodeSynthesisContexts, clang::Sema::CodeSynthesisContext::ConstraintNormalization, clang::Sema::CodeSynthesisContext::ConstraintsCheck, clang::Sema::CodeSynthesisContext::ConstraintSubstitution, Context, convertCallArgsToString(), 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, Diags, clang::Sema::CodeSynthesisContext::ExceptionSpecEvaluation, clang::Sema::CodeSynthesisContext::ExceptionSpecInstantiation, clang::Sema::CodeSynthesisContext::ExplicitTemplateArgumentSubstitution, clang::Function, clang::Decl::getDeclContext(), getDefaultedFunctionKind(), getLangOpts(), clang::NamedDecl::getName(), getPrintingPolicy(), clang::ASTContext::getTagDeclType(), getTemplateArgumentBindingsText(), clang::DiagnosticsEngine::getTemplateBacktraceLimit(), clang::TemplateDecl::getTemplateParameters(), clang::Sema::CodeSynthesisContext::InitializingStructuredBinding, int, clang::Sema::DefaultedFunctionKind::isComparison(), clang::Sema::DefaultedFunctionKind::isSpecialMember(), clang::Sema::CodeSynthesisContext::LambdaExpressionSubstitution, clang::Sema::CodeSynthesisContext::MarkingClassDllexported, clang::Sema::CodeSynthesisContext::Memoization, clang::Sema::CodeSynthesisContext::NestedRequirementConstraintsCheck, OS, clang::Sema::CodeSynthesisContext::ParameterMappingSubstitution, clang::NamedDecl::printName(), clang::printTemplateArgumentList(), clang::Sema::CodeSynthesisContext::PriorTemplateArgumentSubstitution, clang::DiagnosticsEngine::Report(), clang::Sema::CodeSynthesisContext::RequirementInstantiation, clang::Sema::CodeSynthesisContext::RequirementParameterInstantiation, clang::Sema::CodeSynthesisContext::RewritingOperatorAsSpaceship, and clang::Sema::CodeSynthesisContext::TemplateInstantiation.

Referenced by PrintContextStack().

◆ PrintPragmaAttributeInstantiationPoint()

void Sema::PrintPragmaAttributeInstantiationPoint ( )

◆ PrintStats()

void Sema::PrintStats ( ) const

Print out statistics about the semantic analysis.

Definition at line 565 of file Sema.cpp.

References AnalysisWarnings, BumpAlloc, NumSFINAEErrors, and clang::sema::AnalysisBasedWarnings::PrintStats().

◆ ProcessAccessDeclAttributeList()

bool Sema::ProcessAccessDeclAttributeList ( AccessSpecDecl ASDecl,
const ParsedAttributesView AttrList 
)

Definition at line 10044 of file SemaDeclAttr.cpp.

References Diag(), and ProcessDeclAttribute().

Referenced by ActOnAccessSpecifier().

◆ ProcessAPINotes()

void Sema::ProcessAPINotes ( Decl D)

Map any API notes provided for this declaration to attributes on the declaration.

Process API notes that are associated with this declaration, mapping them to attributes as appropriate.

Triggered by declaration-attribute processing.

Definition at line 765 of file SemaAPINotes.cpp.

References APINotes, Category, clang::Class, Context, clang::api_notes::APINotesManager::findAPINotes(), clang::QualType::getAsString(), getASTContext(), clang::Decl::getDeclContext(), clang::Lexer::getImmediateMacroName(), clang::Decl::getLocation(), clang::Selector::getNameForSlot(), clang::Selector::getNumArgs(), getPrintingPolicy(), clang::DeclContext::getRedeclContext(), clang::api_notes::ObjCSelectorRef::Identifiers, clang::DeclContext::isExternCContext(), clang::DeclContext::isExternCXXContext(), clang::DeclContext::isFileContext(), clang::DeclContext::isNamespace(), clang::Selector::isUnarySelector(), clang::ObjCPropertyAttribute::kind_class, LangOpts, LookupName(), clang::api_notes::Namespace, clang::api_notes::ObjCSelectorRef::NumArgs, ProcessVersionedAPINotes(), clang::Property, and clang::QualType::split().

Referenced by ActOnAliasDeclaration(), ActOnClassTemplateSpecialization(), ActOnEnumBody(), ActOnEnumConstant(), ActOnExplicitInstantiation(), ActOnFields(), ActOnFinishDelayedAttribute(), ActOnMethodDeclaration(), ActOnStartClassInterface(), ActOnStartNamespaceDef(), ActOnStartProtocolInterface(), ActOnUsingDirective(), CheckClassTemplate(), ProcessDeclAttributes(), and ProcessPropertyDecl().

◆ ProcessDeclAttributeDelayed()

void Sema::ProcessDeclAttributeDelayed ( Decl D,
const ParsedAttributesView AttrList 
)

◆ ProcessDeclAttributeList()

void Sema::ProcessDeclAttributeList ( Scope S,
Decl D,
const ParsedAttributesView AttrList,
const ProcessDeclAttributeOptions Options = ProcessDeclAttributeOptions() 
)

◆ ProcessDeclAttributes()

void Sema::ProcessDeclAttributes ( Scope S,
Decl D,
const Declarator PD 
)

◆ ProcessPragmaWeak()

void 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
propertyThe property declaration being processed

Also synthesize a getter/setter method if none exist (and update the appropriate lookup tables.

Definition at line 2374 of file SemaObjCProperty.cpp.

References clang::Decl::addAttr(), clang::DeclContext::addDecl(), AddFactoryMethodToGlobalPool(), AddInstanceMethodToGlobalPool(), AddPropertyAttrs(), CheckARCMethodDecl(), CheckObjCMethodOverrides(), Context, clang::ParmVarDecl::Create(), clang::ObjCMethodDecl::Create(), clang::ObjCMethodDecl::createImplicitParams(), Diag(), DiagnosePropertyAccessorMismatch(), clang::Decl::getAttr(), clang::ASTContext::getAttributedType(), clang::ASTContext::getCanonicalType(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCContainerDecl::getClassMethod(), clang::Decl::getDeclContext(), clang::ObjCPropertyDecl::getGetterName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getInstanceMethod(), getLangOpts(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyImplementation(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCPropertyDecl::getSetterName(), clang::ObjCPropertyDecl::getType(), clang::Decl::hasAttr(), clang::ASTContext::hasSameUnqualifiedType(), clang::ObjCPropertyDecl::isDirectProperty(), clang::Decl::isInvalidDecl(), clang::ObjCPropertyDecl::isReadOnly(), clang::ObjCPropertyAttribute::kind_null_resettable, clang::Optional, clang::ObjCPropertyDecl::Optional, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_size(), ProcessAPINotes(), clang::Required, RTC_Unknown, clang::SC_None, clang::ObjCMethodDecl::setMethodParams(), clang::ObjCMethodDecl::setPropertyAccessor(), clang::AttributedType::stripOuterNullability(), clang::Unspecified, and clang::ASTContext::VoidTy.

Referenced by ActOnAtEnd(), and HandlePropertyInClassExtension().

◆ ProcessStmtAttributes()

void Sema::ProcessStmtAttributes ( Stmt Stmt,
const ParsedAttributes InAttrs,
SmallVectorImpl< const Attr * > &  OutAttrs 
)

Process the attributes before creating an attributed statement.

Returns the semantic attributes that have been processed.

Definition at line 640 of file SemaStmtAttr.cpp.

References CheckForIncompatibleAttributes(), ProcessStmtAttribute(), and clang::ParsedAttributesView::Range.

Referenced by ActOnAttributedStmt().

◆ ProduceCallSignatureHelp()

QualType Sema::ProduceCallSignatureHelp ( Expr Fn,
ArrayRef< Expr * >  Args,
SourceLocation  OpenParLoc 
)

◆ ProduceConstructorSignatureHelp()

QualType Sema::ProduceConstructorSignatureHelp ( QualType  Type,
SourceLocation  Loc,
ArrayRef< Expr * >  Args,
SourceLocation  OpenParLoc,
bool  Braced 
)

◆ ProduceCtorInitMemberSignatureHelp()

QualType Sema::ProduceCtorInitMemberSignatureHelp ( Decl ConstructorDecl,
CXXScopeSpec  SS,
ParsedType  TemplateTypeTy,
ArrayRef< Expr * >  ArgExprs,
IdentifierInfo II,
SourceLocation  OpenParLoc,
bool  Braced 
)

Definition at line 6439 of file SemaCodeComplete.cpp.

◆ ProduceTemplateArgumentSignatureHelp()

QualType Sema::ProduceTemplateArgumentSignatureHelp ( TemplateTy  ParsedTemplate,
ArrayRef< ParsedTemplateArgument Args,
SourceLocation  LAngleLoc 
)

◆ propagateDLLAttrToBaseClassTemplate()

void Sema::propagateDLLAttrToBaseClassTemplate ( CXXRecordDecl Class,
Attr ClassAttr,
ClassTemplateSpecializationDecl BaseTemplateSpec,
SourceLocation  BaseLoc 
)

◆ PushBlockScope()

void Sema::PushBlockScope ( Scope BlockScope,
BlockDecl Block 
)

Definition at line 2153 of file Sema.cpp.

References clang::Block, CapturingFunctionScopes, FunctionScopes, and getDiagnostics().

Referenced by ActOnBlockStart().

◆ PushCapturedRegionScope()

void Sema::PushCapturedRegionScope ( Scope RegionScope,
CapturedDecl CD,
RecordDecl RD,
CapturedRegionKind  K,
unsigned  OpenMPCaptureLevel = 0 
)

◆ pushCodeSynthesisContext()

void Sema::pushCodeSynthesisContext ( CodeSynthesisContext  Ctx)

◆ PushCompoundScope()

void Sema::PushCompoundScope ( bool  IsStmtExpr)

◆ PushDeclContext()

void Sema::PushDeclContext ( Scope S,
DeclContext DC 
)

◆ PushExpressionEvaluationContext() [1/2]

void Sema::PushExpressionEvaluationContext ( ExpressionEvaluationContext  NewContext,
Decl LambdaContextDecl = nullptr,
ExpressionEvaluationContextRecord::ExpressionKind  Type = ExpressionEvaluationContextRecord::EK_Other 
)

◆ PushExpressionEvaluationContext() [2/2]

Definition at line 18235 of file SemaExpr.cpp.

References ExprEvalContexts, and PushExpressionEvaluationContext().

◆ 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 37 of file SemaCUDA.cpp.

References clang::CUDA, and getLangOpts().

◆ PushFunctionScope()

void Sema::PushFunctionScope ( )

◆ PushLambdaScope()

LambdaScopeInfo * Sema::PushLambdaScope ( )

Definition at line 2159 of file Sema.cpp.

References CapturingFunctionScopes, FunctionScopes, and getDiagnostics().

Referenced by RebuildLambdaScopeInfo().

◆ PushNamespaceVisibilityAttr()

void Sema::PushNamespaceVisibilityAttr ( const VisibilityAttr *  Attr,
SourceLocation  Loc 
)

PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.

Definition at line 1368 of file SemaAttr.cpp.

References NoVisibility, and PushPragmaVisibility().

Referenced by ActOnStartNamespaceDef().

◆ PushOnScopeChains()

void Sema::PushOnScopeChains ( NamedDecl D,
Scope S,
bool  AddToContext = true 
)

Add this decl to the scope shadowed decl chains.

Definition at line 1517 of file SemaDecl.cpp.

References clang::DeclContext::addDecl(), clang::IdentifierResolver::AddDecl(), clang::IdentifierResolver::begin(), clang::CPlusPlus, CurContext, clang::NamedDecl::declarationReplaces(), clang::DeclContext::Encloses(), clang::IdentifierResolver::end(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::DeclContext::getRedeclContext(), IdResolver, clang::IdentifierResolver::InsertDeclAfter(), clang::Decl::isOutOfLine(), clang::IdentifierResolver::RemoveDecl(), and warnOnReservedIdentifier().

Referenced by ActOnAliasDeclaration(), ActOnBlockArguments(), ActOnCompatibilityAlias(), ActOnConceptDefinition(), ActOnDecompositionDeclarator(), ActOnDefs(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnFriendFunctionDecl(), ActOnLambdaClosureParameters(), ActOnLambdaExpressionAfterIntroducer(), ActOnNamespaceAliasDef(), actOnObjCTypeParamList(), ActOnOMPIteratorExpr(), ActOnOpenMPDeclareMapperDirective(), ActOnOpenMPDeclareMapperDirectiveVarDecl(), ActOnOpenMPDeclareReductionCombinerStart(), ActOnOpenMPDeclareReductionDirectiveEnd(), ActOnOpenMPDeclareReductionInitializerStart(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberDeclarations(), ActOnStartHLSLBuffer(), ActOnStartNamespaceDef(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnStartOfObjCMethodDef(), ActOnStartProtocolInterface(), ActOnStartRequiresExpr(), ActOnStartTrailingRequiresClause(), ActOnTag(), ActOnUsingDeclaration(), ActOnUsingEnumDeclaration(), addImplicitTypedef(), BuildUsingShadowDecl(), CheckClassTemplate(), DeclApplyPragmaWeak(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), HandleDeclarator(), HandleField(), HandleMSProperty(), ImplicitlyDefineFunction(), Initialize(), InjectAnonymousStructOrUnionMembers(), LazilyCreateBuiltin(), and LookupOrCreateLabel().

◆ PushParsingClass()

ParsingClassState clang::Sema::PushParsingClass ( )
inline

Definition at line 5003 of file Sema.h.

References clang::Sema::DelayedDiagnostics::pushUndelayed().

◆ PushParsingDeclaration()

ParsingDeclState clang::Sema::PushParsingDeclaration ( sema::DelayedDiagnosticPool pool)
inline

Definition at line 1158 of file Sema.h.

References clang::Sema::DelayedDiagnostics::push().

◆ PushSatisfactionStackEntry()

void clang::Sema::PushSatisfactionStackEntry ( const NamedDecl D,
const llvm::FoldingSetNodeID &  ID 
)
inline

Definition at line 11421 of file Sema.h.

References clang::Decl::getCanonicalDecl(), and ID.

◆ PushUsingDirective()

void Sema::PushUsingDirective ( Scope S,
UsingDirectiveDecl UDir 
)

◆ ReadMethodPool()

void Sema::ReadMethodPool ( Selector  Sel)

Read the contents of the method pool for a given selector from external storage.

Definition at line 3427 of file SemaDeclObjC.cpp.

Referenced by AddClassMessageCompletions(), and CollectMultipleMethodsInGlobalPool().

◆ RebuildExprInCurrentInstantiation()

ExprResult Sema::RebuildExprInCurrentInstantiation ( Expr E)

Definition at line 11856 of file SemaTemplate.cpp.

References clang::Expr::getExprLoc().

Referenced by RebuildDeclaratorInCurrentInstantiation().

◆ RebuildLambdaScopeInfo()

LambdaScopeInfo * Sema::RebuildLambdaScopeInfo ( CXXMethodDecl CallOperator)

Definition at line 15648 of file SemaDecl.cpp.

References clang::sema::CapturingScopeInfo::addCapture(), clang::sema::CapturingScopeInfo::addThisCapture(), clang::sema::CapturingScopeInfo::addVLATypeCapture(), clang::sema::LambdaScopeInfo::AfterParameterList, clang::C, clang::sema::LambdaScopeInfo::CallOperator, clang::CXXRecordDecl::captures(), CurrentInstantiationScope, clang::sema::LambdaScopeInfo::ExplicitObjectParameter, clang::RecordDecl::field_begin(), clang::DeclarationNameInfo::getCXXOperatorNameRange(), clang::CXXRecordDecl::getLambdaCaptureDefault(), clang::FunctionDecl::getNameInfo(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::LocalInstantiationScope::InstantiatedLocal(), clang::sema::LambdaScopeInfo::IntroducerRange, clang::CXXMethodDecl::isConst(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::ValueDecl::isInitCapture(), clang::sema::LambdaScopeInfo::Lambda, clang::LCD_ByCopy, clang::LCD_ByRef, clang::LCD_None, clang::LCK_ByRef, clang::LCK_StarThis, clang::sema::LambdaScopeInfo::Mutable, PushLambdaScope(), and clang::sema::CapturingScopeInfo::ReturnType.

Referenced by ActOnStartOfFunctionDef(), and clang::Sema::LambdaScopeForCallOperatorInstantiationRAII::LambdaScopeForCallOperatorInstantiationRAII().

◆ RebuildNestedNameSpecifierInCurrentInstantiation()

bool Sema::RebuildNestedNameSpecifierInCurrentInstantiation ( CXXScopeSpec SS)

◆ RebuildTemplateParamsInCurrentInstantiation()

bool Sema::RebuildTemplateParamsInCurrentInstantiation ( TemplateParameterList Params)

◆ 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 11846 of file SemaTemplate.cpp.

References clang::TypeSourceInfo::getType(), and clang::Type::isInstantiationDependentType().

Referenced by RebuildDeclaratorInCurrentInstantiation(), and RebuildTemplateParamsInCurrentInstantiation().

◆ 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 2166 of file Sema.cpp.

References getCurLambda().

◆ 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 1644 of file SemaPseudoObject.cpp.

References Context, clang::UnaryOperator::Create(), clang::BinaryOperator::Create(), clang::CompoundAssignOperator::Create(), CurFPFeatureOverrides(), clang::PseudoObjectExpr::getSyntacticForm(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), and stripOpaqueValuesFromPseudoObjectRef().

◆ redelayDiagnostics()

void Sema::redelayDiagnostics ( sema::DelayedDiagnosticPool pool)

Given a set of delayed diagnostics, re-emit them as if they had been delayed in the current context instead of in the given pool.

Essentially, this just moves them to the current pool.

Definition at line 10358 of file SemaDeclAttr.cpp.

References clang::Sema::DelayedDiagnostics::getCurrentPool(), and clang::sema::DelayedDiagnosticPool::steal().

◆ referenceDLLExportedClassMethods()

void Sema::referenceDLLExportedClassMethods ( )

◆ RefersToMemberWithReducedAlignment()

void Sema::RefersToMemberWithReducedAlignment ( Expr E,
llvm::function_ref< void(Expr *, RecordDecl *, FieldDecl *, CharUnits)>  Action 
)

◆ 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 6728 of file SemaDecl.cpp.

References Context, clang::CPlusPlus, clang::ASTContext::getExternCContextDecl(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::getRedeclContext(), clang::DeclContext::isTranslationUnit(), and clang::DeclContext::makeDeclVisibleInContext().

Referenced by ActOnFunctionDeclarator(), ActOnVariableDeclarator(), and LazilyCreateBuiltin().

◆ 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 19744 of file SemaChecking.cpp.

Referenced by FinalizeDeclaration().

◆ 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 5226 of file SemaTemplateDeduction.cpp.

◆ ReplaceAutoTypeSourceInfo()

TypeSourceInfo * Sema::ReplaceAutoTypeSourceInfo ( TypeSourceInfo TypeWithAuto,
QualType  Replacement 
)

Definition at line 5233 of file SemaTemplateDeduction.cpp.

Referenced by InventTemplateParameter().

◆ 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 218 of file SemaCXXScopeSpec.cpp.

References Context, clang::SourceRange::getBegin(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::CXXScopeSpec::getRange(), clang::ASTContext::getTypeDeclType(), clang::TagDecl::isBeingDefined(), clang::DeclContext::isDependentContext(), clang::SourceLocation::isInvalid(), RequireCompleteEnumDecl(), RequireCompleteType(), clang::CXXScopeSpec::SetInvalid(), and clang::ast_matchers::type.

Referenced by ActOnCXXEnterDeclaratorScope(), ActOnFriendFunctionDecl(), ActOnIdExpression(), ActOnTag(), BuildCXXNestedNameSpecifier(), BuildQualifiedDeclarationNameExpr(), BuildQualifiedTemplateIdExpr(), BuildUsingDeclaration(), CheckClassTemplate(), CheckTypenameType(), CheckUsingDeclQualifier(), getConstructorName(), getDestructorName(), getTypeName(), HandleDeclarator(), LookupMemberExprInRecord(), LookupParsedName(), LookupTemplateName(), clang::TreeTransform< Derived >::RebuildDependentNameType(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

◆ RequireCompleteEnumDecl()

bool Sema::RequireCompleteEnumDecl ( EnumDecl EnumD,
SourceLocation  L,
CXXScopeSpec SS = nullptr 
)

◆ RequireCompleteExprType() [1/3]

bool Sema::RequireCompleteExprType ( Expr E,
CompleteTypeKind  Kind,
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
EThe expression whose type is required to be complete.
KindSelects which completeness rules should be applied.
DiagnoserThe 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 9219 of file SemaType.cpp.

References getCompletedType(), clang::Expr::getExprLoc(), and RequireCompleteType().

Referenced by CheckConditionalOperand(), LookupInlineAsmIdentifier(), RequireCompleteExprType(), and RequireCompleteSizedExprType().

◆ RequireCompleteExprType() [2/3]

bool Sema::RequireCompleteExprType ( Expr E,
unsigned  DiagID 
)

Definition at line 9225 of file SemaType.cpp.

References Default, and RequireCompleteExprType().

◆ RequireCompleteExprType() [3/3]

template<typename... Ts>
bool clang::Sema::RequireCompleteExprType ( Expr E,
unsigned  DiagID,
const Ts &...  Args 
)
inline

Definition at line 11889 of file Sema.h.

References Default, and RequireCompleteExprType().

◆ RequireCompleteSizedExprType()

template<typename... Ts>
bool clang::Sema::RequireCompleteSizedExprType ( Expr E,
unsigned  DiagID,
const Ts &...  Args 
)
inline

Definition at line 6603 of file Sema.h.

References Normal, and RequireCompleteExprType().

Referenced by CheckUnaryExprOrTypeTraitOperand().

◆ RequireCompleteSizedType()

template<typename... Ts>
bool clang::Sema::RequireCompleteSizedType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const Ts &...  Args 
)
inline

◆ RequireCompleteType() [1/5]

bool Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
CompleteTypeKind  Kind,
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
LocThe location in the source that the incomplete type diagnostic should refer to.
TThe type that this routine is examining for completeness.
KindSelects which completeness rules should be applied.
Returns
true if T is incomplete and a diagnostic was emitted, false otherwise.

Definition at line 9249 of file SemaType.cpp.

References Consumer, clang::Type::getAs(), and clang::ASTConsumer::HandleTagDeclRequiredDefinition().

Referenced by ActOnCXXDelete(), ActOnEndOfTranslationUnit(), ActOnGCCAsmStmt(), ActOnInitializerError(), ActOnObjCAtSynchronizedOperand(), ActOnOMPArraySectionExpr(), actOnOMPReductionKindClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPPrivateClause(), ActOnPropertyImplDecl(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartCXXMemberReference(), ActOnStartOfFunctionDef(), ActOnStartOfObjCMethodDef(), ActOnSuperClassOfClassInterface(), ActOnUninitializedDecl(), AddInitializerToDecl(), BuildAtomicExpr(), BuildAtomicType(), BuildBuiltinOffsetOf(), BuildClassMessage(), BuildCompoundLiteralExpr(), BuildCXXForRangeStmt(), BuildCXXTypeConstructExpr(), BuildCXXTypeId(), BuildExceptionDeclaration(), BuildInstanceMessage(), buildLambdaScopeReturnType(), BuildObjCEncodeExpression(), BuildResolvedCallExpr(), BuildVAArgExpr(), CheckBaseSpecifier(), CheckCallReturnType(), CheckCommaOperands(), CheckComparisonCategoryType(), CheckCompleteParameterTypesForMangler(), CheckCXXThrowOperand(), CheckExplicitlyDefaultedComparison(), CheckForModifiableLvalue(), checkMemberDecomposition(), CheckMessageArgumentTypes(), CheckObjCForCollectionOperand(), CheckOMPThreadPrivateDecl(), CheckOpenMPLinearDecl(), CheckOverridingFunctionReturnType(), CheckParmsForFunctionDef(), CheckPointerToMemberOperands(), CheckSpecifiedExceptionType(), CheckSubscriptingKind(), checkTypeMappable(), CheckUnaryTypeTraitTypeCompleteness(), checkUnknownAnyCast(), ComputeDefaultedSpecialMemberExceptionSpec(), ConvertParamDefaultArgument(), CopyObject(), DefaultVariadicArgumentPromotion(), clang::InitializationSequence::Diagnose(), EvaluateBooleanTypeTrait(), FindInstantiatedDecl(), GatherArgumentsForCall(), HandleExprPropertyRefExpr(), handlePreferredTypeAttr(), IgnoredValueConversions(), lookupCoroutineHandleType(), LookupInlineAsmField(), LookupMemberExpr(), LookupMemberExprInRecord(), lookupPromiseType(), lookupStdTypeTraitMember(), RequireCompleteDeclContext(), RequireCompleteExprType(), RequireCompleteSizedType(), RequireCompleteType(), RequireLiteralType(), RequireStructuralType(), SemaBuiltinDumpStruct(), SemaBuiltinLaunder(), and TemporaryMaterializationConversion().

◆ RequireCompleteType() [2/5]

bool Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
CompleteTypeKind  Kind,
unsigned  DiagID 
)

Definition at line 9594 of file SemaType.cpp.

References RequireCompleteType().

◆ RequireCompleteType() [3/5]

bool clang::Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
TypeDiagnoser Diagnoser 
)
inline

Definition at line 11952 of file Sema.h.

References Default, and RequireCompleteType().

◆ RequireCompleteType() [4/5]

bool clang::Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID 
)
inline

Definition at line 11956 of file Sema.h.

References Default, and RequireCompleteType().

◆ RequireCompleteType() [5/5]

template<typename... Ts>
bool clang::Sema::RequireCompleteType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const Ts &...  Args 
)
inline

Definition at line 11961 of file Sema.h.

References RequireCompleteType().

◆ 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
LocThe location in the source that the non-literal type diagnostic should refer to.
TThe type that this routine is examining for literalness.
DiagnoserEmits 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 9635 of file SemaType.cpp.

References clang::CXXRecordDecl::bases(), Context, clang::CPlusPlus17, clang::CPlusPlus20, CXXDestructor, Diag(), clang::Sema::TypeDiagnoser::diagnose(), clang::RecordDecl::fields(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::CXXRecordDecl::getDestructor(), getLangOpts(), getLiteralDiagFromTagKind(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumVBases(), clang::TagDecl::getTagKind(), clang::CXXRecordDecl::hasConstexprDestructor(), clang::CXXRecordDecl::hasConstexprNonCopyMoveConstructor(), clang::CXXRecordDecl::hasNonLiteralTypeFieldsOrBases(), clang::CXXRecordDecl::hasTrivialDefaultConstructor(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CXXRecordDecl::isAggregate(), isCompleteType(), clang::Type::isDependentType(), clang::CXXRecordDecl::isLambda(), clang::Type::isLiteralType(), clang::FunctionDecl::isUserProvided(), clang::Type::isVariableArrayType(), clang::Type::isVoidType(), RequireCompleteType(), SpecialMemberIsTrivial(), TAH_IgnoreTrivialABI, and clang::CXXRecordDecl::vbases().

Referenced by CheckLiteralType(), CheckVariableDeclarationType(), RequireLiteralType(), and RequireStructuralType().

◆ RequireLiteralType() [2/3]

bool Sema::RequireLiteralType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID 
)

Definition at line 9725 of file SemaType.cpp.

References RequireLiteralType().

◆ RequireLiteralType() [3/3]

template<typename... Ts>
bool clang::Sema::RequireLiteralType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const Ts &...  Args 
)
inline

Definition at line 11937 of file Sema.h.

References RequireLiteralType().

◆ RequireNonAbstractType() [1/2]

bool Sema::RequireNonAbstractType ( SourceLocation  Loc,
QualType  T,
TypeDiagnoser Diagnoser 
)

◆ RequireNonAbstractType() [2/2]

template<typename... Ts>
bool clang::Sema::RequireNonAbstractType ( SourceLocation  Loc,
QualType  T,
unsigned  DiagID,
const Ts &...  Args 
)
inline

Definition at line 4772 of file Sema.h.

References RequireNonAbstractType().

◆ RequireStructuralType()

bool Sema::RequireStructuralType ( QualType  T,
SourceLocation  Loc 
)

◆ resetFPOptions()

void clang::Sema::resetFPOptions ( FPOptions  FPO)
inline

Definition at line 9052 of file Sema.h.

References CurFPFeatures, FpPragmaStack, clang::FPOptions::getChangesFrom(), and LangOpts.

◆ 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)
__device__ double
__device__ int

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 13249 of file SemaOverload.cpp.

References clang::Type::getAs(), clang::Expr::getExprLoc(), clang::ValueDecl::getType(), clang::Expr::getType(), and clang::ASTContext::OverloadTy.

Referenced by CheckSingleAssignmentConstraints(), CheckTemplateArgument(), clang::InitializationSequence::Diagnose(), clang::InitializationSequence::InitializeFrom(), IsStandardConversion(), PerformImplicitConversion(), ResolveOverloadedFunctionForReferenceBinding(), TryListConversion(), and TryReferenceInit().

◆ 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 13296 of file SemaOverload.cpp.

References checkAddressOfFunctionIsAvailable(), clang::CUDA, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::FunctionDecl::getAssociatedConstraints(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), and clang::Result.

Referenced by ResolveOverloadForDeduction().

◆ resolveAndFixAddressOfSingleOverloadCandidate()

bool Sema::resolveAndFixAddressOfSingleOverloadCandidate ( ExprResult SrcExpr,
bool  DoFunctionPointerConversion = 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 13408 of file SemaOverload.cpp.

References clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::FunctionDecl::isCPUDispatchMultiVersion(), clang::FunctionDecl::isCPUSpecificMultiVersion(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::ASTContext::OverloadTy.

Referenced by CheckPlaceholderExpr().

◆ ResolveAndFixSingleFunctionTemplateSpecialization()

bool Sema::ResolveAndFixSingleFunctionTemplateSpecialization ( ExprResult SrcExpr,
bool  DoFunctionPointerConversion = false,
bool  Complain = false,
SourceRange  OpRangeForComplaining = SourceRange(),
QualType  DestTypeForComplaining = QualType(),
unsigned  DiagIDForComplaining = 0 
)

◆ resolveAssumedTemplateNameAsType()

bool Sema::resolveAssumedTemplateNameAsType ( Scope S,
TemplateName Name,
SourceLocation  NameLoc,
bool  Diagnose = true 
)

◆ ResolveExceptionSpec()

const FunctionProtoType * clang::Sema::ResolveExceptionSpec ( SourceLocation  Loc,
const FunctionProtoType FPT 
)

◆ ResolveSingleFunctionTemplateSpecialization()

FunctionDecl * Sema::ResolveSingleFunctionTemplateSpecialization ( OverloadExpr ovl,
bool  Complain = false,
DeclAccessPair FoundResult = nullptr,
TemplateSpecCandidateSet FailedTSC = nullptr 
)

Given an expression that refers to an overloaded function, try to resolve that overloaded function expression down to a single function.

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 13445 of file SemaOverload.cpp.

References clang::TemplateSpecCandidateSet::addCandidate(), completeFunctionType(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), DeduceTemplateArguments(), Diag(), clang::Expr::getExprLoc(), clang::OverloadExpr::getName(), clang::OverloadExpr::getNameLoc(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::OverloadExpr::hasExplicitTemplateArgs(), clang::MakeDeductionFailureInfo(), clang::Result, clang::TemplateSpecCandidate::set(), clang::Specialization, and clang::Success.

Referenced by CheckAddressOfOperand(), handleCleanupAttr(), and 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
AnnotationThe annotation pointer, produced by SaveNestedNameSpecifierAnnotation().
AnnotationRangeThe source range corresponding to the annotation.
SSThe nested-name-specifier that will be updated with the contents of the annotation pointer.

Definition at line 1027 of file SemaCXXScopeSpec.cpp.

References clang::CXXScopeSpec::Adopt(), and clang::CXXScopeSpec::SetInvalid().

◆ 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 511 of file Sema.cpp.

References clang::runWithSufficientStackSpace(), and warnStackExhausted().

Referenced by BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), CheckCXXDefaultArgExpr(), CheckIfFunctionSpecializationIsImmediate(), completeExprArrayBound(), DeduceReturnType(), DeduceTemplateArguments(), DoMarkVarDeclReferenced(), isAtLeastAsSpecializedAs(), LookupConstructors(), LookupSpecialMember(), MarkFunctionReferenced(), PerformConstructorInitialization(), SubstDecl(), and SubstDefaultArgument().

◆ SatisfactionStackContains()

bool clang::Sema::SatisfactionStackContains ( const NamedDecl D,
const llvm::FoldingSetNodeID &  ID 
) const
inline

Definition at line 11429 of file Sema.h.

References clang::Decl::getCanonicalDecl(), and ID.

Referenced by DiagRecursiveConstraintEval().

◆ 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
SSA nested-name-specifier.
Returns
A pointer containing all of the information in the nested-name-specifier SS.

Definition at line 1013 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().

◆ ScalarTypeToBooleanCastKind()

CastKind Sema::ScalarTypeToBooleanCastKind ( QualType  ScalarTy)
static

◆ SelectorsForTypoCorrection()

const ObjCMethodDecl * Sema::SelectorsForTypoCorrection ( Selector  Sel,
QualType  ObjectType = QualType() 
)

◆ SemaBuiltinShuffleVector()

ExprResult Sema::SemaBuiltinShuffleVector ( CallExpr TheCall)

◆ SemaBuiltinVectorMath()

bool Sema::SemaBuiltinVectorMath ( CallExpr TheCall,
QualType Res 
)

◆ SemaBuiltinVectorToScalarMath()

bool Sema::SemaBuiltinVectorToScalarMath ( CallExpr TheCall)

◆ SemaConvertVectorExpr()

ExprResult Sema::SemaConvertVectorExpr ( Expr E,
TypeSourceInfo TInfo,
SourceLocation  BuiltinLoc,
SourceLocation  RParenLoc 
)

◆ SetCtorInitializers()

bool Sema::SetCtorInitializers ( CXXConstructorDecl Constructor,
bool  AnyErrors,
ArrayRef< CXXCtorInitializer * >  Initializers = std::nullopt 
)

◆ SetDeclDefaulted()

void Sema::SetDeclDefaulted ( Decl dcl,
SourceLocation  DefaultLoc 
)

◆ SetDeclDeleted()

void Sema::SetDeclDeleted ( Decl dcl,
SourceLocation  DelLoc 
)

◆ SetDelegatingInitializer()

bool Sema::SetDelegatingInitializer ( CXXConstructorDecl Constructor,
CXXCtorInitializer Initializer 
)

◆ setExceptionMode()

void Sema::setExceptionMode ( SourceLocation  Loc,
LangOptions::FPExceptionModeKind  FPE 
)

Called to set exception behavior for floating point operations.

Definition at line 1331 of file SemaAttr.cpp.

References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, FpPragmaStack, getLangOpts(), and PSK_Set.

Referenced by ActOnPragmaFPExceptions().

◆ SetFunctionBodyKind()

void Sema::SetFunctionBodyKind ( Decl D,
SourceLocation  Loc,
FnBodyKind  BodyKind 
)

Definition at line 18273 of file SemaDeclCXX.cpp.

References Default, Delete, Other, SetDeclDefaulted(), and SetDeclDeleted().

◆ setFunctionHasBranchIntoScope()

void Sema::setFunctionHasBranchIntoScope ( )

Definition at line 2311 of file Sema.cpp.

References FunctionScopes.

Referenced by ActOnGCCAsmStmt(), ActOnGotoStmt(), and ActOnStartOfSwitchStmt().

◆ setFunctionHasBranchProtectedScope()

void Sema::setFunctionHasBranchProtectedScope ( )

Definition at line 2316 of file Sema.cpp.

References FunctionScopes.

Referenced by ActOnBlockStmtExpr(), ActOnGotoStmt(), ActOnIndirectGotoStmt(), ActOnLabelStmt(), ActOnMSAsmStmt(), ActOnObjCAtSynchronizedStmt(), ActOnObjCAutoreleasePoolStmt(), ActOnObjCForCollectionStmt(), ActOnOpenMPAtomicDirective(), ActOnOpenMPCriticalDirective(), ActOnOpenMPDeclareReductionCombinerStart(), ActOnOpenMPDeclareReductionInitializerStart(), ActOnOpenMPDispatchDirective(), ActOnOpenMPDistributeDirective(), ActOnOpenMPDistributeParallelForDirective(), ActOnOpenMPDistributeParallelForSimdDirective(), ActOnOpenMPDistributeSimdDirective(), ActOnOpenMPForSimdDirective(), ActOnOpenMPGenericLoopDirective(), ActOnOpenMPMaskedDirective(), ActOnOpenMPMaskedTaskLoopDirective(), ActOnOpenMPMaskedTaskLoopSimdDirective(), ActOnOpenMPMasterDirective(), ActOnOpenMPMasterTaskLoopDirective(), ActOnOpenMPMasterTaskLoopSimdDirective(), ActOnOpenMPOrderedDirective(), ActOnOpenMPParallelDirective(), ActOnOpenMPParallelForDirective(), ActOnOpenMPParallelForSimdDirective(), ActOnOpenMPParallelGenericLoopDirective(), ActOnOpenMPParallelMaskedDirective(), ActOnOpenMPParallelMaskedTaskLoopDirective(), ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), ActOnOpenMPParallelMasterDirective(), ActOnOpenMPParallelMasterTaskLoopDirective(), ActOnOpenMPParallelMasterTaskLoopSimdDirective(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPScopeDirective(), ActOnOpenMPSectionDirective(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSimdDirective(), ActOnOpenMPSingleDirective(), ActOnOpenMPTargetDataDirective(), ActOnOpenMPTargetDirective(), ActOnOpenMPTargetParallelDirective(), ActOnOpenMPTargetParallelForDirective(), ActOnOpenMPTargetParallelForSimdDirective(), ActOnOpenMPTargetParallelGenericLoopDirective(), ActOnOpenMPTargetSimdDirective(), ActOnOpenMPTargetTeamsDirective(), ActOnOpenMPTargetTeamsDistributeDirective(), ActOnOpenMPTargetTeamsDistributeParallelForDirective(), ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), ActOnOpenMPTargetTeamsDistributeSimdDirective(), ActOnOpenMPTargetTeamsGenericLoopDirective(), ActOnOpenMPTaskDirective(), ActOnOpenMPTaskgroupDirective(), ActOnOpenMPTaskLoopDirective(), ActOnOpenMPTaskLoopSimdDirective(), ActOnOpenMPTeamsDirective(), ActOnOpenMPTeamsDistributeDirective(), ActOnOpenMPTeamsDistributeParallelForDirective(), ActOnOpenMPTeamsDistributeParallelForSimdDirective(), ActOnOpenMPTeamsDistributeSimdDirective(), ActOnOpenMPTeamsGenericLoopDirective(), ActOnStartStmtExpr(), ActOnUninitializedDecl(), AddInitializerToDecl(), BuildIfStmt(), CheckCompleteVariableDeclaration(), CheckTypedefForVariablyModifiedType(), and CheckVariableDeclarationType().

◆ setFunctionHasIndirectGoto()

void Sema::setFunctionHasIndirectGoto ( )

Definition at line 2321 of file Sema.cpp.

References FunctionScopes.

Referenced by ActOnIndirectGotoStmt().

◆ setFunctionHasMustTail()

void Sema::setFunctionHasMustTail ( )

Definition at line 2326 of file Sema.cpp.

References FunctionScopes.

Referenced by BuildAttributedStmt().

◆ SetIvarInitializers()

void Sema::SetIvarInitializers ( ObjCImplementationDecl ObjCImplementation)

◆ SetLateTemplateParser()

void clang::Sema::SetLateTemplateParser ( LateTemplateParserCB LTP,
LateTemplateParserCleanupCB LTPCleanup,
void *  P 
)
inline

Definition at line 1079 of file Sema.h.

References LateTemplateParser, LateTemplateParserCleanup, OpaqueParser, and 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().

Referenced by ActOnTag(), and CheckClassTemplate().

◆ 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 2623 of file SemaOpenMP.cpp.

References DSAStack, getCanonicalDecl(), getVariableCategoryFromDecl(), clang::isOpenMPTargetExecutionDirective(), and LangOpts.

Referenced by buildCapturedStmtCaptureList().

◆ SetParamDefaultArgument()

void Sema::SetParamDefaultArgument ( ParmVarDecl Param,
Expr DefaultArg,
SourceLocation  EqualLoc 
)

◆ setTagNameForLinkagePurposes()

void Sema::setTagNameForLinkagePurposes ( TagDecl TagFromDeclSpec,
TypedefNameDecl NewTD 
)

◆ 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 9734 of file SemaDeclCXX.cpp.

References Context, clang::CXXRecordDecl::ctors(), clang::CUDA, CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, clang::ASTContext::DeclarationNames, Diag(), Diagnose, FindDeallocationFunction(), clang::DeclarationNameTable::getCXXOperatorName(), getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), getSpecialMember(), clang::CXXRecordDecl::hasUserDeclaredMoveAssignment(), clang::CXXRecordDecl::hasUserDeclaredMoveConstructor(), inferCUDATargetForImplicitSpecialMember(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::LangOptions::isCompatibleWithMSVC(), clang::TagDecl::isDependentType(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::CXXRecordDecl::isLambda(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::CXXMethodDecl::isVirtual(), clang::CXXRecordDecl::lambdaIsDefaultConstructibleAndAssignable(), LangOpts, clang::CXXRecordDecl::methods(), and clang::LangOptionsBase::MSVC2015.

Referenced by ActOnFields(), CheckExplicitlyDefaultedSpecialMember(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DiagnoseDeletedDefaultedFunction(), findInheritingConstructor(), and NoteDeletedInheritingConstructor().

◆ ShouldEnterDeclaratorScope()

bool Sema::ShouldEnterDeclaratorScope ( Scope S,
const CXXScopeSpec SS 
)

◆ shouldIgnoreInHostDeviceCheck()

bool Sema::shouldIgnoreInHostDeviceCheck ( FunctionDecl Callee)

Definition at line 20688 of file SemaDecl.cpp.

References CFT_Global, IdentifyCUDATarget(), and LangOpts.

◆ 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
DDeclaration that is checked.
PrevDeclPrevious 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 11148 of file SemaDecl.cpp.

References canFullyTypeCheckRedeclaration(), clang::Decl::getDeclContext(), clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::isDependentContext(), and clang::DeclContext::isFileContext().

Referenced by CheckFunctionDeclaration().

◆ shouldSkipAnonEnumBody()

Sema::SkipBodyInfo Sema::shouldSkipAnonEnumBody ( Scope S,
IdentifierInfo II,
SourceLocation  IILoc 
)

Determine whether the body of an anonymous enumeration should be skipped.

Parameters
IIThe name of the first enumerator.

Definition at line 19996 of file SemaDecl.cpp.

References clang::CPlusPlus, forRedeclarationInCurContext(), clang::NamedDecl::getDeclName(), getLangOpts(), hasVisibleDefinition(), LookupOrdinaryName, LookupSingleName(), and clang::Sema::SkipBodyInfo::Previous.

◆ ShouldSplatAltivecScalarInCast()

bool Sema::ShouldSplatAltivecScalarInCast ( const VectorType VecTy)

◆ ShouldWarnIfUnusedFileScopedDecl()

bool Sema::ShouldWarnIfUnusedFileScopedDecl ( const DeclaratorDecl D) const

◆ 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 10162 of file SemaDeclCXX.cpp.

References clang::CXXRecordDecl::bases(), checkTrivialClassMembers(), checkTrivialSubobjectCall(), clang::Qualifiers::Const, Context, CXXCopyAssignment, CXXCopyConstructor, CXXDefaultConstructor, CXXDestructor, CXXInvalid, CXXMoveAssignment, CXXMoveConstructor, Diag(), Diagnose, clang::Type::getAs(), clang::CXXBaseSpecifier::getBeginLoc(), clang::QualType::getCVRQualifiers(), clang::ASTContext::getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionDecl::getNonObjectParameter(), clang::FunctionDecl::getNumParams(), clang::CXXRecordDecl::getNumVBases(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ReferenceType::getPointeeType(), clang::ASTContext::getRecordType(), clang::ASTContext::getRValueReferenceType(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::QualType::isConstQualified(), clang::CXXRecordDecl::isDynamicClass(), clang::FunctionDecl::isUserProvided(), clang::FunctionDecl::isVariadic(), clang::CXXBaseSpecifier::isVirtual(), clang::CXXMethodDecl::isVirtual(), clang::CXXRecordDecl::methods(), TSK_BaseClass, clang::CXXRecordDecl::vbases_begin(), clang::LangOptionsBase::Ver14, and clang::QualType::withConst().

Referenced by CheckCompletedCXXClass(), checkTrivialSubobjectCall(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), and RequireLiteralType().

◆ StartOpenMPClause()

void Sema::StartOpenMPClause ( OpenMPClauseKind  K)

Start analysis of clauses.

Definition at line 2784 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 2519 of file SemaOpenMP.cpp.

References DSAStack, clang::isOpenMPLoopDirective(), and LangOpts.

◆ 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 2776 of file SemaOpenMP.cpp.

References DSAStack, PotentiallyEvaluated, and PushExpressionEvaluationContext().

◆ startOpenMPLoop()

void Sema::startOpenMPLoop ( )

If the current region is a loop-based region, mark the start of the loop construct.

Definition at line 2513 of file SemaOpenMP.cpp.

References DSAStack, clang::isOpenMPLoopDirective(), and LangOpts.

◆ stripARCUnbridgedCast()

Expr * Sema::stripARCUnbridgedCast ( Expr e)

◆ SubstAutoType()

QualType Sema::SubstAutoType ( QualType  TypeWithAuto,
QualType  Replacement 
)

◆ SubstAutoTypeDependent()

QualType Sema::SubstAutoTypeDependent ( QualType  TypeWithAuto)

◆ SubstAutoTypeSourceInfo()

TypeSourceInfo * Sema::SubstAutoTypeSourceInfo ( TypeSourceInfo TypeWithAuto,
QualType  Replacement 
)

Substitute Replacement for auto in TypeWithAuto.

Definition at line 5208 of file SemaTemplateDeduction.cpp.

References Context, and clang::ASTContext::DependentTy.

◆ SubstAutoTypeSourceInfoDependent()

TypeSourceInfo * Sema::SubstAutoTypeSourceInfoDependent ( TypeSourceInfo TypeWithAuto)

◆ 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 3221 of file SemaTemplateInstantiate.cpp.

References AttachBaseSpecifiers(), clang::CXXRecordDecl::bases(), CheckBaseSpecifier(), CheckParameterPacksForExpansion(), collectUnexpandedParameterPacks(), Context, clang::Invalid, clang::Decl::setInvalidDecl(), and SubstType().

Referenced by InstantiateClass().

◆ SubstConstraintExpr()

ExprResult Sema::SubstConstraintExpr ( Expr E,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Definition at line 4242 of file SemaTemplateInstantiate.cpp.

References SubstExpr().

Referenced by calculateConstraintSatisfaction().

◆ SubstConstraintExprWithoutSatisfaction()

ExprResult Sema::SubstConstraintExprWithoutSatisfaction ( Expr E,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ SubstDecl()

Decl * Sema::SubstDecl ( Decl D,
DeclContext Owner,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ SubstDeclarationNameInfo()

DeclarationNameInfo Sema::SubstDeclarationNameInfo ( const DeclarationNameInfo NameInfo,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ SubstDefaultArgument()

bool Sema::SubstDefaultArgument ( SourceLocation  Loc,
ParmVarDecl Param,
const MultiLevelTemplateArgumentList TemplateArgs,
bool  ForCallExpr = false 
)

◆ SubstDefaultTemplateArgumentIfAvailable()

TemplateArgumentLoc Sema::SubstDefaultTemplateArgumentIfAvailable ( TemplateDecl Template,
SourceLocation  TemplateLoc,
SourceLocation  RAngleLoc,
Decl Param,
ArrayRef< TemplateArgument SugaredConverted,
ArrayRef< TemplateArgument CanonicalConverted,
bool HasDefaultArg 
)

◆ SubstExceptionSpec() [1/2]

void Sema::SubstExceptionSpec ( FunctionDecl New,
const FunctionProtoType Proto,
const MultiLevelTemplateArgumentList Args 
)

◆ SubstExceptionSpec() [2/2]

bool Sema::SubstExceptionSpec ( SourceLocation  Loc,
FunctionProtoType::ExceptionSpecInfo ESI,
SmallVectorImpl< QualType > &  ExceptionStorage,
const MultiLevelTemplateArgumentList Args 
)

Definition at line 2837 of file SemaTemplateInstantiate.cpp.

◆ SubstExpr()

ExprResult Sema::SubstExpr ( Expr E,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ 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
ExprsThe list of expressions to substitute into.
IsCallWhether this is some form of call, in which case default arguments will be dropped.
TemplateArgsThe set of template arguments to substitute.
OutputsWill receive all of the substituted arguments.
Returns
true if an error occurred, false otherwise.

Definition at line 4268 of file SemaTemplateInstantiate.cpp.

Referenced by instantiateDependentAnnotationAttr().

◆ SubstFunctionDeclType()

TypeSourceInfo * Sema::SubstFunctionDeclType ( TypeSourceInfo T,
const MultiLevelTemplateArgumentList Args,
SourceLocation  Loc,
DeclarationName  Entity,
CXXRecordDecl ThisContext,
Qualifiers  ThisTypeQuals,
bool  EvaluateConstraints = true 
)

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 2791 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts, Context, clang::TypeLoc::getAs(), clang::TypeLoc::getFullDataSize(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TypeLoc::IgnoreParens(), NeedsInstantiationAsFunctionType(), clang::TypeLocBuilder::reserve(), and clang::Result.

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

◆ SubstInitializer()

ExprResult Sema::SubstInitializer ( Expr E,
const MultiLevelTemplateArgumentList TemplateArgs,
bool  CXXDirectInit 
)

◆ SubstituteExplicitTemplateArguments()

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
FunctionTemplatethe function template into which the explicit template arguments will be substituted.
ExplicitTemplateArgsthe explicitly-specified template arguments.
Deducedthe deduced template arguments, which will be populated with the converted and checked explicit template arguments.
ParamTypeswill be populated with the instantiated function parameters.
FunctionTypeif 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.
Infoif substitution fails for any reason, this object will be populated with more information about the failure.
Returns
TemplateDeductionResult::Success if substitution was successful, or some failure condition.

Definition at line 3290 of file SemaTemplateDeduction.cpp.

References clang::TemplateArgumentList::asArray(), BuildFunctionType(), CheckTemplateArgumentList(), Context, clang::CPlusPlus11, clang::CPlusPlus17, clang::TemplateArgumentList::CreateCopy(), clang::CUDA, CurrentInstantiationScope, Diag(), clang::Sema::CodeSynthesisContext::ExplicitTemplateArgumentSubstitution, clang::FunctionProtoType::ExtProtoInfo::ExtParameterInfos, clang::Function, FunctionTemplate, clang::TemplateArgumentList::get(), clang::getExpandedPackSize(), clang::FunctionProtoType::getExtParameterInfosOrNull(), clang::FunctionProtoType::getExtProtoInfo(), clang::TemplateArgument::getKind(), getLangOpts(), clang::sema::TemplateDeductionInfo::getLocation(), clang::TemplateParameterList::getParam(), clang::DeclContext::getParent(), clang::Sema::ExtParameterInfoBuilder::getPointerOrNull(), clang::FunctionType::getReturnType(), getTemplateInstantiationArgs(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::FunctionProtoType::hasTrailingReturn(), clang::InstantiationDepth, clang::InvalidExplicitArguments, clang::Sema::InstantiatingTemplate::isInvalid(), clang::QualType::isNull(), clang::Type::isVoidType(), makeTemplateParameter(), P, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::sema::TemplateDeductionInfo::Param, clang::sema::TemplateDeductionInfo::setExplicitArgs(), clang::LocalInstantiationScope::SetPartiallySubstitutedPack(), clang::TemplateParameterList::size(), clang::TemplateArgumentList::size(), clang::TemplateArgumentListInfo::size(), SubstExceptionSpec(), clang::SubstitutionFailure, SubstParmTypes(), SubstType(), clang::Success, and Unevaluated.

◆ SubstNestedNameSpecifierLoc()

NestedNameSpecifierLoc Sema::SubstNestedNameSpecifierLoc ( NestedNameSpecifierLoc  NNS,
const MultiLevelTemplateArgumentList TemplateArgs 
)

◆ 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 3105 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts.

Referenced by clang::TemplateDeclInstantiator::SubstFunctionType(), and SubstituteExplicitTemplateArguments().

◆ SubstParmVarDecl()

ParmVarDecl * Sema::SubstParmVarDecl ( ParmVarDecl D,
const MultiLevelTemplateArgumentList TemplateArgs,
int  indexAdjustment,
std::optional< unsigned NumExpansions,
bool  ExpectParameterPack,
bool  EvaluateConstraints = true 
)

Definition at line 2981 of file SemaTemplateInstantiate.cpp.

References CheckPackExpansion(), CheckParameter(), clang::Type::containsUnexpandedParameterPack(), Context, CurContext, CurrentInstantiationScope, Diag(), FindInstantiatedDecl(), clang::TypeLoc::getAs(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::getDefaultArg(), clang::ParmVarDecl::getExplicitObjectParamThisLoc(), 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::VarDecl::isParameterPack(), clang::Type::isVoidType(), clang::Decl::setDeclContext(), clang::ParmVarDecl::setExplicitObjectParameterLoc(), clang::ParmVarDecl::setHasInheritedDefaultArg(), clang::ParmVarDecl::setScopeInfo(), clang::ParmVarDecl::setUninstantiatedDefaultArg(), clang::ParmVarDecl::setUnparsedDefaultArg(), SubstType(), SubstTypeConstraint(), and UnparsedDefaultArgInstantiations.

◆ SubstSpaceshipAsEqualEqual()

FunctionDecl * Sema::SubstSpaceshipAsEqualEqual ( CXXRecordDecl RD,
FunctionDecl Spaceship 
)

◆ SubstStmt()

StmtResult Sema::SubstStmt ( Stmt S,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Definition at line 4202 of file SemaTemplateInstantiate.cpp.

Referenced by InstantiateFunctionDefinition().

◆ SubstTemplateArgument()

bool Sema::SubstTemplateArgument ( const TemplateArgumentLoc Input,
const MultiLevelTemplateArgumentList TemplateArgs,
TemplateArgumentLoc Output 
)

Definition at line 4212 of file SemaTemplateInstantiate.cpp.

◆ SubstTemplateArguments()

bool Sema::SubstTemplateArguments ( ArrayRef< TemplateArgumentLoc Args,
const MultiLevelTemplateArgumentList TemplateArgs,
TemplateArgumentListInfo Outputs 
)

◆ SubstTemplateName()

TemplateName Sema::SubstTemplateName ( NestedNameSpecifierLoc  QualifierLoc,
TemplateName  Name,
SourceLocation  Loc,
const MultiLevelTemplateArgumentList TemplateArgs 
)

Definition at line 4302 of file SemaTemplateInstantiate.cpp.

References clang::CXXScopeSpec::Adopt().

Referenced by SubstDefaultTemplateArgument().

◆ SubstTemplateParams()

TemplateParameterList * Sema::SubstTemplateParams ( TemplateParameterList Params,
DeclContext Owner,
const MultiLevelTemplateArgumentList TemplateArgs,
bool  EvaluateConstraints = true 
)

◆ SubstType() [1/3]

QualType Sema::SubstType ( QualType  T,
const MultiLevelTemplateArgumentList TemplateArgs,
SourceLocation  Loc,
DeclarationName  Entity 
)

◆ SubstType() [2/3]

TypeSourceInfo * Sema::SubstType ( TypeLoc  TL,
const MultiLevelTemplateArgumentList TemplateArgs,
SourceLocation  Loc,
DeclarationName  Entity 
)

◆ SubstType() [3/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
Tthe type into which the template arguments will be substituted. If this type is not dependent, it will be returned immediately.
Argsthe template arguments that will be substituted for the top-level template parameters within T.
Locthe 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).
Entitythe 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).
AllowDeducedTSTWhether 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 2700 of file SemaTemplateInstantiate.cpp.

References CodeSynthesisContexts, clang::TypeSourceInfo::getType(), clang::Type::isInstantiationDependentType(), and clang::Type::isVariablyModifiedType().

Referenced by CheckTemplateArgument(), CheckTemplateIdType(), CompleteVarTemplateSpecializationDecl(), ConvertDeducedTemplateArgument(), FinishTemplateArgumentDeduction(), HandleDependentAccessCheck(), instantiateDependentAlignedAttr(), InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), SubstBaseSpecifiers(), SubstDefaultTemplateArgument(), SubstituteExplicitTemplateArguments(), and SubstParmVarDecl().

◆ SubstTypeConstraint()

bool Sema::SubstTypeConstraint ( TemplateTypeParmDecl Inst,
const TypeConstraint TC,
const MultiLevelTemplateArgumentList TemplateArgs,
bool  EvaluateConstraint 
)

◆ SwapSatisfactionStack()

void clang::Sema::SwapSatisfactionStack ( llvm::SmallVectorImpl< SatisfactionStackEntryTy > &  NewSS)
inline

◆ SYCLDiagIfDeviceCode()

Sema::SemaDiagnosticBuilder Sema::SYCLDiagIfDeviceCode ( SourceLocation  Loc,
unsigned  DiagID 
)

Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device code".

  • If CurLexicalContext is a kernel function or it is known that the function will be emitted for the device, emits the diagnostics immediately.
  • If CurLexicalContext is a function and we are compiling for the device, but we don't know that this function will be codegen'ed for devive yet, creates a diagnostic which is emitted if and when we realize that the function will be codegen'ed.

Example usage:

Diagnose __float128 type usage only from SYCL device code if the current target doesn't support it if (!S.Context.getTargetInfo().hasFloat128Type() && S.getLangOpts().SYCLIsDevice) SYCLDiagIfDeviceCode(Loc, diag::err_type_unsupported) << "__float128";

Definition at line 21 of file SemaSYCL.cpp.

References Emitted, getCurLexicalContext(), getEmissionStatus(), getLangOpts(), clang::Sema::SemaDiagnosticBuilder::K_Deferred, clang::Sema::SemaDiagnosticBuilder::K_ImmediateWithCallStack, and clang::Sema::SemaDiagnosticBuilder::K_Nop.

Referenced by deepTypeCheckForSYCLDevice(), and targetDiag().

◆ targetDiag() [1/2]

SemaDiagnosticBuilder clang::Sema::targetDiag ( SourceLocation  Loc,
const PartialDiagnostic PD,
const FunctionDecl FD = nullptr 
)
inline

Definition at line 879 of file Sema.h.

References clang::PartialDiagnostic::getDiagID(), and targetDiag().

◆ targetDiag() [2/2]

Sema::SemaDiagnosticBuilder Sema::targetDiag ( SourceLocation  Loc,
unsigned  DiagID,
const FunctionDecl FD = nullptr 
)

◆ TemplateParameterListsAreEqual() [1/2]

bool Sema::TemplateParameterListsAreEqual ( const TemplateCompareNewDeclInfo NewInstFrom,
TemplateParameterList New,
const NamedDecl OldInstFrom,
TemplateParameterList Old,
bool  Complain,
TemplateParameterListEqualKind  Kind,
SourceLocation  TemplateArgLoc = SourceLocation() 
)

Determine whether the given template parameter lists are equivalent.

Parameters
NewThe new template parameter list, typically written in the source code as part of a new template declaration.
OldThe old template parameter list, typically found via name lookup of the template declared with this template parameter list.
ComplainIf true, this routine will produce a diagnostic if the template parameter lists are not equivalent.
Kinddescribes how we are to match the template parameter lists.
TemplateArgLocIf 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 8747 of file SemaTemplate.cpp.

References AreConstraintExpressionsEqual(), clang::TemplateParameterList::begin(), Diag(), Diagnose, DiagnoseTemplateParameterListArityMismatch(), clang::TemplateParameterList::end(), clang::Stmt::getBeginLoc(), clang::TemplateParameterList::getRequiresClause(), clang::TemplateParameterList::getTemplateLoc(), MatchTemplateParameterKind(), clang::TemplateParameterList::size(), TPL_TemplateParamsEquivalent, and TPL_TemplateTemplateArgumentMatch.

Referenced by ActOnAliasDeclaration(), CheckClassTemplate(), CheckTemplateTemplateArgument(), getMoreSpecialized(), getMoreSpecializedTemplate(), IsOverloadOrOverrideImpl(), MatchTemplateParameterKind(), MatchTemplateParametersToScopeSpecifier(), MergeVarDecl(), and TemplateParameterListsAreEqual().

◆ TemplateParameterListsAreEqual() [2/2]

bool clang::Sema::TemplateParameterListsAreEqual ( TemplateParameterList New,
TemplateParameterList Old,
bool  Complain,
TemplateParameterListEqualKind  Kind,
SourceLocation  TemplateArgLoc = SourceLocation() 
)
inline

Definition at line 9596 of file Sema.h.

References TemplateParameterListsAreEqual().

◆ 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 8541 of file SemaInit.cpp.

References clang::CPlusPlus11, CreateMaterializeTemporaryExpr(), clang::ExprError(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::Expr::isPRValue(), and RequireCompleteType().

Referenced by ActOnConditionalOp(), BuildMemberReferenceExpr(), CheckPointerToMemberOperands(), CreateBuiltinArraySubscriptExpr(), EvaluateStaticAssertMessageAsString(), IgnoredValueConversions(), and PerformImplicitConversion().

◆ TooManyArguments()

static bool clang::Sema::TooManyArguments ( size_t  NumParams,
size_t  NumArgs,
bool  PartialOverloading = false 
)
inlinestatic

To be used for checking whether the arguments being passed to function exceeds the number of parameters expected for it.

Definition at line 6484 of file Sema.h.

Referenced by checkDirectCallValidity().

◆ TransformToPotentiallyEvaluated() [1/2]

ExprResult Sema::TransformToPotentiallyEvaluated ( Expr E)

◆ TransformToPotentiallyEvaluated() [2/2]

TypeSourceInfo * Sema::TransformToPotentiallyEvaluated ( TypeSourceInfo TInfo)

Definition at line 18194 of file SemaExpr.cpp.

References ExprEvalContexts, and isUnevaluatedContext().

◆ translateTemplateArguments()

void Sema::translateTemplateArguments ( const ASTTemplateArgsPtr In,
TemplateArgumentListInfo Out 
)

◆ tryCaptureObjCSelf()

ObjCMethodDecl * Sema::tryCaptureObjCSelf ( SourceLocation  Loc)

Try to capture an implicit reference to 'self'.

Definition at line 1414 of file SemaExprObjC.cpp.

References getFunctionLevelDeclContext(), clang::ObjCMethodDecl::getSelfDecl(), and tryCaptureVariable().

Referenced by ActOnClassPropertyRefExpr(), and ActOnSuperMessage().

◆ tryCaptureOpenMPLambdas()

void Sema::tryCaptureOpenMPLambdas ( ValueDecl V)

◆ tryCaptureVariable() [1/2]

bool Sema::tryCaptureVariable ( ValueDecl Var,
SourceLocation  Loc,
TryCaptureKind  Kind,
SourceLocation  EllipsisLoc,
bool  BuildAndDiagnose,
QualType CaptureType,
QualType DeclRefType,
const unsigned *const  FunctionScopeIndexToStopAt 
)

Try to capture the given variable.

Parameters
VarThe variable to capture.
LocThe location at which the capture occurs.
KindThe kind of capture, which may be implicit (for either a block or a lambda), or explicit by-value or by-reference (for a lambda).
EllipsisLocThe location of the ellipsis, if one is provided in an explicit lambda capture.
BuildAndDiagnoseWhether 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.
CaptureTypeWill 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.
DeclRefTypeWill be set to the type of a reference to the capture from within the current scope. Only valid when the variable can be captured.
FunctionScopeIndexToStopAtIf 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 19722 of file SemaExpr.cpp.

References clang::QualType::addConst(), clang::sema::LambdaScopeInfo::AfterParameterList, buildLambdaCaptureFixit(), clang::sema::LambdaScopeInfo::CallOperator, captureInBlock(), captureInCapturedRegion(), captureInLambda(), captureVariablyModifiedType(), CapturingFunctionScopes, Context, clang::CR_OpenMP, CurContext, Diag(), diagnoseUncapturableValueReferenceOrBinding(), clang::DeclContext::Equals(), FunctionScopes, clang::TypeDecl::getBeginLoc(), clang::Decl::getCanonicalDecl(), clang::sema::CapturingScopeInfo::getCapture(), clang::Decl::getDeclContext(), clang::getLambdaAwareParentOfDeclContext(), getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getNonReferenceType(), clang::DeclContext::getParent(), getParentOfCapturingContextOrNull(), clang::ValueDecl::getPotentiallyDecomposedVarDecl(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::Invalid, clang::QualType::isConstQualified(), clang::DeclContext::isFunctionOrMethod(), clang::isGenericLambdaCallOperatorSpecialization(), isOpenMPCapturedDecl(), isOpenMPGlobalCapturedDecl(), isOpenMPPrivateDecl(), isOpenMPTargetCapturedDecl(), isVariableAlreadyCapturedInScopeInfo(), isVariableCapturable(), clang::Type::isVariablyModifiedType(), clang::sema::LambdaScopeInfo::Lambda, LangOpts, clang::sema::Capture::markUsed(), and TryCapture_Implicit.

Referenced by ActOnLambdaExpressionAfterIntroducer(), buildLoopVarFunc(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), DoMarkBindingDeclReferenced(), getCapturedDeclRefType(), clang::getStackIndexOfNearestEnclosingCaptureCapableLambda(), MarkVarDeclODRUsed(), NeedToCaptureVariable(), tryCaptureObjCSelf(), and tryCaptureVariable().

◆ tryCaptureVariable() [2/2]

bool Sema::tryCaptureVariable ( ValueDecl Var,
SourceLocation  Loc,
TryCaptureKind  Kind = TryCapture_Implicit,
SourceLocation  EllipsisLoc = SourceLocation() 
)

Try to capture the given variable.

Definition at line 20009 of file SemaExpr.cpp.

References tryCaptureVariable().

◆ tryConvertExprToType()

ExprResult Sema::tryConvertExprToType ( Expr E,
QualType  Ty 
)

Try to convert an expression E to type Ty.

Returns the result of the conversion.

Definition at line 5223 of file SemaExpr.cpp.

References clang::InitializationKind::CreateCopy(), clang::Stmt::getBeginLoc(), clang::InitializedEntity::InitializeTemporary(), and clang::InitializationSequence::Perform().

Referenced by CheckMatrixElementwiseOperands(), and CreateBuiltinMatrixSubscriptExpr().

◆ 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 2468 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, Compress >::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, Compress >::isUsable(), and clang::ASTContext::OverloadTy.

Referenced by DiagnoseAlwaysNonNullPointer(), and tryToRecoverWithCall().

◆ TryImplicitConversion()

ImplicitConversionSequence Sema::TryImplicitConversion ( Expr From,
QualType  ToType,
bool  SuppressUserConversions,
AllowedExplicit  AllowExplicit,
bool  InOverloadResolution,
bool  CStyle,
bool  AllowObjCWritebackConversion 
)

◆ tryLookupUnambiguousFieldDecl()

ValueDecl * Sema::tryLookupUnambiguousFieldDecl ( RecordDecl ClassDecl,
const IdentifierInfo MemberOrBase 
)

◆ tryResolveExplicitSpecifier()

bool Sema::tryResolveExplicitSpecifier ( ExplicitSpecifier ExplicitSpec)

◆ tryToFixVariablyModifiedVarType()

bool Sema::tryToFixVariablyModifiedVarType ( TypeSourceInfo *&  TInfo,
QualType T,
SourceLocation  Loc,
unsigned  FailedFoldDiagID 
)

Attempt to fold a variable-sized type to a constant-sized type, returning true if we were successful.

Definition at line 6700 of file SemaDecl.cpp.

References Context, Diag(), clang::TypeSourceInfo::getType(), toString(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().

Referenced by ActOnIvar(), ActOnVariableDeclarator(), BuildCompoundLiteralExpr(), and CheckFieldDecl().

◆ 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 2650 of file Sema.cpp.

References BuildCallExpr(), clang::FixItHint::CreateInsertion(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), getLocForEndOfToken(), clang::Stmt::getSourceRange(), IsCallableWithAppend(), IsCPUDispatchCPUSpecificMultiVersion(), clang::QualType::isNull(), isSFINAEContext(), notePlausibleOverloads(), and tryExprAsCall().

Referenced by CheckPlaceholderExpr(), and LookupMemberExpr().

◆ UnifySection() [1/2]

bool Sema::UnifySection ( StringRef  SectionName,
int  SectionFlags,
NamedDecl TheDecl 
)

◆ UnifySection() [2/2]

bool Sema::UnifySection ( StringRef  SectionName,
int  SectionFlags,
SourceLocation  PragmaSectionLocation 
)

◆ UnmarkAsLateParsedTemplate()

void Sema::UnmarkAsLateParsedTemplate ( FunctionDecl FD)

Definition at line 11985 of file SemaTemplate.cpp.

References clang::FunctionDecl::setLateTemplateParsed().

◆ updateAttrsForLateParsedTemplate()

void Sema::updateAttrsForLateParsedTemplate ( const Decl Pattern,
Decl Inst 
)

Update instantiation attributes after template was late parsed.

Some attributes are evaluated based on the body of template. If it is late parsed, such attributes cannot be evaluated when declaration is instantiated. This function is used to update instantiation attributes when template definition is ready.

Definition at line 896 of file SemaTemplateInstantiateDecl.cpp.

References clang::Decl::addAttr(), clang::Decl::attrs(), getASTContext(), and clang::Decl::hasAttr().

Referenced by InstantiateFunctionDefinition().

◆ UpdateExceptionSpec()

void clang::Sema::UpdateExceptionSpec ( FunctionDecl FD,
const FunctionProtoType::ExceptionSpecInfo ESI 
)

◆ updateOutOfDateSelector()

void Sema::updateOutOfDateSelector ( Selector  Sel)

Definition at line 3432 of file SemaDeclObjC.cpp.

◆ UseArgumentDependentLookup()

bool Sema::UseArgumentDependentLookup ( const CXXScopeSpec SS,
const LookupResult R,
bool  HasTrailingLParen 
)

◆ usesPartialOrExplicitSpecialization()

bool Sema::usesPartialOrExplicitSpecialization ( SourceLocation  Loc,
ClassTemplateSpecializationDecl ClassTemplateSpec 
)

◆ 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 1554 of file SemaExpr.cpp.

References ACK_CompAssign, checkEnumArithmeticConversions(), Context, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::ASTContext::getCommonSugaredType(), clang::ASTContext::getPromotedIntegerType(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), handleComplexConversion(), handleComplexIntConversion(), handleFixedPointConversion(), handleFloatConversion(), clang::ASTContext::hasSameType(), ImpCastExprToType(), clang::Type::isArithmeticType(), clang::Type::isComplexIntegerType(), clang::Type::isComplexType(), clang::Type::isFixedPointType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::ASTContext::isPromotableBitField(), clang::ASTContext::isPromotableIntegerType(), clang::Type::isRealFloatingType(), unsupportedTypeConversion(), and UsualUnaryConversions().

Referenced by CheckAdditionOperands(), checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), CheckBitwiseOperands(), CheckConditionalOperands(), CheckMultiplyDivideOperands(), CheckRemainderOperands(), CheckSizelessVectorConditionalTypes(), CheckSubtractionOperands(), CheckVectorConditionalTypes(), CXXCheckConditionalOperands(), and SemaBuiltinVectorMath().

◆ 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 789 of file SemaExpr.cpp.

References Context, CurFPFeatures, DefaultFunctionArrayLvalueConversion(), clang::ASTContext::DoubleTy, clang::ExprError(), clang::LangOptionsBase::FEM_Double, clang::LangOptionsBase::FEM_Extended, clang::LangOptionsBase::FEM_Source, clang::LangOptionsBase::FEM_UnsetOnCommandLine, clang::ASTContext::FloatTy, clang::ActionResult< PtrTy, Compress >::get(), clang::ASTContext::getComplexType(), clang::ASTContext::getFloatingTypeOrder(), getLangOpts(), clang::Preprocessor::getLastFPEvalPragmaLocation(), clang::ASTContext::getPromotedIntegerType(), clang::Expr::getType(), ImpCastExprToType(), clang::Type::isComplexType(), clang::Type::isFloatingType(), clang::Type::isHalfType(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::ASTContext::isPromotableBitField(), clang::ASTContext::isPromotableIntegerType(), clang::SourceLocation::isValid(), clang::ASTContext::LongDoubleTy, and PP.

Referenced by ActOnConditionalOp(), BuildObjCBridgedCast(), BuildVAArgExpr(), CheckConditionalOperands(), CheckIndirectionOperand(), CheckLogicalOperands(), CheckShiftOperands(), checkSizelessVectorShift(), CheckSwitchCondition(), checkVectorShift(), CreateBuiltinBinOp(), CreateBuiltinUnaryOp(), DefaultArgumentPromotion(), SemaBuiltinCallWithStaticChain(), and UsualArithmeticConversions().

◆ VerifyBitField()

ExprResult Sema::VerifyBitField ( SourceLocation  FieldLoc,
IdentifierInfo FieldName,
QualType  FieldTy,
bool  IsMsStruct,
Expr BitWidth 
)

◆ VerifyIntegerConstantExpression() [1/4]

ExprResult clang::Sema::VerifyIntegerConstantExpression ( Expr E,
AllowFoldKind  CanFold = NoFold 
)
inline

Definition at line 6025 of file Sema.h.

References VerifyIntegerConstantExpression().

◆ VerifyIntegerConstantExpression() [2/4]

ExprResult Sema::VerifyIntegerConstantExpression ( Expr E,
llvm::APSInt *  Result,
unsigned  DiagID,
AllowFoldKind  CanFold = NoFold 
)

Definition at line 17965 of file SemaExpr.cpp.

References Diag(), clang::Result, and VerifyIntegerConstantExpression().

◆ VerifyIntegerConstantExpression() [3/4]

ExprResult Sema::VerifyIntegerConstantExpression ( Expr E,
llvm::APSInt *  Result,
VerifyICEDiagnoser Diagnoser,
AllowFoldKind  CanFold = NoFold 
)

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 17996 of file SemaExpr.cpp.

References Context, clang::CPlusPlus11, clang::ConstantExpr::Create(), DefaultLvalueConversion(), clang::Expr::EvalStatus::Diag, Diag(), clang::Sema::VerifyICEDiagnoser::diagnoseFold(), clang::Sema::VerifyICEDiagnoser::diagnoseNotICE(), clang::Sema::VerifyICEDiagnoser::diagnoseNotICEType(), clang::Expr::EvaluateAsRValue(), clang::Expr::EvaluateKnownConstIntCheckOverflow(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::APValue::getInt(), getLangOpts(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::EvalStatus::HasSideEffects, clang::Type::isEnumeralType(), clang::APValue::isInt(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Note, PerformContextualImplicitConversion(), clang::Result, clang::Sema::VerifyICEDiagnoser::Suppress, and clang::Expr::EvalResult::Val.

Referenced by ActOnCaseExpr(), ActOnChooseExpr(), ActOnCXXNew(), ActOnOpenMPDeclareSimdDirective(), AddAlignedAttr(), AddAlignValueAttr(), BuildBitIntType(), BuildCodeAlignAttr(), BuildStaticAssertDeclaration(), CheckArrayDesignatorExpr(), checkArraySize(), CheckCXXBooleanCondition(), CheckEnumConstant(), CheckLoopHintExpr(), CheckTemplateArgument(), isTupleLike(), VerifyBitField(), VerifyIntegerConstantExpression(), and VerifyPositiveIntegerConstantInClause().

◆ VerifyIntegerConstantExpression() [4/4]

ExprResult Sema::VerifyIntegerConstantExpression ( Expr E,
llvm::APSInt *  Result = nullptr,
AllowFoldKind  CanFold = NoFold 
)

Definition at line 17947 of file SemaExpr.cpp.

References Diag(), LangOpts, clang::Result, and VerifyIntegerConstantExpression().

◆ VerifyPositiveIntegerConstantInClause()

ExprResult Sema::VerifyPositiveIntegerConstantInClause ( Expr Op,
OpenMPClauseKind  CKind,
bool  StrictlyPositive = true,
bool  SuppressExprDiags = false 
)

◆ WarnConflictingTypedMethods()

void Sema::WarnConflictingTypedMethods ( ObjCMethodDecl Method,
ObjCMethodDecl MethodDecl,
bool  IsProtocolMethodDecl 
)

◆ WarnExactTypedMethods()

void Sema::WarnExactTypedMethods ( ObjCMethodDecl Method,
ObjCMethodDecl MethodDecl,
bool  IsProtocolMethodDecl 
)

◆ WarnOnPendingNoDerefs()

void Sema::WarnOnPendingNoDerefs ( ExpressionEvaluationContextRecord Rec)

◆ warnOnReservedIdentifier()

void Sema::warnOnReservedIdentifier ( const NamedDecl D)

◆ warnStackExhausted()

void Sema::warnStackExhausted ( SourceLocation  Loc)

Warn that the stack is nearly exhausted.

Definition at line 503 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 3727 of file Sema.h.

References WeakTopLevelDecl.

Referenced by clang::ParseAST().

Friends And Related Function Documentation

◆ ArgumentPackSubstitutionRAII

friend class ArgumentPackSubstitutionRAII
friend

Definition at line 10558 of file Sema.h.

◆ ASTDeclReader

friend class ASTDeclReader
friend

Definition at line 1169 of file Sema.h.

◆ ASTReader

friend class ASTReader
friend

Definition at line 1168 of file Sema.h.

◆ ASTWriter

friend class ASTWriter
friend

Definition at line 1170 of file Sema.h.

◆ InitializationSequence

friend class InitializationSequence
friend

Definition at line 1167 of file Sema.h.

◆ Parser

friend class Parser
friend

Definition at line 1166 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 9750 of file Sema.h.

Referenced by EmitCurrentDiagnostic(), clang::Sema::SFINAETrap::SFINAETrap(), and clang::Sema::SFINAETrap::~SFINAETrap().

◆ AggregateDeductionCandidates

llvm::DenseMap<unsigned, CXXDeductionGuideDecl *> clang::Sema::AggregateDeductionCandidates

Definition at line 7293 of file Sema.h.

Referenced by DeduceTemplateSpecializationFromInitializer().

◆ AlignPackIncludeStack

SmallVector<AlignPackIncludeState, 8> clang::Sema::AlignPackIncludeStack

Definition at line 1544 of file Sema.h.

Referenced by AddAlignmentAttributesForRecord(), and DiagnoseNonDefaultPragmaAlignPack().

◆ AlignPackStack

PragmaStack<AlignPackInfo> clang::Sema::AlignPackStack

◆ AnalysisWarnings

sema::AnalysisBasedWarnings clang::Sema::AnalysisWarnings

Worker object for performing CFG-based warnings.

Definition at line 1069 of file Sema.h.

Referenced by ActOnBlockStmtExpr(), ActOnEndOfTranslationUnit(), ActOnFinishFunctionBody(), PopFunctionScopeInfo(), and PrintStats().

◆ APINotes

api_notes::APINotesManager clang::Sema::APINotes

Definition at line 1034 of file Sema.h.

Referenced by ProcessAPINotes().

◆ 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 10537 of file Sema.h.

Referenced by clang::TreeTransform< Derived >::AlwaysRebuild(), FindInstantiatedDecl(), and getPackSubstitutedTemplateArgument().

◆ ArrayWithObjectsMethod

ObjCMethodDecl* clang::Sema::ArrayWithObjectsMethod

The declaration of the arrayWithObjects:count: method.

Definition at line 12454 of file Sema.h.

Referenced by BuildObjCArrayLiteral().

◆ BSSSegStack

PragmaStack<StringLiteral *> clang::Sema::BSSSegStack

◆ BumpAlloc

llvm::BumpPtrAllocator clang::Sema::BumpAlloc

Definition at line 988 of file Sema.h.

Referenced by addMethodToGlobalList(), CreateParsedType(), LookupSpecialMember(), and PrintStats().

◆ CachedFunctionScope

std::unique_ptr<sema::FunctionScopeInfo> clang::Sema::CachedFunctionScope

Definition at line 975 of file Sema.h.

Referenced by PushFunctionScope().

◆ CapturingFunctionScopes

unsigned clang::Sema::CapturingFunctionScopes = 0

Track the number of currently active capturing scopes.

Definition at line 986 of file Sema.h.

Referenced by PushBlockScope(), PushCapturedRegionScope(), PushLambdaScope(), and tryCaptureVariable().

◆ CFError

RecordDecl* clang::Sema::CFError = nullptr

The struct behind the CFErrorRef pointer.

Definition at line 11833 of file Sema.h.

Referenced by isCFError().

◆ Cleanup

CleanupInfo clang::Sema::Cleanup

◆ CodeCompleter

CodeCompleteConsumer* clang::Sema::CodeCompleter

Code-completion consumer.

Definition at line 12815 of file Sema.h.

Referenced by AddRecordMembersCompletionResults(), and ProduceSignatureHelp().

◆ CodeSegStack

PragmaStack<StringLiteral *> clang::Sema::CodeSegStack

◆ CodeSynthesisContextLookupModules

SmallVector<Module *, 16> clang::Sema::CodeSynthesisContextLookupModules

Extra modules inspected when performing a lookup during a template instantiation.

Computed lazily.

Definition at line 10488 of file Sema.h.

Referenced by getLookupModules(), and popCodeSynthesisContext().

◆ CodeSynthesisContexts

SmallVector<CodeSynthesisContext, 16> clang::Sema::CodeSynthesisContexts

◆ CollectStats

bool clang::Sema::CollectStats

Flag indicating whether or not to collect detailed statistics.

Definition at line 973 of file Sema.h.

Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings(), and clang::ParseAST().

◆ ConstSegStack

PragmaStack<StringLiteral *> clang::Sema::ConstSegStack

◆ Consumer

ASTConsumer& clang::Sema::Consumer

◆ Context

ASTContext& clang::Sema::Context

Definition at line 1030 of file Sema.h.

Referenced by ActOnAccessSpecifier(), ActOnAddrLabel(), ActOnAliasDeclaration(), ActOnArraySubscriptExpr(), ActOnArrayTypeTrait(), ActOnAtEnd(), ActOnBlockArguments(), ActOnBlockStart(), ActOnBlockStmtExpr(), ActOnBreakStmt(), ActOnBuiltinOffsetOf(), ActOnCapScopeReturnStmt(), ActOnCapturedRegionStart(), ActOnCaseStmt(), ActOnCharacterConstant(), ActOnChooseExpr(), ActOnClassMessage(), ActOnClassPropertyRefExpr(), ActOnClassTemplateSpecialization(), ActOnComment(), ActOnCompatibilityAlias(), ActOnCompoundLiteral(), ActOnCompoundRequirement(), ActOnCompoundStmt(), ActOnConceptDefinition(), ActOnConditionalOp(), ActOnContinueStmt(), ActOnConversionDeclarator(), ActOnCUDAExecConfigExpr(), ActOnCXXBoolLiteral(), ActOnCXXCatchBlock(), ActOnCXXDelete(), ActOnCXXFoldExpr(), ActOnCXXForRangeStmt(), ActOnCXXGlobalScopeSpecifier(), ActOnCXXMemberDeclarator(), ActOnCXXNestedNameSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNestedNameSpecifierIndexedPack(), ActOnCXXNew(), ActOnCXXNullPtrLiteral(), ActOnCXXTryBlock(), ActOnCXXTypeConstructExpr(), ActOnCXXTypeid(), ActOnCXXUuidof(), ActOnDeclStmt(), ActOnDecltypeExpression(), ActOnDecompositionDeclarator(), ActOnDefaultStmt(), ActOnDefs(), actOnDelayedExceptionSpecification(), ActOnDependentIdExpression(), ActOnDependentMemberExpr(), ActOnDependentTag(), ActOnDesignatedInitializer(), ActOnDocumentableDecls(), ActOnDoStmt(), ActOnEmptyDeclaration(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnExceptionDeclarator(), ActOnExplicitInstantiation(), ActOnFields(), ActOnFileScopeAsmDecl(), ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(), ActOnFinishFullExpr(), ActOnFinishFunctionBody(), ActOnFinishFunctionDeclarationDeclarator(), ActOnFinishKNRParamDeclarations(), ActOnFinishSEHFinallyBlock(), ActOnFinishSwitchStmt(), ActOnForStmt(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnGCCAsmStmt(), ActOnGlobalModuleFragmentDecl(), ActOnGNUNullExpr(), ActOnGotoStmt(), ActOnHLSLTopLevelFunction(), ActOnIdExpression(), ActOnIndirectGotoStmt(), ActOnInitializerError(), ActOnInstanceMessage(), ActOnIntegerConstant(), ActOnIvar(), ActOnLabelStmt(), ActOnLambdaClosureQualifiers(), ActOnLastBitfield(), ActOnMemInitializer(), ActOnMemInitializers(), ActOnMethodDeclaration(), ActOnModuleDecl(), ActOnModuleImport(), ActOnMSAsmStmt(), ActOnMSDependentExistsStmt(), ActOnMSVCUnknownTypeName(), ActOnNamespaceAliasDef(), ActOnNoexceptSpec(), ActOnNonTypeTemplateParameter(), ActOnNullStmt(), ActOnNumericConstant(), ActOnObjCAtCatchStmt(), ActOnObjCAtFinallyStmt(), ActOnObjCAtSynchronizedStmt(), ActOnObjCAtTryStmt(), ActOnObjCAutoreleasePoolStmt(), ActOnObjCAvailabilityCheckExpr(), ActOnObjCBoolLiteral(), ActOnObjCBridgedCast(), ActOnObjCForCollectionStmt(), ActOnObjCInstanceType(), actOnObjCProtocolQualifierType(), actOnObjCTypeArgsAndProtocolQualifiers(), actOnObjCTypeArgsOrProtocolQualifiers(), actOnObjCTypeParam(), actOnObjCTypeParamList(), ActOnOMPArraySectionExpr(), ActOnOMPArrayShapingExpr(), ActOnOMPIteratorExpr(), actOnOMPReductionKindClause(), ActOnOpenMPAcqRelClause(), ActOnOpenMPAcquireClause(), ActOnOpenMPAffinityClause(), ActOnOpenMPAlignClause(), ActOnOpenMPAlignedClause(), ActOnOpenMPAllocateClause(), ActOnOpenMPAllocateDirective(), ActOnOpenMPAllocatorClause(), ActOnOpenMPAssumesDirective(), ActOnOpenMPAtClause(), ActOnOpenMPAtomicDefaultMemOrderClause(), ActOnOpenMPAtomicDirective(), ActOnOpenMPBarrierDirective(), ActOnOpenMPBindClause(), ActOnOpenMPCall(), ActOnOpenMPCancelDirective(), ActOnOpenMPCancellationPointDirective(), ActOnOpenMPCaptureClause(), ActOnOpenMPCollapseClause(), ActOnOpenMPCompareClause(), ActOnOpenMPCopyinClause(), ActOnOpenMPCopyprivateClause(), ActOnOpenMPCriticalDirective(), ActOnOpenMPDeclareMapperDirective(), ActOnOpenMPDeclareMapperDirectiveVarDecl(), ActOnOpenMPDeclareReductionDirectiveStart(), ActOnOpenMPDeclareSimdDirective(), ActOnOpenMPDeclareTargetName(), ActOnOpenMPDeclareVariantDirective(), ActOnOpenMPDefaultClause(), ActOnOpenMPDefaultmapClause(), ActOnOpenMPDependClause(), ActOnOpenMPDepobjClause(), ActOnOpenMPDepobjDirective(), ActOnOpenMPDestroyClause(), ActOnOpenMPDetachClause(), ActOnOpenMPDeviceClause(), ActOnOpenMPDispatchDirective(), ActOnOpenMPDistributeDirective(), ActOnOpenMPDistributeParallelForDirective(), ActOnOpenMPDistributeParallelForSimdDirective(), ActOnOpenMPDistributeSimdDirective(), ActOnOpenMPDistScheduleClause(), ActOnOpenMPDoacrossClause(), ActOnOpenMPDynamicAllocatorsClause(), ActOnOpenMPErrorDirective(), ActOnOpenMPExclusiveClause(), ActOnOpenMPFailClause(), ActOnOpenMPFilterClause(), ActOnOpenMPFinalClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPFlushClause(), ActOnOpenMPFlushDirective(), ActOnOpenMPForDirective(), ActOnOpenMPForSimdDirective(), ActOnOpenMPFromClause(), ActOnOpenMPFullClause(), ActOnOpenMPGenericLoopDirective(), ActOnOpenMPGrainsizeClause(), ActOnOpenMPHasDeviceAddrClause(), ActOnOpenMPHintClause(), ActOnOpenMPIdExpression(), ActOnOpenMPIfClause(), ActOnOpenMPInclusiveClause(), ActOnOpenMPInitClause(), ActOnOpenMPInReductionClause(), ActOnOpenMPInteropDirective(), ActOnOpenMPIsDevicePtrClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPLoopInitialization(), ActOnOpenMPMapClause(), ActOnOpenMPMaskedDirective(), ActOnOpenMPMaskedTaskLoopDirective(), ActOnOpenMPMaskedTaskLoopSimdDirective(), ActOnOpenMPMasterDirective(), ActOnOpenMPMasterTaskLoopDirective(), ActOnOpenMPMasterTaskLoopSimdDirective(), ActOnOpenMPMergeableClause(), ActOnOpenMPMessageClause(), ActOnOpenMPNocontextClause(), ActOnOpenMPNogroupClause(), ActOnOpenMPNontemporalClause(), ActOnOpenMPNovariantsClause(), ActOnOpenMPNowaitClause(), ActOnOpenMPNumTasksClause(), ActOnOpenMPNumTeamsClause(), ActOnOpenMPNumThreadsClause(), ActOnOpenMPOrderClause(), ActOnOpenMPOrderedClause(), ActOnOpenMPOrderedDirective(), ActOnOpenMPParallelDirective(), ActOnOpenMPParallelForDirective(), ActOnOpenMPParallelForSimdDirective(), ActOnOpenMPParallelGenericLoopDirective(), ActOnOpenMPParallelMaskedDirective(), ActOnOpenMPParallelMaskedTaskLoopDirective(), ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), ActOnOpenMPParallelMasterDirective(), ActOnOpenMPParallelMasterTaskLoopDirective(), ActOnOpenMPParallelMasterTaskLoopSimdDirective(), ActOnOpenMPParallelSectionsDirective(), ActOnOpenMPPartialClause(), ActOnOpenMPPriorityClause(), ActOnOpenMPPrivateClause(), ActOnOpenMPProcBindClause(), ActOnOpenMPReadClause(), ActOnOpenMPReductionClause(), ActOnOpenMPRegionStart(), ActOnOpenMPRelaxedClause(), ActOnOpenMPReleaseClause(), ActOnOpenMPReverseOffloadClause(), ActOnOpenMPSafelenClause(), ActOnOpenMPScanDirective(), ActOnOpenMPScheduleClause(), ActOnOpenMPScopeDirective(), ActOnOpenMPSectionDirective(), ActOnOpenMPSectionsDirective(), ActOnOpenMPSeqCstClause(), ActOnOpenMPSeverityClause(), ActOnOpenMPSharedClause(), ActOnOpenMPSIMDClause(), ActOnOpenMPSimdDirective(), ActOnOpenMPSimdlenClause(), ActOnOpenMPSingleDirective(), ActOnOpenMPSizesClause(), ActOnOpenMPTargetDataDirective(), ActOnOpenMPTargetDirective(), ActOnOpenMPTargetEnterDataDirective(), ActOnOpenMPTargetExitDataDirective(), ActOnOpenMPTargetParallelDirective(), ActOnOpenMPTargetParallelForDirective(), ActOnOpenMPTargetParallelForSimdDirective(), ActOnOpenMPTargetParallelGenericLoopDirective(), ActOnOpenMPTargetSimdDirective(), ActOnOpenMPTargetTeamsDirective(), ActOnOpenMPTargetTeamsDistributeDirective(), ActOnOpenMPTargetTeamsDistributeParallelForDirective(), ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), ActOnOpenMPTargetTeamsDistributeSimdDirective(), ActOnOpenMPTargetTeamsGenericLoopDirective(), ActOnOpenMPTargetUpdateDirective(), ActOnOpenMPTaskDirective(), ActOnOpenMPTaskgroupDirective(), ActOnOpenMPTaskLoopDirective(), ActOnOpenMPTaskLoopSimdDirective(), ActOnOpenMPTaskReductionClause(), ActOnOpenMPTaskwaitDirective(), ActOnOpenMPTaskyieldDirective(), ActOnOpenMPTeamsDirective(), ActOnOpenMPTeamsDistributeDirective(), ActOnOpenMPTeamsDistributeParallelForDirective(), ActOnOpenMPTeamsDistributeParallelForSimdDirective(), ActOnOpenMPTeamsDistributeSimdDirective(), ActOnOpenMPTeamsGenericLoopDirective(), ActOnOpenMPThreadLimitClause(), ActOnOpenMPThreadsClause(), ActOnOpenMPTileDirective(), ActOnOpenMPToClause(), ActOnOpenMPUnifiedAddressClause(), ActOnOpenMPUnifiedSharedMemoryClause(), ActOnOpenMPUnrollDirective(), ActOnOpenMPUntiedClause(), ActOnOpenMPUpdateClause(), ActOnOpenMPUseClause(), ActOnOpenMPUseDeviceAddrClause(), ActOnOpenMPUseDevicePtrClause(), ActOnOpenMPUsesAllocatorClause(), ActOnOpenMPWeakClause(), ActOnOpenMPWriteClause(), ActOnOpenMPXAttributeClause(), ActOnOpenMPXBareClause(), ActOnOpenMPXDynCGroupMemClause(), ActOnParamDeclarator(), ActOnParenExpr(), ActOnParenListExpr(), ActOnPragmaDetectMismatch(), ActOnPragmaMSComment(), ActOnPragmaMSSeg(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaRedefineExtname(), ActOnPragmaUnused(), ActOnPragmaWeakID(), ActOnPrivateModuleFragmentDecl(), ActOnPropertyImplDecl(), ActOnPseudoDestructorExpr(), ActOnRequiresExpr(), ActOnSEHExceptBlock(), ActOnSEHLeaveStmt(), ActOnSEHTryBlock(), ActOnSizeofParameterPackExpr(), ActOnSourceLocExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberDeclarations(), ActOnStartCXXMemberReference(), ActOnStartExportDecl(), ActOnStartHLSLBuffer(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartOfFunctionDef(), ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), ActOnStartOfObjCMethodDef(), ActOnStartOfSwitchStmt(), ActOnStartProtocolInterface(), ActOnStartRequiresExpr(), ActOnStartTopLevelStmtDecl(), ActOnStringLiteral(), ActOnSuperClassOfClassInterface(), ActOnSuperMessage(), ActOnSuperScopeSpecifier(), ActOnSYCLUniqueStableNameExpr(), ActOnTag(), ActOnTagFinishDefinition(), ActOnTagFinishSkippedDefinition(), ActOnTagTemplateIdType(), ActOnTemplatedFriendTag(), ActOnTemplateIdType(), ActOnTemplateName(), ActOnTemplateParameterList(), ActOnTemplateTemplateParameter(), ActOnTemplateTypeArgument(), ActOnTranslationUnitScope(), ActOnTypedefNameDecl(), ActOnTypenameType(), ActOnTypeParameter(), ActOnTypeRequirement(), ActOnTypeTrait(), ActOnUnevaluatedStringLiteral(), ActOnUninitializedDecl(), ActOnUsingDirective(), ActOnUsingEnumDeclaration(), ActOnVariableDeclarator(), ActOnVarTemplateSpecialization(), ActOnWhileStmt(), AddAlignedAttr(), AddAlignmentAttributesForRecord(), AddAlignValueAttr(), AddAllocAlignAttr(), AddAnnotationAttr(), AddAssumeAlignedAttr(), addBlockPointerConversion(), AddBuiltinAssignmentOperatorCandidates(), AddCFAuditedAttribute(), addFunctionPointerConversion(), addGslOwnerPointerAttributeIfNotExisting(), AddImplicitlyDeclaredMembersToClass(), AddImplicitMSFunctionNoBuiltinAttr(), addImplicitTypedef(), AddInitializerToDecl(), AddKnownFunctionAttributes(), AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), AddModeAttr(), AddMsStructLayoutForRecord(), AddOptnoneAttributeIfNoConflicts(), AddOverriddenMethods(), AddParameterABIAttr(), AddPropertyAttrs(), AddPushedVisibilityAttribute(), AddSectionMSAllocText(), AddSuperSendCompletion(), AddTemplateParametersToLambdaCallOperator(), addThisCompletion(), AdjustAddressSpaceForBuiltinOperandType(), adjustBlockReturnsToEnum(), adjustCCAndNoReturn(), AdjustDestructorExceptionSpec(), clang::TemplateDeclInstantiator::adjustForRewrite(), AdjustFunctionParmAndArgTypesForDeduction(), adjustMemberFunctionCC(), AdjustParameterTypeForObjCAutoRefCount(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeImplicitConversions(), applyObjCTypeArgs(), applyOMPAllocateAttribute(), AreConstraintExpressionsEqual(), areMultiversionVariantFunctionsCompatible(), areVectorTypesSameSize(), AttachBaseSpecifiers(), AttachTypeConstraint(), attemptRecovery(), BuildAddressSpaceAttr(), BuildAddressSpaceIndex(), BuildAnonymousStructOrUnion(), BuildArrayType(), BuildArrayTypeTrait(), BuildAsTypeExpr(), BuildAtomicExpr(), BuildAtomicType(), BuildAttributedStmt(), BuildBaseInitializer(), BuildBinOp(), BuildBitIntType(), BuildBlockForLambdaConversion(), BuildBlockPointerType(), BuildBuiltinBitCastExpr(), BuildBuiltinCallExpr(), BuildBuiltinOffsetOf(), BuildCallExpr(), BuildCaptureField(), BuildClassMessage(), BuildClassMessageImplicit(), buildCoawaitCalls(), BuildCodeAlignAttr(), BuildCompoundLiteralExpr(), BuildConvertedConstantExpression(), BuildCookedLiteralOperatorCall(), BuildCoreturnStmt(), BuildCoroutineBodyStmt(), buildCoroutinePromise(), buildCounterInit(), buildCounterUpdate(), BuildCoyieldExpr(), BuildCStyleCastExpr(), BuildCXXAssumeExpr(), BuildCXXCastArgument(), BuildCXXConstructExpr(), BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), BuildCXXFoldExpr(), BuildCXXForRangeStmt(), BuildCXXFunctionalCastExpr(), BuildCXXNamedCast(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildCXXNoexceptExpr(), BuildCXXThisExpr(), BuildCXXThrow(), BuildCXXTypeConstructExpr(), BuildCXXTypeId(), BuildCXXUuidof(), BuildDeclarationNameExpr(), BuildDeclaratorGroup(), buildDeclareReductionRef(), buildDeclRefExpr(), BuildDeclRefExpr(), BuildDecltypeType(), BuildDelegatingInitializer(), BuildDependentDeclRefExpr(), BuildEmptyCXXFoldExpr(), BuildExceptionDeclaration(), BuildExpressionFromDeclTemplateArgument(), BuildExpressionFromIntegralTemplateArgumentValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), BuildExpressionTrait(), BuildExprRequirement(), BuildExtVectorType(), BuildFieldReferenceExpr(), BuildFloatingLiteral(), BuildFunctionType(), BuildIfStmt(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), BuildInitList(), BuildInstanceMessage(), BuildIvarRefExpr(), BuildLambdaExpr(), buildLambdaInitCaptureInitialization(), BuildMatrixType(), BuildMemberExpr(), BuildMemberInitializer(), BuildMemberPointerType(), BuildMemberReferenceExpr(), buildMemcpyForAssignmentOp(), BuildMemInitializer(), BuildMicrosoftCAnonymousStruct(), BuildModuleInclude(), BuildMSDependentExistsStmt(), BuildMSPropertyRefExpr(), buildNamedType(), BuildNestedRequirement(), BuildObjCArrayLiteral(), BuildObjCAtThrowStmt(), BuildObjCBoxedExpr(), BuildObjCBridgedCast(), BuildObjCDictionaryLiteral(), BuildObjCEncodeExpression(), BuildObjCExceptionDecl(), BuildObjCNumericLiteral(), BuildObjCObjectType(), BuildObjCStringLiteral(), BuildObjCSubscriptExpression(), BuildObjCTypeParamType(), BuildOperatorCoawaitLookupExpr(), BuildPackIndexingExpr(), BuildPackIndexingType(), BuildParenType(), BuildParmVarDeclForTypedef(), BuildPointerType(), buildPostUpdate(), BuildPredefinedExpr(), BuildPseudoDestructorExpr(), BuildQualifiedDeclarationNameExpr(), BuildQualifiedType(), BuildReadPipeType(), BuildReferenceType(), BuildResolvedCallExpr(), BuildResolvedCoawaitExpr(), BuildReturnStmt(), buildSingleCopyAssign(), buildSingleCopyAssignRecursively(), BuildSourceLocExpr(), BuildStaticAssertDeclaration(), BuildStdInitializerList(), BuildStmtExpr(), BuildSYCLUniqueStableNameExpr(), BuildTemplateIdExpr(), BuildTypeConstraint(), buildTypeForLambdaCallOperator(), BuildTypeofExprType(), BuildTypeRequirement(), BuildTypeTrait(), BuildUnaryTransformType(), BuildUnresolvedCoawaitExpr(), buildUserDefinedMapperRef(), BuildUsingDeclaration(), BuildUsingEnumDeclaration(), BuildUsingPackDecl(), BuildUsingShadowDecl(), BuildVAArgExpr(), buildVarDecl(), BuildVariableInstantiation(), BuildVectorLiteral(), BuildVectorType(), BuildWritePipeType(), BuiltinChangeCVRQualifiers(), BuiltinChangeSignedness(), BuiltinDecay(), BuiltinRemoveExtent(), BuiltinRemoveReference(), calculateConstraintSatisfaction(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), CallExprUnaryConversions(), canCaptureVariableByCopy(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), canPassInRegisters(), canThrow(), clang::canTypeidThrow(), CaptureHasSideEffects(), captureInBlock(), captureInCapturedRegion(), captureInLambda(), castForMoving(), CastForMoving(), ChangeIntegralSignedness(), CheckAdditionOperands(), checkAddressOfFunctionIsAvailable(), CheckAddressOfMemberAccess(), CheckAddressOfOperand(), CheckAlignasUnderalignment(), CheckAllArgsHaveFloatRepresentation(), CheckAllocatedType(), CheckAllocationAccess(), checkAPINotesReplacementType(), CheckARCMethodDecl(), checkARCPropertyImpl(), CheckArgsTypesAreCorrect(), checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), checkArmStreamingBuiltin(), checkArrayElementAlignment(), checkArraySize(), CheckAsmLValue(), CheckAssignmentConstraints(), CheckAssignmentOperands(), checkAttributesAfterMerging(), CheckAttrTarget(), CheckBaseClassAccess(), CheckBaseSpecifier(), checkBlockPointerTypesForAssignment(), CheckBoolLikeConversion(), checkBuiltinArgument(), checkBuiltinTemplateIdType(), CheckC23ConstexprInitConversion(), CheckC23ConstexprInitStringLiteral(), CheckC23ConstexprVarType(), CheckCallingConvAttr(), CheckCaseExpression(), CheckCastAlign(), checkClassLevelDLLAttribute(), CheckClassTemplate(), CheckCompareOperands(), CheckComparisonCategoryType(), CheckCompatibleReinterpretCast(), CheckCompletedCoroutineBody(), CheckCompletedCXXClass(), CheckCompleteDecompositionDeclaration(), CheckCompleteDestructorVariant(), CheckCompleteVariableDeclaration(), checkComplexDecomposition(), CheckConceptRedefinition(), CheckConceptTemplateId(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), CheckConditionalOperands(), checkConditionalPointerCompatibility(), checkConstantPointerAuthKey(), CheckConstraintExpression(), CheckConstraintSatisfaction(), CheckConstructor(), CheckConstructorAccess(), CheckConstructorDeclarator(), CheckConversionDeclarator(), CheckCountedByAttr(), CheckCXXThrowOperand(), checkDeclIsAllowedInOpenMPTarget(), CheckDeducedArgumentConstraints(), CheckDeducedPlaceholderConstraints(), CheckDeductionGuideDeclarator(), CheckDependentFunctionTemplateSpecialization(), CheckDerivedToBaseConversion(), CheckDestructorAccess(), CheckDestructorDeclarator(), checkDLLAttributeRedeclaration(), checkEnumArithmeticConversions(), CheckEnumConstant(), CheckEnumRedeclaration(), checkEnumTypesInSwitchStmt(), CheckEquivalentExceptionSpec(), clang::CheckEquivalentExceptionSpecImpl(), checkEscapingByref(), checkExceptionSpecification(), CheckExplicitlyDefaultedComparison(), CheckExplicitlyDefaultedSpecialMember(), CheckExtVectorCast(), CheckExtVectorComponent(), CheckFieldDecl(), CheckFloatComparison(), CheckFloatOrHalfRepresentations(), CheckForConstantInitializer(), CheckForIncompatibleAttributes(), CheckFormatString(), checkFormatStringExpr(), CheckForModifiableLvalue(), checkForMultipleExportedDefaultConstructors(), CheckForNullPointerDereference(), CheckForReference(), CheckFriendAccess(), CheckFunctionCall(), CheckFunctionDeclaration(), checkFunctionOrMethodParameterIndex(), CheckFunctionReturnType(), CheckFunctionTemplateSpecialization(), checkGlobalOrExternCConflict(), CheckHLSLBuiltinFunctionCall(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckImplementationIvars(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), checkInitMethod(), CheckInvalidVLENandLMUL(), CheckKeyForObjCARCConversion(), CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), CheckLiteralType(), CheckLogicalOperands(), CheckLookupAccess(), CheckMain(), CheckMatrixElementwiseOperands(), CheckMatrixMultiplyOperands(), CheckMemberAccess(), checkMemberDecomposition(), CheckMemberOperatorAccess(), CheckMemberSpecialization(), CheckMessageArgumentTypes(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckMoveOnConstruction(), CheckMSVCRTEntryPoint(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionFunction(), CheckMultiVersionValue(), CheckNonNullExpr(), CheckNontrivialField(), CheckNonTypeTemplateParameterType(), checkNullabilityConsistency(), CheckNullabilityTypeSpecifier(), CheckObjCARCUnavailableWeakConversion(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), checkObjCBridgeRelatedComponents(), CheckObjCBridgeRelatedConversions(), CheckObjCCollectionLiteralElement(), CheckObjCConversion(), CheckObjCForCollectionOperand(), checkObjCKindOfType(), CheckObjCMethodOverride(), CheckObjCMethodOverrides(), checkObjCPointerTypesForAssignment(), CheckOMPRequiresDecl(), CheckOMPThreadPrivateDecl(), checkOpenCLEnqueueLocalSizeArgs(), checkOpenCLPipePacketType(), checkOpenMPDeclareVariantFunction(), CheckOpenMPLinearDecl(), checkOpenMPLoop(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CheckOriginalCallArgDeduction(), CheckOverridingFunctionReturnType(), CheckPackExpansion(), CheckParameter(), CheckPlaceholderExpr(), checkPointerAuthKey(), checkPointerAuthValue(), CheckPointerToMemberOperands(), checkPointerTypesForAssignment(), checkPreviousOMPAllocateAttribute(), CheckProtocolMethodDefs(), checkPseudoObjectAssignment(), checkPseudoObjectIncDec(), CheckPtrComparisonWithNullChar(), CheckRealImagOperand(), CheckRegparmAttr(), checkSimdlenSafelenSpecified(), CheckSingleAssignmentConstraints(), CheckSizelessVectorConditionalTypes(), CheckSizelessVectorOperands(), checkSizelessVectorShift(), CheckSpecializationInstantiationRedecl(), CheckSpecifiedExceptionType(), CheckStaticArrayArgument(), CheckStringInit(), CheckStructuredBindingMemberAccess(), CheckSubtractionOperands(), checkSwiftAsyncErrorBlock(), checkTargetAttr(), CheckTargetCausesMultiVersioning(), checkTargetClonesAttrString(), checkTargetVersionAttr(), CheckTautologicalComparison(), CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentList(), CheckTemplateArgumentPointerToMember(), CheckTemplateIdType(), CheckTemplateParameterList(), CheckTemplateTypeArgument(), CheckThreadLocalForLargeAlignment(), checkThreeWayNarrowingConversion(), CheckTransparentUnionArgumentConstraints(), checkTrivialClassMembers(), checkTupleLikeDecomposition(), CheckTypedefForVariablyModifiedType(), checkTypeMappable(), CheckTypenameType(), checkTypeParamListConsistency(), checkTypeSupport(), checkUInt32Argument(), CheckUnaryExprOrTypeTraitOperand(), checkUnknownAnyArg(), CheckUnresolvedLookupAccess(), CheckUnresolvedMemberAccess(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), CheckVariableDeclarationType(), CheckVarTemplateId(), checkVAStartABI(), CheckVectorCast(), CheckVectorCompareOperands(), CheckVectorConditionalTypes(), checkVectorDecomposition(), CheckVectorOperands(), checkVectorResult(), checkVectorShift(), ClassifyName(), CloneDesignatedInitExpr(), CollectFieldInitializer(), CollectIvarsToConstructOrDestruct(), compareConversionFunctions(), CompareDerivedToBaseConversions(), CompareImplicitConversionSequences(), CompareQualificationConversions(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), computeDeclContext(), ComputeDefaultedComparisonExceptionSpec(), ComputeDefaultedSpecialMemberExceptionSpec(), ConstantFoldAttrArgs(), ConvertAPValueToString(), convertArgsForAvailabilityChecks(), ConvertArgumentsForCall(), convertArgumentToType(), convertCallArgsToString(), ConvertDeclSpecToType(), ConvertDeclToDeclGroup(), ConvertDeducedTemplateArgument(), ConvertDeducedTemplateArguments(), ConvertParamDefaultArgument(), convertVector(), copyAttrFromTypedefToDecl(), copyAttrIfPresent(), CopyObject(), CorrectDelayedTyposInBinOp(), CreateAMDGPUFlatWorkGroupSizeAttr(), CreateAMDGPUMaxNumWorkGroupsAttr(), CreateAMDGPUWavesPerEUAttr(), CreateBuiltin(), CreateBuiltinArraySubscriptExpr(), CreateBuiltinBinOp(), CreateBuiltinMatrixSubscriptExpr(), CreateBuiltinUnaryOp(), CreateCapturedStmtRecordDecl(), clang::CodeCompletionResult::CreateCodeCompletionString(), CreateFunctionRefExpr(), CreateGenericSelectionExpr(), CreateLambdaCallOperator(), createLambdaClosureType(), createLambdaInitCaptureVarDecl(), CreateLaunchBoundsAttr(), CreateMaterializeTemporaryExpr(), CreateNewFunctionDecl(), CreatePropertyDecl(), CreateRecoveryExpr(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), createSubstDiag(), clang::concepts::createSubstDiagAt(), CreateUnaryExprOrTypeTraitExpr(), CUDASetLambdaAttrs(), CXXCheckConditionalOperands(), CXXRecordMembersNamed(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), DeclApplyPragmaWeak(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DecomposeUnqualifiedId(), DeduceAutoType(), deduceClosureReturnType(), DeduceFromInitializerList(), DeduceFunctionTypeFromReturnExpr(), DeduceNonTypeTemplateArgument(), DeduceNullPtrTemplateArgument(), deduceOpenCLAddressSpace(), DeduceReturnType(), DeduceTemplateArguments(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateSpecializationFromInitializer(), deduceVarTypeFromInitializer(), DefaultArgumentPromotion(), defaultedSpecialMemberIsConstexpr(), DefaultFunctionArrayConversion(), DefaultLvalueConversion(), DefaultSynthesizeProperties(), DefineDefaultedComparison(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), DefineUsedVTables(), DelayDependentAccess(), clang::InitializationSequence::Diagnose(), DiagnoseAmbiguousLookup(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArrayStarInParamType(), DiagnoseAssignmentEnum(), DiagnoseAssignmentResult(), DiagnoseAvailabilityOfDecl(), DiagnoseBadAccess(), DiagnoseBadConversion(), DiagnoseBadDeduction(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseCommaOperator(), DiagnoseConditionalForNull(), DiagnoseDirectIsaAccess(), DiagnoseDivisionSizeofPointerOrArray(), DiagnoseEqualityWithExtraParens(), DiagnoseFloatingImpCast(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), DiagnoseIntInBoolContext(), DiagnoseInvalidRedeclaration(), diagnoseListInit(), diagnoseMissingImport(), DiagnoseNarrowingInInitList(), DiagnoseNontrivial(), diagnoseNoViableConversion(), diagnoseObjCARCConversion(), DiagnoseObjCImplementedDeprecations(), diagnoseOpenCLTypes(), DiagnosePropertyAccessorMismatch(), DiagnosePropertyMismatch(), diagnoseQualifiedDeclaration(), DiagnoseSentinelCalls(), DiagnoseSizeOfParametersAndReturnValue(), DiagnoseStaticAssertDetails(), diagnoseTautologicalComparison(), DiagnoseTwoPhaseOperatorLookup(), DiagnoseUninitializedUse(), DiagnoseUninstantiableTemplate(), DiagnoseUnknownTemplateName(), DiagnoseUnknownTypeName(), diagnoseUnsatisfiedRequirement(), DiagnoseUnusedDecl(), DiagnoseUnusedExprResult(), DiagnoseUseOfDecl(), DiagnoseUseOfUnimplementedSelectors(), diagnoseVarDeclTypeMismatch(), diagnoseWellFormedUnsatisfiedConstraintExpr(), diagOpenCLBuiltinTypeError(), DiagRecursiveConstraintEval(), DiscardMisalignedMemberAddress(), DoEmitAvailabilityWarning(), doesUsualArrayDeleteWantSize(), DoMarkPotentialCapture(), DoMarkVarDeclReferenced(), EmitCurrentDiagnostic(), EmitRelatedResultTypeNote(), EmitRelatedResultTypeNoteForReturn(), emitReplacement(), EvaluateAndDiagnoseImmediateInvocation(), EvaluateBooleanTypeTrait(), EvaluateStaticAssertMessageAsString(), ExpandAnonymousFieldDesignator(), ExpandFunctionLocalPredefinedMacros(), FillInlineAsmIdentifierInfo(), FilterLookupForScope(), filterNonConflictingPreviousTypedefDecls(), FinalizeDeclaration(), FinalizeDeclaratorGroup(), FinalizeVarWithDestructor(), FindAllocationFunctions(), FindAssociatedClassesAndNamespaces(), FindBaseInitializer(), findCapturingExpr(), FindCompositeObjCPointerType(), FindCompositePointerType(), FindDeallocationFunction(), FindDeallocationFunctionForDestructor(), findDecomposableBaseClass(), findDeleteForPromise(), findFailedBooleanCondition(), findInheritingConstructor(), FindInstantiatedDecl(), findLocallyScopedExternCDecl(), FindUsualDeallocationFunction(), clang::DeclSpec::Finish(), FinishTemplateArgumentDeduction(), FinishTemplateArgumentDeduction(), fitsInto(), FormatStringHasSArg(), funcHasParameterSizeMangling(), GatherArgumentsForCall(), getAmbiguousPathsDisplayString(), getAndVerifyMatrixDimension(), getASTContext(), getBaseMessageSendResultType(), getCCForDeclaratorChunk(), getCompletionPrintingPolicy(), getConstructorName(), clang::TypoCorrectionConsumer::getContext(), getCopyElisionCandidate(), getCudaConfigureFuncName(), getCurrentMangleNumberContext(), getCurrentThisType(), GetDeclSpecTypeForDeclarator(), getDecltypeForExpr(), getDestructorName(), getDestructorTypeForDecltype(), GetDiagForGotoScopeDecl(), getDummyLambdaType(), getElaboratedType(), getFixedEnumPromtion(), GetFullTypeForDeclarator(), getGenericLambdaTemplateParameterList(), getIdentityTemplateArgumentLoc(), getImplicitMethodEPI(), getInheritingConstructorName(), GetKeyForBase(), GetKeyForMember(), getLambdaConversionFunctionCallConv(), getLambdaConversionFunctionResultType(), getLocationOfStringLiteralByte(), getMessageSendResultType(), getMoreSpecialized(), getMoreSpecializedPartialSpecialization(), getMoreSpecializedTemplate(), getNamedReturnInfo(), GetNameFromUnqualifiedId(), getNonOdrUseReasonInCurrentContext(), getNormalizedAssociatedConstraints(), getNSNumberFactoryMethod(), getObjCMessageKind(), getOpenCLEnumType(), getOpenCLKernelParameterType(), getOpenCLTypedefType(), GetOrCreateMSAsmLabel(), getOrCreateStdNamespace(), getParamType(), getPatternForClassTemplateSpecialization(), getPresumedAlignmentOfPointer(), getPrintingPolicy(), GetSignedSizelessVectorType(), GetSignedVectorType(), getStdAlignValT(), getStdBadAlloc(), getStdNamespace(), getSuperIdentifier(), getTemplateArgumentPackExpansionPattern(), getTemplateInstantiationArgs(), getTrivialIntegralTemplateArgument(), getTrivialTemplateArgumentLoc(), getTupleLikeElementType(), GetTypeForDeclaratorCast(), getTypeName(), GetTypeOfFunction(), GetTypeSourceInfoForDeclarator(), getTypeSourceInfoForStdAlignValT(), getVariadicCallType(), handleAbiTagAttr(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), handleAcquireHandleAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAllocSizeAttr(), handleAlwaysInlineAttr(), handleAMDGPUNumSGPRAttr(), handleAMDGPUNumVGPRAttr(), handleAnalyzerNoReturnAttr(), HandleAnnotateTypeAttr(), handleAnyX86InterruptAttr(), handleAPINotedRetainCountAttribute(), handleArgumentWithTypeTagAttr(), handleArmBuiltinAliasAttr(), handleARMInterruptAttr(), handleArmNewAttr(), HandleArmSveVectorBitsTypeAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAttrWithMessage(), handleAvailabilityAttr(), handleBlocksAttr(), handleBPFPreserveAccessIndexAttr(), handleBPFPreserveAIRecord(), handleBTFDeclTagAttr(), HandleBTFTypeTagAttribute(), handleBuiltinAliasAttr(), handleCallableWhenAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCalledOnceAttr(), handleCapabilityAttr(), handleCFGuardAttr(), handleCleanupAttr(), handleCmseNSEntryAttr(), handleCodeModelAttr(), handleCommonAttr(), handleComplexConversion(), handleComplexFloatConversion(), handleComplexIntConversion(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleCountedByAttr(), handleCPUSpecificAttr(), handleCXXAssumeAttr(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), HandleDependentAccessCheck(), handleDeprecatedAttr(), handleDestructorAttr(), handleDeviceAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnforceTCBAttr(), handleEnumExtensibilityAttr(), handleExclusiveTrylockFunctionAttr(), HandleExprPropertyRefExpr(), handleExternalSourceSymbolAttr(), handleFallThroughAttr(), HandleField(), handleFixedPointConversion(), handleFloatConversion(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionReturnThunksAttr(), handleFunctionTypeAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHandleAttr(), handleHLSLNumThreadsAttr(), handleHLSLSV_DispatchThreadIDAttr(), handleIBOutlet(), handleIBOutletCollection(), handleIFuncAttr(), HandleImmediateInvocations(), handleInitPriorityAttr(), handleIntegerConversion(), handleInterruptAttr(), handleIntToFloatConversion(), handleLambdaNumbering(), handleLayoutVersion(), handleLifetimeCategoryAttr(), handleLikely(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLoopHintAttr(), handleM68kInterruptAttr(), handleManagedAttr(), handleMinVectorWidthAttr(), handleMipsInterruptAttr(), handleMSConstexprAttr(), handleMSP430InterruptAttr(), handleMSPointerTypeQualifierAttr(), HandleMSProperty(), handleMustTailAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoBuiltinAttr(), handleNoDebugAttr(), handleNoEscapeAttr(), handleNoInlineAttr(), handleNoMergeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoRandomizeLayoutAttr(), handleNoReturnAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleNoUniqueAddressAttr(), handleNSErrorDomain(), handleObjCBoxable(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCGCTypeAttr(), handleObjCIndependentClass(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipTypeAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRuntimeName(), handleObjCSuppresProtocolAttr(), handleOMPAssumeAttr(), HandleOpenCLAccessAttr(), handleOpenCLAccessAttr(), handleOpenCLUnrollHint(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handlePreferredName(), handlePreferredTypeAttr(), HandlePropertyInClassExtension(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleRandomizeLayoutAttr(), handlerCanCatch(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleRestrictAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), handleRISCVInterruptAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedAttr(), handleSharedTrylockFunctionAttr(), handleSimpleAttribute(), handleStandardNoReturnAttr(), handleSubGroupSize(), handleSuppressAttr(), handleSwiftAsyncAttr(), handleSwiftAsyncError(), handleSwiftAsyncName(), handleSwiftAttrAttr(), handleSwiftBridge(), handleSwiftError(), handleSwiftName(), handleSwiftNewType(), handleTagNumbering(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUninitializedAttr(), handleUnlikely(), handleUnsafeBufferUsage(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWebAssemblyExportNameAttr(), HandleWebAssemblyFuncrefAttr(), handleWebAssemblyImportModuleAttr(), handleWebAssemblyImportNameAttr(), handleWorkGroupSize(), handleX86ForceAlignArgPointerAttr(), handleXRayLogArgsAttr(), handleZeroCallUsedRegsAttr(), hasAcceptableDefinition(), hasDeducibleTemplateParameters(), hasMergedDefinitionInCurrentModule(), hasVisibleMergedDefinition(), IgnoredValueConversions(), ImpCastExprToType(), ImplicitlyDefineFunction(), inferARCLifetimeForPointee(), inferARCWriteback(), inferCUDATargetForImplicitSpecialMember(), inferGslOwnerPointerAttribute(), inferGslPointerAttribute(), inferObjCARCLifetime(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), Initialize(), InitializeExplicitObjectArgument(), clang::InitializationSequence::InitializeFrom(), InjectAnonymousStructOrUnionMembers(), InsertOCLBuiltinDeclarationsFromTable(), InstantiateAttrs(), InstantiateAttrsForDecl(), InstantiateClass(), InstantiateClassMembers(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), InstantiateDefaultCtorDefaultArgs(), InstantiateEnum(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), instantiateOMPDeclareVariantAttr(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), InstantiateVariableDefinition(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), InventAbbreviatedTemplateParameterTypeName(), InventTemplateParameter(), clang::TreeTransform< Derived >::InventTypeSourceInfo(), isAbstractType(), isAcceptableNestedNameSpecifier(), isAllowableExplicitConversion(), isArithmeticArgumentPromotion(), IsAtLeastAsConstrained(), isAtLeastAsSpecializedAs(), clang::isBetterOverloadCandidate(), isDefaultStdCall(), IsEquivalentForUsingDecl(), IsFloatingPointConversion(), isForbiddenTypeAllowed(), isFunctionDefinitionDiscarded(), IsImplicitBoolFloatConversion(), isIncompatibleTypedef(), isIncompleteOrZeroLengthArrayType(), IsInvalidCmseNSCallConversion(), IsInvalidSMECallConversion(), isKnownName(), isLaxVectorConversion(), isLibstdcxxEagerExceptionSpecHack(), isMemberAccessibleForDeletion(), isMicrosoftMissingTypename(), isMoreSpecializedThanPrimary(), isNonNegativeIntegerValue(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isOpenMPDeclareMapperVarDeclAllowed(), isOpenMPPrivateDecl(), IsOverloadOrOverrideImpl(), isPermittedNeonBaseType(), isRelevantAttr(), isSameOrCompatibleFunctionType(), IsSimplyAccessible(), IsStandardConversion(), IsStringInit(), IsStringLiteralToNonConstPointerConversion(), isTemplateName(), isTemplateTemplateParameterAtLeastAsSpecializedAs(), isTupleLike(), IsUserDefinedConversion(), isValidInteropVariable(), isValidSectionSpecifier(), isValidVarArgType(), IsVectorConversion(), IsVectorElementConversion(), LazilyCreateBuiltin(), LookupBuiltin(), LookupConstructors(), lookupCoroutineHandleType(), LookupDirect(), LookupInlineAsmField(), LookupInlineAsmVarDeclField(), LookupInSuper(), LookupLiteralOperator(), LookupMemberExpr(), LookupMethodInReceiverType(), clang::LookupNamed(), clang::LookupNamespace(), LookupObjCInterfaceDeclForLiteral(), LookupOrCreateLabel(), LookupOverloadedOperatorName(), LookupPredefedObjCSuperType(), lookupPromiseType(), LookupQualifiedName(), LookupSpecialMember(), LookupStdSourceLocationImpl(), lookupStdTypeTraitMember(), makeLaunchBoundsArgExpr(), makeMergedDefinitionVisible(), makeQualifiedLValueReferenceType(), makeUnavailableInSystemHeader(), MarkBaseAndMemberDestructorsReferenced(), MarkDeducedTemplateParameters(), MarkFunctionReferenced(), MarkUsedTemplateParameters(), MarkVarDeclODRUsed(), MarkVirtualBaseDestructorsReferenced(), MarkVTableUsed(), MatchTemplateParameterKind(), MatchTemplateParametersToScopeSpecifier(), MatchTwoMethodDeclarations(), maybeAddCUDAHostDeviceAttrs(), MaybeAddOverrideCalls(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), MaybeEmitAmbiguousAtomicConstraintsDiagnostic(), maybeExtendBlockObject(), mergeAlignedAttrs(), mergeAlwaysInlineAttr(), mergeAvailabilityAttr(), mergeBTFDeclTagAttr(), mergeCodeSegAttr(), MergeCompatibleFunctionDecls(), mergeDeclAttribute(), mergeDeclAttributes(), mergeDLLExportAttr(), mergeDLLImportAttr(), mergeErrorAttr(), mergeFormatAttr(), MergeFunctionDecl(), mergeHLSLNumThreadsAttr(), mergeHLSLParamModifierAttr(), mergeHLSLShaderAttr(), mergeImportModuleAttr(), mergeImportNameAttr(), mergeInterfaceMethodToImpl(), mergeInternalLinkageAttr(), mergeMinSizeAttr(), mergeMSInheritanceAttr(), mergeObjCDirectMembers(), mergeOptimizeNoneAttr(), mergeParamDeclAttributes(), mergeParamDeclTypes(), mergeSectionAttr(), mergeSwiftNameAttr(), MergeTypedefNameDecl(), mergeTypeNullabilityForRedecl(), mergeUuidAttr(), MergeVarDeclExceptionSpecs(), MergeVarDeclTypes(), mergeVisibilityAttr(), MightInstantiateTo(), NoteIndirectBases(), NoteSurrogateCandidate(), OpenCLArithmeticConversions(), OpenCLConvertScalarsToVectors(), ParsedFreeStandingDeclSpec(), parseModeAttrArg(), ParseObjCEncodeExpression(), ParseObjCProtocolExpression(), ParseObjCSelectorExpression(), ParseObjCStringLiteral(), ParseTypedefDecl(), PDiag(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformImplicitConversion(), PerformMoveOrCopyInitialization(), PerformObjectMemberConversion(), PerformPendingInstantiations(), PreferredConditionType(), PrepareArgumentsForCallToObjectOfClassType(), PrepareScalarCast(), prepareVectorSplat(), PrintInstantiationStack(), ProcessAPINotes(), ProcessAPINotes(), ProcessDeclAttribute(), processImplicitMapsWithDefaultMappers(), ProcessOpenMPDoacrossClauseCommon(), ProcessPropertyDecl(), ProcessStmtAttribute(), PushCapturedRegionScope(), clang::TreeTransform< Derived >::RebuildArrayType(), clang::TreeTransform< Derived >::RebuildAutoType(), clang::TreeTransform< Derived >::RebuildBitIntType(), clang::TreeTransform< Derived >::RebuildConstantMatrixType(), clang::TreeTransform< Derived >::RebuildCXXInheritedCtorInitExpr(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), RebuildDeclaratorInCurrentInstantiation(), clang::TreeTransform< Derived >::RebuildDeducedTemplateSpecializationType(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::RebuildElaboratedType(), clang::TreeTransform< Derived >::RebuildEnumType(), clang::TreeTransform< Derived >::RebuildExtVectorType(), clang::TreeTransform< Derived >::RebuildFunctionNoProtoType(), clang::TreeTransform< Derived >::RebuildImplicitValueInitExpr(), clang::TreeTransform< Derived >::RebuildMacroQualifiedType(), RebuildNestedNameSpecifierInCurrentInstantiation(), clang::TreeTransform< Derived >::RebuildObjCObjectPointerType(), clang::TreeTransform< Derived >::RebuildPackExpansion(), rebuildPotentialResultsAsNonOdrUsed(), clang::TreeTransform< Derived >::RebuildQualifiedType(), clang::TreeTransform< Derived >::RebuildRecordType(), clang::TreeTransform< Derived >::RebuildRequiresExpr(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), clang::TreeTransform< Derived >::RebuildSizeOfPackExpr(), clang::TreeTransform< Derived >::RebuildTemplateName(), clang::TreeTransform< Derived >::RebuildTypedefType(), clang::TreeTransform< Derived >::RebuildTypeOfType(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), clang::TreeTransform< Derived >::RebuildUsingType(), clang::TreeTransform< Derived >::RebuildVectorType(), recordConversion(), recoverFromTypeInKnownDependentBase(), recreateSyntacticForm(), ReferenceDllExportedMembers(), RefersToMemberWithReducedAlignment(), RegisterLocallyScopedExternCDecl(), RemoveAddressSpaceFromPtr(), repeatForLambdaConversionFunctionCallingConvs(), RequireCompleteDeclContext(), RequireLiteralType(), RequireNonAbstractType(), RequireStructuralType(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), clang::LookupResult::resolveKind(), ResolveOverloadedFunctionForReferenceBinding(), ResolveOverloadForDeduction(), SaveNestedNameSpecifierAnnotation(), SelectPropertyForSynthesisFromProtocols(), Sema(), SemaBuiltinAlignment(), SemaBuiltinCallWithStaticChain(), SemaBuiltinCommitRWPipe(), SemaBuiltinDumpStruct(), SemaBuiltinLaunder(), SemaBuiltinReserveRWPipe(), SemaBuiltinRWPipe(), SemaBuiltinShuffleVector(), SemaConvertVectorExpr(), SemaOpenCLBuiltinEnqueueKernel(), SemaOpenCLBuiltinToAddr(), SemaPointerAuthBlendDiscriminator(), SemaPointerAuthSignGenericData(), SetCtorInitializers(), SetDelegatingInitializer(), SetElementTypeAsReturnType(), SetEligibleMethods(), SetIvarInitializers(), SetNestedNameSpecifier(), setTagNameForLinkagePurposes(), clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed(), shouldAddReversedEqEq(), ShouldDeleteSpecialMember(), ShouldDiagnoseAvailabilityInContext(), ShouldDiagnoseSwitchCaseNotInEnum(), ShouldRemoveFromUnused(), ShouldTryAgainWithRedefinitionType(), ShouldWarnIfUnusedFileScopedDecl(), SpecialMemberIsTrivial(), stripARCUnbridgedCast(), SubstAutoType(), SubstAutoTypeSourceInfo(), SubstBaseSpecifiers(), SubstDefaultArgument(), clang::TemplateDeclInstantiator::SubstDefaultedFunction(), SubstDefaultTemplateArgumentIfAvailable(), SubstFunctionDeclType(), SubstituteExplicitTemplateArguments(), substituteParameterMappings(), SubstParmVarDecl(), SubstSpaceshipAsEqualEqual(), clang::TemplateDeclInstantiator::SubstTemplateParams(), SubstType(), threadSafetyCheckIsSmartPointer(), transferARCOwnershipToDeclaratorChunk(), transferARCOwnershipToDeclSpec(), clang::TreeTransform< Derived >::TransformAttributedType(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::TransformExceptionSpec(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), clang::transformOMPMappableExprListClause(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::TreeTransform< Derived >::TransformType(), clang::TreeTransform< Derived >::TransformTypeWithDeducedTST(), translateTemplateArgument(), tryCaptureOpenMPLambdas(), tryCaptureVariable(), TryConstructorInitialization(), TryContextuallyConvertToBool(), TryContextuallyConvertToObjCPointer(), TryDefaultInitialization(), TryDiagnoseProtectedAccess(), tryExprAsCall(), tryGCCVectorConvertAndSplat(), TryImplicitConversion(), TryInitializerListConstruction(), TryListConversion(), TryListInitialization(), tryObjCWritebackConversion(), TryObjectArgumentInitialization(), TryOCLSamplerInitialization(), TryOrBuildParenListInitialization(), TryReferenceInit(), TryReferenceInitialization(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), tryResolveExplicitSpecifier(), clang::ConversionFixItGenerator::tryToFixConversion(), tryToFixVariablyModifiedVarType(), TryUserDefinedConversion(), TryValueInitialization(), tryVectorConvertAndSplat(), UnifySection(), unsupportedTypeConversion(), UpdateExceptionSpec(), UsualArithmeticConversions(), UsualUnaryConversions(), VariableCanNeverBeAConstantExpression(), VerifyBitField(), VerifyIntegerConstantExpression(), verifyValidIntegerConstantExpr(), clang::TemplateDeclInstantiator::VisitBaseUsingDecls(), clang::UsedDeclVisitor< Derived >::VisitCXXDeleteExpr(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), WarnExactTypedMethods(), warnOnReservedIdentifier(), widenIterationCount(), clang::ASTWriter::WriteAST(), and ~Sema().

◆ CurContext

DeclContext* clang::Sema::CurContext

CurContext - This is the current declaration context of parsing.

Definition at line 1163 of file Sema.h.

Referenced by ActOnAccessSpecifier(), ActOnAliasDeclaration(), ActOnAnnotModuleBegin(), ActOnAnnotModuleEnd(), ActOnAnnotModuleInclude(), ActOnAtEnd(), ActOnBlockStart(), ActOnCapScopeReturnStmt(), ActOnCapturedRegionStart(), ActOnClassTemplateSpecialization(), ActOnCompatibilityAlias(), ActOnCompoundRequirement(), ActOnConceptDefinition(), ActOnCoroutineBodyStart(), ActOnCXXMemberDeclarator(), ActOnCXXThis(), ActOnDecompositionDeclarator(), ActOnEmptyDeclaration(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnExitFunctionContext(), ActOnExplicitInstantiation(), ActOnFileScopeAsmDecl(), ActOnFinishCXXMemberDecls(), ActOnFinishFullExpr(), ActOnFinishRequiresExpr(), ActOnForwardClassDeclaration(), ActOnForwardProtocolDeclaration(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnIfStmt(), ActOnIvar(), ActOnLambdaExpressionAfterIntroducer(), ActOnLastBitfield(), ActOnMethodDeclaration(), ActOnModuleDecl(), ActOnModuleImport(), ActOnMSVCUnknownTypeName(), ActOnNamespaceAliasDef(), ActOnObjCContainerStartDefinition(), ActOnObjCTemporaryExitContainerContext(), actOnObjCTypeParam(), ActOnOMPIteratorExpr(), actOnOMPReductionKindClause(), ActOnOpenMPAllocateClause(), ActOnOpenMPAssumesDirective(), ActOnOpenMPAtomicDirective(), ActOnOpenMPDeclareReductionCombinerStart(), ActOnOpenMPDeclareReductionInitializerStart(), ActOnOpenMPDeviceClause(), ActOnOpenMPDispatchDirective(), ActOnOpenMPDistributeDirective(), ActOnOpenMPDistributeParallelForDirective(), ActOnOpenMPDistributeParallelForSimdDirective(), ActOnOpenMPDistributeSimdDirective(), ActOnOpenMPDistScheduleClause(), ActOnOpenMPExecutableDirective(), ActOnOpenMPFilterClause(), ActOnOpenMPFinalClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPForDirective(), ActOnOpenMPForSimdDirective(), ActOnOpenMPGenericLoopDirective(), ActOnOpenMPHasDeviceAddrClause(), ActOnOpenMPIfClause(), ActOnOpenMPLastprivateClause(), ActOnOpenMPLinearClause(), ActOnOpenMPMaskedTaskLoopDirective(), ActOnOpenMPMaskedTaskLoopSimdDirective(), ActOnOpenMPMasterTaskLoopDirective(), ActOnOpenMPMasterTaskLoopSimdDirective(), ActOnOpenMPNocontextClause(), ActOnOpenMPNovariantsClause(), ActOnOpenMPNumTeamsClause(), ActOnOpenMPNumThreadsClause(), ActOnOpenMPParallelForDirective(), ActOnOpenMPParallelForSimdDirective(), ActOnOpenMPParallelGenericLoopDirective(), ActOnOpenMPParallelMaskedTaskLoopDirective(), ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), ActOnOpenMPParallelMasterTaskLoopDirective(), ActOnOpenMPParallelMasterTaskLoopSimdDirective(), ActOnOpenMPPrivateClause(), ActOnOpenMPRegionStart(), ActOnOpenMPRequiresDirective(), ActOnOpenMPScheduleClause(), ActOnOpenMPSharedClause(), ActOnOpenMPSimdDirective(), ActOnOpenMPTargetParallelForDirective(), ActOnOpenMPTargetParallelForSimdDirective(), ActOnOpenMPTargetParallelGenericLoopDirective(), ActOnOpenMPTargetSimdDirective(), ActOnOpenMPTargetTeamsDistributeDirective(), ActOnOpenMPTargetTeamsDistributeParallelForDirective(), ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), ActOnOpenMPTargetTeamsDistributeSimdDirective(), ActOnOpenMPTargetTeamsGenericLoopDirective(), ActOnOpenMPTaskLoopDirective(), ActOnOpenMPTaskLoopSimdDirective(), ActOnOpenMPTeamsDistributeDirective(), ActOnOpenMPTeamsDistributeParallelForDirective(), ActOnOpenMPTeamsDistributeParallelForSimdDirective(), ActOnOpenMPTeamsDistributeSimdDirective(), ActOnOpenMPTeamsGenericLoopDirective(), ActOnOpenMPThreadLimitClause(), ActOnOpenMPThreadprivateDirective(), ActOnOpenMPTileDirective(), ActOnOpenMPUnrollDirective(), ActOnOpenMPUseDevicePtrClause(), ActOnOpenMPXDynCGroupMemClause(), ActOnPragmaFloatControl(), ActOnPragmaMSAllocText(), ActOnPragmaMSFunction(), ActOnPragmaMSOptimize(), ActOnProperty(), ActOnPropertyImplDecl(), ActOnReenterFunctionContext(), ActOnSEHTryBlock(), ActOnSourceLocExpr(), ActOnStartCategoryImplementation(), ActOnStartCategoryInterface(), ActOnStartClassImplementation(), ActOnStartClassInterface(), ActOnStartCXXMemberDeclarations(), ActOnStartCXXMemberReference(), ActOnStartExportDecl(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartProtocolInterface(), ActOnStartRequiresExpr(), ActOnStartTopLevelStmtDecl(), ActOnTag(), ActOnTagFinishSkippedDefinition(), ActOnTagStartSkippedDefinition(), ActOnTemplatedFriendTag(), ActOnTypedefDeclarator(), ActOnUsingDirective(), ActOnVariableDeclarator(), ActOnVarTemplateSpecialization(), AddClassMessageCompletions(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), AddOverrideResults(), BuildBaseInitializer(), BuildBlockForLambdaConversion(), buildCapture(), BuildCompoundLiteralExpr(), buildCoroutineParameterMoves(), buildCoroutinePromise(), BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), BuildCXXNestedNameSpecifier(), buildDeclareReductionRef(), BuildDelegatingInitializer(), buildDistanceFunc(), BuildExceptionDeclaration(), BuildFieldReferenceExpr(), BuildInstanceMessage(), BuildIvarRefExpr(), BuildLambdaExpr(), buildLoopVarFunc(), BuildMicrosoftCAnonymousStruct(), BuildObjCExceptionDecl(), BuildPredefinedExpr(), BuildReturnStmt(), buildSingleCopyAssignRecursively(), BuildStaticAssertDeclaration(), buildUserDefinedMapperRef(), BuildUsingDeclaration(), BuildUsingEnumDeclaration(), BuildUsingPackDecl(), BuildUsingShadowDecl(), BuildVAArgExpr(), buildVarDecl(), CanUseDecl(), CheckAccess(), checkAllocateClauses(), checkAndRewriteMustTailAttr(), CheckClassTemplate(), CheckCompareOperands(), CheckConstructorAccess(), checkCoroutineContext(), CheckDeductionGuideDeclarator(), CheckExplicitInstantiationScope(), CheckFriendAccess(), CheckFunctionDeclaration(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckInheritingConstructorUsingDecl(), CheckMultiVersionAdditionalDecl(), CheckNakedParmReference(), checkNoThrow(), CheckObjCDeclScope(), checkOpenMPIterationSpace(), checkOpenMPLoop(), CheckTemplateArgument(), CheckTemplateIdType(), CheckTemplateSpecializationScope(), checkTypeMappable(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), CheckVariableDeclarationType(), checkVAStartIsInVariadicFunction(), computeDeclContext(), ConvertDeducedTemplateArgument(), CreateCapturedStmtRecordDecl(), createLambdaClosureType(), CreateNewFunctionDecl(), CurrentCUDATarget(), DeclApplyPragmaWeak(), DeduceTemplateArguments(), clang::InitializationSequence::Diagnose(), DiagnoseDependentMemberLookup(), DiagnoseEmptyLookup(), diagnoseQualifiedDeclaration(), DiagnoseTwoPhaseLookup(), diagnoseUncapturableValueReferenceOrBinding(), DiagnoseUseOfDecl(), DoMarkPotentialCapture(), EmitRelatedResultTypeNoteForReturn(), EndOpenMPDSABlock(), EnterDeclaratorContext(), clang::PreferredTypeBuilder::enterReturn(), ExitDeclaratorContext(), ExpandFunctionLocalPredefinedMacros(), FilterUsingLookup(), FindInstantiatedDecl(), FinishForRangeVarDecl(), forRedeclarationInCurContext(), getCurBlock(), getCurLambda(), getCurLexicalContext(), getCurrentClass(), getCurrentInstantiationOf(), getCurrentMangleNumberContext(), getCurrentThisType(), GetDeclSpecTypeForDeclarator(), getEnclosingLambda(), getFunctionLevelDeclContext(), getFunctionStorageClass(), GetNameFromUnqualifiedId(), getNullabilityCompletenessCheckFileID(), getObjCContainerKind(), getObjCDeclContext(), HandleDeclarator(), HandlePropertyInClassExtension(), hasUncompilableErrorOccurred(), InstantiateInClassInitializer(), InstantiateMemInitializers(), isCapturingReferenceToHostVarInCUDADeviceLambda(), isCurrentClassNameTypo(), IsInsideALocalClassWithinATemplateFunction(), isLibstdcxxEagerExceptionSpecHack(), isMicrosoftMissingTypename(), isNonNegativeIntegerValue(), isOdrUseContext(), isOpenMPCapturedDecl(), isReferenceToNonConstCapture(), isSelfExpr(), IsSimplyAccessible(), IsUsingDirectiveInToplevelContext(), isValidCoroutineContext(), LazilyCreateBuiltin(), LookupMethodInReceiverType(), LookupOrCreateLabel(), makeUnavailableInSystemHeader(), mapCodeCompletionContext(), MarkFunctionReferenced(), MarkVarDeclODRUsed(), MarkVTableUsed(), MaybeAddOverrideCalls(), MergeTypedefNameDecl(), ParsedFreeStandingDeclSpec(), ParseTypedefDecl(), PopDeclContext(), ProcessOpenMPDoacrossClauseCommon(), PushDeclContext(), PushOnScopeChains(), clang::TreeTransform< Derived >::RebuildExceptionDecl(), recoverFromMSUnqualifiedLookup(), recoverFromTypeInKnownDependentBase(), ShouldEnterDeclaratorScope(), SubstParmVarDecl(), tryCaptureOpenMPLambdas(), tryCaptureVariable(), tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs(), TryTypoCorrectionForCall(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and warnAboutAmbiguousFunction().

◆ CurCUDATargetCtx

struct clang::Sema::CUDATargetContext clang::Sema::CurCUDATargetCtx

◆ CurFPFeatures

FPOptions clang::Sema::CurFPFeatures

◆ CurInitSeg

StringLiteral* clang::Sema::CurInitSeg

Last section used with #pragma init_seg.

Definition at line 1587 of file Sema.h.

Referenced by ActOnPragmaMSInitSeg(), and CheckCompleteVariableDeclaration().

◆ CurInitSegLoc

SourceLocation clang::Sema::CurInitSegLoc

Definition at line 1588 of file Sema.h.

Referenced by ActOnPragmaMSInitSeg(), and CheckCompleteVariableDeclaration().

◆ CurrentInstantiationScope

LocalInstantiationScope* clang::Sema::CurrentInstantiationScope

◆ 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 7290 of file Sema.h.

Referenced by PerformCopyInitialization().

◆ CurrentSEHFinally

SmallVector<Scope *, 2> clang::Sema::CurrentSEHFinally

Stack of active SEH __finally scopes. Can be empty.

Definition at line 8733 of file Sema.h.

Referenced by ActOnAbortSEHFinallyBlock(), ActOnFinishSEHFinallyBlock(), ActOnStartSEHFinallyBlock(), and CheckJumpOutOfSEHFinally().

◆ 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 6782 of file Sema.h.

Referenced by ClassifyImplicitMemberAccess(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), getCurrentThisType(), isThisOutsideMemberFunctionBody(), and clang::Sema::CXXThisScopeRAII::~CXXThisScopeRAII().

◆ CXXTypeInfoDecl

RecordDecl* clang::Sema::CXXTypeInfoDecl

The C++ "type_info" declaration, which is defined in <typeinfo>.

Definition at line 6714 of file Sema.h.

Referenced by ActOnCXXTypeid().

◆ DataSegStack

PragmaStack<StringLiteral *> clang::Sema::DataSegStack

◆ DeclareRISCVSiFiveVectorBuiltins

bool clang::Sema::DeclareRISCVSiFiveVectorBuiltins = false

Indicate RISC-V SiFive vector builtin functions enabled or not.

Definition at line 13057 of file Sema.h.

Referenced by LookupBuiltin().

◆ DeclareRISCVVBuiltins

bool clang::Sema::DeclareRISCVVBuiltins = false

Indicate RISC-V vector builtin functions enabled or not.

Definition at line 13054 of file Sema.h.

Referenced by LookupBuiltin().

◆ DeferDiags

bool clang::Sema::DeferDiags = false

Whether deferrable diagnostics should be deferred.

Definition at line 8156 of file Sema.h.

Referenced by Diag().

◆ DelayedDiagnostics

◆ DelayedDllExportClasses

SmallVector<CXXRecordDecl *, 4> clang::Sema::DelayedDllExportClasses

◆ DelayedDllExportMemberFunctions

SmallVector<CXXMethodDecl *, 4> clang::Sema::DelayedDllExportMemberFunctions

◆ 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 5058 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXMemberDecls(), CheckDelayedMemberExceptionSpecs(), 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 5050 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXMemberDecls(), CheckDelayedMemberExceptionSpecs(), 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 4973 of file Sema.h.

Referenced by CheckDelegatingCtorCycles(), and SetDelegatingInitializer().

◆ DeleteExprs

llvm::MapVector<FieldDecl *, DeleteLocs> clang::Sema::DeleteExprs

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 6725 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and getMismatchingDeleteExpressions().

◆ DeviceDeferredDiags

llvm::DenseMap<CanonicalDeclPtr<const 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 13094 of file Sema.h.

Referenced by clang::Sema::SemaDiagnosticBuilder::AddFixItHint(), emitDeferredDiags(), hasUncompilableErrorOccurred(), clang::Sema::SemaDiagnosticBuilder::operator<<(), and clang::Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder().

◆ DeviceKnownEmittedFns

llvm::DenseMap< CanonicalDeclPtr<const 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 13115 of file Sema.h.

Referenced by emitCallStackNotes().

◆ Diags

DiagnosticsEngine& clang::Sema::Diags

Definition at line 1032 of file Sema.h.

Referenced by ActOnCompoundStmt(), ActOnCXXMemberDeclarator(), ActOnDocumentableDecls(), ActOnDoStmt(), ActOnEndOfTranslationUnit(), ActOnForStmt(), ActOnFriendFunctionDecl(), ActOnIfStmt(), ActOnWhileStmt(), AddInitializerToDecl(), applyCocoaAPICheck(), BuildDeclRefExpr(), BuildInstanceMessage(), BuildIvarRefExpr(), BuildResolvedCallExpr(), CheckAssignmentOperands(), CheckCompatibleReinterpretCast(), CheckConditionalOperator(), CheckConstexprFunctionBody(), CheckCXX98CompatAccessibleCopy(), CheckForDuplicateEnumValues(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckShadow(), checkUnsafeExprAssigns(), CUDADiagIfDeviceCode(), CUDADiagIfHostCode(), Diag(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAbstractType(), clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), DiagnoseAssignmentEnum(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseEmptyLoopBody(), DiagnoseForRangeVariableCopies(), DiagnoseHiddenVirtualMethods(), DiagnoseMismatchedSelectors(), DiagnoseMultipleMethodInGlobalPool(), DiagnoseNullConversion(), DiagnoseSelfMove(), diagnoseSubtractionOnNullPointer(), DiagnoseUnusedBackingIvarInAccessor(), diagnoseZeroToNullptrConversion(), emitCallStackNotes(), EmitCurrentDiagnostic(), EvaluateStaticAssertMessageAsString(), getDiagnostics(), getNullabilityCompletenessCheckFileID(), getShadowedDeclaration(), ImplicitlyDefineFunction(), LookupMemberExpr(), clang::OverloadCandidateSet::NoteCandidates(), clang::TemplateSpecCandidateSet::NoteCandidates(), noteOverloads(), PrintInstantiationStack(), PrintPragmaAttributeInstantiationPoint(), Sema(), and clang::Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder().

◆ DictionaryWithObjectsMethod

ObjCMethodDecl* clang::Sema::DictionaryWithObjectsMethod

The declaration of the dictionaryWithObjects:forKeys:count: method.

Definition at line 12460 of file Sema.h.

Referenced by BuildObjCDictionaryLiteral().

◆ DisableTypoCorrection

bool clang::Sema::DisableTypoCorrection

Tracks whether we are in a context where typo correction is disabled.

Definition at line 7541 of file Sema.h.

Referenced by clang::Sema::TentativeAnalysisScope::TentativeAnalysisScope(), and clang::Sema::TentativeAnalysisScope::~TentativeAnalysisScope().

◆ ExprCleanupObjects

SmallVector<ExprWithCleanups::CleanupObject, 8> clang::Sema::ExprCleanupObjects

ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current full expression.

Definition at line 5375 of file Sema.h.

Referenced by ActOnBlockStmtExpr(), ActOnFinishFunctionBody(), BuildBlockForLambdaConversion(), BuildCompoundLiteralExpr(), DiscardCleanupsInEvaluationContext(), MaybeCreateExprWithCleanups(), PopExpressionEvaluationContext(), and PushExpressionEvaluationContext().

◆ ExprEvalContexts

SmallVector<ExpressionEvaluationContextRecord, 8> clang::Sema::ExprEvalContexts

A stack of expression evaluation contexts.

Definition at line 6669 of file Sema.h.

Referenced by ActOnCapScopeReturnStmt(), ActOnCapturedRegionStart(), ActOnDecltypeExpression(), ActOnFinishFunctionBody(), ActOnIfStmt(), ActOnReturnStmt(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnStartOfObjCMethodDef(), ActOnStartStmtExpr(), BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), BuildLambdaExpr(), BuildReturnStmt(), CheckAssignmentOperands(), CheckCallReturnType(), CheckCXXDefaultArgExpr(), CheckForImmediateInvocation(), CheckUnusedVolatileAssignment(), ClassifyImplicitMemberAccess(), CorrectDelayedTyposInExpr(), CorrectTypoDelayed(), CreateBuiltinUnaryOp(), CreateMaterializeTemporaryExpr(), currentEvaluationContext(), DiagIfReachable(), DiagRuntimeBehavior(), DiscardCleanupsInEvaluationContext(), getCurrentMangleNumberContext(), InnermostDeclarationWithDelayedImmediateInvocations(), InstantiateInClassInitializer(), isInLifetimeExtendingContext(), isInMaterializeTemporaryObjectContext(), isOdrUseContext(), isPotentiallyConstantEvaluatedContext(), keepInLifetimeExtendingContext(), keepInMaterializeTemporaryObjectContext(), MarkDeclRefReferenced(), MarkExpressionAsImmediateEscalating(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), OutermostDeclarationWithDelayedImmediateInvocations(), clang::Parser::ParseArrayBoundExpression(), clang::Parser::ParseConstantExpressionInExprEvalContext(), PopExpressionEvaluationContext(), PushExpressionEvaluationContext(), Sema(), and TransformToPotentiallyEvaluated().

◆ ExternalDeclarations

SmallVector<VarDecl *, 4> clang::Sema::ExternalDeclarations

All the external declarations encoutered and used in the TU.

Definition at line 2763 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and ActOnUninitializedDecl().

◆ 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 2741 of file Sema.h.

Referenced by ActOnFunctionDeclarator(), ActOnPragmaRedefineExtname(), and ActOnVariableDeclarator().

◆ 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 3736 of file Sema.h.

Referenced by CheckExtVectorComponent(), and handleExtVectorTypeAttr().

◆ FailedImmediateInvocations

llvm::SmallPtrSet<ConstantExpr *, 4> clang::Sema::FailedImmediateInvocations

◆ FieldCollector

std::unique_ptr<CXXFieldCollector> clang::Sema::FieldCollector

FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.

Definition at line 4954 of file Sema.h.

Referenced by ActOnCXXMemberDeclarator(), ActOnFinishCXXMemberSpecification(), ActOnStartCXXMemberDeclarations(), ActOnTagFinishDefinition(), BuildAnonymousStructOrUnion(), and Sema().

◆ 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 2720 of file Sema.h.

Referenced by IsValueInFlagEnum().

◆ FpPragmaStack

PragmaStack<FPOptionsOverride> clang::Sema::FpPragmaStack

◆ FunctionScopes

SmallVector<sema::FunctionScopeInfo *, 4> clang::Sema::FunctionScopes

◆ FunctionScopesStart

unsigned clang::Sema::FunctionScopesStart = 0

The index of the first FunctionScope that corresponds to the current context.

Definition at line 983 of file Sema.h.

Referenced by getFunctionScopes().

◆ FunctionToSectionMap

llvm::StringMap<std::tuple<StringRef, SourceLocation> > clang::Sema::FunctionToSectionMap

Sections used with #pragma alloc_text.

Definition at line 1591 of file Sema.h.

Referenced by ActOnPragmaMSAllocText(), and AddSectionMSAllocText().

◆ GlobalNewDeleteDeclared

bool clang::Sema::GlobalNewDeleteDeclared

A flag to remember whether the implicit forms of operator new and delete have been declared.

Definition at line 6718 of file Sema.h.

Referenced by DeclareGlobalNewDelete().

◆ IdResolver

IdentifierResolver clang::Sema::IdResolver

◆ 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 6677 of file Sema.h.

Referenced by ActOnStartOfObjCMethodDef(), BuildIvarRefExpr(), and diagnoseImplicitlyRetainedSelf().

◆ ImplicitMSInheritanceAttrLoc

SourceLocation clang::Sema::ImplicitMSInheritanceAttrLoc

Source location for newly created implicit MSInheritanceAttrs.

Definition at line 1302 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 10504 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 10484 of file Sema.h.

◆ InstantiatingSpecializations

llvm::DenseSet<std::pair<Decl *, unsigned> > clang::Sema::InstantiatingSpecializations

Specializations whose definitions are currently being instantiated.

Definition at line 10480 of file Sema.h.

Referenced by clang::Sema::InstantiatingTemplate::Clear(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and ~Sema().

◆ 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 4951 of file Sema.h.

Referenced by ActOnFinishFunctionDeclarationDeclarator(), ActOnStartFunctionDeclarationDeclarator(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), and getInventedParameterInfos().

◆ InventedParameterInfosStart

unsigned clang::Sema::InventedParameterInfosStart = 0

The index of the first InventedParameterInfo that refers to the current context.

Definition at line 2668 of file Sema.h.

Referenced by getInventedParameterInfos().

◆ 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 8175 of file Sema.h.

Referenced by BuildRecoveryCallExpr().

◆ isConstantEvaluatedOverride

bool clang::Sema::isConstantEvaluatedOverride = false

Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextRecord object.

Definition at line 1994 of file Sema.h.

Referenced by isAlwaysConstantEvaluatedContext(), and isConstantEvaluatedContext().

◆ IsLastErrorImmediate

bool clang::Sema::IsLastErrorImmediate = true

Is the last error level diagnostic immediate.

This is used to determined whether the next info diagnostic should be immediate.

Definition at line 1096 of file Sema.h.

Referenced by CUDADiagIfDeviceCode(), CUDADiagIfHostCode(), and Diag().

◆ LangOpts

const LangOptions& clang::Sema::LangOpts

Definition at line 1028 of file Sema.h.

Referenced by ActOnAtEnd(), ActOnBlockStart(), ActOnBlockStmtExpr(), ActOnCallExpr(), ActOnCaseStmt(), ActOnComment(), ActOnCXXTypeid(), ActOnDeclarator(), ActOnDefaultStmt(), ActOnDefs(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnExplicitInstantiation(), ActOnFinishFunctionBody(), ActOnGCCAsmStmt(), ActOnIvar(), ActOnLastBitfield(), ActOnMethodDeclaration(), actOnOMPReductionKindClause(), ActOnOpenMPAllocateClause(), ActOnOpenMPAllocateDirective(), ActOnOpenMPCall(), ActOnOpenMPDeclareMapperDirective(), ActOnOpenMPDeclareTargetName(), ActOnOpenMPDefaultmapClause(), ActOnOpenMPDependClause(), ActOnOpenMPDestroyClause(), ActOnOpenMPDeviceClause(), ActOnOpenMPDistScheduleClause(), ActOnOpenMPExecutableDirective(), ActOnOpenMPFilterClause(), ActOnOpenMPFinalClause(), ActOnOpenMPFirstprivateClause(), ActOnOpenMPGrainsizeClause(), ActOnOpenMPIfClause(), ActOnOpenMPLoopInitialization(), ActOnOpenMPNocontextClause(), ActOnOpenMPNovariantsClause(), ActOnOpenMPNumTasksClause(), ActOnOpenMPNumTeamsClause(), ActOnOpenMPNumThreadsClause(), ActOnOpenMPOrderClause(), ActOnOpenMPOrderedDirective(), ActOnOpenMPPrivateClause(), ActOnOpenMPProcBindClause(), ActOnOpenMPRegionEnd(), ActOnOpenMPScheduleClause(), ActOnOpenMPTargetDataDirective(), ActOnOpenMPThreadLimitClause(), ActOnOpenMPUpdateClause(), ActOnOpenMPXDynCGroupMemClause(), ActOnPragmaAttributeAttribute(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnVariableDeclarator(), AddInitializerToDecl(), AnalyzeBitFieldAssignment(), applyCocoaAPICheck(), BuildBuiltinOffsetOf(), BuildCompoundLiteralExpr(), BuildDelegatingInitializer(), BuildLambdaExpr(), BuildObjCSubscriptExpression(), BuildPredefinedExpr(), BuiltinAddReference(), BuiltinRemoveReference(), CheckAddressOfOperand(), checkArithmeticOnObjCPointer(), CheckCallingConvAttr(), CheckCompareOperands(), CheckConstexprDeclStmt(), CheckCUDACall(), checkCUDATargetOverload(), checkDeclInTargetContext(), CheckExtensionTraitOperandType(), CheckFieldDecl(), CheckFunctionDeclaration(), CheckFunctionTemplateSpecialization(), CheckImplementationIvars(), checkMapConflicts(), checkMappableExpressionList(), checkNestingOfRegions(), CheckObjCTraitOperandConstraints(), checkOpenMPDeclareVariantFunction(), checkOpenMPIterationSpace(), CheckOpenMPLinearModifier(), checkOpenMPLoop(), CheckOverloadedOperatorDeclaration(), CheckParmsForFunctionDef(), CheckShiftOperands(), CheckTemplateArgument(), checkTypeSupport(), checkVectorShift(), ComputeSelectedDestructor(), CreateBuiltinArraySubscriptExpr(), CreateGenericSelectionExpr(), CUDACheckLambdaCapture(), DeclareGlobalAllocationFunction(), DefaultSynthesizeProperties(), DefineImplicitCopyAssignment(), Diag(), diagIfOpenMPDeviceCode(), diagIfOpenMPHostCode(), DiagnoseCommaOperator(), clang::Sema::VerifyICEDiagnoser::diagnoseFold(), diagnoseQualifiedDeclaration(), DiagnoseSizeOfParametersAndReturnValue(), DiagnoseUnimplementedAccessor(), DiagnoseUnterminatedPragmaAlignPack(), DiagnoseUnusedExprResult(), DiagnoseUseOfDecl(), emitDeferredDiags(), FinalizeDeclaration(), FinalizeDeclaratorGroup(), finalizeOpenMPDelayedAnalysis(), getEmissionStatus(), getFixItZeroInitializerForType(), getLangOpts(), getLocationOfStringLiteralByte(), getLocForEndOfToken(), getOpenMPDeclareMapperVarName(), getScalarZeroExpressionForType(), handleAliasAttr(), handleCmseNSEntryAttr(), handleCommonAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleMSInheritanceAttr(), handleOpenCLNoSVMAttr(), handleUuidAttr(), ImplicitlyDefineFunction(), ImplMethodsVsClassMethods(), isNonNegativeIntegerValue(), isOpenMPCapturedByRef(), isOpenMPCapturedDecl(), isOpenMPDeclareMapperVarDeclAllowed(), isOpenMPDeviceDelayedContext(), isOpenMPGlobalCapturedDecl(), isOpenMPPrivateDecl(), isOpenMPTargetCapturedDecl(), IsOverloadOrOverrideImpl(), isVariableCapturable(), LazilyCreateBuiltin(), MarkFunctionReferenced(), MarkVarDeclODRUsed(), MarkVTableUsed(), PerformPendingInstantiations(), PopFunctionScopeInfo(), ProcessAPINotes(), clang::PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(), PushFunctionScope(), resetFPOptions(), setOpenMPCaptureKind(), ShouldDeleteSpecialMember(), shouldIgnoreInHostDeviceCheck(), startOpenMPCXXRangeFor(), startOpenMPLoop(), targetDiag(), tryCaptureVariable(), VerifyIntegerConstantExpression(), and warnAboutAmbiguousFunction().

◆ 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 10521 of file Sema.h.

Referenced by popCodeSynthesisContext(), and PrintContextStack().

◆ LateParsedInstantiations

SmallVector<PendingImplicitInstantiation, 1> clang::Sema::LateParsedInstantiations

Queue of implicit template instantiations that cannot be performed eagerly.

Definition at line 10755 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnEndOfTranslationUnitFragment(), and InstantiateFunctionDefinition().

◆ LateParsedTemplateMap

LateParsedTemplateMapT clang::Sema::LateParsedTemplateMap

Definition at line 9074 of file Sema.h.

Referenced by InstantiateFunctionDefinition(), and MarkAsLateParsedTemplate().

◆ LateTemplateParser

LateTemplateParserCB* clang::Sema::LateTemplateParser

Definition at line 1075 of file Sema.h.

Referenced by InstantiateFunctionDefinition(), and SetLateTemplateParser().

◆ LateTemplateParserCleanup

LateTemplateParserCleanupCB* clang::Sema::LateTemplateParserCleanup

Definition at line 1076 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and SetLateTemplateParser().

◆ 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 13106 of file Sema.h.

Referenced by CheckCUDACall().

◆ 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 10493 of file Sema.h.

Referenced by getLookupModules(), and popCodeSynthesisContext().

◆ MaxAlignmentExponent

const unsigned Sema::MaxAlignmentExponent = 32
static

The maximum alignment, same as in llvm::Value.

We duplicate them here because that allows us not to duplicate the constants in clang code, which we must to since we can't directly use the llvm constants. The value is verified against llvm here: lib/CodeGen/CGDecl.cpp

This is the greatest alignment value supported by load, store, and alloca instructions, and global values.

Definition at line 969 of file Sema.h.

◆ MaximumAlignment

const uint64_t Sema::MaximumAlignment = 1ull << MaxAlignmentExponent
static

Definition at line 970 of file Sema.h.

Referenced by AddAlignedAttr(), and AddAssumeAlignedAttr().

◆ MaybeODRUseExprs

MaybeODRUseExprSet clang::Sema::MaybeODRUseExprs

◆ 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 12076 of file Sema.h.

Referenced by AddClassMessageCompletions(), AreMultipleMethodsInGlobalPool(), CheckObjCMethodOverrides(), CollectMultipleMethodsInGlobalPool(), DiagnoseMismatchedSelectors(), LookupDirectMethodInGlobalPool(), LookupImplementedMethodInGlobalPool(), moveMethodToBackOfGlobalList(), clang::ASTReader::ReadMethodPool(), and SelectorsForTypoCorrection().

◆ MSFunctionNoBuiltins

llvm::SmallSetVector<StringRef, 4> clang::Sema::MSFunctionNoBuiltins

Set of no-builtin functions listed by #pragma function.

Definition at line 1638 of file Sema.h.

Referenced by ActOnPragmaMSFunction(), and AddImplicitMSFunctionNoBuiltinAttr().

◆ MSPointerToMemberRepresentationMethod

LangOptions::PragmaMSPointersToMembersKind clang::Sema::MSPointerToMemberRepresentationMethod

Controls member pointer representation format under the MS ABI.

Definition at line 1297 of file Sema.h.

Referenced by ActOnPragmaMSPointersToMembers(), and assignInheritanceModel().

◆ MSPragmaOptimizeIsOn

bool clang::Sema::MSPragmaOptimizeIsOn = true

The "on" or "off" argument passed by #pragma optimize, that denotes whether the optimizations in the list passed to the pragma should be turned off or on.

This boolean is true by default because command line options are honored when #pragma optimize("", on). (i.e. ModifyFnAttributeMSPragmaOptimze() does nothing)

Definition at line 1635 of file Sema.h.

Referenced by ActOnPragmaMSOptimize(), and ModifyFnAttributesMSPragmaOptimize().

◆ MSStructPragmaOn

bool clang::Sema::MSStructPragmaOn

Definition at line 1299 of file Sema.h.

Referenced by ActOnPragmaMSStruct(), and AddMsStructLayoutForRecord().

◆ 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 10513 of file Sema.h.

Referenced by inTemplateInstantiation(), popCodeSynthesisContext(), and pushCodeSynthesisContext().

◆ NSAPIObj

std::unique_ptr<NSAPI> clang::Sema::NSAPIObj

◆ NSArrayDecl

ObjCInterfaceDecl* clang::Sema::NSArrayDecl

The declaration of the Objective-C NSArray class.

Definition at line 12451 of file Sema.h.

Referenced by BuildObjCArrayLiteral(), and checkObjCArrayLiteral().

◆ NSDictionaryDecl

ObjCInterfaceDecl* clang::Sema::NSDictionaryDecl

The declaration of the Objective-C NSDictionary class.

Definition at line 12457 of file Sema.h.

Referenced by BuildObjCDictionaryLiteral(), and checkObjCDictionaryLiteral().

◆ NSNumberDecl

ObjCInterfaceDecl* clang::Sema::NSNumberDecl

The declaration of the Objective-C NSNumber class.

Definition at line 12424 of file Sema.h.

Referenced by getNSNumberFactoryMethod().

◆ NSNumberLiteralMethods

ObjCMethodDecl* clang::Sema::NSNumberLiteralMethods[NSAPI::NumNSNumberLiteralMethods]

The Objective-C NSNumber methods used to create NSNumber literals.

Definition at line 12436 of file Sema.h.

Referenced by getNSNumberFactoryMethod(), and Sema().

◆ NSNumberPointer

QualType clang::Sema::NSNumberPointer

Pointer to NSNumber type (NSNumber *).

Definition at line 12430 of file Sema.h.

Referenced by BuildObjCBoxedExpr(), BuildObjCNumericLiteral(), and getNSNumberFactoryMethod().

◆ NSStringDecl

ObjCInterfaceDecl* clang::Sema::NSStringDecl

The declaration of the Objective-C NSString class.

Definition at line 12439 of file Sema.h.

Referenced by BuildObjCBoxedExpr().

◆ NSStringPointer

QualType clang::Sema::NSStringPointer

Pointer to NSString type (NSString *).

Definition at line 12442 of file Sema.h.

Referenced by BuildObjCBoxedExpr().

◆ NSValueDecl

ObjCInterfaceDecl* clang::Sema::NSValueDecl

The declaration of the Objective-C NSValue class.

Definition at line 12427 of file Sema.h.

Referenced by BuildObjCBoxedExpr().

◆ NSValuePointer

QualType clang::Sema::NSValuePointer

Pointer to NSValue type (NSValue *).

Definition at line 12433 of file Sema.h.

Referenced by BuildObjCBoxedExpr().

◆ NullabilityMap

FileNullabilityMap clang::Sema::NullabilityMap

A mapping that describes the nullability we've seen in each header file.

Definition at line 11671 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 9064 of file Sema.h.

Referenced by CheckTemplateArgument(), EmitCurrentDiagnostic(), clang::Sema::SFINAETrap::hasErrorOccurred(), PrintStats(), and clang::Sema::SFINAETrap::~SFINAETrap().

◆ OpaqueParser

void* clang::Sema::OpaqueParser

◆ OpenCLFeatures

OpenCLOptions clang::Sema::OpenCLFeatures

Definition at line 1025 of file Sema.h.

Referenced by getOpenCLOptions().

◆ 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 1622 of file Sema.h.

Referenced by ActOnPragmaOptimize(), AddRangeBasedOptnone(), and getOptimizeOffPragmaLocation().

◆ OriginalLexicalContext

DeclContext* clang::Sema::OriginalLexicalContext

Generally null except when we temporarily switch decl contexts, like in.

See also
ActOnObjCTemporaryExitContainerContext.

Definition at line 2767 of file Sema.h.

Referenced by ActOnDeclarator(), ActOnFunctionDeclarator(), ActOnObjCReenterContainerContext(), ActOnObjCTemporaryExitContainerContext(), and getCurLexicalContext().

◆ ParseTypeFromStringCallback

std::function<TypeResult(StringRef, StringRef, SourceLocation)> clang::Sema::ParseTypeFromStringCallback

Callback to the parser to parse a type expressed as a string.

Definition at line 1088 of file Sema.h.

Referenced by clang::Parser::Parser(), and ProcessAPINotes().

◆ 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 3561 of file Sema.h.

Referenced by ActOnDecompositionDeclarator(), ActOnEndOfTranslationUnit(), ActOnVariableDeclarator(), CanUseDecl(), checkAttributesAfterMerging(), DiagnoseUseOfDecl(), and FinalizeDeclaration().

◆ 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 10751 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnEndOfTranslationUnitFragment(), DoMarkVarDeclReferenced(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), MarkFunctionReferenced(), and PerformPendingInstantiations().

◆ 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 10768 of file Sema.h.

Referenced by InstantiateClassMembers(), MarkFunctionReferenced(), PerformPendingInstantiations(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

◆ PP

Preprocessor& clang::Sema::PP

Definition at line 1029 of file Sema.h.

Referenced by ActOnBlockStmtExpr(), ActOnCharacterConstant(), ActOnClassPropertyRefExpr(), ActOnCXXTypeid(), ActOnEndOfTranslationUnit(), ActOnFinishFunctionBody(), ActOnModuleDecl(), ActOnModuleImport(), ActOnNumericConstant(), ActOnOpenMPTileDirective(), ActOnOpenMPUnrollDirective(), ActOnPragmaFPEvalMethod(), ActOnPragmaFPValueChangingOption(), ActOnPrivateModuleFragmentDecl(), ActOnStringLiteral(), ActOnUnevaluatedStringLiteral(), AddCFAuditedAttribute(), AddOrdinaryNameResults(), buildCoroutineHandle(), buildCoroutinePromise(), buildMemberCall(), BuildModuleInclude(), BuildNonArrayForRange(), buildStdNoThrowDeclRef(), buildVarDecl(), CheckCompleteVariableDeclaration(), checkLiteralOperatorId(), CheckPtrComparisonWithNullChar(), checkTupleLikeDecomposition(), clang::CodeCompletionResult::CreateCodeCompletionString(), DeclareGlobalNewDelete(), DefaultVariadicArgumentPromotion(), DiagnoseCommaOperator(), diagnoseMissingConstinit(), diagnoseMissingImport(), DiagnoseOwningPropertyGetterSynthesis(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), EvaluateStaticAssertMessageAsString(), ExpandFunctionLocalPredefinedMacros(), findFailedBooleanCondition(), findOMPAllocatorHandleT(), findOMPAlloctraitT(), findOMPDependT(), findOMPEventHandleT(), getCompletionPrintingPolicy(), getDarwinSDKInfoForAvailabilityChecking(), GetFullTypeForDeclarator(), getModuleLoader(), clang::arcmt::trans::getNilString(), getNSErrorIdent(), getNullabilityKeyword(), GetOrCreateMSAsmLabel(), getOrCreateStdNamespace(), getPreprocessor(), getPrintingPolicy(), getTupleLikeElementType(), HandleExprPropertyRefExpr(), handleOwnershipAttr(), Initialize(), isMacroDefined(), isStdInitializerList(), isTupleLike(), LookupBuiltin(), lookupCoroutineHandleType(), lookupCoroutineTraits(), lookupMember(), LookupMemberExpr(), lookupPromiseType(), LookupStdInitializerList(), LookupStdSourceLocationImpl(), lookupStdTypeTraitMember(), notePreviousDefinition(), Sema(), UsualUnaryConversions(), clang::ASTWriter::WriteAST(), and clang::Sema::FPFeaturesStateRAII::~FPFeaturesStateRAII().

◆ PragmaAttributeCurrentTargetDecl

const Decl* clang::Sema::PragmaAttributeCurrentTargetDecl

The declaration that is currently receiving an attribute from the #pragma attribute stack.

Definition at line 1617 of file Sema.h.

Referenced by AddPragmaAttributes(), PrintContextStack(), and PrintPragmaAttributeInstantiationPoint().

◆ PragmaAttributeStack

SmallVector<PragmaAttributeGroup, 2> clang::Sema::PragmaAttributeStack

◆ PragmaClangBSSSection

PragmaClangSection clang::Sema::PragmaClangBSSSection

Definition at line 1322 of file Sema.h.

Referenced by ActOnPragmaClangSection(), and FinalizeDeclaration().

◆ PragmaClangDataSection

PragmaClangSection clang::Sema::PragmaClangDataSection

Definition at line 1323 of file Sema.h.

Referenced by ActOnPragmaClangSection(), and FinalizeDeclaration().

◆ PragmaClangRelroSection

PragmaClangSection clang::Sema::PragmaClangRelroSection

Definition at line 1325 of file Sema.h.

Referenced by ActOnPragmaClangSection(), and FinalizeDeclaration().

◆ PragmaClangRodataSection

PragmaClangSection clang::Sema::PragmaClangRodataSection

Definition at line 1324 of file Sema.h.

Referenced by ActOnPragmaClangSection(), and FinalizeDeclaration().

◆ PragmaClangTextSection

PragmaClangSection clang::Sema::PragmaClangTextSection

Definition at line 1326 of file Sema.h.

Referenced by ActOnFunctionDeclarator(), and 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 4965 of file Sema.h.

Referenced by DiagnoseAbstractType().

◆ QIDNSCopying

QualType clang::Sema::QIDNSCopying

id<NSCopying> type.

Definition at line 12463 of file Sema.h.

Referenced by BuildObjCDictionaryLiteral().

◆ RebuildingImmediateInvocation

bool clang::Sema::RebuildingImmediateInvocation = false

Whether the AST is currently being rebuilt to correct immediate invocations.

Immediate invocation candidates and references to consteval functions aren't tracked when this is set.

Definition at line 6495 of file Sema.h.

Referenced by CheckForImmediateInvocation(), HandleImmediateInvocations(), and MarkDeclRefReferenced().

◆ ReferencedSelectors

llvm::MapVector<Selector, SourceLocation> clang::Sema::ReferencedSelectors

Method selectors used in a @selector expression.

Used for implementation of -Wselector.

Definition at line 12051 of file Sema.h.

Referenced by DiagnoseUseOfUnimplementedSelectors(), ParseObjCSelectorExpression(), and RemoveSelectorFromWarningCache().

◆ RefsMinusAssignments

llvm::DenseMap<const VarDecl *, int> clang::Sema::RefsMinusAssignments

Increment when we find a reference; decrement when we find an ignored assignment.

Ultimately the value is 0 if every reference is an ignored assignment.

Definition at line 5368 of file Sema.h.

Referenced by ActOnPopScope(), DiagnoseUnusedButSetDecl(), DoMarkVarDeclReferenced(), IgnoredValueConversions(), MarkDeclRefReferenced(), MarkExprReferenced(), MarkFunctionParmPackReferenced(), MarkMemberReferenced(), MarkVariableReferenced(), and MaybeDecrementCount().

◆ RespondsToSelectorSel

Selector clang::Sema::RespondsToSelectorSel

will hold 'respondsToSelector:'

Definition at line 12466 of file Sema.h.

Referenced by ActOnInstanceMessage().

◆ SavedPendingInstantiations

SmallVector<std::deque<PendingImplicitInstantiation>, 8> clang::Sema::SavedPendingInstantiations

Definition at line 10759 of file Sema.h.

Referenced by DoMarkVarDeclReferenced().

◆ SavedVTableUses

SmallVector<SmallVector<VTableUse, 16>, 8> clang::Sema::SavedVTableUses

Definition at line 10757 of file Sema.h.

◆ SourceMgr

SourceManager& clang::Sema::SourceMgr

◆ SpecialMemberCache

llvm::FoldingSet<SpecialMemberOverloadResultEntry> clang::Sema::SpecialMemberCache

A cache of special member function overload resolution results for C++ records.

Definition at line 7587 of file Sema.h.

Referenced by LookupSpecialMember().

◆ 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 4996 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 6711 of file Sema.h.

Referenced by ActOnTag(), BuildCXXNew(), DeclareGlobalNewDelete(), and getStdAlignValT().

◆ StdBadAlloc

LazyDeclPtr clang::Sema::StdBadAlloc

The C++ "std::bad_alloc" class, which is defined by the C++ standard library.

Definition at line 6707 of file Sema.h.

Referenced by ActOnTag(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), and getStdBadAlloc().

◆ StdCoroutineTraitsCache

ClassTemplateDecl* clang::Sema::StdCoroutineTraitsCache

The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>

Definition at line 2418 of file Sema.h.

Referenced by lookupCoroutineTraits().

◆ StdInitializerList

ClassTemplateDecl* clang::Sema::StdInitializerList

The C++ "std::initializer_list" template, which is defined in <initializer_list>.

Definition at line 4980 of file Sema.h.

Referenced by BuildStdInitializerList(), and isStdInitializerList().

◆ StdNamespace

LazyDeclPtr clang::Sema::StdNamespace

The C++ "std" namespace, where the standard library resides.

Definition at line 4976 of file Sema.h.

Referenced by ActOnStartNamespaceDef(), ActOnTag(), getOrCreateStdNamespace(), getStdNamespace(), and isStdInitializerList().

◆ StdSourceLocationImplDecl

RecordDecl* clang::Sema::StdSourceLocationImplDecl

The C++ "std::source_location::__impl" struct, defined in <source_location>.

Definition at line 6666 of file Sema.h.

Referenced by ActOnSourceLocExpr().

◆ StrictGuardStackCheckStack

PragmaStack<bool> clang::Sema::StrictGuardStackCheckStack

◆ StringWithUTF8StringMethod

ObjCMethodDecl* clang::Sema::StringWithUTF8StringMethod

The declaration of the stringWithUTF8String: method.

Definition at line 12445 of file Sema.h.

Referenced by BuildObjCBoxedExpr().

◆ SuppressedDiagnostics

SuppressedDiagnosticsMap clang::Sema::SuppressedDiagnostics

Definition at line 9818 of file Sema.h.

Referenced by DiagnoseUseOfDecl(), and FinishTemplateArgumentDeduction().

◆ 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 10529 of file Sema.h.

Referenced by clang::Sema::InstantiatingTemplate::Clear(), clang::TemplightDumpAction::ExecuteAction(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and clang::ParseAST().

◆ TentativeDefinitions

TentativeDefinitionsType clang::Sema::TentativeDefinitions

All the tentative definitions encountered in the TU.

Definition at line 2760 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and ActOnUninitializedDecl().

◆ ThreadSafetyDeclCache

threadSafety::BeforeSet* clang::Sema::ThreadSafetyDeclCache

Definition at line 1070 of file Sema.h.

Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings(), and ~Sema().

◆ TUKind

const 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 997 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), BuildModuleInclude(), isMainFileLoc(), MarkVTableUsed(), PerformPendingInstantiations(), and Sema().

◆ TUScope

Scope* clang::Sema::TUScope

◆ 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 2716 of file Sema.h.

Referenced by CheckForFunctionRedefinition(), and MarkTypoCorrectedFunctionDefinition().

◆ 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 7552 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 7593 of file Sema.h.

◆ TyposCorrected

unsigned clang::Sema::TyposCorrected

The number of typos corrected by CorrectTypo.

Definition at line 7544 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 4988 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), CheckImmediateEscalatingFunctionDefinition(), checkUndefinedButUsed(), getUndefinedButUsed(), MarkFunctionReferenced(), MarkVarDeclODRUsed(), MergeFunctionDecl(), and MergeVarDecl().

◆ 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 10046 of file Sema.h.

Referenced by SetParamDefaultArgument(), and SubstParmVarDecl().

◆ UnparsedDefaultArgLocs

llvm::DenseMap<ParmVarDecl *, SourceLocation> clang::Sema::UnparsedDefaultArgLocs

◆ 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 2753 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), and MarkUnusedFileScopedDecl().

◆ UnusedLocalTypedefNameCandidates

llvm::SmallSetVector<const TypedefNameDecl *, 4> clang::Sema::UnusedLocalTypedefNameCandidates

Set containing all typedefs that are likely unused.

Definition at line 2745 of file Sema.h.

Referenced by DiagnoseUnusedDecl(), and emitAndClearUnusedLocalTypedefWarnings().

◆ UnusedPrivateFields

NamedDeclSetType clang::Sema::UnusedPrivateFields

Set containing all declared private fields that are not used.

Definition at line 4958 of file Sema.h.

Referenced by ActOnCXXMemberDeclarator(), ActOnEndOfTranslationUnit(), BuildDeclRefExpr(), BuildFieldReferenceExpr(), and CheckExplicitlyDefaultedFunction().

◆ 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 1092 of file Sema.h.

Referenced by Initialize().

◆ ValueWithBytesObjCTypeMethod

ObjCMethodDecl* clang::Sema::ValueWithBytesObjCTypeMethod

The declaration of the valueWithBytes:objCType: method.

Definition at line 12448 of file Sema.h.

Referenced by BuildObjCBoxedExpr().

◆ VisContext

void* clang::Sema::VisContext

VisContext - Manages the stack for #pragma GCC visibility.

Definition at line 1594 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 10497 of file Sema.h.

Referenced by ActOnAnnotModuleEnd().

◆ 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 4551 of file Sema.h.

Referenced by DefineUsedVTables(), LoadExternalVTableUses(), and MarkVTableUsed().

◆ VTableUses

SmallVector<VTableUse, 16> clang::Sema::VTableUses

The list of vtables that are required but have not yet been materialized.

Definition at line 4545 of file Sema.h.

Referenced by DefineUsedVTables(), LoadExternalVTableUses(), and MarkVTableUsed().

◆ 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 1536 of file Sema.h.

Referenced by ActOnPragmaMSVtorDisp(), AddMsStructLayoutForRecord(), clang::Sema::PragmaStackSentinelRAII::PragmaStackSentinelRAII(), and clang::Sema::PragmaStackSentinelRAII::~PragmaStackSentinelRAII().

◆ WarnedStackExhausted

bool clang::Sema::WarnedStackExhausted = false

Definition at line 1004 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 3724 of file Sema.h.

Referenced by DeclApplyPragmaWeak(), and WeakTopLevelDecls().

◆ WeakUndeclaredIdentifiers

llvm::MapVector< IdentifierInfo *, llvm::SetVector< WeakInfo, llvm::SmallVector<WeakInfo, 1u>, llvm::SmallDenseSet<WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly> > > clang::Sema::WeakUndeclaredIdentifiers

WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared.

Rare. May alias another identifier, declared or undeclared.

For aliases, the target identifier is used as a key for eventual processing when the target is declared. For the single-identifier form, the sole identifier is used as the key. Each entry is a SetVector (ordered by parse order) of aliases (identified by the alias name) in case of multiple aliases to the same undeclared identifier.

Definition at line 2735 of file Sema.h.

Referenced by ActOnEndOfTranslationUnit(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), LoadExternalWeakUndeclaredIdentifiers(), and ProcessPragmaWeak().


The documentation for this class was generated from the following files: