|
clang 23.0.0git
|
Sema - This implements semantic analysis and AST building for C. More...
#include "clang/Sema/Sema.h"
Classes | |
| struct | ActOnMemberAccessExtraArgs |
| struct | AlignPackIncludeState |
| class | AlignPackInfo |
| class | ArgPackSubstIndexRAII |
RAII object used to change the argument pack substitution index within a Sema object. More... | |
| class | BoundTypeDiagnoser |
| struct | CheckNonDependentConversionsFlag |
| struct | CheckTemplateArgumentInfo |
| 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... | |
| class | CXXThisScopeRAII |
| RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers on the current class type. More... | |
| class | DefaultedFunctionKind |
| For a defaulted function, the kind of defaulted function that it is. More... | |
| class | DeferDiagsRAII |
| RAII class to control scope of DeferDiags. More... | |
| class | DelayedDiagnostics |
| A class which encapsulates the logic for delaying diagnostics during parsing and other processing. More... | |
| class | DelayedDiagnosticsState |
| struct | ExpressionEvaluationContextRecord |
| Data structure used to record current or nested expression evaluation contexts. More... | |
| class | ExtParameterInfoBuilder |
| A helper class for building up ExtParameterInfos. More... | |
| struct | FormatStringInfo |
| class | FPFeaturesStateRAII |
| Records and restores the CurFPFeatures state on entry/exit of compound statements. More... | |
| class | FpPragmaStackSaveRAII |
| class | FullExprArg |
| struct | FunctionEffectDiff |
| struct | FunctionEffectDiffVector |
| struct | FunctionScopeRAII |
| An RAII helper that pops function a function scope on exit. More... | |
| class | GlobalEagerInstantiationScope |
| class | ICEConvertDiagnoser |
| class | ImplicitExceptionSpecification |
| Helper class that collects exception specifications for implicitly-declared special member functions. More... | |
| class | InheritedConstructorInfo |
| struct | InstantiatingTemplate |
| A stack object to be created when performing template instantiation. More... | |
| class | LambdaScopeForCallOperatorInstantiationRAII |
| struct | LateInstantiatedAttribute |
| class | LocalEagerInstantiationScope |
| class | NameClassification |
| struct | NamedReturnInfo |
| struct | NestedNameSpecInfo |
| Keeps information about an identifier in a nested-name-spec. More... | |
| struct | NonSFINAEContext |
| struct | OffsetOfComponent |
| struct | OriginalCallArg |
| brief A function argument from which we performed template argument More... | |
| struct | PendingPragmaInfo |
| Information from a C++ #pragma export, for a symbol that we haven't seen the declaration for yet. 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 | RecursiveInstGuard |
| struct | ReferenceConversionsScope |
| class | RequiredTemplateKind |
| Whether and why a template name is required in this lookup. More... | |
| class | SatisfactionStackResetRAII |
| struct | SFINAEContextBase |
| 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... | |
| 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 |
| class | VerifyICEDiagnoser |
| Abstract base class used for diagnosing integer constant expression violations. More... | |
Attributes | |
Implementations are in SemaAttr.cpp | |
| 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 class | PragmaAlignPackDiagnoseKind { NonDefaultStateAtInclude , ChangedStateAtExit } |
| using | InstantiationContextDiagFuncRef |
| 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< MSVtorDispMode > | VtorDispStack |
| Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI. | |
| PragmaStack< AlignPackInfo > | AlignPackStack |
| SmallVector< AlignPackIncludeState, 8 > | AlignPackIncludeStack |
| PragmaStack< StringLiteral * > | DataSegStack |
| PragmaStack< StringLiteral * > | BSSSegStack |
| PragmaStack< StringLiteral * > | ConstSegStack |
| PragmaStack< StringLiteral * > | CodeSegStack |
| PragmaStack< bool > | StrictGuardStackCheckStack |
| PragmaStack< FPOptionsOverride > | FpPragmaStack |
| StringLiteral * | CurInitSeg |
| 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 Decl * | PragmaAttributeCurrentTargetDecl |
| 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. | |
| llvm::DenseMap< IdentifierInfo *, PendingPragmaInfo > | PendingExportedNames |
| 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 | inferLifetimeBoundAttribute (FunctionDecl *FD) |
| Add [[clang:::lifetimebound]] attr for std:: functions and methods. | |
| void | inferLifetimeCaptureByAttribute (FunctionDecl *FD) |
| Add [[clang:::lifetime_capture_by(this)]] to STL container methods. | |
| void | inferGslPointerAttribute (TypedefNameDecl *TD) |
| Add [[gsl::Pointer]] attributes for std:: types. | |
| LifetimeCaptureByAttr * | ParseLifetimeCaptureByAttr (const ParsedAttr &AL, StringRef ParamName) |
| void | LazyProcessLifetimeCaptureByParams (FunctionDecl *FD) |
| void | inferNullableClassAttribute (CXXRecordDecl *CRD) |
| Add _Nullable 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 | 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. | |
| auto | getDefaultDiagFunc () |
| void | PrintPragmaAttributeInstantiationPoint (InstantiationContextDiagFuncRef DiagFunc) |
| 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. | |
| NamedDecl * | lookupExternCFunctionOrVariable (IdentifierInfo *IdentId, SourceLocation NameLoc, Scope *curScope) |
| void | ActOnPragmaExport (IdentifierInfo *IdentId, SourceLocation ExportNameLoc, Scope *curScope) |
| ActonPragmaExport - called on well-formed '#pragma export'. | |
| 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 , FAPK_Elsewhere } |
| enum class | AtomicArgumentOrder { API , AST } |
| enum class | EltwiseBuiltinArgTyRestriction { None , FloatTy , IntegerTy , SignedIntOrFloatTy } |
| 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 | BuiltinShuffleVector (CallExpr *TheCall) |
| BuiltinShuffleVector - Handle __builtin_shufflevector. | |
| ExprResult | ConvertVectorExpr (Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc) |
| ConvertVectorExpr - Handle __builtin_convertvector. | |
| bool | FormatStringHasSArg (const StringLiteral *FExpr) |
| void | CheckFloatComparison (SourceLocation Loc, const Expr *LHS, const 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. | |
| bool | DiscardingCFIUncheckedCallee (QualType From, QualType To) const |
| Returns true if From is a function or pointer to a function with the cfi_unchecked_callee attribute but To is a function or pointer to function without this attribute. | |
| 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. | |
| 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) |
| DiagnoseSelfMove - Emits a warning if a value is moved to itself. | |
| bool | IsLayoutCompatible (QualType T1, QualType T2) const |
| bool | IsPointerInterconvertibleBaseOf (const TypeSourceInfo *Base, const TypeSourceInfo *Derived) |
| 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. | |
| std::optional< QualType > | BuiltinVectorMath (CallExpr *TheCall, EltwiseBuiltinArgTyRestriction ArgTyRestr=EltwiseBuiltinArgTyRestriction::None) |
| bool | BuiltinVectorToScalarMath (CallExpr *TheCall) |
| void | checkLifetimeCaptureBy (FunctionDecl *FDecl, bool IsMemberFunction, const Expr *ThisArg, ArrayRef< const Expr * > Args) |
| void | checkCall (NamedDecl *FDecl, const FunctionProtoType *Proto, const Expr *ThisArg, ArrayRef< const Expr * > Args, bool IsMemberFunction, SourceLocation Loc, SourceRange Range, VariadicCallType CallType) |
| Handles the checks for format strings, non-POD arguments to vararg functions, NULL arguments passed to non-NULL parameters, diagnose_if attributes and AArch64 SME attributes. | |
| bool | CheckFormatStringsCompatible (FormatStringType FST, const StringLiteral *AuthoritativeFormatString, const StringLiteral *TestedFormatString, const Expr *FunctionCallArg=nullptr) |
| Verify that two format strings (as understood by attribute(format) and attribute(format_matches) are compatible. | |
| bool | ValidateFormatString (FormatStringType FST, const StringLiteral *Str) |
| Verify that one format string (as understood by attribute(format)) is self-consistent; for instance, that it doesn't have multiple positional arguments referring to the same argument in incompatible ways. | |
| void | CheckTCBEnforcement (const SourceLocation CallExprLoc, const NamedDecl *Callee) |
| Enforce the bounds of a TCB CheckTCBEnforcement - Enforces that every function in a named TCB only directly calls other functions in the same TCB as marked by the enforce_tcb and enforce_tcb_leaf attributes. | |
| void | CheckConstrainedAuto (const AutoType *AutoT, SourceLocation Loc) |
| bool | BuiltinConstantArg (CallExpr *TheCall, unsigned ArgNum, llvm::APSInt &Result) |
| BuiltinConstantArg - Handle a check if argument ArgNum of CallExpr TheCall is a constant expression. | |
| bool | BuiltinConstantArgRange (CallExpr *TheCall, unsigned ArgNum, int Low, int High, bool RangeIsError=true) |
| BuiltinConstantArgRange - Handle a check if argument ArgNum of CallExpr TheCall is a constant expression in the range [Low, High]. | |
| bool | BuiltinConstantArgMultiple (CallExpr *TheCall, unsigned ArgNum, unsigned Multiple) |
| BuiltinConstantArgMultiple - Handle a check if argument ArgNum of CallExpr TheCall is a constant expression is a multiple of Num. | |
| bool | BuiltinConstantArgPower2 (CallExpr *TheCall, unsigned ArgNum) |
| BuiltinConstantArgPower2 - Check if argument ArgNum of TheCall is a constant expression representing a power of 2. | |
| bool | BuiltinConstantArgShiftedByte (CallExpr *TheCall, unsigned ArgNum, unsigned ArgBits) |
| BuiltinConstantArgShiftedByte - Check if argument ArgNum of TheCall is a constant expression representing an arbitrary byte value shifted left by a multiple of 8 bits. | |
| bool | BuiltinConstantArgShiftedByteOrXXFF (CallExpr *TheCall, unsigned ArgNum, unsigned ArgBits) |
| BuiltinConstantArgShiftedByteOr0xFF - Check if argument ArgNum of TheCall is a constant expression representing either a shifted byte value, or a value of the form 0x? | |
| bool | checkArgCountAtLeast (CallExpr *Call, unsigned MinArgCount) |
| Checks that a call expression's argument count is at least the desired number. | |
| bool | checkArgCountAtMost (CallExpr *Call, unsigned MaxArgCount) |
| Checks that a call expression's argument count is at most the desired number. | |
| bool | checkArgCountRange (CallExpr *Call, unsigned MinArgCount, unsigned MaxArgCount) |
| Checks that a call expression's argument count is in the desired range. | |
| bool | checkArgCount (CallExpr *Call, unsigned DesiredArgCount) |
| Checks that a call expression's argument count is the desired number. | |
| bool | ValueIsRunOfOnes (CallExpr *TheCall, unsigned ArgNum) |
| Returns true if the argument consists of one contiguous run of 1s with any number of 0s on either side. | |
| void | CheckImplicitConversion (Expr *E, QualType T, SourceLocation CC, bool *ICContext=nullptr, bool IsListInit=false) |
| bool | BuiltinElementwiseTernaryMath (CallExpr *TheCall, EltwiseBuiltinArgTyRestriction ArgTyRestr=EltwiseBuiltinArgTyRestriction::FloatTy) |
| bool | PrepareBuiltinElementwiseMathOneArgCall (CallExpr *TheCall, EltwiseBuiltinArgTyRestriction ArgTyRestr=EltwiseBuiltinArgTyRestriction::None) |
| static bool | getFormatStringInfo (const Decl *Function, unsigned FormatIdx, unsigned FirstArg, FormatStringInfo *FSI) |
| Given a function and its FormatAttr or FormatMatchesAttr info, attempts to populate the FormatStringInfo parameter with the attribute's correct format_idx and firstDataArg. | |
| static bool | getFormatStringInfo (unsigned FormatIdx, unsigned FirstArg, bool HasImplicitThisParam, bool IsVariadic, FormatStringInfo *FSI) |
| static StringRef | GetFormatStringTypeName (FormatStringType FST) |
| static FormatStringType | GetFormatStringType (StringRef FormatFlavor) |
| static FormatStringType | GetFormatStringType (const FormatAttr *Format) |
| static FormatStringType | GetFormatStringType (const FormatMatchesAttr *Format) |
Declarations | |
Implementations are in SemaDecl.cpp | |
| enum class | DiagCtorKind { None , Implicit , Typename } |
| enum class | TemplateNameKindForDiagnostics { ClassTemplate , FunctionTemplate , VarTemplate , AliasTemplate , TemplateTemplateParam , Concept , DependentTemplate } |
| Describes the detailed kind of a template name. Used in diagnostics. More... | |
| enum | NonTrivialCUnionKind { NTCUK_Init = 0x1 , NTCUK_Destruct = 0x2 , NTCUK_Copy = 0x4 } |
| enum class | FnBodyKind { Other , Default , Delete } |
| 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< DeclaratorDecl *, 4 > | ExternalDeclarations |
| All the external declarations encoutered and used in the TU. | |
| DeclContext * | OriginalLexicalContext |
| 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. | |
| llvm::SmallSetVector< Decl *, 4 > | DeclsToCheckForDeferredDiags |
| Function or variable declarations to be checked for whether the deferred diagnostics should be emitted. | |
| void | DiagnoseInvalidJumps (Stmt *Body) |
| bool | currentModuleIsHeaderUnit () const |
| Is the module scope we are in a C++ Header Unit? | |
| Module * | getOwningModule (const Decl *Entity) |
| Get the module owning an entity. | |
| DeclGroupPtrTy | ConvertDeclToDeclGroup (Decl *Ptr, Decl *OwnedType=nullptr) |
| void | checkTypeDeclType (DeclContext *LookupCtx, DiagCtorKind DCK, TypeDecl *TD, SourceLocation NameLoc) |
| Returns the TypeDeclType for the given type declaration, as ASTContext::getTypeDeclType would, but performs the required semantic checks for name lookup of said entity. | |
| 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) |
| void | warnOnCTypeHiddenInCPlusPlus (const NamedDecl *D) |
| void | ProcessPragmaExport (DeclaratorDecl *newDecl) |
| Decl * | ActOnDeclarator (Scope *S, Declarator &D) |
| NamedDecl * | HandleDeclarator (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 | checkPointerAuthEnabled (SourceLocation Loc, SourceRange Range) |
| bool | checkConstantPointerAuthKey (Expr *keyExpr, unsigned &key) |
| bool | checkPointerAuthDiscriminatorArg (Expr *Arg, PointerAuthDiscArgKind Kind, unsigned &IntVal) |
| void | DiagnoseFunctionSpecifiers (const DeclSpec &DS) |
| Diagnose function specifiers on a declaration of an identifier that does not identify a function. | |
| NamedDecl * | getShadowedDeclaration (const TypedefNameDecl *D, const LookupResult &R) |
Return the declaration shadowed by the given typedef D, or null if it doesn't shadow any declaration or shadowing warnings are disabled. | |
| NamedDecl * | getShadowedDeclaration (const VarDecl *D, const LookupResult &R) |
Return the declaration shadowed by the given variable D, or null if it doesn't shadow any declaration or shadowing warnings are disabled. | |
| NamedDecl * | 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. | |
| 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) |
| NamedDecl * | ActOnTypedefDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous) |
| NamedDecl * | ActOnTypedefNameDecl (Scope *S, DeclContext *DC, TypedefNameDecl *D, LookupResult &Previous, bool &Redeclaration) |
| ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name, either using the 'typedef' type specifier or via a C++0x [dcl.typedef]p2 alias-declaration: 'using T = A;'. | |
| NamedDecl * | ActOnVariableDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef< BindingDecl * > Bindings={}) |
| bool | CheckVariableDeclaration (VarDecl *NewVD, LookupResult &Previous) |
| Perform semantic checking on a newly-created variable declaration. | |
| void | CheckVariableDeclarationType (VarDecl *NewVD) |
| void | CheckCompleteVariableDeclaration (VarDecl *VD) |
| NamedDecl * | ActOnFunctionDeclarator (Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope) |
| bool | AddOverriddenMethods (CXXRecordDecl *DC, CXXMethodDecl *MD) |
| AddOverriddenMethods - See if a method overrides any in the base classes, and if so, check that it's a valid override and remember it. | |
| 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) |
| Attr * | getImplicitCodeSegOrSectionAttrForFunction (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. | |
| Decl * | ActOnParamDeclarator (Scope *S, Declarator &D, SourceLocation ExplicitThisLoc={}) |
| ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into function prototype scope. | |
| ParmVarDecl * | BuildParmVarDeclForTypedef (DeclContext *DC, SourceLocation Loc, QualType T) |
| Synthesizes a variable for a parameter arising from a typedef. | |
| ParmVarDecl * | CheckParameter (DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, const 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. | |
| bool | GloballyUniqueObjectMightBeAccidentallyDuplicated (const VarDecl *Dcl) |
| Certain globally-unique variables might be accidentally duplicated if built into multiple shared libraries with hidden visibility. | |
| void | DiagnoseUniqueObjectDuplication (const VarDecl *Dcl) |
| 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) |
| Decl * | ActOnStartOfFunctionDef (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists, SkipBodyInfo *SkipBody=nullptr, FnBodyKind BodyKind=FnBodyKind::Other) |
| Decl * | ActOnStartOfFunctionDef (Scope *S, Decl *D, SkipBodyInfo *SkipBody=nullptr, FnBodyKind BodyKind=FnBodyKind::Other) |
| void | applyFunctionAttributesBeforeParsingBody (Decl *FD) |
| 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. | |
| Decl * | ActOnFinishFunctionBody (Decl *Decl, Stmt *Body, bool IsInstantiation=false, bool RetainFunctionScopeInfo=false) |
| Performs semantic analysis at the end of a function body. | |
| Decl * | ActOnSkippedFunctionBody (Decl *Decl) |
| void | ActOnFinishInlineFunctionDef (FunctionDecl *D) |
| void | ActOnFinishDelayedAttribute (Scope *S, Decl *D, ParsedAttributes &Attrs) |
| ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is delayed. | |
| 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. | |
| Decl * | ActOnFileScopeAsmDecl (Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc) |
| TopLevelStmtDecl * | ActOnStartTopLevelStmtDecl (Scope *S) |
| void | ActOnFinishTopLevelStmtDecl (TopLevelStmtDecl *D, Stmt *Statement) |
| void | ActOnPopScope (SourceLocation Loc, Scope *S) |
| Decl * | 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. | |
| Decl * | ParsedFreeStandingDeclSpec (Scope *S, AccessSpecifier AS, DeclSpec &DS, const ParsedAttributesView &DeclAttrs, MultiTemplateParamsArg TemplateParams, bool IsExplicitInstantiation, RecordDecl *&AnonRecord, SourceLocation EllipsisLoc={}) |
| ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e.g. | |
| Decl * | BuildAnonymousStructOrUnion (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. | |
| Decl * | BuildMicrosoftCAnonymousStruct (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 {'. | |
| Decl * | ActOnField (Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth) |
| ActOnField - Each field of a C struct/union is passed into this in order to create a FieldDecl object for it. | |
| FieldDecl * | HandleField (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS) |
| HandleField - Analyze a field of a C struct or a C++ data member. | |
| FieldDecl * | CheckFieldDecl (DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=nullptr) |
| Build a new FieldDecl and check its well-formedness. | |
| bool | CheckNontrivialField (FieldDecl *FD) |
| void | ActOnLastBitfield (SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls) |
| ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions. | |
| 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 (Scope *S, 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 | 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). | |
| ASTContext::CXXRecordDeclRelocationInfo | CheckCXX2CRelocatable (const clang::CXXRecordDecl *D) |
| void | ActOnTagFinishSkippedDefinition (SkippedDefinitionContext Context) |
| void | ActOnTagDefinitionError (Scope *S, Decl *TagDecl) |
| ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a tag. | |
| EnumConstantDecl * | CheckEnumConstant (EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *val) |
| bool | CheckEnumUnderlyingType (TypeSourceInfo *TI) |
| Check that this is a valid underlying type for an enum declaration. | |
| 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. | |
| Decl * | ActOnEnumConstant (Scope *S, Decl *EnumDecl, Decl *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val, SkipBodyInfo *SkipBody=nullptr) |
| 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. | |
| TypedefDecl * | ParseTypedefDecl (Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo) |
| Subroutines of ActOnDeclarator(). | |
| bool | isIncompatibleTypedef (const TypeDecl *Old, TypedefNameDecl *New) |
| void | mergeDeclAttributes (NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AvailabilityMergeKind::Redeclaration) |
| mergeDeclAttributes - Copy attributes from the Old decl to the New one. | |
| void | CheckAttributesOnDeducedType (Decl *D) |
| CheckAttributesOnDeducedType - Calls Sema functions for attributes that requires the type to be deduced. | |
| 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'. | |
| void | CleanupMergedEnum (Scope *S, Decl *New) |
| CleanupMergedEnum - We have just merged the decl 'New' by making another definition visible. | |
| 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) |
| [module.interface]p6: A redeclaration of an entity X is implicitly exported if X was introduced by an exported declaration; otherwise it shall not be exported. | |
| bool | CheckRedeclarationInModule (NamedDecl *New, NamedDecl *Old) |
| A wrapper function for checking the semantic restrictions of a redeclaration within a module. | |
| bool | IsRedefinitionInModule (const NamedDecl *New, const NamedDecl *Old) const |
| Check the redefinition in C++20 Modules. | |
| 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. | |
| Scope * | getNonFieldDeclScope (Scope *S) |
| getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared. | |
| FunctionDecl * | CreateBuiltin (IdentifierInfo *II, QualType Type, unsigned ID, SourceLocation Loc) |
| NamedDecl * | LazilyCreateBuiltin (IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc) |
| LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope. | |
| const AttributedType * | getCallingConvAttributedType (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. | |
| NamedDecl * | findLocallyScopedExternCDecl (DeclarationName Name) |
| Look for a locally scoped extern "C" declaration by the given name. | |
| void | deduceOpenCLAddressSpace (ValueDecl *decl) |
| void | deduceHLSLAddressSpace (VarDecl *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 *Init, unsigned DiagID=diag::err_init_element_not_constant) |
| 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::LambdaScopeInfo * | RebuildLambdaScopeInfo (CXXMethodDecl *CallOperator) |
| NamedDecl * | ImplicitlyDefineFunction (SourceLocation Loc, IdentifierInfo &II, Scope *S) |
| ImplicitlyDefineFunction - An undeclared identifier was used in a function call, forming a call to an implicitly defined function (per C99 6.5.1p2). | |
| 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, const 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. | |
| FunctionEmissionStatus | getEmissionStatus (const FunctionDecl *Decl, bool Final=false) |
| bool | shouldIgnoreInHostDeviceCheck (FunctionDecl *Callee) |
| static Scope * | getScopeForDeclContext (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 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. | |
| SourceLocation | getAttrLoc (const AttributeCommonInfo &CI) |
| template<typename AttrInfo> | |
| bool | checkUInt32Argument (const AttrInfo &AI, const Expr *Expr, uint32_t &Val, unsigned Idx=UINT_MAX, bool StrictlyUnsigned=false) |
| If Expr is a valid integer constant, get the value of the integer expression and return success or failure. | |
| 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, const IdentifierInfo *Platform, bool Implicit, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool IsStrict, StringRef Replacement, AvailabilityMergeKind AMK, int Priority, const IdentifierInfo *IIEnvironment) |
| TypeVisibilityAttr * | mergeTypeVisibilityAttr (Decl *D, const AttributeCommonInfo &CI, TypeVisibilityAttr::VisibilityType Vis) |
| VisibilityAttr * | mergeVisibilityAttr (Decl *D, const AttributeCommonInfo &CI, VisibilityAttr::VisibilityType Vis) |
| void | mergeVisibilityType (Decl *D, SourceLocation Loc, VisibilityAttr::VisibilityType Type) |
| 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) |
| ErrorAttr * | mergeErrorAttr (Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic) |
| FormatAttr * | mergeFormatAttr (Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Format, int FormatIdx, int FirstArg) |
| FormatMatchesAttr * | mergeFormatMatchesAttr (Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Format, int FormatIdx, StringLiteral *FormatStr) |
| ModularFormatAttr * | mergeModularFormatAttr (Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *ModularImplFn, StringRef ImplName, MutableArrayRef< StringRef > Aspects) |
| 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. | |
| Attr * | CreateAnnotationAttr (const AttributeCommonInfo &CI, StringRef Annot, MutableArrayRef< Expr * > Args) |
| CreateAnnotationAttr - Creates an annotation Annot with Args arguments. | |
| Attr * | CreateAnnotationAttr (const ParsedAttr &AL) |
| bool | checkMSInheritanceAttrOnDefinition (CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel SemanticSpelling) |
| void | CheckAlignasUnderalignment (Decl *D) |
| void | AddModeAttr (Decl *D, const AttributeCommonInfo &CI, const 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) |
| 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=CUDAFunctionTarget::InvalidTarget) |
Check validaty of calling convention attribute attr. | |
| 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. | |
| CUDAClusterDimsAttr * | createClusterDimsAttr (const AttributeCommonInfo &CI, Expr *X, Expr *Y, Expr *Z) |
| Add a cluster_dims attribute to a particular declaration. | |
| void | addClusterDimsAttr (Decl *D, const AttributeCommonInfo &CI, Expr *X, Expr *Y, Expr *Z) |
| void | addNoClusterAttr (Decl *D, const AttributeCommonInfo &CI) |
| Add a no_cluster attribute to a particular declaration. | |
| UuidAttr * | mergeUuidAttr (Decl *D, const AttributeCommonInfo &CI, StringRef UuidAsWritten, MSGuidDecl *GuidDecl) |
| BTFDeclTagAttr * | mergeBTFDeclTagAttr (Decl *D, const BTFDeclTagAttr &AL) |
| 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) |
| EnforceTCBAttr * | mergeEnforceTCBAttr (Decl *D, const EnforceTCBAttr &AL) |
| EnforceTCBLeafAttr * | mergeEnforceTCBLeafAttr (Decl *D, const EnforceTCBLeafAttr &AL) |
| void | ProcessDeclAttributeDelayed (Decl *D, const ParsedAttributesView &AttrList) |
| Helper for delayed processing TransparentUnion or BPFPreserveAccessIndexAttr attribute. | |
| 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) |
| Annotation attributes are the only attributes allowed after an access specifier. | |
| 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. | |
| void | DiagnoseUnknownAttribute (const ParsedAttr &AL) |
| NamedDecl * | DeclClonePragmaWeak (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. | |
| bool | CheckSpanLikeType (const AttributeCommonInfo &CI, const QualType &Ty) |
| Check that the type is a plain record with one field being a pointer type and the other field being an integer. | |
| template<typename AttrInfo> | |
| bool | checkFunctionOrMethodParameterIndex (const Decl *D, const AttrInfo &AI, unsigned AttrArgNum, const Expr *IdxExpr, ParamIdx &Idx, bool CanIndexImplicitThis=false, bool CanIndexVariadicArguments=false) |
| Check if IdxExpr is a valid parameter index for a function or instance method D. | |
| template<typename AttrInfo> | |
| static std::enable_if_t< std::is_base_of_v< Attr, AttrInfo >, SourceLocation > | getAttrLoc (const AttrInfo &AL) |
| A helper function to provide Attribute Location for the Attr types AND the ParsedAttr. | |
C++ Declarations | |
Implementations are in SemaDeclCXX.cpp | |
| enum class | ComparisonCategoryUsage { OperatorInExpression , DefaultedOperator } |
| enum class | StringEvaluationContext { StaticAssert = 0 , Asm = 1 } |
| 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 class | CheckConstexprKind { Diagnose , CheckValid } |
| typedef std::pair< CXXRecordDecl *, SourceLocation > | VTableUse |
| The list of classes whose vtables have been used within this translation unit, and the source locations at which the first use occurred. | |
| typedef llvm::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, CXXSpecialMemberKind > | SpecialMemberDecl |
| typedef ProcessingContextState | ParsingClassState |
| SmallVector< VTableUse, 16 > | VTableUses |
| The list of vtables that are required but have not yet been materialized. | |
| llvm::DenseMap< CXXRecordDecl *, bool > | VTablesUsed |
| The set of classes whose vtables have been used within this translation unit, and a bit that will be true if the vtable is required to be emitted (otherwise, it should be emitted only if needed by code generation). | |
| 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< CXXFieldCollector > | FieldCollector |
| FieldCollector - Collects CXXFieldDecls during parsing of C++ classes. | |
| NamedDeclSetType | UnusedPrivateFields |
| Set containing all declared private fields that are not used. | |
| std::unique_ptr< RecordDeclSetTy > | PureVirtualClassDiagSet |
| 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. | |
| ClassTemplateDecl * | StdInitializerList |
| The C++ "std::initializer_list" template, which is defined in <initializer_list>. | |
| ClassTemplateDecl * | StdTypeIdentity |
| The C++ "std::type_identity" template, which is defined in <type_traits>. | |
| llvm::DenseMap< ParmVarDecl *, SourceLocation > | UnparsedDefaultArgLocs |
| llvm::MapVector< NamedDecl *, SourceLocation > | UndefinedButUsed |
| 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. | |
| Decl * | ActOnStartNamespaceDef (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. | |
| NamespaceDecl * | getStdNamespace () const |
| NamespaceDecl * | getOrCreateStdNamespace () |
| Retrieve the special "std" namespace, which may require us to implicitly define the namespace. | |
| CXXRecordDecl * | getStdBadAlloc () const |
| EnumDecl * | getStdAlignValT () const |
| TypeAwareAllocationMode | ShouldUseTypeAwareOperatorNewOrDelete () const |
| FunctionDecl * | BuildTypeAwareUsualDelete (FunctionTemplateDecl *FnDecl, QualType AllocType, SourceLocation) |
| ValueDecl * | tryLookupUnambiguousFieldDecl (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. | |
| bool | isStdTypeIdentity (QualType Ty, QualType *TypeArgument, const Decl **MalformedDecl=nullptr) |
| Tests whether Ty is an instance of std::type_identity and, if it is and TypeArgument 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. | |
| QualType | tryBuildStdTypeIdentity (QualType Type, SourceLocation Loc) |
| Looks for the std::type_identity template and instantiates it with Type, or returns a null type if type_identity has not been declared. | |
| bool | isInitListConstructor (const FunctionDecl *Ctor) |
| Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2. | |
| Decl * | ActOnUsingDirective (Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList) |
| void | PushUsingDirective (Scope *S, UsingDirectiveDecl *UDir) |
| Decl * | ActOnNamespaceAliasDef (Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) |
| void | 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. | |
| UsingShadowDecl * | BuildUsingShadowDecl (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. | |
| NamedDecl * | 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. | |
| NamedDecl * | BuildUsingEnumDeclaration (Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation NameLoc, TypeSourceInfo *EnumType, EnumDecl *ED) |
| NamedDecl * | BuildUsingPackDecl (NamedDecl *InstantiatedFrom, ArrayRef< NamedDecl * > Expansions) |
| bool | CheckInheritingConstructorUsingDecl (UsingDecl *UD) |
| Additional checks for a using declaration referring to a constructor name. | |
| CXXConstructorDecl * | findInheritingConstructor (SourceLocation Loc, CXXConstructorDecl *BaseCtor, ConstructorUsingShadowDecl *DerivedShadow) |
| Given a derived-class using shadow declaration for a constructor and the correspnding base class constructor, find or create the implicit synthesized derived class constructor to use for this initialization. | |
| Decl * | ActOnUsingDeclaration (Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) |
| Decl * | ActOnUsingEnumDeclaration (Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceRange TyLoc, const IdentifierInfo &II, ParsedType Ty, const CXXScopeSpec &SS) |
| Decl * | ActOnAliasDeclaration (Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec) |
| ExprResult | BuildCXXConstructExpr (SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, 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, CXXRecordDecl *DeclInit) |
| 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 *D, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr) |
| Add an exception-specification to the given member or friend function (or function template). | |
| bool | ShouldDeleteSpecialMember (CXXMethodDecl *MD, CXXSpecialMemberKind 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. | |
| CXXConstructorDecl * | DeclareImplicitDefaultConstructor (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. | |
| CXXDestructorDecl * | DeclareImplicitDestructor (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. | |
| CXXConstructorDecl * | DeclareImplicitCopyConstructor (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. | |
| CXXConstructorDecl * | DeclareImplicitMoveConstructor (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. | |
| CXXMethodDecl * | DeclareImplicitCopyAssignment (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. | |
| CXXMethodDecl * | DeclareImplicitMoveAssignment (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. | |
| Decl * | ActOnStartLinkageSpecification (Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc) |
| ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification, including the language and (if present) the '{'. | |
| Decl * | ActOnFinishLinkageSpecification (Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc) |
| ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpec. | |
| CXXRecordDecl * | getCurrentClass (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. | |
| NamedDecl * | ActOnCXXMemberDeclarator (Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle) |
| ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed. | |
| void | ActOnStartCXXInClassMemberInitializer () |
| Enter a new C++ default initializer scope. | |
| void | ActOnFinishCXXInClassMemberInitializer (Decl *VarDecl, SourceLocation EqualLoc, ExprResult 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={}) |
| 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 CXXRecordDecl * > *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 | checkIncorrectVTablePointerAuthenticationAttribute (CXXRecordDecl &RD) |
| Check that VTable Pointer authentication is only being set on the first first instantiation of the vtable. | |
| 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 | EvaluateAsString (Expr *Message, APValue &Result, ASTContext &Ctx, StringEvaluationContext EvalContext, bool ErrorOnInvalidMessage) |
| bool | EvaluateAsString (Expr *Message, std::string &Result, ASTContext &Ctx, StringEvaluationContext EvalContext, bool ErrorOnInvalidMessage) |
| Decl * | ActOnStaticAssertDeclaration (SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc) |
| Decl * | BuildStaticAssertDeclaration (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. | |
| void | DiagnoseTypeTraitDetails (const Expr *E) |
| If E represents a built-in type trait, or a known standard type trait, try to print more information about why the type type-trait failed. | |
| Decl * | ActOnFriendTypeDecl (Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams, SourceLocation EllipsisLoc) |
| Handle a friend type declaration. | |
| NamedDecl * | ActOnFriendFunctionDecl (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) |
| QualType | CheckConstructorDeclarator (Declarator &D, QualType R, StorageClass &SC) |
CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructor declarator D with type R. | |
| 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. | |
| Decl * | ActOnConversionDeclarator (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, CXXSpecialMemberKind 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) |
| CXXBaseSpecifier * | CheckBaseSpecifier (CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) |
| Check the validity of a C++ base class 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, CXXRecordDecl *Derived, CXXRecordDecl *Base, CXXBasePaths &Paths) |
Determine whether the type Derived is a C++ class that is derived from the type Base. | |
| bool | IsDerivedFrom (SourceLocation Loc, CXXRecordDecl *Derived, CXXRecordDecl *Base) |
| bool | IsDerivedFrom (SourceLocation Loc, QualType Derived, QualType Base) |
| bool | IsDerivedFrom (SourceLocation Loc, QualType Derived, QualType Base, CXXBasePaths &Paths) |
| 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 (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) |
| CheckIfOverriddenFunctionIsMarkedFinal - 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. | |
| CXXSpecialMemberKind | getSpecialMember (const CXXMethodDecl *MD) |
| VarDecl * | BuildExceptionDeclaration (Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id) |
| Perform semantic analysis for the variable declaration that occurs within a C++ catch clause, returning the newly-created variable. | |
| Decl * | ActOnExceptionDeclarator (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, SourceLocation EllipsisLoc, const ParsedAttributesView &Attr, MultiTemplateParamsArg TempParamLists) |
| Handle a friend tag declaration where the scope specifier was templated. | |
| MSPropertyDecl * | HandleMSProperty (Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, const ParsedAttr &MSPropertyAttr) |
| HandleMSProperty - Analyze a __delcspec(property) field of a C++ class. | |
| void | DiagnoseNontrivial (const CXXRecordDecl *Record, CXXSpecialMemberKind CSM) |
| Diagnose why the specified class does not have a trivial special member of the given kind. | |
| bool | SpecialMemberIsTrivial (CXXMethodDecl *MD, CXXSpecialMemberKind CSM, TrivialABIHandling TAH=TrivialABIHandling::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. | |
| Decl * | ActOnEmptyDeclaration (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, StringLiteral *Message=nullptr) |
| void | SetDeclDefaulted (Decl *dcl, SourceLocation DefaultLoc) |
| void | SetFunctionBodyKind (Decl *D, SourceLocation Loc, FnBodyKind BodyKind, StringLiteral *DeletedMessage=nullptr) |
| void | ActOnStartTrailingRequiresClause (Scope *S, Declarator &D) |
| ExprResult | ActOnFinishTrailingRequiresClause (ExprResult ConstraintExpr) |
| ExprResult | ActOnRequiresClause (ExprResult ConstraintExpr) |
| NamedDecl * | ActOnDecompositionDeclarator (Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) |
| void | DiagPlaceholderVariableDefinition (SourceLocation Loc) |
| bool | DiagRedefinedPlaceholderFieldDecl (SourceLocation Loc, RecordDecl *ClassDecl, const IdentifierInfo *Name) |
| UnsignedOrNone | GetDecompositionElementCount (QualType DecompType, SourceLocation Loc) |
| void | CheckCompleteDecompositionDeclaration (DecompositionDecl *DD) |
| void | NoteDeletedInheritingConstructor (CXXConstructorDecl *CD) |
| void | ActOnDefaultCtorInitializers (Decl *CDtorDecl) |
| ParsingClassState | PushParsingClass () |
| void | PopParsingClass (ParsingClassState state) |
| ValueDecl * | tryLookupCtorInitMemberDecl (CXXRecordDecl *ClassDecl, CXXScopeSpec &SS, ParsedType TemplateTypeTy, IdentifierInfo *MemberOrBase) |
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 | ReuseLambdaContextDecl_t { ReuseLambdaContextDecl } |
| enum class | ConditionKind { Boolean , ConstexprIf , Switch } |
| 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 *, int > | RefsMinusAssignments |
| 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. | |
| RecordDecl * | StdSourceLocationImplDecl |
| 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. | |
| std::vector< std::pair< QualType, unsigned > > | ExcessPrecisionNotSatisfied |
| SourceLocation | LocationOfExcessPrecisionNotSatisfied |
| const ExpressionEvaluationContextRecord & | currentEvaluationContext () const |
| ExpressionEvaluationContextRecord & | currentEvaluationContext () |
| ExpressionEvaluationContextRecord & | parentEvaluationContext () |
| const ExpressionEvaluationContextRecord & | parentEvaluationContext () const |
| bool | isAttrContext () 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 *ClassReceiver=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 | PushExpressionEvaluationContextForFunction (ExpressionEvaluationContext NewContext, FunctionDecl *FD) |
| void | PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other) |
| void | PopExpressionEvaluationContext () |
| void | DiscardCleanupsInEvaluationContext () |
| ExprResult | TransformToPotentiallyEvaluated (Expr *E) |
| TypeSourceInfo * | TransformToPotentiallyEvaluated (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=TryCaptureKind::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={}) |
| 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={}, DeclContext *LookupCtx=nullptr) |
| Diagnose an empty lookup. | |
| NonOdrUseReason | getNonOdrUseReasonInCurrentContext (ValueDecl *D) |
If D cannot be odr-used in the current expression evaluation context, return a reason explaining why. | |
| DeclRefExpr * | BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr) |
| DeclRefExpr * | BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, const CXXScopeSpec *SS=nullptr, NamedDecl *FoundD=nullptr, SourceLocation TemplateKWLoc=SourceLocation(), const TemplateArgumentListInfo *TemplateArgs=nullptr) |
| DeclRefExpr * | BuildDeclRefExpr (ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, NestedNameSpecifierLoc NNS, NamedDecl *FoundD=nullptr, SourceLocation TemplateKWLoc=SourceLocation(), const TemplateArgumentListInfo *TemplateArgs=nullptr) |
| BuildDeclRefExpr - Build an expression that references a declaration that does not require a closure capture. | |
| bool | UseArgumentDependentLookup (const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen) |
| ExprResult | BuildQualifiedDeclarationNameExpr (CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, TypeSourceInfo **RecoveryTSI=nullptr) |
| BuildQualifiedDeclarationNameExpr - Build a C++ qualified declaration name, generally during template instantiation. | |
| ExprResult | 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< Token > | ExpandFunctionLocalPredefinedMacros (ArrayRef< Token > Toks) |
| ExprResult | BuildPredefinedExpr (SourceLocation Loc, PredefinedIdentKind IK) |
| ExprResult | ActOnPredefinedExpr (SourceLocation Loc, tok::TokenKind Kind) |
| ExprResult | ActOnIntegerConstant (SourceLocation Loc, int64_t Val) |
| bool | CheckLoopHintExpr (Expr *E, SourceLocation Loc, bool AllowZero) |
| 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 | ActOnCXXParenListInitExpr (ArrayRef< Expr * > Args, QualType T, unsigned NumUserSpecifiedExprs, SourceLocation InitLoc, SourceLocation LParenLoc, SourceLocation RParenLoc) |
| 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) |
| Unary Operators. 'Tok' is the token for the operator. | |
| 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 | CreateBuiltinMatrixSingleSubscriptExpr (Expr *Base, Expr *RowIdx, SourceLocation RBLoc) |
| ExprResult | CreateBuiltinMatrixSubscriptExpr (Expr *Base, Expr *RowIdx, Expr *ColumnIdx, SourceLocation RBLoc) |
| 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. | |
| Expr * | BuildBuiltinCallExpr (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) |
| Binary Operators. 'Tok' is the token for the operator. | |
| ExprResult | BuildBinOp (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr, bool ForFoldExpression=false) |
| ExprResult | CreateBuiltinBinOp (SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr, bool ForFoldExpression=false) |
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) |
| Look for instances where it is likely the comma operator is confused with another operator. | |
| ExprResult | ActOnConditionalOp (SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr) |
| ActOnConditionalOp - Parse a ? | |
| 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 | ActOnEmbedExpr (SourceLocation EmbedKeywordLoc, StringLiteral *BinaryData, StringRef FileName) |
| 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) |
| ActOnConvertVectorExpr - create a new convert-vector expression from the provided arguments. | |
| ExprResult | ActOnAsTypeExpr (Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc) |
| Parse a __builtin_astype expression. | |
| 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. | |
| 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) |
| ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, AllowFoldKind CanFold=AllowFoldKind::No) |
| VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate diagnostics. | |
| ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, unsigned DiagID, AllowFoldKind CanFold=AllowFoldKind::No) |
| ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result=nullptr, AllowFoldKind CanFold=AllowFoldKind::No) |
| ExprResult | VerifyIntegerConstantExpression (Expr *E, AllowFoldKind CanFold=AllowFoldKind::No) |
| 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. | |
| 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) |
| Return a signed ext_vector_type that is of identical size and number of elements. | |
| 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, BinaryOperatorKind Opc) |
| QualType | CheckMatrixLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) |
| 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? | |
| 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? | |
| 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 ¶mType) |
| 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 | prepareMatrixSplat (QualType MatrixTy, Expr *SplattedExpr) |
| Prepare SplattedExpr for a matrix 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 | UsualUnaryFPConversions (Expr *E) |
| UsualUnaryFPConversions - Promotes floating-point types according to the current language semantics. | |
| 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=VariadicCallType::DoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false) |
| GatherArgumentsForCall - Collector argument expressions for various form of call prototypes. | |
| ExprResult | DefaultVariadicArgumentPromotion (Expr *E, VariadicCallType CT, FunctionDecl *FDecl) |
| void | checkEnumArithmeticConversions (Expr *LHS, Expr *RHS, SourceLocation Loc, ArithConvKind ACK) |
| Check that the usual arithmetic conversions can be performed on this pair of expressions that might be of enumeration 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 | IsAssignConvertCompatible (AssignConvertType ConvTy) |
| 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) |
| Diagnose cases where a scalar was implicitly converted to a vector and diagnose the underlying types. | |
| QualType | CheckMultiplyDivideOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) |
| 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, BinaryOperatorKind Opc, 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 | 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 | needsRebuildOfDefaultArgOrInit () const |
| bool | isCheckingDefaultArgumentOrInitializer () const |
| std::optional< ExpressionEvaluationContextRecord::InitializationContext > | InnermostDeclarationWithDelayedImmediateInvocations () const |
| std::optional< ExpressionEvaluationContextRecord::InitializationContext > | OutermostDeclarationWithDelayedImmediateInvocations () const |
| DefaultedComparisonKind | getDefaultedComparisonKind (const FunctionDecl *FD) |
| const FieldDecl * | getSelfAssignmentClassMemberCandidate (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. | |
| void | maybeExtendBlockObject (ExprResult &E) |
| Do an explicit extend of the given block pointer if we're in ARC. | |
| void | DiagnosePrecisionLossInComplexDivision () |
| 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. | |
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 class | MissingImportKind { Declaration , Definition , DefaultArgument , ExplicitSpecialization , PartialSpecialization } |
| Kinds of missing import. More... | |
| typedef llvm::SmallSet< SourceLocation, 2 > | SrcLocSet |
| typedef llvm::DenseMap< IdentifierInfo *, SrcLocSet > | IdentifierSourceLocations |
| typedef llvm::SmallSetVector< DeclContext *, 16 > | AssociatedNamespaceSet |
| typedef llvm::SmallSetVector< CXXRecordDecl *, 16 > | AssociatedClassSet |
| 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< SpecialMemberOverloadResultEntry > | SpecialMemberCache |
| A cache of special member function overload resolution results for C++ records. | |
| SpecialMemberOverloadResult | LookupSpecialMember (CXXRecordDecl *D, CXXSpecialMemberKind SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis) |
| RedeclarationKind | forRedeclarationInCurContext () const |
| NamedDecl * | LookupSingleName (Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=RedeclarationKind::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, QualType ObjectType, 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. | |
| 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) |
| LabelDecl * | LookupOrCreateLabel (IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation()) |
| LookupOrCreateLabel - Do a name lookup of a label with the specified name. | |
| LabelDecl * | LookupExistingLabel (IdentifierInfo *II, SourceLocation IdentLoc) |
| Perform a name lookup for a label with the specified name; this does not create a new label if the lookup fails. | |
| DeclContextLookupResult | LookupConstructors (CXXRecordDecl *Class) |
| Look up the constructors for the given class. | |
| CXXConstructorDecl * | LookupDefaultConstructor (CXXRecordDecl *Class) |
| Look up the default constructor for the given class. | |
| CXXConstructorDecl * | LookupCopyingConstructor (CXXRecordDecl *Class, unsigned Quals) |
| Look up the copying constructor for the given class. | |
| CXXMethodDecl * | LookupCopyingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals) |
| Look up the copying assignment operator for the given class. | |
| CXXConstructorDecl * | LookupMovingConstructor (CXXRecordDecl *Class, unsigned Quals) |
| Look up the moving constructor for the given class. | |
| CXXMethodDecl * | LookupMovingAssignment (CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals) |
| Look up the moving assignment operator for the given class. | |
| CXXDestructorDecl * | LookupDestructor (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. | |
| 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. | |
| 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. | |
| 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) |
| 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... | |
| Module * | getCurrentModule () 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, bool SeenNoTrivialPPDirective) |
| 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. | |
| Decl * | ActOnStartExportDecl (Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc) |
| We have parsed the start of an export declaration, including the '{' (if present). | |
| Decl * | ActOnFinishExportDecl (Scope *S, Decl *ExportDecl, SourceLocation RBraceLoc) |
| Complete the definition of an export declaration. | |
C++ Overloading | |
Implementations are in SemaOverload.cpp | |
| enum class | AllowedExplicit { None , Conversions , All } |
| enum class | MemberPointerConversionResult { Success , DifferentPointee , NotDerived , Ambiguous , Virtual , Inaccessible } |
| enum class | MemberPointerConversionDirection : bool { Downcast , Upcast } |
| 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 | 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). | |
| MemberPointerConversionResult | CheckMemberPointerConversion (QualType FromType, const MemberPointerType *ToPtrType, CastKind &Kind, CXXCastPath &BasePath, SourceLocation CheckLoc, SourceRange OpRange, bool IgnoreBaseAccess, MemberPointerConversionDirection Direction) |
| 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) const |
| Determine whether the conversion from FromType to ToType is a valid conversion of ExtInfo/ExtProtoInfo on the nested function type. | |
| bool | TryFunctionConversion (QualType FromType, QualType ToType, QualType &ResultTy) const |
| Same as IsFunctionConversion, but if this would return true, it sets ResultTy to ToType. | |
| bool | DiagnoseMultipleUserDefinedConversion (Expr *From, QualType ToType) |
| void | DiagnoseUseOfDeletedFunction (SourceLocation Loc, SourceRange Range, DeclarationName Name, OverloadCandidateSet &CandidateSet, FunctionDecl *Fn, MultiExprArg Args, bool IsMember=false) |
| ExprResult | InitializeExplicitObjectArgument (Sema &S, Expr *Obj, FunctionDecl *Fun) |
| ExprResult | PerformImplicitObjectArgumentInitialization (Expr *From, NestedNameSpecifier Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method) |
| PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the given Method with the given expression. | |
| 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={}, OverloadCandidateParamOrder PO={}, bool AggregateCandidateDeduction=false, bool StrictPackMatch=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={}, OverloadCandidateParamOrder PO={}, bool StrictPackMatch=false) |
AddMethodCandidate - Adds the given C++ member function to the set of candidate functions, using the given function call arguments and the object argument (Object). | |
| void | AddMethodTemplateCandidate (FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, 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, CheckNonDependentConversionsFlag UserConversionFlag, 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, bool StrictPackMatch=false) |
| 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) |
| FunctionDecl * | ResolveAddressOfOverloadedFunction (Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr) |
ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over.over]), where From is an expression with overloaded function type and ToType is the type we're trying to resolve to. | |
| FunctionDecl * | resolveAddressOfSingleOverloadCandidate (Expr *E, DeclAccessPair &FoundResult) |
| Given an expression that refers to an overloaded function, try to resolve that function to a single function that can have its address taken. | |
| bool | resolveAndFixAddressOfSingleOverloadCandidate (ExprResult &SrcExpr, bool DoFunctionPointerConversion=false) |
| Given an overloaded function, tries to turn it into a non-overloaded function reference using resolveAddressOfSingleOverloadCandidate. | |
| FunctionDecl * | ResolveSingleFunctionTemplateSpecialization (OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr, TemplateSpecCandidateSet *FailedTSC=nullptr, bool ForTypeDeduction=false) |
| 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) |
| ObjCMethodDecl * | SelectBestMethod (Selector Sel, MultiExprArg Args, bool IsInstance, SmallVectorImpl< ObjCMethodDecl * > &Methods) |
Statements | |
Implementations are in SemaStmt.cpp | |
| enum | BuildForRangeKind { BFRK_Build , BFRK_Rebuild , BFRK_Check } |
| enum class | SimplerImplicitMoveMode { ForceOff , Normal , ForceOn } |
| typedef std::pair< StringRef, QualType > | CapturedParamNameType |
| SmallVector< Scope *, 2 > | CurrentSEHFinally |
| Stack of active SEH __finally scopes. Can be empty. | |
| SmallVector< std::pair< Scope *, SourceLocation >, 2 > | CurrentDefer |
| Stack of '_Defer' statements that are currently being parsed, as well as the locations of their '_Defer' keywords. | |
| 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::CompoundScopeInfo & | getCurCompoundScope () 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. | |
| 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, LabelDecl *Label, SourceLocation LabelLoc) |
| StmtResult | ActOnBreakStmt (SourceLocation BreakLoc, Scope *CurScope, LabelDecl *Label, SourceLocation LabelLoc) |
| void | ActOnStartOfDeferStmt (SourceLocation DeferLoc, Scope *CurScope) |
| void | ActOnDeferStmtError (Scope *CurScope) |
| StmtResult | ActOnEndOfDeferStmt (Stmt *Body, 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 VarDecl * | 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. | |
| 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 | 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. | |
| void | DiagnoseExceptionUse (SourceLocation Loc, bool IsTry) |
| 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 () |
| RecordDecl * | CreateCapturedStmtRecordDecl (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_Other , TPC_FunctionTemplate , TPC_ClassTemplateMember , TPC_FriendClassTemplate , TPC_FriendFunctionTemplate , TPC_FriendFunctionTemplateDefinition , TPC_TemplateTemplateParameterPack } |
| 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_TemplateParamsEquivalent } |
| Enumeration describing how template parameter lists are compared for equality. More... | |
| typedef llvm::MapVector< const FunctionDecl *, std::unique_ptr< LateParsedTemplate > > | LateParsedTemplateMapT |
| LateParsedTemplateMapT | LateParsedTemplateMap |
| void | resetFPOptions (FPOptions FPO) |
| ArrayRef< InventedTemplateParameterInfo > | getInventedParameterInfos () 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, 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 | 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, bool *Unreachable=nullptr) |
| 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. | |
| TemplateDecl * | AdjustDeclIfTemplate (Decl *&Decl) |
| AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference the templated declaration and return a pointer to the template declaration. | |
| NamedDecl * | ActOnTypeParameter (Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg, bool HasTypeConstraint) |
| ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed. | |
| 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, TemplateDecl *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) |
| NamedDecl * | ActOnNonTypeTemplateParameter (Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg) |
| NamedDecl * | ActOnTemplateTemplateParameter (Scope *S, SourceLocation TmpLoc, TemplateNameKind Kind, bool TypenameKeyword, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument DefaultArg) |
| ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e.g. | |
| TemplateParameterList * | ActOnTemplateParameterList (unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, 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. | |
| TemplateParameterList * | MatchTemplateParametersToScopeSpecifier (SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef< TemplateParameterList * > ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic=false) |
| Match the given template parameter lists to the given scope specifier, returning the template parameter list that applies to the name. | |
| TemplateParameterList * | GetTemplateParameterList (TemplateDecl *TD) |
| Returns the template parameter list with all default template argument information. | |
| 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 (ElaboratedTypeKeyword Keyword, TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, Scope *Scope, bool ForNestedNameSpecifier) |
| TypeResult | ActOnTemplateIdType (Scope *S, ElaboratedTypeKeyword ElaboratedKeyword, SourceLocation ElaboratedKeywordLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy Template, const 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 *TSI, LookupResult &Previous, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) |
| DeclResult | CheckVarTemplateId (VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs, bool SetWrittenArgs) |
| 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 | CheckVarOrConceptTemplateTemplateId (const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, TemplateTemplateParmDecl *Template, SourceLocation TemplateLoc, const TemplateArgumentListInfo *TemplateArgs) |
| ExprResult | CheckConceptTemplateId (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &ConceptNameInfo, NamedDecl *FoundDecl, TemplateDecl *NamedConcept, const TemplateArgumentListInfo *TemplateArgs, bool DoCheckConstraintSatisfaction=true) |
| void | diagnoseMissingTemplateArguments (TemplateName Name, SourceLocation Loc) |
| void | diagnoseMissingTemplateArguments (const CXXScopeSpec &SS, bool TemplateKeyword, TemplateDecl *TD, 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, bool IsAddressOfOperand) |
| UnsignedOrNone | getPackIndex (TemplateArgument Pack) const |
| TemplateArgument | getPackSubstitutedTemplateArgument (TemplateArgument Arg) const |
| ExprResult | BuildSubstNonTypeTemplateParmExpr (Decl *AssociatedDecl, const NonTypeTemplateParmDecl *NTTP, SourceLocation loc, TemplateArgument Replacement, UnsignedOrNone PackIndex, bool Final) |
| 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) |
| Decl * | ActOnTemplateDeclarator (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 TemplateKWLoc, SourceLocation TemplateNameLoc, 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, CheckTemplateArgumentInfo &CTAI, CheckTemplateArgumentKind CTAK) |
| Check that the given template argument corresponds to the given template parameter. | |
| bool | CheckTemplateArgumentList (TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, const DefaultArguments &DefaultArgs, bool PartialTemplateArgs, CheckTemplateArgumentInfo &CTAI, 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 | CheckTemplateArgumentList (TemplateDecl *Template, TemplateParameterList *Params, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, const DefaultArguments &DefaultArgs, bool PartialTemplateArgs, CheckTemplateArgumentInfo &CTAI, bool UpdateArgsWithConversions=true, bool *ConstraintsNotSatisfied=nullptr) |
| Check that the given template argument list is well-formed for specializing the given template. | |
| 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 (NamedDecl *Param, QualType InstantiatedParamType, Expr *Arg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted, bool StrictCheck, CheckTemplateArgumentKind CTAK) |
| Check a template argument against its corresponding non-type template parameter. | |
| bool | CheckTemplateTemplateArgument (TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg, bool PartialOrdering, bool *StrictPackMatch) |
| Check a template argument against its corresponding template template parameter. | |
| bool | CheckDeclCompatibleWithTemplateTemplate (TemplateDecl *Template, TemplateTemplateParmDecl *Param, const TemplateArgumentLoc &Arg) |
| void | NoteTemplateLocation (const NamedDecl &Decl, std::optional< SourceRange > ParamRange={}) |
| void | NoteTemplateParameterLocation (const NamedDecl &Decl) |
| ExprResult | BuildExpressionFromDeclTemplateArgument (const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc, NamedDecl *TemplateParam=nullptr) |
| 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, const 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". | |
| TypeSourceInfo * | RebuildTypeInCurrentInstantiation (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) |
| 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) |
| ConceptDecl * | ActOnStartConceptDefinition (Scope *S, MultiTemplateParamsArg TemplateParameterLists, const IdentifierInfo *Name, SourceLocation NameLoc) |
| ConceptDecl * | ActOnFinishConceptDefinition (Scope *S, ConceptDecl *C, Expr *ConstraintExpr, const ParsedAttributesView &Attrs) |
| void | CheckConceptRedefinition (ConceptDecl *NewDecl, LookupResult &Previous, bool &AddToScope) |
| bool | CheckConceptUseInDefinition (NamedDecl *Concept, SourceLocation Loc) |
| TypeResult | ActOnDependentTag (Scope *S, unsigned TagSpec, TagUseKind TUK, const CXXScopeSpec &SS, const 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 NamedDecl * | getAsTemplateNameDecl (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 | ActOnTemplateTemplateArgument (const ParsedTemplateArgument &Arg) |
| Invoked when parsing a template argument. | |
| 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. | |
| TypeSourceInfo * | CheckPackExpansion (TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, UnsignedOrNone NumExpansions) |
| Construct a pack expansion type from the pattern of the pack expansion. | |
| QualType | CheckPackExpansion (QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, UnsignedOrNone 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, UnsignedOrNone 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 FailOnPackProducingTemplates, bool &ShouldExpand, bool &RetainExpansion, UnsignedOrNone &NumExpansions, bool Diagnose=true) |
| Determine whether we could expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern. | |
| UnsignedOrNone | getNumArgumentsInExpansion (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Determine the number of arguments in the given pack expansion type. | |
| UnsignedOrNone | getNumArgumentsInExpansionFromUnexpanded (llvm::ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs) |
| bool | containsUnexpandedParameterPacks (Declarator &D) |
| Determine whether the given declarator contains any unexpanded parameter packs. | |
| TemplateArgumentLoc | getTemplateArgumentPackExpansionPattern (TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, UnsignedOrNone &NumExpansions) const |
| Returns the pattern of the pack expansion for a template argument. | |
| UnsignedOrNone | getFullyPackExpandedSize (TemplateArgument Arg) |
| Given a template argument that contains an unexpanded parameter pack, but which has already been substituted, attempt to determine the number of elements that will be produced once this argument is fully-expanded. | |
| 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 FullySubstituted=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, UnsignedOrNone NumExpansions) |
| ExprResult | BuildEmptyCXXFoldExpr (SourceLocation EllipsisLoc, BinaryOperatorKind Operator) |
| static void | collectUnexpandedParameterPacks (Expr *E, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded) |
| Collect the set of unexpanded parameter packs within the given expression. | |
Semantic Analysis | |
Implementations are in Sema.cpp | |
| typedef std::pair< SourceLocation, bool > | DeleteExprLoc |
| typedef llvm::SmallVector< DeleteExprLoc, 4 > | DeleteLocs |
| using | PoppedFunctionScopePtr |
| typedef OpaquePtr< DeclGroupRef > | DeclGroupPtrTy |
| typedef OpaquePtr< TemplateName > | TemplateTy |
| typedef OpaquePtr< QualType > | TypeTy |
| typedef void | LateTemplateParserCB(void *P, LateParsedTemplate &LPT) |
| Callback to the parser to parse templated functions when needed. | |
| 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::FunctionScopeInfo > | CachedFunctionScope |
| 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. | |
| Scope * | TUScope |
| Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in the "ordinary" C decl namespace. | |
| OpenCLOptions | OpenCLFeatures |
| FPOptions | CurFPFeatures |
| const LangOptions & | LangOpts |
| Preprocessor & | PP |
| ASTContext & | Context |
| ASTConsumer & | Consumer |
| DiagnosticsEngine & | Diags |
| SourceManager & | SourceMgr |
| api_notes::APINotesManager | APINotes |
| sema::AnalysisBasedWarnings | AnalysisWarnings |
| Worker object for performing CFG-based warnings. | |
| threadSafety::BeforeSet * | ThreadSafetyDeclCache |
| LateTemplateParserCB * | LateTemplateParser |
| 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 |
| SemaDiagnosticBuilder::DeferredDiagnosticsType | DeviceDeferredDiags |
| Diagnostics that are emitted only if we discover that the given function must be codegen'ed. | |
| DeclContext * | CurContext |
| CurContext - This is the current declaration context of parsing. | |
| IntrusiveRefCntPtr< ExternalSemaSource > | ExternalSource |
| Source of additional semantic information. | |
| 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. | |
| LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION () | |
| This virtual key function only exists to limit the emission of debug info describing the Sema class. | |
| const LangOptions & | getLangOpts () const |
| OpenCLOptions & | getOpenCLOptions () |
| FPOptions & | getCurFPFeatures () |
| DiagnosticsEngine & | getDiagnostics () const |
| SourceManager & | getSourceManager () const |
| Preprocessor & | getPreprocessor () const |
| ASTContext & | getASTContext () const |
| ASTConsumer & | getASTConsumer () const |
| ASTMutationListener * | getASTMutationListener () const |
| ExternalSemaSource * | getExternalSource () const |
| DarwinSDKInfo * | getDarwinSDKInfoForAvailabilityChecking (SourceLocation Loc, StringRef Platform) |
| DarwinSDKInfo * | getDarwinSDKInfoForAvailabilityChecking () |
| void | addExternalSource (IntrusiveRefCntPtr< ExternalSemaSource > E) |
| Registers an external source. | |
| void | PrintStats () const |
| Print out statistics about the semantic analysis. | |
| 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 | EmitDiagnostic (unsigned DiagID, const DiagnosticBuilder &DB) |
| Cause the built diagnostic to be emitted on the DiagosticsEngine. | |
| void | addImplicitTypedef (StringRef Name, QualType T) |
| 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() | |
| SourceRange | getRangeForNextToken (SourceLocation Loc, bool IncludeMacros, bool IncludeComments, std::optional< tok::TokenKind > ExpectedToken=std::nullopt) |
Calls Lexer::findNextToken() to find the next token, and if the locations of both ends of the token can be resolved it return that range; Otherwise it returns an invalid SourceRange. | |
| ModuleLoader & | getModuleLoader () const |
| Retrieve the module loader associated with the preprocessor. | |
| IdentifierInfo * | InventAbbreviatedTemplateParameterTypeName (const 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) |
| Scope * | getScopeForContext (DeclContext *Ctx) |
| Determines the active Scope associated with the given declaration context. | |
| void | PushFunctionScope () |
| Enter a new function scope. | |
| void | PushBlockScope (Scope *BlockScope, BlockDecl *Block) |
| sema::LambdaScopeInfo * | PushLambdaScope () |
| void | RecordParsingTemplateParameterDepth (unsigned Depth) |
| This is used to inform Sema what the current TemplateParameterDepth is during Parsing. | |
| void | PushCapturedRegionScope (Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K, unsigned OpenMPCaptureLevel=0) |
| PoppedFunctionScopePtr | PopFunctionScopeInfo (const sema::AnalysisBasedWarnings::Policy *WP=nullptr, Decl *D=nullptr, QualType BlockType=QualType()) |
| Pop a function (or block or lambda or captured region) scope from the stack. | |
| sema::FunctionScopeInfo * | getEnclosingFunction () 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::BlockScopeInfo * | getCurBlock () |
| Retrieve the current block, if any. | |
| sema::CapturingScopeInfo * | getEnclosingLambdaOrBlock () const |
| Get the innermost lambda or block enclosing the current location, if any. | |
| sema::LambdaScopeInfo * | getCurLambda (bool IgnoreNonLambdaCapturingScope=false) |
| Retrieve the current lambda scope info, if any. | |
| sema::LambdaScopeInfo * | getCurGenericLambda () |
| Retrieve the current generic lambda info, if any. | |
| sema::CapturedRegionScopeInfo * | getCurCapturedRegion () |
| Retrieve the current captured region, if any. | |
| void | ActOnComment (SourceRange Comment) |
| Scope * | getCurScope () const |
| Retrieve the parser's current scope. | |
| IdentifierInfo * | getSuperIdentifier () const |
| DeclContext * | getCurLexicalContext () 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=CheckedConversionKind::Implicit) |
| ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast. | |
| DeclContext * | getFunctionLevelDeclContext (bool AllowLambda=false) const |
If AllowLambda is true, treat lambda as function. | |
| FunctionDecl * | getCurFunctionDecl (bool AllowLambda=false) const |
| Returns a pointer to the innermost enclosing function, or nullptr if the current context is not inside a function. | |
| ObjCMethodDecl * | getCurMethodDecl () |
| getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the method being parsed. | |
| NamedDecl * | getCurFunctionOrMethodDecl () 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. | |
| void | diagnoseFunctionEffectConversion (QualType DstType, QualType SrcType, SourceLocation Loc) |
| Warn when implicitly changing function effects. | |
| 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. | |
| void | addLifetimeBoundToImplicitThis (CXXMethodDecl *MD) |
| bool | tryExprAsCall (Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads) |
| Figure out if an expression could be turned into a call. | |
| sema::FunctionScopeInfo * | getCurFunction () const |
| void | SetLateTemplateParser (LateTemplateParserCB *LTP, void *P) |
| ParsingDeclState | PushParsingDeclaration (sema::DelayedDiagnosticPool &pool) |
| SemaAMDGPU & | AMDGPU () |
| SemaARM & | ARM () |
| SemaAVR & | AVR () |
| SemaBPF & | BPF () |
| SemaCodeCompletion & | CodeCompletion () |
| SemaCUDA & | CUDA () |
| SemaDirectX & | DirectX () |
| SemaHLSL & | HLSL () |
| SemaHexagon & | Hexagon () |
| SemaLoongArch & | LoongArch () |
| SemaM68k & | M68k () |
| SemaMIPS & | MIPS () |
| SemaMSP430 & | MSP430 () |
| SemaNVPTX & | NVPTX () |
| SemaObjC & | ObjC () |
| SemaOpenACC & | OpenACC () |
| SemaOpenCL & | OpenCL () |
| SemaOpenMP & | OpenMP () |
| SemaPPC & | PPC () |
| SemaPseudoObject & | PseudoObject () |
| SemaRISCV & | RISCV () |
| SemaSPIRV & | SPIRV () |
| SemaSYCL & | SYCL () |
| SemaSwift & | Swift () |
| SemaSystemZ & | SystemZ () |
| SemaWasm & | Wasm () |
| SemaX86 & | X86 () |
| 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++ 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. | |
| 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, NamedDecl *TemplateParam=nullptr) |
| 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) |
| TemplateDeductionResult | DeduceTemplateArguments (VarTemplatePartialSpecializationDecl *Partial, ArrayRef< TemplateArgument > TemplateArgs, sema::TemplateDeductionInfo &Info) |
| TemplateDeductionResult | DeduceTemplateArgumentsFromType (TemplateDecl *TD, QualType FromType, sema::TemplateDeductionInfo &Info) |
Deduce the template arguments of the given template from FromType. | |
| 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, bool PartialOverloading, bool PartialOrdering, bool ForOverloadSetAddressResolution, llvm::function_ref< bool(bool)> CheckNonDependent=[](bool) { 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, bool PartialOrdering, QualType ObjectType, Expr::Classification ObjectClassification, bool ForOverloadSetAddressResolution, llvm::function_ref< bool(ArrayRef< QualType >, bool)> 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. | |
| TypeSourceInfo * | SubstAutoTypeSourceInfo (TypeSourceInfo *TypeWithAuto, QualType Replacement) |
| Substitute Replacement for auto in TypeWithAuto. | |
| QualType | SubstAutoTypeDependent (QualType TypeWithAuto) |
| TypeSourceInfo * | SubstAutoTypeSourceInfoDependent (TypeSourceInfo *TypeWithAuto) |
| QualType | ReplaceAutoType (QualType TypeWithAuto, QualType Replacement) |
Completely replace the auto in TypeWithAuto by Replacement. | |
| TypeSourceInfo * | ReplaceAutoTypeSourceInfo (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 (const VarDecl *VDecl, const Expr *Init) |
| bool | DeduceReturnType (FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true) |
| bool | CheckIfFunctionSpecializationIsImmediate (FunctionDecl *FD, SourceLocation Loc) |
| ClassTemplatePartialSpecializationDecl * | getMoreSpecializedPartialSpecialization (ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc) |
| Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]). | |
| bool | isMoreSpecializedThanPrimary (ClassTemplatePartialSpecializationDecl *T, sema::TemplateDeductionInfo &Info) |
| VarTemplatePartialSpecializationDecl * | getMoreSpecializedPartialSpecialization (VarTemplatePartialSpecializationDecl *PS1, VarTemplatePartialSpecializationDecl *PS2, SourceLocation Loc) |
| bool | isMoreSpecializedThanPrimary (VarTemplatePartialSpecializationDecl *T, sema::TemplateDeductionInfo &Info) |
| bool | isTemplateTemplateParameterAtLeastAsSpecializedAs (TemplateParameterList *PParam, TemplateDecl *PArg, TemplateDecl *AArg, const DefaultArguments &DefaultArgs, SourceLocation ArgLoc, bool PartialOrdering, bool *StrictPackMatch) |
| void | MarkUsedTemplateParameters (const Expr *E, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used) |
| Mark which template parameters are used in a given expression. | |
| void | MarkUsedTemplateParametersForSubsumptionParameterMapping (const Expr *E, unsigned Depth, llvm::SmallBitVector &Used) |
| Mark which template parameters are named 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 | MarkUsedTemplateParameters (ArrayRef< TemplateArgument > TemplateArgs, unsigned Depth, llvm::SmallBitVector &Used) |
| void | MarkUsedTemplateParameters (ArrayRef< TemplateArgumentLoc > TemplateArgs, unsigned Depth, llvm::SmallBitVector &Used) |
| void | MarkDeducedTemplateParameters (const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced) |
| FunctionTemplateDecl * | getMoreSpecializedTemplate (FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, QualType RawObj1Ty={}, QualType RawObj2Ty={}, bool Reversed=false, bool PartialOverloading=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. | |
| FunctionDecl * | getMoreConstrainedFunction (FunctionDecl *FD1, FunctionDecl *FD2) |
| Returns the more constrained function according to the rules of partial ordering by constraints (C++ [temp.constr.order]). | |
| 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 |
| using | InstantiatingSpecializationsKey = llvm::PointerIntPair<Decl *, 2> |
| using | EntityPrinter = llvm::function_ref<void(llvm::raw_ostream &)> |
| LocalInstantiationScope * | CurrentInstantiationScope |
| 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< InstantiatingSpecializationsKey > | InstantiatingSpecializations |
| Specializations whose definitions are currently being instantiated. | |
| llvm::DenseSet< QualType > | InstantiatedNonDependentTypes |
| 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. | |
| SFINAETrap * | CurrentSFINAEContext = nullptr |
| 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). | |
| UnsignedOrNone | ArgPackSubstIndex |
| The current index into pack expansion arguments that will be used for substitution of parameter packs. | |
| bool | SubstTemplateArgument (const TemplateArgumentLoc &Input, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateArgumentLoc &Output, SourceLocation Loc={}, const DeclarationName &Entity={}) |
| bool | SubstTemplateArguments (ArrayRef< TemplateArgumentLoc > Args, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateArgumentListInfo &Outputs) |
| ExprResult | SubstConceptTemplateArguments (const ConceptSpecializationExpr *CSE, const Expr *ConstraintExpr, const MultiLevelTemplateArgumentList &MLTAL) |
| Substitute concept template arguments in the constraint expression of a concept-id. | |
| bool | SubstTemplateArgumentsInParameterMapping (ArrayRef< TemplateArgumentLoc > Args, SourceLocation BaseLoc, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateArgumentListInfo &Out) |
| 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, bool ForDefaultArgumentSubstitution=false) |
| Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration. | |
| bool | pushCodeSynthesisContext (CodeSynthesisContext Ctx) |
| void | popCodeSynthesisContext () |
| void | PrintContextStack (InstantiationContextDiagFuncRef DiagFunc) |
| void | PrintContextStack () |
| void | PrintInstantiationStack (InstantiationContextDiagFuncRef DiagFunc) |
| Prints the current instantiation stack through a series of notes. | |
| void | PrintInstantiationStack () |
| SFINAETrap * | getSFINAEContext () const |
| Returns a pointer to the current SFINAE context, if any. | |
| bool | isSFINAEContext () const |
| TypeSourceInfo * | SubstType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, bool AllowDeducedTST=false) |
| Perform substitution on the type T with a given set of template arguments. | |
| QualType | SubstType (QualType T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, bool *IsIncompleteSubstitution=nullptr) |
| Deprecated form of the above. | |
| TypeSourceInfo * | SubstType (TypeLoc TL, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity) |
| TypeSourceInfo * | SubstFunctionDeclType (TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext, Qualifiers ThisTypeQuals, 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) |
| ParmVarDecl * | SubstParmVarDecl (ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, UnsignedOrNone 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 | SubstCXXIdExpr (Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Substitute an expression as if it is a address-of-operand, which makes it act like a CXXIdExpression rather than an attempt to call. | |
| 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, bool PrimaryStrictPackMatch) |
| 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 (SourceLocation TemplateKWLoc, NestedNameSpecifierLoc &QualifierLoc, TemplateName Name, SourceLocation NameLoc, 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. | |
| bool | inConstraintSubstitution () const |
| Determine whether we are currently performing constraint substitution. | |
| bool | inParameterMappingSubstitution () const |
| concepts::Requirement::SubstitutionDiagnostic * | createSubstDiagAt (SourceLocation Location, EntityPrinter Printer) |
| create a Requirement::SubstitutionDiagnostic with only a SubstitutedEntity and DiagLoc using ASTContext's allocator. | |
C++ Template Declaration Instantiation | |
Implementations are in SemaTemplateInstantiateDecl.cpp | |
| typedef std::pair< ValueDecl *, SourceLocation > | PendingImplicitInstantiation |
| An entity for which implicit template instantiation is required. | |
| typedef SmallVector< LateInstantiatedAttribute, 1 > | LateInstantiatedAttrVec |
| std::deque< PendingImplicitInstantiation > | PendingInstantiations |
| 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< PendingImplicitInstantiation > | PendingLocalImplicitInstantiations |
| 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) |
| FunctionDecl * | InstantiateFunctionDeclaration (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. | |
| VarTemplateSpecializationDecl * | BuildVarTemplateInstantiation (VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList *PartialSpecArgs, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr) |
| VarTemplateSpecializationDecl * | CompleteVarTemplateSpecializationDecl (VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Instantiates a variable template specialization by completing it with appropriate type information and initializer. | |
| 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) |
| NamedDecl * | FindInstantiatedDecl (SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext=false) |
| Find the instantiation of the given declaration within the current instantiation. | |
| DeclContext * | FindInstantiatedContext (SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Finds the instantiation of the given declaration context within the current instantiation. | |
| Decl * | SubstDecl (Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs) |
| FunctionDecl * | SubstSpaceshipAsEqualEqual (CXXRecordDecl *RD, FunctionDecl *Spaceship) |
| Substitute the name and return type of a defaulted 'operator<=>' to form an implicit 'operator=='. | |
| void | PerformPendingInstantiations (bool LocalOnly=false, bool AtEndOfTU=true) |
| Performs template instantiation for all implicit template instantiations we have seen until this point. | |
| TemplateParameterList * | SubstTemplateParams (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 |
| using | ConstrainedDeclOrNestedRequirement |
| llvm::DenseMap< llvm::FoldingSetNodeID, UnsubstitutedConstraintSatisfactionCacheResult > | UnsubstitutedConstraintSatisfactionCache |
| Cache the satisfaction of an atomic constraint. | |
| 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 (ConstrainedDeclOrNestedRequirement Entity, ArrayRef< AssociatedConstraint > AssociatedConstraints, const MultiLevelTemplateArgumentList &TemplateArgLists, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction, const ConceptReference *TopLevelConceptId=nullptr, Expr **ConvertedExpr=nullptr) |
| Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given template arguments. | |
| 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 | CheckFunctionTemplateConstraints (SourceLocation PointOfInstantiation, FunctionDecl *Decl, ArrayRef< TemplateArgument > TemplateArgs, ConstraintSatisfaction &Satisfaction) |
| void | DiagnoseUnsatisfiedConstraint (const ConstraintSatisfaction &Satisfaction, SourceLocation Loc={}, bool First=true) |
| Emit diagnostics explaining why a constraint expression was deemed unsatisfied. | |
| void | DiagnoseUnsatisfiedConstraint (const ConceptSpecializationExpr *ConstraintExpr, bool First=true) |
| Emit diagnostics explaining why a constraint expression was deemed unsatisfied. | |
| const NormalizedConstraint * | getNormalizedAssociatedConstraints (ConstrainedDeclOrNestedRequirement Entity, ArrayRef< AssociatedConstraint > AssociatedConstraints) |
| bool | IsAtLeastAsConstrained (const NamedDecl *D1, MutableArrayRef< AssociatedConstraint > AC1, const NamedDecl *D2, MutableArrayRef< AssociatedConstraint > 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 (const NamedDecl *D1, ArrayRef< AssociatedConstraint > AC1, const NamedDecl *D2, ArrayRef< AssociatedConstraint > 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. | |
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 FunctionProtoType * | ResolveExceptionSpec (SourceLocation Loc, const FunctionProtoType *FPT) |
| void | UpdateExceptionSpec (FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI) |
| bool | CheckSpecifiedExceptionType (QualType &T, SourceRange Range) |
| CheckSpecifiedExceptionType - Check if the given type is valid in an exception specification. | |
| 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. | |
C++ Expressions | |
Implementations are in SemaExprCXX.cpp | |
| 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. | |
| RecordDecl * | CXXTypeInfoDecl |
| 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 *, DeleteLocs > | DeleteExprs |
| 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. | |
| ParsedType | getInheritingConstructorName (CXXScopeSpec &SS, SourceLocation NameLoc, const IdentifierInfo &Name) |
| Handle the result of the special case name lookup for inheriting constructor declarations. | |
| ParsedType | getConstructorName (const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, bool EnteringContext) |
| ParsedType | getDestructorName (const 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) |
| bool | CheckCXXThisType (SourceLocation Loc, QualType Type) |
| Check whether the type of 'this' is valid in the current context. | |
| Expr * | BuildCXXThisExpr (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 | ActOnCXXNullPtrLiteral (SourceLocation Loc) |
| ActOnCXXNullPtrLiteral - Parse 'nullptr'. | |
| ExprResult | ActOnCXXThrow (Scope *S, SourceLocation OpLoc, Expr *expr) |
| 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) |
| Parsed a C++ 'new' expression (C++ 5.3.4). | |
| 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, ImplicitAllocationParameters &IAP, 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, ImplicitDeallocationParameters, bool Diagnose=true) |
| FunctionDecl * | FindUsualDeallocationFunction (SourceLocation StartLoc, ImplicitDeallocationParameters, DeclarationName Name, bool Diagnose=true) |
| FunctionDecl * | FindDeallocationFunctionForDestructor (SourceLocation StartLoc, CXXRecordDecl *RD, bool Diagnose, bool LookForGlobal, DeclarationName Name) |
| ExprResult | ActOnCXXDelete (SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand) |
| ActOnCXXDelete - Parsed a C++ 'delete' expression (C++ 5.3.5), as in: | |
| 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) |
| Expr * | MaybeCreateExprWithCleanups (Expr *SubExpr) |
| MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups, surround it with a ExprWithCleanups node. | |
| Stmt * | MaybeCreateStmtWithCleanups (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=CheckedConversionKind::Implicit) |
| 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) |
| bool | IsCXXTriviallyRelocatableType (QualType T) |
| Determines if a type is trivially relocatable according to the C++26 rules. | |
| bool | IsCXXTriviallyRelocatableType (const CXXRecordDecl &RD) |
| QualType | CXXCheckConditionalOperands (ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc) |
| Check the operands of ? | |
| 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) |
| IfExistsResult | CheckMicrosoftIfExistsSymbol (Scope *S, CXXScopeSpec &SS, const DeclarationNameInfo &TargetNameInfo) |
| IfExistsResult | CheckMicrosoftIfExistsSymbol (Scope *S, SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name) |
| RequiresExprBodyDecl * | ActOnStartRequiresExpr (SourceLocation RequiresKWLoc, ArrayRef< ParmVarDecl * > LocalParameters, Scope *BodyScope) |
| void | ActOnFinishRequiresExpr () |
| concepts::Requirement * | ActOnSimpleRequirement (Expr *E) |
| concepts::Requirement * | ActOnTypeRequirement (SourceLocation TypenameKWLoc, CXXScopeSpec &SS, SourceLocation NameLoc, const IdentifierInfo *TypeName, TemplateIdAnnotation *TemplateId) |
| concepts::Requirement * | ActOnCompoundRequirement (Expr *E, SourceLocation NoexceptLoc) |
| concepts::Requirement * | ActOnCompoundRequirement (Expr *E, SourceLocation NoexceptLoc, CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, unsigned Depth) |
| concepts::Requirement * | ActOnNestedRequirement (Expr *Constraint) |
| concepts::ExprRequirement * | BuildExprRequirement (Expr *E, bool IsSatisfied, SourceLocation NoexceptLoc, concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement) |
| concepts::ExprRequirement * | BuildExprRequirement (concepts::Requirement::SubstitutionDiagnostic *ExprSubstDiag, bool IsSatisfied, SourceLocation NoexceptLoc, concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement) |
| concepts::TypeRequirement * | BuildTypeRequirement (TypeSourceInfo *Type) |
| concepts::TypeRequirement * | BuildTypeRequirement (concepts::Requirement::SubstitutionDiagnostic *SubstDiag) |
| concepts::NestedRequirement * | BuildNestedRequirement (Expr *E) |
| concepts::NestedRequirement * | BuildNestedRequirement (StringRef InvalidConstraintEntity, const ASTConstraintSatisfaction &Satisfaction) |
| ExprResult | ActOnRequiresExpr (SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, SourceLocation LParenLoc, ArrayRef< ParmVarDecl * > LocalParameters, SourceLocation RParenLoc, ArrayRef< concepts::Requirement * > Requirements, SourceLocation ClosingBraceLoc) |
Function Effects | |
Implementations are in SemaFunctionEffects.cpp | |
| SmallVector< const Decl * > | DeclsWithEffectsToVerify |
| All functions/lambdas/blocks which have bodies and which have a non-empty FunctionEffectsRef to be verified. | |
| FunctionEffectKindSet | AllEffectsToVerify |
| The union of all effects present on DeclsWithEffectsToVerify. | |
| bool | diagnoseConflictingFunctionEffect (const FunctionEffectsRef &FX, const FunctionEffectWithCondition &EC, SourceLocation NewAttrLoc) |
| Warn and return true if adding a function effect to a set would create a conflict. | |
| void | diagnoseFunctionEffectMergeConflicts (const FunctionEffectSet::Conflicts &Errs, SourceLocation NewLoc, SourceLocation OldLoc) |
| template<class FuncOrBlockDecl> | |
| void | maybeAddDeclWithEffects (FuncOrBlockDecl *D) |
| Inline checks from the start of maybeAddDeclWithEffects, to minimize performance impact on code not using effects. | |
| void | maybeAddDeclWithEffects (const Decl *D, const FunctionEffectsRef &FX) |
| Potentially add a FunctionDecl or BlockDecl to DeclsWithEffectsToVerify. | |
| void | addDeclWithEffects (const Decl *D, const FunctionEffectsRef &FX) |
| Unconditionally add a Decl to DeclsWithEfffectsToVerify. | |
| void | performFunctionEffectAnalysis (TranslationUnitDecl *TU) |
API Notes | |
Implementations are in SemaAPINotes.cpp | |
| void | ProcessAPINotes (Decl *D) |
| Map any API notes provided for this declaration to attributes on the declaration. | |
| void | ApplyNullability (Decl *D, NullabilityKind Nullability) |
| Apply the 'Nullability:' annotation to the specified declaration. | |
| void | ApplyAPINotesType (Decl *D, StringRef TypeString) |
| Apply the 'Type:' annotation to the specified declaration. | |
| bool | captureSwiftVersionIndependentAPINotes () |
| Whether APINotes should be gathered for all applicable Swift language versions, without being applied. | |
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::FunctionScopeInfo * | getCurFunctionAvailabilityContext () |
| 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, ObjCInterfaceDecl *ClassReceiver) |
| void | DiagnoseAvailabilityOfDecl (NamedDecl *D, ArrayRef< SourceLocation > Locs) |
| std::pair< AvailabilityResult, const NamedDecl * > | ShouldDiagnoseAvailabilityOfDecl (const NamedDecl *D, std::string *Message, ObjCInterfaceDecl *ClassReceiver) |
The diagnostic we should emit for D, and the declaration that originated it, or AR_Available. | |
Bounds Safety | |
Implementations are in SemaBoundsSafety.cpp | |
| bool | CheckCountedByAttrOnField (FieldDecl *FD, Expr *E, bool CountInBytes, bool OrNull) |
Check if applying the specified attribute variant from the "counted by" family of attributes to FieldDecl FD is semantically valid. | |
| bool | BoundsSafetyCheckAssignmentToCountAttrPtr (QualType LHSTy, Expr *RHSExpr, AssignmentAction Action, SourceLocation Loc, const ValueDecl *Assignee, bool ShowFullyQualifiedAssigneeName) |
| Perform Bounds Safety Semantic checks for assigning to a __counted_by or __counted_by_or_null pointer type. | |
| bool | BoundsSafetyCheckInitialization (const InitializedEntity &Entity, const InitializationKind &Kind, AssignmentAction Action, QualType LHSType, Expr *RHSExpr) |
| Perform Bounds Safety Semantic checks for initializing a Bounds Safety pointer. | |
| bool | BoundsSafetyCheckUseOfCountAttrPtr (const Expr *E) |
| Perform Bounds Safety semantic checks for uses of invalid uses counted_by or counted_by_or_null pointers in. | |
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. | |
| DeclContext * | computeDeclContext (QualType T) |
| Compute the DeclContext that is associated with the given type. | |
| DeclContext * | computeDeclContext (const CXXScopeSpec &SS, bool EnteringContext=false) |
| Compute the DeclContext that is associated with the given scope specifier. | |
| bool | isDependentScopeSpecifier (const CXXScopeSpec &SS) |
| CXXRecordDecl * | getCurrentInstantiationOf (NestedNameSpecifier NNS) |
| If the given nested name specifier refers to the current instantiation, return the declaration that corresponds to that current instantiation (C++0x [temp.dep.type]p1). | |
| 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. | |
| NamedDecl * | FindFirstQualifierInScope (Scope *S, NestedNameSpecifier NNS) |
| If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup for that identifier as a nested-name-specifier within the given scope, and return the result of that name lookup. | |
| 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. | |
C++ Lambda Expressions | |
Implementations are in SemaLambda.cpp | |
| CXXRecordDecl * | createLambdaClosureType (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. | |
| CXXMethodDecl * | CreateLambdaCallOperator (SourceRange IntroducerRange, CXXRecordDecl *Class) |
| void | AddTemplateParametersToLambdaCallOperator (CXXMethodDecl *CallOperator, CXXRecordDecl *Class, TemplateParameterList *TemplateParams) |
| void | CompleteLambdaCallOperator (CXXMethodDecl *Method, SourceLocation LambdaLoc, SourceLocation CallOperatorLoc, const AssociatedConstraint &TrailingRequiresClause, TypeSourceInfo *MethodTyInfo, ConstexprSpecKind ConstexprKind, StorageClass SC, ArrayRef< ParmVarDecl * > Params, bool HasExplicitResultType) |
| bool | DiagnoseInvalidExplicitObjectParameterInLambda (CXXMethodDecl *Method, SourceLocation CallLoc) |
| Returns true if the explicit object parameter was invalid. | |
| 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, UnsignedOrNone NumExpansions, IdentifierInfo *Id, bool DirectInit, Expr *&Init) |
| VarDecl * | 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. | |
| 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, SourceRange FixItRange, const sema::Capture &From) |
| Diagnose if an explicit lambda capture is unused. | |
| FieldDecl * | BuildCaptureField (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) |
| 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 | |
| ExprResult | ActOnGCCAsmStmtString (Expr *Stm, bool ForAsmLabel) |
| StmtResult | ActOnGCCAsmStmt (SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, unsigned NumLabels, SourceLocation RParenLoc) |
| void | FillInlineAsmIdentifierInfo (Expr *Res, llvm::InlineAsmIdentifierInfo &Info) |
| ExprResult | LookupInlineAsmIdentifier (CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool IsUnevaluatedContext) |
| bool | LookupInlineAsmField (StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc) |
| ExprResult | LookupInlineAsmVarDeclField (Expr *RefExpr, StringRef Member, SourceLocation AsmLoc) |
| StmtResult | ActOnMSAsmStmt (SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr * > Exprs, SourceLocation EndLoc) |
| LabelDecl * | GetOrCreateMSAsmLabel (StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate) |
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) |
C++ Template Deduction Guide | |
Implementations are in SemaTemplateDeductionGuide.cpp | |
| void | DeclareImplicitDeductionGuides (TemplateDecl *Template, SourceLocation Loc) |
| Declare implicit deduction guides for a class template if we've not already done so. | |
| FunctionTemplateDecl * | DeclareAggregateDeductionGuideFromInitList (TemplateDecl *Template, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc) |
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 |
Additional Inherited Members | |
| Public Member Functions inherited from clang::SemaBase | |
| SemaBase (Sema &S) | |
| ASTContext & | getASTContext () const |
| DiagnosticsEngine & | getDiagnostics () const |
| const LangOptions & | getLangOpts () const |
| DeclContext * | getCurContext () const |
| SemaDiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID) |
| Emit a diagnostic. | |
| SemaDiagnosticBuilder | Diag (SourceLocation Loc, const PartialDiagnostic &PD) |
| Emit a partial diagnostic. | |
| SemaDiagnosticBuilder | DiagCompat (SourceLocation Loc, unsigned CompatDiagId) |
| Emit a compatibility diagnostic. | |
| PartialDiagnostic | PDiag (unsigned DiagID=0) |
| Build a partial diagnostic. | |
| Public Attributes inherited from clang::SemaBase | |
| Sema & | SemaRef |
| typedef llvm::SmallSetVector<CXXRecordDecl *, 16> clang::Sema::AssociatedClassSet |
| typedef llvm::SmallSetVector<DeclContext *, 16> clang::Sema::AssociatedNamespaceSet |
| typedef std::pair<StringRef, QualType> clang::Sema::CapturedParamNameType |
| typedef std::pair<SourceLocation, bool> clang::Sema::DeleteExprLoc |
| typedef llvm::SmallVector<DeleteExprLoc, 4> clang::Sema::DeleteLocs |
| typedef llvm::function_ref<void(SourceLocation Loc, PartialDiagnostic PD)> clang::Sema::DiagReceiverTy |
| using clang::Sema::EntityPrinter = llvm::function_ref<void(llvm::raw_ostream &)> |
| typedef llvm::DenseMap<IdentifierInfo *, SrcLocSet> clang::Sema::IdentifierSourceLocations |
| using clang::Sema::ImmediateInvocationCandidate = llvm::PointerIntPair<ConstantExpr *, 1> |
| using clang::Sema::InstantiatingSpecializationsKey = llvm::PointerIntPair<Decl *, 2> |
| typedef llvm::MapVector<const FunctionDecl *, std::unique_ptr<LateParsedTemplate> > clang::Sema::LateParsedTemplateMapT |
| typedef void clang::Sema::LateTemplateParserCB(void *P, LateParsedTemplate &LPT) |
| using clang::Sema::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.
This is cleared at the end of each full expression.
| typedef llvm::SmallSetVector<const NamedDecl *, 16> clang::Sema::NamedDeclSetType |
| typedef std::pair<ValueDecl *, SourceLocation> clang::Sema::PendingImplicitInstantiation |
An entity for which implicit template instantiation is required.
The source location associated with the declaration is the first place in the source code where the declaration was "used". It is not necessarily the point of instantiation (which will be either before or after the namespace-scope declaration that triggered this implicit instantiation), However, it is the location that diagnostics should generally refer to, because users will need to know what code triggered the instantiation.
| typedef llvm::SmallPtrSet<const CXXRecordDecl *, 8> clang::Sema::RecordDeclSetTy |
| typedef void* clang::Sema::SkippedDefinitionContext |
| typedef llvm::PointerIntPair<CXXRecordDecl *, 3, CXXSpecialMemberKind> clang::Sema::SpecialMemberDecl |
| typedef llvm::SmallSet<SourceLocation, 2> clang::Sema::SrcLocSet |
| typedef llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> > clang::Sema::SuppressedDiagnosticsMap |
| typedef OpaquePtr<TemplateName> clang::Sema::TemplateTy |
| typedef std::pair<const IdentifierInfo *, uint64_t> clang::Sema::TypeTagMagicValue |
| typedef OpaquePtr<QualType> clang::Sema::TypeTy |
| typedef llvm::DenseMap<ParmVarDecl *, llvm::TinyPtrVector<ParmVarDecl *> > clang::Sema::UnparsedDefaultArgInstantiationsMap |
| using clang::Sema::UTTKind = UnaryTransformType::UTTKind |
| typedef std::pair<CXXRecordDecl *, SourceLocation> clang::Sema::VTableUse |
|
strong |
|
strong |
|
strong |
|
strong |
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.
|
strong |
|
strong |
Specifies the context in which a particular template argument is being checked.
|
strong |
| Enumerator | |
|---|---|
| OperatorInExpression | The '<=>' operator was used in an expression and a builtin operator was selected. |
| DefaultedOperator | A defaulted 'operator<=>' needed the comparison category. This typically only applies to 'std::strong_ordering', due to the implicit fallback return value. |
|
strong |
|
strong |
|
strong |
Kinds of defaulted comparison operator functions.
| Enumerator | |
|---|---|
| None | This is not a defaultable comparison operator. |
| Equal | This is an operator== that should be implemented as a series of subobject comparisons. |
| ThreeWay | This is an operator<=> that should be implemented as a series of subobject comparisons. |
| NotEqual | This is an operator!= that should be implemented as a rewrite in terms of a == comparison. |
| Relational | This is an <, <=, >, or >= that should be implemented as a rewrite in terms of a <=> comparison. |
|
strong |
|
strong |
|
strong |
Describes how the expressions currently being parsed are evaluated at run-time, if at all.
| Enumerator | |
|---|---|
| Unevaluated | The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7), such as the subexpression of |
| 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. |
|
strong |
|
strong |
The possible outcomes of name lookup for a literal operator.
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. |
|
strong |
|
strong |
|
strong |
|
strong |
|
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.
|
strong |
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).
|
strong |
|
strong |
|
strong |
|
strong |
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. |
| 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. @ Other C++26 [dcl.fct.def.general]p1 function-body: ctor-initializer[opt] compound-statement function-try-bl... Definition Sema.h:4161 |
| TPL_TemplateParamsEquivalent | We are determining whether the template-parameters are equivalent according to C++ [temp.over.link]/6. This comparison does not consider constraints. |
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.
| Sema::Sema | ( | Preprocessor & | pp, |
| ASTContext & | ctxt, | ||
| ASTConsumer & | consumer, | ||
| TranslationUnitKind | TUKind = TU_Complete, | ||
| CodeCompleteConsumer * | CompletionConsumer = nullptr ) |
Definition at line 272 of file Sema.cpp.
References AlignPackStack, AnalysisWarnings, APINotes, ArgPackSubstIndex, BSSSegStack, CodeSegStack, CollectStats, ConstSegStack, Consumer, Context, clang::CPlusPlus, CurContext, CurFPFeatures, CurInitSeg, CurrentInstantiationScope, CXXTypeInfoDecl, DataSegStack, Diags, DisableTypoCorrection, clang::Sema::ExpressionEvaluationContextRecord::EK_Other, ExprEvalContexts, ExternalSource, false, FieldCollector, clang::FormatASTNodeDiagnosticArgument(), FpPragmaStack, getDiagnostics(), getLangOpts(), getSourceManager(), GlobalNewDeleteDeclared, IdResolver, IsBuildingRecoveryCallExpr, LangOpts, clang::Last, LateTemplateParser, MSPointerToMemberRepresentationMethod, MSStructPragmaOn, NonInstantiationEntries, clang::SemaObjC::NSAPIObj, clang::SemaObjC::NSNumberLiteralMethods, clang::nullptr, clang::NSAPI::NumNSNumberLiteralMethods, ObjC(), OpaqueParser, OpenMP(), OriginalLexicalContext, PotentiallyEvaluated, PP, PragmaAttributeCurrentTargetDecl, clang::SemaBase::SemaBase(), SourceMgr, StdCoroutineTraitsCache, StdInitializerList, StdSourceLocationImplDecl, StdTypeIdentity, StrictGuardStackCheckStack, ThreadSafetyDeclCache, clang::Preprocessor::TUKind, TUKind, TUScope, TyposCorrected, VisContext, and VtorDispStack.
Referenced by ActOnCXXDelete(), clang::Sema::ArgPackSubstIndexRAII::ArgPackSubstIndexRAII(), ASTWriter, BuildCXXNew(), canCalleeThrow(), CheckCallReturnType(), CheckSwitchCondition(), CheckTemplateArgument(), clang::Sema::CompoundScopeRAII::CompoundScopeRAII(), clang::Sema::ContextRAII::ContextRAII(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), clang::Sema::DeferDiagsRAII::DeferDiagsRAII(), clang::Sema::BoundTypeDiagnoser< Ts >::diagnose(), clang::Sema::SizelessTypeDiagnoser< Ts >::diagnose(), clang::Sema::TypeDiagnoser::diagnose(), clang::Sema::ContextualImplicitConverter::diagnoseAmbiguous(), clang::Sema::ContextualImplicitConverter::diagnoseConversion(), clang::Sema::ContextualImplicitConverter::diagnoseExplicitConv(), diagnoseExprIntendedAsTemplateName(), clang::Sema::VerifyICEDiagnoser::diagnoseFold(), DiagnoseImmediateEscalatingReason(), clang::Sema::ContextualImplicitConverter::diagnoseIncomplete(), clang::Sema::ContextualImplicitConverter::diagnoseNoMatch(), clang::Sema::ICEConvertDiagnoser::diagnoseNoMatch(), clang::Sema::VerifyICEDiagnoser::diagnoseNotICE(), clang::Sema::VerifyICEDiagnoser::diagnoseNotICEType(), clang::Sema::ICEConvertDiagnoser::diagnoseNotInt(), clang::Sema::FPFeaturesStateRAII::FPFeaturesStateRAII(), clang::Sema::FpPragmaStackSaveRAII::FpPragmaStackSaveRAII(), clang::Sema::FunctionScopeRAII::FunctionScopeRAII(), clang::Sema::GlobalEagerInstantiationScope::GlobalEagerInstantiationScope(), clang::Sema::ImplicitExceptionSpecification::ImplicitExceptionSpecification(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), InitializeExplicitObjectArgument(), InstantiateFunctionDefinition(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), clang::Sema::InstantiatingTemplate::InstantiatingTemplate(), IsRedefinitionInModule(), clang::Sema::LambdaScopeForCallOperatorInstantiationRAII::LambdaScopeForCallOperatorInstantiationRAII(), clang::Sema::LocalEagerInstantiationScope::LocalEagerInstantiationScope(), clang::Sema::NonSFINAEContext::NonSFINAEContext(), clang::Sema::ContextualImplicitConverter::noteAmbiguous(), clang::Sema::ContextualImplicitConverter::noteExplicitConv(), clang::Sema::CompoundScopeRAII::operator=(), clang::Sema::FpPragmaStackSaveRAII::operator=(), clang::Sema::GlobalEagerInstantiationScope::operator=(), clang::Sema::LocalEagerInstantiationScope::operator=(), clang::Sema::PragmaStackSentinelRAII::operator=(), parentEvaluationContext(), PerformContextualImplicitConversion(), clang::Sema::PoppedFunctionScopeDeleter::PoppedFunctionScopeDeleter(), clang::Sema::PragmaStackSentinelRAII::PragmaStackSentinelRAII(), clang::Sema::RecursiveInstGuard::RecursiveInstGuard(), clang::Sema::SatisfactionStackResetRAII::SatisfactionStackResetRAII(), clang::Sema::SFINAEContextBase::SFINAEContextBase(), clang::Sema::SFINAETrap::SFINAETrap(), clang::Sema::SFINAETrap::SFINAETrap(), SubstConceptTemplateArguments(), clang::Sema::SynthesizedFunctionScope::SynthesizedFunctionScope(), clang::Sema::TentativeAnalysisScope::TentativeAnalysisScope(), VerifyIntegerConstantExpression(), VerifyIntegerConstantExpression(), and VerifyIntegerConstantExpression().
| Sema::~Sema | ( | ) |
Definition at line 588 of file Sema.cpp.
References Consumer, Context, FreeVisContext(), FunctionScopes, InstantiatingSpecializations, OpenMP(), clang::threadSafety::threadSafetyCleanup(), ThreadSafetyDeclCache, and VisContext.
| void Sema::ActOnAbortSEHFinallyBlock | ( | ) |
Definition at line 4571 of file SemaStmt.cpp.
References CurrentSEHFinally.
| bool Sema::ActOnAccessSpecifier | ( | AccessSpecifier | Access, |
| SourceLocation | ASLoc, | ||
| SourceLocation | ColonLoc, | ||
| const ParsedAttributesView & | Attrs ) |
ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
Definition at line 3233 of file SemaDeclCXX.cpp.
References clang::AS_none, Context, clang::AccessSpecDecl::Create(), CurContext, and ProcessAccessDeclAttributeList().
| ExprResult Sema::ActOnAddrLabel | ( | SourceLocation | OpLoc, |
| SourceLocation | LabLoc, | ||
| LabelDecl * | TheDecl ) |
ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
Definition at line 16277 of file SemaExpr.cpp.
References clang::sema::FunctionScopeInfo::AddrLabels, Context, getCurFunction(), and clang::Decl::markUsed().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildAddrLabelExpr().
| void Sema::ActOnAfterCompoundStatementLeadingPragmas | ( | ) |
Definition at line 420 of file SemaStmt.cpp.
References getCurFPFeatures(), getCurFunction(), and clang::sema::FunctionScopeInfo::setUsesFPIntrin().
| Decl * Sema::ActOnAliasDeclaration | ( | Scope * | CurScope, |
| AccessSpecifier | AS, | ||
| MultiTemplateParamsArg | TemplateParams, | ||
| SourceLocation | UsingLoc, | ||
| UnqualifiedId & | Name, | ||
| const ParsedAttributesView & | AttrList, | ||
| TypeResult | Type, | ||
| Decl * | DeclFromDeclSpec ) |
Definition at line 13717 of file SemaDeclCXX.cpp.
References ActOnDocumentableDecl(), ActOnTypedefNameDecl(), AddPragmaAttributes(), CheckRedeclarationInModule(), CheckTemplateDeclScope(), CheckTemplateParameterList(), CheckTypedefForVariablyModifiedType(), Context, clang::TypeAliasDecl::Create(), clang::TypeAliasTemplateDecl::Create(), CurContext, Diag(), DiagnoseClassNameShadow(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), FilterLookupForScope(), forRedeclarationInCurContext(), ForVisibleRedeclaration, clang::TypeLoc::getBeginLoc(), clang::Scope::getDeclParent(), clang::UnqualifiedId::getKind(), clang::Decl::getLocation(), clang::RedeclarableTemplateDecl::getMostRecentDecl(), GetNameFromUnqualifiedId(), clang::TypeAliasTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::TypedefNameDecl::getUnderlyingType(), handleTagNumbering(), clang::UnqualifiedId::Identifier, clang::IK_Identifier, clang::Invalid, clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), LookupName(), LookupOrdinaryName, Previous, ProcessAPINotes(), ProcessDeclAttributeList(), PushOnScopeChains(), clang::Redeclaration, clang::Decl::setAccess(), clang::TypeAliasDecl::setDescribedAliasTemplate(), clang::Decl::setInvalidDecl(), clang::Redeclarable< decl_type >::setPreviousDecl(), setTagNameForLinkagePurposes(), clang::UnqualifiedId::StartLocation, TemplateParameterListsAreEqual(), TPC_Other, TPL_TemplateMatch, and UPPC_DeclarationType.
| 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 4798 of file SemaExpr.cpp.
References CheckAlignasTypeArgument(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), and GetTypeFromParser().
| void Sema::ActOnAnnotModuleBegin | ( | SourceLocation | DirectiveLoc, |
| Module * | Mod ) |
The parsed has entered a submodule.
Definition at line 768 of file SemaModule.cpp.
References clang::cast(), checkModuleImportContext(), CurContext, getLangOpts(), clang::Decl::Visible, and clang::Decl::VisibleWhenImported.
| void Sema::ActOnAnnotModuleEnd | ( | SourceLocation | DirectiveLoc, |
| Module * | Mod ) |
The parser has left a submodule.
Definition at line 792 of file SemaModule.cpp.
References BuildModuleInclude(), clang::cast(), CurContext, clang::File, getCurrentModule(), clang::SourceManager::getFileID(), clang::SourceManager::getIncludeLoc(), getLangOpts(), getSourceManager(), clang::Decl::Unowned, and VisibleNamespaceCache.
| 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 724 of file SemaModule.cpp.
References BuildModuleInclude(), checkModuleImportContext(), and CurContext.
| ExprResult Sema::ActOnArraySubscriptExpr | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | LLoc, | ||
| MultiExprArg | ArgExprs, | ||
| SourceLocation | RLoc ) |
Definition at line 4916 of file SemaExpr.cpp.
References clang::SemaOpenACC::ActOnArraySectionExpr(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::ArraySubscript, clang::cast(), CheckArgsForPlaceholders(), CheckPlaceholderExpr(), Context, clang::CPlusPlus, clang::CPlusPlus20, CreateBuiltinArraySubscriptExpr(), CreateBuiltinMatrixSubscriptExpr(), CreateOverloadedArraySubscriptExpr(), clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), getASTContext(), clang::Stmt::getBeginLoc(), getDependentArraySubscriptType(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::Expr::hasAnyTypeDependentArguments(), clang::Expr::hasPlaceholderType(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isMatrixType(), isMSPropertySubscriptExpr(), clang::Type::isNonOverloadPlaceholderType(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), clang::Type::isWebAssemblyTableType(), MaybeConvertParenListExprToParenExpr(), clang::OK_Ordinary, OpenACC(), OpenMP(), and clang::VK_LValue.
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildArraySubscriptExpr(), clang::TreeTransform< AdjustConstraints >::RebuildCxxSubscriptExpr(), and rebuildPotentialResultsAsNonOdrUsed().
| 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 1804 of file SemaTypeTraits.cpp.
References BuildArrayTypeTrait(), Context, GetTypeFromParser(), and clang::T.
| ExprResult Sema::ActOnAsTypeExpr | ( | Expr * | E, |
| ParsedType | ParsedDestTy, | ||
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RParenLoc ) |
Parse a __builtin_astype expression.
__builtin_astype( value, dst type )
Definition at line 6883 of file SemaExpr.cpp.
References BuildAsTypeExpr(), and GetTypeFromParser().
| StmtResult Sema::ActOnAttributedStmt | ( | const ParsedAttributes & | AttrList, |
| Stmt * | SubStmt ) |
Definition at line 648 of file SemaStmt.cpp.
References BuildAttributedStmt(), clang::SourceRange::getBegin(), ProcessStmtAttributes(), and clang::ParsedAttributesView::Range.
| BaseResult Sema::ActOnBaseSpecifier | ( | Decl * | classdecl, |
| SourceRange | SpecifierRange, | ||
| const ParsedAttributesView & | Attrs, | ||
| 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 2861 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), CheckBaseSpecifier(), clang::Class, Diag(), DiagnoseUnexpandedParameterPack(), DiagnoseUnknownAttribute(), clang::SourceRange::getBegin(), GetTypeFromParser(), clang::AttributeCommonInfo::IgnoredAttribute, clang::SourceLocation::isInvalid(), clang::AttributeCommonInfo::UnknownAttribute, UPPC_BaseType, and Virtual.
| 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 3041 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), AttachBaseSpecifiers(), and clang::cast().
| ExprResult Sema::ActOnBinOp | ( | Scope * | S, |
| SourceLocation | TokLoc, | ||
| tok::TokenKind | Kind, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr ) |
Binary Operators. 'Tok' is the token for the operator.
Definition at line 15708 of file SemaExpr.cpp.
References clang::Assignment, clang::BinaryExpr, BuildBinOp(), DiagnoseBinOpPrecedence(), and clang::BinaryOperator::isAssignmentOp().
Referenced by BuildCXXForRangeStmt(), BuiltinInvoke(), DefaultVariadicArgumentPromotion(), and MaybeConvertParenListExprToParenExpr().
| 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 16629 of file SemaExpr.cpp.
References clang::BlockLiteral, BuildParmVarDeclForTypedef(), clang::C23, clang::cast(), CheckParmsForFunctionDef(), CheckShadow(), Context, clang::CPlusPlus, clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), clang::sema::BlockScopeInfo::FunctionType, clang::TypeLoc::getAsAdjusted(), clang::Declarator::getBeginLoc(), clang::Declarator::getContext(), getCurBlock(), clang::Declarator::getIdentifier(), getLangOpts(), clang::FunctionTypeLoc::getLocalRangeBegin(), clang::FunctionTypeLoc::getLocalRangeEnd(), clang::FunctionTypeLoc::getNumParams(), clang::FunctionTypeLoc::getParam(), clang::FunctionTypeLoc::getReturnLoc(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::TypeSourceInfo::getTypeLoc(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::TypeLoc::initializeFullCopy(), clang::isa(), 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::T, clang::sema::BlockScopeInfo::TheDecl, clang::sema::BlockScopeInfo::TheScope, and UPPC_Block.
| 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 16738 of file SemaExpr.cpp.
References DiscardCleanupsInEvaluationContext(), PopDeclContext(), PopExpressionEvaluationContext(), and PopFunctionScopeInfo().
| void Sema::ActOnBlockStart | ( | SourceLocation | CaretLoc, |
| Scope * | CurScope ) |
ActOnBlockStart - This callback is invoked when a block literal is started.
Definition at line 16600 of file SemaExpr.cpp.
References clang::Block, Context, clang::BlockDecl::Create(), CurContext, getCurBlock(), getCurrentMangleNumberContext(), clang::MangleNumberingContext::getManglingNumber(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, LangOpts, PotentiallyEvaluated, PushBlockScope(), PushDeclContext(), and PushExpressionEvaluationContext().
| 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 16748 of file SemaExpr.cpp.
References clang::sema::FunctionScopeInfo::addBlock(), AnalysisWarnings, BuildDeclarationNameExpr(), clang::sema::CapturingScopeInfo::Captures, clang::cast(), clang::Type::castAs(), checkNonTrivialCUnion(), Cleanup, computeNRVO(), clang::sema::CapturingScopeInfo::ContainsUnexpandedParameterPack, Context, clang::CPlusPlus, CreateRecoveryExpr(), clang::sema::CapturingScopeInfo::CXXThisCaptureIndex, deduceClosureReturnType(), clang::SemaBase::Diag(), DiagnoseInvalidJumps(), DiagnoseUnguardedAvailabilityViolations(), DiagnoseUnusedParameters(), DiscardCleanupsInEvaluationContext(), clang::QualType::DK_none, ExprCleanupObjects, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, FinalizeVarWithDestructor(), clang::FunctionReturn, FunctionScopes, clang::sema::BlockScopeInfo::FunctionType, clang::Type::getAsCXXRecordDecl(), clang::sema::Capture::getCaptureType(), clang::BlockDecl::getCaretLocation(), getCurFunction(), clang::Stmt::getEndLoc(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), getLangOpts(), clang::sema::Capture::getLocation(), clang::FunctionType::getNoReturnAttr(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::getReturnType(), clang::sema::Capture::getVariable(), hasAnyUnrecoverableErrorsInThisFunction(), clang::Decl::hasAttr(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), ImpCastExprToType(), clang::InitializedEntity::InitializeBlock(), clang::isa(), clang::sema::Capture::isBlockCapture(), clang::sema::Capture::isCopyCapture(), clang::DeclContext::isDependentContext(), clang::sema::Capture::isInvalid(), clang::Decl::isInvalidDecl(), clang::sema::Capture::isNested(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::sema::Capture::isThisCapture(), LangOpts, maybeAddDeclWithEffects(), MaybeCreateExprWithCleanups(), 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(), setFunctionHasBranchProtectedScope(), clang::sema::BlockScopeInfo::TheDecl, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, clang::VK_LValue, and clang::FunctionType::ExtInfo::withNoReturn().
| StmtResult Sema::ActOnBreakStmt | ( | SourceLocation | BreakLoc, |
| Scope * | CurScope, | ||
| LabelDecl * | Label, | ||
| SourceLocation | LabelLoc ) |
Definition at line 3365 of file SemaStmt.cpp.
References CheckJumpOutOfSEHFinallyOrDefer(), Context, clang::SemaBase::Diag(), FindLabeledBreakContinueScope(), clang::Scope::getBreakParent(), clang::Scope::getParent(), clang::Scope::isLoopScope(), clang::Scope::isOpenACCComputeConstructScope(), clang::Scope::isOpenMPLoopScope(), clang::StmtError(), and clang::Target.
| ExprResult Sema::ActOnBuiltinBitCastExpr | ( | SourceLocation | KWLoc, |
| Declarator & | Dcl, | ||
| ExprResult | Operand, | ||
| SourceLocation | RParenLoc ) |
Definition at line 426 of file SemaCast.cpp.
References BuildBuiltinBitCastExpr(), clang::ExprError(), GetTypeForDeclaratorCast(), and clang::Declarator::isInvalidType().
| ExprResult Sema::ActOnBuiltinOffsetOf | ( | Scope * | S, |
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | TypeLoc, | ||
| ParsedType | ParsedArgTy, | ||
| ArrayRef< OffsetOfComponent > | Components, | ||
| SourceLocation | RParenLoc ) |
Definition at line 16543 of file SemaExpr.cpp.
References BuildBuiltinOffsetOf(), Context, clang::ExprError(), GetTypeFromParser(), and clang::QualType::isNull().
| 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 6595 of file SemaExpr.cpp.
References clang::SemaOpenMP::ActOnOpenMPCall(), BuildCallExpr(), clang::Call, currentEvaluationContext(), clang::SemaBase::DiagCompat(), DiagnosedUnqualifiedCallsToStdFunctions(), LangOpts, OpenMP(), and clang::Sema::ExpressionEvaluationContextRecord::ReferenceToConsteval.
Referenced by BuiltinInvoke(), and clang::TreeTransform< AdjustConstraints >::RebuildCallExpr().
| StmtResult Sema::ActOnCapScopeReturnStmt | ( | SourceLocation | ReturnLoc, |
| Expr * | RetValExp, | ||
| NamedReturnInfo & | NRInfo, | ||
| bool | SupressSimplerImplicitMoves ) |
ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes.
Definition at line 3582 of file SemaStmt.cpp.
References ActOnFinishFullExpr(), clang::sema::LambdaScopeInfo::CallOperator, clang::cast(), clang::Type::castAs(), clang::Expr::containsErrors(), Context, clang::CPlusPlus, clang::ReturnStmt::Create(), CurContext, DeduceFunctionTypeFromReturnExpr(), DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), ExprEvalContexts, FunctionScopes, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getContainedAutoType(), getCopyElisionCandidate(), getCurFunction(), getLangOpts(), clang::FunctionType::getNoReturnAttr(), clang::FunctionDecl::getReturnType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), hasDeducedReturnType(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::InitializedEntity::InitializeResult(), clang::isa(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::Type::isVoidType(), PerformMoveOrCopyInitialization(), clang::Result, clang::sema::CapturingScopeInfo::ReturnType, clang::Decl::setInvalidDecl(), and clang::StmtError().
Referenced by BuildReturnStmt().
| StmtResult Sema::ActOnCapturedRegionEnd | ( | Stmt * | S | ) |
Definition at line 4814 of file SemaStmt.cpp.
References buildCapturedStmtCaptureList(), clang::sema::CapturedRegionScopeInfo::CapRegionKind, clang::cast(), clang::RecordDecl::completeDefinition(), clang::CapturedStmt::Create(), DiscardCleanupsInEvaluationContext(), getASTContext(), clang::CapturedStmt::getCapturedStmt(), PopDeclContext(), PopExpressionEvaluationContext(), PopFunctionScopeInfo(), clang::CapturedDecl::setBody(), clang::StmtError(), clang::sema::CapturedRegionScopeInfo::TheCapturedDecl, and clang::sema::CapturedRegionScopeInfo::TheRecordDecl.
Referenced by buildDistanceFunc(), and buildLoopVarFunc().
| void Sema::ActOnCapturedRegionError | ( | ) |
Definition at line 4799 of file SemaStmt.cpp.
References ActOnFields(), clang::cast(), DiscardCleanupsInEvaluationContext(), PopDeclContext(), PopExpressionEvaluationContext(), PopFunctionScopeInfo(), and clang::sema::CapturedRegionScopeInfo::TheRecordDecl.
| void Sema::ActOnCapturedRegionStart | ( | SourceLocation | Loc, |
| Scope * | CurScope, | ||
| CapturedRegionKind | Kind, | ||
| ArrayRef< CapturedParamNameType > | Params, | ||
| unsigned | OpenMPCaptureLevel = 0 ) |
Definition at line 4735 of file SemaStmt.cpp.
References clang::DeclContext::addDecl(), clang::CapturedContext, clang::CapturedDecl::castToDeclContext(), Context, clang::ImplicitParamDecl::Create(), CreateCapturedStmtRecordDecl(), CurContext, clang::SemaBase::Diag(), isOpenMPCapturedRegionInArmSMEFunction(), PotentiallyEvaluated, PushCapturedRegionScope(), PushDeclContext(), PushExpressionEvaluationContext(), clang::CapturedDecl::setContextParam(), and clang::CapturedDecl::setParam().
| void Sema::ActOnCapturedRegionStart | ( | SourceLocation | Loc, |
| Scope * | CurScope, | ||
| CapturedRegionKind | Kind, | ||
| unsigned | NumParams ) |
Definition at line 4701 of file SemaStmt.cpp.
References clang::DeclContext::addDecl(), clang::CapturedContext, clang::CapturedDecl::castToDeclContext(), Context, clang::ImplicitParamDecl::Create(), CreateCapturedStmtRecordDecl(), CurContext, clang::SemaBase::Diag(), ExprEvalContexts, isOpenMPCapturedRegionInArmSMEFunction(), PotentiallyEvaluated, PushCapturedRegionScope(), PushDeclContext(), PushExpressionEvaluationContext(), and clang::CapturedDecl::setContextParam().
Referenced by buildDistanceFunc(), buildLoopVarFunc(), and processCapturedRegions().
| ExprResult Sema::ActOnCaseExpr | ( | SourceLocation | CaseLoc, |
| ExprResult | Val ) |
Definition at line 485 of file SemaStmt.cpp.
References ActOnFinishFullExpr(), clang::Allow, clang::CaseValue, CheckConvertedConstantExpression(), clang::CPlusPlus11, DefaultLvalueConversion(), DiagnoseUnexpandedParameterPack(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), getCurFunction(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), ImpCastExprToType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::sema::FunctionScopeInfo::SwitchStack, and VerifyIntegerConstantExpression().
| StmtResult Sema::ActOnCaseStmt | ( | SourceLocation | CaseLoc, |
| ExprResult | LHS, | ||
| SourceLocation | DotDotDotLoc, | ||
| ExprResult | RHS, | ||
| SourceLocation | ColonLoc ) |
Definition at line 532 of file SemaStmt.cpp.
References Context, clang::CaseStmt::Create(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), getCurFunction(), getCurScope(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::SourceLocation::isInvalid(), clang::ActionResult< PtrTy, Compress >::isUnset(), LangOpts, clang::StmtError(), clang::Scope::SwitchScope, and clang::sema::FunctionScopeInfo::SwitchStack.
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildCaseStmt().
ActOnCaseStmtBody - This installs a statement as the body of a case.
Definition at line 563 of file SemaStmt.cpp.
References clang::cast().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildCaseStmtBody().
| ExprResult Sema::ActOnCastExpr | ( | Scope * | S, |
| SourceLocation | LParenLoc, | ||
| Declarator & | D, | ||
| ParsedType & | Ty, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | CastExpr ) |
Definition at line 7983 of file SemaExpr.cpp.
References BuildCStyleCastExpr(), BuildVectorLiteral(), CheckExtraCXXDefaultArguments(), clang::SemaObjC::CheckObjCBridgeRelatedCast(), CheckSufficientAllocSize(), clang::SemaObjC::CheckTollFreeBridgeCast(), checkUnusedDeclAttributes(), clang::CPlusPlus, CreateParsedType(), clang::SemaBase::Diag(), DiscardMisalignedMemberAddress(), clang::ExprError(), clang::ParenListExpr::getExpr(), clang::Expr::getExprLoc(), getLangOpts(), clang::ParenListExpr::getNumExprs(), clang::Stmt::getSourceRange(), clang::ParenExpr::getSubExpr(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), GetTypeForDeclaratorCast(), clang::QualType::getTypePtr(), clang::isa(), clang::Declarator::isInvalidType(), clang::Expr::isTypeDependent(), clang::Type::isVectorType(), clang::Type::isVoidType(), MaybeConvertParenListExprToParenExpr(), ObjC(), OpenCL(), and clang::Result.
| ExprResult Sema::ActOnCharacterConstant | ( | const Token & | Tok, |
| Scope * | UDLScope = nullptr ) |
Definition at line 3578 of file SemaExpr.cpp.
References clang::Ascii, BuildCookedLiteralOperatorCall(), clang::C23, Context, clang::CPlusPlus, clang::SemaBase::Diag(), clang::ExprError(), getLangOpts(), getUDSuffixLoc(), clang::Invalid, PP, Tok, clang::UTF16, clang::UTF32, clang::UTF8, and clang::Wide.
| ExprResult Sema::ActOnChooseExpr | ( | SourceLocation | BuiltinLoc, |
| Expr * | CondExpr, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr, | ||
| SourceLocation | RPLoc ) |
Definition at line 16562 of file SemaExpr.cpp.
References Context, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::OK_Ordinary, VerifyIntegerConstantExpression(), and clang::VK_PRValue.
Referenced by rebuildPotentialResultsAsNonOdrUsed().
| 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 8730 of file SemaTemplate.cpp.
References AddAlignmentAttributesForRecord(), AddMsStructLayoutForRecord(), clang::AS_none, clang::AS_public, clang::Sema::CheckTemplateArgumentInfo::CanonicalConverted, clang::cast(), CheckClassTemplate(), CheckTemplateArgumentList(), CheckTemplateDeclScope(), CheckTemplatePartialSpecialization(), CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), ClassTemplate, Context, clang::ClassTemplatePartialSpecializationDecl::Create(), clang::ClassTemplateSpecializationDecl::Create(), clang::FriendDecl::Create(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::CanQual< Type >::CreateUnsafe(), CurContext, clang::Definition, clang::SemaBase::Diag(), diagnoseQualifiedDeclaration(), DiagnoseUnexpandedParameterPack(), EnterTemplatedContext(), clang::Enum, clang::Friend, clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsTemplateDecl(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateParameterList::getParam(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::CXXRecordDecl::getPreviousDecl(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateArgumentLoc::getSourceRange(), clang::KeywordHelpers::getTagTypeKindForTypeSpec(), clang::TemplateParameterList::getTemplateLoc(), clang::CXXRecordDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::CXXScopeSpec::getWithLocInContext(), clang::TemplateParameterList::hasAssociatedConstraints(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), inferGslOwnerPointerAttribute(), clang::Invalid, clang::isa(), isAcceptableTagRedeclaration(), clang::TemplateName::isDependent(), clang::DeclContext::isDependentContext(), isRedefinitionAllowedFor(), clang::CXXScopeSpec::isSet(), clang::Scope::isTemplateParamScope(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, LangOpts, makeMergedDefinitionVisible(), makeTemplateArgumentListInfo(), MatchTemplateParametersToScopeSpecifier(), clang::None, clang::SkipBodyInfo::Previous, ProcessAPINotes(), ProcessDeclAttributeList(), clang::TemplateIdAnnotation::RAngleLoc, RebuildTemplateParamsInCurrentInstantiation(), clang::Reference, clang::TemplateTemplateParmDecl::removeDefaultArgument(), clang::ClassTemplatePartialSpecializationDecl::setMemberSpecialization(), SetNestedNameSpecifier(), clang::ClassTemplateSpecializationDecl::setTemplateArgsAsWritten(), clang::TagDecl::setTemplateParameterListsInfo(), clang::SkipBodyInfo::ShouldSkip, clang::TemplateArgumentListInfo::size(), clang::TemplateParameterList::size(), clang::Specialization, clang::Sema::CheckTemplateArgumentInfo::StrictPackMatch, clang::TemplateIdAnnotation::Template, clang::TemplateIdAnnotation::TemplateNameLoc, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, UPPC_ExplicitSpecialization, and UPPC_PartialSpecialization.
Definition at line 8629 of file SemaDeclAttr.cpp.
References clang::cast(), CheckAssignmentConstraints(), Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::DeclarationNameInfo::getName(), clang::ValueDecl::getType(), IsAssignConvertCompatible(), and clang::Type::isDependentType().
| ExprResult Sema::ActOnCoawaitExpr | ( | Scope * | S, |
| SourceLocation | KwLoc, | ||
| Expr * | E ) |
Definition at line 799 of file SemaCoroutine.cpp.
References ActOnCoroutineBodyStart(), BuildOperatorCoawaitLookupExpr(), BuildUnresolvedCoawaitExpr(), clang::cast(), CheckPlaceholderExpr(), checkSuspensionContext(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::hasPlaceholderType(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by BuildCXXForRangeStmt(), and BuildNonArrayForRange().
| void Sema::ActOnComment | ( | SourceRange | Comment | ) |
Definition at line 2598 of file Sema.cpp.
References Context, clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::RawComment::getKind(), clang::SourceLocation::getLocWithOffset(), clang::RawComment::hasUnsupportedSplice(), clang::RawComment::isAlmostTrailingComment(), LangOpts, clang::RawComment::RCK_Invalid, clang::RawComment::RCK_OrdinaryBCPL, clang::RawComment::RCK_OrdinaryC, and SourceMgr.
| ExprResult Sema::ActOnCompoundLiteral | ( | SourceLocation | LParenLoc, |
| ParsedType | Ty, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | InitExpr ) |
Definition at line 7214 of file SemaExpr.cpp.
References BuildCompoundLiteralExpr(), Context, and GetTypeFromParser().
| concepts::Requirement * Sema::ActOnCompoundRequirement | ( | Expr * | E, |
| SourceLocation | NoexceptLoc ) |
Definition at line 7842 of file SemaExprCXX.cpp.
References BuildExprRequirement().
| concepts::Requirement * Sema::ActOnCompoundRequirement | ( | Expr * | E, |
| SourceLocation | NoexceptLoc, | ||
| CXXScopeSpec & | SS, | ||
| TemplateIdAnnotation * | TypeConstraint, | ||
| unsigned | Depth ) |
Definition at line 7848 of file SemaExprCXX.cpp.
References BuildExprRequirement(), BuildTypeConstraint(), Context, clang::TemplateParameterList::Create(), clang::TemplateTypeParmDecl::Create(), and CurContext.
| StmtResult Sema::ActOnCompoundStmt | ( | SourceLocation | L, |
| SourceLocation | R, | ||
| ArrayRef< Stmt * > | Elts, | ||
| bool | isStmtExpr ) |
Definition at line 436 of file SemaStmt.cpp.
References clang::cast(), clang::sema::FunctionScopeInfo::CompoundScopes, Context, clang::CPlusPlus, clang::CompoundStmt::Create(), CurrentInstantiationScope, clang::SemaBase::Diag(), DiagnoseEmptyLoopBody(), Diags, clang::FPOptions::getChangesFrom(), getCurCompoundScope(), getCurFPFeatures(), getCurFunction(), getLangOpts(), clang::Decl::getLocation(), clang::sema::CompoundScopeInfo::InitialFPFeatures, and clang::isa().
Referenced by buildDistanceFunc(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), and clang::TreeTransform< AdjustConstraints >::RebuildCompoundStmt().
| Sema::ConditionResult Sema::ActOnCondition | ( | Scope * | S, |
| SourceLocation | Loc, | ||
| Expr * | SubExpr, | ||
| ConditionKind | CK, | ||
| bool | MissingOK = false ) |
Definition at line 20954 of file SemaExpr.cpp.
References ActOnFinishFullExpr(), Boolean, CheckBooleanCondition(), CheckSwitchCondition(), clang::Cond, ConditionError(), ConstexprIf, CreateRecoveryExpr(), clang::Stmt::getBeginLoc(), clang::Stmt::getEndLoc(), clang::isa(), PreferredConditionType(), and Switch.
Referenced by buildSingleCopyAssignRecursively().
| ExprResult Sema::ActOnConditionalOp | ( | SourceLocation | QuestionLoc, |
| SourceLocation | ColonLoc, | ||
| Expr * | CondExpr, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr ) |
ActOnConditionalOp - Parse a ?
: operation. Note that 'LHS' may be null in the case of a the GNU conditional expr extension.
Definition at line 9037 of file SemaExpr.cpp.
References CheckConditionalOperands(), CheckPlaceholderExpr(), computeConditionalNullability(), clang::Cond, Context, clang::CPlusPlus, DiagnoseConditionalPrecedence(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Expr::hasPlaceholderType(), clang::Type::isArrayType(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Expr::isOrdinaryOrBitFieldObject(), clang::Expr::isPRValue(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::OK_Ordinary, TemporaryMaterializationConversion(), UsualUnaryConversions(), and clang::VK_PRValue.
Referenced by buildDistanceFunc(), BuildSynthesizedThreeWayComparison(), checkOpenMPLoop(), clang::TreeTransform< AdjustConstraints >::RebuildConditionalOperator(), and rebuildPotentialResultsAsNonOdrUsed().
| Sema::ConditionResult Sema::ActOnConditionVariable | ( | Decl * | ConditionVar, |
| SourceLocation | StmtLoc, | ||
| ConditionKind | CK ) |
Definition at line 4405 of file SemaExprCXX.cpp.
References ActOnFinishFullExpr(), clang::cast(), CheckConditionVariable(), ConditionError(), ConstexprIf, clang::ActionResult< PtrTy, Compress >::get(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
| ExprResult Sema::ActOnConstantExpression | ( | ExprResult | Res | ) |
Definition at line 20173 of file SemaExpr.cpp.
References CheckLValueToRValueConversionOperand(), clang::ActionResult< PtrTy, Compress >::get(), and clang::ActionResult< PtrTy, Compress >::isUsable().
Referenced by CheckTemplateArgument().
| StmtResult Sema::ActOnContinueStmt | ( | SourceLocation | ContinueLoc, |
| Scope * | CurScope, | ||
| LabelDecl * | Label, | ||
| SourceLocation | LabelLoc ) |
Definition at line 3327 of file SemaStmt.cpp.
References CheckJumpOutOfSEHFinallyOrDefer(), Context, clang::SemaBase::Diag(), FindLabeledBreakContinueScope(), clang::Scope::getContinueParent(), clang::Scope::isConditionVarScope(), clang::Scope::isOpenACCComputeConstructScope(), clang::StmtError(), and clang::Target.
| Decl * Sema::ActOnConversionDeclarator | ( | CXXConversionDecl * | Conversion | ) |
ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ conversion function.
This routine is responsible for recording the conversion function in the C++ class, if possible.
Definition at line 11509 of file SemaDeclCXX.cpp.
References clang::cast(), clang::Type::castAs(), Context, Diag(), clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), clang::Decl::getDeclContext(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getLocation(), clang::Type::getPointeeType(), getReturnTypeLoc(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::DeclaratorDecl::getTypeSpecStartLoc(), IsDerivedFrom(), clang::Type::isRecordType(), clang::Type::isUndeducedAutoType(), clang::Type::isVoidType(), clang::CXXMethodDecl::size_overridden_methods(), clang::TSK_ExplicitSpecialization, and clang::TSK_Undeclared.
Referenced by CheckFunctionDeclaration().
| ExprResult Sema::ActOnConvertVectorExpr | ( | Expr * | E, |
| ParsedType | ParsedDestTy, | ||
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RParenLoc ) |
ActOnConvertVectorExpr - create a new convert-vector expression from the provided arguments.
__builtin_convertvector( value, dst type )
Definition at line 6904 of file SemaExpr.cpp.
References ConvertVectorExpr(), and GetTypeFromParser().
| StmtResult Sema::ActOnCoreturnStmt | ( | Scope * | S, |
| SourceLocation | KwLoc, | ||
| Expr * | E ) |
Definition at line 1014 of file SemaCoroutine.cpp.
References ActOnCoroutineBodyStart(), BuildCoreturnStmt(), and clang::StmtError().
| bool Sema::ActOnCoroutineBodyStart | ( | Scope * | S, |
| SourceLocation | KwLoc, | ||
| StringRef | Keyword ) |
Definition at line 686 of file SemaCoroutine.cpp.
References ActOnFinishFullExpr(), buildOperatorCoawaitCall(), buildPromiseCall(), BuildResolvedCoawaitExpr(), clang::cast(), checkCoroutineContext(), checkFinalSuspendNoThrow(), checkReturnStmtInCoroutine(), CurContext, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), getCurFunction(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Keyword, PotentiallyEvaluated, and clang::StmtError().
Referenced by ActOnCoawaitExpr(), ActOnCoreturnStmt(), ActOnCoyieldExpr(), and ActOnCXXForRangeStmt().
| ExprResult Sema::ActOnCoyieldExpr | ( | Scope * | S, |
| SourceLocation | KwLoc, | ||
| Expr * | E ) |
Definition at line 957 of file SemaCoroutine.cpp.
References ActOnCoroutineBodyStart(), BuildCoyieldExpr(), buildOperatorCoawaitCall(), buildPromiseCall(), checkSuspensionContext(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), getCurFunction(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
| ExprResult Sema::ActOnCXXAssumeAttr | ( | Stmt * | St, |
| const ParsedAttr & | A, | ||
| SourceRange | Range ) |
Definition at line 757 of file SemaStmtAttr.cpp.
References clang::AttributeCommonInfo::AS_CXX11, BuildCXXAssumeExpr(), clang::CPlusPlus23, clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getAttrName(), getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::AttributeCommonInfo::getSyntax(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by handleCXXAssumeAttr().
| ExprResult Sema::ActOnCXXBoolLiteral | ( | SourceLocation | OpLoc, |
| tok::TokenKind | Kind ) |
ActOnCXXBoolLiteral - Parse {true,false} literals.
Definition at line 805 of file SemaExprCXX.cpp.
References Context.
Referenced by BuildEmptyCXXFoldExpr().
| 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 4272 of file SemaStmt.cpp.
References Context.
| 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 18955 of file SemaDeclCXX.cpp.
References ActOnDeclarator(), Diag(), clang::Declarator::getDeclSpec(), clang::Decl::getLocation(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::isa(), clang::DeclSpec::SCS_typedef, and clang::VarDecl::setCXXCondDecl().
| ExprResult Sema::ActOnCXXDelete | ( | SourceLocation | StartLoc, |
| bool | UseGlobal, | ||
| bool | ArrayForm, | ||
| Expr * | Operand ) |
ActOnCXXDelete - Parsed a C++ 'delete' expression (C++ 5.3.5), as in:
or
Definition at line 3980 of file SemaExprCXX.cpp.
References clang::alignedAllocationModeFromBool(), clang::AS_public, clang::Type::castAs(), CheckDestructorAccess(), CheckVirtualDtorCall(), Context, clang::FixItHint::CreateInsertion(), clang::Default, DefaultLvalueConversion(), clang::SemaBase::Diag(), DiagnoseUseOfDecl(), doesUsualArrayDeleteWantSize(), clang::ExprError(), FindDeallocationFunction(), FindUsualDeallocationFunction(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Qualifiers::getAddressSpaceAttributePrintValue(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Stmt::getBeginLoc(), clang::CXXRecordDecl::getDestructor(), clang::Expr::getExprLoc(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::Type::getPointeeType(), getPointeeType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), 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::isEnumeralType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isSFINAEContext(), clang::isSizedDeallocation(), clang::Type::isSizelessType(), clang::Expr::isTypeDependent(), clang::Type::isVoidType(), LangOpts, LookupDestructor(), clang::DeclAccessPair::make(), MarkFunctionReferenced(), clang::ast_matchers::match(), clang::No, clang::Passing, clang::ImplicitDeallocationParameters::PassSize, clang::ImplicitDeallocationParameters::PassTypeIdentity, clang::SemaBase::PDiag(), PerformContextualImplicitConversion(), PerformImplicitConversion(), clang::Qualifiers::removeCVRQualifiers(), RequireCompleteType(), clang::Result, Sema(), ShouldUseTypeAwareOperatorNewOrDelete(), clang::sizedDeallocationModeFromBool(), and clang::T.
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildCXXDeleteExpr().
| 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 1012 of file SemaCXXScopeSpec.cpp.
References computeDeclContext(), EnterDeclaratorContext(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), RebuildNestedNameSpecifierInCurrentInstantiation(), and RequireCompleteDeclContext().
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 18931 of file SemaDeclCXX.cpp.
References clang::Sema::ExpressionEvaluationContextRecord::EK_VariableInit, EnterDeclaratorContext(), clang::Decl::getDeclContext(), clang::Decl::isInvalidDecl(), clang::Decl::isOutOfLine(), PotentiallyEvaluated, and PushExpressionEvaluationContext().
| 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 1034 of file SemaCXXScopeSpec.cpp.
References computeDeclContext(), ExitDeclaratorContext(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().
ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaration 'Dcl'.
Definition at line 18946 of file SemaDeclCXX.cpp.
References ExitDeclaratorContext(), clang::Decl::isOutOfLine(), and PopExpressionEvaluationContext().
| ExprResult Sema::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 ).
Definition at line 1529 of file SemaTemplateVariadic.cpp.
References BuildCXXFoldExpr(), clang::cast(), CheckFoldOperand(), clang::Expr::containsUnexpandedParameterPack(), Context, CreateUnresolvedLookupExpr(), clang::SemaBase::Diag(), clang::UnresolvedSetImpl::empty(), clang::ExprError(), clang::BinaryOperator::getOverloadedOperator(), clang::Stmt::getSourceRange(), and LookupBinOp().
| void Sema::ActOnCXXForRangeDecl | ( | Decl * | D | ) |
Definition at line 14692 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), clang::Error, clang::Decl::getLocation(), clang::DeclaratorDecl::getOuterLocStart(), clang::VarDecl::getStorageClass(), clang::VarDecl::getTSCSpec(), clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_PrivateExtern, clang::SC_Register, clang::SC_Static, clang::VarDecl::setCXXForRangeDecl(), clang::Decl::setInvalidDecl(), clang::TSCS___thread, clang::TSCS__Thread_local, clang::TSCS_thread_local, and clang::TSCS_unspecified.
| StmtResult Sema::ActOnCXXForRangeIdentifier | ( | Scope * | S, |
| SourceLocation | IdentLoc, | ||
| IdentifierInfo * | Ident, | ||
| ParsedAttributes & | Attrs ) |
Definition at line 14746 of file SemaDecl.cpp.
References ActOnDeclarator(), ActOnDeclStmt(), clang::Declarator::AddTypeInfo(), clang::cast(), FinalizeDeclaration(), FinalizeDeclaratorGroup(), clang::ForInit, clang::SourceRange::getEnd(), clang::AttributePool::getFactory(), clang::ParsedAttributes::getPool(), getPrintingPolicy(), clang::DeclaratorChunk::getReference(), clang::SourceLocation::isValid(), clang::ParsedAttributesView::none(), clang::ParsedAttributesView::Range, clang::Declarator::SetIdentifier(), clang::DeclSpec::SetTypeSpecType(), clang::Declarator::takeAttributesAppending(), and clang::DeclSpec::TST_auto.
| StmtResult Sema::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.
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 2431 of file SemaStmt.cpp.
References ActOnCoroutineBodyStart(), ActOnDeclStmt(), ActOnInitializerError(), clang::SemaObjC::ActOnObjCForCollectionStmt(), BuildCXXForRangeStmt(), BuildDeclaratorGroup(), Context, clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), FinishForRangeVarDecl(), clang::First, clang::ActionResult< PtrTy, Compress >::get(), clang::DeclStmt::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::Scope::getDepth(), clang::DeclStmt::getSingleDecl(), clang::Stmt::getSourceRange(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::SourceLocation::isInvalid(), clang::Decl::isInvalidDecl(), clang::DeclStmt::isSingleDecl(), ObjC(), ObjCEnumerationCollection(), clang::StmtError(), and UPPC_Expression.
Referenced by RebuildForRangeWithDereference().
| bool Sema::ActOnCXXGlobalScopeSpecifier | ( | SourceLocation | CCLoc, |
| CXXScopeSpec & | SS ) |
The parser has parsed a global nested-name-specifier '::'.
| CCLoc | The location of the '::'. |
| SS | The nested-name-specifier, which will be updated in-place to reflect the parsed nested-name-specifier. |
Definition at line 266 of file SemaCXXScopeSpec.cpp.
References Context, and clang::CXXScopeSpec::MakeGlobal().
| NamedDecl * Sema::ActOnCXXMemberDeclarator | ( | Scope * | S, |
| AccessSpecifier | AS, | ||
| Declarator & | D, | ||
| MultiTemplateParamsArg | TemplateParameterLists, | ||
| Expr * | BitfieldWidth, | ||
| const VirtSpecifiers & | VS, | ||
| InClassInitStyle | InitStyle ) |
ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed.
'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 3443 of file SemaDeclCXX.cpp.
References clang::AS_public, clang::cast(), 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::DeclarationName::getAsIdentifierInfo(), clang::DeclSpec::getAttributes(), clang::Decl::getBeginLoc(), clang::Declarator::getBeginLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), 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::DeclarationNameInfo::getName(), clang::Declarator::getName(), GetNameForDeclarator(), clang::DeclarationName::getNameKind(), clang::VirtSpecifiers::getOverrideLoc(), clang::CXXScopeSpec::getRange(), clang::Stmt::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), HandleDeclarator(), HandleField(), HandleMSProperty(), clang::DeclSpec::hasConstexprSpecifier(), clang::ICIS_NoInit, clang::IK_TemplateId, clang::isa(), clang::Declarator::isDeclarationOfFunction(), clang::VirtSpecifiers::isFinalSpecified(), clang::VirtSpecifiers::isFinalSpelledSealed(), clang::DeclSpec::isFriendSpecified(), clang::DeclarationName::isIdentifier(), clang::CXXScopeSpec::isInvalid(), clang::SourceLocation::isInvalid(), clang::VirtSpecifiers::isOverrideSpecified(), clang::CXXScopeSpec::isSet(), IsUnusedPrivateField(), 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::UnqualifiedId::TemplateId, clang::DeclSpec::TQ_const, and UnusedPrivateFields.
| 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 314 of file SemaCast.cpp.
References BuildCXXNamedCast(), CheckExtraCXXDefaultArguments(), clang::CPlusPlus, clang::ExprError(), getLangOpts(), clang::Expr::getType(), GetTypeForDeclaratorCast(), and clang::Declarator::isInvalidType().
| 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 >::'.
| S | The scope in which this nested-name-specifier occurs. |
| SS | The nested-name-specifier, which is both an input parameter (the nested-name-specifier before this type) and an output parameter (containing the full nested-name-specifier, including this new type). |
| TemplateKWLoc | the location of the 'template' keyword, if any. |
| TemplateName | the template name. |
| TemplateNameLoc | The location of the template name. |
| LAngleLoc | The location of the opening angle bracket ('<'). |
| TemplateArgs | The template arguments. |
| RAngleLoc | The location of the closing angle bracket ('>'). |
| CCLoc | The location of the '::'. |
| EnteringContext | Whether we're entering the context of the nested-name-specifier. |
Definition at line 891 of file SemaCXXScopeSpec.cpp.
References CheckTemplateIdType(), clang::CXXScopeSpec::clear(), Context, clang::SemaBase::Diag(), clang::OpaquePtr< PtrTy >::get(), clang::TypeLocBuilder::getTypeLocInContext(), clang::CXXScopeSpec::getWithLocInContext(), clang::isa(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::Make(), clang::None, NoteAllFoundTemplates(), clang::TypeLocBuilder::push(), clang::T, and translateTemplateArguments().
| 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::'.
| S | The scope in which this nested-name-specifier occurs. |
| IdInfo | Parser information about an identifier in the nested-name-spec. |
| EnteringContext | Whether we're entering the context nominated by this nested-name-specifier. |
| SS | The nested-name-specifier, which is both an input parameter (the nested-name-specifier before this type) and an output parameter (containing the full nested-name-specifier, including this new type). |
| IsCorrectedToColon | If not null, suggestions to replace '::' -> ':' are allowed. The bool value pointed by this parameter is set to 'true' if the identifier is treated as if it was followed by ':', not '::'. |
| OnlyNamespace | If true, only considers namespaces in lookup. |
Definition at line 817 of file SemaCXXScopeSpec.cpp.
References BuildCXXNestedNameSpecifier(), and clang::CXXScopeSpec::isInvalid().
| bool Sema::ActOnCXXNestedNameSpecifierDecltype | ( | CXXScopeSpec & | SS, |
| const DeclSpec & | DS, | ||
| SourceLocation | ColonColonLoc ) |
Definition at line 829 of file SemaCXXScopeSpec.cpp.
References BuildDecltypeType(), Context, clang::SemaBase::Diag(), clang::SourceRange::getEnd(), getLangOpts(), clang::DeclSpec::getRepAsExpr(), clang::TypeLocBuilder::getTypeLocInContext(), clang::DeclSpec::getTypeofParensRange(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::isa(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::Make(), clang::TypeLocBuilder::push(), clang::DecltypeTypeLoc::setDecltypeLoc(), clang::DecltypeTypeLoc::setRParenLoc(), clang::T, clang::DeclSpec::TST_decltype, and clang::DeclSpec::TST_error.
| bool Sema::ActOnCXXNestedNameSpecifierIndexedPack | ( | CXXScopeSpec & | SS, |
| const DeclSpec & | DS, | ||
| SourceLocation | ColonColonLoc, | ||
| QualType | Type ) |
Definition at line 857 of file SemaCXXScopeSpec.cpp.
References clang::cast(), Context, getASTContext(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getEllipsisLoc(), clang::TypeLocBuilder::getTypeLocInContext(), clang::DeclSpec::getTypeSpecType(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::Make(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTrivial(), clang::PackIndexingTypeLoc::setEllipsisLoc(), clang::DeclSpec::TST_error, and clang::DeclSpec::TST_typename_pack_indexing.
| ExprResult Sema::ActOnCXXNew | ( | SourceLocation | StartLoc, |
| bool | UseGlobal, | ||
| SourceLocation | PlacementLParen, | ||
| MultiExprArg | PlacementArgs, | ||
| SourceLocation | PlacementRParen, | ||
| SourceRange | TypeIdParens, | ||
| Declarator & | D, | ||
| Expr * | Initializer ) |
Parsed a C++ 'new' expression (C++ 5.3.4).
E.g.:
or
| StartLoc | The first location of the expression. |
| UseGlobal | True if 'new' was prefixed with '::'. |
| PlacementLParen | Opening paren of the placement arguments. |
| PlacementArgs | Placement new arguments. |
| PlacementRParen | Closing paren of the placement arguments. |
| TypeIdParens | If the type is in parens, the source range. |
| D | The type to be allocated, as well as array dimensions. |
| Initializer | The initializing expression or initializer-list, or null if there is none. |
Definition at line 2018 of file SemaExprCXX.cpp.
References clang::Allow, clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, clang::ArrayBound, BuildCXXNew(), CheckConvertedConstantExpression(), Context, clang::CPlusPlus14, clang::SemaBase::Diag(), clang::Declarator::DropFirstTypeObject(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Declarator::getDeclSpec(), clang::Declarator::getEndLoc(), getLangOpts(), clang::Declarator::getNumTypeObjects(), 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().
| ExprResult Sema::ActOnCXXNullPtrLiteral | ( | SourceLocation | Loc | ) |
ActOnCXXNullPtrLiteral - Parse 'nullptr'.
Definition at line 813 of file SemaExprCXX.cpp.
References Context.
| ExprResult Sema::ActOnCXXParenListInitExpr | ( | ArrayRef< Expr * > | Args, |
| QualType | T, | ||
| unsigned | NumUserSpecifiedExprs, | ||
| SourceLocation | InitLoc, | ||
| SourceLocation | LParenLoc, | ||
| SourceLocation | RParenLoc ) |
Definition at line 8157 of file SemaExpr.cpp.
References Context, clang::CXXParenListInitExpr::Create(), and clang::T.
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildCXXParenListInitExpr().
| ExprResult Sema::ActOnCXXThis | ( | SourceLocation | Loc | ) |
Definition at line 1401 of file SemaExprCXX.cpp.
References BuildCXXThisExpr(), CheckCXXThisType(), clang::ExprError(), and getCurrentThisType().
Referenced by buildCoroutinePromise(), CheckDestructor(), collectPlacementArgs(), and DefineImplicitLambdaToBlockPointerConversion().
| ExprResult Sema::ActOnCXXThrow | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| Expr * | expr ) |
Definition at line 818 of file SemaExprCXX.cpp.
References clang::Scope::BlockScope, BuildCXXThrow(), clang::Scope::ClassScope, clang::Scope::FnScope, clang::Scope::getFlags(), clang::Scope::getParent(), clang::Expr::IgnoreParens(), clang::Scope::isDeclScope(), clang::Scope::ObjCMethodScope, and clang::Scope::TryScope.
| StmtResult Sema::ActOnCXXTryBlock | ( | SourceLocation | TryLoc, |
| Stmt * | TryBlock, | ||
| ArrayRef< Stmt * > | Handlers ) |
ActOnCXXTryBlock - Takes a try compound-statement and a number of handlers and creates a try statement from them.
Definition at line 4392 of file SemaStmt.cpp.
References clang::cast(), Context, clang::CXXTryStmt::Create(), clang::CanQual< Type >::CreateUnsafe(), CUDA(), clang::SemaCUDA::CurrentTarget(), clang::SemaBase::Diag(), clang::SemaCUDA::DiagIfDeviceCode(), DiagnoseExceptionUse(), clang::sema::FunctionScopeInfo::FirstSEHTryLoc, clang::Type::getAsCXXRecordDecl(), clang::CXXCatchStmt::getBeginLoc(), clang::QualType::getCanonicalType(), clang::CXXCatchStmt::getCaughtType(), getCurFunction(), getCurScope(), clang::CXXCatchStmt::getExceptionDecl(), getLangOpts(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::QualType::getUnqualifiedType(), clang::CXXBasePaths::isAmbiguous(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::sema::FunctionScopeInfo::setHasCXXTry(), clang::CXXBasePaths::setOrigin(), clang::StmtError(), clang::T, and targetDiag().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildCXXTryStmt().
| ExprResult Sema::ActOnCXXTypeConstructExpr | ( | ParsedType | TypeRep, |
| SourceLocation | LParenOrBraceLoc, | ||
| MultiExprArg | Exprs, | ||
| SourceLocation | RParenOrBraceLoc, | ||
| bool | ListInitialization ) |
ActOnCXXTypeConstructExpr - 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 1500 of file SemaExprCXX.cpp.
References BuildCXXTypeConstructExpr(), Context, CreateRecoveryExpr(), clang::ExprError(), clang::TypeLoc::getBeginLoc(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), and clang::Result.
| ExprResult Sema::ActOnCXXTypeid | ( | SourceLocation | OpLoc, |
| SourceLocation | LParenLoc, | ||
| bool | isType, | ||
| void * | TyOrExpr, | ||
| SourceLocation | RParenLoc ) |
ActOnCXXTypeid - Parse typeid( something ).
ActOnCXXTypeidOfType - Parse typeid( type-id ) or typeid (expression);.
Definition at line 638 of file SemaExprCXX.cpp.
References BuildCXXTypeId(), Context, clang::CPlusPlus20, CXXTypeInfoDecl, clang::SemaBase::Diag(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::DiagnosticsEngine::getDiagnosticOptions(), getDiagnostics(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), getLangOpts(), getStdNamespace(), GetTypeFromParser(), LangOpts, LookupQualifiedName(), LookupTagName, clang::DiagnosticOptions::MSVC, PP, clang::Result, and clang::T.
| 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 781 of file SemaExprCXX.cpp.
References clang::QualType::addConst(), BuildCXXUuidof(), Context, clang::ExprError(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), GetTypeFromParser(), and clang::T.
| Decl * Sema::ActOnDeclarator | ( | Scope * | S, |
| Declarator & | D ) |
Definition at line 6259 of file SemaDecl.cpp.
References clang::SemaOpenMP::ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Declaration, clang::Decl::getDeclContext(), HandleDeclarator(), clang::DeclContext::isFileContext(), LangOpts, OpenMP(), OriginalLexicalContext, clang::Declarator::setFunctionDefinitionKind(), and clang::Decl::setTopLevelDeclInObjCContainer().
Referenced by ActOnCXXConditionDeclaration(), ActOnCXXForRangeIdentifier(), and ImplicitlyDefineFunction().
| StmtResult Sema::ActOnDeclStmt | ( | DeclGroupPtrTy | Decl, |
| SourceLocation | StartLoc, | ||
| SourceLocation | EndLoc ) |
Definition at line 75 of file SemaStmt.cpp.
References Context, clang::OpaquePtr< PtrTy >::get(), clang::DeclGroupRef::isNull(), and clang::StmtError().
Referenced by ActOnCXXForRangeIdentifier(), ActOnCXXForRangeStmt(), buildCoroutineParameterMoves(), BuildCXXForRangeStmt(), precomputeExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildDeclStmt().
| ExprResult Sema::ActOnDecltypeExpression | ( | Expr * | E | ) |
Process the expression contained within a decltype.
For such expressions, certain semantic checks on temporaries are delayed until this point, and are omitted for the 'topmost' call in the decltype expression. If the topmost call bound a temporary, strip that temporary off the expression.
Definition at line 6723 of file SemaExprCXX.cpp.
References ActOnDecltypeExpression(), ActOnParenExpr(), clang::Bind, clang::Call, CheckCallReturnType(), CheckDestructorAccess(), CheckPlaceholderExpr(), CheckUnevaluatedOperand(), Cleanup, Context, clang::BinaryOperator::Create(), clang::Destructor, DiagnoseUseOfDecl(), clang::Sema::ExpressionEvaluationContextRecord::EK_Decltype, clang::Sema::ExpressionEvaluationContextRecord::EK_Other, clang::ExprError(), ExprEvalContexts, clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), clang::CXXBindTemporaryExpr::getSubExpr(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), LookupDestructor(), MarkFunctionReferenced(), clang::SemaBase::PDiag(), clang::Result, and clang::CXXTemporary::setDestructor().
Referenced by ActOnDecltypeExpression().
| NamedDecl * Sema::ActOnDecompositionDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| MultiTemplateParamsArg | TemplateParamLists ) |
Definition at line 722 of file SemaDeclCXX.cpp.
References ActOnVariableDeclarator(), clang::Scope::AddDecl(), clang::DecompositionDeclarator::bindings(), clang::cast(), CheckShadow(), clang::Condition, clang::Consteval, Context, clang::CPlusPlus17, clang::CPlusPlus20, clang::CPlusPlus26, clang::BindingDecl::Create(), clang::FixItHint::CreateRemoval(), CurContext, Diag(), clang::SemaBase::DiagCompat(), 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(), isDeclInScope(), clang::Declarator::isDecompositionDeclarator(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFunctionOrMethod(), clang::Type::isFunctionType(), clang::IdentifierInfo::isPlaceholder(), clang::Declarator::isRedeclaration(), clang::DeclContext::isTranslationUnit(), clang::SourceLocation::isValid(), clang::DeclaratorChunk::Kind, clang::TemplateIdAnnotation::Kind, LookupName(), LookupOrdinaryName, clang::Declarator::mayHaveDecompositionDeclarator(), New, OpenMP(), clang::DeclaratorChunk::Paren, ParsingInitForAutoVars, Previous, ProcessDeclAttributeList(), 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, clang::Unspecified, and UPPC_DeclarationType.
Referenced by HandleDeclarator().
| void Sema::ActOnDefaultCtorInitializers | ( | Decl * | CDtorDecl | ) |
Definition at line 5976 of file SemaDeclCXX.cpp.
References clang::Constructor, and SetCtorInitializers().
| StmtResult Sema::ActOnDefaultStmt | ( | SourceLocation | DefaultLoc, |
| SourceLocation | ColonLoc, | ||
| Stmt * | SubStmt, | ||
| Scope * | CurScope ) |
Definition at line 568 of file SemaStmt.cpp.
References Context, clang::SemaBase::Diag(), getCurFunction(), getCurScope(), LangOpts, clang::StmtError(), clang::Scope::SwitchScope, and clang::sema::FunctionScopeInfo::SwitchStack.
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildDefaultStmt().
| void Sema::ActOnDeferStmtError | ( | Scope * | CurScope | ) |
Definition at line 3957 of file SemaStmt.cpp.
References CurrentDefer.
| void Sema::ActOnDefinedDeclarationSpecifier | ( | Decl * | D | ) |
Called once it is known whether a tag declaration is an anonymous union or struct.
Definition at line 5510 of file SemaDecl.cpp.
References DiagPlaceholderFieldDeclDefinitions().
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 10957 of file SemaDeclCXX.cpp.
References clang::Scope::AddDecl(), clang::cast(), and IdResolver.
| void Sema::actOnDelayedExceptionSpecification | ( | Decl * | D, |
| ExceptionSpecificationType | EST, | ||
| SourceRange | SpecificationRange, | ||
| ArrayRef< ParsedType > | DynamicExceptions, | ||
| ArrayRef< SourceRange > | DynamicExceptionRanges, | ||
| Expr * | NoexceptExpr ) |
Add an exception-specification to the given member or friend function (or function template).
The exception-specification was parsed after the function itself was declared.
Definition at line 19461 of file SemaDeclCXX.cpp.
References checkExceptionSpecification(), CheckOverridingFunctionExceptionSpec(), checkThisInStaticMemberFunctionExceptionSpec(), Context, clang::CXXMethodDecl::isStatic(), clang::CXXMethodDecl::isVirtual(), and clang::CXXMethodDecl::overridden_methods().
| 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 737 of file SemaTemplate.cpp.
References BuildDependentDeclRefExpr(), Context, clang::CXXDependentScopeMemberExpr::Create(), clang::ExprError(), getCurrentThisType(), clang::CXXScopeSpec::isEmpty(), and clang::QualType::isNull().
Referenced by ActOnIdExpression(), and ActOnNameClassifiedAsDependentNonType().
| ExprResult Sema::ActOnDependentMemberExpr | ( | Expr * | Base, |
| QualType | BaseType, | ||
| bool | IsArrow, | ||
| SourceLocation | OpLoc, | ||
| const CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| NamedDecl * | FirstQualifierInScope, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs ) |
Definition at line 558 of file SemaExprMember.cpp.
References clang::TemplateArgumentListInfo::arguments(), Context, clang::CXXDependentScopeMemberExpr::Create(), clang::SemaBase::Diag(), clang::ExprError(), clang::Type::getAs(), getLangOpts(), clang::DeclarationNameInfo::getName(), clang::PointerType::getPointeeType(), clang::DeclarationNameInfo::getSourceRange(), clang::Stmt::getSourceRange(), clang::CXXScopeSpec::getWithLocInContext(), clang::DeclarationName::isDependentName(), isDependentScopeSpecifier(), clang::Type::isRecordType(), and ObjC().
Referenced by BuildMemberReferenceExpr().
| TypeResult Sema::ActOnDependentTag | ( | Scope * | S, |
| unsigned | TagSpec, | ||
| TagUseKind | TUK, | ||
| const CXXScopeSpec & | SS, | ||
| const IdentifierInfo * | Name, | ||
| SourceLocation | TagLoc, | ||
| SourceLocation | NameLoc ) |
Definition at line 11053 of file SemaTemplate.cpp.
References Context, CreateParsedType(), clang::Declaration, clang::Definition, clang::SemaBase::Diag(), clang::KeywordHelpers::getKeywordForTagTypeKind(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::KeywordHelpers::getTagTypeKindForTypeSpec(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::TypeLocBuilder::push(), clang::Result, clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), and clang::DependentNameTypeLoc::setQualifierLoc().
| ExprResult Sema::ActOnDesignatedInitializer | ( | Designation & | Desig, |
| SourceLocation | EqualOrColonLoc, | ||
| bool | GNUSyntax, | ||
| ExprResult | Init ) |
Definition at line 3656 of file SemaInit.cpp.
References CheckArrayDesignatorExpr(), Context, clang::DesignatedInitExpr::Create(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Designator::getArrayIndex(), clang::Designator::getArrayRangeEnd(), clang::Designator::getArrayRangeStart(), clang::Designation::getDesignator(), clang::Designator::getDotLoc(), clang::Designator::getEllipsisLoc(), clang::Designator::getFieldDecl(), clang::Designator::getFieldLoc(), clang::Designator::getLBracketLoc(), clang::Designation::getNumDesignators(), clang::Designator::getRBracketLoc(), clang::Stmt::getSourceRange(), clang::Init, clang::Invalid, clang::Designator::isArrayDesignator(), clang::Designator::isArrayRangeDesignator(), clang::Designator::isFieldDesignator(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and toString().
| void Sema::ActOnDocumentableDecl | ( | Decl * | D | ) |
Should be called on all declarations that might have attached documentation comments.
Definition at line 15456 of file SemaDecl.cpp.
References ActOnDocumentableDecls().
Referenced by ActOnAliasDeclaration(), ActOnEnumConstant(), ActOnFinishConceptDefinition(), ActOnStartNamespaceDef(), ActOnStartOfFunctionDef(), ActOnTagStartDefinition(), ActOnTemplateDeclarator(), ActOnVariableDeclarator(), CheckClassTemplate(), and ParsedFreeStandingDeclSpec().
Definition at line 15460 of file SemaDecl.cpp.
References Context, Diags, getPreprocessor(), and clang::isa().
Referenced by ActOnDocumentableDecl(), and BuildDeclaratorGroup().
| StmtResult Sema::ActOnDoStmt | ( | SourceLocation | DoLoc, |
| Stmt * | Body, | ||
| SourceLocation | WhileLoc, | ||
| SourceLocation | CondLParen, | ||
| Expr * | Cond, | ||
| SourceLocation | CondRParen ) |
Definition at line 1820 of file SemaStmt.cpp.
References ActOnFinishFullExpr(), clang::C99, CheckBooleanCondition(), clang::Cond, Context, clang::CPlusPlus, clang::SemaBase::Diag(), Diags, clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), getLangOpts(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::StmtError().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildDoStmt().
| bool Sema::ActOnDuplicateDefinition | ( | Scope * | S, |
| 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 18850 of file SemaDecl.cpp.
References CleanupMergedEnum(), hasStructuralCompatLayout(), makeMergedDefinitionVisible(), clang::SkipBodyInfo::New, and clang::SkipBodyInfo::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 9610 of file Sema.h.
References makeMergedDefinitionVisible(), Previous, and clang::T.
| std::optional< FunctionEffectMode > Sema::ActOnEffectExpression | ( | Expr * | CondExpr, |
| StringRef | AttributeName ) |
Try to parse the conditional expression attached to an effect attribute (e.g.
'nonblocking'). (c.f. Sema::ActOnNoexceptSpec). Return an empty optional on error.
Definition at line 7646 of file SemaType.cpp.
References clang::AANT_ArgumentIntegerConstant, Context, clang::Dependent, clang::SemaBase::Diag(), clang::False, clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::True.
Referenced by handleNonBlockingNonAllocatingTypeAttr().
| ExprResult Sema::ActOnEmbedExpr | ( | SourceLocation | EmbedKeywordLoc, |
| StringLiteral * | BinaryData, | ||
| StringRef | FileName ) |
Definition at line 17238 of file SemaExpr.cpp.
References Context, clang::Data, and clang::FileName.
| Decl * Sema::ActOnEmptyDeclaration | ( | Scope * | S, |
| const ParsedAttributesView & | AttrList, | ||
| SourceLocation | SemiLoc ) |
Handle a C++11 empty-declaration and attribute-declaration.
Definition at line 17266 of file SemaDeclCXX.cpp.
References Context, clang::EmptyDecl::Create(), CurContext, and ProcessDeclAttributeList().
| StmtResult Sema::ActOnEndOfDeferStmt | ( | Stmt * | Body, |
| Scope * | CurScope ) |
Definition at line 3962 of file SemaStmt.cpp.
References Context, clang::DeferStmt::Create(), CurrentDefer, DiagnoseEmptyStmtBody(), and setFunctionHasBranchProtectedScope().
| 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 1231 of file Sema.cpp.
References clang::SemaHLSL::ActOnEndOfTranslationUnit(), clang::SemaOpenACC::ActOnEndOfTranslationUnit(), ActOnEndOfTranslationUnitFragment(), AnalysisWarnings, clang::cast(), CheckCompleteVariableDeclaration(), CheckDelayedMemberExceptionSpecs(), CheckDelegatingCtorCycles(), checkUndefinedButUsed(), clang::LangOptionsBase::CMK_ModuleInterface, Consumer, Context, clang::CPlusPlus, DelayedDllExportClasses, DelayedDllExportMemberFunctions, DelayedEquivalentExceptionSpecChecks, DelayedOverridingExceptionSpecChecks, DeleteExprs, clang::SemaBase::Diag(), DiagnosePrecisionLossInComplexDivision(), clang::SemaOpenMP::DiagnoseUnterminatedOpenMPDeclareTarget(), DiagnoseUnterminatedPragmaAlignPack(), DiagnoseUnterminatedPragmaAttribute(), clang::SemaObjC::DiagnoseUseOfUnimplementedSelectors(), Diags, emitAndClearUnusedLocalTypedefWarnings(), clang::ExpectedVariableOrFunction, clang::Module::ExplicitGlobalModuleFragment, ExternalDeclarations, ExternalSource, clang::VarDecl::getActingDefinition(), clang::VarDecl::getAnyInitializer(), getASTContext(), getCurrentModule(), clang::Sema::DelayedDiagnostics::getCurrentPool(), clang::VarDecl::getDescribedVarTemplate(), getLangOpts(), clang::Decl::getLocation(), getSourceManager(), clang::VarDecl::getStorageDuration(), clang::FunctionDecl::getTemplateSpecializationArgsAsWritten(), clang::ValueDecl::getType(), HLSL(), clang::Module::Imports, clang::isa(), clang::QualType::isConstQualified(), clang::FunctionDecl::isDeleted(), clang::Module::isInterfaceOrPartition(), clang::Decl::isInvalidDecl(), clang::Module::isNamedModuleInterfaceHasInit(), IsRecordFullyDefined(), clang::Decl::isReferenced(), clang::TagDecl::isUnion(), LangOpts, LateParsedInstantiations, LoadExternalWeakUndeclaredIdentifiers(), LookupOrdinaryName, LookupSingleName(), clang::Normal, ObjC(), OpenACC(), OpenMP(), ParsingInitForAutoVars, PendingExportedNames, PendingInstantiations, performFunctionEffectAnalysis(), PerformPendingInstantiations(), PP, clang::Private, clang::Module::PrivateModuleFragment, RequireCompleteType(), clang::ModuleMap::resolveConflicts(), clang::ModuleMap::resolveExports(), clang::ModuleMap::resolveUses(), clang::SC_Static, clang::SD_Static, clang::SD_Thread, clang::SourceRange::setEnd(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), ShouldRemoveFromUnused(), SM, SourceMgr, clang::Module::submodules(), clang::T, TentativeDefinitions, clang::TU_ClangModule, clang::TU_Prefix, TUKind, TUScope, UndefinedButUsed, UnusedFileScopedDecls, UnusedPrivateFields, and WeakUndeclaredIdentifiers.
| void Sema::ActOnEndOfTranslationUnitFragment | ( | TUFragmentKind | Kind | ) |
Definition at line 1171 of file Sema.cpp.
References DefineUsedVTables(), emitDeferredDiags(), ExternalSource, clang::Func, clang::Global, LateParsedInstantiations, PendingInstantiations, and PerformPendingInstantiations().
Referenced by ActOnEndOfTranslationUnit(), ActOnModuleDecl(), and ActOnPrivateModuleFragmentDecl().
| void Sema::ActOnEnumBody | ( | SourceLocation | EnumLoc, |
| SourceRange | BraceRange, | ||
| Decl * | EnumDecl, | ||
| ArrayRef< Decl * > | Elements, | ||
| Scope * | S, | ||
| const ParsedAttributesView & | Attr ) |
Definition at line 20775 of file SemaDecl.cpp.
References clang::C23, clang::cast(), CheckAlignasUnderalignment(), CheckForComparisonInEnumInitializer(), CheckForDuplicateEnumValues(), Context, clang::CPlusPlus, clang::ImplicitCastExpr::Create(), clang::SemaBase::Diag(), clang::Enum, clang::EnumConstantDecl::getInitVal(), getLangOpts(), clang::Decl::getLocation(), clang::Type::isSignedIntegerOrEnumerationType(), IsValueInFlagEnum(), LangOpts, clang::Packed, ProcessAPINotes(), ProcessDeclAttributeList(), clang::ValueDecl::setType(), and clang::VK_PRValue.
| Decl * Sema::ActOnEnumConstant | ( | Scope * | S, |
| Decl * | EnumDecl, | ||
| Decl * | LastEnumConstant, | ||
| SourceLocation | IdLoc, | ||
| IdentifierInfo * | Id, | ||
| const ParsedAttributesView & | Attrs, | ||
| SourceLocation | EqualLoc, | ||
| Expr * | Val, | ||
| SkipBodyInfo * | SkipBody = nullptr ) |
Definition at line 20465 of file SemaDecl.cpp.
References ActOnDocumentableDecl(), AddPragmaAttributes(), clang::cast(), CheckEnumConstant(), clang::SkipBodyInfo::CheckSameAsPrevious, CheckShadow(), clang::CPlusPlus, CurContext, clang::SemaBase::Diag(), DiagnoseClassNameShadow(), DiagnoseTemplateParameterShadow(), ForVisibleRedeclaration, clang::Decl::getAccess(), clang::LookupResult::getAsSingle(), clang::Decl::getDeclContext(), getLangOpts(), getNonFieldDeclScope(), clang::isa(), isDeclInScope(), clang::EnumDecl::isScoped(), clang::Decl::isTemplateParameter(), LookupName(), LookupOrdinaryName, New, notePreviousDefinition(), ProcessAPINotes(), ProcessDeclAttributeList(), and PushOnScopeChains().
| Decl * Sema::ActOnExceptionDeclarator | ( | Scope * | S, |
| Declarator & | D ) |
ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler.
Definition at line 17412 of file SemaDeclCXX.cpp.
References BuildExceptionDeclaration(), Context, CurContext, Diag(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForVisibleRedeclaration, clang::Declarator::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::CXXScopeSpec::getRange(), GetTypeForDeclarator(), clang::Invalid, isDeclInScope(), clang::Scope::isDeclScope(), clang::Declarator::isInvalidType(), clang::CXXScopeSpec::isSet(), LookupOrdinaryName, LookupSingleName(), ProcessDeclAttributes(), PushOnScopeChains(), clang::Decl::setInvalidDecl(), and UPPC_ExceptionType.
| void Sema::ActOnExitFunctionContext | ( | ) |
Definition at line 1517 of file SemaDecl.cpp.
References CurContext.
| ExplicitSpecifier Sema::ActOnExplicitBoolSpecifier | ( | Expr * | E | ) |
ActOnExplicitBoolSpecifier - Build an ExplicitSpecifier from an expression found in an explicit(bool) specifier.
Definition at line 14039 of file SemaDeclCXX.cpp.
References clang::Expr::isTypeDependent(), tryResolveExplicitSpecifier(), and clang::Unresolved.
| DeclResult Sema::ActOnExplicitInstantiation | ( | Scope * | S, |
| SourceLocation | ExternLoc, | ||
| SourceLocation | TemplateLoc, | ||
| Declarator & | D ) |
Definition at line 10597 of file SemaTemplate.cpp.
References clang::OverloadCandidateSet::addCandidate(), clang::TemplateSpecCandidateSet::addCandidate(), clang::UnresolvedSetImpl::addDecl(), adjustCCAndNoReturn(), clang::UnresolvedSetImpl::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::C, clang::cast(), CheckEquivalentExceptionSpec(), CheckExplicitInstantiation(), CheckFunctionConstraints(), CheckSpecializationInstantiationRedecl(), CheckVarTemplateId(), clang::DeclSpec::ClearStorageClassSpecs(), Consumer, Context, clang::CPlusPlus11, clang::FixItHint::CreateRemoval(), clang::OverloadCandidateSet::CSK_Normal, CUDA(), clang::CUDATargetMismatch, clang::DeclarationName::CXXDeductionGuideName, DeduceTemplateArguments(), clang::SemaBase::Diag(), clang::OverloadCandidateSet::empty(), clang::UnresolvedSetImpl::end(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::DeclSpec::getAttributes(), clang::Declarator::getBeginLoc(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::Scope::getDeclParent(), 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::DeclarationNameInfo::getName(), clang::Declarator::getName(), GetNameForDeclarator(), clang::DeclarationName::getNameKind(), clang::FunctionDecl::getPointOfInstantiation(), clang::VarDecl::getPointOfInstantiation(), clang::CXXScopeSpec::getRange(), clang::Declarator::getSourceRange(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::VarDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), GetTypeForDeclarator(), clang::DeclSpec::hasConstexprSpecifier(), clang::IK_TemplateId, InstantiateFunctionDefinition(), InstantiateVariableDefinition(), clang::Type::isFunctionType(), clang::DeclSpec::isInlineSpecified(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::SourceLocation::isInvalid(), clang::Declarator::isInvalidType(), clang::QualType::isNull(), clang::ConstraintSatisfaction::IsSatisfied, clang::CXXScopeSpec::isSet(), clang::VarDecl::isStaticDataMember(), clang::Type::isUndeducedType(), clang::ActionResult< PtrTy, Compress >::isUsable(), LangOpts, LookupOrdinaryName, LookupParsedName(), clang::MakeDeductionFailureInfo(), makeTemplateArgumentListInfo(), clang::Method, 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, clang::SemaBase::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::T, clang::UnqualifiedId::TemplateId, clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, and clang::TSK_Undeclared.
| 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 10170 of file SemaTemplate.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckTemplateArgumentInfo::CanonicalConverted, clang::cast(), CheckExplicitInstantiation(), CheckSpecializationInstantiationRedecl(), CheckTemplateArgumentList(), ClassTemplate, Consumer, Context, clang::ClassTemplateSpecializationDecl::Create(), clang::FixItHint::CreateReplacement(), CurContext, clang::SemaBase::Diag(), dllExportImportClassTemplateSpecialization(), clang::Enum, clang::OpaquePtr< PtrTy >::get(), getASTContext(), clang::TemplateName::getAsTemplateDecl(), clang::Decl::getAttr(), clang::getDLLAttr(), clang::Decl::getLocation(), getNonTagTypeDeclKind(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::KeywordHelpers::getTagTypeKindForTypeSpec(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::Decl::hasAttr(), InstantiateClassTemplateSpecialization(), InstantiateClassTemplateSpecializationMembers(), isAcceptableTagRedeclaration(), clang::SourceLocation::isInvalid(), clang::CXXScopeSpec::isSet(), MarkVTableUsed(), ProcessAPINotes(), ProcessDeclAttributeList(), SetNestedNameSpecifier(), clang::CXXRecordDecl::setTemplateSpecializationKind(), clang::Specialization, clang::Sema::CheckTemplateArgumentInfo::StrictPackMatch, translateTemplateArguments(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
| DeclResult Sema::ActOnExplicitInstantiation | ( | Scope * | S, |
| SourceLocation | ExternLoc, | ||
| SourceLocation | TemplateLoc, | ||
| unsigned | TagSpec, | ||
| SourceLocation | KWLoc, | ||
| CXXScopeSpec & | SS, | ||
| IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc, | ||
| const ParsedAttributesView & | Attr ) |
Definition at line 10483 of file SemaTemplate.cpp.
References ActOnTag(), clang::AS_none, clang::cast(), CheckExplicitInstantiation(), CheckSpecializationInstantiationRedecl(), Context, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::CXXRecordDecl::getDefinition(), clang::Decl::getLocation(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::CXXScopeSpec::getRange(), getTemplateInstantiationArgs(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), InstantiateClass(), InstantiateClassMembers(), clang::SourceLocation::isInvalid(), MarkVTableUsed(), clang::Outside, clang::Reference, ScopeSpecifierHasTemplateId(), clang::TSK_ExplicitInstantiationDeclaration, and clang::TSK_ExplicitInstantiationDefinition.
| 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 1890 of file SemaTypeTraits.cpp.
References BuildExpressionTrait(), clang::ExprError(), and clang::Result.
| StmtResult Sema::ActOnExprStmt | ( | ExprResult | Arg, |
| bool | DiscardedValue = true ) |
Definition at line 48 of file SemaStmt.cpp.
References ActOnFinishFullExpr(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Expr::getExprLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::StmtError().
Referenced by buildSingleCopyAssignRecursively().
| StmtResult Sema::ActOnExprStmtError | ( | ) |
Definition at line 65 of file SemaStmt.cpp.
References DiscardCleanupsInEvaluationContext(), and clang::StmtError().
| 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 19076 of file SemaDecl.cpp.
References clang::AS_public, HandleField(), and clang::ICIS_NoInit.
| 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 19716 of file SemaDecl.cpp.
References AbstractIvarType, clang::Decl::addAttr(), AddImplicitlyDeclaredMembersToClass(), clang::C2y, clang::C99, clang::CanNeverPassInRegs, clang::cast(), CheckAlignasUnderalignment(), clang::SemaObjC::CheckImplementationIvars(), checkMSInheritanceAttrOnDefinition(), ComputeSelectedDestructor(), ComputeSpecialMemberFunctionsEligiblity(), Context, clang::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::Destructor, clang::SemaBase::Diag(), clang::SemaObjC::DiagnoseDuplicateIvars(), Diags, clang::Type::getAsRecordDecl(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::ObjCContainerDecl::getIvarDecl(), clang::Decl::getKind(), getLangOpts(), clang::Decl::getLocation(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getObjCLifetime(), clang::Scope::getParent(), clang::QualType::getPointerAuth(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), getSourceManager(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::Decl::hasAttr(), clang::QualType::hasNonTrivialObjCLifetime(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), inTemplateInstantiation(), clang::isa(), clang::PointerAuthQualifier::isAddressDiscriminated(), clang::FieldDecl::isAnonymousStructOrUnion(), clang::FieldDecl::isBitField(), 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::Scope::isTemplateParamScope(), clang::Scope::isTypeAliasScope(), clang::QualType::isVolatileQualified(), clang::ObjCInterfaceDecl::known_extensions(), LangOpts, clang::LangOptionsBase::NonGC, ObjC(), clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::QualType::PCK_Trivial, clang::QualType::PCK_VolatileTrivial, ProcessAPINotes(), ProcessDeclAttributeList(), clang::randstruct::randomizeStructureLayout(), RequireCompleteSizedType(), RequireCompleteType(), RequireNonAbstractType(), SetDeclDeleted(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), and clang::T.
Referenced by ActOnCapturedRegionError(), ActOnFinishCXXMemberSpecification(), ActOnLambdaError(), and BuildLambdaExpr().
| Decl * Sema::ActOnFileScopeAsmDecl | ( | Expr * | expr, |
| SourceLocation | AsmLoc, | ||
| SourceLocation | RParenLoc ) |
Definition at line 20937 of file SemaDecl.cpp.
References Context, clang::FileScopeAsmDecl::Create(), CurContext, clang::ast_matchers::expr, and New.
| ConceptDecl * Sema::ActOnFinishConceptDefinition | ( | Scope * | S, |
| ConceptDecl * | C, | ||
| Expr * | ConstraintExpr, | ||
| const ParsedAttributesView & | Attrs ) |
Definition at line 9204 of file SemaTemplate.cpp.
References ActOnDocumentableDecl(), clang::C, CheckConceptRedefinition(), CurContext, DiagnoseUnexpandedParameterPack(), FilterLookupForScope(), forRedeclarationInCurContext(), LookupName(), LookupOrdinaryName, Previous, ProcessDeclAttributeList(), PushOnScopeChains(), and RemoveLookupResult().
| void Sema::ActOnFinishCXXInClassMemberInitializer | ( | Decl * | VarDecl, |
| SourceLocation | EqualLoc, | ||
| ExprResult | Init ) |
This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template.
Such actions are deferred until the class is complete.
Definition at line 4187 of file SemaDeclCXX.cpp.
References ActOnFinishFullExpr(), ConvertMemberDefaultInitExpression(), CreateRecoveryExpr(), DiagnoseUnexpandedParameterPack(), clang::ActionResult< PtrTy, Compress >::get(), clang::FieldDecl::getInClassInitStyle(), clang::ValueDecl::getType(), clang::ICIS_NoInit, clang::isa(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), PopFunctionScopeInfo(), clang::FieldDecl::setInClassInitializer(), clang::Decl::setInvalidDecl(), and UPPC_Initializer.
Referenced by InstantiateInClassInitializer().
| void Sema::ActOnFinishCXXMemberDecls | ( | ) |
Perform any semantic analysis which needs to be delayed until all pending class member declarations have been parsed.
Definition at line 14592 of file SemaDeclCXX.cpp.
References checkForMultipleExportedDefaultConstructors(), CurContext, DelayedEquivalentExceptionSpecChecks, and DelayedOverridingExceptionSpecChecks.
| void Sema::ActOnFinishCXXMemberSpecification | ( | Scope * | S, |
| SourceLocation | RLoc, | ||
| Decl * | TagDecl, | ||
| SourceLocation | LBrac, | ||
| SourceLocation | RBrac, | ||
| const ParsedAttributesView & | AttrList ) |
Definition at line 10701 of file SemaDeclCXX.cpp.
References ActOnFields(), AdjustDeclIfTemplate(), clang::cast(), CheckCompletedCXXClass(), Diag(), and FieldCollector.
| void Sema::ActOnFinishCXXNonNestedClass | ( | ) |
Definition at line 14604 of file SemaDeclCXX.cpp.
References ActOnFinishInlineFunctionDef(), DefineDefaultedFunction(), DelayedDllExportMemberFunctions, referenceDLLExportedClassMethods(), and clang::TSK_ExplicitInstantiationDefinition.
| 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 16993 of file SemaDecl.cpp.
References checkThisInStaticMemberFunctionAttributes(), clang::Method, ProcessAPINotes(), and ProcessDeclAttributeList().
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 10968 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), clang::cast(), CheckConstructor(), CheckCXXDefaultArguments(), clang::Constructor, and clang::Method.
Definition at line 10935 of file SemaDeclCXX.cpp.
References PopDeclContext().
| void Sema::ActOnFinishDelayedMemberInitializers | ( | Decl * | Record | ) |
Definition at line 14284 of file SemaDeclCXX.cpp.
References CheckDelayedMemberExceptionSpecs().
| Decl * Sema::ActOnFinishExportDecl | ( | Scope * | S, |
| Decl * | ExportDecl, | ||
| SourceLocation | RBraceLoc ) |
Complete the definition of an export declaration.
Definition at line 1000 of file SemaModule.cpp.
References clang::cast(), checkExportedDecl(), getASTContext(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), and PopDeclContext().
|
inline |
Definition at line 8681 of file Sema.h.
References ActOnFinishFullExpr(), and clang::Expr::getExprLoc().
Referenced by ActOnCapScopeReturnStmt(), ActOnCaseExpr(), ActOnCondition(), ActOnConditionVariable(), ActOnCoroutineBodyStart(), ActOnDoStmt(), ActOnExprStmt(), ActOnFinishCXXInClassMemberInitializer(), ActOnFinishFullExpr(), ActOnForEachLValueExpr(), ActOnIndirectGotoStmt(), actOnOMPReductionKindClause(), AddInitializerToDecl(), BuildBaseInitializer(), BuildBlockForLambdaConversion(), BuildConvertedConstantExpression(), BuildCoreturnStmt(), BuildCXXAssumeExpr(), BuildCXXDefaultInitExpr(), BuildCXXForRangeStmt(), BuildDelegatingInitializer(), BuildMemberInitializer(), BuildReturnStmt(), BuildStaticAssertDeclaration(), CheckCXXBooleanCondition(), checkOpenMPLoop(), CheckTemplateArgument(), checkTupleLikeDecomposition(), FinishOpenMPLinearClause(), instantiateOMPDeclareSimdDeclAttr(), instantiateOMPDeclareVariantAttr(), MakeFullDiscardedValueExpr(), MakeFullExpr(), parseStepSize(), and SubstDefaultArgument().
| ExprResult Sema::ActOnFinishFullExpr | ( | Expr * | Expr, |
| SourceLocation | CC, | ||
| bool | DiscardedValue, | ||
| bool | IsConstexpr = false, | ||
| bool | IsTemplateArgument = false ) |
Definition at line 7656 of file SemaExprCXX.cpp.
References CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckPlaceholderExpr(), Context, CurContext, DiagnoseUnexpandedParameterPack(), DiagnoseUnusedExprResult(), clang::ExprError(), forceUnknownAnyToType(), getCurLambda(), getLangOpts(), clang::DeclContext::getParent(), clang::Expr::getType(), clang::sema::LambdaScopeInfo::hasPotentialCaptures(), IgnoredValueConversions(), clang::isLambdaCallOperator(), and MaybeCreateExprWithCleanups().
| StmtResult Sema::ActOnFinishFullStmt | ( | Stmt * | Stmt | ) |
Definition at line 7749 of file SemaExprCXX.cpp.
References MaybeCreateStmtWithCleanups(), and clang::StmtError().
| Decl * Sema::ActOnFinishFunctionBody | ( | Decl * | Decl, |
| Stmt * | Body, | ||
| bool | IsInstantiation = false, | ||
| bool | RetainFunctionScopeInfo = false ) |
Performs semantic analysis at the end of a function body.
| RetainFunctionScopeInfo | If true, the client is responsible for releasing the associated FunctionScopeInfo. This is useful when building e.g. LambdaExprs. |
Definition at line 16502 of file SemaDecl.cpp.
References clang::Decl::addAttr(), AnalysisWarnings, clang::SemaSYCL::BuildSYCLKernelCallStmt(), clang::C99, clang::cast(), clang::Type::castAs(), CheckCompletedCoroutineBody(), CheckConstexprFunctionDefinition(), CheckCoroutineWrapper(), CheckDestructor(), CheckImmediateEscalatingFunctionDefinition(), checkTypeSupport(), clang::Stmt::children(), clang::NSAPI::ClassId_NSObject, Cleanup, computeNRVO(), clang::Constructor, Context, clang::CPlusPlus, clang::CPlusPlus14, clang::FixItHint::CreateInsertion(), DeclsToCheckForDeferredDiags, deduceClosureReturnType(), DeduceFunctionTypeFromReturnExpr(), Definition, clang::Destructor, clang::SemaBase::Diag(), Diagnose, diagnoseImplicitlyRetainedSelf(), DiagnoseInvalidJumps(), DiagnoseReturnInConstructorExceptionHandler(), DiagnoseSizeOfParametersAndReturnValue(), DiagnoseUnguardedAvailabilityViolations(), DiagnoseUnusedParameters(), clang::sema::AnalysisBasedWarnings::Policy::disableCheckFallThrough(), DiscardCleanupsInEvaluationContext(), Emitted, ExprCleanupObjects, ExprEvalContexts, FindPossiblePrototype(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::TypeLoc::getAs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::DeclaratorDecl::getBeginLoc(), clang::CXXMethodDecl::getCanonicalDecl(), getCurFunction(), getCurFunctionDecl(), getCurLambda(), getCurMethodDecl(), getDiagnostics(), getEmissionStatus(), clang::Decl::getEndLoc(), clang::Stmt::getEndLoc(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::FunctionDecl::getReturnType(), getSourceManager(), clang::FunctionDecl::getStorageClass(), 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::isa(), clang::Type::isAnyPointerType(), clang::FunctionDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::sema::FunctionScopeInfo::isCoroutine(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isDeleted(), clang::FunctionDecl::isDeletedAsWritten(), clang::DeclContext::isDependentContext(), clang::Decl::isImplicit(), clang::FunctionDecl::isInlined(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::isLambdaCallOperator(), clang::FunctionDecl::isMain(), clang::FunctionDecl::isMultiVersion(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isPureVirtual(), clang::Type::isRecordType(), clang::Decl::isTemplated(), clang::Decl::isUnavailable(), clang::Type::isUndeducedType(), clang::CXXMethodDecl::isVirtual(), clang::isWhitespace(), LangOpts, MarkBaseAndMemberDestructorsReferenced(), MarkVTableUsed(), MaybeODRUseExprs, clang::sema::FunctionScopeInfo::NeedsScopeChecking(), clang::SemaObjC::NSAPIObj, ObjC(), clang::sema::FunctionScopeInfo::ObjCShouldCallSuper, clang::sema::FunctionScopeInfo::ObjCWarnForNoDesignatedInitChain, clang::sema::FunctionScopeInfo::ObjCWarnForNoInitDelegation, clang::FunctionDecl::parameters(), PopDeclContext(), PopFunctionScopeInfo(), PP, clang::SC_None, clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::FunctionDecl::setWillHaveBody(), ShouldWarnAboutMissingPrototype(), SM, SYCL(), Unknown, and clang::sema::FunctionScopeInfo::UsesFPIntrin.
Referenced by ActOnLambdaExpr(), and InstantiateFunctionDefinition().
| void Sema::ActOnFinishFunctionDeclarationDeclarator | ( | Declarator & | D | ) |
Called after parsing a function declarator belonging to a function declaration.
Definition at line 19625 of file SemaDeclCXX.cpp.
References Context, clang::TemplateParameterList::Create(), clang::Declarator::getBeginLoc(), clang::Declarator::getEndLoc(), clang::TemplateParameterList::getLAngleLoc(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateParameterList::getRequiresClause(), clang::TemplateParameterList::getTemplateLoc(), clang::Declarator::getTemplateParameterLists(), InventedParameterInfos, and clang::Declarator::setInventedTemplateParameterList().
| void Sema::ActOnFinishInlineFunctionDef | ( | FunctionDecl * | D | ) |
Definition at line 15932 of file SemaDecl.cpp.
References Consumer.
Referenced by ActOnFinishCXXNonNestedClass().
| void Sema::ActOnFinishKNRParamDeclarations | ( | Scope * | S, |
| Declarator & | D, | ||
| SourceLocation | LocAfterDecls ) |
Definition at line 15854 of file SemaDecl.cpp.
References ActOnParamDeclarator(), clang::C99, Context, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::Declarator::getFunctionTypeInfo(), getLangOpts(), clang::IdentifierInfo::getName(), clang::DeclaratorChunk::FunctionTypeInfo::hasPrototype, clang::DeclaratorChunk::ParamInfo::Ident, clang::DeclaratorChunk::ParamInfo::IdentLoc, clang::KNRTypeList, clang::ParsedAttributesView::none(), clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::Declarator::SetIdentifier(), clang::DeclSpec::SetRangeEnd(), clang::DeclSpec::SetRangeStart(), clang::DeclSpec::SetTypeSpecType(), and clang::DeclSpec::TST_int.
| 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 17246 of file SemaDeclCXX.cpp.
References clang::cast(), getCurrentModule(), getLangOpts(), clang::SourceLocation::isValid(), PopDeclContext(), and clang::LinkageSpecDecl::setRBraceLoc().
| 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 12028 of file SemaDeclCXX.cpp.
References clang::Decl::hasAttr(), PopDeclContext(), PopPragmaVisibility(), clang::Decl::setModuleOwnershipKind(), clang::NamespaceDecl::setRBraceLoc(), and clang::Decl::VisibleWhenImported.
| void Sema::ActOnFinishOfCompoundStmt | ( | ) |
Definition at line 428 of file SemaStmt.cpp.
References PopCompoundScope().
| void Sema::ActOnFinishRequiresExpr | ( | ) |
Definition at line 8045 of file SemaExprCXX.cpp.
References CurContext.
| StmtResult Sema::ActOnFinishSEHFinallyBlock | ( | SourceLocation | Loc, |
| Stmt * | Block ) |
Definition at line 4575 of file SemaStmt.cpp.
References clang::Block, Context, clang::SEHFinallyStmt::Create(), and CurrentSEHFinally.
| StmtResult Sema::ActOnFinishSwitchStmt | ( | SourceLocation | SwitchLoc, |
| Stmt * | Switch, | ||
| Stmt * | Body ) |
Definition at line 1296 of file SemaStmt.cpp.
References AdjustAPSInt(), clang::AR_Available, clang::AR_Deprecated, clang::AR_NotYetIntroduced, clang::AR_Unavailable, clang::cast(), clang::Type::castAsEnumDecl(), checkCaseValue(), checkEnumTypesInSwitchStmt(), CmpCaseVals(), CmpEnumVals(), Context, clang::SemaBase::Diag(), DiagnoseEmptyStmtBody(), EqEnumVals(), clang::Expr::EvaluateAsInt(), clang::Expr::EvaluateKnownConstInt(), clang::Stmt::getBeginLoc(), clang::SwitchStmt::getCond(), getCurFunction(), clang::DefaultStmt::getDefaultLoc(), clang::Stmt::getEndLoc(), clang::Expr::getExprLoc(), clang::CaseStmt::getLHS(), clang::CaseStmt::getRHS(), clang::Stmt::getSourceRange(), clang::SwitchStmt::getSwitchCaseList(), clang::Expr::getType(), GetTypeBeforeIntegralPromotion(), clang::Expr::IgnoreParenCasts(), clang::isa(), clang::Type::isEnumeralType(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Result, clang::Expr::SE_AllowSideEffects, clang::SwitchStmt::setAllEnumCasesCovered(), clang::SwitchStmt::setBody(), ShouldDiagnoseSwitchCaseNotInEnum(), clang::StmtError(), Switch, clang::sema::FunctionScopeInfo::SwitchStack, and toString().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildSwitchStmtBody().
| void Sema::ActOnFinishTopLevelStmtDecl | ( | TopLevelStmtDecl * | D, |
| Stmt * | Statement ) |
Definition at line 20955 of file SemaDecl.cpp.
References PopCompoundScope(), PopDeclContext(), PopFunctionScopeInfo(), and clang::TopLevelStmtDecl::setStmt().
| ExprResult Sema::ActOnFinishTrailingRequiresClause | ( | ExprResult | ConstraintExpr | ) |
Definition at line 4157 of file SemaDeclCXX.cpp.
References ActOnRequiresClause().
| void Sema::ActOnForEachDeclStmt | ( | DeclGroupPtrTy | Decl | ) |
Definition at line 85 of file SemaStmt.cpp.
References clang::ast_matchers::decl, clang::SemaBase::Diag(), clang::OpaquePtr< PtrTy >::get(), getLangOpts(), clang::DeclGroupRef::getSingleDecl(), clang::DeclGroupRef::isNull(), clang::DeclGroupRef::isSingleDecl(), clang::Qualifiers::OCL_Strong, and clang::ast_matchers::type.
| 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 2318 of file SemaStmt.cpp.
References ActOnFinishFullExpr(), CheckPlaceholderExpr(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::StmtError().
| StmtResult Sema::ActOnForStmt | ( | SourceLocation | ForLoc, |
| SourceLocation | LParenLoc, | ||
| Stmt * | First, | ||
| ConditionResult | Second, | ||
| FullExprArg | Third, | ||
| SourceLocation | RParenLoc, | ||
| Stmt * | Body ) |
Definition at line 2253 of file SemaStmt.cpp.
References clang::C23, Context, clang::CPlusPlus, clang::SemaBase::Diag(), Diags, clang::First, clang::Sema::ConditionResult::get(), clang::Sema::FullExprArg::get(), clang::ActionResult< PtrTy, Compress >::getAs(), getCurCompoundScope(), getLangOpts(), clang::Decl::getLocation(), clang::VarDecl::hasLocalStorage(), clang::isa(), clang::Sema::ConditionResult::isInvalid(), clang::VarDecl::isLocalVarDecl(), clang::Sema::FullExprArg::release(), clang::sema::CompoundScopeInfo::setHasEmptyLoopBodies(), and clang::StmtError().
Referenced by buildSingleCopyAssignRecursively(), and clang::TreeTransform< AdjustConstraints >::RebuildForStmt().
| NamedDecl * Sema::ActOnFriendFunctionDecl | ( | Scope * | S, |
| Declarator & | D, | ||
| MultiTemplateParamsArg | TemplateParams ) |
Definition at line 18187 of file SemaDeclCXX.cpp.
References ActOnFunctionDeclarator(), adjustContextForLocalExternDecl(), clang::AS_public, clang::cast(), 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::Scope::getFnParent(), clang::DeclSpec::getFriendSpecLoc(), clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::Declarator::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::isa(), clang::NestedNameSpecifier::isDependent(), 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().
| Decl * Sema::ActOnFriendTypeDecl | ( | Scope * | S, |
| const DeclSpec & | DS, | ||
| MultiTemplateParamsArg | TemplateParams, | ||
| SourceLocation | EllipsisLoc ) |
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 18070 of file SemaDeclCXX.cpp.
References clang::AS_public, clang::Type::containsUnexpandedParameterPack(), Context, clang::CPlusPlus11, clang::FriendDecl::Create(), clang::FriendTemplateDecl::Create(), clang::FixItHint::CreateInsertion(), CurContext, Diag(), clang::SemaBase::DiagCompat(), DiagnoseUnexpandedParameterPack(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getBeginLoc(), clang::TypeLoc::getBeginLoc(), clang::DeclSpec::getConstSpecLoc(), clang::DeclSpec::getFriendSpecLoc(), clang::TagDecl::getKindName(), getLangOpts(), getLocForEndOfToken(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::TypeLoc::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::TagDecl::getTagKind(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getUnalignedSpecLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::Invalid, clang::DeclSpec::isFriendSpecified(), clang::DeclSpec::isFriendSpecifiedFirst(), clang::SourceLocation::isInvalid(), clang::Declarator::isInvalidType(), clang::SourceLocation::isValid(), clang::Member, clang::ParsedAttributesView::none(), clang::DeclSpec::SCS_unspecified, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::T, 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().
| NamedDecl * Sema::ActOnFunctionDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| DeclContext * | DC, | ||
| TypeSourceInfo * | TInfo, | ||
| LookupResult & | Previous, | ||
| MultiTemplateParamsArg | TemplateParamLists, | ||
| bool & | AddToScope ) |
Definition at line 10057 of file SemaDecl.cpp.
References clang::SemaOpenACC::ActOnFunctionDeclarator(), clang::SemaHLSL::ActOnTopLevelFunction(), clang::Decl::addAttr(), clang::SemaObjC::AddCFAuditedAttribute(), clang::DeclContext::addDecl(), AddImplicitMSFunctionNoBuiltinAttr(), AddKnownFunctionAttributes(), AddPushedVisibilityAttribute(), AddRangeBasedOptnone(), AddSectionMSAllocText(), adjustContextForLocalExternDecl(), adjustMemberFunctionCC(), clang::TemplateArgumentListInfo::arguments(), clang::AS_public, BuildParmVarDeclForTypedef(), clang::cast(), clang::Type::castAs(), clang::CC_X86StdCall, checkAttributesAfterMerging(), CheckDependentFunctionTemplateSpecialization(), checkDLLAttributeRedeclaration(), clang::SemaHLSL::CheckEntryPoint(), CheckFunctionDeclaration(), CheckFunctionTemplateSpecialization(), checkIsValidOpenCLKernelParameter(), CheckMain(), CheckMemberSpecialization(), CheckMSVCRTEntryPoint(), checkNonTrivialCUnion(), CheckTemplateDeclScope(), CheckTemplateParameterList(), clang::CLanguageLinkage, CodeSegStack, CompleteMemberSpecialization(), clang::Consteval, clang::Constexpr, clang::AssociatedConstraint::ConstraintExpr, clang::DeclContext::containsDecl(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus14, clang::CPlusPlus20, clang::FunctionTemplateDecl::Create(), clang::FixItHint::CreateInsertion(), CreateNewFunctionDecl(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), CUDA(), CurContext, clang::DeclarationName::CXXDestructorName, clang::Declaration, clang::Default, clang::Defaulted, clang::Definition, clang::Deleted, clang::SemaBase::Diag(), DiagnoseInvalidRedeclaration(), DiagnoseUnexpandedParameterPack(), clang::Decl::dropAttr(), clang::Error, clang::EST_BasicNoexcept, ExternalDeclarations, ExtnameUndeclaredIdentifiers, FilterLookupForScope(), clang::FoundOverloaded, FriendConstraintsDependOnEnclosingTemplate(), clang::FTIHasNonVoidParameters(), clang::DeclaratorChunk::Fun, clang::FunctionReturn, 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::QualType::getCanonicalType(), clang::FunctionType::ExtInfo::getCC(), clang::FunctionType::getCmseNSCallAttr(), clang::SemaCUDA::getConfigureFuncName(), clang::DeclSpec::getConstexprSpecifier(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclaratorChunk::FunctionTypeInfo::getDeclsInPrototype(), clang::Declarator::getDeclSpec(), clang::Scope::getDepth(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::SourceRange::getEnd(), clang::DeclSpec::getExplicitSpecLoc(), clang::DeclSpec::getExplicitSpecRange(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::Declarator::getFunctionDefinitionKind(), getFunctionStorageClass(), 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::DeclarationNameInfo::getName(), clang::Declarator::getName(), clang::NamedDecl::getName(), clang::FunctionType::getNameForCallConv(), GetNameForDeclarator(), clang::DeclarationName::getNameKind(), clang::DeclSpec::getNoreturnSpecLoc(), clang::FunctionDecl::getNumParams(), clang::Decl::getOwningModule(), clang::FunctionProtoType::getParamTypes(), clang::FunctionDecl::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::CXXScopeSpec::getScopeRep(), clang::Declarator::getSourceRange(), clang::TemplateParameterList::getSourceRange(), clang::UnqualifiedId::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpecLoc(), clang::StringLiteral::getString(), clang::StringLiteral::getStrTokenLoc(), getTagInjectionContext(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::TemplateDecl::getTemplateParameters(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::Declarator::getTypeObject(), clang::Type::getUnqualifiedDesugaredType(), clang::DeclSpec::getVirtualSpecLoc(), clang::Decl::hasAttr(), clang::FunctionProtoType::hasExceptionSpec(), clang::DeclSpec::hasExplicitSpecifier(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), HLSL(), clang::Decl::IDNS_Ordinary, clang::IK_TemplateId, clang::Invalid, clang::isa(), clang::DeclarationName::isAnyOperatorDelete(), clang::DeclarationName::isAnyOperatorNewOrDelete(), 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::DeclContext::isFileContext(), clang::FunctionDecl::isFirstDecl(), clang::Declarator::isFirstDeclarationOfMember(), clang::DeclSpec::isFriendSpecified(), clang::Decl::isFromGlobalModule(), clang::Declarator::isFunctionDeclarator(), clang::Declarator::isFunctionDefinition(), clang::Type::isFunctionNoProtoType(), clang::Type::isFunctionType(), clang::Module::isHeaderLikeModule(), clang::DeclarationName::isIdentifier(), isIncompleteDeclExternC(), clang::Decl::isInIdentifierNamespace(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInNamedModule(), clang::Decl::isInStdNamespace(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::FunctionDecl::isMain(), clang::DeclSpec::isModulePrivateSpecified(), clang::FunctionDecl::isMSVCRTEntryPoint(), clang::FunctionDecl::isMultiVersion(), clang::DeclSpec::isNoreturnSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isPointerOrReferenceType(), clang::Type::isPointerType(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Type::isScalarType(), clang::CXXScopeSpec::isSet(), clang::Declarator::isStaticMember(), isStdBuiltin(), clang::Decl::isTemplated(), clang::DeclContext::isTranslationUnit(), clang::Type::isUndeducedType(), clang::SourceRange::isValid(), clang::Type::isVariablyModifiedType(), clang::DeclSpec::isVirtualSpecified(), clang::Type::isVoidType(), clang::Type::isWebAssemblyTableType(), clang::TemplateIdAnnotation::LAngleLoc, LookupNecessaryTypesForBuiltin(), MarkUnusedFileScopedDecl(), MatchTemplateParametersToScopeSpecifier(), clang::SemaCUDA::maybeAddHostDeviceAttrs(), ModifyFnAttributesMSPragmaOptimize(), clang::LangOptionsBase::MSVC2015, NTCUK_Copy, NTCUK_Destruct, clang::TemplateIdAnnotation::NumArgs, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, ObjC(), OpenACC(), OpenCL(), OriginalLexicalContext, clang::DeclaratorChunk::ParamInfo::Param, clang::FunctionDecl::parameters(), clang::DeclaratorChunk::FunctionTypeInfo::Params, PragmaClangTextSection, Previous, ProcessDeclAttributes(), ProcessPragmaExport(), 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::Decl::setAccess(), clang::FunctionDecl::setConstexprKind(), 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::DeclaratorDecl::setTemplateParameterListsInfo(), clang::Decl::setTopLevelDeclInObjCContainer(), clang::ValueDecl::setType(), clang::FunctionDecl::setVirtualAsWritten(), shouldConsiderLinkage(), clang::TemplateParameterList::size(), StrictGuardStackCheckStack, clang::supportsVariadicCall(), clang::UnqualifiedId::TemplateId, TPC_ClassTemplateMember, TPC_FriendFunctionTemplate, TPC_FriendFunctionTemplateDefinition, TPC_FunctionTemplate, translateTemplateArguments(), UnifySection(), clang::Unspecified, UPPC_ExplicitSpecialization, UPPC_FriendDeclaration, warnOnReservedIdentifier(), and clang::FunctionProtoType::ExtProtoInfo::withExceptionSpec().
Referenced by ActOnFriendFunctionDecl(), DiagnoseInvalidRedeclaration(), and HandleDeclarator().
| 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 269 of file SemaStmtAsm.cpp.
References clang::TargetInfo::ConstraintInfo::allowsMemory(), clang::TargetInfo::ConstraintInfo::allowsRegister(), CheckAsmLValue(), checkExprMemoryConstraintCompat(), CheckNakedParmReference(), CheckPlaceholderExpr(), CleanupVarDeclMarking(), Context, clang::FixItHint::CreateReplacement(), DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), DiscardCleanupsInEvaluationContext(), emitAndFixInvalidAsmCastLValue(), clang::Expr::EvaluateAsRValue(), clang::GCCAsmStmt::ExtractStringFromGCCAsmStmtComponent(), clang::Found, clang::ActionResult< PtrTy, Compress >::get(), clang::CharSourceRange::getBegin(), clang::Stmt::getBeginLoc(), getClobberConflictLocation(), clang::TargetInfo::ConstraintInfo::getConstraintStr(), getCurLexicalContext(), clang::Expr::getDependence(), clang::Expr::getExprLoc(), getLocationOfStringLiteralByte(), clang::GCCAsmStmt::AsmStringPiece::getModifier(), clang::IdentifierInfo::getName(), clang::GCCAsmStmt::AsmStringPiece::getOperandNo(), clang::GCCAsmStmt::AsmStringPiece::getRange(), clang::Stmt::getSourceRange(), clang::GCCAsmStmt::AsmStringPiece::getString(), clang::TargetInfo::ConstraintInfo::getTiedOperand(), clang::Expr::getType(), clang::TargetInfo::ConstraintInfo::hasTiedOperand(), clang::Expr::IgnoreParenNoopCasts(), ImpCastExprToType(), clang::isa(), 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::GCCAsmStmt::AsmStringPiece::isOperand(), isOperandMentioned(), clang::Type::isPointerType(), clang::Type::isRealFloatingType(), clang::Type::isStructureType(), clang::Expr::isTypeDependent(), clang::SourceLocation::isValid(), clang::TargetInfo::ConstraintInfo::isValidAsmImmediate(), 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(), and clang::Expr::EvalResult::Val.
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildGCCAsmStmt().
| ExprResult Sema::ActOnGCCAsmStmtString | ( | Expr * | Stm, |
| bool | ForAsmLabel ) |
Definition at line 238 of file SemaStmtAsm.cpp.
References clang::APValue, Asm, clang::ConstantExpr::Create(), clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), EvaluateAsString(), clang::ExprError(), getASTContext(), clang::Stmt::getBeginLoc(), clang::Expr::getDependence(), clang::ConstantExpr::SetResult(), and V.
| 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 1730 of file SemaExpr.cpp.
References CreateGenericSelectionExpr(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), and GetTypeFromParser().
| 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.
| ModuleLoc | The location of the 'module' keyword. |
Definition at line 153 of file SemaModule.cpp.
References Context, and clang::Decl::ReachableWhenImported.
| ExprResult Sema::ActOnGNUNullExpr | ( | SourceLocation | TokenLoc | ) |
Definition at line 17112 of file SemaExpr.cpp.
References Context, and clang::Default.
| StmtResult Sema::ActOnGotoStmt | ( | SourceLocation | GotoLoc, |
| SourceLocation | LabelLoc, | ||
| LabelDecl * | TheDecl ) |
Definition at line 3222 of file SemaStmt.cpp.
References Context, getCurScope(), clang::Decl::markUsed(), setFunctionHasBranchIntoScope(), and setFunctionHasBranchProtectedScope().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildGotoStmt().
| 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 2723 of file SemaExpr.cpp.
References ActOnDependentIdExpression(), clang::LookupResult::addDecl(), BuildDeclarationNameExpr(), BuildDeclRefExpr(), BuildPossibleImplicitMemberExpr(), BuildTemplateIdExpr(), clang::LookupResult::clear(), Context, clang::CPlusPlus, DecomposeUnqualifiedId(), DiagnoseEmptyLookup(), clang::LookupResult::empty(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::DeclarationName::getAsIdentifierInfo(), clang::LookupResult::getAsSingle(), getCurMethodDecl(), clang::LookupResult::getFoundDecl(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getScopeRep(), clang::IK_ImplicitSelfParam, clang::IK_TemplateId, ImplicitlyDefineFunction(), clang::CorrectionCandidateCallback::IsAddressOfOperand, clang::LookupResult::isAmbiguous(), isAttrContext(), clang::Scope::isClassScope(), clang::IdentifierInfo::isEditorPlaceholder(), clang::CXXScopeSpec::isEmpty(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CXXScopeSpec::isInvalid(), isPotentialImplicitMemberAccess(), clang::CXXScopeSpec::isSet(), clang::CXXScopeSpec::isValid(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::Kind, LookupMemberName, LookupName(), LookupObjCImplicitSelfParam, LookupOrdinaryName, LookupParsedName(), LookupTemplateName(), ObjC(), recoverFromMSUnqualifiedLookup(), clang::CorrectionCandidateCallback::setTypoName(), clang::CorrectionCandidateCallback::setTypoNNS(), clang::UnqualifiedId::TemplateId, clang::TNK_Concept_template, clang::TNK_Var_template, clang::ast_matchers::type, UseArgumentDependentLookup(), clang::VK_LValue, and clang::LookupResult::wasNotFoundInCurrentInstantiation().
Referenced by DefaultVariadicArgumentPromotion(), and LookupInlineAsmIdentifier().
| StmtResult Sema::ActOnIfStmt | ( | SourceLocation | IfLoc, |
| IfStatementKind | StatementKind, | ||
| SourceLocation | LParenLoc, | ||
| Stmt * | InitStmt, | ||
| ConditionResult | Cond, | ||
| SourceLocation | RParenLoc, | ||
| Stmt * | ThenVal, | ||
| SourceLocation | ElseLoc, | ||
| Stmt * | ElseVal ) |
Definition at line 950 of file SemaStmt.cpp.
References BuildIfStmt(), clang::C99, clang::Decl::castFromDeclContext(), clang::Cond, clang::ConstevalNegated, clang::ConstevalNonNegated, clang::Constexpr, Context, clang::CPlusPlus, CurContext, clang::Stmt::determineLikelihoodConflict(), clang::SemaBase::Diag(), DiagnoseEmptyStmtBody(), Diags, ExprEvalContexts, clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), getLangOpts(), clang::Stmt::getLikelihoodAttr(), clang::Attr::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::AttributeCommonInfo::getRange(), ImmediateFunctionContext, clang::isa(), isUnevaluatedContext(), and clang::StmtError().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildIfStmt().
| StmtResult Sema::ActOnIndirectGotoStmt | ( | SourceLocation | GotoLoc, |
| SourceLocation | StarLoc, | ||
| Expr * | DestExp ) |
Definition at line 3237 of file SemaStmt.cpp.
References ActOnFinishFullExpr(), CheckSingleAssignmentConstraints(), Context, DiagnoseAssignmentResult(), clang::ActionResult< PtrTy, Compress >::get(), getCurScope(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), clang::Passing, setFunctionHasBranchProtectedScope(), setFunctionHasIndirectGoto(), and clang::StmtError().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildIndirectGotoStmt().
| 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 14326 of file SemaDecl.cpp.
References AbstractVariableType, Context, clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), clang::Type::isUndeducedType(), RequireCompleteType(), RequireNonAbstractType(), and clang::Decl::setInvalidDecl().
Referenced by ActOnCXXForRangeStmt().
| ExprResult Sema::ActOnInitList | ( | SourceLocation | LBraceLoc, |
| MultiExprArg | InitArgList, | ||
| SourceLocation | RBraceLoc ) |
Definition at line 7378 of file SemaExpr.cpp.
References BuildInitList(), clang::C99, clang::cast(), clang::CPlusPlus, clang::CPlusPlus20, clang::SemaBase::Diag(), getLangOpts(), clang::isa(), clang::SourceLocation::isInvalid(), and clang::SourceLocation::isValid().
| ExprResult Sema::ActOnIntegerConstant | ( | SourceLocation | Loc, |
| int64_t | Val ) |
Definition at line 3638 of file SemaExpr.cpp.
References Context, and clang::IntegerLiteral::Create().
Referenced by ActOnNumericConstant(), actOnOMPReductionKindClause(), checkArrayLikeDecomposition(), checkOpenMPIterationSpace(), checkOpenMPLoop(), and FinishOpenMPLinearClause().
| StmtResult Sema::ActOnLabelStmt | ( | SourceLocation | IdentLoc, |
| LabelDecl * | TheDecl, | ||
| SourceLocation | ColonLoc, | ||
| Stmt * | SubStmt ) |
Definition at line 588 of file SemaStmt.cpp.
References Context, clang::SemaBase::Diag(), clang::Stmt::getBeginLoc(), getCurScope(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), clang::LabelDecl::getStmt(), clang::isa(), clang::LabelDecl::isGnuLocal(), clang::LabelDecl::isMSAsmLabel(), clang::NamedDecl::isReserved(), clang::isReservedInAllContexts(), setFunctionHasBranchProtectedScope(), clang::Decl::setLocation(), clang::LabelDecl::setLocStart(), and clang::LabelDecl::setStmt().
| void Sema::ActOnLambdaClosureParameters | ( | Scope * | LambdaScope, |
| MutableArrayRef< DeclaratorChunk::ParamInfo > | ParamInfo ) |
Definition at line 1392 of file SemaLambda.cpp.
References AddTemplateParametersToLambdaCallOperator(), clang::sema::LambdaScopeInfo::AfterParameterList, clang::sema::LambdaScopeInfo::CallOperator, clang::cast(), clang::sema::CapturingScopeInfo::ContainsUnexpandedParameterPack, clang::TemplateParameterList::containsUnexpandedParameterPack(), getCurrentLambdaScopeUnsafe(), getGenericLambdaTemplateParameterList(), clang::sema::LambdaScopeInfo::Lambda, PushDeclContext(), PushOnScopeChains(), and clang::CXXRecordDecl::setLambdaIsGeneric().
| void Sema::ActOnLambdaClosureQualifiers | ( | LambdaIntroducer & | Intro, |
| SourceLocation | MutableLoc ) |
Definition at line 1366 of file SemaLambda.cpp.
References clang::sema::LambdaScopeInfo::CallOperator, CheckCXXThisCapture(), Context, clang::LambdaIntroducer::Default, clang::LambdaIntroducer::DefaultLoc, clang::SemaBase::Diag(), getCurrentLambdaScopeUnsafe(), getCurrentThisType(), clang::DeclContext::getParent(), clang::DeclContext::isFunctionOrMethod(), clang::SourceLocation::isValid(), clang::sema::LambdaScopeInfo::Lambda, clang::LCD_None, and clang::sema::LambdaScopeInfo::Mutable.
| 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 1584 of file SemaLambda.cpp.
References ActOnFields(), clang::cast(), CheckCompletedCXXClass(), clang::Class, DiscardCleanupsInEvaluationContext(), FunctionScopes, clang::sema::LambdaScopeInfo::Lambda, PopDeclContext(), PopExpressionEvaluationContext(), and PopFunctionScopeInfo().
| void Sema::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.
Definition at line 567 of file SemaLambda.cpp.
References clang::sema::LambdaScopeInfo::ExplicitTemplateParamsRange, getCurLambda(), clang::InventedTemplateParameterInfo::NumExplicitTemplateParams, clang::sema::LambdaScopeInfo::RequiresClause, and clang::InventedTemplateParameterInfo::TemplateParams.
| ExprResult Sema::ActOnLambdaExpr | ( | SourceLocation | StartLoc, |
| Stmt * | Body ) |
ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed.
Definition at line 1975 of file SemaLambda.cpp.
References ActOnFinishFunctionBody(), BuildLambdaExpr(), clang::sema::LambdaScopeInfo::CallOperator, clang::cast(), clang::SemaSYCL::CheckSYCLEntryPointFunctionDecl(), FunctionScopes, clang::Stmt::getEndLoc(), clang::Decl::hasAttr(), and SYCL().
| 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 1084 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, clang::cast(), CheckCXXThisCapture(), CheckShadow(), clang::VarDecl::CInit, clang::Class, clang::sema::CapturingScopeInfo::ContainsUnexpandedParameterPack, clang::CopyInit, clang::CPlusPlus14, clang::CPlusPlus17, clang::CPlusPlus20, CreateLambdaCallOperator(), createLambdaClosureType(), createLambdaInitCaptureVarDecl(), clang::FixItHint::CreateRemoval(), CurContext, clang::Scope::decls(), clang::LambdaIntroducer::Default, clang::LambdaIntroducer::DefaultLoc, clang::SemaBase::Diag(), DiagnoseEmptyLookup(), DiagnoseUnexpandedParameterPack(), DiagnoseUseOfDecl(), DiagPlaceholderVariableDefinition(), clang::DirectInit, clang::LookupResult::empty(), clang::ExplicitByRef, clang::ExplicitByVal, clang::sema::LambdaScopeInfo::ExplicitCaptureRanges, finishLambdaExplicitCaptures(), clang::LookupResult::getAsSingle(), clang::SourceRange::getBegin(), getCurLambda(), getCurrentThisType(), clang::sema::CapturingScopeInfo::getCXXThisCapture(), clang::Scope::getEntity(), getLangOpts(), clang::Decl::getLocation(), clang::sema::Capture::getLocation(), getLocForEndOfToken(), clang::Scope::getParent(), clang::ValueDecl::getPotentiallyDecomposedVarDecl(), clang::VarDecl::hasLocalStorage(), clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::sema::LambdaScopeInfo::IntroducerRange, clang::LookupResult::isAmbiguous(), clang::sema::CapturingScopeInfo::isCXXThisCaptured(), clang::Scope::isFunctionDeclarationScope(), clang::ValueDecl::isInitCapture(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::ValueDecl::isParameterPack(), clang::NamedDecl::isPlaceholderVar(), clang::DeclContext::isRequiresExprBody(), 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::ListInit, clang::VarDecl::ListInit, LookupName(), LookupOrdinaryName, clang::Method, clang::NoInit, clang::InventedTemplateParameterInfo::NumExplicitTemplateParams, PopDeclContext(), PushDeclContext(), PushOnScopeChains(), clang::LambdaIntroducer::Range, clang::Decl::setInvalidDecl(), tryCaptureVariable(), UPPC_Initializer, and V.
|
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 9134 of file Sema.h.
References buildLambdaInitCaptureInitialization(), clang::CopyInit, clang::Init, and clang::OpaquePtr< QualType >::make().
| void Sema::ActOnLastBitfield | ( | SourceLocation | DeclStart, |
| 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 19438 of file SemaDecl.cpp.
References clang::APValue, clang::cast(), Context, clang::ConstantExpr::Create(), clang::IntegerLiteral::Create(), clang::ObjCIvarDecl::Create(), CurContext, clang::FieldDecl::isBitField(), clang::FieldDecl::isZeroLengthBitField(), LangOpts, clang::ObjCIvarDecl::Private, and clang::Zero.
| ExprResult Sema::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 .
[nested-name-specifier] identifier expression -> [nested-name-specifier] identifier where 'identifier' encompasses a fairly broad spectrum of possibilities, including destructor and operator references.
| OpKind | either tok::arrow or tok::period |
| ObjCImpDecl | the current Objective-C @implementation decl; this is an ugly hack around the fact that Objective-C @implementations aren't properly put in the context chain |
Definition at line 1686 of file SemaExprMember.cpp.
References BuildMemberReferenceExpr(), clang::cast(), DecomposeUnqualifiedId(), clang::SemaBase::Diag(), clang::ExprError(), FindFirstQualifierInScope(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::getSourceRange(), HLSL(), clang::IK_ConstructorName, clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CXXScopeSpec::isSet(), MaybeConvertParenListExprToParenExpr(), and clang::Result.
Referenced by BuildMemberReferenceExpr(), and BuiltinInvoke().
| 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 4274 of file SemaDeclCXX.cpp.
References BuildMemInitializer().
| 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 4289 of file SemaDeclCXX.cpp.
References BuildMemInitializer(), Context, and clang::ParenListExpr::Create().
| void Sema::ActOnMemInitializers | ( | Decl * | ConstructorDecl, |
| SourceLocation | ColonLoc, | ||
| ArrayRef< CXXCtorInitializer * > | MemInits, | ||
| bool | AnyErrors ) |
ActOnMemInitializers - Handle the member initializers for a constructor.
Definition at line 5858 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), clang::Constructor, Context, Diag(), DiagnoseBaseOrMemInitializerOrder(), GetKeyForMember(), clang::Init, SetCtorInitializers(), and SetDelegatingInitializer().
Referenced by InstantiateMemInitializers().
| Sema::DeclGroupPtrTy Sema::ActOnModuleDecl | ( | SourceLocation | StartLoc, |
| SourceLocation | ModuleLoc, | ||
| ModuleDeclKind | MDK, | ||
| ModuleIdPath | Path, | ||
| ModuleIdPath | Partition, | ||
| ModuleImportState & | ImportState, | ||
| bool | SeenNoTrivialPPDirective ) |
The parser has processed a module-declaration that begins the definition of a module interface or implementation.
Definition at line 249 of file SemaModule.cpp.
References ActOnEndOfTranslationUnitFragment(), 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, clang::SemaBase::Diag(), DiagReservedModuleName(), FirstDecl, getASTContext(), getASTMutationListener(), clang::ModuleLoader::getFlatNameFromPath(), getLangOpts(), getModuleLoader(), getSourceManager(), clang::Global, GlobalFragment, Implementation, ImportAllowed, clang::Module::Imports, Interface, clang::Module::Kind, clang::ModuleLoader::loadModule(), makeTransitiveImportsVisible(), clang::Module::ModulePartitionImplementation, clang::Module::ModulePartitionInterface, NotACXX20Module, PartitionImplementation, PartitionInterface, PP, clang::Decl::ReachableWhenImported, and clang::ASTContext::setCurrentNamedModule().
| DeclResult Sema::ActOnModuleImport | ( | SourceLocation | StartLoc, |
| SourceLocation | ExportLoc, | ||
| SourceLocation | ImportLoc, | ||
| Module * | M, | ||
| ModuleIdPath | Path = {} ) |
Definition at line 631 of file SemaModule.cpp.
References checkModuleImportContext(), Context, clang::ImportDecl::Create(), CurContext, clang::LangOptions::CurrentModule, currentModuleIsImplementation(), clang::SemaBase::Diag(), clang::Module::Exports, getASTContext(), getCurrentModule(), getEnclosingExportDecl(), clang::Module::getFullModuleName(), getLangOpts(), clang::Module::Imports, clang::Module::isForBuilding(), clang::Module::isHeaderUnit(), clang::Module::isModulePartitionImplementation(), clang::Module::isNamedModule(), clang::SourceLocation::isValid(), clang::Module::Kind, makeTransitiveImportsVisible(), clang::Module::ModulePartitionImplementation, clang::Module::Name, and clang::Module::Parent.
| DeclResult Sema::ActOnModuleImport | ( | SourceLocation | StartLoc, |
| SourceLocation | ExportLoc, | ||
| SourceLocation | ImportLoc, | ||
| ModuleIdPath | Path, | ||
| bool | IsPartition = false ) |
The parser has processed a module import declaration.
| StartLoc | The location of the first token in the declaration. This could be the location of an '@', 'export', or 'import'. |
| ExportLoc | The location of the 'export' keyword, if any. |
| ImportLoc | The location of the 'import' keyword. |
| Path | The module toplevel name as an access path. |
| IsPartition | If the name is for a partition. |
Definition at line 563 of file SemaModule.cpp.
References ActOnModuleImport(), clang::Module::AllVisible, currentModuleIsImplementation(), clang::SemaBase::Diag(), getCurrentModule(), clang::ModuleLoader::getFlatNameFromPath(), getLangOpts(), getModuleLoader(), clang::Module::getPrimaryModuleInterfaceName(), clang::Module::isInterfaceOrPartition(), clang::ModuleLoader::loadModule(), clang::Module::Module(), ObjC(), and PP.
Referenced by ActOnModuleImport().
| StmtResult Sema::ActOnMSAsmStmt | ( | SourceLocation | AsmLoc, |
| SourceLocation | LBraceLoc, | ||
| ArrayRef< Token > | AsmToks, | ||
| StringRef | AsmString, | ||
| unsigned | NumOutputs, | ||
| unsigned | NumInputs, | ||
| ArrayRef< StringRef > | Constraints, | ||
| ArrayRef< StringRef > | Clobbers, | ||
| ArrayRef< Expr * > | Exprs, | ||
| SourceLocation | EndLoc ) |
Definition at line 974 of file SemaStmtAsm.cpp.
References Context, clang::SemaBase::Diag(), clang::Stmt::getBeginLoc(), clang::Decl::getLocation(), clang::Expr::getSourceBitField(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isBitIntType(), NS, clang::Expr::refersToBitField(), setFunctionHasBranchProtectedScope(), and clang::StmtError().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildMSAsmStmt().
| StmtResult Sema::ActOnMSDependentExistsStmt | ( | SourceLocation | KeywordLoc, |
| bool | IsIfExists, | ||
| CXXScopeSpec & | SS, | ||
| UnqualifiedId & | Name, | ||
| Stmt * | Nested ) |
Definition at line 4606 of file SemaStmt.cpp.
References BuildMSDependentExistsStmt(), Context, GetNameFromUnqualifiedId(), and clang::CXXScopeSpec::getWithLocInContext().
| ParsedType Sema::ActOnMSVCUnknownTypeName | ( | const IdentifierInfo & | II, |
| SourceLocation | NameLoc, | ||
| bool | IsTemplateTypeArg ) |
Attempt to behave like MSVC in situations where lookup of an unqualified type name has failed in a dependent context.
In these situations, we automatically form a DependentTypeName that will retry lookup in a related scope during instantiation.
Definition at line 627 of file SemaDecl.cpp.
References Context, CreateParsedType(), CurContext, clang::SemaBase::Diag(), findRecordWithDependentBasesOfEnclosingMethod(), getCurScope(), getLangOpts(), clang::NestedNameSpecifierLocBuilder::getWithLocInContext(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::None, clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), synthesizeCurrentNestedNameSpecifier(), and clang::T.
| 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 1299 of file SemaDecl.cpp.
References ActOnDependentIdExpression().
| ExprResult Sema::ActOnNameClassifiedAsNonType | ( | Scope * | S, |
| const CXXScopeSpec & | SS, | ||
| NamedDecl * | Found, | ||
| SourceLocation | NameLoc, | ||
| const Token & | NextToken ) |
Act on the result of classifying a name as a specific non-type declaration.
Definition at line 1309 of file SemaDecl.cpp.
References BuildDeclarationNameExpr(), clang::SemaObjC::BuildIvarRefExpr(), clang::Found, getCurMethodDecl(), clang::Token::is(), clang::CXXScopeSpec::isEmpty(), LookupOrdinaryName, ObjC(), clang::Result, and UseArgumentDependentLookup().
| ExprResult Sema::ActOnNameClassifiedAsOverloadSet | ( | Scope * | S, |
| Expr * | OverloadSet ) |
Act on the result of classifying a name as an overload set.
Definition at line 1326 of file SemaDecl.cpp.
References clang::CXXScopeSpec::Adopt(), BuildPossibleImplicitMemberExpr(), clang::cast(), LookupOrdinaryName, and clang::Result.
| 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 1290 of file SemaDecl.cpp.
References BuildDeclarationNameExpr(), clang::CPlusPlus, getLangOpts(), LookupOrdinaryName, and clang::Result.
| Decl * Sema::ActOnNamespaceAliasDef | ( | Scope * | CurScope, |
| SourceLocation | NamespaceLoc, | ||
| SourceLocation | AliasLoc, | ||
| IdentifierInfo * | Alias, | ||
| CXXScopeSpec & | SS, | ||
| SourceLocation | IdentLoc, | ||
| IdentifierInfo * | Ident ) |
Definition at line 13873 of file SemaDeclCXX.cpp.
References clang::AliasDecl, clang::cast(), clang::LookupResult::clear(), Context, clang::NamespaceAliasDecl::Create(), CurContext, Diag(), DiagnoseTemplateParameterShadow(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), FilterLookupForScope(), ForVisibleRedeclaration, clang::LookupResult::getFoundDecl(), clang::Decl::getLocation(), getNamespaceDecl(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getRepresentativeDecl(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXScopeSpec::getWithLocInContext(), clang::isa(), clang::LookupResult::isAmbiguous(), clang::LookupResult::isSingleResult(), clang::Decl::isTemplateParameter(), isVisible(), LookupName(), LookupNamespaceName, LookupOrdinaryName, LookupParsedName(), PushOnScopeChains(), and TryNamespaceTypoCorrection().
| concepts::Requirement * Sema::ActOnNestedRequirement | ( | Expr * | Constraint | ) |
Definition at line 7964 of file SemaExprCXX.cpp.
References BuildNestedRequirement().
| ExprResult Sema::ActOnNoexceptExpr | ( | SourceLocation | KeyLoc, |
| SourceLocation | LParen, | ||
| Expr * | Operand, | ||
| SourceLocation | RParen ) |
Definition at line 7393 of file SemaExprCXX.cpp.
References BuildCXXNoexceptExpr().
| ExprResult clang::Sema::ActOnNoexceptSpec | ( | Expr * | NoexceptExpr, |
| ExceptionSpecificationType & | EST ) |
Check the given noexcept-specifier, convert its expression, and compute the appropriate ExceptionSpecificationType.
Definition at line 84 of file SemaExceptionSpec.cpp.
References CheckConvertedConstantExpression(), clang::Expr::containsUnexpandedParameterPack(), Context, clang::ConstantExpr::Create(), clang::EST_DependentNoexcept, clang::EST_NoexceptFalse, clang::EST_NoexceptTrue, clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Noexcept, and clang::Result.
| NamedDecl * Sema::ActOnNonTypeTemplateParameter | ( | Scope * | S, |
| Declarator & | D, | ||
| unsigned | Depth, | ||
| unsigned | Position, | ||
| SourceLocation | EqualLoc, | ||
| Expr * | DefaultArg ) |
Definition at line 1516 of file SemaTemplate.cpp.
References clang::Scope::AddDecl(), clang::AS_public, AttachTypeConstraint(), CheckFunctionOrTemplateParamDeclarator(), CheckNonTypeTemplateParameterType(), Context, clang::NonTypeTemplateParmDecl::Create(), clang::FixItHint::CreateRemoval(), Default, clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), clang::Declarator::getBeginLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::Type::getContainedAutoType(), clang::TypeLoc::getContainedAutoTypeLoc(), clang::Type::getContainedDeducedType(), clang::Declarator::getDeclSpec(), clang::Declarator::getEllipsisLoc(), getEnclosingLambdaOrBlock(), 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(), getTrivialTemplateArgumentLoc(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclSpec::getVirtualSpecLoc(), clang::DeclSpec::hasConstexprSpecifier(), clang::Declarator::hasEllipsis(), clang::DeclSpec::hasExplicitSpecifier(), IdResolver, clang::Invalid, clang::isa(), clang::DeclSpec::isInlineSpecified(), clang::SourceLocation::isInvalid(), clang::DeclSpec::isNoreturnSpecified(), clang::Scope::isTemplateParamScope(), clang::DeclSpec::isVirtualSpecified(), maybeDiagnoseTemplateParameterShadow(), clang::DeclSpec::SCS_unspecified, clang::T, clang::TSCS_unspecified, UPPC_DefaultArgument, and UPPC_TypeConstraint.
| StmtResult Sema::ActOnNullStmt | ( | SourceLocation | SemiLoc, |
| bool | HasLeadingEmptyMacro = false ) |
Definition at line 70 of file SemaStmt.cpp.
References Context.
| ExprResult Sema::ActOnNumericConstant | ( | const Token & | Tok, |
| Scope * | UDLScope = nullptr ) |
Definition at line 3712 of file SemaExpr.cpp.
References ActOnIntegerConstant(), clang::TemplateArgumentListInfo::addArgument(), BuildFloatingLiteral(), BuildLiteralOperatorCall(), clang::C23, clang::C2y, clang::C99, clang::Type::castAs(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus23, clang::IntegerLiteral::Create(), clang::StringLiteral::Create(), clang::FixedPointLiteral::CreateFromRawInt(), clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::BuiltinType::getKind(), getLangOpts(), clang::LangOptions::getOpenCLCompatibleVersion(), getOpenCLOptions(), clang::Expr::getType(), getUDSuffixLoc(), HLSL(), ImpCastExprToType(), clang::Invalid, clang::QualType::isNull(), LOLR_Cooked, LOLR_Error, LOLR_ErrorNoDiagnostic, LOLR_Raw, LOLR_StringTemplatePack, LOLR_Template, LookupLiteralOperator(), LookupOrdinaryName, clang::Normal, OpenCL(), clang::Ordinary, PP, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), and Tok.
| ParsedTemplateArgument Sema::ActOnPackExpansion | ( | const ParsedTemplateArgument & | Arg, |
| SourceLocation | EllipsisLoc ) |
Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion.
| Arg | The template argument preceding the ellipsis, which may already be invalid. |
| EllipsisLoc | The location of the ellipsis. |
Definition at line 726 of file SemaTemplateVariadic.cpp.
References ActOnPackExpansion(), clang::TemplateName::containsUnexpandedParameterPack(), clang::SemaBase::Diag(), clang::OpaquePtr< PtrTy >::get(), clang::ParsedTemplateArgument::getAsExpr(), clang::ParsedTemplateArgument::getAsTemplate(), clang::ParsedTemplateArgument::getAsType(), clang::CXXScopeSpec::getBeginLoc(), clang::ParsedTemplateArgument::getKind(), clang::ParsedTemplateArgument::getNameLoc(), clang::ParsedTemplateArgument::getScopeSpec(), clang::ParsedTemplateArgument::getTemplatePackExpansion(), clang::ParsedTemplateArgument::isInvalid(), clang::CXXScopeSpec::isValid(), clang::ParsedTemplateArgument::NonType, clang::Result, clang::SourceRange::setBegin(), clang::ParsedTemplateArgument::Template, and clang::ParsedTemplateArgument::Type.
Referenced by ActOnPackExpansion(), and CheckTemplateArgument().
| ExprResult Sema::ActOnPackExpansion | ( | Expr * | Pattern, |
| SourceLocation | EllipsisLoc ) |
Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
| Pattern | The expression preceding the ellipsis, which will become the pattern of the pack expansion. |
| EllipsisLoc | The location of the ellipsis. |
Definition at line 819 of file SemaTemplateVariadic.cpp.
References CheckPackExpansion().
| TypeResult Sema::ActOnPackExpansion | ( | ParsedType | Type, |
| SourceLocation | EllipsisLoc ) |
Invoked when parsing a type followed by an ellipsis, which creates a pack expansion.
| Type | The type preceding the ellipsis, which will become the pattern of the pack expansion. |
| EllipsisLoc | The location of the ellipsis. |
Definition at line 765 of file SemaTemplateVariadic.cpp.
References CheckPackExpansion(), CreateParsedType(), clang::TypeSourceInfo::getType(), and GetTypeFromParser().
| ExprResult Sema::ActOnPackIndexingExpr | ( | Scope * | S, |
| Expr * | PackExpression, | ||
| SourceLocation | EllipsisLoc, | ||
| SourceLocation | LSquareLoc, | ||
| Expr * | IndexExpr, | ||
| SourceLocation | RSquareLoc ) |
Definition at line 1330 of file SemaTemplateVariadic.cpp.
References BuildPackIndexingExpr(), clang::Expr::containsErrors(), clang::CPlusPlus26, clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), getLangOpts(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and isParameterPack().
| QualType Sema::ActOnPackIndexingType | ( | QualType | Pattern, |
| Expr * | IndexExpr, | ||
| SourceLocation | Loc, | ||
| SourceLocation | EllipsisLoc ) |
Definition at line 9836 of file SemaType.cpp.
References BuildPackIndexingType(), clang::Type::containsUnexpandedParameterPack(), clang::CPlusPlus26, clang::SemaBase::Diag(), and getLangOpts().
Referenced by ActOnPseudoDestructorExpr().
| Decl * Sema::ActOnParamDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| SourceLocation | ExplicitThisLoc = {} ) |
ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into function prototype scope.
Definition at line 15576 of file SemaDecl.cpp.
References clang::Scope::AddDecl(), clang::LookupResult::begin(), CheckExplicitObjectParameter(), CheckFunctionOrTemplateParamDeclarator(), CheckParameter(), clang::DeclSpec::ClearStorageClassSpecs(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus17, clang::FixItHint::CreateRemoval(), deduceOpenCLAddressSpace(), clang::SemaBase::Diag(), DiagnoseFunctionSpecifiers(), DiagnoseTemplateParameterShadow(), clang::LookupResult::empty(), ForVisibleRedeclaration, clang::Declarator::getBeginLoc(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getDeclSpec(), clang::Scope::getFunctionPrototypeDepth(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), getLangOpts(), clang::Decl::getLocation(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::Declarator::getMutableDeclSpec(), clang::Scope::getNextFunctionPrototypeIndex(), clang::Declarator::getNumTypeObjects(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::hasConstexprSpecifier(), HLSL(), IdResolver, clang::Scope::isDeclScope(), clang::Scope::isFunctionPrototypeScope(), clang::Type::isHLSLResourceRecordArray(), clang::Type::isIncompleteArrayType(), clang::DeclSpec::isInlineSpecified(), clang::Declarator::isInvalidType(), clang::DeclSpec::isModulePrivateSpecified(), clang::LookupResult::isSingleResult(), clang::Decl::isTemplateParameter(), LookupName(), LookupOrdinaryName, New, 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::Declarator::setInvalidType(), clang::DeclSpec::TST_void, and warnOnCTypeHiddenInCPlusPlus().
Referenced by ActOnFinishKNRParamDeclarations().
| void Sema::ActOnParamDefaultArgument | ( | Decl * | param, |
| SourceLocation | EqualLoc, | ||
| Expr * | defarg ) |
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 328 of file SemaDeclCXX.cpp.
References ActOnParamDefaultArgumentError(), clang::cast(), ConvertParamDefaultArgument(), clang::CPlusPlus, Diag(), DiagnoseUnexpandedParameterPack(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Result, SetParamDefaultArgument(), UnparsedDefaultArgLocs, and UPPC_DefaultArgument.
| 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 383 of file SemaDeclCXX.cpp.
References clang::cast(), CreateRecoveryExpr(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getEndLoc(), and UnparsedDefaultArgLocs.
Referenced by ActOnParamDefaultArgument().
| 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 372 of file SemaDeclCXX.cpp.
References clang::cast(), and UnparsedDefaultArgLocs.
| ExprResult Sema::ActOnParenExpr | ( | SourceLocation | L, |
| SourceLocation | R, | ||
| Expr * | E ) |
Definition at line 4157 of file SemaExpr.cpp.
References BuildBuiltinCallExpr(), Context, CurFPFeatures, getLangOpts(), clang::Expr::getType(), clang::Type::hasFloatingRepresentation(), and clang::Expr::isLValue().
Referenced by ActOnDecltypeExpression(), buildCounterUpdate(), MaybeConvertParenListExprToParenExpr(), clang::TreeTransform< AdjustConstraints >::RebuildParenExpr(), and rebuildPotentialResultsAsNonOdrUsed().
| ExprResult Sema::ActOnParenListExpr | ( | SourceLocation | L, |
| SourceLocation | R, | ||
| MultiExprArg | Val ) |
Definition at line 8151 of file SemaExpr.cpp.
References Context, and clang::ParenListExpr::Create().
Referenced by clang::InitializationSequence::Perform(), and clang::TreeTransform< AdjustConstraints >::RebuildParenListExpr().
| 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 2260 of file SemaDecl.cpp.
References clang::Scope::applyNRVO(), clang::cast(), CheckPoppedLabel(), clang::CPlusPlus, clang::Scope::decl_empty(), clang::Scope::decls(), clang::Scope::DeclScope, clang::SemaBase::Diag(), DiagnoseUnusedButSetDecl(), DiagnoseUnusedDecl(), DiagnoseUnusedNestedTypedefs(), clang::NamedDecl::getDeclName(), clang::Scope::getFlags(), getLangOpts(), clang::Decl::getLocation(), clang::Scope::hasUnrecoverableErrorOccurred(), IdResolver, clang::isa(), ObjC(), clang::SemaBase::PDiag(), PP, RefsMinusAssignments, and clang::Scope::TemplateParamScope.
| ExprResult Sema::ActOnPostfixUnaryOp | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| tok::TokenKind | Kind, | ||
| Expr * | Input ) |
Definition at line 4843 of file SemaExpr.cpp.
References BuildUnaryOp(), clang::ExprError(), MaybeConvertParenListExprToParenExpr(), and clang::Result.
| void Sema::ActOnPragmaAttributeAttribute | ( | ParsedAttr & | Attribute, |
| SourceLocation | PragmaLoc, | ||
| attr::ParsedSubjectMatchRuleSet | Rules ) |
Definition at line 1018 of file SemaAttr.cpp.
References clang::FixItHint::CreateRemoval(), clang::SemaBase::Diag(), clang::attr::getSubjectMatchRuleSpelling(), LangOpts, and PragmaAttributeStack.
| void Sema::ActOnPragmaAttributeEmptyPush | ( | SourceLocation | PragmaLoc, |
| const IdentifierInfo * | Namespace ) |
Definition at line 1151 of file SemaAttr.cpp.
References PragmaAttributeStack.
| void Sema::ActOnPragmaAttributePop | ( | SourceLocation | PragmaLoc, |
| const IdentifierInfo * | Namespace ) |
Called on well-formed '#pragma clang attribute pop'.
Definition at line 1158 of file SemaAttr.cpp.
References clang::SemaBase::Diag(), and PragmaAttributeStack.
| void Sema::ActOnPragmaClangSection | ( | SourceLocation | PragmaLoc, |
| PragmaClangSectionAction | Action, | ||
| PragmaClangSectionKind | SecKind, | ||
| StringRef | SecName ) |
ActOnPragmaClangSection - Called on well formed #pragma clang section.
Definition at line 389 of file SemaAttr.cpp.
References clang::BSS, clang::Clear, clang::Data, clang::SemaBase::Diag(), isValidSectionSpecifier(), PragmaClangBSSSection, PragmaClangDataSection, PragmaClangRelroSection, PragmaClangRodataSection, PragmaClangTextSection, clang::Sema::PragmaClangSection::PragmaLocation, clang::ASTContext::PSF_Execute, clang::ASTContext::PSF_Read, clang::ASTContext::PSF_Write, clang::ASTContext::PSF_ZeroInit, clang::Relro, clang::Rodata, clang::Sema::PragmaClangSection::SectionName, clang::Text, toString(), UnifySection(), and clang::Sema::PragmaClangSection::Valid.
| void Sema::ActOnPragmaCXLimitedRange | ( | SourceLocation | Loc, |
| LangOptions::ComplexRangeKind | Range ) |
ActOnPragmaCXLimitedRange - Called on well formed #pragma STDC CX_LIMITED_RANGE.
Definition at line 1527 of file SemaAttr.cpp.
References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, FpPragmaStack, getLangOpts(), and PSK_Set.
| void Sema::ActOnPragmaDetectMismatch | ( | SourceLocation | Loc, |
| StringRef | Name, | ||
| StringRef | Value ) |
ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.
Definition at line 628 of file SemaAttr.cpp.
References Consumer, Context, and clang::PragmaDetectMismatchDecl::Create().
| void Sema::ActOnPragmaDump | ( | Expr * | E | ) |
Called on #pragma clang __debug dump E.
Definition at line 5842 of file SemaLookup.cpp.
References clang::Stmt::dump().
| void Sema::ActOnPragmaDump | ( | Scope * | S, |
| SourceLocation | Loc, | ||
| IdentifierInfo * | II ) |
Called on #pragma clang __debug dump II.
Definition at line 5832 of file SemaLookup.cpp.
References clang::LookupResult::dump(), LookupAnyName, LookupName(), NotForRedeclaration, clang::LookupResult::setHideTags(), and clang::LookupResult::suppressDiagnostics().
| void Sema::ActOnPragmaExport | ( | IdentifierInfo * | IdentId, |
| SourceLocation | ExportNameLoc, | ||
| Scope * | curScope ) |
ActonPragmaExport - called on well-formed '#pragma export'.
Definition at line 1347 of file SemaAttr.cpp.
References CurContext, clang::VarDecl::Definition, clang::SemaBase::Diag(), clang::Decl::getCanonicalDecl(), lookupExternCFunctionOrVariable(), mergeVisibilityType(), clang::Sema::PendingPragmaInfo::NameLoc, PendingExportedNames, and clang::Sema::PendingPragmaInfo::Used.
| void Sema::ActOnPragmaFEnvAccess | ( | SourceLocation | Loc, |
| bool | IsEnabled ) |
ActOnPragmaFenvAccess - Called on well formed #pragma STDC FENV_ACCESS.
Definition at line 1511 of file SemaAttr.cpp.
References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, clang::SemaBase::Diag(), FpPragmaStack, getLangOpts(), isPreciseFPEnabled(), and PSK_Set.
| void Sema::ActOnPragmaFEnvRound | ( | SourceLocation | Loc, |
| llvm::RoundingMode | FPR ) |
Called to set constant rounding mode for floating point operations.
Definition at line 1496 of file SemaAttr.cpp.
References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, FpPragmaStack, getLangOpts(), and PSK_Set.
| void Sema::ActOnPragmaFloatControl | ( | SourceLocation | Loc, |
| PragmaMsStackAction | Action, | ||
| PragmaFloatControlKind | Value ) |
ActOnPragmaFloatControl - Call on well-formed #pragma float_control.
Definition at line 663 of file SemaAttr.cpp.
References clang::FPOptionsOverride::applyOverrides(), CurContext, CurFPFeatureOverrides(), CurFPFeatures, clang::SemaBase::Diag(), clang::LangOptionsBase::FPE_Ignore, clang::LangOptionsBase::FPE_Strict, FpPragmaStack, getLangOpts(), isPreciseFPEnabled(), clang::PFC_Except, clang::PFC_NoExcept, clang::PFC_NoPrecise, clang::PFC_Pop, clang::PFC_Precise, clang::PFC_Push, PSK_Pop, PSK_Push, PSK_Push_Set, and clang::FPOptionsOverride::setFPPreciseEnabled().
| void Sema::ActOnPragmaFPContract | ( | SourceLocation | Loc, |
| LangOptions::FPModeKind | FPC ) |
ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT and #pragma clang fp contract.
Definition at line 1441 of file SemaAttr.cpp.
References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, clang::LangOptionsBase::FPM_Fast, clang::LangOptionsBase::FPM_FastHonorPragmas, clang::LangOptionsBase::FPM_Off, clang::LangOptionsBase::FPM_On, FpPragmaStack, getLangOpts(), PSK_Set, clang::FPOptionsOverride::setAllowFPContractAcrossStatement(), clang::FPOptionsOverride::setAllowFPContractWithinStatement(), and clang::FPOptionsOverride::setDisallowFPContract().
| void Sema::ActOnPragmaFPEvalMethod | ( | SourceLocation | Loc, |
| LangOptions::FPEvalMethodKind | Value ) |
Definition at line 636 of file SemaAttr.cpp.
References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, clang::SemaBase::Diag(), clang::LangOptionsBase::FEM_Double, clang::LangOptionsBase::FEM_Extended, clang::LangOptionsBase::FEM_Source, FpPragmaStack, getLangOpts(), PP, and PSK_Set.
| void Sema::ActOnPragmaFPExceptions | ( | SourceLocation | Loc, |
| LangOptions::FPExceptionModeKind | FPE ) |
Called on well formed '#pragma clang fp' that has option 'exceptions'.
Definition at line 1535 of file SemaAttr.cpp.
References setExceptionMode().
| void Sema::ActOnPragmaFPValueChangingOption | ( | SourceLocation | Loc, |
| PragmaFPKind | Kind, | ||
| bool | IsEnabled ) |
Called on well formed #pragma clang fp reassociate or #pragma clang fp reciprocal.
Definition at line 1460 of file SemaAttr.cpp.
References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, clang::SemaBase::Diag(), clang::LangOptionsBase::FEM_UnsetOnCommandLine, FpPragmaStack, getLangOpts(), clang::PFK_Reassociate, clang::PFK_Reciprocal, PP, and PSK_Set.
| void Sema::ActOnPragmaMSAllocText | ( | SourceLocation | PragmaLocation, |
| StringRef | Section, | ||
| const SmallVector< std::tuple< IdentifierInfo *, SourceLocation > > & | Functions ) |
Called on well-formed #pragma alloc_text().
Definition at line 899 of file SemaAttr.cpp.
References clang::CPlusPlus, CurContext, clang::SemaBase::Diag(), clang::Function, FunctionToSectionMap, clang::Decl::getCanonicalDecl(), getLangOpts(), clang::IdentifierInfo::getName(), LookupOrdinaryName, LookupSingleName(), and TUScope.
| void Sema::ActOnPragmaMSComment | ( | SourceLocation | CommentLoc, |
| PragmaMSCommentKind | Kind, | ||
| StringRef | Arg ) |
ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").
Definition at line 620 of file SemaAttr.cpp.
References Consumer, Context, and clang::PragmaCommentDecl::Create().
| void Sema::ActOnPragmaMSFunction | ( | SourceLocation | Loc, |
| const llvm::SmallVectorImpl< StringRef > & | NoBuiltins ) |
Call on well formed #pragma function.
Definition at line 1267 of file SemaAttr.cpp.
References CurContext, clang::SemaBase::Diag(), and MSFunctionNoBuiltins.
| void Sema::ActOnPragmaMSInitSeg | ( | SourceLocation | PragmaLocation, |
| StringLiteral * | SegmentName ) |
Called on well-formed #pragma init_seg().
Definition at line 890 of file SemaAttr.cpp.
References CurInitSeg, CurInitSegLoc, clang::StringLiteral::getString(), and clang::nullptr.
| void Sema::ActOnPragmaMSOptimize | ( | SourceLocation | Loc, |
| bool | IsOn ) |
#pragma optimize("[optimization-list]", on | off).
Definition at line 1258 of file SemaAttr.cpp.
References CurContext, clang::SemaBase::Diag(), and MSPragmaOptimizeIsOn.
| 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 717 of file SemaAttr.cpp.
References ImplicitMSInheritanceAttrLoc, and MSPointerToMemberRepresentationMethod.
| 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 885 of file SemaAttr.cpp.
References clang::StringLiteral::getString(), and UnifySection().
| 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 847 of file SemaAttr.cpp.
References clang::Sema::PragmaStack< ValueType >::Act(), BSSSegStack, checkSectionName(), CodeSegStack, ConstSegStack, Context, DataSegStack, clang::SemaBase::Diag(), clang::StringLiteral::getBeginLoc(), clang::StringLiteral::getString(), PSK_Pop, and clang::Sema::PragmaStack< ValueType >::Stack.
| 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 874 of file SemaAttr.cpp.
References clang::SemaBase::Diag(), PSK_Pop, and StrictGuardStackCheckStack.
| void Sema::ActOnPragmaMSStruct | ( | PragmaMSStructKind | Kind | ) |
ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].
Definition at line 616 of file SemaAttr.cpp.
References MSStructPragmaOn, and clang::PMSST_ON.
| void Sema::ActOnPragmaMSVtorDisp | ( | PragmaMsStackAction | Action, |
| SourceLocation | PragmaLoc, | ||
| MSVtorDispMode | Value ) |
Called on well formed #pragma vtordisp().
Definition at line 724 of file SemaAttr.cpp.
References clang::SemaBase::Diag(), PSK_Pop, and VtorDispStack.
| void Sema::ActOnPragmaOptimize | ( | bool | On, |
| SourceLocation | PragmaLoc ) |
Called on well formed #pragma clang optimize.
Definition at line 1251 of file SemaAttr.cpp.
References OptimizeOffPragmaLocation.
| void Sema::ActOnPragmaOptionsAlign | ( | PragmaOptionsAlignKind | Kind, |
| SourceLocation | PragmaLoc ) |
ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
Definition at line 334 of file SemaAttr.cpp.
References AlignPackStack, Context, clang::SemaBase::Diag(), getLangOpts(), clang::Mac68k, clang::Sema::AlignPackInfo::Mac68k, clang::Native, clang::Sema::AlignPackInfo::Native, clang::Natural, clang::Sema::AlignPackInfo::Natural, clang::Packed, clang::Sema::AlignPackInfo::Packed, clang::Power, PSK_Pop, PSK_Push_Set, PSK_Reset, and clang::Reset.
| void Sema::ActOnPragmaPack | ( | SourceLocation | PragmaLoc, |
| PragmaMsStackAction | Action, | ||
| StringRef | SlotLabel, | ||
| Expr * | Alignment ) |
ActOnPragmaPack - Called on well formed #pragma pack(...).
Definition at line 438 of file SemaAttr.cpp.
References AlignPackStack, Context, clang::SemaBase::Diag(), clang::Sema::AlignPackInfo::getAlignMode(), clang::Expr::getIntegerConstantExpr(), getLangOpts(), clang::Sema::AlignPackInfo::getPackNumber(), clang::Sema::AlignPackInfo::IsAlignAttr(), clang::Sema::AlignPackInfo::IsPackSet(), clang::Expr::isTypeDependent(), clang::Sema::AlignPackInfo::Mac68k, clang::Sema::AlignPackInfo::Native, PSK_Pop, and PSK_Show.
| 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 20963 of file SemaDecl.cpp.
References clang::Decl::addAttr(), Context, clang::SemaBase::Diag(), ExtnameUndeclaredIdentifiers, clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::isa(), isDeclExternC(), LookupOrdinaryName, LookupSingleName(), clang::AttributeCommonInfo::Form::Pragma(), and TUScope.
| void Sema::ActOnPragmaUnused | ( | const Token & | Identifier, |
| Scope * | curScope, | ||
| SourceLocation | PragmaLoc ) |
ActOnPragmaUnused - Called on well-formed '#pragma unused'.
Definition at line 935 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, clang::SemaBase::Diag(), clang::LookupResult::empty(), clang::LookupResult::getAsSingle(), clang::Token::getIdentifierInfo(), clang::Token::getLocation(), clang::Decl::isUsed(), LookupName(), and LookupOrdinaryName.
| void Sema::ActOnPragmaVisibility | ( | const IdentifierInfo * | VisType, |
| SourceLocation | PragmaLoc ) |
ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
Definition at line 1426 of file SemaAttr.cpp.
References clang::SemaBase::Diag(), clang::IdentifierInfo::getName(), PopPragmaVisibility(), PushPragmaVisibility(), and clang::T.
| 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 21002 of file SemaDecl.cpp.
References DeclApplyPragmaWeak(), clang::Decl::hasAttr(), clang::isa(), LookupOrdinaryName, LookupSingleName(), TUScope, and WeakUndeclaredIdentifiers.
| void Sema::ActOnPragmaWeakID | ( | IdentifierInfo * | WeakName, |
| SourceLocation | PragmaLoc, | ||
| SourceLocation | WeakNameLoc ) |
ActOnPragmaWeakID - Called on well formed #pragma weak ident.
Definition at line 20990 of file SemaDecl.cpp.
References clang::Decl::addAttr(), Context, LookupOrdinaryName, LookupSingleName(), TUScope, and WeakUndeclaredIdentifiers.
| ExprResult Sema::ActOnPredefinedExpr | ( | SourceLocation | Loc, |
| tok::TokenKind | Kind ) |
Definition at line 3574 of file SemaExpr.cpp.
References BuildPredefinedExpr(), and getPredefinedExprKind().
| Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl | ( | SourceLocation | ModuleLoc, |
| SourceLocation | PrivateLoc ) |
The parser has processed a private-module-fragment declaration that begins the definition of the private module fragment of the current module unit.
| ModuleLoc | The location of the 'module' keyword. |
| PrivateLoc | The location of the 'private' keyword. |
Definition at line 501 of file SemaModule.cpp.
References ActOnEndOfTranslationUnitFragment(), Context, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::Module::ExplicitGlobalModuleFragment, clang::Module::ImplicitGlobalModuleFragment, clang::Module::ModuleHeaderUnit, clang::Module::ModuleImplementationUnit, clang::Module::ModuleInterfaceUnit, clang::Module::ModuleMapModule, clang::Module::ModulePartitionImplementation, clang::Module::ModulePartitionInterface, clang::Decl::ModulePrivate, clang::Normal, PP, and clang::Module::PrivateModuleFragment.
| ExprResult Sema::ActOnPseudoDestructorExpr | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | OpLoc, | ||
| tok::TokenKind | OpKind, | ||
| CXXScopeSpec & | SS, | ||
| UnqualifiedId & | FirstTypeName, | ||
| SourceLocation | CCLoc, | ||
| SourceLocation | TildeLoc, | ||
| UnqualifiedId & | SecondTypeName ) |
Definition at line 7182 of file SemaExprCXX.cpp.
References ActOnTemplateIdType(), BuildPseudoDestructorExpr(), CheckArrow(), computeDeclContext(), Context, clang::SemaBase::Diag(), clang::ExprError(), clang::UnqualifiedId::getKind(), clang::TemplateIdAnnotation::getTemplateArgs(), GetTypeFromParser(), getTypeName(), clang::UnqualifiedId::Identifier, clang::IK_Identifier, clang::IK_TemplateId, clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::CXXScopeSpec::isSet(), isSFINAEContext(), clang::TemplateIdAnnotation::LAngleLoc, clang::OpaquePtr< QualType >::make(), clang::TemplateIdAnnotation::Name, clang::None, clang::TemplateIdAnnotation::NumArgs, clang::TemplateIdAnnotation::RAngleLoc, clang::UnqualifiedId::StartLocation, clang::T, clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, clang::TemplateIdAnnotation::TemplateKWLoc, and clang::TemplateIdAnnotation::TemplateNameLoc.
| ExprResult Sema::ActOnPseudoDestructorExpr | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | OpLoc, | ||
| tok::TokenKind | OpKind, | ||
| SourceLocation | TildeLoc, | ||
| const DeclSpec & | DS ) |
Definition at line 7321 of file SemaExprCXX.cpp.
References ActOnPackIndexingType(), BuildDecltypeType(), BuildPseudoDestructorExpr(), clang::cast(), CheckArrow(), Context, clang::SemaBase::Diag(), clang::ExprError(), clang::OpaquePtr< PtrTy >::get(), getASTContext(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getEllipsisLoc(), clang::SourceRange::getEnd(), clang::DeclSpec::getPackIndexingExpr(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getRepAsType(), clang::DeclSpec::getTypeofParensRange(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTrivial(), clang::DecltypeTypeLoc::setDecltypeLoc(), clang::PackIndexingTypeLoc::setEllipsisLoc(), clang::DecltypeTypeLoc::setRParenLoc(), clang::T, clang::DeclSpec::TST_decltype, clang::DeclSpec::TST_decltype_auto, clang::DeclSpec::TST_error, and clang::DeclSpec::TST_typename_pack_indexing.
| void Sema::ActOnPureSpecifier | ( | Decl * | D, |
| SourceLocation | PureSpecLoc ) |
Definition at line 18915 of file SemaDeclCXX.cpp.
References CheckPureMethod(), Diag(), clang::Decl::getFriendObjectKind(), and clang::Decl::getLocation().
| 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 10940 of file SemaDeclCXX.cpp.
References clang::Scope::AddDecl(), and IdResolver.
Push the parameters of D, which must be a function, into scope.
Definition at line 1493 of file SemaDecl.cpp.
References clang::Scope::AddDecl(), CurContext, clang::Decl::getAsFunction(), clang::DeclContext::getLexicalParent(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), IdResolver, and clang::Scope::setEntity().
| unsigned Sema::ActOnReenterTemplateScope | ( | Decl * | Template, |
| llvm::function_ref< Scope *()> | EnterScope ) |
Definition at line 10862 of file SemaDeclCXX.cpp.
References clang::Scope::AddDecl(), AdjustDeclIfTemplate(), EnterTemplatedContext(), clang::Decl::getDeclContext(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::VarDecl::getDescribedVarTemplate(), and IdResolver.
| ExprResult Sema::ActOnRequiresClause | ( | ExprResult | ConstraintExpr | ) |
Definition at line 4161 of file SemaDeclCXX.cpp.
References DiagnoseUnexpandedParameterPack(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and UPPC_RequiresClause.
Referenced by ActOnFinishTrailingRequiresClause().
| ExprResult Sema::ActOnRequiresExpr | ( | SourceLocation | RequiresKWLoc, |
| RequiresExprBodyDecl * | Body, | ||
| SourceLocation | LParenLoc, | ||
| ArrayRef< ParmVarDecl * > | LocalParameters, | ||
| SourceLocation | RParenLoc, | ||
| ArrayRef< concepts::Requirement * > | Requirements, | ||
| SourceLocation | ClosingBraceLoc ) |
Definition at line 8051 of file SemaExprCXX.cpp.
References Context, clang::RequiresExpr::Create(), DiagnoseUnexpandedParameterPackInRequiresExpr(), and clang::ExprError().
| StmtResult Sema::ActOnReturnStmt | ( | SourceLocation | ReturnLoc, |
| Expr * | RetValExp, | ||
| Scope * | CurScope ) |
Definition at line 3913 of file SemaStmt.cpp.
References BuildReturnStmt(), clang::cast(), CheckJumpOutOfSEHFinallyOrDefer(), clang::SemaBase::Diag(), ExprEvalContexts, clang::sema::FunctionScopeInfo::FirstCoroutineStmtLoc, clang::sema::FunctionScopeInfo::FirstReturnLoc, clang::ActionResult< PtrTy, Compress >::get(), getCurFunction(), getCurScope(), clang::sema::FunctionScopeInfo::getFirstCoroutineStmtKeyword(), clang::sema::FunctionScopeInfo::isCoroutine(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::ReturnArg, and clang::StmtError().
| StmtResult Sema::ActOnSEHExceptBlock | ( | SourceLocation | Loc, |
| Expr * | FilterExpr, | ||
| Stmt * | Block ) |
Definition at line 4555 of file SemaStmt.cpp.
References clang::Block, Context, clang::SEHExceptStmt::Create(), clang::SemaBase::Diag(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isDependentType(), clang::Type::isIntegerType(), and clang::StmtError().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildSEHExceptStmt().
| StmtResult Sema::ActOnSEHLeaveStmt | ( | SourceLocation | Loc, |
| Scope * | CurScope ) |
Definition at line 4582 of file SemaStmt.cpp.
References CheckJumpOutOfSEHFinallyOrDefer(), Context, clang::SemaBase::Diag(), clang::Scope::getParent(), clang::Scope::isSEHTryScope(), and clang::StmtError().
| StmtResult Sema::ActOnSEHTryBlock | ( | bool | IsCXXTry, |
| SourceLocation | TryLoc, | ||
| Stmt * | TryBlock, | ||
| Stmt * | Handler ) |
Definition at line 4517 of file SemaStmt.cpp.
References Context, clang::SEHTryStmt::Create(), CurContext, clang::SemaBase::Diag(), clang::sema::FunctionScopeInfo::FirstCXXOrObjCTryLoc, clang::sema::FunctionScopeInfo::FirstTryType, getCurFunction(), getLangOpts(), clang::DeclContext::getParent(), clang::DeclContext::isFunctionOrMethod(), clang::SourceLocation::isValid(), clang::sema::FunctionScopeInfo::setHasSEHTry(), clang::FunctionDecl::setUsesSEHTry(), and clang::sema::FunctionScopeInfo::TryLocIsCXX.
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildSEHTryStmt().
| concepts::Requirement * Sema::ActOnSimpleRequirement | ( | Expr * | E | ) |
Definition at line 7805 of file SemaExprCXX.cpp.
References BuildExprRequirement().
| 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.
| OpLoc | The location of the "sizeof" keyword. |
| Name | The name of the parameter pack whose size will be determined. |
| NameLoc | The source location of the name of the parameter pack. |
| RParenLoc | The location of the closing parentheses. |
Definition at line 1273 of file SemaTemplateVariadic.cpp.
References clang::Ambiguous, Context, CorrectTypo(), clang::SizeOfPackExpr::Create(), clang::SemaBase::Diag(), DiagnoseAmbiguousLookup(), diagnoseTypo(), clang::ErrorRecovery, clang::ExprError(), clang::Found, clang::FoundOverloaded, clang::FoundUnresolvedValue, clang::LookupResult::getFoundDecl(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getResultKind(), clang::Decl::isParameterPack(), LookupName(), LookupOrdinaryName, MarkAnyDeclReferenced(), clang::NotFound, clang::NotFoundInCurrentInstantiation, and clang::SemaBase::PDiag().
Definition at line 16422 of file SemaDecl.cpp.
References clang::Decl::getAsFunction(), and clang::FunctionDecl::setHasSkippedBody().
Referenced by InstantiateFunctionDefinition().
| ExprResult Sema::ActOnSourceLocExpr | ( | SourceLocIdentKind | Kind, |
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RPLoc ) |
Definition at line 17197 of file SemaExpr.cpp.
References BuildSourceLocExpr(), clang::Column, Context, CurContext, clang::ExprError(), clang::File, clang::FileName, clang::FuncSig, clang::Function, clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), clang::Line, LookupStdSourceLocationImpl(), clang::SourceLocStruct, and StdSourceLocationImplDecl.
| ConceptDecl * Sema::ActOnStartConceptDefinition | ( | Scope * | S, |
| MultiTemplateParamsArg | TemplateParameterLists, | ||
| const IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc ) |
Definition at line 9124 of file SemaTemplate.cpp.
References clang::TemplateParameterList::begin(), Context, clang::ConceptDecl::Create(), CurContext, clang::SemaBase::Diag(), clang::TemplateParameterList::end(), FilterLookupForScope(), forRedeclarationInCurContext(), clang::Decl::getBeginLoc(), clang::NamedDecl::getDeclName(), clang::DeclContext::getRedeclContext(), clang::TemplateDecl::hasAssociatedConstraints(), clang::DeclContext::isFileContext(), LookupName(), LookupOrdinaryName, Previous, PushOnScopeChains(), clang::Decl::setInvalidDecl(), and clang::TemplateParameterList::size().
| 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 4137 of file SemaDeclCXX.cpp.
References PushFunctionScope().
Referenced by InstantiateInClassInitializer().
| void Sema::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.
Definition at line 18861 of file SemaDecl.cpp.
References AdjustDeclIfTemplate(), clang::AS_public, clang::cast(), Context, clang::CXXRecordDecl::Create(), CurContext, FieldCollector, clang::CXXRecordDecl::isInjectedClassName(), clang::SourceLocation::isValid(), PushOnScopeChains(), clang::Decl::setAccess(), clang::CXXRecordDecl::setDescribedClassTemplate(), clang::Decl::setImplicit(), and clang::Template.
| ExprResult Sema::ActOnStartCXXMemberReference | ( | Scope * | S, |
| Expr * | Base, | ||
| SourceLocation | OpLoc, | ||
| tok::TokenKind | OpKind, | ||
| ParsedType & | ObjectType, | ||
| bool & | MayBePseudoDestructor ) |
Definition at line 6856 of file SemaExprCXX.cpp.
References BuildOverloadedArrowExpr(), CheckPlaceholderExpr(), Context, CreateRecoveryExpr(), clang::FixItHint::CreateReplacement(), CurContext, clang::SemaBase::Diag(), clang::ExprError(), clang::Type::getAs(), clang::DeclaratorDecl::getBeginLoc(), clang::CallExpr::getCalleeDecl(), getLangOpts(), clang::FunctionDecl::isFunctionTemplateSpecialization(), isThisOutsideMemberFunctionBody(), clang::OpaquePtr< QualType >::make(), MaybeConvertParenListExprToParenExpr(), noteOperatorArrows(), RequireCompleteType(), and clang::Result.
Referenced by BuildMemberReferenceExpr().
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 10949 of file SemaDeclCXX.cpp.
Definition at line 10928 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), clang::cast(), and PushDeclContext().
| Decl * Sema::ActOnStartExportDecl | ( | Scope * | S, |
| SourceLocation | ExportLoc, | ||
| SourceLocation | LBraceLoc ) |
We have parsed the start of an export declaration, including the '{' (if present).
Definition at line 851 of file SemaModule.cpp.
References Context, clang::ExportDecl::Create(), clang::FixItHint::CreateInsertion(), CurContext, currentModuleIsImplementation(), clang::SemaBase::Diag(), getEnclosingExportDecl(), getLangOpts(), HLSL(), clang::Module::PrivateModuleFragment, PushDeclContext(), clang::Decl::setInvalidDecl(), clang::Decl::setModuleOwnershipKind(), clang::ExportDecl::setRBraceLoc(), and clang::Decl::VisibleWhenImported.
| void Sema::ActOnStartFunctionDeclarationDeclarator | ( | Declarator & | D, |
| unsigned | TemplateParameterDepth ) |
Called before parsing a function declarator belonging to a function declaration.
Definition at line 19592 of file SemaDeclCXX.cpp.
References clang::TemplateParameterList::empty(), clang::Declarator::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::TemplateParameterList::getDepth(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getTemplateParameterLists(), InventedParameterInfos, MatchTemplateParametersToScopeSpecifier(), and clang::TemplateParameterList::size().
| 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
If the declaration is already in global module fragment, we don't need to attach it again.
Definition at line 17203 of file SemaDeclCXX.cpp.
References clang::C, clang::cast(), 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().
| Decl * Sema::ActOnStartNamespaceDef | ( | 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.
Definition at line 11854 of file SemaDeclCXX.cpp.
References ActOnDocumentableDecl(), clang::DeclContext::addDecl(), AddPragmaAttributes(), clang::cast(), Context, clang::NamespaceDecl::Create(), clang::UsingDirectiveDecl::Create(), CurContext, Diag(), DiagnoseNamespaceInlineMismatch(), ForExternalRedeclaration, clang::NamespaceDecl::getAnonymousNamespace(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::Scope::getParent(), clang::LookupResult::getRepresentativeDecl(), getStdNamespace(), clang::NamespaceDecl::isInline(), clang::LookupResult::isSingleResult(), clang::IdentifierInfo::isStr(), clang::SourceLocation::isValid(), LookupOrdinaryName, LookupQualifiedName(), ProcessAPINotes(), ProcessDeclAttributeList(), PushDeclContext(), PushNamespaceVisibilityAttr(), PushOnScopeChains(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), and StdNamespace.
| void Sema::ActOnStartOfCompoundStmt | ( | bool | IsStmtExpr | ) |
Definition at line 416 of file SemaStmt.cpp.
References PushCompoundScope().
| void Sema::ActOnStartOfDeferStmt | ( | SourceLocation | DeferLoc, |
| Scope * | CurScope ) |
Definition at line 3953 of file SemaStmt.cpp.
References CurrentDefer.
| Decl * Sema::ActOnStartOfFunctionDef | ( | Scope * | S, |
| Decl * | D, | ||
| SkipBodyInfo * | SkipBody = nullptr, | ||
| FnBodyKind | BodyKind = FnBodyKind::Other ) |
Definition at line 16131 of file SemaDecl.cpp.
References AbstractReturnType, ActOnDocumentableDecl(), applyFunctionAttributesBeforeParsingBody(), clang::cast(), CheckForFunctionRedefinition(), CheckParmsForFunctionDef(), CheckShadow(), Context, currentModuleIsHeaderUnit(), clang::DeclContext::decls(), Default, Delete, clang::SemaBase::Diag(), clang::Decl::dropAttr(), ExprEvalContexts, clang::External, clang::Type::getAs(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), getCurLexicalContext(), clang::NamedDecl::getFormalLinkage(), getLangOpts(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), InstantiateDefaultCtorDefaultArgs(), inTemplateInstantiation(), clang::isa(), clang::Type::isDependentType(), clang::FunctionTemplateSpecializationInfo::isExplicitInstantiationOrSpecialization(), clang::isGenericLambdaCallOperatorSpecialization(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), clang::isLambdaCallOperator(), clang::FunctionDecl::isLateTemplateParsed(), clang::Decl::isTemplated(), clang::FunctionDecl::isTemplateInstantiation(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::FunctionDecl::isThisDeclarationInstantiatedFromAFriendDefinition(), clang::Type::isVoidType(), maybeAddDeclWithEffects(), clang::FunctionDecl::parameters(), PushDeclContext(), PushExpressionEvaluationContext(), PushExpressionEvaluationContextForFunction(), PushFunctionScope(), PushOnScopeChains(), RebuildLambdaScopeInfo(), RequireCompleteType(), RequireNonAbstractType(), ResolveExceptionSpec(), clang::Decl::setInvalidDecl(), clang::FunctionDecl::setWillHaveBody(), clang::SkipBodyInfo::ShouldSkip, clang::TSK_ExplicitSpecialization, and clang::FunctionDecl::willHaveBody().
| Decl * Sema::ActOnStartOfFunctionDef | ( | Scope * | S, |
| Declarator & | D, | ||
| MultiTemplateParamsArg | TemplateParamLists, | ||
| SkipBodyInfo * | SkipBody = nullptr, | ||
| FnBodyKind | BodyKind = FnBodyKind::Other ) |
Definition at line 15902 of file SemaDecl.cpp.
References clang::SemaOpenMP::ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(), ActOnStartOfFunctionDef(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Definition, getCurFunctionDecl(), clang::Scope::getParent(), HandleDeclarator(), clang::Declarator::isFunctionDeclarator(), LangOpts, OpenMP(), and clang::Declarator::setFunctionDefinitionKind().
Referenced by ActOnStartOfFunctionDef(), and InstantiateFunctionDefinition().
| 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 1420 of file SemaLambda.cpp.
References clang::SemaOpenMP::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(), AddRangeBasedOptnone(), ARM(), clang::TemplateParameterList::asArray(), clang::C, clang::sema::LambdaScopeInfo::CallOperator, clang::LambdaIntroducer::Captures, clang::sema::CapturingScopeInfo::Captures, clang::cast(), CheckCXXDefaultArguments(), CheckShadow(), clang::SemaARM::CheckSMEFunctionDefAttributes(), clang::Class, CompleteLambdaCallOperator(), Context, CUDA(), clang::SemaBase::Diag(), clang::sema::LambdaScopeInfo::ExplicitParams, clang::FTIHasSingleVoidParameter(), clang::SourceRange::getBegin(), clang::DeclSpec::getConstexprSpecifier(), getCurrentLambdaScopeUnsafe(), getCurScope(), clang::Declarator::getDeclSpec(), clang::SourceRange::getEnd(), clang::Declarator::getFunctionTypeInfo(), getGenericLambdaTemplateParameterList(), getImplicitCodeSegOrSectionAttrForFunction(), getLambdaType(), getLangOpts(), clang::Declarator::getNumTypeObjects(), clang::Declarator::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::Declarator::getTrailingRequiresClause(), clang::Declarator::getTypeObject(), handleLambdaNumbering(), clang::Declarator::isFunctionDeclarator(), clang::ValueDecl::isInitCapture(), clang::sema::LambdaScopeInfo::Lambda, LangOpts, clang::Method, NoteTemplateParameterLocation(), OpenMP(), PotentiallyEvaluated, ProcessDeclAttributes(), PushExpressionEvaluationContextForFunction(), PushOnScopeChains(), clang::LambdaIntroducer::Range, clang::SC_None, clang::SC_Static, clang::DeclSpec::SCS_static, clang::FunctionDecl::setConstexprKind(), and clang::SemaCUDA::SetLambdaAttrs().
| StmtResult Sema::ActOnStartOfSwitchStmt | ( | SourceLocation | SwitchLoc, |
| SourceLocation | LParenLoc, | ||
| Stmt * | InitStmt, | ||
| ConditionResult | Cond, | ||
| SourceLocation | RParenLoc ) |
Definition at line 1172 of file SemaStmt.cpp.
References clang::Cond, Context, clang::SwitchStmt::Create(), clang::SemaBase::Diag(), getCurFunction(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isIntegralOrEnumerationType(), clang::Expr::isKnownToHaveBooleanValue(), clang::Expr::isTypeDependent(), setFunctionHasBranchIntoScope(), clang::StmtError(), and clang::sema::FunctionScopeInfo::SwitchStack.
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildSwitchStmtStart().
| 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 1165 of file Sema.cpp.
References clang::LangOptionsBase::CMK_HeaderUnit, and getLangOpts().
Referenced by clang::hlsl::HandleRootSignatureTarget().
| RequiresExprBodyDecl * Sema::ActOnStartRequiresExpr | ( | SourceLocation | RequiresKWLoc, |
| ArrayRef< ParmVarDecl * > | LocalParameters, | ||
| Scope * | BodyScope ) |
Definition at line 7991 of file SemaExprCXX.cpp.
References CheckShadow(), Context, clang::RequiresExprBodyDecl::Create(), CurContext, clang::SemaBase::Diag(), PushDeclContext(), and PushOnScopeChains().
| void Sema::ActOnStartSEHFinallyBlock | ( | ) |
Definition at line 4567 of file SemaStmt.cpp.
References CurrentSEHFinally.
| void Sema::ActOnStartStmtExpr | ( | ) |
Definition at line 16290 of file SemaExpr.cpp.
References ExprEvalContexts, PushExpressionEvaluationContext(), and setFunctionHasBranchProtectedScope().
| TopLevelStmtDecl * Sema::ActOnStartTopLevelStmtDecl | ( | Scope * | S | ) |
Definition at line 20946 of file SemaDecl.cpp.
References Context, clang::TopLevelStmtDecl::Create(), CurContext, New, PushCompoundScope(), PushDeclContext(), and PushFunctionScope().
| void Sema::ActOnStartTrailingRequiresClause | ( | Scope * | S, |
| Declarator & | D ) |
Definition at line 4143 of file SemaDeclCXX.cpp.
References clang::cast(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::isFunctionDeclarator(), and PushOnScopeChains().
| Decl * Sema::ActOnStaticAssertDeclaration | ( | SourceLocation | StaticAssertLoc, |
| Expr * | AssertExpr, | ||
| Expr * | AssertMessageExpr, | ||
| SourceLocation | RParenLoc ) |
Definition at line 17463 of file SemaDeclCXX.cpp.
References BuildStaticAssertDeclaration(), DiagnoseUnexpandedParameterPack(), and UPPC_StaticAssertExpression.
| ExprResult Sema::ActOnStmtExpr | ( | Scope * | S, |
| SourceLocation | LPLoc, | ||
| Stmt * | SubStmt, | ||
| SourceLocation | RPLoc ) |
Definition at line 16304 of file SemaExpr.cpp.
References BuildStmtExpr(), and getTemplateDepth().
| void Sema::ActOnStmtExprError | ( | ) |
Definition at line 16296 of file SemaExpr.cpp.
References DiscardCleanupsInEvaluationContext(), and PopExpressionEvaluationContext().
| ExprResult Sema::ActOnStmtExprResult | ( | ExprResult | E | ) |
Definition at line 16346 of file SemaExpr.cpp.
References DefaultFunctionArrayConversion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAtomicUnqualifiedType(), clang::Stmt::getBeginLoc(), clang::Expr::getType(), clang::InitializedEntity::InitializeStmtExprResult(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), and PerformCopyInitialization().
| 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"). 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 2147 of file SemaExpr.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::Lexer::AdvanceToTokenCharacter(), BuildLiteralOperatorCall(), clang::C23, Context, clang::CPlusPlus, clang::CPlusPlus20, clang::IntegerLiteral::Create(), clang::StringLiteral::Create(), clang::FixItHint::CreateRemoval(), clang::SemaBase::Diag(), ExpandFunctionLocalPredefinedMacros(), clang::ExprError(), clang::CharSourceRange::getCharRange(), clang::StringLiteral::getCodeUnit(), getLangOpts(), clang::StringLiteral::getLength(), getSourceManager(), getUDSuffixLoc(), clang::SourceLocation::isInvalid(), clang::Type::isUnsignedIntegerType(), LOLR_Cooked, LOLR_Error, LOLR_ErrorNoDiagnostic, LOLR_Raw, LOLR_StringTemplatePack, LOLR_Template, LookupLiteralOperator(), LookupOrdinaryName, clang::Ordinary, clang::SemaBase::PDiag(), PP, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), Tok, clang::UTF16, clang::UTF32, clang::UTF8, and clang::Wide.
| bool Sema::ActOnSuperScopeSpecifier | ( | SourceLocation | SuperLoc, |
| SourceLocation | ColonColonLoc, | ||
| CXXScopeSpec & | SS ) |
The parser has parsed a '__super' nested-name-specifier.
| SuperLoc | The location of the '__super' keyword. |
| ColonColonLoc | The location of the '::'. |
| SS | The nested-name-specifier, which will be updated in-place to reflect the parsed nested-name-specifier. |
Definition at line 272 of file SemaCXXScopeSpec.cpp.
References clang::cast(), Context, clang::SemaBase::Diag(), getCurLambda(), getCurScope(), clang::NamedDecl::getName(), clang::CXXRecordDecl::getNumBases(), clang::DeclContext::getParent(), clang::Scope::getParent(), and clang::CXXScopeSpec::MakeMicrosoftSuper().
| DeclResult Sema::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 {'.
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.
| IsTypeSpecifier | true if this is a type-specifier (or trailing-type-specifier) other than one in an alias-declaration. |
| SkipBody | If non-null, will be set to indicate if the caller should skip the definition of this tag and treat it as if it were a declaration. |
Create a new tag decl in C/ObjC. Since the ODR-like semantics for ObjC/C implemented asks for structural equivalence checking, the returned decl here is passed back to the parser, allowing the tag body to be parsed.
Definition at line 17769 of file SemaDecl.cpp.
References AddAlignmentAttributesForRecord(), AddMsStructLayoutForRecord(), AddPragmaAttributes(), AddPushedVisibilityAttribute(), clang::AS_none, clang::C23, clang::cast(), CheckClassTemplate(), CheckEnumRedeclaration(), CheckEnumUnderlyingType(), CheckMemberSpecialization(), CheckRedeclarationInModule(), clang::SkipBodyInfo::CheckSameAsPrevious, CheckTemplateDeclScope(), CompleteMemberSpecialization(), computeDeclContext(), clang::Scope::containedInPrototypeScope(), Context, clang::CPlusPlus, clang::CXXRecordDecl::Create(), clang::EnumDecl::Create(), clang::RecordDecl::Create(), createFriendTagNNSFixIt(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), CurContext, clang::Declaration, clang::Definition, clang::SemaBase::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::Friend, clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getAccess(), clang::QualType::getAtomicUnqualifiedType(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::TypeLoc::getBeginLoc(), getCurrentModule(), clang::Decl::getDeclContext(), clang::DeclContext::getDeclKind(), clang::TagDecl::getDefinition(), getDefinition(), clang::DeclContext::getEnclosingNamespaceContext(), clang::EnumDecl::getIntegerType(), getLangOpts(), clang::Decl::getLocation(), getNonFieldDeclScope(), getNonTagTypeDeclKind(), clang::Decl::getOwningModule(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::DeclContext::getRedeclContext(), getScopeForDeclContext(), getStdAlignValT(), getStdBadAlloc(), getStdNamespace(), getTagInjectionContext(), getTagInjectionScope(), clang::KeywordHelpers::getTagTypeKindForTypeSpec(), clang::KeywordHelpers::getTagTypeKindName(), clang::TemplateParameterList::getTemplateLoc(), clang::TypeSourceInfo::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::getTypePtr(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::Filter::hasNext(), inferGslOwnerPointerAttribute(), inferNullableClassAttribute(), clang::Invalid, clang::isa(), isAcceptableTagRedeclaration(), isAcceptableTagRedeclContext(), clang::EnumDecl::isComplete(), clang::NamedDecl::isCXXClassMember(), isDeclInScope(), clang::Scope::isDeclScope(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFileContext(), clang::EnumDecl::isFixed(), clang::DeclContext::isFunctionOrMethod(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::CXXRecordDecl::isLocalClass(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isRecord(), isRedefinitionAllowedFor(), clang::CXXScopeSpec::isSet(), clang::IdentifierInfo::isStr(), clang::ActionResult< PtrTy, Compress >::isUnset(), clang::SourceLocation::isValid(), LangOpts, LookupName(), LookupQualifiedName(), LookupTagName, clang::Macro, clang::DeclContext::makeDeclVisibleInContext(), makeMergedDefinitionVisible(), MatchTemplateParametersToScopeSpecifier(), mergeDeclAttributes(), New, clang::SkipBodyInfo::New, clang::LookupResult::Filter::next(), notePreviousDefinition(), NotForRedeclaration, clang::Outside, clang::SkipBodyInfo::Previous, Previous, ProcessAPINotes(), ProcessDeclAttributeList(), PushOnScopeChains(), clang::Reference, RequireCompleteDeclContext(), clang::Result, clang::EnumDecl::setEnumKeyRange(), clang::EnumDecl::setIntegerType(), clang::EnumDecl::setIntegerTypeSourceInfo(), SetMemberAccessSpecifier(), clang::EnumDecl::setPromotionType(), clang::SkipBodyInfo::ShouldSkip, clang::TemplateParameterList::size(), StdAlignValT, StdBadAlloc, StdNamespace, clang::T, clang::TSK_ExplicitSpecialization, and UPPC_FixedUnderlyingType.
Referenced by ActOnExplicitInstantiation(), and ActOnTemplatedFriendTag().
ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a tag.
Definition at line 18970 of file SemaDecl.cpp.
References AdjustDeclIfTemplate(), clang::cast(), and PopDeclContext().
| void Sema::ActOnTagFinishDefinition | ( | Scope * | S, |
| Decl * | TagDecl, | ||
| SourceRange | BraceRange ) |
ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration, class, struct, or union).
Definition at line 18902 of file SemaDecl.cpp.
References AdjustDeclIfTemplate(), AlignPackStack, clang::cast(), Consumer, Context, clang::SemaBase::Diag(), FieldCollector, clang::RecordDecl::fields(), clang::Sema::AlignPackInfo::getAlignMode(), clang::SourceRange::getBegin(), getCurLexicalContext(), getCurrentModule(), clang::Sema::AlignPackInfo::IsAlignAttr(), clang::DeclContext::isFileContext(), MarkVTableUsed(), clang::Method, clang::Sema::AlignPackInfo::Packed, and PopDeclContext().
| void Sema::ActOnTagFinishSkippedDefinition | ( | SkippedDefinitionContext | Context | ) |
Definition at line 1398 of file SemaDecl.cpp.
References Context, and CurContext.
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 18836 of file SemaDecl.cpp.
References ActOnDocumentableDecl(), AddPushedVisibilityAttribute(), AdjustDeclIfTemplate(), clang::cast(), and PushDeclContext().
| Sema::SkippedDefinitionContext Sema::ActOnTagStartSkippedDefinition | ( | Scope * | S, |
| Decl * | TD ) |
Invoked when we enter a tag definition that we're skipping.
Definition at line 1384 of file SemaDecl.cpp.
References clang::cast(), CurContext, clang::Result, and clang::Scope::setEntity().
| 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 4080 of file SemaTemplate.cpp.
References CheckTemplateIdType(), Context, CreateParsedType(), clang::FixItHint::CreateReplacement(), clang::Definition, clang::SemaBase::Diag(), clang::OpaquePtr< PtrTy >::get(), clang::NamedDecl::getIdentifier(), clang::KeywordHelpers::getKeywordForTagTypeKind(), clang::TagDecl::getKindName(), clang::Decl::getLocation(), clang::KeywordHelpers::getTagTypeKindForTypeSpec(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), isAcceptableTagRedeclaration(), clang::CXXScopeSpec::isInvalid(), clang::Keyword, clang::TypeLocBuilder::push(), clang::Result, and translateTemplateArguments().
| Decl * Sema::ActOnTemplateDeclarator | ( | Scope * | S, |
| MultiTemplateParamsArg | TemplateParameterLists, | ||
| Declarator & | D ) |
Definition at line 9116 of file SemaTemplate.cpp.
References ActOnDocumentableDecl(), and HandleDeclarator().
| DeclResult Sema::ActOnTemplatedFriendTag | ( | Scope * | S, |
| SourceLocation | FriendLoc, | ||
| unsigned | TagSpec, | ||
| SourceLocation | TagLoc, | ||
| CXXScopeSpec & | SS, | ||
| IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc, | ||
| SourceLocation | EllipsisLoc, | ||
| const ParsedAttributesView & | Attr, | ||
| MultiTemplateParamsArg | TempParamLists ) |
Handle a friend tag declaration where the scope specifier was templated.
Definition at line 17950 of file SemaDeclCXX.cpp.
References ActOnTag(), clang::AS_public, clang::cast(), clang::TypeLoc::castAs(), CheckClassTemplate(), CheckTypenameType(), collectUnexpandedParameterPacks(), Context, clang::FriendDecl::Create(), CurContext, Diag(), clang::Friend, clang::CXXScopeSpec::getBeginLoc(), clang::NamedDecl::getDeclName(), clang::getDepthAndIndex(), clang::KeywordHelpers::getKeywordForTagTypeKind(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::KeywordHelpers::getTagTypeKindForTypeSpec(), clang::KeywordHelpers::getTagTypeKindName(), clang::TypeSourceInfo::getTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::Invalid, clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isNotEmpty(), clang::Keyword, MatchTemplateParametersToScopeSpecifier(), clang::Outside, clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::TemplateParameterList::size(), and clang::T.
| TypeResult Sema::ActOnTemplateIdType | ( | Scope * | S, |
| ElaboratedTypeKeyword | ElaboratedKeyword, | ||
| SourceLocation | ElaboratedKeywordLoc, | ||
| CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| TemplateTy | Template, | ||
| const IdentifierInfo * | TemplateII, | ||
| SourceLocation | TemplateIILoc, | ||
| SourceLocation | LAngleLoc, | ||
| ASTTemplateArgsPtr | TemplateArgs, | ||
| SourceLocation | RAngleLoc, | ||
| bool | IsCtorOrDtorName = false, | ||
| bool | IsClassName = false, | ||
| ImplicitTypenameContext | AllowImplicitTypename = ImplicitTypenameContext::No ) |
Definition at line 4006 of file SemaTemplate.cpp.
References ActOnTypenameType(), CheckTemplateIdType(), computeDeclContext(), Context, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), CreateParsedType(), clang::SemaBase::Diag(), clang::SemaBase::DiagCompat(), clang::OpaquePtr< PtrTy >::get(), clang::CXXScopeSpec::getBeginLoc(), getLangOpts(), clang::CXXScopeSpec::getScopeRep(), clang::QualType::getTypePtr(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), isDependentScopeSpecifier(), clang::CXXScopeSpec::isInvalid(), clang::SourceLocation::isInvalid(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), clang::None, clang::TypeLocBuilder::push(), translateTemplateArguments(), and clang::Yes.
Referenced by ActOnPseudoDestructorExpr().
| TemplateNameKind Sema::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).
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 5027 of file SemaTemplate.cpp.
References computeDeclContext(), Context, clang::CPlusPlus11, clang::FixItHint::CreateRemoval(), clang::SemaBase::Diag(), clang::OpaquePtr< PtrTy >::get(), clang::UnqualifiedId::getBeginLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::DeclarationNameInfo::getName(), GetNameFromUnqualifiedId(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::getSourceRange(), clang::Scope::getTemplateParamParent(), GetTypeFromParser(), clang::UnqualifiedId::Identifier, 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.
| 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 1859 of file SemaTemplate.cpp.
References Context, clang::TemplateParameterList::Create(), clang::SemaBase::Diag(), clang::SourceLocation::isValid(), and warnOnReservedIdentifier().
| ParsedTemplateArgument Sema::ActOnTemplateTemplateArgument | ( | const ParsedTemplateArgument & | Arg | ) |
Invoked when parsing a template argument.
| Arg | the template argument, which may already be invalid. |
If it is followed by ellipsis, this function is called before ActOnPackExpansion.
Definition at line 709 of file SemaTemplateVariadic.cpp.
References diagnoseMissingTemplateArguments(), clang::OpaquePtr< PtrTy >::get(), clang::ParsedTemplateArgument::getAsTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::ParsedTemplateArgument::getNameLoc(), clang::ParsedTemplateArgument::isInvalid(), and clang::T.
| NamedDecl * Sema::ActOnTemplateTemplateParameter | ( | Scope * | S, |
| SourceLocation | TmpLoc, | ||
| TemplateNameKind | Kind, | ||
| bool | Typename, | ||
| TemplateParameterList * | Params, | ||
| SourceLocation | EllipsisLoc, | ||
| IdentifierInfo * | Name, | ||
| SourceLocation | NameLoc, | ||
| unsigned | Depth, | ||
| unsigned | Position, | ||
| SourceLocation | EqualLoc, | ||
| ParsedTemplateArgument | Default ) |
ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e.g.
T in template <template <typename> class T> class array) has been parsed. S is the current scope.
Definition at line 1660 of file SemaTemplate.cpp.
References clang::Scope::AddDecl(), clang::AS_public, CheckDeclCompatibleWithTemplateTemplate(), CheckTemplateParameterList(), Context, clang::TemplateTemplateParmDecl::Create(), Default, clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), getEnclosingLambdaOrBlock(), clang::TemplateParameterList::getLAngleLoc(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateArgumentLoc::getSourceRange(), IdResolver, clang::Invalid, clang::SourceLocation::isInvalid(), clang::TemplateName::isNull(), clang::Scope::isTemplateParamScope(), clang::SourceLocation::isValid(), maybeDiagnoseTemplateParameterShadow(), clang::TemplateParameterList::size(), clang::Template, TPC_Other, TPC_TemplateTemplateParameterPack, translateTemplateArgument(), Typename, and UPPC_DefaultArgument.
| 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 998 of file SemaTemplate.cpp.
References clang::CXXScopeSpec::Adopt(), clang::CPlusPlus17, clang::TypeLoc::getAs(), clang::TypeLoc::getBeginLoc(), getLangOpts(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::SourceLocation::isValid(), clang::OpaquePtr< TemplateName >::make(), clang::Result, clang::T, and clang::ParsedTemplateArgument::Type.
| void Sema::ActOnTranslationUnitScope | ( | Scope * | S | ) |
| bool Sema::ActOnTypeConstraint | ( | const CXXScopeSpec & | SS, |
| TemplateIdAnnotation * | TypeConstraint, | ||
| TemplateTypeParmDecl * | ConstrainedParameter, | ||
| SourceLocation | EllipsisLoc ) |
Definition at line 1155 of file SemaTemplate.cpp.
References BuildTypeConstraint().
| NamedDecl * Sema::ActOnTypedefDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| DeclContext * | DC, | ||
| TypeSourceInfo * | TInfo, | ||
| LookupResult & | Previous ) |
Definition at line 6852 of file SemaDecl.cpp.
References ActOnTypedefNameDecl(), CheckTypedefForVariablyModifiedType(), clang::CPlusPlus, CurContext, clang::SemaBase::Diag(), DiagnoseFunctionSpecifiers(), clang::DeclSpec::getConstexprSpecLoc(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::Declarator::getName(), clang::CXXScopeSpec::getRange(), clang::UnqualifiedId::getSourceRange(), clang::TypeSourceInfo::getType(), clang::DeclSpec::hasConstexprSpecifier(), clang::IK_DeductionGuideName, clang::IK_Identifier, clang::DeclSpec::isInlineSpecified(), clang::Declarator::isRedeclaration(), clang::CXXScopeSpec::isSet(), ParseTypedefDecl(), Previous, ProcessDeclAttributes(), clang::Redeclaration, clang::Declarator::setInvalidType(), clang::Declarator::setRedeclaration(), and clang::UnqualifiedId::StartLocation.
Referenced by HandleDeclarator().
| NamedDecl * Sema::ActOnTypedefNameDecl | ( | Scope * | S, |
| DeclContext * | DC, | ||
| TypedefNameDecl * | D, | ||
| LookupResult & | Previous, | ||
| bool & | Redeclaration ) |
ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name, either using the 'typedef' type specifier or via a C++0x [dcl.typedef]p2 alias-declaration: 'using T = A;'.
Definition at line 6939 of file SemaDecl.cpp.
References clang::Decl::addAttr(), CheckShadow(), Context, FilterLookupForScope(), filterNonConflictingPreviousTypedefDecls(), clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::DeclContext::getRedeclContext(), getShadowedDeclaration(), inferGslPointerAttribute(), clang::Decl::isInvalidDecl(), clang::DeclContext::isTranslationUnit(), MergeTypedefNameDecl(), Previous, and clang::Redeclaration.
Referenced by ActOnAliasDeclaration(), and ActOnTypedefDeclarator().
| TypeResult Sema::ActOnTypeName | ( | Declarator & | D | ) |
Definition at line 6417 of file SemaType.cpp.
References clang::AliasDecl, clang::AliasTemplate, CheckConstrainedAuto(), CheckExtraCXXDefaultArguments(), checkUnusedDeclAttributes(), clang::CPlusPlus, CreateParsedType(), clang::TypeLoc::getContainedAutoTypeLoc(), clang::Declarator::getContext(), clang::Declarator::getIdentifier(), getLangOpts(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), clang::TypeSourceInfo::getTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::Declarator::isInvalidType(), clang::ObjCParameter, and clang::T.
| 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".
| S | The scope in which this typename type occurs. |
| TypenameLoc | the location of the 'typename' keyword |
| SS | the nested-name-specifier following the typename (e.g., 'T::'). |
| II | the identifier we're retrieving (e.g., 'type' in the example). |
| IdLoc | the location of the identifier. |
| IsImplicitTypename | context where T::type refers to a type. |
Definition at line 11086 of file SemaTemplate.cpp.
References CheckTypenameType(), Context, CreateParsedType(), clang::FixItHint::CreateRemoval(), clang::SemaBase::DiagCompat(), clang::Scope::getTemplateParamParent(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXScopeSpec::isInvalid(), clang::SourceLocation::isValid(), clang::None, clang::T, and clang::Typename.
Referenced by ActOnTemplateIdType(), ActOnTypeRequirement(), DiagnoseUnknownTypeName(), and getTypeName().
| TypeResult Sema::ActOnTypenameType | ( | Scope * | S, |
| SourceLocation | TypenameLoc, | ||
| const CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateLoc, | ||
| TemplateTy | TemplateName, | ||
| const 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>".
| S | The scope in which this typename type occurs. |
| TypenameLoc | the location of the 'typename' keyword |
| SS | the nested-name-specifier following the typename (e.g., 'T::'). |
| TemplateLoc | the location of the 'template' keyword, if any. |
| TemplateName | The template name. |
| TemplateII | The identifier used to name the template. |
| TemplateIILoc | The location of the template name. |
| LAngleLoc | The location of the opening angle bracket ('<'). |
| TemplateArgs | The template arguments. |
| RAngleLoc | The location of the closing angle bracket ('>'). |
Definition at line 11111 of file SemaTemplate.cpp.
References CheckTemplateIdType(), computeDeclContext(), Context, clang::CPlusPlus11, CreateParsedType(), clang::FixItHint::CreateRemoval(), clang::SemaBase::Diag(), clang::OpaquePtr< PtrTy >::get(), getLangOpts(), clang::Scope::getTemplateParamParent(), clang::CXXScopeSpec::getWithLocInContext(), clang::SourceLocation::isValid(), clang::None, clang::TemplateSpecializationTypeLoc::set(), clang::T, translateTemplateArguments(), and clang::Typename.
| 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 1037 of file SemaTemplate.cpp.
References clang::Scope::AddDecl(), clang::AS_public, CheckTemplateArgument(), Context, clang::TemplateTypeParmDecl::Create(), clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), getEnclosingLambdaOrBlock(), clang::TypeSourceInfo::getType(), GetTypeFromParser(), IdResolver, clang::Scope::isTemplateParamScope(), clang::SourceLocation::isValid(), maybeDiagnoseTemplateParameterShadow(), Typename, and UPPC_DefaultArgument.
| concepts::Requirement * Sema::ActOnTypeRequirement | ( | SourceLocation | TypenameKWLoc, |
| CXXScopeSpec & | SS, | ||
| SourceLocation | NameLoc, | ||
| const IdentifierInfo * | TypeName, | ||
| TemplateIdAnnotation * | TemplateId ) |
Definition at line 7811 of file SemaExprCXX.cpp.
References ActOnTypenameType(), BuildTypeRequirement(), CheckTypenameType(), Context, clang::TemplateIdAnnotation::getTemplateArgs(), GetTypeFromParser(), clang::CXXScopeSpec::getWithLocInContext(), clang::QualType::isNull(), clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::Name, clang::TemplateIdAnnotation::NumArgs, clang::TemplateIdAnnotation::RAngleLoc, clang::T, clang::TemplateIdAnnotation::Template, clang::TemplateIdAnnotation::TemplateKWLoc, clang::TemplateIdAnnotation::TemplateNameLoc, and clang::Typename.
| ExprResult Sema::ActOnTypeTrait | ( | TypeTrait | Kind, |
| SourceLocation | KWLoc, | ||
| ArrayRef< ParsedType > | Args, | ||
| SourceLocation | RParenLoc ) |
Parsed one of the type trait support pseudo-functions.
Definition at line 1487 of file SemaTypeTraits.cpp.
References BuildTypeTrait(), Context, GetTypeFromParser(), and clang::T.
| 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 4773 of file SemaExpr.cpp.
References CreateUnaryExprOrTypeTraitExpr(), clang::ExprError(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), GetTypeFromParser(), and clang::Result.
Referenced by BuildCXXForRangeStmt().
| ExprResult Sema::ActOnUnaryOp | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| tok::TokenKind | Op, | ||
| Expr * | Input, | ||
| bool | IsAfterAmp = false ) |
Unary Operators. 'Tok' is the token for the operator.
Definition at line 16271 of file SemaExpr.cpp.
References BuildUnaryOp(), and ConvertTokenKindToUnaryOpcode().
Referenced by BuildCXXForRangeStmt(), and BuiltinInvoke().
| 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 3987 of file SemaTemplate.cpp.
References clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsAssumedTemplateName(), clang::OpaquePtr< TemplateName >::make(), resolveAssumedTemplateNameAsType(), clang::TNK_Type_template, and clang::TNK_Undeclared_template.
| ExprResult Sema::ActOnUnevaluatedStringLiteral | ( | ArrayRef< Token > | StringToks | ) |
Definition at line 2068 of file SemaExpr.cpp.
References Context, clang::StringLiteral::Create(), clang::SemaBase::Diag(), ExpandFunctionLocalPredefinedMacros(), clang::ExprError(), getLangOpts(), getUDSuffixLoc(), PP, Tok, and clang::Unevaluated.
| void Sema::ActOnUninitializedDecl | ( | Decl * | dcl | ) |
Definition at line 14368 of file SemaDecl.cpp.
References AbstractVariableType, clang::VarDecl::CallInit, CheckAttributesOnDeducedType(), CheckCompleteVariableDeclaration(), checkNonTrivialCUnion(), Context, clang::CPlusPlus, clang::CPlusPlus17, clang::InitializationKind::CreateDefault(), CreateRecoveryExpr(), clang::VarDecl::DeclarationOnly, DeduceVariableDeclarationType(), clang::DefaultInitializedObject, clang::VarDecl::Definition, clang::SemaBase::Diag(), Diags, ExternalDeclarations, getLangOpts(), clang::Decl::hasAttr(), HLSL(), clang::Init, InitializationSequence, clang::InitializedEntity::InitializeVariable(), clang::isa(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isHLSLResourceRecordArray(), clang::Type::isIncompleteArrayType(), clang::hlsl::isInitializedByPipeline(), clang::Type::isReferenceType(), clang::Type::isUndeducedType(), MaybeCreateExprWithCleanups(), NTCUK_Init, OpenCL(), clang::opencl_constant, clang::opencl_local, RequireCompleteSizedType(), RequireCompleteType(), RequireNonAbstractType(), clang::SC_Extern, clang::SC_PrivateExtern, clang::SC_Static, clang::SD_Static, clang::SD_Thread, setFunctionHasBranchProtectedScope(), clang::VarDecl::TentativeDefinition, and TentativeDefinitions.
Referenced by actOnOMPReductionKindClause(), BuildAnonymousStructOrUnion(), buildCoroutinePromise(), and InstantiateVariableInitializer().
| Decl * Sema::ActOnUsingDeclaration | ( | Scope * | CurScope, |
| AccessSpecifier | AS, | ||
| SourceLocation | UsingLoc, | ||
| SourceLocation | TypenameLoc, | ||
| CXXScopeSpec & | SS, | ||
| UnqualifiedId & | Name, | ||
| SourceLocation | EllipsisLoc, | ||
| const ParsedAttributesView & | AttrList ) |
Definition at line 12596 of file SemaDeclCXX.cpp.
References BuildUsingDeclaration(), clang::DeclarationNameInfo::containsUnexpandedParameterPack(), clang::NestedNameSpecifier::containsUnexpandedParameterPack(), clang::CPlusPlus11, clang::FixItHint::CreateInsertion(), clang::Scope::DeclScope, Diag(), DiagnoseUnexpandedParameterPack(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::UnqualifiedId::getBeginLoc(), clang::DeclarationNameInfo::getEndLoc(), clang::Scope::getFlags(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::DeclarationNameInfo::getName(), GetNameFromUnqualifiedId(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::ParsedAttributesView::hasAttribute(), 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::CXXScopeSpec::isEmpty(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, PushOnScopeChains(), clang::TemplateIdAnnotation::RAngleLoc, clang::UnqualifiedId::TemplateId, and UPPC_UsingDeclaration.
| Decl * Sema::ActOnUsingDirective | ( | Scope * | CurScope, |
| SourceLocation | UsingLoc, | ||
| SourceLocation | NamespcLoc, | ||
| CXXScopeSpec & | SS, | ||
| SourceLocation | IdentLoc, | ||
| IdentifierInfo * | NamespcName, | ||
| const ParsedAttributesView & | AttrList ) |
Definition at line 12500 of file SemaDeclCXX.cpp.
References clang::LookupResult::addDecl(), clang::LookupResult::clear(), Context, clang::UsingDirectiveDecl::Create(), CurContext, Diag(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::DeclContext::Encloses(), clang::LookupResult::getAsSingle(), clang::Scope::getDeclParent(), getOrCreateStdNamespace(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::LookupResult::getRepresentativeDecl(), clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::getWithLocInContext(), clang::NestedNameSpecifier::Global, clang::LookupResult::isAmbiguous(), clang::CXXScopeSpec::isInvalid(), clang::IdentifierInfo::isStr(), IsUsingDirectiveInToplevelContext(), clang::SourceLocation::isValid(), LookupNamespaceName, LookupParsedName(), NS, ProcessAPINotes(), ProcessDeclAttributeList(), PushUsingDirective(), clang::LookupResult::resolveKind(), SourceMgr, and TryNamespaceTypoCorrection().
| Decl * Sema::ActOnUsingEnumDeclaration | ( | Scope * | CurScope, |
| AccessSpecifier | AS, | ||
| SourceLocation | UsingLoc, | ||
| SourceLocation | EnumLoc, | ||
| SourceRange | TyLoc, | ||
| const IdentifierInfo & | II, | ||
| ParsedType | Ty, | ||
| const CXXScopeSpec & | SS ) |
Definition at line 12680 of file SemaDeclCXX.cpp.
References BuildUsingEnumDeclaration(), Context, Diag(), clang::Enum, clang::Type::getAsEnumDecl(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::SourceRange::getEnd(), clang::IdentifierInfo::getName(), GetTypeFromParser(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::CXXScopeSpec::isValid(), and PushOnScopeChains().
| ExprResult Sema::ActOnVAArg | ( | SourceLocation | BuiltinLoc, |
| Expr * | E, | ||
| ParsedType | Ty, | ||
| SourceLocation | RPLoc ) |
Definition at line 16943 of file SemaExpr.cpp.
References BuildVAArgExpr(), and GetTypeFromParser().
| NamedDecl * Sema::ActOnVariableDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| DeclContext * | DC, | ||
| TypeSourceInfo * | TInfo, | ||
| LookupResult & | Previous, | ||
| MultiTemplateParamsArg | TemplateParamLists, | ||
| bool & | AddToScope, | ||
| ArrayRef< BindingDecl * > | Bindings = {} ) |
Definition at line 7740 of file SemaDecl.cpp.
References ActOnDocumentableDecl(), clang::SemaHLSL::ActOnVariableDeclarator(), clang::SemaOpenACC::ActOnVariableDeclarator(), ActOnVarTemplateSpecialization(), clang::Decl::addAttr(), adjustContextForLocalExternDecl(), clang::AutoVar, clang::cast(), CheckConstrainedAuto(), checkDLLAttributeRedeclaration(), CheckMemberSpecialization(), checkNonTrivialCUnion(), CheckShadow(), CheckTemplateDeclScope(), CheckTemplateParameterList(), CheckVariableDeclaration(), CompleteMemberSpecialization(), computeDeclContext(), clang::Consteval, clang::Constexpr, clang::Constinit, Context, copyAttrFromTypedefToDecl(), clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus17, clang::DecompositionDecl::Create(), clang::VarDecl::Create(), clang::VarTemplateDecl::Create(), clang::FixItHint::CreateRemoval(), CUDA(), CurContext, clang::DeclAttrsMatchCUDAMode(), deduceOpenCLAddressSpace(), clang::SemaBase::Diag(), clang::SemaBase::DiagCompat(), DiagnoseFunctionSpecifiers(), DiagPlaceholderVariableDefinition(), emitReadOnlyPlacementAttrWarning(), clang::DeclContext::Equals(), ExtnameUndeclaredIdentifiers, FilterLookupForScope(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::DeclarationName::getAsIdentifierInfo(), clang::Declarator::getAsmLabel(), clang::Decl::getAttr(), clang::Declarator::getBeginLoc(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getConstexprSpecifier(), clang::DeclSpec::getConstexprSpecLoc(), clang::TypeLoc::getContainedAutoTypeLoc(), clang::Type::getContainedDeducedType(), getCurFunctionDecl(), getCurrentMangleNumberContext(), clang::Declarator::getCXXScopeSpec(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), clang::Declarator::getDecompositionDeclarator(), clang::VarDecl::getDescribedVarTemplate(), clang::Scope::getFnParent(), clang::NamedDecl::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::DeclSpec::getInlineSpecLoc(), clang::VarTemplateDecl::getInstantiatedFromMemberTemplate(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::Decl::getLocation(), clang::MangleNumberingContext::getManglingNumber(), clang::DeclSpec::getModulePrivateSpecLoc(), getMSManglingNumber(), clang::DeclarationNameInfo::getName(), clang::Declarator::getName(), GetNameForDeclarator(), clang::LangOptions::getOpenCLVersionString(), clang::DeclContext::getParent(), clang::VarDecl::getPreviousDecl(), clang::CXXScopeSpec::getRange(), clang::TemplateParameterList::getRAngleLoc(), clang::DeclContext::getRedeclContext(), getShadowedDeclaration(), getSourceManager(), clang::TemplateParameterList::getSourceRange(), 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::TemplateParameterList::getTemplateLoc(), clang::TemplateDecl::getTemplateParameters(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasGlobalStorage(), clang::Declarator::hasInitializer(), clang::VarDecl::hasLocalStorage(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), hasParsedAttr(), HLSL(), clang::IK_TemplateId, clang::Invalid, clang::isa(), clang::DeclContext::isClosure(), clang::QualType::isConstQualified(), isDeclExternC(), isDeclInScope(), clang::Declarator::isDecompositionDeclarator(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isEmpty(), clang::VarDecl::isExternC(), clang::VarDecl::isFirstDecl(), clang::Declarator::isFunctionDefinition(), isFunctionDefinitionDiscarded(), clang::DeclContext::isFunctionOrMethod(), clang::Type::isFunctionPointerType(), isIncompleteDeclExternC(), clang::DeclSpec::isInlineSpecified(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::VarDecl::isLocalVarDecl(), isMainVar(), clang::DeclSpec::isModulePrivateSpecified(), clang::CXXScopeSpec::isNotEmpty(), clang::IdentifierInfo::isPlaceholder(), clang::DeclContext::isRecord(), clang::Declarator::isRedeclaration(), clang::CXXScopeSpec::isSet(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isStaticLocal(), clang::Type::isVariableArrayType(), clang::Type::isWebAssemblyTableType(), LangOpts, MatchTemplateParametersToScopeSpecifier(), MaybeSuggestAddingStaticToDecl(), NTCUK_Destruct, ObjC(), OpenACC(), OpenCL(), ParsingInitForAutoVars, Previous, ProcessDeclAttributes(), ProcessPragmaExport(), ProcessPragmaWeak(), RebuildTemplateParamsInCurrentInstantiation(), 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::RedeclarableTemplateDecl::setMemberSpecialization(), clang::NamedDecl::setModulePrivate(), SetNestedNameSpecifier(), clang::VarDecl::setPreviousDeclInSameBlockScope(), clang::Declarator::setRedeclaration(), clang::VarDecl::setStorageClass(), clang::DeclaratorDecl::setTemplateParameterListsInfo(), clang::VarDecl::setTSCSpec(), clang::ValueDecl::setType(), shouldConsiderLinkage(), clang::TemplateParameterList::size(), StorageClassSpecToVarDeclStorageClass(), targetDiag(), clang::UnqualifiedId::TemplateId, TPC_ClassTemplateMember, TPC_Other, tryToFixVariablyModifiedVarType(), clang::DeclSpec::TSCS_thread_local, clang::TSCS_unspecified, and clang::Unspecified.
Referenced by ActOnDecompositionDeclarator(), and HandleDeclarator().
| DeclResult Sema::ActOnVarTemplateSpecialization | ( | Scope * | S, |
| Declarator & | D, | ||
| TypeSourceInfo * | TSI, | ||
| LookupResult & | Previous, | ||
| SourceLocation | TemplateKWLoc, | ||
| TemplateParameterList * | TemplateParams, | ||
| StorageClass | SC, | ||
| bool | IsPartialSpecialization ) |
Definition at line 4332 of file SemaTemplate.cpp.
References clang::Sema::CheckTemplateArgumentInfo::CanonicalConverted, CheckTemplateArgumentList(), CheckTemplatePartialSpecialization(), CheckTemplatePartialSpecializationArgs(), CheckTemplateSpecializationScope(), Context, clang::VarTemplatePartialSpecializationDecl::Create(), clang::VarTemplateSpecializationDecl::Create(), clang::FixItHint::CreateRemoval(), CurContext, clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::NamedDecl::getDeclName(), clang::Declarator::getIdentifierLoc(), clang::VarTemplatePartialSpecializationDecl::getInstantiatedFromMember(), clang::UnqualifiedId::getKind(), clang::Declarator::getName(), clang::VarTemplateSpecializationDecl::getPointOfInstantiation(), clang::VarDecl::getPreviousDecl(), clang::VarTemplateSpecializationDecl::getSpecializationKind(), clang::VarDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::TypeSourceInfo::getType(), clang::TemplateParameterList::hasAssociatedConstraints(), clang::IK_TemplateId, clang::TemplateName::isDependent(), isSameAsPrimaryTemplate(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, makeTemplateArgumentListInfo(), Previous, clang::TemplateIdAnnotation::RAngleLoc, clang::SC_Extern, clang::VarTemplatePartialSpecializationDecl::setMemberSpecialization(), clang::VarTemplateSpecializationDecl::setTemplateArgsAsWritten(), 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().
| StmtResult Sema::ActOnWhileStmt | ( | SourceLocation | WhileLoc, |
| SourceLocation | LParenLoc, | ||
| ConditionResult | Cond, | ||
| SourceLocation | RParenLoc, | ||
| Stmt * | Body ) |
Definition at line 1790 of file SemaStmt.cpp.
References clang::Cond, Context, clang::WhileStmt::Create(), clang::SemaBase::Diag(), Diags, clang::Stmt::getBeginLoc(), getCurCompoundScope(), clang::isa(), clang::sema::CompoundScopeInfo::setHasEmptyLoopBodies(), and clang::StmtError().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildWhileStmt().
| void Sema::AddAlignedAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| Expr * | E, | ||
| bool | IsPackExpansion ) |
AddAlignedAttr - Adds an aligned attribute to a particular declaration.
Definition at line 4572 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), Context, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isValueDependent(), clang::Type::isVectorType(), MaximumAlignment, clang::VarDecl::TLS_None, validateAlignasAppliedType(), and VerifyIntegerConstantExpression().
Referenced by handleAlignedAttr(), and instantiateDependentAlignedAttr().
| void Sema::AddAlignedAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| TypeSourceInfo * | T, | ||
| bool | IsPackExpansion ) |
Definition at line 4662 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), clang::Type::isVectorType(), and validateAlignasAppliedType().
| void Sema::AddAlignmentAttributesForRecord | ( | RecordDecl * | RD | ) |
AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl, to handle '#pragma pack' and '#pragma options align'.
Definition at line 54 of file SemaAttr.cpp.
References clang::Decl::addAttr(), AlignPackIncludeStack, AlignPackStack, Context, clang::Sema::AlignPackInfo::getAlignMode(), getLangOpts(), clang::Sema::AlignPackInfo::getPackNumber(), clang::Sema::AlignPackInfo::IsAlignAttr(), clang::Sema::AlignPackInfo::IsPackSet(), clang::Sema::AlignPackInfo::Mac68k, and clang::Sema::AlignPackInfo::Natural.
Referenced by ActOnClassTemplateSpecialization(), ActOnTag(), and CheckClassTemplate().
| void Sema::AddAlignValueAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| Expr * | E ) |
AddAlignValueAttr - Adds an align_value attribute to a particular declaration.
Definition at line 4441 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), Context, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getSourceRange(), clang::Stmt::getSourceRange(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isValueDependent(), clang::T, and VerifyIntegerConstantExpression().
Referenced by handleAlignValueAttr(), and instantiateDependentAlignValueAttr().
| void Sema::AddAllocAlignAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| Expr * | ParamExpr ) |
AddAllocAlignAttr - Adds an alloc_align attribute to a particular declaration.
Definition at line 1432 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), checkFunctionOrMethodParameterIndex(), Context, clang::SemaBase::Diag(), clang::ParamIdx::getASTIndex(), clang::Stmt::getBeginLoc(), clang::getFunctionOrMethodParamType(), clang::getFunctionOrMethodResultSourceRange(), clang::getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::Type::isAlignValT(), clang::Type::isDependentType(), clang::Type::isIntegralType(), and isValidPointerAttrType().
Referenced by handleAllocAlignAttr(), and instantiateDependentAllocAlignAttr().
| 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 10502 of file SemaOverload.cpp.
References AddOverloadCandidate(), AddTemplateOverloadCandidate(), ArgumentDependentLookup(), clang::AS_none, clang::ADLResult::begin(), clang::OverloadCandidateSet::begin(), clang::cast(), clang::ADLResult::end(), clang::OverloadCandidateSet::end(), clang::ADLResult::erase(), clang::OverloadCandidateSet::getPersistentArgsArray(), clang::OverloadCandidateSet::getRewriteInfo(), clang::DeclAccessPair::make(), clang::Reversed, and clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed().
Referenced by AddOverloadedCallCandidates(), CreateOverloadedUnaryOp(), and LookupOverloadedBinOp().
| void Sema::AddAssumeAlignedAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| Expr * | E, | ||
| Expr * | OE ) |
AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration.
Definition at line 1388 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), Context, clang::SemaBase::Diag(), clang::getFunctionOrMethodResultSourceRange(), clang::getFunctionOrMethodResultType(), clang::Expr::getIntegerConstantExpr(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::Stmt::getSourceRange(), clang::Expr::isIntegerConstantExpr(), isValidPointerAttrType(), clang::Expr::isValueDependent(), and MaximumAlignment.
Referenced by handleAssumeAlignedAttr(), and instantiateDependentAssumeAlignedAttr().
| 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 8851 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), clang::AS_none, clang::OverloadCandidate::BuiltinParamTypes, Context, clang::OverloadCandidate::Conversions, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, getLangOpts(), clang::DeclAccessPair::make(), clang::ovl_fail_bad_conversion, TryContextuallyConvertToBool(), TryCopyInitialization(), Unevaluated, clang::Unevaluated, and clang::OverloadCandidate::Viable.
Referenced by AddBuiltinAssignmentOperatorCandidates().
| 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 10304 of file SemaOverload.cpp.
References clang::QualifiersAndAtomic::addAtomic(), clang::QualifiersAndAtomic::addConst(), CollectVRQualifiers(), Context, getType(), clang::NUM_OVERLOADED_OPERATORS, and clang::OO_None.
Referenced by CreateOverloadedArraySubscriptExpr(), CreateOverloadedUnaryOp(), and LookupOverloadedBinOp().
| void Sema::addClusterDimsAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| Expr * | X, | ||
| Expr * | Y, | ||
| Expr * | Z ) |
Definition at line 5935 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), createClusterDimsAttr(), and X.
Referenced by handleClusterDimsAttr(), and instantiateDependentCUDAClusterDimsAttr().
| void Sema::AddConversionCandidate | ( | CXXConversionDecl * | Conversion, |
| DeclAccessPair | FoundDecl, | ||
| CXXRecordDecl * | ActingContext, | ||
| Expr * | From, | ||
| QualType | ToType, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | AllowObjCConversionOnExplicit, | ||
| bool | AllowExplicit, | ||
| bool | AllowResultConversion = true, | ||
| bool | StrictPackMatch = false ) |
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 8355 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), clang::ImplicitConversionSequence::BadConversion, clang::Type::castAsCXXRecordDecl(), CheckEnableIf(), CheckFunctionConstraints(), clang::Expr::Classify(), Context, clang::OverloadCandidate::Conversions, clang::CPlusPlus14, clang::DeductionFailureInfo::Data, DeduceReturnType(), 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::Stmt::getBeginLoc(), clang::GetConversionRank(), clang::CXXConversionDecl::getConversionType(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Expr::getExprLoc(), clang::ImplicitConversionSequence::getKind(), getLangOpts(), clang::OverloadCandidateSet::getLocation(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::FunctionDecl::getPrimaryTemplate(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKindForType(), clang::OverloadCandidate::HasFinalConversion, clang::ICK_Lvalue_To_Rvalue, clang::ICR_Exact_Match, isAllowableExplicitConversion(), isCompleteType(), IsDerivedFrom(), clang::CXXConversionDecl::isExplicit(), clang::OverloadCandidateSet::isNewCandidate(), isNonViableMultiVersionOverload(), clang::Type::isRValueReferenceType(), clang::ConstraintSatisfaction::IsSatisfied, 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, clang::OverloadCandidate::StrictPackMatch, TryCopyInitialization(), TryObjectArgumentInitialization(), Unevaluated, clang::Unevaluated, clang::OverloadCandidate::Viable, clang::VK_LValue, and clang::VK_PRValue.
Referenced by AddTemplateConversionCandidateImmediately(), collectViableConversionCandidates(), FindConversionForRefInit(), IsUserDefinedConversion(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| void clang::Sema::addDeclWithEffects | ( | const Decl * | D, |
| const FunctionEffectsRef & | FX ) |
Unconditionally add a Decl to DeclsWithEfffectsToVerify.
Definition at line 1497 of file SemaFunctionEffects.cpp.
References AllEffectsToVerify, DeclsWithEffectsToVerify, and clang::FunctionEffect::FE_InferrableOnCallees.
Referenced by maybeAddDeclWithEffects().
| void Sema::addExternalSource | ( | IntrusiveRefCntPtr< ExternalSemaSource > | E | ) |
Registers an external source.
If an external source already exists, creates a multiplex external source and appends to it.
| [in] | E | - A non-null external sema source. |
Definition at line 655 of file Sema.cpp.
References ExternalSource.
Referenced by clang::ASTReader::InitializeSema().
| void Sema::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.
Definition at line 7675 of file SemaOverload.cpp.
References AddMethodCandidate(), AddMethodTemplateCandidate(), AddOverloadCandidate(), AddTemplateOverloadCandidate(), clang::UnresolvedSetImpl::begin(), clang::cast(), clang::Expr::Classify(), Context, clang::UnresolvedSetImpl::end(), clang::Decl::getDeclContext(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Expr::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::isa(), clang::QualType::isNull(), clang::Type::isPointerType(), and clang::Expr::Classification::makeSimpleLValue().
| 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 10764 of file SemaDeclCXX.cpp.
References Context, clang::CPlusPlus11, clang::CPlusPlus20, DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitEqualityComparison(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), findImplicitlyDeclaredEqualityComparisons(), getASTContext(), getLangOpts(), clang::CXXRecordDecl::hasInheritedAssignment(), clang::CXXRecordDecl::hasInheritedConstructor(), clang::CXXRecordDecl::hasUserDeclaredMoveAssignment(), clang::CXXRecordDecl::hasUserDeclaredMoveConstructor(), inTemplateInstantiation(), clang::TagDecl::isDependentType(), clang::CXXRecordDecl::isDynamicClass(), 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(), and clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor().
Referenced by ActOnFields().
| 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 1321 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), MSFunctionNoBuiltins, and V.
Referenced by ActOnFunctionDeclarator().
| void Sema::addImplicitTypedef | ( | StringRef | Name, |
| QualType | T ) |
Definition at line 365 of file Sema.cpp.
References Context, IdResolver, PushOnScopeChains(), clang::T, and TUScope.
Referenced by Initialize().
| void Sema::addInitCapture | ( | sema::LambdaScopeInfo * | LSI, |
| VarDecl * | Var, | ||
| bool | ByRef ) |
Add an init-capture to a lambda scope.
Definition at line 897 of file SemaLambda.cpp.
References clang::sema::CapturingScopeInfo::addCapture(), clang::Decl::getLocation(), clang::ValueDecl::getType(), and clang::VarDecl::isInitCapture().
Referenced by ActOnLambdaExpressionAfterIntroducer().
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 13826 of file SemaDecl.cpp.
References AbstractVariableType, ActOnFinishFullExpr(), clang::SemaOpenACC::ActOnVariableInit(), clang::C99, clang::VarDecl::CallInit, CheckAttributesOnDeducedType(), CheckCompleteVariableDeclaration(), CheckForConstantInitializer(), checkNonTrivialCUnionInInitializer(), clang::SemaObjC::checkRetainCycles(), checkUnsafeAssigns(), checkVarDeclRedefinition(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::InitializationKind::CreateForInit(), clang::FixItHint::CreateInsertion(), CreateRecoveryExpr(), currentModuleIsHeaderUnit(), DeclsToCheckForDeferredDiags, DeduceVariableDeclarationType(), clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), Diags, clang::DirectInit, ExprEvalContexts, clang::External, forceUnknownAnyToType(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::DeclaratorDecl::getBeginLoc(), clang::VarDecl::getCanonicalDecl(), getCurFunction(), clang::NamedDecl::getDeclName(), clang::VarDecl::getDefinition(), clang::Expr::getExprLoc(), clang::NamedDecl::getFormalLinkage(), clang::VarDecl::getInit(), clang::VarDecl::getInstantiatedFromStaticDataMember(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::QualType::getObjCLifetime(), clang::VarDecl::getStorageClass(), clang::VarDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasInit(), clang::VarDecl::hasLocalStorage(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), HLSL(), clang::Expr::IgnoreParens(), clang::Init, InitializationSequence, clang::InitializedEntity::InitializeVariable(), clang::isa(), clang::Type::isAggregateType(), clang::VarDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::Type::isDependentType(), clang::VarDecl::isExternC(), clang::VarDecl::isFileVarDecl(), clang::Type::isFloatingType(), clang::VarDecl::isInline(), clang::Type::isIntegralOrEnumerationType(), clang::Decl::isInvalidDecl(), clang::Type::isLiteralType(), clang::VarDecl::isLocalVarDecl(), 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::QualType::isVolatileQualified(), LangOpts, clang::VarDecl::ListInit, clang::Method, ObjC(), clang::Qualifiers::OCL_Strong, OpenACC(), 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(), and UPPC_Initializer.
Referenced by actOnOMPReductionKindClause(), buildCaptureDecl(), buildCoroutineParameterMoves(), BuildCXXForRangeStmt(), checkOpenMPLoop(), FinishForRangeVarDecl(), InstantiateVariableInitializer(), and precomputeExpr().
| 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 17207 of file SemaDecl.cpp.
References clang::Decl::addAttr(), AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), clang::C, clang::cast(), Context, clang::CPlusPlus, CUDA(), clang::EST_None, clang::LangOptionsBase::FPE_Ignore, 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::ValueDecl::getType(), clang::Decl::hasAttr(), inferLifetimeBoundAttribute(), inferLifetimeCaptureByAttribute(), clang::isa(), clang::FunctionDecl::isExternC(), clang::Decl::isInvalidDecl(), clang::Type::isObjCObjectPointerType(), clang::IdentifierInfo::isStr(), clang::DeclContext::isTranslationUnit(), LazyProcessLifetimeCaptureByParams(), clang::Builtin::Info::NonOptimizing, clang::Builtin::Info::Optimizing, clang::ValueDecl::setType(), and clang::T.
Referenced by ActOnFunctionDeclarator(), CreateBuiltin(), and ImplicitlyDefineFunction().
| 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 17138 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().
| 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 5853 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and CreateLaunchBoundsAttr().
Referenced by handleLaunchBoundsAttr(), and instantiateDependentCUDALaunchBoundsAttr().
| void Sema::addLifetimeBoundToImplicitThis | ( | CXXMethodDecl * | MD | ) |
Definition at line 14775 of file SemaDecl.cpp.
References Context, clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::lifetimes::implicitObjectParamIsLifetimeBound(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushFullCopy(), clang::AttributedTypeLoc::setAttr(), clang::ValueDecl::setType(), and clang::DeclaratorDecl::setTypeSourceInfo().
| 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 8803 of file SemaOverload.cpp.
References AddMethodCandidate(), clang::LookupResult::begin(), Context, clang::LookupResult::end(), clang::Type::getAsCXXRecordDecl(), clang::OverloadCandidateSet::getRewriteInfo(), isCompleteType(), clang::Type::isRecordType(), LookupOrdinaryName, LookupQualifiedName(), clang::Reversed, clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed(), and clang::LookupResult::suppressAccessDiagnostics().
Referenced by CreateOverloadedArraySubscriptExpr(), CreateOverloadedUnaryOp(), and LookupOverloadedBinOp().
| 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 = {}, | ||
| OverloadCandidateParamOrder | PO = {}, | ||
| bool | StrictPackMatch = false ) |
AddMethodCandidate - Adds the given C++ member function to the set of candidate functions, using the given function call arguments and the object argument (Object).
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 7769 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), CheckEnableIf(), CheckFunctionConstraints(), clang::OverloadCandidate::Conversions, clang::OverloadCandidateSet::CSK_AddressOfOverloadSet, clang::CUDA, CUDA(), clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, getCurFunctionDecl(), clang::OverloadCandidateSet::getKind(), getLangOpts(), clang::OverloadCandidateSet::getLocation(), clang::FunctionProtoType::getParamType(), clang::OverloadCandidateSet::getRewriteInfo(), clang::OverloadCandidateSet::OperatorRewriteInfo::getRewriteKind(), clang::OverloadCandidate::IgnoreObjectArgument, int, clang::isa(), clang::OverloadCandidateSet::isNewCandidate(), isNonViableMultiVersionOverload(), clang::QualType::isNull(), clang::ConstraintSatisfaction::IsSatisfied, clang::FunctionProtoType::isVariadic(), clang::Method, 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::OverloadCandidate::StrictPackMatch, clang::OverloadCandidate::TookAddressOfOverload, clang::TooManyArguments, TryCopyInitialization(), TryObjectArgumentInitialization(), Unevaluated, clang::Unevaluated, and clang::OverloadCandidate::Viable.
| 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 7743 of file SemaOverload.cpp.
References AddMethodCandidate(), AddMethodTemplateCandidate(), clang::cast(), clang::DeclAccessPair::getDecl(), clang::Decl::getDeclContext(), and clang::isa().
Referenced by AddFunctionCandidates(), AddMemberOperatorCandidates(), AddMethodCandidate(), AddMethodTemplateCandidateImmediately(), AddOverloadCandidate(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildOverloadedArrowExpr(), LookupSpecialMember(), and LookupSpecialMemberFromXValue().
| void Sema::AddMethodTemplateCandidate | ( | FunctionTemplateDecl * | MethodTmpl, |
| DeclAccessPair | FoundDecl, | ||
| CXXRecordDecl * | ActingContext, | ||
| TemplateArgumentListInfo * | ExplicitTemplateArgs, | ||
| QualType | ObjectType, | ||
| Expr::Classification | ObjectClassification, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | SuppressUserConversions = false, | ||
| bool | PartialOverloading = false, | ||
| OverloadCandidateParamOrder | PO = {} ) |
Add a C++ member function template as a candidate to the candidate set, using template argument deduction to produce an appropriate member function template specialization.
Definition at line 8035 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::AddDeferredMethodTemplateCandidate(), AddMethodTemplateCandidateImmediately(), getLangOpts(), clang::OverloadCandidateSet::isNewCandidate(), and clang::OverloadCandidateSet::shouldDeferTemplateArgumentDeduction().
Referenced by AddFunctionCandidates(), AddMethodCandidate(), BuildCallToMemberFunction(), LookupSpecialMember(), and LookupSpecialMemberFromXValue().
| void Sema::AddModeAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| const IdentifierInfo * | Name, | ||
| bool | InInstantiation = false ) |
AddModeAttr - Adds a mode attribute to a particular declaration.
Definition at line 4867 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), Context, clang::SemaBase::Diag(), clang::Generic, clang::Type::getAs(), getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeCommonInfo::getRange(), clang::isa(), clang::Type::isBitIntType(), clang::Type::isComplexType(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Type::isFloatingType(), clang::Type::isIntegralOrEnumerationType(), clang::QualType::isNull(), clang::Type::isSignedIntegerType(), clang::NoFloat, normalizeName(), and parseModeAttrArg().
Referenced by handleModeAttr(), and instantiateDependentModeAttr().
| void Sema::AddMsStructLayoutForRecord | ( | RecordDecl * | RD | ) |
AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
Definition at line 90 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, getLangOpts(), MSStructPragmaOn, and VtorDispStack.
Referenced by ActOnClassTemplateSpecialization(), ActOnTag(), and CheckClassTemplate().
| void Sema::addNoClusterAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI ) |
Add a no_cluster attribute to a particular declaration.
Definition at line 5941 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and Context.
Referenced by handleNoClusterAttr().
| void Sema::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.
Definition at line 8757 of file SemaOverload.cpp.
References AddOverloadCandidate(), AddTemplateOverloadCandidate(), clang::UnresolvedSetImpl::begin(), clang::cast(), clang::UnresolvedSetImpl::end(), clang::OverloadCandidateSet::getPersistentArgsArray(), clang::OverloadCandidateSet::getRewriteInfo(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::NamedDecl::getUnderlyingDecl(), clang::isa(), clang::OverloadCandidateSet::OperatorRewriteInfo::isAcceptableCandidate(), clang::Reversed, and clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed().
Referenced by BuildLiteralOperatorCall(), CreateOverloadedUnaryOp(), and LookupOverloadedBinOp().
| 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 1307 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, and clang::Decl::hasAttr().
Referenced by AddRangeBasedOptnone(), and ModifyFnAttributesMSPragmaOptimize().
| void Sema::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 = {}, | ||
| OverloadCandidateParamOrder | PO = {}, | ||
| bool | AggregateCandidateDeduction = false, | ||
| bool | StrictPackMatch = 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.
| PartialOverloading | true 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.
Don't remove inline functions with internal linkage from the overload set if they are declared in a GMF, in violation of C++ [basic.link]p17. However:
Definition at line 7126 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), AddMethodCandidate(), clang::C, CheckEnableIf(), CheckFunctionConstraints(), clang::Constructor, Context, clang::OverloadCandidate::Conversions, clang::OverloadCandidateSet::CSK_Operator, CUDA(), clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, clang::Function, clang::FunctionType::ExtParameterInfo::getABI(), getASTContext(), getCurFunctionDecl(), clang::DeclAccessPair::getDecl(), clang::OverloadCandidateSet::getDestAS(), clang::FunctionProtoType::getExtParameterInfo(), clang::NamedDecl::getFormalLinkage(), clang::ExplicitSpecifier::getFromDecl(), clang::OverloadCandidateSet::getKind(), getLangOpts(), clang::OverloadCandidateSet::getLocation(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::OverloadCandidateSet::getRewriteInfo(), clang::OverloadCandidateSet::OperatorRewriteInfo::getRewriteKind(), getType(), clang::HLSLInOut, clang::HLSLOut, clang::Internal, clang::isa(), IsAcceptableNonMemberOperatorCandidate(), clang::Qualifiers::isAddressSpaceSupersetOf(), clang::OverloadCandidate::IsADLCandidate, IsDerivedFrom(), clang::Decl::isImplicit(), clang::OverloadCandidateSet::isNewCandidate(), isNonViableMultiVersionOverload(), clang::ConstraintSatisfaction::IsSatisfied, clang::FunctionProtoType::isVariadic(), clang::Expr::Classification::makeSimpleLValue(), clang::Method, 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, clang::Reversed, clang::OverloadCandidate::RewriteKind, clang::shouldEnforceArgLimit(), clang::OverloadCandidate::StrictPackMatch, clang::TooManyArguments, TryCopyInitialization(), clang::TSK_ImplicitInstantiation, Unevaluated, clang::Unevaluated, and clang::OverloadCandidate::Viable.
Referenced by AddArgumentDependentLookupCandidates(), AddFunctionCandidates(), AddNonMemberOperatorCandidates(), AddOverloadedCallCandidate(), BuildCallToMemberFunction(), ComputeSelectedDestructor(), DeduceTemplateSpecializationFromInitializer(), DiagnoseEmptyLookup(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), LookupSpecialMember(), LookupSpecialMemberFromXValue(), resolveAllocationOverloadInterior(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), TryTypoCorrectionForCall(), and TryUserDefinedConversion().
| 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 14363 of file SemaOverload.cpp.
References AddOverloadedCallCandidate(), clang::LookupResult::begin(), and clang::LookupResult::end().
| void Sema::AddOverloadedCallCandidates | ( | UnresolvedLookupExpr * | ULE, |
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| bool | PartialOverloading = false ) |
Add the overload candidates named by callee and/or found by argument dependent lookup to the given overload set.
Definition at line 14309 of file SemaOverload.cpp.
References AddArgumentDependentLookupCandidates(), AddOverloadedCallCandidate(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::Expr::getExprLoc(), clang::OverloadExpr::getName(), clang::OverloadExpr::hasExplicitTemplateArgs(), clang::isa(), and clang::UnresolvedLookupExpr::requiresADL().
Referenced by buildOverloadedCallSet(), DiagnoseEmptyLookup(), and DiagnoseTwoPhaseLookup().
| bool Sema::AddOverriddenMethods | ( | CXXRecordDecl * | DC, |
| CXXMethodDecl * | MD ) |
AddOverriddenMethods - See if a method overrides any in the base classes, and if so, check that it's a valid override and remember it.
Definition at line 9219 of file SemaDecl.cpp.
References clang::CXXMethodDecl::addOverriddenMethod(), CheckExplicitObjectOverride(), CheckIfOverriddenFunctionIsMarkedFinal(), CheckOverridingFunctionAttributes(), CheckOverridingFunctionExceptionSpec(), CheckOverridingFunctionReturnType(), Context, clang::DeclarationName::CXXDestructorName, clang::NamedDecl::getDeclName(), clang::DeclarationName::getNameKind(), IsOverride(), clang::CXXMethodDecl::isVirtual(), clang::DeclContext::lookup(), and clang::CXXRecordDecl::lookupInBases().
Referenced by CheckFunctionDeclaration().
Adds the attributes that have been specified using the '#pragma clang attribute push' directives to the given declaration.
Definition at line 1193 of file SemaAttr.cpp.
References clang::ParsedAttributesView::addAtEnd(), PragmaAttributeCurrentTargetDecl, PragmaAttributeStack, and ProcessDeclAttributeList().
Referenced by ActOnAliasDeclaration(), ActOnEnumConstant(), ActOnStartNamespaceDef(), ActOnTag(), and ProcessDeclAttributes().
| void Sema::AddPushedVisibilityAttribute | ( | Decl * | RD | ) |
AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute.
Definition at line 1393 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().
| 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 1277 of file SemaAttr.cpp.
References AddOptnoneAttributeIfNoConflicts(), and OptimizeOffPragmaLocation.
Referenced by ActOnFunctionDeclarator(), and ActOnStartOfLambdaDefinition().
| 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 1284 of file SemaAttr.cpp.
References clang::Decl::addAttr(), Context, FunctionToSectionMap, clang::NamedDecl::getIdentifier(), clang::NamedDecl::getName(), and clang::Decl::hasAttr().
Referenced by ActOnFunctionDeclarator().
| 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 8632 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::addCandidate(), CheckEnableIf(), CheckFunctionConstraints(), Context, clang::OverloadCandidate::Conversions, clang::DeductionFailureInfo::Data, clang::OverloadCandidate::DeductionFailure, clang::OverloadCandidate::ExplicitCallArguments, clang::OverloadCandidate::FailureKind, clang::OverloadCandidate::FoundDecl, clang::OverloadCandidate::Function, getLangOpts(), clang::OverloadCandidateSet::getLocation(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionProtoType::getParamType(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::ValueDecl::getType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), 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(), Unevaluated, clang::Unevaluated, and clang::OverloadCandidate::Viable.
Referenced by BuildCallToObjectOfClassType().
| void Sema::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]).
Definition at line 8603 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::AddDeferredConversionTemplateCandidate(), AddTemplateConversionCandidateImmediately(), clang::OverloadCandidateSet::CSK_InitByConstructor, clang::OverloadCandidateSet::CSK_InitByUserDefinedConversion, clang::OverloadCandidateSet::DisableResolutionByPerfectCandidate(), FunctionTemplate, clang::OverloadCandidateSet::getKind(), getLangOpts(), clang::isa(), clang::OverloadCandidateSet::isNewCandidate(), and clang::OverloadCandidateSet::shouldDeferTemplateArgumentDeduction().
Referenced by collectViableConversionCandidates(), FindConversionForRefInit(), IsUserDefinedConversion(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| 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 8164 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::AddDeferredTemplateCandidate(), AddTemplateOverloadCandidateImmediately(), clang::OverloadCandidateSet::DisableResolutionByPerfectCandidate(), FunctionTemplate, getLangOpts(), hasDependentExplicit(), clang::isa(), clang::OverloadCandidateSet::isNewCandidate(), and clang::OverloadCandidateSet::shouldDeferTemplateArgumentDeduction().
Referenced by AddOverloadedCallCandidate(), DeduceTemplateSpecializationFromInitializer(), DiagnoseEmptyLookup(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), LookupSpecialMember(), LookupSpecialMemberFromXValue(), resolveAllocationOverloadInterior(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| void Sema::AddTemplateParametersToLambdaCallOperator | ( | CXXMethodDecl * | CallOperator, |
| CXXRecordDecl * | Class, | ||
| TemplateParameterList * | TemplateParams ) |
Definition at line 1019 of file SemaLambda.cpp.
References clang::AS_public, clang::Class, Context, clang::FunctionTemplateDecl::Create(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Decl::setAccess(), and clang::FunctionDecl::setDescribedFunctionTemplate().
Referenced by ActOnLambdaClosureParameters().
| QualType Sema::adjustCCAndNoReturn | ( | QualType | ArgFunctionType, |
| QualType | FunctionType, | ||
| bool | AdjustExceptionSpec = false ) |
Adjust the type ArgFunctionType to match the calling convention, noreturn, and optionally the exception specification of FunctionType.
Deduction often wants to ignore these properties when matching function types.
Definition at line 4737 of file SemaTemplateDeduction.cpp.
References clang::Type::castAs(), Context, clang::FunctionProtoType::getExtProtoInfo(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::getReturnType(), clang::FunctionProtoType::hasExceptionSpec(), and clang::QualType::isNull().
Referenced by ActOnExplicitInstantiation(), CheckMemberSpecialization(), DeduceTemplateArguments(), and FindAllocationFunctions().
|
static |
Adjust the DeclContext for a function or variable that might be a function-local external declaration.
Definition at line 7485 of file SemaDecl.cpp.
References clang::DeclContext::getParent(), clang::isa(), clang::DeclContext::isDependentContext(), clang::DeclContext::isFileContext(), and clang::DeclContext::isFunctionOrMethod().
Referenced by ActOnFriendFunctionDecl(), ActOnFunctionDeclarator(), and ActOnVariableDeclarator().
| TemplateDecl * Sema::AdjustDeclIfTemplate | ( | Decl *& | Decl | ) |
AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference the templated declaration and return a pointer to the template declaration.
Otherwise, do nothing to D and return null.
Definition at line 928 of file SemaTemplate.cpp.
Referenced by ActOnBaseSpecifier(), ActOnBaseSpecifiers(), ActOnFinishCXXMemberSpecification(), ActOnFinishDelayedCXXMethodDeclaration(), ActOnMemInitializers(), ActOnReenterTemplateScope(), ActOnStartCXXMemberDeclarations(), ActOnStartDelayedMemberDeclarations(), ActOnTagDefinitionError(), ActOnTagFinishDefinition(), ActOnTagStartDefinition(), BuildMemInitializer(), and SetDeclDeleted().
| 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 14634 of file SemaDeclCXX.cpp.
References Context, clang::CPlusPlus11, clang::Destructor, clang::EST_Unevaluated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, getLangOpts(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, and clang::FunctionProtoType::ExceptionSpecInfo::Type.
Referenced by CreateNewFunctionDecl().
| void Sema::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.
This handles method types formed from function type typedefs and typename template arguments.
Definition at line 8252 of file SemaType.cpp.
References clang::cast(), clang::CC_X86StdCall, ConstructorDestructor, Context, clang::SemaBase::Diag(), clang::FunctionType::getCallConv(), clang::FunctionType::getExtInfo(), clang::FunctionType::getNameForCallConv(), hasExplicitCallingConv(), clang::isa(), clang::T, and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by ActOnFunctionDeclarator(), BuildMemberPointerType(), and DeduceTemplateArgumentsByTypeMatch().
|
inline |
Definition at line 1423 of file Sema.h.
Referenced by instantiateDependentAMDGPUFlatWorkGroupSizeAttr(), instantiateDependentAMDGPUMaxNumWorkGroupsAttr(), instantiateDependentAMDGPUWavesPerEUAttr(), and ProcessDeclAttribute().
Definition at line 7755 of file SemaExpr.cpp.
References clang::AltiVecBool, clang::AltiVecPixel, clang::AltiVecVector, clang::Type::castAs(), clang::VectorType::getVectorKind(), and clang::Type::isVectorType().
Referenced by CheckAssignmentConstraints(), CheckVectorOperands(), and IsVectorConversion().
| void Sema::ApplyAPINotesType | ( | Decl * | D, |
| StringRef | TypeString ) |
Apply the 'Type:' annotation to the specified declaration.
Definition at line 387 of file SemaAPINotes.cpp.
References clang::SemaObjC::AdjustParameterTypeForObjCAutoRefCount(), checkAPINotesReplacementType(), Context, clang::Decl::getLocation(), GetTypeFromParser(), clang::isa(), ObjC(), and ParseTypeFromStringCallback.
Referenced by applyAPINotesType().
| void Sema::applyFunctionAttributesBeforeParsingBody | ( | Decl * | FD | ) |
Definition at line 16352 of file SemaDecl.cpp.
References CurFPFeatures, FpPragmaStack, clang::Decl::hasAttr(), clang::Decl::isInvalidDecl(), LangOpts, and clang::FPOptionsOverride::setDisallowOptimizations().
Referenced by ActOnStartOfFunctionDef().
| void Sema::ApplyNullability | ( | Decl * | D, |
| NullabilityKind | Nullability ) |
Apply the 'Nullability:' annotation to the specified declaration.
Definition at line 419 of file SemaAPINotes.cpp.
References CheckImplicitNullabilityTypeSpecifier(), Context, clang::Function, clang::FunctionType::getExtInfo(), clang::Decl::getLocation(), clang::Value::getType(), clang::isa(), isIndirectPointerType(), clang::ObjCPropertyAttribute::kind_null_resettable, clang::Method, clang::Decl::OBJC_TQ_CSNullability, and clang::Property.
Referenced by applyNullability().
| bool Sema::AreConstraintExpressionsEqual | ( | const NamedDecl * | Old, |
| const Expr * | OldConstr, | ||
| const TemplateCompareNewDeclInfo & | New, | ||
| const Expr * | NewConstr ) |
Definition at line 1573 of file SemaConcept.cpp.
References Context, clang::Decl::getLexicalDeclContext(), New, clang::Stmt::Profile(), and SubstituteConstraintExpressionWithoutSatisfaction().
Referenced by IsOverloadOrOverrideImpl(), MatchTemplateParameterKind(), and TemplateParameterListsAreEqual().
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 7778 of file SemaExpr.cpp.
References areVectorTypesSameSize(), clang::Type::isExtVectorType(), clang::Type::isScalarType(), and clang::Type::isVectorType().
Referenced by CheckExtVectorCast(), CheckVectorCast(), and isLaxVectorConversion().
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 7725 of file SemaExpr.cpp.
References clang::Type::getAs(), clang::ConstantMatrixType::getNumColumns(), clang::ConstantMatrixType::getNumRows(), and clang::Type::isMatrixType().
Referenced by CheckMatrixCast().
| bool Sema::areMultiversionVariantFunctionsCompatible | ( | const FunctionDecl * | OldFD, |
| const FunctionDecl * | NewFD, | ||
| const PartialDiagnostic & | NoProtoDiagID, | ||
| const PartialDiagnosticAt & | NoteCausedDiagIDAt, | ||
| const PartialDiagnosticAt & | NoSupportDiagIDAt, | ||
| const PartialDiagnosticAt & | DiffDiagIDAt, | ||
| bool | TemplatesSupported, | ||
| bool | ConstexprSupported, | ||
| bool | CLinkageMayDiffer ) |
Checks if the variant/multiversion functions are compatible.
Definition at line 11488 of file SemaDecl.cpp.
References clang::cast(), CheckEquivalentExceptionSpec(), Context, clang::SemaBase::Diag(), clang::FunctionProtoType::getAArch64SMEAttributes(), clang::Type::getAs(), clang::FunctionType::ExtInfo::getCC(), clang::FunctionDecl::getConstexprKind(), clang::PartialDiagnostic::getDiagID(), clang::NamedDecl::getFormalLinkage(), clang::Decl::getLocation(), clang::FunctionDecl::getTemplatedKind(), clang::ValueDecl::getType(), clang::isa(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::FunctionDecl::isExternC(), clang::FunctionDecl::isInlineSpecified(), clang::Type::isUndeducedType(), clang::FunctionType::SME_PStateSMCompatibleMask, clang::FunctionType::SME_PStateSMEnabledMask, and clang::FunctionDecl::TK_FunctionTemplate.
Referenced by CheckMultiVersionAdditionalRules().
Definition at line 7736 of file SemaExpr.cpp.
References breakDownVectorType(), Context, and clang::Type::isVectorType().
Referenced by areLaxCompatibleVectorTypes().
| void Sema::ArgumentDependentLookup | ( | DeclarationName | Name, |
| SourceLocation | Loc, | ||
| ArrayRef< Expr * > | Args, | ||
| ADLResult & | Functions ) |
Definition at line 3869 of file SemaLookup.cpp.
References clang::cast(), FindAssociatedClassesAndNamespaces(), clang::Decl::getFriendObjectKind(), clang::Decl::getIdentifierNamespace(), clang::Decl::getLexicalDeclContext(), clang::NamedDecl::getMostRecentDecl(), clang::Decl::getOwningModule(), clang::Decl::getPreviousDecl(), clang::Module::getTopLevelModule(), clang::Decl::IDNS_Ordinary, clang::isa(), clang::Module::isImplicitGlobalModule(), clang::Decl::isInAnotherModuleUnit(), clang::Decl::isInExportDeclContext(), clang::Module::isNamedModule(), clang::Module::isPrivateModule(), isReachable(), isVisible(), NS, clang::Result, and Visible.
Referenced by AddArgumentDependentLookupCandidates().
|
inline |
Definition at line 1428 of file Sema.h.
Referenced by ActOnStartOfLambdaDefinition(), CheckAssignmentConstraints(), CheckFunctionDeclaration(), CheckImplicitConversion(), checkTypeSupport(), CheckVariableDeclarationType(), CheckVectorElementsTraitOperandType(), CompareStandardConversionSequences(), handleBuiltinAliasAttr(), handleInterruptAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), IsVectorConversion(), and ProcessDeclAttribute().
| bool Sema::AttachBaseSpecifiers | ( | CXXRecordDecl * | Class, |
| MutableArrayRef< CXXBaseSpecifier * > | Bases ) |
Performs the actual work of attaching the given base class specifiers to a C++ class.
Definition at line 2937 of file SemaDeclCXX.cpp.
References clang::AS_public, clang::Class, Context, Diag(), clang::CXXBaseSpecifier::getAccessSpecifier(), getAmbiguousPathsDisplayString(), clang::Type::getAsCXXRecordDecl(), clang::CXXBaseSpecifier::getBeginLoc(), clang::QualType::getLocalUnqualifiedType(), getRecordDiagFromTagKind(), clang::CXXBaseSpecifier::getType(), getType(), clang::Invalid, clang::CXXBasePaths::isAmbiguous(), clang::Type::isDependentType(), and NoteIndirectBases().
Referenced by ActOnBaseSpecifiers(), and SubstBaseSpecifiers().
| bool Sema::AttachTypeConstraint | ( | AutoTypeLoc | TL, |
| NonTypeTemplateParmDecl * | NewConstrainedParm, | ||
| NonTypeTemplateParmDecl * | OrigConstrainedParm, | ||
| SourceLocation | EllipsisLoc ) |
Definition at line 1298 of file SemaTemplate.cpp.
References clang::Auto, BuildDeclRefExpr(), BuildDecltypeType(), clang::SemaBase::Diag(), formImmediatelyDeclaredConstraint(), clang::ActionResult< PtrTy, Compress >::get(), clang::AutoTypeLoc::getAutoKeyword(), clang::TypeLoc::getBeginLoc(), clang::AutoTypeLoc::getConceptNameInfo(), clang::AutoTypeLoc::getFoundDecl(), clang::AutoTypeLoc::getLAngleLoc(), clang::Decl::getLocation(), clang::AutoTypeLoc::getNamedConcept(), clang::AutoTypeLoc::getNestedNameSpecifierLoc(), clang::QualType::getNonPackExpansionType(), clang::AutoTypeLoc::getRAngleLoc(), clang::TypeLoc::getSourceRange(), clang::TypeLoc::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::NonTypeTemplateParmDecl::setPlaceholderTypeConstraint(), and clang::VK_PRValue.
| bool Sema::AttachTypeConstraint | ( | NestedNameSpecifierLoc | NS, |
| DeclarationNameInfo | NameInfo, | ||
| TemplateDecl * | NamedConcept, | ||
| NamedDecl * | FoundDecl, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| TemplateTypeParmDecl * | ConstrainedParameter, | ||
| SourceLocation | EllipsisLoc ) |
Attach a type-constraint to a template parameter.
Definition at line 1257 of file SemaTemplate.cpp.
References Context, clang::ASTTemplateArgumentListInfo::Create(), clang::ConceptReference::Create(), formImmediatelyDeclaredConstraint(), clang::ActionResult< PtrTy, Compress >::get(), clang::TemplateArgumentListInfo::getLAngleLoc(), clang::Decl::getLocation(), clang::TemplateArgumentListInfo::getRAngleLoc(), clang::TypeDecl::getTypeForDecl(), clang::ActionResult< PtrTy, Compress >::isInvalid(), NS, and clang::TemplateTypeParmDecl::setTypeConstraint().
Referenced by ActOnNonTypeTemplateParameter(), BuildTypeConstraint(), InventTemplateParameter(), and SubstTypeConstraint().
|
inline |
Definition at line 1433 of file Sema.h.
Referenced by handleInterruptAttr(), and ProcessDeclAttribute().
| bool clang::Sema::BoundsSafetyCheckAssignmentToCountAttrPtr | ( | QualType | LHSTy, |
| Expr * | RHSExpr, | ||
| AssignmentAction | Action, | ||
| SourceLocation | Loc, | ||
| const ValueDecl * | Assignee, | ||
| bool | ShowFullyQualifiedAssigneeName ) |
Perform Bounds Safety Semantic checks for assigning to a __counted_by or __counted_by_or_null pointer type.
| LHSTy. | |
| LHSTy | The type being assigned to. Checks will only be performed if the type is a counted_by or counted_by_or_null pointer. |
| RHSExpr | The expression being assigned from. |
| Action | The type assignment being performed |
| Loc | The SourceLocation to use for error diagnostics |
| Assignee | The ValueDecl being assigned. This is used to compute the name of the assignee. If the assignee isn't known this can be set to nullptr. |
| ShowFullyQualifiedAssigneeName | If set to true when using Assignee to compute the name of the assignee use the fully qualified name, otherwise use the unqualified name. |
Definition at line 342 of file SemaBoundsSafety.cpp.
References clang::CheckAssignmentToCountAttrPtrWithIncompletePointeeTy().
Referenced by CheckAssignmentOperands().
| bool clang::Sema::BoundsSafetyCheckInitialization | ( | const InitializedEntity & | Entity, |
| const InitializationKind & | Kind, | ||
| AssignmentAction | Action, | ||
| QualType | LHSType, | ||
| Expr * | RHSExpr ) |
Perform Bounds Safety Semantic checks for initializing a Bounds Safety pointer.
| Entity | The entity being initialized |
| Kind | The kind of initialization being performed |
| Action | The type assignment being performed |
| LHSTy | The type being assigned to. Checks will only be performed if the type is a counted_by or counted_by_or_null pointer. |
| RHSExpr | The expression being used for initialization. |
Definition at line 350 of file SemaBoundsSafety.cpp.
References clang::CheckAssignmentToCountAttrPtrWithIncompletePointeeTy(), clang::InitializedEntity::EK_Variable, clang::InitializedEntity::getDecl(), clang::InitializedEntity::getKind(), and clang::Initializing.
Referenced by clang::InitializationSequence::Perform().
Perform Bounds Safety semantic checks for uses of invalid uses counted_by or counted_by_or_null pointers in.
| E. | |
| E | the expression to check |
Definition at line 378 of file SemaBoundsSafety.cpp.
References clang::SemaBase::Diag(), clang::EmitIncompleteCountedByPointeeNotes(), clang::Stmt::getBeginLoc(), clang::GetCountedByAttrOnIncompletePointee(), getPrintingPolicy(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParens(), clang::Stmt::printPretty(), and clang::T.
Referenced by DefaultLvalueConversion().
|
inline |
Definition at line 1438 of file Sema.h.
Referenced by ProcessDeclAttribute(), and ProcessDeclAttributeDelayed().
| QualType Sema::BuildAddressSpaceAttr | ( | QualType & | T, |
| Expr * | AddrSpace, | ||
| SourceLocation | AttrLoc ) |
Same as above, but constructs the AddressSpace index if not provided.
Definition at line 6524 of file SemaType.cpp.
References BuildAddressSpaceAttr(), BuildAddressSpaceIndex(), and clang::T.
| 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 6501 of file SemaType.cpp.
References Context, clang::SemaBase::Diag(), DiagnoseMultipleAddrSpaceAttributes(), clang::Expr::isValueDependent(), and clang::T.
Referenced by BuildAddressSpaceAttr(), and HandleAddressSpaceTypeAttribute().
| 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 5674 of file SemaDecl.cpp.
References ActOnUninitializedDecl(), clang::DeclContext::addDecl(), clang::AS_none, clang::AS_protected, clang::AS_public, clang::C11, clang::cast(), checkDuplicateDefaultInit(), CheckNontrivialField(), clang::DeclSpec::ClearTypeQualifiers(), Context, clang::CPlusPlus, clang::FieldDecl::Create(), clang::VarDecl::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::SemaBase::Diag(), FieldCollector, clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getConstSpecLoc(), getCurrentMangleNumberContext(), getLangOpts(), clang::MangleNumberingContext::getManglingNumber(), getMSManglingNumber(), clang::DeclContext::getRedeclContext(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::MangleNumberingContext::getStaticLocalNumber(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), GetTypeForDeclarator(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getUnalignedSpecLoc(), clang::DeclSpec::getVolatileSpecLoc(), clang::ICIS_NoInit, InjectAnonymousStructOrUnionMembers(), clang::Invalid, clang::isa(), 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::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().
| ExprResult Sema::BuildAnonymousStructUnionMemberReference | ( | const CXXScopeSpec & | SS, |
| SourceLocation | nameLoc, | ||
| IndirectFieldDecl * | indirectField, | ||
| DeclAccessPair | FoundDecl = DeclAccessPair::make(nullptr, AS_none), | ||
| Expr * | baseObjectExpr = nullptr, | ||
| SourceLocation | opLoc = SourceLocation() ) |
Definition at line 734 of file SemaExprMember.cpp.
References BuildDeclarationNameExpr(), BuildFieldReferenceExpr(), clang::cast(), clang::IndirectFieldDecl::chain_begin(), clang::IndirectFieldDecl::chain_end(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getAccess(), clang::NamedDecl::getDeclName(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::IndirectFieldDecl::getVarDecl(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isPointerType(), clang::Type::isRecordType(), and clang::DeclAccessPair::make().
Referenced by BuildDeclarationNameExpr(), and BuildMemberReferenceExpr().
| QualType Sema::BuildArrayType | ( | QualType | T, |
| ArraySizeModifier | ASM, | ||
| Expr * | ArraySize, | ||
| unsigned | Quals, | ||
| SourceRange | Brackets, | ||
| DeclarationName | Entity ) |
Build an array type.
| T | The type of each element in the array. |
| ASM | C99 array size modifier (e.g., '*', 'static'). |
| ArraySize | Expression describing the size of the array. |
| Brackets | The range from the opening '[' to the closing ']'. |
| Entity | The name of the entity that involves the array type, if known. |
Definition at line 2049 of file SemaType.cpp.
References clang::C99, checkArrayElementAlignment(), checkArraySize(), CheckPlaceholderExpr(), Context, clang::CPlusPlus, clang::CPlusPlus11, CUDA(), DefaultLvalueConversion(), clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), getCurFunction(), getLangOpts(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), getPrintableNameForEntity(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isBlockPointerType(), isCompleteType(), clang::Type::isImageType(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isPipeType(), clang::Expr::isPRValue(), clang::Type::isSamplerT(), isSFINAEContext(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Expr::isValueDependent(), clang::Normal, OpenCL(), OpenMP(), RequireCompleteSizedType(), RequireNonAbstractType(), clang::Result, clang::Star, clang::T, targetDiag(), and toString().
Referenced by GetFullTypeForDeclarator().
| ExprResult Sema::BuildArrayTypeTrait | ( | ArrayTypeTrait | ATT, |
| SourceLocation | KWLoc, | ||
| TypeSourceInfo * | TSInfo, | ||
| Expr * | DimExpr, | ||
| SourceLocation | RParen ) |
Definition at line 1870 of file SemaTypeTraits.cpp.
References Context, EvaluateArrayTypeTrait(), clang::TypeSourceInfo::getType(), and clang::T.
Referenced by ActOnArrayTypeTrait(), and clang::TreeTransform< AdjustConstraints >::RebuildArrayTypeTrait().
| ExprResult Sema::BuildAsTypeExpr | ( | Expr * | E, |
| QualType | DestTy, | ||
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RParenLoc ) |
Create a new AsTypeExpr node (bitcast) from the arguments.
Definition at line 6890 of file SemaExpr.cpp.
References Context, clang::SemaBase::Diag(), clang::ExprError(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isDependentType(), clang::OK_Ordinary, and clang::VK_PRValue.
Referenced by ActOnAsTypeExpr().
| ExprResult Sema::BuildAtomicExpr | ( | SourceRange | CallRange, |
| SourceRange | ExprRange, | ||
| SourceLocation | RParenLoc, | ||
| MultiExprArg | Args, | ||
| AtomicExpr::AtomicOp | Op, | ||
| AtomicArgumentOrder | ArgOrder = AtomicArgumentOrder::API ) |
Definition at line 4445 of file SemaChecking.cpp.
References clang::Arithmetic, AST, clang::Type::castAs(), CheckNonNullArgument(), Context, clang::Copy, clang::Default, DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::AtomicExpr::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::SourceRange::getEnd(), clang::Expr::getExprLoc(), clang::QualType::getObjCLifetime(), clang::Type::getPointeeType(), clang::QualType::getPointerAuth(), clang::AtomicExpr::getScopeModel(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), ImpCastExprToType(), clang::Init, clang::InitializedEntity::InitializeParameter(), clang::PointerAuthQualifier::isAddressDiscriminated(), 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, Success, and clang::QualType::withCVRQualifiers().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildAtomicExpr().
| QualType Sema::BuildAtomicType | ( | QualType | T, |
| SourceLocation | Loc ) |
Definition at line 10136 of file SemaType.cpp.
References clang::C23, Context, clang::CPlusPlus, clang::SemaBase::Diag(), getLangOpts(), isDependentOrGNUAutoType(), RequireCompleteType(), and clang::T.
Referenced by BuildQualifiedType(), and ConvertDeclSpecToType().
| StmtResult Sema::BuildAttributedStmt | ( | SourceLocation | AttrsLoc, |
| ArrayRef< const Attr * > | Attrs, | ||
| Stmt * | SubStmt ) |
Definition at line 631 of file SemaStmt.cpp.
References checkAndRewriteMustTailAttr(), Context, clang::AttributedStmt::Create(), and setFunctionHasMustTail().
Referenced by ActOnAttributedStmt().
| MemInitResult Sema::BuildBaseInitializer | ( | QualType | BaseType, |
| TypeSourceInfo * | BaseTInfo, | ||
| Expr * | Init, | ||
| CXXRecordDecl * | ClassDecl, | ||
| SourceLocation | EllipsisLoc ) |
Definition at line 4745 of file SemaDeclCXX.cpp.
References ActOnFinishFullExpr(), BuildDelegatingInitializer(), Context, clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), CreateRecoveryExpr(), CurContext, clang::declaresSameEntity(), clang::Dependent, Diag(), DiagnoseUnexpandedParameterPack(), DiscardCleanupsInEvaluationContext(), FindBaseInitializer(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), clang::SourceRange::getEnd(), clang::TypeLoc::getLocalSourceRange(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::Init, InitializationSequence, clang::InitializedEntity::InitializeBase(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::SourceLocation::isValid(), clang::CXXBaseSpecifier::isVirtual(), clang::InitializationSequence::Perform(), and UPPC_Initializer.
Referenced by BuildMemInitializer(), and InstantiateMemInitializers().
| void Sema::BuildBasePathArray | ( | const CXXBasePaths & | Paths, |
| CXXCastPath & | BasePath ) |
Definition at line 3111 of file SemaDeclCXX.cpp.
References clang::CXXBasePaths::front(), and clang::CXXBasePaths::isRecordingPaths().
Referenced by buildDeclareReductionRef(), DiagnoseInvalidExplicitObjectParameterInLambda(), and findDecomposableBaseClass().
| ExprResult Sema::BuildBinOp | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| BinaryOperatorKind | Opc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr, | ||
| bool | ForFoldExpression = false ) |
Definition at line 15778 of file SemaExpr.cpp.
References BuildOverloadedBinOp(), clang::SemaPseudoObject::checkAssignment(), CheckPlaceholderExpr(), clang::Expr::containsErrors(), Context, clang::CPlusPlus, clang::BinaryOperator::Create(), clang::CompoundAssignOperator::Create(), CreateBuiltinBinOp(), CurFPFeatureOverrides(), clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsPlaceholderType(), getLangOpts(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), HLSL(), inTemplateInstantiation(), clang::BinaryOperator::isAssignmentOp(), clang::BinaryOperator::isCompoundAssignmentOp(), clang::Type::isHLSLResourceRecord(), clang::Type::isHLSLResourceRecordArray(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isOverloadableType(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::OK_Ordinary, PseudoObject(), and clang::VK_PRValue.
Referenced by ActOnBinOp(), actOnOMPReductionKindClause(), buildCounterInit(), buildCounterUpdate(), buildDistanceFunc(), buildLoopVarFunc(), checkOpenMPLoop(), DiagnoseNonAssignableReason(), FinishOpenMPLinearClause(), and clang::TreeTransform< AdjustConstraints >::RebuildBinaryOperator().
| QualType Sema::BuildBitIntType | ( | bool | IsUnsigned, |
| Expr * | BitWidth, | ||
| SourceLocation | Loc ) |
Build a bit-precise integer type.
| IsUnsigned | Boolean representing the signedness of the type. |
| BitWidth | Size of this int type in bits, or an expression representing that. |
| Loc | Location of the keyword. |
Definition at line 1941 of file SemaType.cpp.
References clang::Allow, Context, clang::SemaBase::Diag(), getASTContext(), clang::TargetInfo::getMaxBitIntWidth(), clang::ASTContext::getTargetInfo(), clang::Expr::isInstantiationDependent(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and VerifyIntegerConstantExpression().
Referenced by ConvertDeclSpecToType().
| ExprResult Sema::BuildBlockForLambdaConversion | ( | SourceLocation | CurrentLocation, |
| SourceLocation | ConvLocation, | ||
| CXXConversionDecl * | Conv, | ||
| Expr * | Src ) |
Definition at line 2349 of file SemaLambda.cpp.
References ActOnFinishFullExpr(), clang::Block, clang::Capture, clang::cast(), Cleanup, clang::CompoundStmt, Context, clang::BlockDecl::Create(), clang::ParmVarDecl::Create(), clang::VarDecl::Create(), CurContext, ExprCleanupObjects, clang::ExprError(), clang::DeclContextLookupResult::front(), clang::DeclaratorDecl::getBeginLoc(), clang::CXXConversionDecl::getConversionType(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::VarDecl::getStorageClass(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Init, clang::InitializedEntity::InitializeLambdaToBlock(), clang::FunctionDecl::isVariadic(), clang::DeclContext::lookup(), clang::Decl::markUsed(), PerformCopyInitialization(), clang::SC_None, and clang::Decl::setReferenced().
Referenced by BuildCXXMemberCallExpr(), and DefineImplicitLambdaToBlockPointerConversion().
| QualType Sema::BuildBlockPointerType | ( | QualType | T, |
| SourceLocation | Loc, | ||
| DeclarationName | Entity ) |
Build a block pointer type.
| T | The type to which we'll be building a block pointer. |
| Loc | The source location, used for diagnostics. |
| Entity | The name of the entity that involves the block pointer type, if known. |
Definition at line 2776 of file SemaType.cpp.
References checkQualifiedFunction(), Context, deduceOpenCLPointeeAddrSpace(), clang::SemaBase::Diag(), getLangOpts(), OpenCL(), and clang::T.
Referenced by GetFullTypeForDeclarator().
| ExprResult Sema::BuildBuiltinBitCastExpr | ( | SourceLocation | KWLoc, |
| TypeSourceInfo * | TSI, | ||
| Expr * | Operand, | ||
| SourceLocation | RParenLoc ) |
Definition at line 438 of file SemaCast.cpp.
References Context, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::TypeLoc::getBeginLoc(), clang::TypeLoc::getEndLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::isDependentType(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by ActOnBuiltinBitCastExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildBuiltinBitCastExpr().
| Expr * Sema::BuildBuiltinCallExpr | ( | SourceLocation | Loc, |
| Builtin::ID | Id, | ||
| MultiExprArg | CallArgs ) |
BuildBuiltinCallExpr - Create a call to a builtin function specified by Id.
Definition at line 6862 of file SemaExpr.cpp.
References BuildCallExpr(), BuildDeclRefExpr(), clang::Call, Context, clang::ActionResult< PtrTy, Compress >::get(), clang::LookupResult::getAsSingle(), clang::ActionResult< PtrTy, Compress >::isUsable(), LookupName(), LookupOrdinaryName, TUScope, and clang::VK_LValue.
Referenced by ActOnParenExpr(), and buildCoroutineHandle().
| ExprResult Sema::BuildBuiltinOffsetOf | ( | SourceLocation | BuiltinLoc, |
| TypeSourceInfo * | TInfo, | ||
| ArrayRef< OffsetOfComponent > | Components, | ||
| SourceLocation | RParenLoc ) |
__builtin_offsetof(type, a.b[123][456].c)
Definition at line 16377 of file SemaExpr.cpp.
References clang::cast(), Context, clang::OffsetOfExpr::Create(), DefaultLvalueConversion(), clang::Dependent, clang::SemaBase::Diag(), clang::ExprError(), clang::CXXBasePaths::front(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsRecordDecl(), clang::LookupResult::getAsSingle(), clang::Stmt::getBeginLoc(), clang::NamedDecl::getDeclName(), clang::CXXBasePaths::getDetectedVirtual(), clang::ArrayType::getElementType(), clang::TypeLoc::getLocalSourceRange(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::FieldDecl::getParent(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::isa(), clang::LookupResult::isAmbiguous(), clang::FieldDecl::isBitField(), clang::Type::isDependentType(), IsDerivedFrom(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), isUnevaluatedContext(), clang::Expr::isValueDependent(), LangOpts, LookupMemberName, LookupQualifiedName(), and RequireCompleteType().
Referenced by ActOnBuiltinOffsetOf(), and clang::TreeTransform< AdjustConstraints >::RebuildOffsetOfExpr().
| ExprResult Sema::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.
This provides the location of the left/right parens and a list of comma locations.
Definition at line 6647 of file SemaExpr.cpp.
References BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildOverloadedCallExpr(), BuildResolvedCallExpr(), clang::cast(), checkAddressOfFunctionIsAvailable(), CheckArgsForPlaceholders(), checkDirectCallValidity(), CheckPlaceholderExpr(), Context, clang::CPlusPlus, clang::CallExpr::Create(), clang::CUDAKernelCallExpr::Create(), clang::DeclRefExpr::Create(), clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateRemoval(), CurFPFeatureOverrides(), clang::Default, clang::SemaBase::Diag(), clang::ExprError(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::FunctionArg, clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), getASTContext(), clang::FunctionDecl::getBuiltinID(), getLangOpts(), clang::Type::getPointeeType(), clang::DeclaratorDecl::getQualifierLoc(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), getType(), clang::Expr::hasAnyTypeDependentArguments(), clang::OverloadExpr::FindResult::HasFormOfMemberPointer, clang::HIP, clang::Expr::IgnoreParens(), ImpCastExprToType(), clang::isa(), clang::OverloadExpr::FindResult::IsAddressOfOperand, clang::OverloadExpr::FindResult::IsAddressOfOperandWithParen, clang::ActionResult< PtrTy, Compress >::isInvalid(), MaybeConvertParenListExprToParenExpr(), MayBeFunctionType(), rebuildUnknownAnyFunction(), clang::Result, rewriteBuiltinFunctionDecl(), clang::Qualifiers::setAddressSpace(), tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs(), and clang::VK_PRValue.
Referenced by ActOnCallExpr(), BuildBuiltinCallExpr(), BuildCallToObjectOfClassType(), buildCoroutineHandle(), BuildForRangeBeginEndCall(), buildMemberCall(), buildMemcpyForAssignmentOp(), BuildRecoveryCallExpr(), checkTupleLikeDecomposition(), DefaultVariadicArgumentPromotion(), EvaluateAsStringImpl(), and tryToRecoverWithCall().
| ExprResult Sema::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.
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 16084 of file SemaOverload.cpp.
References AddMethodCandidate(), AddMethodTemplateCandidate(), AddOverloadCandidate(), clang::AS_public, clang::OverloadCandidateSet::BestViableFunction(), BuildResolvedCallExpr(), clang::cast(), clang::Type::castAs(), checkArgPlaceholdersForOverload(), CheckCallReturnType(), CheckEnableIf(), CheckForImmediateInvocation(), CheckFunctionCall(), CheckUnresolvedMemberAccess(), CheckVirtualDtorCall(), chooseRecoveryType(), clang::Expr::Classify(), Context, ConvertArgumentsForCall(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::CallExpr::Create(), clang::CXXMemberCallExpr::Create(), CreateFunctionRefExpr(), CreateRecoveryExpr(), clang::OverloadCandidateSet::CSK_Normal, CurContext, CurFPFeatureOverrides(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), Diag(), DiagnoseSentinelCalls(), DiagnoseUseOfDeletedFunction(), DiagnoseUseOfOverloadedDecl(), clang::ExprError(), FixOverloadedFunctionReference(), clang::Func, clang::ActionResult< PtrTy, Compress >::get(), clang::Qualifiers::getAsString(), clang::MemberExpr::getBase(), clang::UnresolvedMemberExpr::getBase(), clang::UnresolvedMemberExpr::getBaseType(), clang::DeclaratorDecl::getBeginLoc(), clang::MemberExpr::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::UnresolvedMemberExpr::getBeginLoc(), clang::FunctionType::getCallResultType(), clang::DeclAccessPair::getDecl(), clang::NamedDecl::getDeclName(), GetExplicitObjectType(), clang::MemberExpr::getExprLoc(), clang::MemberExpr::getFoundDecl(), getLangOpts(), 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(), getPointeeType(), clang::MemberExpr::getQualifier(), clang::OverloadExpr::getQualifier(), clang::QualType::getQualifiers(), clang::FunctionType::getReturnType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKindForType(), clang::OverloadExpr::hasExplicitTemplateArgs(), clang::MemberExpr::hasQualifier(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParens(), clang::isa(), clang::UnresolvedMemberExpr::isArrow(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::DeclAccessPair::make(), clang::Expr::Classification::makeSimpleLValue(), MaybeBindToTemporary(), clang::Method, clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::SemaBase::PDiag(), PerformImplicitObjectArgumentInitialization(), clang::MemberExpr::performsVirtualDispatch(), PrepareExplicitObjectArgument(), clang::Qualifiers::removeAddressSpace(), clang::Qualifiers::removeObjCGCAttr(), clang::MemberExpr::setBase(), clang::OverloadCandidateSet::size(), and clang::VK_PRValue.
Referenced by BuildCallExpr(), buildSingleCopyAssignRecursively(), and tryExprAsCall().
| 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 16409 of file SemaOverload.cpp.
References AddMethodCandidate(), AddSurrogateCandidate(), clang::LookupResult::begin(), clang::OverloadCandidateSet::begin(), clang::OverloadCandidateSet::BestViableFunction(), BuildCallExpr(), BuildCXXMemberCallExpr(), clang::Call, clang::cast(), checkArgPlaceholdersForOverload(), CheckCallReturnType(), CheckForImmediateInvocation(), CheckFunctionCall(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), Context, Conversions, clang::CXXOperatorCallExpr::Create(), clang::ImplicitCastExpr::Create(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Operator, CurFPFeatureOverrides(), DefaultVariadicArgumentPromotion(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), clang::OverloadCandidateSet::empty(), clang::LookupResult::end(), clang::OverloadCandidateSet::end(), clang::ExprError(), clang::OverloadCandidate::FailureKind, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), clang::Decl::getDeclContext(), clang::DeclarationNameInfo::getInfo(), clang::DeclarationNameInfo::getLoc(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumParams(), clang::Type::getPointeeType(), clang::StringLiteral::getString(), clang::Expr::getValueKindForType(), clang::isa(), clang::LookupResult::isAmbiguous(), clang::CXXConversionDecl::isExplicit(), clang::ActionResult< PtrTy, Compress >::isInvalid(), LookupOrdinaryName, LookupQualifiedName(), MaybeBindToTemporary(), clang::Method, clang::OverloadCandidateSet::nonDeferredCandidatesCount(), 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, clang::SemaBase::PDiag(), PerformImplicitObjectArgumentInitialization(), PrepareArgumentsForCallToObjectOfClassType(), PrepareExplicitObjectArgument(), RequireCompleteType(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::OverloadCandidateSet::size(), clang::LookupResult::suppressAccessDiagnostics(), clang::OverloadCandidate::Viable, and clang::VK_PRValue.
Referenced by BuildCallExpr().
| FieldDecl * Sema::BuildCaptureField | ( | RecordDecl * | RD, |
| const sema::Capture & | Capture ) |
Build a FieldDecl suitable to hold the given capture.
Create a field within the lambda class or captured statement record for the given capture.
Definition at line 2060 of file SemaLambda.cpp.
References clang::DeclContext::addDecl(), clang::AS_private, Context, clang::FieldDecl::Create(), clang::sema::Capture::getCapturedVLAType(), clang::sema::Capture::getCaptureType(), clang::sema::Capture::getLocation(), clang::sema::Capture::getVariable(), clang::ICIS_NoInit, clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), clang::sema::Capture::isVariableCapture(), clang::sema::Capture::isVLATypeCapture(), RequireCompleteSizedType(), and clang::Decl::setInvalidDecl().
Referenced by buildCapturedStmtCaptureList(), and BuildLambdaExpr().
| ExprResult Sema::BuildCaptureInit | ( | const sema::Capture & | Capture, |
| SourceLocation | ImplicitCaptureLoc, | ||
| bool | IsOpenMPMapping = false ) |
Initialize the given capture with a suitable expression.
Definition at line 1911 of file SemaLambda.cpp.
References BuildCXXThisExpr(), BuildDeclarationNameExpr(), clang::cast(), CreateBuiltinUnaryOp(), clang::InitializationKind::CreateDirect(), clang::ExprError(), clang::sema::Capture::getCaptureType(), getCurrentThisType(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::sema::Capture::getLocation(), clang::sema::Capture::getVariable(), clang::Init, InitializationSequence, clang::InitializedEntity::InitializeLambdaCapture(), clang::sema::Capture::isCopyCapture(), clang::sema::Capture::isInitCapture(), clang::sema::Capture::isThisCapture(), clang::SourceLocation::isValid(), clang::sema::Capture::isVariableCapture(), clang::sema::Capture::isVLATypeCapture(), and clang::InitializationSequence::Perform().
Referenced by buildCapturedStmtCaptureList(), and BuildLambdaExpr().
| CodeAlignAttr * Sema::BuildCodeAlignAttr | ( | const AttributeCommonInfo & | CI, |
| Expr * | E ) |
Definition at line 360 of file SemaStmtAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::AttributeCommonInfo::getLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isValueDependent(), and VerifyIntegerConstantExpression().
Referenced by handleCodeAlignAttr().
| ExprResult Sema::BuildCompoundLiteralExpr | ( | SourceLocation | LParenLoc, |
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | LiteralExpr ) |
Definition at line 7228 of file SemaExpr.cpp.
References CheckForConstantInitializer(), checkNonTrivialCUnion(), checkNonTrivialCUnionInInitializer(), Cleanup, clang::CompoundLiteral, Context, clang::CPlusPlus, clang::ConstantExpr::Create(), clang::InitializationKind::CreateCStyleCast(), CurContext, clang::Default, clang::SemaBase::Diag(), ExprCleanupObjects, clang::ExprError(), clang::QualType::getAddressSpace(), getCurFunction(), getCurScope(), 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, InitializationSequence, clang::InitializedEntity::InitializeCompoundLiteralInit(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::Scope::isFunctionPrototypeScope(), clang::Scope::isInCFunctionScope(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Type::isVariableArrayType(), LangOpts, MaybeBindToTemporary(), NTCUK_Destruct, clang::opencl_private, clang::InitializationSequence::Perform(), RequireCompleteSizedType(), RequireCompleteType(), clang::Result, clang::sema::FunctionScopeInfo::setHasBranchProtectedScope(), tryToFixVariablyModifiedVarType(), clang::VK_LValue, and clang::VK_PRValue.
Referenced by ActOnCompoundLiteral(), BuildVectorLiteral(), and clang::TreeTransform< AdjustConstraints >::RebuildCompoundLiteralExpr().
| ExprResult Sema::BuildConvertedConstantExpression | ( | Expr * | From, |
| QualType | T, | ||
| CCEKind | CCE, | ||
| NamedDecl * | Dest = nullptr ) |
Definition at line 6515 of file SemaOverload.cpp.
References clang::T.
Referenced by CheckTemplateArgument(), and EvaluateAsStringImpl().
| StmtResult Sema::BuildCoreturnStmt | ( | SourceLocation | KwLoc, |
| Expr * | E, | ||
| bool | IsImplicit = false ) |
Definition at line 1021 of file SemaCoroutine.cpp.
References ActOnFinishFullExpr(), buildPromiseCall(), checkCoroutineContext(), CheckPlaceholderExpr(), Context, ForceOn, clang::ActionResult< PtrTy, Compress >::get(), clang::Sema::FullExprArg::get(), getNamedReturnInfo(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isVoidType(), MakeFullDiscardedValueExpr(), and clang::StmtError().
Referenced by ActOnCoreturnStmt(), and clang::TreeTransform< AdjustConstraints >::RebuildCoreturnStmt().
| StmtResult Sema::BuildCoroutineBodyStmt | ( | CoroutineBodyStmt::CtorArgs | Args | ) |
Definition at line 2000 of file SemaCoroutine.cpp.
References Context, clang::CoroutineBodyStmt::Create(), and clang::StmtError().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildCoroutineBodyStmt().
| bool Sema::buildCoroutineParameterMoves | ( | SourceLocation | Loc | ) |
Definition at line 1948 of file SemaCoroutine.cpp.
References ActOnDeclStmt(), AddInitializerToDecl(), BuildDeclRefExpr(), buildVarDecl(), clang::cast(), castForMoving(), ConvertDeclToDeclGroup(), CurContext, clang::ActionResult< PtrTy, Compress >::get(), getCurFunction(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::VK_LValue.
Referenced by checkCoroutineContext().
| VarDecl * Sema::buildCoroutinePromise | ( | SourceLocation | Loc | ) |
Definition at line 463 of file SemaCoroutine.cpp.
References ActOnCXXThis(), ActOnUninitializedDecl(), BuildDeclRefExpr(), clang::VarDecl::CallInit, clang::cast(), CheckCompleteVariableDeclaration(), CheckVariableDeclarationType(), Context, clang::ParenListExpr::Create(), clang::VarDecl::Create(), CreateBuiltinUnaryOp(), clang::InitializationKind::CreateForInit(), CurContext, clang::ExprEmpty(), clang::ActionResult< PtrTy, Compress >::get(), getCurFunction(), InitializationSequence, clang::InitializedEntity::InitializeVariable(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::isLambdaCallOperator(), lookupPromiseType(), MaybeCreateExprWithCleanups(), clang::InitializationSequence::Perform(), PP, clang::Result, clang::SC_None, clang::T, and clang::VK_LValue.
Referenced by checkCoroutineContext().
| QualType Sema::BuildCountAttributedArrayOrPointerType | ( | QualType | WrappedTy, |
| Expr * | CountExpr, | ||
| bool | CountInBytes, | ||
| bool | OrNull ) |
When the resulting expression is invalid, we still create the AST using the original count expression for the sake of AST dump.
Definition at line 9732 of file SemaType.cpp.
References BuildTypeCoupledDecls(), Context, clang::Type::isIncompleteArrayType(), and clang::Type::isPointerType().
Referenced by handleCountedByAttrField().
| ExprResult Sema::BuildCoyieldExpr | ( | SourceLocation | KwLoc, |
| Expr * | E ) |
Definition at line 978 of file SemaCoroutine.cpp.
References buildCoawaitCalls(), checkCoroutineContext(), CheckPlaceholderExpr(), Context, CreateMaterializeTemporaryExpr(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::Type::isDependentType(), ReadySuspendResumeResult::IsInvalid, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPRValue(), ReadySuspendResumeResult::OpaqueValue, and ReadySuspendResumeResult::Results.
Referenced by ActOnCoyieldExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildCoyieldExpr().
| ExprResult Sema::BuildCStyleCastExpr | ( | SourceLocation | LParenLoc, |
| TypeSourceInfo * | Ty, | ||
| SourceLocation | RParenLoc, | ||
| Expr * | Op ) |
Definition at line 3444 of file SemaCast.cpp.
References Context, clang::CPlusPlus, clang::CStyleCastExpr::Create(), CurFPFeatureOverrides(), DiagnoseCastQual(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getEndLoc(), getLangOpts(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::isa(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by ActOnCastExpr(), actOnOMPReductionKindClause(), buildDistanceFunc(), buildPostUpdate(), BuildVectorLiteral(), checkOpenMPLoop(), clang::CStyleCastPtrExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildCStyleCastExpr().
| ExprResult Sema::BuildCXXAssumeExpr | ( | Expr * | Assumption, |
| const IdentifierInfo * | AttrName, | ||
| SourceRange | Range ) |
Definition at line 785 of file SemaStmtAttr.cpp.
References ActOnFinishFullExpr(), CheckPlaceholderExpr(), Context, clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::Expr::HasSideEffects(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and PerformContextuallyConvertToBool().
Referenced by ActOnCXXAssumeAttr().
| 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 16327 of file SemaDeclCXX.cpp.
References CheckForImmediateInvocation(), clang::Constructor, Context, clang::CXXConstructExpr::Create(), clang::CUDA, CUDA(), clang::declaresSameEntity(), clang::ExprError(), clang::Type::getAsCXXRecordDecl(), clang::Type::getBaseElementTypeUnsafe(), getLangOpts(), and MarkFunctionReferenced().
| 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 ) |
Definition at line 16304 of file SemaDeclCXX.cpp.
References BuildCXXConstructExpr(), clang::Constructor, DiagnoseUseOfOverloadedDecl(), clang::ExprError(), and findInheritingConstructor().
| 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.
| ConstructKind | - a CXXConstructExpr::ConstructionKind |
Definition at line 16262 of file SemaDeclCXX.cpp.
References BuildCXXConstructExpr(), clang::cast(), clang::Complete, clang::Constructor, Context, clang::Decl::getDeclContext(), hasOneRealArgument(), and clang::Expr::isTemporaryObject().
Referenced by BuildCXXCastArgument(), BuildCXXConstructExpr(), BuildCXXConstructExpr(), CopyObject(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformImplicitConversion(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXConstructExpr().
| ExprResult Sema::BuildCXXDefaultArgExpr | ( | SourceLocation | CallLoc, |
| FunctionDecl * | FD, | ||
| ParmVarDecl * | Param, | ||
| Expr * | Init = nullptr ) |
BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed.
Definition at line 5631 of file SemaExpr.cpp.
References CheckCXXDefaultArgExpr(), Context, ConvertParamDefaultArgument(), clang::CXXDefaultArgExpr::Create(), CurContext, currentEvaluationContext(), clang::ExprError(), ExprEvalContexts, clang::ActionResult< PtrTy, Compress >::get(), getASTContext(), clang::Stmt::getBeginLoc(), ImmediateFunctionContext, clang::Init, clang::Sema::ExpressionEvaluationContextRecord::InLifetimeExtendingContext, InstantiateDefaultArgument(), isCheckingDefaultArgumentOrInitializer(), clang::FunctionDecl::isImmediateFunction(), clang::ActionResult< PtrTy, Compress >::isInvalid(), needsRebuildOfDefaultArgOrInit(), OutermostDeclarationWithDelayedImmediateInvocations(), parentEvaluationContext(), PotentiallyEvaluated, runWithSufficientStackSpace(), and V.
Referenced by convertArgsForAvailabilityChecks(), CopyObject(), GatherArgumentsForCall(), and PrepareArgumentsForCallToObjectOfClassType().
| ExprResult Sema::BuildCXXDefaultInitExpr | ( | SourceLocation | Loc, |
| FieldDecl * | Field ) |
Definition at line 5725 of file SemaExpr.cpp.
References ActOnFinishFullExpr(), clang::cast(), Context, ConvertMemberDefaultInitExpression(), clang::CXXDefaultInitExpr::Create(), CurContext, currentEvaluationContext(), clang::SemaBase::Diag(), DiscardCleanupsInEvaluationContext(), clang::ExprError(), ExprEvalContexts, FindFieldDeclInstantiationPattern(), clang::ActionResult< PtrTy, Compress >::get(), getASTContext(), clang::DeclContext::getOuterLexicalRecordContext(), getTemplateInstantiationArgs(), clang::FieldDecl::hasInClassInitializer(), clang::Init, clang::Sema::ExpressionEvaluationContextRecord::InLifetimeExtendingContext, InstantiateInClassInitializer(), isCheckingDefaultArgumentOrInitializer(), isInLifetimeExtendingContext(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isSFINAEContext(), clang::isTemplateInstantiation(), MarkDeclarationsReferencedInExpr(), needsRebuildOfDefaultArgOrInit(), OutermostDeclarationWithDelayedImmediateInvocations(), parentEvaluationContext(), PotentiallyEvaluated, runWithSufficientStackSpace(), and V.
Referenced by CollectFieldInitializer(), clang::TreeTransform< AdjustConstraints >::RebuildCXXDefaultInitExpr(), and TryOrBuildParenListInitialization().
| ExprResult Sema::BuildCXXFoldExpr | ( | UnresolvedLookupExpr * | Callee, |
| SourceLocation | LParenLoc, | ||
| Expr * | LHS, | ||
| BinaryOperatorKind | Operator, | ||
| SourceLocation | EllipsisLoc, | ||
| Expr * | RHS, | ||
| SourceLocation | RParenLoc, | ||
| UnsignedOrNone | NumExpansions ) |
Definition at line 1587 of file SemaTemplateVariadic.cpp.
References Context.
Referenced by ActOnCXXFoldExpr(), formImmediatelyDeclaredConstraint(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXFoldExpr().
| 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 2689 of file SemaStmt.cpp.
References ActOnBinOp(), ActOnCoawaitExpr(), ActOnDeclStmt(), ActOnFinishFullExpr(), clang::SemaOpenMP::ActOnOpenMPLoopInitialization(), ActOnUnaryExprOrTypeTraitExpr(), ActOnUnaryOp(), AddInitializerToDecl(), clang::InitializedEntity::allocateManglingNumber(), BFRK_Build, BFRK_Check, BuildDeclRefExpr(), BuildNonArrayForRange(), clang::cast(), CheckBooleanCondition(), clang::Cond, clang::Expr::containsErrors(), Context, ConvertDeclToDeclGroup(), clang::CPlusPlus17, clang::CPlusPlus23, clang::IntegerLiteral::Create(), CreateParsedType(), clang::OverloadCandidateSet::CSK_Normal, clang::SemaBase::Diag(), FinishForRangeVarDecl(), FRS_NoViableFunction, FRS_Success, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsArrayTypeUnsafe(), getCurScope(), clang::DeclRefExpr::getDecl(), clang::Scope::getDepth(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::DeclStmt::getSingleDecl(), clang::VarDecl::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::InitializedEntity::InitializeVariable(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::SourceLocation::isInvalid(), clang::Decl::isInvalidDecl(), clang::Type::isPointerType(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, OpenMP(), clang::SemaBase::PDiag(), RebuildForRangeWithDereference(), RequireCompleteType(), clang::ValueDecl::setType(), clang::StmtError(), SubstAutoTypeDependent(), and clang::VK_LValue.
Referenced by ActOnCXXForRangeStmt(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXForRangeStmt().
| ExprResult Sema::BuildCXXFunctionalCastExpr | ( | TypeSourceInfo * | TInfo, |
| QualType | Type, | ||
| SourceLocation | LParenLoc, | ||
| Expr * | CastExpr, | ||
| SourceLocation | RParenLoc ) |
Definition at line 3472 of file SemaCast.cpp.
References Context, clang::CXXFunctionalCastExpr::Create(), CurFPFeatureOverrides(), DiagnoseCastQual(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::SourceLocation::isValid().
Referenced by BuildCXXTypeConstructExpr().
| ExprResult Sema::BuildCXXMemberCallExpr | ( | Expr * | Exp, |
| NamedDecl * | FoundDecl, | ||
| CXXConversionDecl * | Method, | ||
| bool | HadMultipleCandidates ) |
Definition at line 14943 of file SemaOverload.cpp.
References BuildBlockForLambdaConversion(), BuildMemberExpr(), CheckForImmediateInvocation(), CheckFunctionCall(), Context, clang::CallExpr::Create(), clang::CXXMemberCallExpr::Create(), CreateFunctionRefExpr(), CurFPFeatureOverrides(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getAccess(), clang::Stmt::getBeginLoc(), clang::CallExpr::getDirectCallee(), clang::Stmt::getEndLoc(), clang::Expr::getExprLoc(), clang::QualType::getNonLValueExprType(), clang::NamedDecl::getUnderlyingDecl(), clang::Expr::getValueKindForType(), clang::Expr::IgnoreParens(), InitializeExplicitObjectArgument(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::DeclAccessPair::make(), clang::Method, clang::OK_Ordinary, PerformImplicitObjectArgumentInitialization(), PopExpressionEvaluationContext(), PotentiallyEvaluated, PushExpressionEvaluationContext(), clang::CallExpr::setUsesMemberSyntax(), and clang::VK_PRValue.
Referenced by BuildCallToObjectOfClassType(), BuildCXXCastArgument(), diagnoseNoViableConversion(), clang::InitializationSequence::Perform(), and recordConversion().
| ExprResult Sema::BuildCXXNamedCast | ( | SourceLocation | OpLoc, |
| tok::TokenKind | Kind, | ||
| TypeSourceInfo * | Ty, | ||
| Expr * | E, | ||
| SourceRange | AngleBrackets, | ||
| SourceRange | Parens ) |
Definition at line 337 of file SemaCast.cpp.
References Context, clang::CXXAddrspaceCastExpr::Create(), clang::CXXConstCastExpr::Create(), clang::CXXDynamicCastExpr::Create(), clang::CXXReinterpretCastExpr::Create(), clang::CXXStaticCastExpr::Create(), CurFPFeatureOverrides(), clang::SemaBase::Diag(), DiscardMisalignedMemberAddress(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), clang::TypeSourceInfo::getType(), clang::QualType::getTypePtr(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), and clang::Parens.
Referenced by ActOnCXXNamedCast(), CastForMoving(), castForMoving(), clang::TreeTransform< AdjustConstraints >::RebuildCXXAddrspaceCastExpr(), clang::TreeTransform< AdjustConstraints >::RebuildCXXConstCastExpr(), clang::TreeTransform< AdjustConstraints >::RebuildCXXDynamicCastExpr(), clang::TreeTransform< AdjustConstraints >::RebuildCXXReinterpretCastExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXStaticCastExpr().
| 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.
| S | Scope in which the nested-name-specifier occurs. |
| IdInfo | Parser information about an identifier in the nested-name-spec. |
| EnteringContext | If true, enter the context specified by the nested-name-specifier. |
| SS | Optional nested name specifier preceding the identifier. |
| ScopeLookupResult | Provides the result of name lookup within the scope of the nested-name-specifier that was computed at template definition time. |
| ErrorRecoveryLookup | Specifies if the method is called to improve error recovery and what kind of recovery is performed. |
| IsCorrectedToColon | If not null, suggestion of replace '::' -> ':' are allowed. The bool value pointed by this parameter is set to 'true' if the identifier is treated as if it was followed by ':', not '::'. |
| OnlyNamespace | If true, only considers namespaces in lookup. |
This routine differs only slightly from ActOnCXXNestedNameSpecifier, in that it contains an extra parameter ScopeLookupResult, which provides the result of name lookup within the scope of the nested-name-specifier that was computed at template definition time.
If ErrorRecoveryLookup is true, then this call is used to improve error recovery. This means that it should not emit diagnostics, it should just return true on failure. It also means it should only return a valid scope if it knows that the result is correct. It should not return in a dependent context, for example. Nor will it extend SS with the scope specifier.
Definition at line 449 of file SemaCXXScopeSpec.cpp.
References clang::cast(), clang::Sema::NestedNameSpecInfo::CCLoc, clang::CXXScopeSpec::clear(), clang::TypeLocBuilder::clear(), computeDeclContext(), Context, CorrectTypo(), clang::CPlusPlus11, clang::FixItHint::CreateReplacement(), CurContext, clang::SemaBase::Diag(), diagnoseTypo(), DiagnoseUnknownTypeName(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::ErrorRecovery, clang::CXXScopeSpec::Extend(), ExtendNestedNameSpecifier(), clang::Found, clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), clang::NestedNameSpecifier::getAsType(), clang::Decl::getCanonicalDecl(), getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getNameLoc(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), GetTypeFromParser(), clang::TypeLocBuilder::getTypeLocInContext(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::Sema::NestedNameSpecInfo::Identifier, clang::Sema::NestedNameSpecInfo::IdentifierLoc, clang::isa(), isAcceptableNestedNameSpecifier(), clang::DeclContext::isDependentContext(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::IdentifierInfo::isEditorPlaceholder(), clang::DeclContext::isFunctionOrMethod(), clang::QualType::isNull(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), LookupName(), LookupNamespaceName, LookupNestedNameSpecifierName, LookupOrdinaryName, LookupQualifiedName(), clang::CXXScopeSpec::Make(), clang::CXXScopeSpec::MakeTrivial(), MarkAnyDeclReferenced(), clang::None, clang::Sema::NestedNameSpecInfo::ObjectType, clang::SemaBase::PDiag(), clang::TypeLocBuilder::push(), RequireCompleteDeclContext(), clang::Result, clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::TagTypeLoc::setElaboratedKeywordLoc(), clang::LookupResult::suppressDiagnostics(), and clang::T.
Referenced by ActOnCXXNestedNameSpecifier(), and IsInvalidUnlessNestedName().
| 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 2139 of file SemaExprCXX.cpp.
References clang::alignedAllocationModeFromBool(), clang::AlreadyDiagnosed, clang::Both, clang::Braces, clang::cast(), CheckAllocatedType(), CheckArgsForPlaceholders(), checkArrayElementAlignment(), checkCall(), CheckPlaceholderExpr(), Context, clang::Converting, clang::CPlusPlus14, clang::CPlusPlus17, clang::CPlusPlus20, clang::CXXNewExpr::Create(), clang::IntegerLiteral::Create(), clang::InitializationKind::CreateDefault(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateRemoval(), DeduceAutoType(), DeduceTemplateSpecializationFromInitializer(), clang::SemaBase::Diag(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), clang::DoesNotApply, doesUsualArrayDeleteWantSize(), clang::ExprError(), FindAllocationFunctions(), clang::Function, GatherArgumentsForCall(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::Type::getContainedDeducedType(), clang::SourceRange::getEnd(), clang::Expr::getExprLoc(), getLangOpts(), clang::Decl::getLocation(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), getSourceManager(), clang::Stmt::getSourceRange(), clang::TypeLoc::getSourceRange(), getStdAlignValT(), clang::Expr::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Global, clang::Expr::hasAnyTypeDependentArguments(), InitializationSequence, clang::InitializedEntity::InitializeNew(), clang::Initializer, clang::Inits, clang::isa(), clang::isAlignedAllocation(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isLegalArrayNewInitializer(), clang::QualType::isNull(), clang::Type::isObjCLifetimeType(), clang::isTypeAwareAllocation(), clang::SourceLocation::isValid(), clang::SourceRange::isValid(), MarkFunctionReferenced(), clang::None, clang::Normal, clang::Qualifiers::OCL_None, clang::OK_Ordinary, clang::ImplicitCastExpr::OnStack, clang::Parens, clang::ImplicitAllocationParameters::PassAlignment, clang::ImplicitAllocationParameters::PassTypeIdentity, clang::InitializationSequence::Perform(), PerformContextualImplicitConversion(), PerformImplicitConversion(), clang::Result, Sema(), ShouldUseTypeAwareOperatorNewOrDelete(), StdAlignValT, clang::Success, clang::T, toString(), and clang::VK_PRValue.
Referenced by ActOnCXXNew(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXNewExpr().
| ExprResult Sema::BuildCXXNoexceptExpr | ( | SourceLocation | KeyLoc, |
| Expr * | Operand, | ||
| SourceLocation | RParen ) |
Definition at line 7366 of file SemaExprCXX.cpp.
References CanThrow(), canThrow(), CheckPlaceholderExpr(), CheckUnevaluatedOperand(), Context, clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), inTemplateInstantiation(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by ActOnNoexceptExpr().
| Expr * Sema::BuildCXXThisExpr | ( | SourceLocation | Loc, |
| QualType | Type, | ||
| bool | IsImplicit ) |
Build a CXXThisExpr and mark it referenced in the current context.
Definition at line 1440 of file SemaExprCXX.cpp.
References Context, clang::CXXThisExpr::Create(), and MarkThisReferenced().
Referenced by ActOnCXXThis(), BuildCaptureInit(), BuildImplicitMemberExpr(), BuildMemberReferenceExpr(), FixOverloadedFunctionReference(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXThisExpr().
| ExprResult Sema::BuildCXXThrow | ( | SourceLocation | OpLoc, |
| Expr * | Ex, | ||
| bool | IsThrownVarInScope ) |
Definition at line 854 of file SemaExprCXX.cpp.
References CheckCXXThrowOperand(), clang::SemaPPC::CheckPPCMMAType(), Context, CUDA(), clang::SemaCUDA::CurrentTarget(), clang::SemaBase::Diag(), clang::SemaCUDA::DiagIfDeviceCode(), DiagnoseExceptionUse(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), getCurScope(), getLangOpts(), getNamedReturnInfo(), clang::Expr::getType(), clang::InitializedEntity::InitializeException(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), OpenACC(), PerformMoveOrCopyInitialization(), PPC(), clang::T, targetDiag(), and clang::Scope::TryScope.
Referenced by ActOnCXXThrow(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXThrowExpr().
| ExprResult Sema::BuildCXXTypeConstructExpr | ( | TypeSourceInfo * | Type, |
| SourceLocation | LParenLoc, | ||
| MultiExprArg | Exprs, | ||
| SourceLocation | RParenLoc, | ||
| bool | ListInitialization ) |
Definition at line 1522 of file SemaExprCXX.cpp.
References clang::AlreadyDiagnosed, BuildCXXFunctionalCastExpr(), clang::cast(), Context, clang::CPlusPlus23, clang::CXXFunctionalCastExpr::Create(), clang::CXXUnresolvedConstructExpr::Create(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), clang::InitializationKind::CreateValue(), CurFPFeatureOverrides(), DeduceAutoType(), DeduceTemplateSpecializationFromInitializer(), clang::SemaBase::Diag(), clang::ExprError(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::TypeLoc::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::QualType::getUnqualifiedType(), clang::Expr::getValueKindForType(), clang::Expr::hasAnyTypeDependentArguments(), InitializationSequence, clang::InitializedEntity::InitializeTemporary(), clang::Inits, clang::isa(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::QualType::isNull(), clang::Type::isVoidType(), clang::InitializationSequence::Perform(), RequireCompleteType(), clang::Result, clang::Success, and clang::VK_PRValue.
Referenced by ActOnCXXTypeConstructExpr(), clang::TreeTransform< AdjustConstraints >::RebuildCXXFunctionalCastExpr(), clang::TreeTransform< AdjustConstraints >::RebuildCXXScalarValueInitExpr(), clang::TreeTransform< AdjustConstraints >::RebuildCXXTemporaryObjectExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXUnresolvedConstructExpr().
| ExprResult Sema::BuildCXXTypeId | ( | QualType | TypeInfoType, |
| SourceLocation | TypeidLoc, | ||
| Expr * | Operand, | ||
| SourceLocation | RParenLoc ) |
Build a C++ typeid expression with an expression operand.
Definition at line 562 of file SemaExprCXX.cpp.
References CheckPlaceholderExpr(), CheckUnevaluatedOperand(), Context, clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Expr::hasPlaceholderType(), clang::Expr::HasSideEffects(), ImpCastExprToType(), inTemplateInstantiation(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), isUnevaluatedContext(), clang::Type::isVariablyModifiedType(), MarkVTableUsed(), RequireCompleteType(), clang::Result, clang::T, TransformToPotentiallyEvaluated(), and clang::QualType::withConst().
| ExprResult Sema::BuildCXXTypeId | ( | QualType | TypeInfoType, |
| SourceLocation | TypeidLoc, | ||
| TypeSourceInfo * | Operand, | ||
| SourceLocation | RParenLoc ) |
Build a C++ typeid expression with a type operand.
Definition at line 535 of file SemaExprCXX.cpp.
References CheckQualifiedFunctionForTypeId(), Context, clang::SemaBase::Diag(), clang::ExprError(), RequireCompleteType(), clang::T, and clang::QualType::withConst().
Referenced by ActOnCXXTypeid(), clang::TreeTransform< AdjustConstraints >::RebuildCXXTypeidExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXTypeidExpr().
| ExprResult Sema::BuildCXXUuidof | ( | QualType | TypeInfoType, |
| SourceLocation | TypeidLoc, | ||
| Expr * | Operand, | ||
| SourceLocation | RParenLoc ) |
Build a Microsoft __uuidof expression with an expression operand.
Definition at line 757 of file SemaExprCXX.cpp.
References Context, clang::SemaBase::Diag(), clang::ExprError(), clang::Expr::getType(), getUuidAttrOfType(), clang::Type::isDependentType(), clang::Expr::isNullPointerConstant(), and clang::Expr::NPC_ValueDependentIsNull.
| ExprResult Sema::BuildCXXUuidof | ( | QualType | TypeInfoType, |
| SourceLocation | TypeidLoc, | ||
| TypeSourceInfo * | Operand, | ||
| SourceLocation | RParenLoc ) |
Build a Microsoft __uuidof expression with a type operand.
Definition at line 738 of file SemaExprCXX.cpp.
References Context, clang::SemaBase::Diag(), clang::ExprError(), and getUuidAttrOfType().
Referenced by ActOnCXXUuidof(), clang::TreeTransform< AdjustConstraints >::RebuildCXXUuidofExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXUuidofExpr().
| ExprResult Sema::BuildDeclarationNameExpr | ( | const CXXScopeSpec & | SS, |
| const DeclarationNameInfo & | NameInfo, | ||
| NamedDecl * | D, | ||
| NamedDecl * | FoundD = nullptr, | ||
| const TemplateArgumentListInfo * | TemplateArgs = nullptr, | ||
| bool | AcceptInvalidDecl = false ) |
Complete semantic analysis for a reference to the given declaration.
Definition at line 3266 of file SemaExpr.cpp.
References BuildAnonymousStructUnionMemberReference(), BuildDeclRefExpr(), clang::cast(), CheckDeclInExpr(), Context, clang::CPlusPlus, CreateRecoveryExpr(), clang::SemaBase::Diag(), diagnoseMissingTemplateArguments(), DiagnoseUseOfDecl(), clang::ExprError(), clang::DeclarationNameInfo::getBeginLoc(), getCapturedDeclRefType(), clang::DeclarationNameInfo::getEndLoc(), clang::FunctionType::getExtInfo(), clang::Decl::getKind(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::CXXScopeSpec::getRange(), clang::FunctionType::getReturnType(), clang::isa(), isAttrContext(), clang::QualType::isNull(), isUnevaluatedContext(), clang::ast_matchers::type, clang::VK_LValue, and clang::VK_PRValue.
| ExprResult Sema::BuildDeclarationNameExpr | ( | const CXXScopeSpec & | SS, |
| LookupResult & | R, | ||
| bool | NeedsADL, | ||
| bool | AcceptInvalidDecl = false ) |
Definition at line 3233 of file SemaExpr.cpp.
References clang::LookupResult::begin(), BuildDeclarationNameExpr(), CheckDeclInExpr(), Context, clang::UnresolvedLookupExpr::Create(), clang::LookupResult::end(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::LookupResult::getFoundDecl(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNameLoc(), clang::LookupResult::getNamingClass(), clang::LookupResult::getRepresentativeDecl(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isSingleResult(), ShouldLookupResultBeMultiVersionOverload(), and clang::LookupResult::suppressDiagnostics().
Referenced by ActOnBlockStmtExpr(), ActOnIdExpression(), ActOnNameClassifiedAsNonType(), ActOnNameClassifiedAsUndeclaredNonType(), BuildAnonymousStructUnionMemberReference(), BuildCaptureInit(), buildCoroutineHandle(), BuildDeclarationNameExpr(), BuildExpressionFromDeclTemplateArgument(), BuildMemberReferenceExpr(), BuildPossibleImplicitMemberExpr(), BuildQualifiedDeclarationNameExpr(), BuildRecoveryCallExpr(), BuildSynthesizedThreeWayComparison(), checkTupleLikeDecomposition(), CheckVarTemplateId(), isTupleLike(), clang::TreeTransform< AdjustConstraints >::RebuildDeclarationNameExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildDeclRefExpr().
| Sema::DeclGroupPtrTy Sema::BuildDeclaratorGroup | ( | MutableArrayRef< Decl * > | Group | ) |
BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necessary semantic checking.
Definition at line 15416 of file SemaDecl.cpp.
References ActOnDocumentableDecls(), Context, clang::DeclGroupRef::Create(), clang::SemaBase::Diag(), clang::TypeLoc::getBeginLoc(), clang::Type::getContainedDeducedType(), clang::NamedDecl::getDeclName(), clang::VarDecl::getInit(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::VarDecl::hasInit(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::OpaquePtr< DeclGroupRef >::make(), and clang::Decl::setInvalidDecl().
Referenced by ActOnCXXForRangeStmt(), clang::CreateDGPtrFrom(), FinalizeDeclaratorGroup(), and clang::TreeTransform< AdjustConstraints >::RebuildDeclStmt().
| DeclRefExpr * Sema::BuildDeclRefExpr | ( | ValueDecl * | D, |
| QualType | Ty, | ||
| ExprValueKind | VK, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const CXXScopeSpec * | SS = nullptr, | ||
| NamedDecl * | FoundD = nullptr, | ||
| SourceLocation | TemplateKWLoc = SourceLocation(), | ||
| const TemplateArgumentListInfo * | TemplateArgs = nullptr ) |
Definition at line 2309 of file SemaExpr.cpp.
References BuildDeclRefExpr(), Context, and clang::CXXScopeSpec::getWithLocInContext().
| DeclRefExpr * Sema::BuildDeclRefExpr | ( | ValueDecl * | D, |
| QualType | Ty, | ||
| ExprValueKind | VK, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| NestedNameSpecifierLoc | NNS, | ||
| NamedDecl * | FoundD = nullptr, | ||
| SourceLocation | TemplateKWLoc = SourceLocation(), | ||
| const TemplateArgumentListInfo * | TemplateArgs = nullptr ) |
BuildDeclRefExpr - Build an expression that references a declaration that does not require a closure capture.
Definition at line 2378 of file SemaExpr.cpp.
References Context, clang::DeclRefExpr::Create(), Diags, clang::Type::getAs(), clang::DeclRefExpr::getBeginLoc(), getCurFunction(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), getNonOdrUseReasonInCurrentContext(), clang::QualType::getObjCLifetime(), clang::QualType::getQualifiers(), clang::isa(), isUnevaluatedContext(), clang::isUnresolvedExceptionSpec(), MarkDeclRefReferenced(), NeedToCaptureVariable(), clang::Qualifiers::OCL_Weak, clang::OK_BitField, clang::sema::FunctionScopeInfo::recordUseOfWeak(), ResolveExceptionSpec(), clang::Expr::setObjectKind(), clang::Expr::setType(), and UnusedPrivateFields.
| DeclRefExpr * Sema::BuildDeclRefExpr | ( | ValueDecl * | D, |
| QualType | Ty, | ||
| ExprValueKind | VK, | ||
| SourceLocation | Loc, | ||
| const CXXScopeSpec * | SS = nullptr ) |
Definition at line 2301 of file SemaExpr.cpp.
References BuildDeclRefExpr(), and clang::NamedDecl::getDeclName().
Referenced by ActOnIdExpression(), AttachTypeConstraint(), BuildBuiltinCallExpr(), buildCoroutineParameterMoves(), buildCoroutinePromise(), BuildCXXForRangeStmt(), BuildDeclarationNameExpr(), buildDeclareReductionRef(), BuildDeclRefExpr(), BuildDeclRefExpr(), buildDistanceFunc(), buildLoopVarFunc(), buildMemcpyForAssignmentOp(), buildPromiseCall(), buildStdNoThrowDeclRef(), buildUserDefinedMapperRef(), CheckConditionVariable(), checkMemberDecomposition(), CheckPlaceholderExpr(), checkSimpleDecomposition(), checkTupleLikeDecomposition(), collectPlacementArgs(), DefineImplicitLambdaToFunctionPointerConversion(), findOMPAllocatorHandleT(), FixOverloadedFunctionReference(), and clang::TreeTransform< AdjustConstraints >::RebuildMemberExpr().
If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building a type for decltype(auto).
Definition at line 9822 of file SemaType.cpp.
References CodeSynthesisContexts, Context, clang::SemaBase::Diag(), getDecltypeForExpr(), clang::Expr::getExprLoc(), clang::Expr::hasPlaceholderType(), clang::Expr::HasSideEffects(), and clang::Expr::isInstantiationDependent().
Referenced by ActOnCXXNestedNameSpecifierDecltype(), ActOnPseudoDestructorExpr(), AttachTypeConstraint(), BuildMemInitializer(), ConvertDeclSpecToType(), and getDestructorTypeForDecltype().
| MemInitResult Sema::BuildDelegatingInitializer | ( | TypeSourceInfo * | TInfo, |
| Expr * | Init, | ||
| CXXRecordDecl * | ClassDecl ) |
Definition at line 4681 of file SemaDeclCXX.cpp.
References ActOnFinishFullExpr(), clang::cast(), clang::Expr::containsErrors(), Context, clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), CreateRecoveryExpr(), CurContext, Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::Init, InitializationSequence, clang::InitializedEntity::InitializeDelegation(), clang::ActionResult< PtrTy, Compress >::isInvalid(), LangOpts, and clang::InitializationSequence::Perform().
Referenced by BuildBaseInitializer(), and InstantiateMemInitializers().
| ExprResult Sema::BuildDependentDeclRefExpr | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs ) |
Definition at line 762 of file SemaTemplate.cpp.
References Context, clang::DependentScopeDeclRefExpr::Create(), CreateRecoveryExpr(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclarationNameInfo::getEndLoc(), clang::TemplateArgumentListInfo::getRAngleLoc(), clang::CXXScopeSpec::getWithLocInContext(), and clang::CXXScopeSpec::isValid().
Referenced by ActOnDependentIdExpression(), BuildQualifiedDeclarationNameExpr(), and BuildQualifiedTemplateIdExpr().
| ExprResult Sema::BuildEmptyCXXFoldExpr | ( | SourceLocation | EllipsisLoc, |
| BinaryOperatorKind | Operator ) |
Definition at line 1598 of file SemaTemplateVariadic.cpp.
References ActOnCXXBoolLiteral(), Context, clang::SemaBase::Diag(), and clang::BinaryOperator::getOpcodeStr().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildEmptyCXXFoldExpr().
| VarDecl * Sema::BuildExceptionDeclaration | ( | Scope * | S, |
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | StartLoc, | ||
| SourceLocation | IdLoc, | ||
| const IdentifierInfo * | Id ) |
Perform semantic analysis for the variable declaration that occurs within a C++ catch clause, returning the newly-created variable.
Definition at line 17278 of file SemaDeclCXX.cpp.
References AbstractVariableType, Context, clang::VarDecl::Create(), clang::InitializationKind::CreateCopy(), CurContext, Diag(), FinalizeVarWithDestructor(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::CXXConstructExpr::getConstructor(), getLangOpts(), clang::TypeSourceInfo::getType(), InitializationSequence, clang::InitializedEntity::InitializeVariable(), clang::Invalid, clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ObjCRuntime::isFragile(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isRValueReferenceType(), clang::FunctionDecl::isTrivial(), clang::Type::isVariablyModifiedType(), MaybeCreateExprWithCleanups(), clang::ObjC, ObjC(), clang::OK_Ordinary, clang::InitializationSequence::Perform(), PotentiallyEvaluated, RequireCompleteType(), RequireNonAbstractType(), clang::SC_None, clang::VarDecl::setExceptionVariable(), clang::VarDecl::setInit(), clang::Decl::setInvalidDecl(), clang::T, and clang::VK_LValue.
Referenced by ActOnExceptionDeclarator(), and clang::TreeTransform< AdjustConstraints >::RebuildExceptionDecl().
| ExprResult Sema::BuildExpressionFromDeclTemplateArgument | ( | const TemplateArgument & | Arg, |
| QualType | ParamType, | ||
| SourceLocation | Loc, | ||
| NamedDecl * | TemplateParam = nullptr ) |
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.
FIXME: This is used in some contexts where the resulting expression doesn't need to live too long. It would be useful if this function could return a temporary expression.
Definition at line 7909 of file SemaTemplate.cpp.
References BuildDeclarationNameExpr(), clang::cast(), Context, CreateBuiltinUnaryOp(), clang::TemplateArgument::Declaration, DefaultFunctionArrayConversion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getArrayElementTypeNoTypeQual(), clang::Type::getAs(), clang::TemplateArgument::getAsDecl(), getASTContext(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Expr::getExprLoc(), clang::TemplateArgument::getKind(), clang::QualType::getNonLValueExprType(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::CanQual< T >::getTypePtr(), clang::Expr::getValueKind(), ImpCastExprToType(), clang::isa(), 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::TemplateParam.
Referenced by BuildExpressionFromNonTypeTemplateArgument(), and getTrivialTemplateArgumentLoc().
| ExprResult Sema::BuildExpressionFromNonTypeTemplateArgument | ( | const TemplateArgument & | Arg, |
| SourceLocation | Loc ) |
Definition at line 8152 of file SemaTemplate.cpp.
References BuildExpressionFromDeclTemplateArgument(), BuildExpressionFromIntegralTemplateArgumentValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsIntegral(), clang::TemplateArgument::getAsStructuralValue(), clang::TemplateArgument::getIntegralType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getNonTypeTemplateArgumentType(), clang::TemplateArgument::getStructuralValueType(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::StructuralValue, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by CheckTemplateArgument(), and getTrivialTemplateArgumentLoc().
| ExprResult Sema::BuildExpressionTrait | ( | ExpressionTrait | OET, |
| SourceLocation | KWLoc, | ||
| Expr * | Queried, | ||
| SourceLocation | RParen ) |
Definition at line 1911 of file SemaTypeTraits.cpp.
References BuildExpressionTrait(), CheckPlaceholderExpr(), Context, EvaluateExpressionTrait(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::hasPlaceholderType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::Expr::isTypeDependent().
Referenced by ActOnExpressionTrait(), BuildExpressionTrait(), and clang::TreeTransform< AdjustConstraints >::RebuildExpressionTrait().
| concepts::ExprRequirement * Sema::BuildExprRequirement | ( | concepts::Requirement::SubstitutionDiagnostic * | ExprSubstDiag, |
| bool | IsSatisfied, | ||
| SourceLocation | NoexceptLoc, | ||
| concepts::ExprRequirement::ReturnTypeRequirement | ReturnTypeRequirement ) |
Definition at line 7944 of file SemaExprCXX.cpp.
References Context.
| concepts::ExprRequirement * Sema::BuildExprRequirement | ( | Expr * | E, |
| bool | IsSatisfied, | ||
| SourceLocation | NoexceptLoc, | ||
| concepts::ExprRequirement::ReturnTypeRequirement | ReturnTypeRequirement ) |
Definition at line 7888 of file SemaExprCXX.cpp.
References clang::MultiLevelTemplateArgumentList::addOuterRetainedLevels(), canThrow(), clang::cast(), clang::ASTConstraintSatisfaction::ContainsErrors, Context, createSubstDiagAt(), clang::CT_Can, clang::ActionResult< PtrTy, Compress >::get(), clang::TemplateParameterList::getDepth(), clang::TypeConstraint::getImmediatelyDeclaredConstraint(), clang::TemplateParameterList::getParam(), clang::ConceptSpecializationExpr::getSatisfaction(), clang::Expr::getType(), clang::concepts::ExprRequirement::ReturnTypeRequirement::getTypeConstraintTemplateParameterList(), clang::concepts::ExprRequirement::ReturnTypeRequirement::isDependent(), clang::Expr::isInstantiationDependent(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isPlaceholderType(), clang::ConceptSpecializationExpr::isSatisfied(), clang::concepts::ExprRequirement::ReturnTypeRequirement::isSubstitutionFailure(), clang::concepts::ExprRequirement::ReturnTypeRequirement::isTypeConstraint(), clang::SourceLocation::isValid(), OS, clang::concepts::ExprRequirement::SS_ConstraintsNotSatisfied, clang::concepts::ExprRequirement::SS_Dependent, clang::concepts::ExprRequirement::SS_NoexceptNotMet, clang::concepts::ExprRequirement::SS_Satisfied, clang::concepts::ExprRequirement::SS_TypeRequirementSubstitutionFailure, and SubstExpr().
Referenced by ActOnCompoundRequirement(), ActOnCompoundRequirement(), and ActOnSimpleRequirement().
| QualType Sema::BuildExtVectorType | ( | QualType | T, |
| Expr * | ArraySize, | ||
| SourceLocation | AttrLoc ) |
Build an ext-vector type.
Run the required checks for the extended vector type.
Definition at line 2404 of file SemaType.cpp.
References clang::AANT_ArgumentIntegerConstant, CheckBitIntElementType(), Context, clang::SemaBase::Diag(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::T.
Referenced by HandleExtVectorTypeAttr().
| ExprResult Sema::BuildFieldReferenceExpr | ( | Expr * | BaseExpr, |
| bool | IsArrow, | ||
| SourceLocation | OpLoc, | ||
| const CXXScopeSpec & | SS, | ||
| FieldDecl * | Field, | ||
| DeclAccessPair | FoundDecl, | ||
| const DeclarationNameInfo & | MemberNameInfo ) |
Definition at line 1761 of file SemaExprMember.cpp.
References BuildMemberExpr(), clang::Type::castAs(), Context, CurContext, clang::ExprError(), clang::Type::getAs(), getDefaultedFunctionKind(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::Expr::getObjectKind(), clang::SemaOpenMP::getOpenMPCapturedExpr(), clang::Type::getPointeeType(), getPointeeType(), clang::CXXScopeSpec::getScopeRep(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::CXXScopeSpec::getWithLocInContext(), clang::Qualifiers::hasAddressSpace(), clang::isa(), clang::Sema::DefaultedFunctionKind::isSpecialMember(), clang::Method, clang::OK_BitField, clang::OK_Ordinary, OpenMP(), PerformObjectMemberConversion(), clang::Qualifiers::removeConst(), clang::Qualifiers::removeObjCGCAttr(), UnusedPrivateFields, clang::VK_LValue, and clang::VK_PRValue.
Referenced by BuildAnonymousStructUnionMemberReference(), BuildMemberReferenceExpr(), checkMemberDecomposition(), and clang::TreeTransform< AdjustConstraints >::RebuildMemberExpr().
| 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 16885 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::BestViableFunction(), BuildCallExpr(), BuildMemberReferenceExpr(), buildOverloadedCallSet(), clang::cast(), clang::OverloadCandidateSet::clear(), CreateUnresolvedLookupExpr(), clang::OverloadCandidateSet::CSK_Normal, clang::LookupResult::empty(), clang::OverloadCandidateSet::empty(), clang::ExprError(), FinishOverloadedCallExpr(), FRS_DiagnosticIssued, FRS_NoViableFunction, FRS_Success, clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::OR_No_Viable_Function, and clang::OR_Success.
Referenced by BuildNonArrayForRange().
| 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.
| T | The return type of the function. |
| ParamTypes | The parameter types of the function. This array will be modified to account for adjustments to the types of the function parameters. |
| Loc | The location of the entity whose type involves this function type or, if there is no such entity, the location of the type that will have function type. |
| Entity | The name of the entity that involves the function type, if known. |
| EPI | Extra information about the function type. Usually this will be taken from an existing function with the same prototype. |
Definition at line 2662 of file SemaType.cpp.
References checkExtParameterInfos(), CheckFunctionReturnType(), clang::SemaObjC::checkNSReturnsRetainedReturnType(), Context, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionProtoType::ExtProtoInfo::ExtParameterInfos, getLangOpts(), clang::QualType::getPointerAuth(), clang::FunctionType::ExtInfo::getProducesResult(), clang::Invalid, clang::Type::isHalfType(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), clang::Type::isWebAssemblyTableType(), ObjC(), and clang::T.
Referenced by SubstituteExplicitTemplateArguments().
| StmtResult Sema::BuildIfStmt | ( | SourceLocation | IfLoc, |
| IfStatementKind | StatementKind, | ||
| SourceLocation | LParenLoc, | ||
| Stmt * | InitStmt, | ||
| ConditionResult | Cond, | ||
| SourceLocation | RParenLoc, | ||
| Stmt * | ThenVal, | ||
| SourceLocation | ElseLoc, | ||
| Stmt * | ElseVal ) |
Definition at line 1032 of file SemaStmt.cpp.
References clang::Cond, Context, clang::IfStmt::Create(), clang::isa(), clang::Ordinary, setFunctionHasBranchProtectedScope(), and clang::StmtError().
Referenced by ActOnIfStmt().
| ExprResult Sema::BuildImplicitMemberExpr | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| LookupResult & | R, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| bool | IsDefiniteInstance, | ||
| 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 1851 of file SemaExprMember.cpp.
References BuildCXXThisExpr(), BuildMemberReferenceExpr(), clang::LookupResult::empty(), clang::SourceRange::getBegin(), getCurrentThisType(), getLangOpts(), clang::LookupResult::getNameLoc(), clang::CXXScopeSpec::getRange(), HLSL(), clang::LookupResult::isAmbiguous(), clang::QualType::isNull(), and clang::SourceRange::isValid().
Referenced by BuildPossibleImplicitMemberExpr().
| ExprResult Sema::BuildInitList | ( | SourceLocation | LBraceLoc, |
| MultiExprArg | InitArgList, | ||
| SourceLocation | RBraceLoc ) |
Definition at line 7446 of file SemaExpr.cpp.
References CheckPlaceholderExpr(), Context, clang::ActionResult< PtrTy, Compress >::get(), getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::Expr::setType().
Referenced by ActOnInitList().
| ExprResult Sema::BuildLambdaExpr | ( | SourceLocation | StartLoc, |
| SourceLocation | EndLoc ) |
Complete a lambda-expression having processed and attached the lambda body.
Definition at line 2141 of file SemaLambda.cpp.
References ActOnFields(), addBlockPointerConversion(), addFunctionPointerConversions(), AnalysisWarnings, BuildCaptureField(), BuildCaptureInit(), clang::sema::LambdaScopeInfo::CallOperator, clang::sema::LambdaScopeInfo::CaptureDefaultLoc, clang::sema::CapturingScopeInfo::Captures, clang::cast(), CheckCompletedCXXClass(), CheckConstexprFunctionDefinition(), clang::SemaCUDA::CheckLambdaCapture(), CheckValid, clang::Class, Cleanup, clang::sema::LambdaScopeInfo::Cleanup, ConstantEvaluated, clang::Constexpr, ConstructFixItRangeForUnusedCapture(), clang::sema::CapturingScopeInfo::ContainsUnexpandedParameterPack, Context, clang::CPlusPlus17, clang::CPlusPlus20, clang::LambdaExpr::Create(), clang::FixItHint::CreateInsertion(), CUDA(), CurContext, clang::SemaBase::Diag(), DiagnoseShadowingLambdaDecls(), DiagnoseUnusedLambdaCapture(), DiscardedStatement, clang::sema::LambdaScopeInfo::ExplicitCaptureRanges, clang::sema::LambdaScopeInfo::ExplicitParams, clang::ExprError(), ExprEvalContexts, FunctionScopes, 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, ImmediateFunctionContext, clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::Init, clang::sema::LambdaScopeInfo::IntroducerRange, clang::isa(), clang::sema::Capture::isBlockCapture(), clang::FunctionDecl::isConstexpr(), clang::sema::Capture::isCopyCapture(), 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(), maybeAddDeclWithEffects(), MaybeBindToTemporary(), clang::sema::LambdaScopeInfo::NumExplicitCaptures, ObjC(), PopExpressionEvaluationContext(), PopFunctionScopeInfo(), PotentiallyEvaluated, PotentiallyEvaluatedIfUsed, clang::FunctionDecl::setConstexprKind(), clang::Decl::setLexicalDeclContext(), Unevaluated, UnevaluatedAbstract, UnevaluatedList, and clang::Unspecified.
Referenced by ActOnLambdaExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildLambdaExpr().
| QualType Sema::buildLambdaInitCaptureInitialization | ( | SourceLocation | Loc, |
| bool | ByRef, | ||
| SourceLocation | EllipsisLoc, | ||
| UnsignedOrNone | NumExpansions, | ||
| IdentifierInfo * | Id, | ||
| bool | DirectInit, | ||
| Expr *& | Init ) |
Definition at line 805 of file SemaLambda.cpp.
References BuildReferenceType(), Context, clang::CPlusPlus20, clang::InitializationKind::CreateCopy(), clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), deduceVarTypeFromInitializer(), clang::SemaBase::Diag(), clang::ParenListExpr::getExprs(), getLangOpts(), clang::ParenListExpr::getNumExprs(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::Init, InitializationSequence, clang::InitializedEntity::InitializeLambdaCapture(), clang::QualType::isNull(), clang::SourceLocation::isValid(), clang::InitializationSequence::Perform(), clang::TypeLocBuilder::push(), clang::Result, and clang::TypeSpecTypeLoc::setNameLoc().
Referenced by actOnLambdaInitCaptureInitialization().
| void Sema::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.
Definition at line 545 of file SemaLambda.cpp.
References clang::sema::LambdaScopeInfo::CallOperator, clang::sema::LambdaScopeInfo::CaptureDefaultLoc, clang::sema::LambdaScopeInfo::ExplicitParams, clang::CXXMethodDecl::getParent(), clang::sema::CapturingScopeInfo::ImpCaptureStyle, clang::sema::LambdaScopeInfo::IntroducerRange, clang::sema::LambdaScopeInfo::Lambda, clang::LCD_ByCopy, clang::LCD_ByRef, and clang::sema::LambdaScopeInfo::Mutable.
| ExprResult Sema::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.
Definition at line 16809 of file SemaOverload.cpp.
References AddNonMemberOperatorCandidates(), clang::LookupResult::asUnresolvedSet(), clang::OverloadCandidateSet::BestViableFunction(), CheckCallReturnType(), CheckForImmediateInvocation(), CheckFunctionCall(), Context, clang::UserDefinedLiteral::Create(), CreateFunctionRefExpr(), clang::OverloadCandidateSet::CSK_Normal, CurFPFeatureOverrides(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::DeclarationNameInfo::getCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::getInfo(), clang::DeclarationNameInfo::getLoc(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::Expr::getValueKindForType(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, Compress >::isInvalid(), MaybeBindToTemporary(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::SemaBase::PDiag(), PerformCopyInitialization(), and clang::OverloadCandidateSet::size().
Referenced by ActOnNumericConstant(), ActOnStringLiteral(), and BuildCookedLiteralOperatorCall().
| QualType Sema::BuildMatrixType | ( | QualType | T, |
| Expr * | NumRows, | ||
| Expr * | NumColumns, | ||
| SourceLocation | AttrLoc ) |
Definition at line 2463 of file SemaType.cpp.
References clang::AANT_ArgumentIntegerConstant, CheckBitIntElementType(), Context, clang::SemaBase::Diag(), clang::Type::getAs(), clang::Expr::getIntegerConstantExpr(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Type::isDependentType(), clang::Expr::isTypeDependent(), clang::MatrixType::isValidElementType(), and clang::Expr::isValueDependent().
Referenced by HandleMatrixTypeAttr().
| MemberExpr * Sema::BuildMemberExpr | ( | Expr * | Base, |
| bool | IsArrow, | ||
| SourceLocation | OpLoc, | ||
| NestedNameSpecifierLoc | NNS, | ||
| SourceLocation | TemplateKWLoc, | ||
| ValueDecl * | Member, | ||
| DeclAccessPair | FoundDecl, | ||
| bool | HadMultipleCandidates, | ||
| const DeclarationNameInfo & | MemberNameInfo, | ||
| QualType | Ty, | ||
| ExprValueKind | VK, | ||
| ExprObjectKind | OK, | ||
| const TemplateArgumentListInfo * | TemplateArgs = nullptr ) |
Definition at line 827 of file SemaExprMember.cpp.
References Context, clang::MemberExpr::Create(), clang::Type::getAs(), clang::DeclarationNameInfo::getLoc(), getNonOdrUseReasonInCurrentContext(), clang::QualType::getQualifiers(), clang::isUnresolvedExceptionSpec(), MarkMemberReferenced(), clang::Member, ResolveExceptionSpec(), clang::MemberExpr::setHadMultipleCandidates(), and clang::Expr::setType().
Referenced by BuildCXXMemberCallExpr(), BuildFieldReferenceExpr(), buildImplicitMap(), BuildMemberReferenceExpr(), FixOverloadedFunctionReference(), and processImplicitMapsWithDefaultMappers().
| MemInitResult Sema::BuildMemberInitializer | ( | ValueDecl * | Member, |
| Expr * | Init, | ||
| SourceLocation | IdLoc ) |
Definition at line 4598 of file SemaDeclCXX.cpp.
References ActOnFinishFullExpr(), Context, clang::InitializationKind::CreateDirect(), clang::InitializationKind::CreateDirectList(), CreateRecoveryExpr(), DiagnoseUnexpandedParameterPack(), DiscardCleanupsInEvaluationContext(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::Init, InitializationSequence, clang::InitializedEntity::InitializeMember(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Member, clang::InitializationSequence::Perform(), and UPPC_Initializer.
Referenced by BuildMemInitializer(), and InstantiateMemInitializers().
| QualType Sema::BuildMemberPointerType | ( | QualType | T, |
| const CXXScopeSpec & | SS, | ||
| CXXRecordDecl * | Cls, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity ) |
Build a member pointer type T Class::*.
| T | the type to which the member pointer refers. |
| Class | the class type into which the member pointer points. |
| Loc | the location where this type begins |
| Entity | the name of the entity that will have this member pointer type |
Definition at line 2715 of file SemaType.cpp.
References adjustMemberFunctionCC(), CheckDistantExceptionSpec(), computeDeclContext(), Context, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, clang::SemaBase::Diag(), clang::DeclarationName::getAsIdentifierInfo(), clang::CXXScopeSpec::getBeginLoc(), getLangOpts(), clang::DeclarationName::getNameKind(), getOpenCLOptions(), getPrintableNameForEntity(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), HLSL(), isDependentScopeSpecifier(), clang::SourceLocation::isValid(), OpenCL(), and clang::T.
Referenced by GetFullTypeForDeclarator().
| 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 869 of file SemaExprMember.cpp.
References ActOnDependentMemberExpr(), ActOnMemberAccessExpr(), ActOnStartCXXMemberReference(), clang::LookupResult::begin(), BuildAnonymousStructUnionMemberReference(), BuildCXXThisExpr(), BuildDeclarationNameExpr(), BuildFieldReferenceExpr(), BuildMemberExpr(), BuildMSPropertyRefExpr(), BuildTemplateIdExpr(), clang::cast(), CheckQualifiedMemberReference(), CheckVarTemplateId(), computeDeclContext(), Context, clang::CPlusPlus, clang::UnresolvedMemberExpr::Create(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), diagnoseMissingTemplateArguments(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::Enum, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), getCurFunctionDecl(), getCurScope(), clang::DeclarationName::getCXXOverloadedOperator(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getNameLoc(), clang::QualType::getNonReferenceType(), clang::UnresolvedSetIterator::getPair(), getPointeeType(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::Stmt::getSourceRange(), clang::VarDecl::getTemplateSpecializationKind(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CXXScopeSpec::getWithLocInContext(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Sema::ActOnMemberAccessExtraArgs::Id, IgnoredValueConversions(), clang::Expr::IgnoreImpCasts(), int, clang::isa(), clang::LookupResult::isAmbiguous(), clang::NamedDecl::isCXXInstanceMember(), clang::NestedNameSpecifier::isDependent(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::CXXScopeSpec::isEmpty(), IsInFnTryBlockHandler(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::LookupResult::isOverloadedResult(), clang::Expr::isPRValue(), clang::CXXScopeSpec::isSet(), clang::LookupResult::isSingleResult(), clang::Expr::isTypeDependent(), 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, clang::VK_PRValue, and clang::LookupResult::wasNotFoundInCurrentInstantiation().
| ExprResult Sema::BuildMemberReferenceExpr | ( | Expr * | Base, |
| QualType | BaseType, | ||
| SourceLocation | OpLoc, | ||
| bool | IsArrow, | ||
| CXXScopeSpec & | SS, | ||
| SourceLocation | TemplateKWLoc, | ||
| NamedDecl * | FirstQualifierInScope, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| const Scope * | S, | ||
| ActOnMemberAccessExtraArgs * | ExtraArgs = nullptr ) |
Definition at line 684 of file SemaExprMember.cpp.
References BuildMemberReferenceExpr(), clang::Type::castAs(), clang::ExprError(), getPointeeType(), clang::CXXScopeSpec::isInvalid(), LookupMemberExpr(), LookupMemberExprInRecord(), LookupMemberName, clang::Sema::ActOnMemberAccessExtraArgs::ObjCImpDecl, and clang::Result.
Referenced by ActOnMemberAccessExpr(), BuildForRangeBeginEndCall(), BuildImplicitMemberExpr(), BuildImplicitMemberInitializer(), buildMemberCall(), BuildMemberReferenceExpr(), buildSingleCopyAssignRecursively(), checkTupleLikeDecomposition(), EvaluateAsStringImpl(), LookupInlineAsmVarDeclField(), clang::TreeTransform< AdjustConstraints >::RebuildExtVectorElementExpr(), clang::TreeTransform< AdjustConstraints >::RebuildMemberExpr(), clang::TreeTransform< AdjustConstraints >::RebuildObjCIsaExpr(), clang::TreeTransform< AdjustConstraints >::RebuildObjCIvarRefExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildObjCPropertyRefExpr().
| 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 4387 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), clang::CXXRecordDecl::bases(), BuildBaseInitializer(), BuildDecltypeType(), BuildMemberInitializer(), BuildPackIndexingType(), clang::cast(), clang::TypeLoc::castAs(), CheckTypenameType(), clang::LookupResult::clear(), computeDeclContext(), clang::Constructor, Context, CorrectTypo(), clang::CPlusPlus20, Diag(), diagnoseTypo(), clang::LookupResult::empty(), clang::ErrorRecovery, FindBaseInitializer(), clang::OpaquePtr< PtrTy >::get(), clang::LookupResult::getAsSingle(), clang::CXXBaseSpecifier::getBeginLoc(), clang::DeclSpec::getBeginLoc(), clang::TypoCorrection::getCorrectionDeclAs(), clang::DeclSpec::getEllipsisLoc(), getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::DeclSpec::getPackIndexingExpr(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getRepAsType(), clang::CXXScopeSpec::getScopeRep(), clang::CXXBaseSpecifier::getSourceRange(), clang::CXXBaseSpecifier::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::Init, clang::LookupResult::isAmbiguous(), isDependentScopeSpecifier(), clang::CXXScopeSpec::isEmpty(), clang::TypeLoc::isNull(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), LookupOrdinaryName, LookupParsedName(), MarkAnyDeclReferenced(), clang::Member, clang::None, clang::SemaBase::PDiag(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::TagTypeLoc::setElaboratedKeywordLoc(), clang::LookupResult::setLookupName(), clang::DependentNameTypeLoc::setNameLoc(), clang::TypeSpecTypeLoc::setNameLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::LookupResult::suppressDiagnostics(), tryLookupCtorInitMemberDecl(), clang::TST_decltype, clang::TST_decltype_auto, and clang::TST_typename_pack_indexing.
Referenced by ActOnMemInitializer(), and ActOnMemInitializer().
| Decl * Sema::BuildMicrosoftCAnonymousStruct | ( | Scope * | S, |
| DeclSpec & | DS, | ||
| RecordDecl * | Record ) |
BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure.
Ref: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx Example:
struct A { int a; }; struct B { struct A; int b; };
void foo() { B var; var.a = 3; }
Definition at line 5950 of file SemaDecl.cpp.
References clang::AS_none, clang::cast(), Context, clang::FieldDecl::Create(), CurContext, clang::DeclSpec::getBeginLoc(), clang::Decl::getLocation(), GetTypeForDeclarator(), clang::ICIS_NoInit, InjectAnonymousStructOrUnionMembers(), clang::ParsedAttributesView::none(), RequireCompleteSizedType(), clang::Decl::setImplicit(), clang::Decl::setInvalidDecl(), StorageClassSpecToVarDeclStorageClass(), and clang::TypeName.
Referenced by ParsedFreeStandingDeclSpec().
| void Sema::BuildModuleInclude | ( | SourceLocation | DirectiveLoc, |
| Module * | Mod ) |
Definition at line 729 of file SemaModule.cpp.
References clang::DeclContext::addDecl(), clang::Module::AllVisible, clang::LangOptionsBase::CMK_ModuleInterface, Consumer, Context, clang::ImportDecl::CreateImplicit(), getASTContext(), getLangOpts(), getModuleLoader(), getSourceManager(), clang::ASTContext::getTranslationUnitDecl(), clang::SourceManager::isWrittenInMainFile(), clang::ModuleLoader::makeModuleVisible(), PP, clang::TU_ClangModule, and TUKind.
Referenced by ActOnAnnotModuleEnd(), and ActOnAnnotModuleInclude().
| StmtResult Sema::BuildMSDependentExistsStmt | ( | SourceLocation | KeywordLoc, |
| bool | IsIfExists, | ||
| NestedNameSpecifierLoc | QualifierLoc, | ||
| DeclarationNameInfo | NameInfo, | ||
| Stmt * | Nested ) |
Definition at line 4594 of file SemaStmt.cpp.
References clang::cast(), and Context.
Referenced by ActOnMSDependentExistsStmt(), and clang::TreeTransform< AdjustConstraints >::RebuildMSDependentExistsStmt().
| concepts::NestedRequirement * Sema::BuildNestedRequirement | ( | Expr * | E | ) |
Definition at line 7969 of file SemaExprCXX.cpp.
References CheckConstraintSatisfaction(), Context, clang::Stmt::getSourceRange(), clang::Expr::isInstantiationDependent(), and clang::Expr::isValueDependent().
Referenced by ActOnNestedRequirement().
| concepts::NestedRequirement * Sema::BuildNestedRequirement | ( | StringRef | InvalidConstraintEntity, |
| const ASTConstraintSatisfaction & | Satisfaction ) |
Definition at line 7983 of file SemaExprCXX.cpp.
References Context, and clang::ASTConstraintSatisfaction::Rebuild().
| 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 246 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< AdjustConstraints >::RebuildCoawaitExpr().
| ExprResult Sema::BuildOperatorCoawaitLookupExpr | ( | Scope * | S, |
| SourceLocation | Loc ) |
Definition at line 820 of file SemaCoroutine.cpp.
References clang::LookupResult::asUnresolvedSet(), Context, clang::UnresolvedLookupExpr::Create(), clang::LookupResult::isAmbiguous(), LookupName(), and LookupOperatorName.
Referenced by ActOnCoawaitExpr(), and buildOperatorCoawaitCall().
| 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 16679 of file SemaOverload.cpp.
References AddMethodCandidate(), clang::LookupResult::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::cast(), CheckCallReturnType(), CheckForImmediateInvocation(), CheckFunctionCall(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), clang::OverloadCandidateSet::CompleteCandidates(), Context, clang::CXXOperatorCallExpr::Create(), CreateFunctionRefExpr(), clang::FixItHint::CreateReplacement(), clang::OverloadCandidateSet::CSK_Operator, CurFPFeatureOverrides(), Diag(), clang::OverloadCandidateSet::empty(), clang::LookupResult::end(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getNonLValueExprType(), clang::StringLiteral::getString(), clang::Expr::getValueKindForType(), InitializeExplicitObjectArgument(), clang::LookupResult::isAmbiguous(), clang::ActionResult< PtrTy, Compress >::isInvalid(), LookupOrdinaryName, LookupQualifiedName(), MaybeBindToTemporary(), clang::Method, clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::SemaBase::PDiag(), PerformImplicitObjectArgumentInitialization(), RequireCompleteType(), clang::OverloadCandidateSet::size(), and clang::LookupResult::suppressAccessDiagnostics().
Referenced by ActOnStartCXXMemberReference().
| 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 14855 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::BestViableFunction(), buildOverloadedCallSet(), Context, clang::CallExpr::Create(), clang::OverloadCandidateSet::CSK_AddressOfOverloadSet, clang::OverloadCandidateSet::CSK_Normal, clang::CUDA, CurContext, CurFPFeatureOverrides(), clang::OverloadCandidateSet::end(), FinishOverloadedCallExpr(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::isTemplateInstantiation(), clang::Type::isUndeducedType(), LangOpts, markUnaddressableCandidatesUnviable(), clang::OR_No_Viable_Function, clang::OR_Success, clang::VK_PRValue, and clang::FunctionDecl::willHaveBody().
Referenced by BuildCallExpr().
| bool Sema::buildOverloadedCallSet | ( | Scope * | S, |
| Expr * | Fn, | ||
| UnresolvedLookupExpr * | ULE, | ||
| MultiExprArg | Args, | ||
| SourceLocation | RParenLoc, | ||
| OverloadCandidateSet * | CandidateSet, | ||
| ExprResult * | Result ) |
Constructs and populates an OverloadedCandidateSet from the given function.
Definition at line 14626 of file SemaOverload.cpp.
References AddOverloadedCallCandidates(), clang::OverloadCandidateSet::BestViableFunction(), checkArgPlaceholdersForOverload(), Context, clang::CPlusPlus, clang::CallExpr::Create(), CurContext, CurFPFeatureOverrides(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadCandidateSet::empty(), clang::ExprError(), clang::FunctionDecl::getBuiltinID(), getLangOpts(), clang::OverloadExpr::getQualifier(), clang::isa(), clang::Decl::isImplicit(), isSFINAEContext(), clang::CallExpr::markDependentForPostponedNameLookup(), clang::OR_No_Viable_Function, clang::UnresolvedLookupExpr::requiresADL(), clang::Result, and clang::VK_PRValue.
Referenced by BuildForRangeBeginEndCall(), and BuildOverloadedCallExpr().
| ExprResult Sema::BuildPackIndexingExpr | ( | Expr * | PackExpression, |
| SourceLocation | EllipsisLoc, | ||
| Expr * | IndexExpr, | ||
| SourceLocation | RSquareLoc, | ||
| ArrayRef< Expr * > | ExpandedExprs = {}, | ||
| bool | FullySubstituted = false ) |
Definition at line 1351 of file SemaTemplateVariadic.cpp.
References clang::ArrayBound, CheckConvertedConstantExpression(), Context, clang::PackIndexingExpr::Create(), clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), getASTContext(), clang::Stmt::getBeginLoc(), clang::Expr::isInstantiationDependent(), and clang::ActionResult< PtrTy, Compress >::isUsable().
Referenced by ActOnPackIndexingExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildPackIndexingExpr().
| QualType Sema::BuildPackIndexingType | ( | QualType | Pattern, |
| Expr * | IndexExpr, | ||
| SourceLocation | Loc, | ||
| SourceLocation | EllipsisLoc, | ||
| bool | FullySubstituted = false, | ||
| ArrayRef< QualType > | Expansions = {} ) |
Definition at line 9854 of file SemaType.cpp.
References clang::ArrayBound, CheckConvertedConstantExpression(), Context, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Expr::isValueDependent(), and V.
Referenced by ActOnPackIndexingType(), BuildMemInitializer(), and ConvertDeclSpecToType().
Build a paren type including T.
Definition at line 1675 of file SemaType.cpp.
References Context, and clang::T.
Referenced by GetFullTypeForDeclarator().
| ParmVarDecl * Sema::BuildParmVarDeclForTypedef | ( | DeclContext * | DC, |
| SourceLocation | Loc, | ||
| QualType | T ) |
Synthesizes a variable for a parameter arising from a typedef.
Definition at line 15707 of file SemaDecl.cpp.
References Context, clang::ParmVarDecl::Create(), clang::SC_None, and clang::T.
Referenced by ActOnBlockArguments(), ActOnFunctionDeclarator(), and DeclClonePragmaWeak().
| QualType Sema::BuildPointerType | ( | QualType | T, |
| SourceLocation | Loc, | ||
| DeclarationName | Entity ) |
Build a pointer type.
| T | The type to which we'll be building a pointer. |
| Loc | The location of the entity whose type involves this pointer type or, if there is no such entity, the location of the type that will have pointer type. |
| Entity | The name of the entity that involves the pointer type, if known. |
Definition at line 1805 of file SemaType.cpp.
References checkQualifiedFunction(), Context, deduceOpenCLPointeeAddrSpace(), clang::SemaBase::Diag(), getASTContext(), getLangOpts(), getOpenCLOptions(), getPrintableNameForEntity(), HLSL(), inferARCLifetimeForPointee(), clang::SourceLocation::isValid(), OpenCL(), and clang::T.
Referenced by BuiltinAddPointer(), and GetFullTypeForDeclarator().
| ExprResult Sema::BuildPossibleImplicitMemberExpr | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| LookupResult & | R, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| const Scope * | S ) |
Builds an expression which might be an implicit member expression.
Definition at line 303 of file SemaExprMember.cpp.
References clang::LookupResult::begin(), BuildDeclarationNameExpr(), BuildImplicitMemberExpr(), BuildTemplateIdExpr(), ClassifyImplicitMemberAccess(), Context, clang::UnresolvedLookupExpr::Create(), clang::SemaBase::Diag(), diagnoseInstanceReference(), clang::LookupResult::end(), clang::ExprError(), clang::LookupResult::getLookupNameInfo(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getNameLoc(), clang::LookupResult::getNamingClass(), clang::LookupResult::getRepresentativeDecl(), clang::CXXScopeSpec::getWithLocInContext(), IMA_Abstract, IMA_Dependent, IMA_Error_StaticOrExplicitContext, IMA_Error_Unrelated, IMA_Field_Uneval_Context, IMA_Instance, IMA_Mixed, IMA_Mixed_StaticOrExplicitContext, IMA_Mixed_Unrelated, IMA_Static, IMA_Unresolved, IMA_Unresolved_StaticOrExplicitContext, clang::SourceLocation::isValid(), and clang::LookupResult::suppressDiagnostics().
Referenced by ActOnIdExpression(), ActOnNameClassifiedAsOverloadSet(), BuildQualifiedDeclarationNameExpr(), BuildQualifiedTemplateIdExpr(), and BuildRecoveryCallExpr().
| ExprResult Sema::BuildPredefinedExpr | ( | SourceLocation | Loc, |
| PredefinedIdentKind | IK ) |
Definition at line 3526 of file SemaExpr.cpp.
References clang::cast(), clang::PredefinedExpr::ComputeName(), Context, ConvertUTF8ToWideString(), clang::PredefinedExpr::Create(), clang::StringLiteral::Create(), CurContext, clang::SemaBase::Diag(), clang::Function, getLangOpts(), getPredefinedExprDecl(), LangOpts, clang::LFuncSig, clang::LFunction, clang::Normal, clang::Ordinary, and clang::Wide.
Referenced by ActOnPredefinedExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildPredefinedExpr().
| ExprResult Sema::BuildPseudoDestructorExpr | ( | Expr * | Base, |
| SourceLocation | OpLoc, | ||
| tok::TokenKind | OpKind, | ||
| const CXXScopeSpec & | SS, | ||
| TypeSourceInfo * | ScopeType, | ||
| SourceLocation | CCLoc, | ||
| SourceLocation | TildeLoc, | ||
| PseudoDestructorTypeStorage | DestroyedType ) |
Definition at line 7063 of file SemaExprCXX.cpp.
References canRecoverDotPseudoDestructorCallsOnPointerObjects(), CheckArrow(), Context, clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::ExprError(), clang::SourceRange::getBegin(), clang::TypeLoc::getBeginLoc(), getLangOpts(), clang::QualType::getObjCLifetime(), clang::Type::getPointeeType(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::PseudoDestructorTypeStorage::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::Type::isDependentType(), clang::Type::isMatrixType(), clang::Type::isPointerType(), clang::Type::isScalarType(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::Qualifiers::OCL_None, and clang::Result.
Referenced by ActOnPseudoDestructorExpr(), and ActOnPseudoDestructorExpr().
| ExprResult Sema::BuildQualifiedDeclarationNameExpr | ( | CXXScopeSpec & | SS, |
| const DeclarationNameInfo & | NameInfo, | ||
| bool | IsAddressOfOperand, | ||
| 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 2921 of file SemaExpr.cpp.
References BuildDeclarationNameExpr(), BuildDependentDeclRefExpr(), BuildPossibleImplicitMemberExpr(), computeDeclContext(), Context, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::LookupResult::empty(), clang::ExprEmpty(), clang::ExprError(), clang::LookupResult::getAsSingle(), clang::CXXScopeSpec::getBeginLoc(), clang::DeclarationNameInfo::getEndLoc(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::isAmbiguous(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), isPotentialImplicitMemberAccess(), LookupOrdinaryName, LookupParsedName(), clang::None, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), clang::SemaBase::SemaRef, clang::TagTypeLoc::setElaboratedKeywordLoc(), clang::TypeSpecTypeLoc::setNameLoc(), and clang::LookupResult::wasNotFoundInCurrentInstantiation().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildDependentScopeDeclRefExpr().
| ExprResult Sema::BuildQualifiedTemplateIdExpr | ( | CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| bool | IsAddressOfOperand ) |
Definition at line 4995 of file SemaTemplate.cpp.
References BuildDependentDeclRefExpr(), BuildPossibleImplicitMemberExpr(), BuildTemplateIdExpr(), computeDeclContext(), clang::SemaBase::Diag(), clang::LookupResult::empty(), clang::ExprError(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::LookupResult::isAmbiguous(), clang::CXXScopeSpec::isInvalid(), isPotentialImplicitMemberAccess(), clang::SourceLocation::isValid(), LookupOrdinaryName, LookupTemplateName(), and clang::LookupResult::wasNotFoundInCurrentInstantiation().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildDependentScopeDeclRefExpr().
| QualType Sema::BuildQualifiedType | ( | QualType | T, |
| SourceLocation | Loc, | ||
| Qualifiers | Qs, | ||
| const DeclSpec * | DS = nullptr ) |
Definition at line 1578 of file SemaType.cpp.
References clang::C23, Context, clang::SemaBase::Diag(), clang::Type::getAs(), getLangOpts(), clang::Type::getPointeeType(), clang::DeclSpec::getRestrictSpecLoc(), clang::Qualifiers::hasRestrict(), clang::Type::isAnyPointerType(), isDependentOrGNUAutoType(), clang::Type::isIncompleteOrObjectType(), clang::Type::isMemberPointerType(), clang::Type::isReferenceType(), clang::Qualifiers::removeConst(), clang::Qualifiers::removeRestrict(), clang::Qualifiers::removeVolatile(), and clang::T.
Referenced by BuildQualifiedType(), checkMemberDecomposition(), ConvertDeclSpecToType(), and GetFullTypeForDeclarator().
| QualType Sema::BuildQualifiedType | ( | QualType | T, |
| SourceLocation | Loc, | ||
| unsigned | CVRA, | ||
| const DeclSpec * | DS = nullptr ) |
Definition at line 1631 of file SemaType.cpp.
References BuildAtomicType(), BuildQualifiedType(), clang::Qualifiers::fromCVRMask(), clang::DeclSpec::getAtomicSpecLoc(), clang::Qualifiers::setUnaligned(), clang::T, clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_unaligned, and clang::DeclSpec::TQ_volatile.
| QualType Sema::BuildReadPipeType | ( | QualType | T, |
| SourceLocation | Loc ) |
Build a Read-only Pipe type.
| T | The type to which we'll be building a Pipe. |
| Loc | We do not use it for now. |
Definition at line 1933 of file SemaType.cpp.
References Context, and clang::T.
Referenced by GetFullTypeForDeclarator().
| QualType Sema::BuildReferenceType | ( | QualType | T, |
| bool | LValueRef, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity ) |
Build a reference type.
| T | The type to which we'll be building a reference. |
| Loc | The location of the entity whose type involves this reference type or, if there is no such entity, the location of the type that will have reference type. |
| Entity | The name of the entity that involves the reference type, if known. |
Definition at line 1858 of file SemaType.cpp.
References checkQualifiedFunction(), Context, deduceOpenCLPointeeAddrSpace(), clang::SemaBase::Diag(), getASTContext(), getLangOpts(), getOpenCLOptions(), HLSL(), inferARCLifetimeForPointee(), clang::SourceLocation::isValid(), OpenCL(), and clang::T.
Referenced by buildLambdaInitCaptureInitialization(), BuiltinAddReference(), CastForMoving(), castForMoving(), checkTupleLikeDecomposition(), and GetFullTypeForDeclarator().
| ExprResult Sema::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.
an expression not of OverloadTy. The expression should unary-convert to an expression of function-pointer or block-pointer type.
| NDecl | the declaration being called, if available |
Definition at line 6912 of file SemaExpr.cpp.
References clang::Block, CallExprUnaryConversions(), clang::cast(), clang::Type::castAs(), CheckCallReturnType(), CheckForImmediateInvocation(), CheckFunctionCall(), clang::CallExpr::computeDependence(), clang::Scope::Contains(), Context, ConvertArgumentsForCall(), clang::CallExpr::Create(), clang::CUDAKernelCallExpr::Create(), CUDA(), CurFPFeatureOverrides(), CurrentDefer, DefaultArgumentPromotion(), clang::SemaBase::Diag(), DiagnoseSentinelCalls(), Diags, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::FunctionDecl::getBuiltinID(), clang::FunctionDecl::getCallResultType(), clang::FunctionType::getCallResultType(), clang::FunctionType::getCmseNSCallAttr(), getCurFunctionDecl(), getLangOpts(), clang::Decl::getLocation(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::Expr::getType(), clang::ValueDecl::getType(), getType(), clang::Expr::getValueKindForType(), clang::Decl::hasAttr(), clang::FunctionDecl::hasBody(), clang::TargetInfo::hasFeature(), clang::FunctionDecl::hasPrototype(), ImpCastExprToType(), clang::InitializedEntity::InitializeParameter(), clang::isa(), clang::Decl::isImplicit(), clang::Type::isInstantiationDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isVoidType(), MaybeBindToTemporary(), clang::Method, clang::FunctionDecl::param_size(), PerformCopyInitialization(), rebuildUnknownAnyFunction(), RequireCompleteType(), clang::Result, clang::CallExpr::setArg(), clang::Expr::setType(), clang::Expr::setValueKind(), and clang::VK_PRValue.
Referenced by BuildCallExpr(), BuildCallToMemberFunction(), and FinishOverloadedCallExpr().
| ExprResult Sema::BuildResolvedCoawaitExpr | ( | SourceLocation | KwLoc, |
| Expr * | Operand, | ||
| Expr * | Awaiter, | ||
| bool | IsImplicit = false ) |
Definition at line 916 of file SemaCoroutine.cpp.
References buildCoawaitCalls(), checkCoroutineContext(), CheckPlaceholderExpr(), Context, CreateMaterializeTemporaryExpr(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::Type::isDependentType(), ReadySuspendResumeResult::IsInvalid, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPRValue(), ReadySuspendResumeResult::OpaqueValue, and ReadySuspendResumeResult::Results.
Referenced by ActOnCoroutineBodyStart(), BuildUnresolvedCoawaitExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildCoawaitExpr().
| StmtResult Sema::BuildReturnStmt | ( | SourceLocation | ReturnLoc, |
| Expr * | RetValExp, | ||
| bool | AllowRecovery = false ) |
Definition at line 3985 of file SemaStmt.cpp.
References ActOnCapScopeReturnStmt(), ActOnFinishFullExpr(), clang::C2y, clang::cast(), CheckSimplerImplicitMovesMSVCWorkaround(), clang::Type::containsErrors(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus14, clang::ReturnStmt::Create(), CreateRecoveryExpr(), CurContext, DeduceFunctionTypeFromReturnExpr(), clang::SemaBase::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::Stmt::getEndLoc(), getLangOpts(), getNamedReturnInfo(), clang::FunctionDecl::getReturnType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), IgnoredValueConversions(), ImpCastExprToType(), clang::InitializedEntity::InitializeRelatedResult(), clang::InitializedEntity::InitializeResult(), clang::isa(), 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::Expr::isTypeDependent(), clang::Type::isVoidType(), Normal, PerformCopyInitialization(), PerformMoveOrCopyInitialization(), clang::Result, clang::Decl::setInvalidDecl(), and clang::StmtError().
Referenced by ActOnReturnStmt(), DefineImplicitCopyAssignment(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), and clang::TreeTransform< AdjustConstraints >::RebuildReturnStmt().
| ExprResult Sema::BuildSourceLocExpr | ( | SourceLocIdentKind | Kind, |
| QualType | ResultTy, | ||
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RPLoc, | ||
| DeclContext * | ParentContext ) |
Definition at line 17230 of file SemaExpr.cpp.
References Context.
Referenced by ActOnSourceLocExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildSourceLocExpr().
| Decl * Sema::BuildStaticAssertDeclaration | ( | SourceLocation | StaticAssertLoc, |
| Expr * | AssertExpr, | ||
| Expr * | AssertMessageExpr, | ||
| SourceLocation | RParenLoc, | ||
| bool | Failed ) |
Definition at line 17835 of file SemaDeclCXX.cpp.
References ActOnFinishFullExpr(), clang::Allow, clang::Cond, clang::ASTConstraintSatisfaction::ContainsErrors, Context, clang::CPlusPlus, clang::StaticAssertDecl::Create(), CurContext, Diag(), DiagnoseStaticAssertDetails(), DiagnoseUnsatisfiedConstraint(), EvaluateAsString(), findFailedBooleanCondition(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), getLangOpts(), clang::Stmt::getSourceRange(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::No, clang::ASTConstraintSatisfaction::NumRecords, PerformContextuallyConvertToBool(), PrintContextStack(), StaticAssert, and VerifyIntegerConstantExpression().
Referenced by ActOnStaticAssertDeclaration().
| 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.
Definition at line 12374 of file SemaDeclCXX.cpp.
References BuildStdClassTemplate(), Diag(), LookupStdClassTemplate(), and StdInitializerList.
Referenced by DeduceAutoType().
| ExprResult Sema::BuildStmtExpr | ( | SourceLocation | LPLoc, |
| Stmt * | SubStmt, | ||
| SourceLocation | RPLoc, | ||
| unsigned | TemplateDepth ) |
Definition at line 16309 of file SemaExpr.cpp.
References clang::CompoundStmt::body_back(), clang::CompoundStmt::body_empty(), clang::cast(), Cleanup, Context, DiscardCleanupsInEvaluationContext(), clang::Value::getType(), hasAnyUnrecoverableErrorsInThisFunction(), clang::isa(), MaybeBindToTemporary(), and PopExpressionEvaluationContext().
Referenced by ActOnStmtExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildStmtExpr().
| ExprResult Sema::BuildSubstNonTypeTemplateParmExpr | ( | Decl * | AssociatedDecl, |
| const NonTypeTemplateParmDecl * | NTTP, | ||
| SourceLocation | loc, | ||
| TemplateArgument | Replacement, | ||
| UnsignedOrNone | PackIndex, | ||
| bool | Final ) |
Definition at line 777 of file SemaTemplate.cpp.
References clang::ExprError(), clang::TemplateArgument::Expression, clang::ActionResult< PtrTy, Compress >::get(), clang::TemplateArgument::getAsExpr(), clang::NonTypeTemplateParmDecl::getExpansionType(), clang::NonTypeTemplateParmDecl::getIndex(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getNonTypeTemplateArgumentType(), clang::ValueDecl::getType(), clang::NonTypeTemplateParmDecl::isExpandedParameterPack(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isReferenceType(), and clang::SemaBase::SemaRef.
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildSubstNonTypeTemplateParmExpr().
| ExprResult Sema::BuildSynthesizedThreeWayComparison | ( | SourceLocation | OpLoc, |
| const UnresolvedSetImpl & | Fns, | ||
| Expr * | LHS, | ||
| Expr * | RHS, | ||
| FunctionDecl * | DefaultedFn ) |
Definition at line 15760 of file SemaOverload.cpp.
References ActOnConditionalOp(), BuildDeclarationNameExpr(), clang::Comparison, Context, clang::BinaryOperator::Create(), clang::PseudoObjectExpr::Create(), CreateOverloadedBinOp(), CurFPFeatureOverrides(), clang::Equal, clang::Equivalent, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), clang::Expr::getObjectKind(), clang::FunctionDecl::getReturnType(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Greater, clang::Expr::isGLValue(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::ComparisonCategoryInfo::isPartial(), clang::ComparisonCategoryInfo::isStrong(), clang::Less, clang::Result, and clang::Unordered.
Referenced by CreateOverloadedBinOp().
| ExprResult Sema::BuildTemplateIdExpr | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| LookupResult & | R, | ||
| bool | RequiresADL, | ||
| const TemplateArgumentListInfo * | TemplateArgs ) |
Definition at line 4924 of file SemaTemplate.cpp.
References clang::LookupResult::begin(), CheckConceptTemplateId(), CheckVarOrConceptTemplateTemplateId(), CheckVarTemplateId(), Context, clang::UnresolvedLookupExpr::Create(), diagnoseMissingTemplateArguments(), clang::LookupResult::end(), clang::ExprError(), clang::Decl::getAsFunction(), clang::LookupResult::getAsSingle(), clang::LookupResult::getFoundDecl(), clang::LookupResult::getLookupNameInfo(), clang::LookupResult::getNameLoc(), clang::LookupResult::getNamingClass(), clang::LookupResult::getRepresentativeDecl(), clang::Expr::getType(), clang::CXXScopeSpec::getWithLocInContext(), clang::isa(), clang::LookupResult::isAmbiguous(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::LookupResult::isSingleResult(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::SourceLocation::isValid(), clang::Expr::setType(), and clang::LookupResult::suppressDiagnostics().
Referenced by ActOnIdExpression(), BuildMemberReferenceExpr(), BuildPossibleImplicitMemberExpr(), BuildQualifiedTemplateIdExpr(), BuildRecoveryCallExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildTemplateIdExpr().
| FunctionDecl * Sema::BuildTypeAwareUsualDelete | ( | FunctionTemplateDecl * | FnDecl, |
| QualType | AllocType, | ||
| SourceLocation | Loc ) |
Definition at line 16455 of file SemaDeclCXX.cpp.
References Context, DeduceTemplateArguments(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::ValueDecl::getType(), clang::QualType::isNull(), clang::FunctionDecl::isTypeAwareOperatorNewOrDelete(), clang::FunctionDecl::isVariadic(), clang::FunctionDecl::parameters(), clang::FunctionDecl::RequiredTypeAwareDeleteParameterCount, clang::Result, clang::Success, and tryBuildStdTypeIdentity().
| bool Sema::BuildTypeConstraint | ( | const CXXScopeSpec & | SS, |
| TemplateIdAnnotation * | TypeConstraint, | ||
| TemplateTypeParmDecl * | ConstrainedParameter, | ||
| SourceLocation | EllipsisLoc, | ||
| bool | AllowUnexpandedPack ) |
Definition at line 1163 of file SemaTemplate.cpp.
References clang::TemplateArgumentListInfo::arguments(), AttachTypeConstraint(), clang::cast(), CheckTypeConstraint(), Context, DiagnoseUnexpandedParameterPack(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsTemplateDecl(), clang::TemplateName::getAsUsingShadowDecl(), clang::CXXScopeSpec::getWithLocInContext(), clang::SourceLocation::isInvalid(), clang::CXXScopeSpec::isSet(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, makeTemplateArgumentListInfo(), clang::TemplateIdAnnotation::Name, clang::TemplateIdAnnotation::Template, clang::TemplateIdAnnotation::TemplateNameLoc, and UPPC_TypeConstraint.
Referenced by ActOnCompoundRequirement(), and ActOnTypeConstraint().
| QualType Sema::BuildTypeofExprType | ( | Expr * | E, |
| TypeOfKind | Kind ) |
Definition at line 9709 of file SemaType.cpp.
References Context, clang::CPlusPlus, clang::SemaBase::Diag(), DiagnoseUseOfDecl(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::Expr::isTypeDependent(), clang::Expr::refersToBitField(), clang::T, and clang::Unqualified.
Referenced by ConvertDeclSpecToType().
| concepts::TypeRequirement * Sema::BuildTypeRequirement | ( | concepts::Requirement::SubstitutionDiagnostic * | SubstDiag | ) |
Definition at line 7959 of file SemaExprCXX.cpp.
References Context.
| concepts::TypeRequirement * Sema::BuildTypeRequirement | ( | TypeSourceInfo * | Type | ) |
Definition at line 7954 of file SemaExprCXX.cpp.
References Context.
Referenced by ActOnTypeRequirement().
| ExprResult Sema::BuildTypeTrait | ( | TypeTrait | Kind, |
| SourceLocation | KWLoc, | ||
| ArrayRef< TypeSourceInfo * > | Args, | ||
| SourceLocation | RParenLoc ) |
Definition at line 1450 of file SemaTypeTraits.cpp.
References Bool, CheckTypeTraitArity(), CheckUnaryTypeTraitTypeCompleteness(), Context, clang::TypeTraitExpr::Create(), clang::Dependent, EvaluateBooleanTypeTrait(), EvaluateSizeTTypeTrait(), clang::ExprError(), GetReturnType(), getType(), clang::getTypeTraitArity(), clang::Result, SizeT, and clang::UTT_Last.
Referenced by ActOnTypeTrait(), and clang::TreeTransform< AdjustConstraints >::RebuildTypeTrait().
| ExprResult Sema::BuildUnaryOp | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| UnaryOperatorKind | Opc, | ||
| Expr * | Input, | ||
| bool | IsAfterAmp = false ) |
Definition at line 16227 of file SemaExpr.cpp.
References clang::SemaPseudoObject::checkIncDec(), CheckPlaceholderExpr(), clang::CPlusPlus, CreateBuiltinUnaryOp(), CreateOverloadedUnaryOp(), clang::ExprError(), clang::Type::getAsPlaceholderType(), getLangOpts(), clang::UnaryOperator::getOverloadedOperator(), clang::Expr::getType(), clang::UnaryOperator::isIncrementDecrementOp(), clang::Type::isOverloadableType(), isQualifiedMemberAccess(), LookupOverloadedOperatorName(), clang::OO_None, PseudoObject(), and clang::Result.
Referenced by ActOnPostfixUnaryOp(), ActOnUnaryOp(), buildDistanceFunc(), buildLoopVarFunc(), RebuildForRangeWithDereference(), rebuildPotentialResultsAsNonOdrUsed(), and clang::TreeTransform< AdjustConstraints >::RebuildUnaryOperator().
| QualType Sema::BuildUnaryTransformType | ( | QualType | BaseType, |
| UTTKind | UKind, | ||
| SourceLocation | Loc ) |
Definition at line 10080 of file SemaType.cpp.
References BuiltinAddPointer(), BuiltinAddReference(), BuiltinChangeCVRQualifiers(), BuiltinChangeSignedness(), BuiltinDecay(), BuiltinEnumUnderlyingType(), BuiltinRemoveExtent(), BuiltinRemovePointer(), BuiltinRemoveReference(), Context, and clang::Result.
Referenced by ConvertDeclSpecToType().
| ExprResult Sema::BuildUnresolvedCoawaitExpr | ( | SourceLocation | KwLoc, |
| Expr * | Operand, | ||
| UnresolvedLookupExpr * | Lookup ) |
Definition at line 869 of file SemaCoroutine.cpp.
References applySafeElideContext(), BuildOperatorCoawaitCall(), buildPromiseCall(), BuildResolvedCoawaitExpr(), checkCoroutineContext(), CheckPlaceholderExpr(), Context, clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), getCurFunctionDecl(), isAttributedCoroAwaitElidable(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and lookupMember().
Referenced by ActOnCoawaitExpr(), clang::TreeTransform< AdjustConstraints >::RebuildCoawaitExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildDependentCoawaitExpr().
| 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.
| IsInstantiation | - Whether this call arises from an instantiation of an unresolved using declaration. We treat the lookup differently for these declarations. |
Definition at line 13104 of file SemaDeclCXX.cpp.
References clang::LookupResult::addDecl(), clang::AS_public, BuildUsingShadowDecl(), clang::cast(), CheckInheritingConstructorUsingDecl(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), computeDeclContext(), Context, CorrectTypo(), clang::CPlusPlus14, clang::UnresolvedUsingIfExistsDecl::Create(), clang::UnresolvedUsingTypenameDecl::Create(), clang::UnresolvedUsingValueDecl::Create(), clang::UsingDecl::Create(), clang::FixItHint::CreateInsertion(), CurContext, clang::DeclarationName::CXXConstructorName, Diag(), DiagnoseTemplateParameterShadow(), diagnoseTypo(), clang::LookupResult::empty(), clang::ErrorRecovery, FilterUsingLookup(), ForVisibleRedeclaration, clang::DeclarationName::getAsIdentifierInfo(), clang::LookupResult::getAsSingle(), clang::CXXScopeSpec::getBeginLoc(), 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::CXXScopeSpec::getScopeRep(), getSourceManager(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::CXXScopeSpec::getWithLocInContext(), clang::Invalid, clang::isa(), clang::LookupResult::isAmbiguous(), clang::CXXRecordDecl::isInjectedClassName(), clang::CXXScopeSpec::isInvalid(), clang::SourceLocation::isValid(), LookupConstructors(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupUsingDeclName, clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::SemaBase::PDiag(), PP, 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().
| NamedDecl * Sema::BuildUsingEnumDeclaration | ( | Scope * | S, |
| AccessSpecifier | AS, | ||
| SourceLocation | UsingLoc, | ||
| SourceLocation | EnumLoc, | ||
| SourceLocation | NameLoc, | ||
| TypeSourceInfo * | EnumType, | ||
| EnumDecl * | ED ) |
In class scope, check if this is a duplicate, for better a diagnostic.
Definition at line 13366 of file SemaDeclCXX.cpp.
References BuildUsingShadowDecl(), CheckUsingShadowDecl(), Context, clang::UsingEnumDecl::Create(), CurContext, Diag(), clang::EnumDecl::enumerators(), FilterUsingLookup(), ForVisibleRedeclaration, clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Invalid, LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupUsingDeclName, Previous, RequireCompleteEnumDecl(), clang::Decl::setAccess(), and clang::Decl::setInvalidDecl().
Referenced by ActOnUsingEnumDeclaration().
| NamedDecl * Sema::BuildUsingPackDecl | ( | NamedDecl * | InstantiatedFrom, |
| ArrayRef< NamedDecl * > | Expansions ) |
Definition at line 13422 of file SemaDeclCXX.cpp.
References Context, clang::UsingPackDecl::Create(), CurContext, clang::Decl::getAccess(), and clang::isa().
| UsingShadowDecl * Sema::BuildUsingShadowDecl | ( | Scope * | S, |
| BaseUsingDecl * | BUD, | ||
| NamedDecl * | Target, | ||
| UsingShadowDecl * | PrevDecl ) |
Builds a shadow declaration corresponding to a 'using' declaration.
Definition at line 12924 of file SemaDeclCXX.cpp.
References clang::BaseUsingDecl::addShadowDecl(), clang::cast(), Context, clang::ConstructorUsingShadowDecl::Create(), clang::UsingShadowDecl::Create(), CurContext, clang::Decl::getAccess(), clang::Decl::getLocation(), clang::isa(), clang::Decl::isInvalidDecl(), isVirtualDirectBase(), PushOnScopeChains(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Redeclarable< decl_type >::setPreviousDecl(), and clang::Target.
Referenced by BuildUsingDeclaration(), and BuildUsingEnumDeclaration().
| ExprResult Sema::BuildVAArgExpr | ( | SourceLocation | BuiltinLoc, |
| Expr * | E, | ||
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | RPLoc ) |
Definition at line 16950 of file SemaExpr.cpp.
References clang::TargetInfo::CharPtrBuiltinVaList, CheckForModifiableLvalue(), Context, clang::CPlusPlus, CUDA(), CurContext, clang::SemaBase::Diag(), DiagRuntimeBehavior(), clang::ExprError(), clang::Type::getAsEnumDecl(), clang::Stmt::getBeginLoc(), clang::TypeLoc::getBeginLoc(), getLangOpts(), clang::QualType::getNonLValueExprType(), clang::Stmt::getSourceRange(), clang::TypeLoc::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Global, clang::SemaCUDA::IdentifyTarget(), clang::Init, clang::InitializedEntity::InitializeParameter(), clang::Type::isArrayType(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isObjCLifetimeType(), clang::QualType::isPODType(), clang::Type::isRecordType(), clang::Type::isSpecificBuiltinType(), clang::Expr::isTypeDependent(), clang::Type::isUnsignedIntegerType(), OpenMP(), clang::SemaBase::PDiag(), PerformCopyInitialization(), RequireCompleteType(), RequireNonAbstractType(), clang::Result, clang::T, targetDiag(), and UsualUnaryConversions().
Referenced by ActOnVAArg(), and clang::TreeTransform< AdjustConstraints >::RebuildVAArgExpr().
| void Sema::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.
Sets basic variable data and decides whether to postpone the variable instantiation.
Definition at line 6071 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addHiddenDecl(), clang::cast(), 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::VarDecl::getPreviousDecl(), clang::VarDecl::getTSCSpec(), clang::ValueDecl::getType(), clang::NamedDecl::hasLinkage(), InstantiateAttrs(), InstantiateVariableInitializer(), clang::isa(), 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::VarDecl::setObjCForDecl(), clang::VarDecl::setPreviousDeclInSameBlockScope(), clang::Decl::setReferenced(), clang::VarDecl::setTSCSpec(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.
| VarTemplateSpecializationDecl * Sema::BuildVarTemplateInstantiation | ( | VarTemplateDecl * | VarTemplate, |
| VarDecl * | FromVar, | ||
| const TemplateArgumentList * | PartialSpecArgs, | ||
| SmallVectorImpl< TemplateArgument > & | Converted, | ||
| SourceLocation | PointOfInstantiation, | ||
| LateInstantiatedAttrVec * | LateAttrs = nullptr, | ||
| LocalInstantiationScope * | StartingScope = nullptr ) |
Definition at line 5994 of file SemaTemplateInstantiateDecl.cpp.
References clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), clang::TemplateArgumentList::asArray(), clang::Decl::getDeclContext(), clang::VarDecl::getDescribedVarTemplate(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), VarTemplate, and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().
Referenced by CheckVarTemplateId().
| ExprResult Sema::BuildVectorLiteral | ( | SourceLocation | LParenLoc, |
| SourceLocation | RParenLoc, | ||
| Expr * | E, | ||
| TypeSourceInfo * | TInfo ) |
Build an altivec or OpenCL literal.
Definition at line 8052 of file SemaExpr.cpp.
References BuildCompoundLiteralExpr(), BuildCStyleCastExpr(), clang::cast(), clang::Type::castAs(), CheckAltivecInitFromScalar(), Context, DefaultLvalueConversion(), clang::SemaBase::Diag(), clang::ExprError(), clang::Generic, clang::VectorType::getElementType(), clang::Expr::getExprLoc(), getLangOpts(), clang::VectorType::getNumElements(), clang::Stmt::getSourceRange(), clang::TypeSourceInfo::getType(), clang::VectorType::getVectorKind(), ImpCastExprToType(), clang::isa(), clang::Type::isVectorType(), OpenCL(), PrepareScalarCast(), clang::Expr::setType(), and ShouldSplatAltivecScalarInCast().
Referenced by ActOnCastExpr().
| QualType Sema::BuildVectorType | ( | QualType | T, |
| Expr * | VecSize, | ||
| SourceLocation | AttrLoc ) |
Definition at line 2333 of file SemaType.cpp.
References clang::AANT_ArgumentIntegerConstant, CheckBitIntElementType(), Context, clang::SemaBase::Diag(), clang::Generic, clang::Type::getAs(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::Type::isArrayType(), clang::Type::isBitIntType(), clang::Type::isBooleanType(), clang::Type::isBuiltinType(), clang::Type::isDependentType(), clang::Type::isIntegerType(), clang::Type::isRealFloatingType(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by HandleVectorSizeAttr().
| QualType Sema::BuildWritePipeType | ( | QualType | T, |
| SourceLocation | Loc ) |
Build a Write-only Pipe type.
| T | The type to which we'll be building a Pipe. |
| Loc | We do not use it for now. |
Definition at line 1937 of file SemaType.cpp.
| QualType Sema::BuiltinAddPointer | ( | QualType | BaseType, |
| SourceLocation | Loc ) |
Definition at line 9917 of file SemaType.cpp.
References BuildPointerType(), and Pointer.
Referenced by BuildUnaryTransformType(), and BuiltinDecay().
| QualType Sema::BuiltinAddReference | ( | QualType | BaseType, |
| UTTKind | UKind, | ||
| SourceLocation | Loc ) |
Definition at line 9949 of file SemaType.cpp.
References BuildReferenceType(), LangOpts, and clang::Reference.
Referenced by BuildUnaryTransformType().
| QualType Sema::BuiltinChangeCVRQualifiers | ( | QualType | BaseType, |
| UTTKind | UKind, | ||
| SourceLocation | Loc ) |
Definition at line 9987 of file SemaType.cpp.
References Context, clang::Qualifiers::removeConst(), clang::Qualifiers::removeRestrict(), and clang::Qualifiers::removeVolatile().
Referenced by BuildUnaryTransformType().
| QualType Sema::BuiltinChangeSignedness | ( | QualType | BaseType, |
| UTTKind | UKind, | ||
| SourceLocation | Loc ) |
Definition at line 10054 of file SemaType.cpp.
References ChangeIntegralSignedness(), Context, clang::SemaBase::Diag(), clang::BitIntType::getNumBits(), clang::QualType::getQualifiers(), clang::Type::isChar16Type(), and clang::QualType::isNull().
Referenced by BuildUnaryTransformType().
BuiltinConstantArg - Handle a check if argument ArgNum of CallExpr TheCall is a constant expression.
Definition at line 6302 of file SemaChecking.cpp.
References clang::cast(), Context, clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::CallExpr::getCallee(), clang::DeclRefExpr::getDecl(), clang::NamedDecl::getDeclName(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::Expr::IgnoreParenCasts(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Result.
Referenced by BuiltinConstantArgMultiple(), BuiltinConstantArgPower2(), BuiltinConstantArgRange(), BuiltinConstantArgShiftedByte(), BuiltinConstantArgShiftedByteOrXXFF(), and ValueIsRunOfOnes().
BuiltinConstantArgMultiple - Handle a check if argument ArgNum of CallExpr TheCall is a constant expression is a multiple of Num.
Definition at line 6352 of file SemaChecking.cpp.
References BuiltinConstantArg(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Num, and clang::Result.
BuiltinConstantArgPower2 - Check if argument ArgNum of TheCall is a constant expression representing a power of 2.
Definition at line 6372 of file SemaChecking.cpp.
References BuiltinConstantArg(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Result.
| bool Sema::BuiltinConstantArgRange | ( | CallExpr * | TheCall, |
| unsigned | ArgNum, | ||
| int | Low, | ||
| int | High, | ||
| bool | RangeIsError = true ) |
BuiltinConstantArgRange - Handle a check if argument ArgNum of CallExpr TheCall is a constant expression in the range [Low, High].
Definition at line 6321 of file SemaChecking.cpp.
References BuiltinConstantArg(), clang::SemaBase::Diag(), DiagRuntimeBehavior(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::Stmt::getSourceRange(), isConstantEvaluatedContext(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::SemaBase::PDiag(), clang::Result, and toString().
BuiltinConstantArgShiftedByte - Check if argument ArgNum of TheCall is a constant expression representing an arbitrary byte value shifted left by a multiple of 8 bits.
Definition at line 6413 of file SemaChecking.cpp.
References BuiltinConstantArg(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::Stmt::getSourceRange(), IsShiftedByte(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Result.
| bool Sema::BuiltinConstantArgShiftedByteOrXXFF | ( | CallExpr * | TheCall, |
| unsigned | ArgNum, | ||
| unsigned | ArgBits ) |
BuiltinConstantArgShiftedByteOr0xFF - Check if argument ArgNum of TheCall is a constant expression representing either a shifted byte value, or a value of the form 0x?
?FF (i.e. a member of the arithmetic progression 0x00FF, 0x01FF, ..., 0xFFFF). This strange range check is needed for some Arm MVE intrinsics.
Definition at line 6437 of file SemaChecking.cpp.
References BuiltinConstantArg(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::Stmt::getSourceRange(), IsShiftedByte(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Result.
| QualType Sema::BuiltinDecay | ( | QualType | BaseType, |
| SourceLocation | Loc ) |
Definition at line 9933 of file SemaType.cpp.
References BuiltinAddPointer(), Context, clang::QualType::getNonReferenceType(), clang::QualType::getSplitUnqualifiedType(), clang::Type::isArrayType(), and clang::Type::isFunctionType().
Referenced by BuildUnaryTransformType(), and builtinCommonTypeImpl().
| bool Sema::BuiltinElementwiseTernaryMath | ( | CallExpr * | TheCall, |
| EltwiseBuiltinArgTyRestriction | ArgTyRestr = EltwiseBuiltinArgTyRestriction::FloatTy ) |
Definition at line 16527 of file SemaChecking.cpp.
References BuiltinVectorMathConversions(), checkArgCount(), checkBuiltinVectorMathArgTypes(), checkBuiltinVectorMathMixedEnums(), checkMathBuiltinElementType(), clang::ActionResult< PtrTy, Compress >::get(), clang::CallExpr::getArg(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::Expr::getType(), getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CallExpr::setArg(), and clang::Expr::setType().
| QualType Sema::BuiltinEnumUnderlyingType | ( | QualType | BaseType, |
| SourceLocation | Loc ) |
Definition at line 9898 of file SemaType.cpp.
References clang::SemaBase::Diag(), GetEnumUnderlyingType(), and clang::Decl::getLocation().
Referenced by BuildUnaryTransformType().
| bool Sema::BuiltinIsBaseOf | ( | SourceLocation | RhsTLoc, |
| QualType | LhsT, | ||
| QualType | RhsT ) |
Definition at line 1505 of file SemaTypeTraits.cpp.
References clang::cast(), Context, clang::Type::getAs(), clang::Type::getAsCanonical(), clang::ObjCInterfaceDecl::isSuperClassOf(), and RequireCompleteType().
Referenced by BuiltinInvoke().
|
inline |
Definition at line 15410 of file Sema.h.
References BuiltinRemoveReference().
Referenced by BuiltinInvoke().
| QualType Sema::BuiltinRemoveExtent | ( | QualType | BaseType, |
| UTTKind | UKind, | ||
| SourceLocation | Loc ) |
Definition at line 9961 of file SemaType.cpp.
References Context.
Referenced by BuildUnaryTransformType().
| QualType Sema::BuiltinRemovePointer | ( | QualType | BaseType, |
| SourceLocation | Loc ) |
Definition at line 9926 of file SemaType.cpp.
References clang::Type::getPointeeType().
Referenced by BuildUnaryTransformType().
| QualType Sema::BuiltinRemoveReference | ( | QualType | BaseType, |
| UTTKind | UKind, | ||
| SourceLocation | Loc ) |
Definition at line 9972 of file SemaType.cpp.
References Context, LangOpts, clang::Qualifiers::removeConst(), clang::Qualifiers::removeVolatile(), and clang::T.
Referenced by BuildUnaryTransformType(), and BuiltinRemoveCVRef().
| ExprResult Sema::BuiltinShuffleVector | ( | CallExpr * | TheCall | ) |
BuiltinShuffleVector - Handle __builtin_shufflevector.
Definition at line 5971 of file SemaChecking.cpp.
References clang::APValue, clang::Type::castAs(), Context, clang::ConstantExpr::Create(), clang::SemaBase::Diag(), clang::ExprError(), clang::Generic, clang::CallExpr::getArg(), clang::CallExpr::getArgs(), clang::CallExpr::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::CallExpr::getCallee(), clang::CallExpr::getDirectCallee(), clang::CallExpr::getEndLoc(), clang::Stmt::getEndLoc(), clang::Expr::getIntegerConstantExpr(), clang::CallExpr::getNumArgs(), clang::VectorType::getNumElements(), clang::CallExpr::getRParenLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::hasIntegerRepresentation(), clang::Type::isExtVectorType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Type::isVectorType(), clang::Result, clang::CallExpr::setArg(), and clang::CallExpr::shrinkNumArgs().
| std::optional< QualType > Sema::BuiltinVectorMath | ( | CallExpr * | TheCall, |
| EltwiseBuiltinArgTyRestriction | ArgTyRestr = EltwiseBuiltinArgTyRestriction::None ) |
| FPOnly | restricts the arguments to floating-point types. |
Definition at line 16495 of file SemaChecking.cpp.
References BuiltinVectorMathConversions(), checkArgCount(), checkBuiltinVectorMathArgTypes(), checkBuiltinVectorMathMixedEnums(), checkMathBuiltinElementType(), clang::ActionResult< PtrTy, Compress >::get(), clang::CallExpr::getArg(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::CallExpr::setArg().
Referenced by BuiltinVectorToScalarMath().
Definition at line 16420 of file SemaChecking.cpp.
References BuiltinVectorMath(), and clang::Expr::setType().
| 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 765 of file SemaExpr.cpp.
References Context, DefaultLvalueConversion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getType(), ImpCastExprToType(), clang::Type::isFunctionType(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by BuildResolvedCallExpr().
|
static |
Definition at line 16482 of file SemaDecl.cpp.
References methodHasName().
Referenced by CheckCoroutineWrapper(), and clang::sema::visitFunctionCallArguments().
|
static |
Definition at line 16486 of file SemaDecl.cpp.
References clang::FunctionDecl::isStatic(), and methodHasName().
Referenced by CheckCoroutineWrapper().
|
static |
Determine whether the callee of a particular function call can throw.
E, D and Loc are all optional.
Definition at line 997 of file SemaExceptionSpec.cpp.
References clang::FunctionProtoType::canThrow(), clang::cast(), clang::CT_Can, clang::CT_Cannot, clang::Type::getAs(), clang::Stmt::getBeginLoc(), getLangOpts(), clang::Type::getPointeeType(), getPointeeType(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Expr::IgnoreParenImpCasts(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), ResolveExceptionSpec(), Sema(), and clang::T.
Referenced by canThrow(), clang::canVarDeclThrow(), and checkNoThrow().
| 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 16380 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().
| 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.
| NewD | The new declaration. |
| OldD | The old declaration. |
| NewT | The portion of the type of the new declaration to check. |
| OldT | The portion of the type of the old declaration to check. |
Definition at line 11312 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().
| bool Sema::CanPerformAggregateInitializationForOverloadResolution | ( | const InitializedEntity & | Entity, |
| InitListExpr * | From ) |
Determine whether we can perform aggregate initialization for the purposes of overload resolution.
Definition at line 3622 of file SemaInit.cpp.
References clang::InitializedEntity::getType().
Referenced by TryListConversion().
| bool Sema::CanPerformCopyInitialization | ( | const InitializedEntity & | Entity, |
| ExprResult | Init ) |
Definition at line 9980 of file SemaInit.cpp.
References clang::InitializationKind::CreateCopy(), clang::Stmt::getBeginLoc(), clang::Init, InitializationSequence, and clang::Seq.
Referenced by TryListConversion().
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 16404 of file SemaDecl.cpp.
References Consumer, and clang::Decl::getAsFunction().
| CanThrowResult clang::Sema::canThrow | ( | const Stmt * | E | ) |
Definition at line 1112 of file SemaExceptionSpec.cpp.
References canCalleeThrow(), clang::canDynamicCastThrow(), clang::canSubStmtsThrow(), canThrow(), clang::canTypeidThrow(), clang::canVarDeclThrow(), clang::LambdaExpr::capture_init_begin(), clang::LambdaExpr::capture_init_end(), clang::cast(), Context, clang::CT_Can, clang::CT_Cannot, clang::CT_Dependent, clang::Type::getAsCXXRecordDecl(), clang::CallExpr::getCallee(), clang::CallExpr::getCalleeDecl(), clang::CXXCatchStmt::getExceptionDecl(), getExpr(), clang::CXXCatchStmt::getHandlerBlock(), clang::Stmt::getStmtClass(), getType(), clang::ObjCAtCatchStmt::hasEllipsis(), clang::Expr::IgnoreParens(), clang::Init, clang::isa(), clang::CXXDestructorDecl::isCalledByDelete(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), clang::mergeCanThrow(), and clang::Stmt::NoStmtClass.
Referenced by BuildCXXNoexceptExpr(), BuildExprRequirement(), canThrow(), clang::canTypeidThrow(), checkEscapingByref(), and EvaluateBooleanTypeTrait().
Determine whether the use of this declaration is valid, without emitting diagnostics.
Definition at line 76 of file SemaExpr.cpp.
References clang::AR_Unavailable, clang::cast(), clang::CPlusPlus14, CurContext, DeduceReturnType(), clang::Decl::getAvailability(), getLangOpts(), clang::isa(), isUnavailableAlignedAllocationFunction(), and ParsingInitForAutoVars.
Referenced by canRecoverDotPseudoDestructorCallsOnPointerObjects().
| bool Sema::CaptureHasSideEffects | ( | const sema::Capture & | From | ) |
Does copying/destroying the captured variable have side effects?
Definition at line 2003 of file SemaLambda.cpp.
References clang::cast(), Context, clang::Type::getAsCXXRecordDecl(), clang::sema::Capture::getCaptureType(), getCurrentThisType(), clang::Type::getPointeeType(), clang::sema::Capture::getVariable(), clang::Init, clang::sema::Capture::isCopyCapture(), clang::sema::Capture::isInitCapture(), clang::sema::Capture::isThisCapture(), and clang::T.
Referenced by DiagnoseUnusedLambdaCapture().
|
inline |
Whether APINotes should be gathered for all applicable Swift language versions, without being applied.
Leaving clients of the current module to select and apply the correct version.
Definition at line 1644 of file Sema.h.
References APINotes.
Referenced by applyAPINotesType(), applyNullability(), and ProcessVersionedAPINotes().
| QualType Sema::CheckAdditionOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc, | ||
| QualType * | CompLHSTy = nullptr ) |
Definition at line 11369 of file SemaExpr.cpp.
References clang::Arithmetic, checkArithmeticNull(), checkArithmeticOnObjCPointer(), checkArithmeticOpPointerOperand(), CheckMatrixElementwiseOperands(), CheckSizelessVectorOperands(), CheckVectorOperands(), clang::CompAssign, Context, clang::CPlusPlus, clang::SemaBase::Diag(), diagnoseArithmeticOnNullPointer(), diagnoseScopedEnums(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), clang::ActionResult< PtrTy, Compress >::get(), clang::APValue::getInt(), getLangOpts(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), InvalidOperands(), clang::isa(), clang::Type::isAnyPointerType(), clang::Type::isArithmeticType(), clang::Type::isConstantMatrixType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::BinaryOperator::isNullPointerArithmeticExtension(), clang::Expr::isNullPointerConstant(), clang::Type::isObjCObjectPointerType(), isObjCPointer(), clang::Type::isPointerType(), clang::Type::isSveVLSBuiltinType(), clang::Type::isVectorType(), clang::Expr::NPC_ValueDependentIsNotNull, UsualArithmeticConversions(), and clang::Expr::EvalResult::Val.
Referenced by CreateBuiltinBinOp().
| 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 11712 of file SemaOverload.cpp.
References clang::Function.
Referenced by BuildCallExpr(), BuiltinFunctionStart(), CheckAddressOfOperand(), DefaultFunctionArrayConversion(), clang::InitializationSequence::Diagnose(), FinishOverloadedCallExpr(), isExprAnUnaddressableFunction(), IsStandardConversion(), markUnaddressableCandidatesUnviable(), maybeDiagnoseAssignmentToFunction(), and clang::InitializationSequence::Perform().
| Sema::AccessResult Sema::CheckAddressOfMemberAccess | ( | Expr * | OvlExpr, |
| DeclAccessPair | FoundDecl ) |
Definition at line 1848 of file SemaAccess.cpp.
References AR_accessible, clang::AS_none, clang::AS_public, CheckAccess(), Context, clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::Found, getLangOpts(), clang::OverloadExpr::getNameLoc(), clang::OverloadExpr::getNamingClass(), and clang::Stmt::getSourceRange().
Referenced by clang::InitializationSequence::Perform(), ResolveAddressOfOverloadedFunction(), and resolveAndFixAddressOfSingleOverloadCandidate().
| QualType Sema::CheckAddressOfOperand | ( | ExprResult & | Operand, |
| 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 14664 of file SemaExpr.cpp.
References clang::C99, clang::cast(), checkAddressOfFunctionIsAvailable(), CheckPlaceholderExpr(), CheckUseOfCXXMethodAsAddressOfOperand(), clang::Expr::ClassifyLValue(), Context, clang::CPlusPlus, CreateMaterializeTemporaryExpr(), clang::SemaBase::Diag(), diagnoseAddressOfInvalidType(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsPlaceholderType(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::DeclRefExpr::getDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getObjectKind(), clang::CXXMethodDecl::getParent(), clang::DeclContext::getParent(), getPrimaryDecl(), clang::DeclRefExpr::getQualifier(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParens(), clang::isa(), isCompleteType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isObjCObjectType(), clang::DeclContext::isRecord(), clang::Type::isReferenceType(), isSFINAEContext(), clang::Expr::isTypeDependent(), isUnevaluatedContext(), clang::CXXMethodDecl::isVirtual(), clang::Type::isVoidType(), 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::FunctionDecl::parameters(), RequireCompleteType(), ResolveSingleFunctionTemplateSpecialization(), clang::SC_Register, and clang::T.
Referenced by BuiltinAddressof(), and CreateBuiltinUnaryOp().
| bool Sema::CheckAlignasTypeArgument | ( | StringRef | KWName, |
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | OpLoc, | ||
| SourceRange | R ) |
Definition at line 4790 of file SemaExpr.cpp.
References CheckUnaryExprOrTypeTraitOperand(), and clang::TypeSourceInfo::getType().
Referenced by ActOnAlignasTypeArgument(), and instantiateDependentAlignedAttr().
| void Sema::CheckAlignasUnderalignment | ( | Decl * | D | ) |
Definition at line 4710 of file SemaDeclAttr.cpp.
References clang::cast(), Context, clang::SemaBase::Diag(), clang::CharUnits::getQuantity(), clang::Decl::hasAttrs(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Type::isSizelessType(), and clang::Decl::specific_attrs().
Referenced by ActOnEnumBody(), ActOnFields(), CheckFieldDecl(), and CheckVariableDeclarationType().
| bool Sema::CheckAllocatedType | ( | QualType | AllocType, |
| SourceLocation | Loc, | ||
| SourceRange | R ) |
Checks that a type is suitable as the allocated type in a new-expression.
Definition at line 2656 of file SemaExprCXX.cpp.
References Context, clang::Default, clang::SemaBase::Diag(), clang::QualType::getAddressSpace(), clang::Qualifiers::getAddressSpaceAttributePrintValue(), getLangOpts(), clang::QualType::getObjCLifetime(), clang::QualType::getQualifiers(), clang::QualType::getUnqualifiedType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isObjCLifetimeType(), clang::Type::isReferenceType(), clang::Type::isVariablyModifiedType(), clang::Qualifiers::OCL_None, RequireCompleteSizedType(), and RequireNonAbstractType().
Referenced by BuildCXXNew().
| 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 1732 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, Diagnose, clang::Found, and getLangOpts().
Referenced by CheckDeleteOperator(), and resolveAllocationOverloadInterior().
| bool Sema::CheckAltivecInitFromScalar | ( | SourceRange | R, |
| QualType | VecTy, | ||
| QualType | SrcTy ) |
Definition at line 2734 of file SemaCast.cpp.
References clang::SemaBase::Diag(), clang::LangOptionsBase::GCC, clang::SourceRange::getBegin(), and getLangOpts().
Referenced by BuildVectorLiteral().
| bool Sema::CheckAlwaysInlineAttr | ( | const Stmt * | OrigSt, |
| const Stmt * | CurSt, | ||
| const AttributeCommonInfo & | A ) |
Definition at line 292 of file SemaStmtAttr.cpp.
References CheckStmtInlineAttr().
Referenced by handleAlwaysInlineAttr().
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 660 of file SemaStmt.cpp.
References clang::cast(), CurContext, clang::ReturnStmt::getRetValue(), clang::IgnoreElidableImplicitConstructorSingleStep(), clang::IgnoreExprNodes(), clang::IgnoreImplicitAsWrittenSingleStep(), clang::Expr::isInstantiationDependent(), and clang::ReturnStmt::setRetValue().
Referenced by BuildAttributedStmt().
Checks that a call expression's argument count is the desired number.
This is useful when doing custom type-checking. Returns true on error.
Definition at line 160 of file SemaChecking.cpp.
References clang::Call, checkArgCountAtLeast(), and clang::SemaBase::Diag().
Referenced by BuiltinAddressof(), BuiltinAlignment(), BuiltinAnnotation(), BuiltinBswapg(), BuiltinCallWithStaticChain(), BuiltinElementwiseTernaryMath(), BuiltinFunctionStart(), BuiltinInvoke(), BuiltinIsWithinLifetime(), BuiltinLaunder(), BuiltinMaskedScatter(), BuiltinMaskedStore(), BuiltinOverflow(), BuiltinPopcountg(), BuiltinPreserveAI(), BuiltinRotateGeneric(), BuiltinTriviallyRelocate(), BuiltinVectorMath(), clang::checkGenericCastToPtr(), GetVTablePointer(), PointerAuthAuthAndResign(), PointerAuthBlendDiscriminator(), PointerAuthSignGenericData(), PointerAuthSignOrAuth(), PointerAuthStrip(), and PrepareBuiltinElementwiseMathOneArgCall().
Checks that a call expression's argument count is at least the desired number.
This is useful when doing custom type-checking on a variadic function. Returns true on error.
Definition at line 135 of file SemaChecking.cpp.
References clang::Call, and clang::SemaBase::Diag().
Referenced by BuiltinDumpStruct(), checkArgCount(), checkArgCountRange(), and checkBuiltinInferAllocToken().
Checks that a call expression's argument count is at most the desired number.
This is useful when doing custom type-checking on a variadic function. Returns true on error.
Definition at line 145 of file SemaChecking.cpp.
References clang::Call, and clang::SemaBase::Diag().
Referenced by checkArgCountRange().
Checks that a call expression's argument count is in the desired range.
This is useful when doing custom type-checking on a variadic function. Returns true on error.
Definition at line 154 of file SemaChecking.cpp.
References clang::Call, checkArgCountAtLeast(), and checkArgCountAtMost().
Referenced by BuiltinCountZeroBitsGeneric(), BuiltinMaskedGather(), and BuiltinMaskedLoad().
| bool Sema::CheckArgsForPlaceholders | ( | MultiExprArg | args | ) |
Check an argument list for placeholders that we won't try to handle later.
Definition at line 6343 of file SemaExpr.cpp.
References CheckPlaceholderExpr(), clang::ActionResult< PtrTy, Compress >::get(), getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and isPlaceholderToRemoveAsArg().
Referenced by ActOnArraySubscriptExpr(), BuildCallExpr(), and BuildCXXNew().
| bool Sema::checkArrayElementAlignment | ( | QualType | EltTy, |
| SourceLocation | Loc ) |
Definition at line 2032 of file SemaType.cpp.
References Context, clang::SemaBase::Diag(), clang::CharUnits::getQuantity(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), and clang::Type::isUndeducedType().
Referenced by BuildArrayType(), and BuildCXXNew().
| 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 9453 of file SemaExpr.cpp.
References clang::AltiVecBool, clang::AltiVecPixel, clang::AltiVecVector, anyAltivecTypes(), ARM(), clang::C23, CheckAssignmentConstraints(), checkBlockPointerTypesForAssignment(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), clang::Compatible, Context, clang::CPlusPlus, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), getLangOpts(), clang::VectorType::getNumElements(), clang::Type::getPointeeType(), getPointeeType(), clang::Expr::getType(), clang::VectorType::getVectorKind(), ImpCastExprToType(), clang::Incompatible, clang::IncompatibleObjCWeakRef, clang::IncompatiblePointer, clang::IncompatibleVectors, clang::IntToBlockPointer, clang::IntToPointer, clang::isa(), clang::Type::isArithmeticType(), IsAssignConvertCompatible(), clang::Type::isBlockCompatibleObjCPointerType(), clang::Type::isBlockPointerType(), clang::Type::isEnumeralType(), clang::Type::isExtVectorBoolType(), 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, ObjC(), clang::PointerToInt, PrepareScalarCast(), prepareVectorSplat(), clang::Result, and unsupportedTypeConversion().
| 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 9414 of file SemaExpr.cpp.
References CheckAssignmentConstraints(), and clang::VK_PRValue.
Referenced by ActOnCleanupAttr(), CheckAssignmentConstraints(), CheckAssignmentConstraints(), CheckAssignmentOperands(), CheckSingleAssignmentConstraints(), CheckTransparentUnionArgumentConstraints(), and PerformImplicitConversion().
| QualType Sema::CheckAssignmentOperands | ( | Expr * | LHSExpr, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| QualType | CompoundType, | ||
| BinaryOperatorKind | Opc ) |
Definition at line 14205 of file SemaExpr.cpp.
References clang::Assigning, BoundsSafetyCheckAssignmentToCountAttrPtr(), CheckAssignmentConstraints(), clang::sema::checkAssignmentLifetime(), CheckForModifiableLvalue(), CheckForNullPointerDereference(), CheckIdentityFieldAssignment(), clang::SemaObjC::checkRetainCycles(), CheckSingleAssignmentConstraints(), checkUnsafeExprAssigns(), clang::Compatible, Context, clang::CPlusPlus20, clang::SemaBase::Diag(), DiagnoseAssignmentResult(), Diags, ExprEvalContexts, clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAtomicUnqualifiedType(), clang::Stmt::getBeginLoc(), getCurFunction(), clang::DeclRefExpr::getDecl(), getLangOpts(), clang::SourceLocation::getLocWithOffset(), clang::QualType::getObjCLifetime(), getOpenCLOptions(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParenCasts(), clang::IncompatiblePointer, IsAssignConvertCompatible(), clang::SourceLocation::isFileID(), clang::Type::isHalfType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNonWeakInMRRWithObjCWeak(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCObjectType(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::QualType::isVolatileQualified(), clang::Type::isWebAssemblyTableType(), clang::sema::FunctionScopeInfo::markSafeWeakUse(), ObjC(), clang::Qualifiers::OCL_Strong, and OpenCL().
Referenced by CreateBuiltinBinOp().
| void Sema::CheckAttributesOnDeducedType | ( | Decl * | D | ) |
CheckAttributesOnDeducedType - Calls Sema functions for attributes that requires the type to be deduced.
Definition at line 3365 of file SemaDecl.cpp.
References clang::Decl::attrs().
Referenced by ActOnUninitializedDecl(), and AddInitializerToDecl().
| bool Sema::CheckAttrNoArgs | ( | const ParsedAttr & | CurrAttr | ) |
Definition at line 2112 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkExactlyNumArgs(), and clang::ParsedAttr::setInvalid().
Referenced by handleFunctionTypeAttr(), and handleNonBlockingNonAllocatingTypeAttr().
| bool Sema::CheckAttrTarget | ( | const ParsedAttr & | CurrAttr | ) |
Definition at line 2121 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), DiagnoseUnknownAttribute(), clang::ParsedAttr::existsInTarget(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::ParsedAttr::setInvalid().
Referenced by checkCommonAttributeFeatures(), and handleFunctionTypeAttr().
| AccessResult clang::Sema::CheckBaseClassAccess | ( | SourceLocation | AccessLoc, |
| CXXRecordDecl * | Base, | ||
| CXXRecordDecl * | Derived, | ||
| const CXXBasePath & | Path, | ||
| unsigned | DiagID, | ||
| llvm::function_ref< void(PartialDiagnostic &PD)> | SetupPDiag, | ||
| bool | ForceCheck = false, | ||
| bool | ForceUnprivileged = false ) |
References clang::SemaBase::Diag(), and clang::Found.
| 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.
| ForceCheck | true if this check should be performed even if access control is disabled; some things rely on this for semantics |
| ForceUnprivileged | true if this check should proceed as if the context had no special privileges |
Definition at line 1896 of file SemaAccess.cpp.
References CheckBaseClassAccess(), and clang::Type::getAsCXXRecordDecl().
Referenced by buildDeclareReductionRef(), buildUserDefinedMapperRef(), CheckBaseClassAccess(), CheckDerivedToBaseConversion(), CheckMemberPointerConversion(), DiagnoseInvalidExplicitObjectParameterInLambda(), findDecomposableBaseClass(), handlerCanCatch(), and hasUserDefinedMapper().
| CXXBaseSpecifier * Sema::CheckBaseSpecifier | ( | CXXRecordDecl * | Class, |
| SourceRange | SpecifierRange, | ||
| bool | Virtual, | ||
| AccessSpecifier | Access, | ||
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | EllipsisLoc ) |
Check the validity of a C++ base class specifier.
Definition at line 2734 of file SemaDeclCXX.cpp.
References clang::AS_none, clang::AS_public, clang::Class, computeDeclContext(), Context, Diag(), clang::TypeLoc::getBeginLoc(), clang::getDLLAttr(), getLangOpts(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), HLSL(), clang::SourceLocation::isValid(), propagateDLLAttrToBaseClassTemplate(), RequireCompleteType(), and Virtual.
Referenced by ActOnBaseSpecifier(), and SubstBaseSpecifiers().
|
inline |
Definition at line 13564 of file SemaExpr.cpp.
References clang::BitwiseOp, checkArithmeticNull(), CheckSizelessVectorOperands(), CheckVectorOperands(), clang::CompAssign, diagnoseLogicalNotOnLHSofCheck(), diagnoseScopedEnums(), diagnoseXorMisusedAsPow(), clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), clang::Expr::getType(), clang::Type::hasFloatingRepresentation(), clang::Type::hasIntegerRepresentation(), InvalidOperands(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isLegalBoolVectorBinaryOp(), clang::QualType::isNull(), clang::Type::isSveVLSBuiltinType(), clang::Type::isVectorType(), and UsualArithmeticConversions().
Referenced by CreateBuiltinBinOp().
| 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.
| Loc | - A location associated with the condition, e.g. the 'if' keyword. |
Definition at line 20923 of file SemaExpr.cpp.
References CheckCXXBooleanCondition(), CheckPlaceholderExpr(), clang::CPlusPlus, DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), DiagnoseAssignmentAsCondition(), DiagnoseEqualityWithExtraParens(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), and clang::T.
Referenced by ActOnCondition(), ActOnDoStmt(), BuildCXXForRangeStmt(), and CheckConditionVariable().
| void Sema::checkCall | ( | NamedDecl * | FDecl, |
| const FunctionProtoType * | Proto, | ||
| const Expr * | ThisArg, | ||
| ArrayRef< const Expr * > | Args, | ||
| bool | IsMemberFunction, | ||
| SourceLocation | Loc, | ||
| SourceRange | Range, | ||
| VariadicCallType | CallType ) |
Handles the checks for format strings, non-POD arguments to vararg functions, NULL arguments passed to non-NULL parameters, diagnose_if attributes and AArch64 SME attributes.
Definition at line 4038 of file SemaChecking.cpp.
References clang::FunctionProtoType::ExtProtoInfo::AArch64SMEAttributes, clang::FunctionType::ARM_None, clang::SemaARM::ArmStreaming, clang::SemaARM::ArmStreamingCompatible, clang::cast(), clang::SemaPPC::checkAIXMemberAlignment(), checkLifetimeCaptureBy(), CheckNonNullArguments(), checkVariadicArgument(), clang::Expr::containsErrors(), Context, CurContext, clang::SemaBase::Diag(), diagnoseArgDependentDiagnoseIfAttrs(), clang::DoesNotApply, clang::getArmStreamingFnType(), clang::FunctionType::getArmZAState(), clang::FunctionType::getArmZT0State(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), clang::Expr::getExprLoc(), clang::FunctionProtoType::getExtProtoInfo(), clang::NamedDecl::getFormalLinkage(), clang::Decl::getFunctionType(), clang::APValue::getInt(), getLangOpts(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::FunctionType::getReturnType(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::NamedDecl::hasLinkage(), clang::Internal, clang::Type::isSizelessVectorType(), MaximumAlignment, PPC(), clang::FunctionType::SME_PStateSMCompatibleMask, clang::FunctionType::SME_PStateSMEnabledMask, clang::Decl::specific_attrs(), and clang::Expr::EvalResult::Val.
Referenced by BuildCXXNew(), CheckFunctionCall(), and CreateOverloadedBinOp().
| bool Sema::CheckCallingConvAttr | ( | const ParsedAttr & | attr, |
| CallingConv & | CC, | ||
| const FunctionDecl * | FD = nullptr, | ||
| CUDAFunctionTarget | CFT = CUDAFunctionTarget::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 5517 of file SemaDeclAttr.cpp.
References clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::CC_AArch64SVEPCS, clang::CC_AArch64VectorCall, clang::CC_C, clang::CC_DeviceKernel, clang::CC_IntelOclBicc, clang::CC_M68kRTD, clang::CC_PreserveAll, clang::CC_PreserveMost, clang::CC_PreserveNone, clang::CC_RISCVVectorCall, clang::CC_RISCVVLSCall_32, 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, clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), clang::TargetInfo::checkCallingConvention(), clang::ParsedAttr::checkExactlyNumArgs(), checkStringLiteralArgumentAttr(), checkUInt32Argument(), Context, CUDA(), clang::Device, clang::SemaBase::Diag(), ForThisTarget, clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParsedAttr::getProcessingCache(), clang::TargetInfo::getTriple(), clang::Global, clang::ParsedAttr::hasProcessingCache(), clang::Host, clang::HostDevice, clang::SemaCUDA::IdentifyTarget(), clang::InvalidTarget, clang::NamedDecl::isCXXInstanceMember(), clang::ParsedAttr::isInvalid(), clang::FunctionDecl::isVariadic(), LangOpts, clang::ParsedAttr::setInvalid(), and clang::ParsedAttr::setProcessingCache().
Referenced by getCCForDeclaratorChunk(), handleCallConvAttr(), and handleFunctionTypeAttr().
| 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 20795 of file SemaExpr.cpp.
References clang::SemaBase::Diag(), clang::Sema::ExpressionEvaluationContextRecord::EK_Decltype, ExprEvalContexts, clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), clang::Type::isIncompleteType(), clang::Type::isVoidType(), RequireCompleteType(), Sema(), and clang::T.
Referenced by ActOnDecltypeExpression(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildLiteralOperatorCall(), BuildOverloadedArrowExpr(), BuildResolvedCallExpr(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().
Definition at line 21722 of file SemaExpr.cpp.
References Context, clang::Expr::getType(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrEnumerationType(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
| void Sema::CheckCastAlign | ( | Expr * | Op, |
| QualType | T, | ||
| SourceRange | TRange ) |
CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment requirements.
Definition at line 15166 of file SemaChecking.cpp.
References Context, clang::SemaBase::Diag(), clang::Type::getAs(), clang::SourceRange::getBegin(), getDiagnostics(), clang::PointerType::getPointeeType(), getPresumedAlignmentOfPointer(), clang::CharUnits::getQuantity(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::CharUnits::isOne(), and clang::T.
| void Sema::checkClassLevelCodeSegAttribute | ( | CXXRecordDecl * | Class | ) |
Definition at line 6497 of file SemaDeclCXX.cpp.
References clang::Class, getImplicitCodeSegOrSectionAttrForFunction(), and clang::Method.
Referenced by CheckCompletedCXXClass().
| void Sema::checkClassLevelDLLAttribute | ( | CXXRecordDecl * | Class | ) |
Check class-level dllimport/dllexport attribute.
The caller must ensure that referenceDLLExportedClassMethods is called some point later when all outer classes of Class are complete.
Definition at line 6507 of file SemaDeclCXX.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Class, clang::Attr::clone(), Context, DelayedDllExportClasses, Diag(), clang::Decl::FOK_None, ForceDeclarationOfImplicitMembers(), getASTContext(), clang::getDLLAttr(), clang::Decl::getFriendObjectKind(), clang::Attr::getKind(), getLangOpts(), clang::Attr::getLocation(), clang::CXXMethodDecl::getMostRecentDecl(), clang::Decl::getPreviousDecl(), clang::isa(), clang::FunctionDecl::isDeleted(), clang::isExternallyVisible(), clang::Attr::isInherited(), clang::FunctionDecl::isInlined(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::CXXConstructorDecl::isMoveConstructor(), clang::FunctionDecl::isTrivial(), clang::Member, clang::LangOptionsBase::MSVC2015, clang::InheritableAttr::setInherited(), clang::TSK_ExplicitInstantiationDeclaration, and clang::TSK_ExplicitInstantiationDefinition.
Referenced by CheckCompletedCXXClass(), dllExportImportClassTemplateSpecialization(), and propagateDLLAttrToBaseClassTemplate().
| 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 1912 of file SemaTemplate.cpp.
References ActOnDocumentableDecl(), AddAlignmentAttributesForRecord(), clang::Decl::addAttr(), AddMsStructLayoutForRecord(), AddPushedVisibilityAttribute(), clang::AS_none, clang::AS_public, clang::cast(), CheckRedeclarationInModule(), CheckTemplateDeclScope(), CheckTemplateParameterList(), computeDeclContext(), Context, clang::ClassTemplateDecl::Create(), clang::CXXRecordDecl::Create(), clang::FriendDecl::Create(), clang::FixItHint::CreateReplacement(), CurContext, clang::Definition, clang::SemaBase::Diag(), DiagnoseClassNameShadow(), diagnoseQualifiedDeclaration(), DiagnoseTemplateParameterShadow(), clang::DeclContext::Encloses(), EnterTemplatedContext(), clang::Enum, clang::DeclContext::Equals(), forRedeclarationInCurContext(), clang::Friend, clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::RecordDecl::getDefinition(), clang::Scope::getFlags(), 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::KeywordHelpers::getTagTypeKindForTypeSpec(), clang::ClassTemplateDecl::getTemplatedDecl(), GetTemplateParameterList(), clang::TemplateDecl::getTemplateParameters(), clang::NamedDecl::getUnderlyingDecl(), inferGslOwnerPointerAttribute(), inferNullableClassAttribute(), clang::Invalid, clang::isa(), isAcceptableTagRedeclaration(), isDeclInScope(), clang::DeclContext::isDependentContext(), clang::CXXScopeSpec::isEmpty(), clang::DeclContext::isFileContext(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::isRecord(), isRedefinitionAllowedFor(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), clang::Scope::isTemplateParamScope(), clang::DeclContext::isTransparentContext(), clang::CXXScopeSpec::isValid(), clang::SourceLocation::isValid(), LangOpts, LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupTagName, clang::DeclContext::makeDeclVisibleInContext(), makeMergedDefinitionVisible(), mergeDeclAttributes(), clang::SkipBodyInfo::Previous, Previous, ProcessDeclAttributeList(), PushOnScopeChains(), RebuildTemplateParamsInCurrentInstantiation(), clang::Reference, 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::SkipBodyInfo::ShouldSkip, clang::TemplateParameterList::size(), clang::TagDecl::startDefinition(), TemplateParameterListsAreEqual(), clang::Scope::TemplateParamScope, TPC_ClassTemplateMember, TPC_FriendClassTemplate, TPC_Other, and TPL_TemplateMatch.
Referenced by ActOnClassTemplateSpecialization(), ActOnTag(), and ActOnTemplatedFriendTag().
| 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 1630 of file SemaAttr.cpp.
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
| bool Sema::checkCommonAttributeFeatures | ( | const Stmt * | S, |
| const ParsedAttr & | A, | ||
| bool | SkipArgCountCheck = false ) |
Definition at line 1634 of file SemaAttr.cpp.
| QualType Sema::CheckCompareOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc ) |
Definition at line 12637 of file SemaExpr.cpp.
References clang::C11, clang::Type::castAs(), checkArithmeticNull(), checkArithmeticOrEnumeralCompare(), CheckComparisonCategoryType(), clang::SemaObjC::CheckObjCConversion(), CheckPtrComparisonWithNullChar(), CheckSizelessVectorCompareOperands(), CheckVectorCompareOperands(), Context, convertPointersToCompositeType(), clang::CPlusPlus, CurContext, DefaultFunctionArrayLvalueConversion(), DefaultLvalueConversion(), clang::SemaBase::Diag(), DiagnoseAlwaysNonNullPointer(), diagnoseDistinctPointerComparison(), diagnoseFunctionPointerToVoidComparison(), diagnoseLogicalNotOnLHSofCheck(), diagnoseObjCLiteralComparison(), diagnoseTautologicalComparison(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), getASTContext(), clang::QualType::getCanonicalType(), clang::FunctionType::getCFIUncheckedCalleeAttr(), clang::getComparisonCategoryForBuiltinCmp(), getLangOpts(), clang::DeclContext::getParent(), clang::PointerType::getPointeeType(), clang::Type::getPointeeType(), getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), ImpCastExprToType(), clang::Implicit, InvalidOperands(), clang::isa(), 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, ObjC(), OpenCL(), and OperatorInExpression.
Referenced by CreateBuiltinBinOp().
| QualType Sema::CheckComparisonCategoryType | ( | ComparisonCategoryType | Kind, |
| SourceLocation | Loc, | ||
| ComparisonCategoryUsage | Usage ) |
Lookup the specified comparison category types in the standard library, an check the VarDecls possibly returned by the operator<=> builtins for that type.
Definition at line 12087 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), Context, clang::CPlusPlus, Diag(), clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::ComparisonCategories::getCategoryString(), clang::CXXRecordDecl::getDefinition(), getLangOpts(), clang::ComparisonCategories::getPossibleResultsForType(), clang::ComparisonCategories::getResultString(), getStdNamespace(), clang::ComparisonCategoryInfo::getType(), clang::CXXRecordDecl::hasDefinition(), clang::ComparisonCategoryInfo::ValueInfo::hasValidIntValue(), clang::VarDecl::isStaticDataMember(), clang::CXXRecordDecl::isTriviallyCopyable(), clang::VarDecl::isUsableInConstantExpressions(), clang::ComparisonCategoryInfo::Kind, MarkVariableReferenced(), clang::None, clang::ComparisonCategoryInfo::Record, RequireCompleteType(), and clang::ComparisonCategoryInfo::ValueInfo::VD.
Referenced by checkArithmeticOrEnumeralThreeWayCompare(), CheckCompareOperands(), and CheckExplicitlyDefaultedComparison().
| void Sema::CheckCompatibleReinterpretCast | ( | QualType | SrcType, |
| QualType | DestType, | ||
| bool | IsDereference, | ||
| SourceRange | Range ) |
Definition at line 2067 of file SemaCast.cpp.
References Context, clang::SemaBase::Diag(), Diags, clang::Type::getAs(), clang::QualType::getCanonicalType(), clang::Type::getPointeeType(), clang::isa(), clang::Type::isAnyCharacterType(), clang::Type::isDependentType(), clang::Type::isSignedIntegerType(), clang::Type::isUnsignedIntegerType(), and clang::Type::isVoidType().
Referenced by CheckIndirectionOperand().
| void Sema::CheckCompletedCoroutineBody | ( | FunctionDecl * | FD, |
| Stmt *& | Body ) |
Definition at line 1162 of file SemaCoroutine.cpp.
References Context, clang::CoroutineBodyStmt::Create(), clang::SemaBase::Diag(), clang::AddrLabelExpr::getBeginLoc(), getCurFunction(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::isa(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isNoReturn(), and clang::Decl::setInvalidDecl().
Referenced by ActOnFinishFunctionBody().
| 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.
| S | The scope in which the class was parsed. Null if we didn't just parse a class definition. |
| Record | The completed class. |
Definition at line 6963 of file SemaDeclCXX.cpp.
References clang::AS_public, clang::Sema::DefaultedFunctionKind::asComparison(), clang::CXXRecordDecl::bases(), clang::CanNeverPassInRegs, clang::CannotPassInRegs, canPassInRegisters(), clang::CanPassInRegs, CheckAbstractClassUsage(), checkClassLevelCodeSegAttribute(), checkClassLevelDLLAttribute(), checkCUDADeviceBuiltinSurfaceClassTemplate(), checkCUDADeviceBuiltinTextureClassTemplate(), CheckExplicitlyDefaultedFunction(), checkIllFormedTrivialABIStruct(), checkIncorrectVTablePointerAuthenticationAttribute(), clang::ConsiderTrivialABI, Context, clang::CopyConstructor, clang::FixItHint::CreateInsertion(), CUDA(), clang::LangOptionsBase::Default, clang::DefaultConstructor, DefineDefaultedFunction(), DelayedDllExportMemberFunctions, clang::Destructor, Diag(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAbstractType(), DiagnoseDeletedDefaultedFunction(), DiagnoseHiddenVirtualMethods(), clang::RecordDecl::fields(), clang::Decl::getAccess(), clang::Decl::getAsFunction(), clang::NamedDecl::getDeclName(), getDefaultedFunctionKind(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::FunctionDecl::getOverloadedOperator(), getSpecialMember(), clang::FunctionDecl::getStorageClass(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXRecordDecl::hasConstexprDestructor(), clang::Incomplete, clang::Invalid, clang::isa(), clang::DeclarationName::isAnyOperatorNewOrDelete(), clang::TagDecl::isCompleteDefinition(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isTypeAwareOperatorNewOrDelete(), clang::CXXMethodDecl::isVirtual(), MarkVTableUsed(), clang::MoveConstructor, clang::LangOptionsBase::MSVC2015, NotEqual, Relational, ReportOverrides(), clang::SC_Static, SpecialMemberIsTrivial(), clang::T, and V.
Referenced by ActOnFinishCXXMemberSpecification(), ActOnLambdaError(), and BuildLambdaExpr().
| void Sema::CheckCompleteDecompositionDeclaration | ( | DecompositionDecl * | DD | ) |
Definition at line 1602 of file SemaDeclCXX.cpp.
References clang::DecompositionDecl::bindings(), checkArrayDecomposition(), checkComplexDecomposition(), checkMemberDecomposition(), checkTupleLikeDecomposition(), checkVectorDecomposition(), Context, Diag(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::Type::isDependentType(), isTupleLike(), clang::TagDecl::isUnion(), and clang::Decl::setInvalidDecl().
Referenced by CheckCompleteVariableDeclaration().
| 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 14573 of file SemaDeclCXX.cpp.
References Context, clang::Destructor, clang::CXXRecordDecl::getNumVBases(), and MarkVirtualBaseDestructorsReferenced().
Referenced by MarkFunctionReferenced().
| void Sema::CheckCompleteVariableDeclaration | ( | VarDecl * | VD | ) |
Definition at line 14791 of file SemaDecl.cpp.
References clang::sema::FunctionScopeInfo::addByrefBlockVar(), clang::AttributeCommonInfo::AS_Declspec, BSSSegStack, clang::C23, clang::cast(), CheckCompleteDecompositionDeclaration(), ConstSegStack, Context, clang::CPlusPlus, clang::CPlusPlus11, clang::FixItHint::CreateInsertion(), CUDA(), CurInitSeg, CurInitSegLoc, clang::Sema::PragmaStack< ValueType >::CurrentPragmaLocation, clang::Sema::PragmaStack< ValueType >::CurrentValue, DataSegStack, clang::SemaBase::Diag(), DiagnoseUniqueObjectDuplication(), clang::QualType::DK_nontrivial_c_struct, FinalizeVarWithDestructor(), clang::Type::getAsCXXRecordDecl(), getCurFunction(), getDiagnostics(), clang::Expr::getExprLoc(), getLangOpts(), clang::Attr::getLocation(), clang::VarDecl::getPreviousDecl(), clang::AttributeCommonInfo::getRange(), clang::Stmt::getSourceRange(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::Init, inTemplateInstantiation(), clang::isa(), clang::isTemplateInstantiation(), clang::VarDecl::isThisDeclarationADefinition(), clang::SemaCUDA::MaybeAddConstantAttr(), clang::QualType::NonTrivialCtor, ObjC(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, OpenCL(), clang::SemaBase::PDiag(), PP, clang::ASTContext::PSF_Implicit, clang::ASTContext::PSF_Read, clang::ASTContext::PSF_Write, clang::SC_Register, setFunctionHasBranchProtectedScope(), clang::VarDecl::TLS_Static, clang::ast_matchers::type, and UnifySection().
Referenced by ActOnEndOfTranslationUnit(), ActOnUninitializedDecl(), AddInitializerToDecl(), buildCoroutinePromise(), and checkTupleLikeDecomposition().
| void Sema::CheckConceptRedefinition | ( | ConceptDecl * | NewDecl, |
| LookupResult & | Previous, | ||
| bool & | AddToScope ) |
Definition at line 9233 of file SemaTemplate.cpp.
References Context, clang::SemaBase::Diag(), clang::ConceptDecl::getCanonicalDecl(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), hasReachableDefinition(), IsRedefinitionInModule(), notePreviousDefinition(), and Previous.
Referenced by ActOnFinishConceptDefinition().
| ExprResult Sema::CheckConceptTemplateId | ( | const CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| const DeclarationNameInfo & | ConceptNameInfo, | ||
| NamedDecl * | FoundDecl, | ||
| TemplateDecl * | NamedConcept, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| bool | DoCheckConstraintSatisfaction = true ) |
Definition at line 4857 of file SemaTemplate.cpp.
References CheckConstraintSatisfaction(), CheckTemplateArgumentList(), Concept, clang::ConstraintSatisfaction::ContainsErrors, Context, clang::ASTTemplateArgumentListInfo::Create(), clang::ConceptReference::Create(), clang::ConceptSpecializationExpr::Create(), clang::ImplicitConceptSpecializationDecl::Create(), DiagnoseUseOfDecl(), clang::Error, clang::ExprError(), clang::CXXScopeSpec::getBeginLoc(), clang::Decl::getDeclContext(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::TemplateArgumentListInfo::getRAngleLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::Decl::isInvalidDecl(), clang::CXXScopeSpec::isSet(), clang::Sema::CheckTemplateArgumentInfo::SugaredConverted, and Unevaluated.
Referenced by BuildTemplateIdExpr(), formImmediatelyDeclaredConstraint(), and clang::TreeTransform< AdjustConstraints >::RebuildConceptSpecializationExpr().
| bool Sema::CheckConceptUseInDefinition | ( | NamedDecl * | Concept, |
| SourceLocation | Loc ) |
Definition at line 9275 of file SemaTemplate.cpp.
References Concept, and clang::SemaBase::Diag().
Referenced by CheckTypeConstraint(), and DiagnoseUseOfDecl().
| 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 8668 of file SemaExpr.cpp.
References checkBlockType(), checkCondition(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), CheckPlaceholderExpr(), checkPointerIntegerMismatch(), CheckVectorOperands(), clang::Cond, clang::Conditional, clang::Expr::containsErrors(), Context, clang::CPlusPlus, CXXCheckConditionalOperands(), clang::SemaBase::Diag(), DiagnoseConditionalForNull(), clang::SemaObjC::FindCompositeObjCPointerType(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), ImpCastExprToType(), clang::Type::isArithmeticType(), clang::Type::isBitIntType(), clang::Type::isBlockPointerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Type::isNullPtrType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::Type::isWebAssemblyTableType(), ObjC(), clang::OK_Ordinary, OpenCL(), OpenCLCheckVectorConditional(), PrepareScalarCast(), unsupportedTypeConversion(), UsualArithmeticConversions(), UsualUnaryConversions(), and clang::VK_PRValue.
Referenced by ActOnConditionalOp(), and builtinCommonTypeImpl().
| ExprResult Sema::CheckConditionVariable | ( | VarDecl * | ConditionVar, |
| SourceLocation | StmtLoc, | ||
| ConditionKind | CK ) |
Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement.
Definition at line 4417 of file SemaExprCXX.cpp.
References Boolean, BuildDeclRefExpr(), CheckBooleanCondition(), CheckSwitchCondition(), clang::Condition, ConstexprIf, clang::SemaBase::Diag(), clang::ExprError(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), Switch, clang::T, and clang::VK_LValue.
Referenced by ActOnConditionVariable().
Definition at line 1560 of file SemaChecking.cpp.
References Context, clang::SemaBase::Diag(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), and clang::Result.
Referenced by checkPointerAuthKey(), and HandlePtrAuthQualifier().
| bool Sema::CheckConstexprFunctionDefinition | ( | const FunctionDecl * | FD, |
| CheckConstexprKind | Kind ) |
Definition at line 1919 of file SemaDeclCXX.cpp.
References clang::CXXMethodDecl::begin_overridden_methods(), CheckConstexprDestructorSubobjects(), CheckConstexprFunctionBody(), CheckConstexprParameterTypes(), CheckConstexprReturnType(), CheckValid, clang::CPlusPlus20, clang::CPlusPlus23, Diag(), Diagnose, clang::FunctionDecl::getBody(), getLangOpts(), clang::Decl::getLocation(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), getRecordDiagFromTagKind(), clang::TagDecl::getTagKind(), clang::isa(), clang::CXXMethodDecl::isInstance(), clang::FunctionDecl::isVirtualAsWritten(), clang::Method, and clang::CXXRecordDecl::vbases().
Referenced by ActOnFinishFunctionBody(), and BuildLambdaExpr().
| void Sema::CheckConstrainedAuto | ( | const AutoType * | AutoT, |
| SourceLocation | Loc ) |
Definition at line 4249 of file SemaChecking.cpp.
References DiagnoseUseOfDecl().
Referenced by ActOnTypeName(), and ActOnVariableDeclarator().
| bool Sema::CheckConstraintExpression | ( | const Expr * | CE, |
| Token | NextToken = Token(), | ||
| bool * | PossibleNonPrimary = nullptr, | ||
| bool | IsTrailingRequiresClause = false ) |
Check whether the given expression is a valid constraint expression.
A diagnostic is emitted if it is not, false is returned, and PossibleNonPrimary will be set to true if the failure might be due to a non-primary expression being used as an atomic constraint.
Definition at line 93 of file SemaConcept.cpp.
References clang::C, CheckConstraintExpression(), Context, clang::CPlusPlus11, clang::SemaBase::Diag(), clang::getBinOpPrecedence(), getCurFunction(), clang::Expr::getExprLoc(), clang::Token::getKind(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Token::is(), clang::isa(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isSpecificBuiltinType(), clang::Expr::isTypeDependent(), and clang::prec::LogicalAnd.
Referenced by CheckConstraintExpression().
| bool Sema::CheckConstraintSatisfaction | ( | ConstrainedDeclOrNestedRequirement | Entity, |
| ArrayRef< AssociatedConstraint > | AssociatedConstraints, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgLists, | ||
| SourceRange | TemplateIDRange, | ||
| ConstraintSatisfaction & | Satisfaction, | ||
| const ConceptReference * | TopLevelConceptId = nullptr, | ||
| Expr ** | ConvertedExpr = nullptr ) |
Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given template arguments.
| Template | the template-like entity that triggered the constraints check (either a concept or a constrained entity). |
| ConstraintExprs | a list of constraint expressions, treated as if they were 'AND'ed together. |
| TemplateArgLists | the list of template arguments to substitute into the constraint expression. |
| TemplateIDRange | The source range of the template id that caused the constraints check. |
| Satisfaction | if true is returned, will contain details of the satisfaction, with enough information to diagnose an unsatisfied expression. |
Definition at line 1211 of file SemaConcept.cpp.
References clang::TemplateArgument::Args, CheckConstraintSatisfaction(), Context, clang::ConceptReference::getNamedConcept(), getSourceManager(), clang::ConstraintSatisfaction::IsSatisfied, clang::SourceRange::printToString(), clang::ConstraintSatisfaction::Profile(), and clang::Template.
Referenced by BuildNestedRequirement(), CheckConceptTemplateId(), CheckConstraintSatisfaction(), CheckDeducedArgumentConstraints(), CheckDeducedPlaceholderConstraints(), CheckFunctionConstraints(), CheckFunctionConstraintsWithoutInstantiation(), CheckFunctionTemplateConstraints(), and EnsureTemplateArgumentListConstraints().
| 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 11086 of file SemaDeclCXX.cpp.
References clang::Constructor, Context, clang::FixItHint::CreateInsertion(), and Diag().
Referenced by ActOnFinishDelayedCXXMethodDeclaration(), and CheckFunctionDeclaration().
| Sema::AccessResult Sema::CheckConstructorAccess | ( | SourceLocation | Loc, |
| CXXConstructorDecl * | D, | ||
| DeclAccessPair | FoundDecl, | ||
| const InitializedEntity & | Entity, | ||
| bool | IsCopyBindingRefToTemp = false ) |
Checks access to a constructor.
Definition at line 1648 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, clang::cast(), CheckConstructorAccess(), clang::Constructor, clang::InitializedEntity::EK_Base, clang::InitializedEntity::EK_LambdaCapture, clang::InitializedEntity::EK_Member, clang::InitializedEntity::EK_ParenAggInitMember, clang::Found, clang::InitializedEntity::getBaseSpecifier(), clang::InitializedEntity::getCapturedVarName(), clang::InitializedEntity::getDecl(), clang::InitializedEntity::getKind(), getLangOpts(), getSpecialMember(), clang::CXXBaseSpecifier::getType(), clang::InitializedEntity::getType(), clang::InitializedEntity::isInheritedVirtualBase(), and clang::SemaBase::PDiag().
Referenced by BuildCXXCastArgument(), CheckConstructorAccess(), CheckCXX98CompatAccessibleCopy(), CopyObject(), clang::InitializationSequence::Perform(), and PerformConstructorInitialization().
| Sema::AccessResult Sema::CheckConstructorAccess | ( | SourceLocation | Loc, |
| CXXConstructorDecl * | D, | ||
| DeclAccessPair | FoundDecl, | ||
| const InitializedEntity & | Entity, | ||
| const PartialDiagnostic & | PDiag ) |
Checks access to a constructor.
Definition at line 1691 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, clang::cast(), CheckAccess(), clang::Constructor, Context, CurContext, clang::InitializedEntity::EK_Base, clang::InitializedEntity::EK_Delegating, clang::Found, clang::InitializedEntity::getKind(), getLangOpts(), clang::DeclContext::getParent(), clang::InitializedEntity::getParent(), and clang::DeclAccessPair::make().
| 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 11025 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), checkMethodTypeQualifiers(), Context, clang::FixItHint::CreateRemoval(), Diag(), diagnoseIgnoredQualifiers(), diagnoseInvalidDeclaratorChunks(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), 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(), and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.
Referenced by CreateNewFunctionDecl().
| 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 11337 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::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), getLangOpts(), getLocForEndOfToken(), clang::Declarator::getName(), 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().
| ExprResult Sema::CheckConvertedConstantExpression | ( | Expr * | From, |
| QualType | T, | ||
| APValue & | Value, | ||
| CCEKind | CCE, | ||
| NamedDecl * | Dest = nullptr ) |
Definition at line 6523 of file SemaOverload.cpp.
References clang::T.
| ExprResult Sema::CheckConvertedConstantExpression | ( | Expr * | From, |
| QualType | T, | ||
| llvm::APSInt & | Value, | ||
| CCEKind | CCE ) |
Definition at line 6530 of file SemaOverload.cpp.
References CheckConvertedConstantExpression(), clang::T, and V.
Referenced by ActOnCaseExpr(), ActOnCXXNew(), ActOnNoexceptSpec(), BuildPackIndexingExpr(), BuildPackIndexingType(), checkArraySize(), CheckEnumConstant(), and CheckTemplateArgument().
| void Sema::CheckCoroutineWrapper | ( | FunctionDecl * | FD | ) |
Definition at line 16491 of file SemaDecl.cpp.
References CanBeGetReturnObject(), CanBeGetReturnTypeOnAllocFailure(), clang::SemaBase::Diag(), clang::Type::getAsRecordDecl(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::NamedDecl::getUnderlyingDecl(), and clang::Decl::hasAttr().
Referenced by ActOnFinishFunctionBody().
| bool clang::Sema::CheckCountedByAttrOnField | ( | FieldDecl * | FD, |
| Expr * | E, | ||
| bool | CountInBytes, | ||
| bool | OrNull ) |
Check if applying the specified attribute variant from the "counted by" family of attributes to FieldDecl FD is semantically valid.
If semantically invalid diagnostics will be emitted explaining the problems.
| FD | The FieldDecl to apply the attribute to |
| E | The count expression on the attribute |
| CountInBytes | If true the attribute is from the "sized_by" family of attributes. If the false the attribute is from "counted_by" family of attributes. |
| OrNull | If true the attribute is from the "_or_null" suffixed family of attributes. If false the attribute does not have the suffix. |
Together CountInBytes and OrNull decide the attribute variant. E.g. CountInBytes and OrNull both being true indicates the counted_by_or_null attribute.
Definition at line 53 of file SemaBoundsSafety.cpp.
References clang::SemaBase::Diag(), clang::FLEXIBLE_ARRAY_MEMBER, clang::FUNCTION, clang::ASTContext::getAsArrayType(), getASTContext(), clang::DeclaratorDecl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::getCountAttrKind(), clang::ArrayType::getElementType(), clang::GetEnclosingNamedOrTopAnonRecord(), getLangOpts(), clang::Decl::getLocation(), clang::FieldDecl::getParent(), clang::Type::getPointeeType(), clang::FieldDecl::getSourceRange(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::INCOMPLETE, clang::LangOptionsBase::IncompleteOnly, int, clang::Type::isAlwaysIncompleteType(), clang::Type::isBooleanType(), clang::Decl::isFlexibleArrayMemberLike(), clang::Type::isFunctionType(), clang::Type::isIntegerType(), clang::Type::isSizelessType(), clang::Type::isStructureTypeWithFlexibleArrayMember(), clang::TagDecl::isUnion(), clang::Type::isVoidType(), clang::SIZELESS, and clang::VALID.
Referenced by handleCountedByAttrField().
| ASTContext::CXXRecordDeclRelocationInfo Sema::CheckCXX2CRelocatable | ( | const clang::CXXRecordDecl * | D | ) |
Definition at line 215 of file SemaTypeTraits.cpp.
References clang::CPlusPlus, getLangOpts(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::hasUserDeclaredCopyAssignment(), clang::CXXRecordDecl::hasUserDeclaredCopyConstructor(), clang::CXXRecordDecl::hasUserDeclaredDestructor(), clang::CXXRecordDecl::hasUserDeclaredMoveOperation(), IsDefaultMovable(), clang::TagDecl::isDependentType(), IsEligibleForTrivialRelocation(), clang::Decl::isInvalidDecl(), clang::ASTContext::CXXRecordDeclRelocationInfo::IsRelocatable, and clang::TagDecl::isUnion().
Referenced by IsCXXTriviallyRelocatableType().
| ExprResult Sema::CheckCXXBooleanCondition | ( | Expr * | CondExpr, |
| bool | IsConstexpr = false ) |
CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
Definition at line 4454 of file SemaExprCXX.cpp.
References ActOnFinishFullExpr(), clang::Cond, clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isValueDependent(), PerformContextuallyConvertToBool(), and VerifyIntegerConstantExpression().
Referenced by CheckBooleanCondition(), and CXXCheckConditionalOperands().
| bool Sema::CheckCXXDefaultArgExpr | ( | SourceLocation | CallLoc, |
| FunctionDecl * | FD, | ||
| ParmVarDecl * | Param, | ||
| Expr * | Init = nullptr, | ||
| bool | SkipImmediateInvocations = true ) |
Instantiate or parse a C++ default argument expression as necessary.
Return true on error.
Definition at line 5476 of file SemaExpr.cpp.
References Cleanup, clang::SemaBase::Diag(), ExprEvalContexts, clang::Decl::getDeclContext(), ImmediateFunctionContext, clang::Init, InstantiateDefaultArgument(), clang::FunctionDecl::isImmediateFunction(), MarkDeclarationsReferencedInExpr(), PotentiallyEvaluated, runWithSufficientStackSpace(), and UnparsedDefaultArgLocs.
Referenced by BuildCXXDefaultArgExpr(), CheckCXXThrowOperand(), checkForMultipleExportedDefaultConstructors(), and InstantiateDefaultCtorDefaultArgs().
| void Sema::CheckCXXDefaultArguments | ( | FunctionDecl * | FD | ) |
Helpers for dealing with blocks and functions.
CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-formed according to C++ [dcl.fct.default].
Definition at line 1765 of file SemaDeclCXX.cpp.
References CurrentInstantiationScope, Diag(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getTemplateSpecializationKind(), and clang::TSK_ExplicitSpecialization.
Referenced by ActOnFinishDelayedCXXMethodDeclaration(), ActOnStartOfLambdaDefinition(), and CheckFunctionDeclaration().
| 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.
| Loc | The location at which the capture of 'this' occurs. |
| Explicit | Whether 'this' is explicitly captured in a lambda capture list. |
| FunctionScopeIndexToStopAt | If non-null, it points to the index of the FunctionScopeInfo stack beyond which we do not attempt to capture. This is useful when enclosing lambdas must speculatively capture 'this' that may or may not be used in certain specializations of a nested generic lambda (depending on whether the name resolves to a non-static member function or a static function). |
Definition at line 1289 of file SemaExprCXX.cpp.
References clang::sema::CapturingScopeInfo::addThisCapture(), buildLambdaThisCaptureFixit(), clang::sema::LambdaScopeInfo::CallOperator, clang::cast(), clang::SemaBase::Diag(), clang::Explicit, 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::isa(), clang::isGenericLambdaCallOperatorSpecialization(), isUnevaluatedContext(), and clang::Decl::setInvalidDecl().
Referenced by ActOnLambdaClosureQualifiers(), ActOnLambdaExpressionAfterIntroducer(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), DiagnoseDependentMemberLookup(), clang::getStackIndexOfNearestEnclosingCaptureCapableLambda(), MarkThisReferenced(), and tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs().
| bool Sema::CheckCXXThisType | ( | SourceLocation | Loc, |
| QualType | Type ) |
Check whether the type of 'this' is valid in the current context.
Definition at line 1414 of file SemaExprCXX.cpp.
References CurContext, clang::SemaBase::Diag(), getFunctionLevelDeclContext(), clang::isLambdaCallWithExplicitObjectParameter(), and clang::Method.
Referenced by ActOnCXXThis().
| bool Sema::CheckCXXThrowOperand | ( | SourceLocation | ThrowLoc, |
| QualType | ThrowTy, | ||
| Expr * | E ) |
CheckCXXThrowOperand - Validate the operand of a throw.
Definition at line 968 of file SemaExprCXX.cpp.
References CheckCXXDefaultArgExpr(), CheckDestructorAccess(), Context, clang::Destructor, clang::SemaBase::Diag(), DiagnoseUseOfDecl(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getDestructor(), clang::Expr::getExprLoc(), getLangOpts(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), clang::Stmt::getSourceRange(), clang::QualType::getTypePtr(), getUnambiguousPublicSubobjects(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::FunctionDecl::isDeleted(), clang::Type::isSizelessType(), clang::FunctionDecl::isTrivial(), clang::isUnresolvedExceptionSpec(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), LookupCopyingConstructor(), LookupDestructor(), MarkFunctionReferenced(), MarkVTableUsed(), clang::SemaBase::PDiag(), RequireCompleteType(), and RequireNonAbstractType().
Referenced by BuildCXXThrow().
| bool Sema::CheckDeclCompatibleWithTemplateTemplate | ( | TemplateDecl * | Template, |
| TemplateTemplateParmDecl * | Param, | ||
| const TemplateArgumentLoc & | Arg ) |
Definition at line 7739 of file SemaTemplate.cpp.
References clang::SemaBase::Diag(), clang::TemplateArgumentLoc::getLocation(), clang::isa(), clang::Template, clang::TNK_Concept_template, clang::TNK_Function_template, clang::TNK_Non_template, clang::TNK_Type_template, and clang::TNK_Var_template.
Referenced by ActOnTemplateTemplateParameter(), and CheckTemplateTemplateArgument().
| 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 11705 of file SemaDeclCXX.cpp.
References Context, CurContext, Diag(), clang::DeclaratorChunk::Function, clang::OpaquePtr< PtrTy >::get(), clang::UnionOpaquePtr< T >::get(), clang::TypeLoc::getAsAdjusted(), clang::TemplateName::getAsQualifiedTemplateName(), clang::TemplateName::getAsTemplateDecl(), clang::DeclSpec::getBeginLoc(), clang::TypeLoc::getBeginLoc(), clang::UnqualifiedId::getBeginLoc(), clang::Decl::getDeclContext(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getMutableDeclSpec(), clang::Declarator::getName(), clang::DeclContext::getRedeclContext(), clang::Declarator::getSourceRange(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::hasQualifiers(), clang::isa(), clang::Type::isDependentType(), clang::Declarator::isFunctionDefinition(), clang::Declarator::isInvalidType(), NoteTemplateLocation(), clang::DeclaratorChunk::Paren, clang::SC_None, clang::UnqualifiedId::TemplateName, and clang::Declarator::type_objects().
Referenced by CreateNewFunctionDecl().
| void Sema::CheckDeductionGuideTemplate | ( | FunctionTemplateDecl * | TD | ) |
Definition at line 4309 of file SemaTemplate.cpp.
References clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::TemplateDecl::getTemplateParameters(), hasVisibleDefaultArgument(), MarkDeducedTemplateParameters(), and noteNonDeducibleParameters().
Referenced by CheckFunctionDeclaration().
| void Sema::CheckDelayedMemberExceptionSpecs | ( | ) |
Definition at line 9337 of file SemaDeclCXX.cpp.
References CheckEquivalentExceptionSpec(), CheckOverridingFunctionExceptionSpec(), DelayedEquivalentExceptionSpecChecks, DelayedOverridingExceptionSpecChecks, and clang::Equivalent.
Referenced by ActOnEndOfTranslationUnit(), and ActOnFinishDelayedMemberInitializers().
| void Sema::CheckDelegatingCtorCycles | ( | ) |
Definition at line 19262 of file SemaDeclCXX.cpp.
References DelegatingCtorDecls, DelegatingCycleHelper(), ExternalSource, clang::Invalid, and clang::Valid.
Referenced by ActOnEndOfTranslationUnit().
| 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:
There really isn't any useful analysis we can do here, so we just store the information.
Definition at line 9480 of file SemaTemplate.cpp.
References Context, clang::SemaBase::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::isa(), clang::LookupResult::Filter::next(), Previous, and clang::FunctionDecl::setDependentTemplateSpecialization().
Referenced by ActOnFunctionDeclarator().
| bool Sema::CheckDerivedToBaseConversion | ( | QualType | Derived, |
| QualType | Base, | ||
| SourceLocation | Loc, | ||
| SourceRange | Range, | ||
| CXXCastPath * | BasePath = nullptr, | ||
| bool | IgnoreAccess = false ) |
Definition at line 3201 of file SemaDeclCXX.cpp.
References CheckDerivedToBaseConversion().
Referenced by CheckDerivedToBaseConversion(), CheckOverridingFunctionReturnType(), CheckPointerConversion(), CheckPointerToMemberOperands(), MarkVirtualBaseDestructorsReferenced(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), and PerformObjectMemberConversion().
| 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 3119 of file SemaDeclCXX.cpp.
References AR_accessible, AR_delayed, AR_dependent, AR_inaccessible, BuildBasePathArray(), CheckBaseClassAccess(), clang::CXXBasePaths::clear(), Context, Diag(), clang::CXXBasePaths::front(), getAmbiguousPathsDisplayString(), getLangOpts(), clang::CXXBasePaths::isAmbiguous(), IsDerivedFrom(), and clang::CXXBasePaths::setRecordingPaths().
| 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 11118 of file SemaDeclCXX.cpp.
References ActOnCXXThis(), Context, clang::declaresSameEntity(), clang::Destructor, Diag(), DiagnoseUseOfDecl(), FindDeallocationFunctionForDestructor(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getLocation(), clang::isa(), MarkFunctionReferenced(), clang::Passing, and PerformImplicitConversion().
Referenced by ActOnFinishFunctionBody(), DefineImplicitDestructor(), and MarkVTableUsed().
| Sema::AccessResult Sema::CheckDestructorAccess | ( | SourceLocation | Loc, |
| CXXDestructorDecl * | Dtor, | ||
| const PartialDiagnostic & | PDiag, | ||
| QualType | objectType = QualType() ) |
Definition at line 1624 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, clang::Decl::getAccess(), getLangOpts(), clang::CXXMethodDecl::getParent(), clang::QualType::isNull(), clang::DeclAccessPair::make(), and clang::SemaBase::PDiag().
Referenced by ActOnCXXDelete(), ActOnDecltypeExpression(), CheckCXXThrowOperand(), checkDestructorReference(), FinalizeVarWithDestructor(), MarkBaseDestructorsReferenced(), MarkFieldDestructorReferenced(), MarkVirtualBaseDestructorsReferenced(), MaybeBindToTemporary(), and clang::InitializationSequence::Perform().
| 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 11220 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), checkMethodTypeQualifiers(), Context, clang::FixItHint::CreateRemoval(), clang::UnqualifiedId::DestructorName, Diag(), diagnoseIgnoredQualifiers(), diagnoseInvalidDeclaratorChunks(), clang::DeclaratorChunk::FunctionTypeInfo::freeParams(), clang::FTIHasNonVoidParameters(), clang::Type::getAs(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getConstSpecLoc(), clang::Declarator::getDeclSpec(), clang::FunctionProtoType::getExtProtoInfo(), clang::Declarator::getFunctionTypeInfo(), clang::Declarator::getIdentifierLoc(), clang::Declarator::getName(), clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getStorageClassSpecLoc(), 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(), and clang::FunctionProtoType::ExtProtoInfo::Variadic.
Referenced by CreateNewFunctionDecl().
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 188 of file SemaExceptionSpec.cpp.
References clang::CPlusPlus17, getLangOpts(), clang::FunctionProtoType::hasExceptionSpec(), and clang::T.
Referenced by BuildMemberPointerType(), and GetFullTypeForDeclarator().
| 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 7545 of file SemaOverload.cpp.
References Context, convertArgsForAvailabilityChecks(), clang::Function, clang::Sema::DelayedDiagnostics::pushUndelayed(), and clang::Result.
Referenced by AddConversionCandidate(), AddMethodCandidate(), AddOverloadCandidate(), AddSurrogateCandidate(), BuildCallToMemberFunction(), and checkDirectCallValidity().
| void Sema::checkEnumArithmeticConversions | ( | Expr * | LHS, |
| Expr * | RHS, | ||
| SourceLocation | Loc, | ||
| ArithConvKind | ACK ) |
Check that the usual arithmetic conversions can be performed on this pair of expressions that might be of enumeration type.
Definition at line 1509 of file SemaExpr.cpp.
References clang::Type::castAsCanonical(), clang::Comparison, clang::CompAssign, clang::Conditional, Context, clang::CPlusPlus20, clang::CPlusPlus26, clang::SemaBase::Diag(), clang::Expr::getEnumCoercedType(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Type::isFloatingType(), and clang::Type::isUnscopedEnumerationType().
Referenced by UsualArithmeticConversions().
| EnumConstantDecl * Sema::CheckEnumConstant | ( | EnumDecl * | Enum, |
| EnumConstantDecl * | LastEnumConst, | ||
| SourceLocation | IdLoc, | ||
| IdentifierInfo * | Id, | ||
| Expr * | val ) |
Definition at line 20252 of file SemaDecl.cpp.
References clang::Allow, clang::C23, CheckConvertedConstantExpression(), clang::Expr::containsErrors(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::EnumConstantDecl::Create(), DefaultLvalueConversion(), clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), clang::Enum, clang::Enumerator, clang::ActionResult< PtrTy, Compress >::get(), clang::EnumConstantDecl::getInitVal(), getLangOpts(), getNextLargerIntegralType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), ImpCastExprToType(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::T, toString(), UPPC_EnumeratorValue, and VerifyIntegerConstantExpression().
Referenced by ActOnEnumConstant().
| 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.
Definition at line 17501 of file SemaDecl.cpp.
References Context, clang::SemaBase::Diag(), clang::EnumDecl::getIntegerType(), clang::EnumDecl::getIntegerTypeRange(), clang::Decl::getLocation(), clang::Type::isDependentType(), clang::EnumDecl::isFixed(), and clang::EnumDecl::isScoped().
Referenced by ActOnTag().
| bool Sema::CheckEnumUnderlyingType | ( | TypeSourceInfo * | TI | ) |
Check that this is a valid underlying type for an enum declaration.
Definition at line 17460 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), clang::TypeLoc::getBeginLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Qualifiers::hasConst(), clang::Qualifiers::hasVolatile(), and clang::T.
Referenced by ActOnTag().
| 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 487 of file SemaExceptionSpec.cpp.
References clang::CheckEquivalentExceptionSpecImpl(), getLangOpts(), New, clang::SemaBase::PDiag(), and clang::Result.
| bool clang::Sema::CheckEquivalentExceptionSpec | ( | const PartialDiagnostic & | DiagID, |
| const PartialDiagnostic & | NoteID, | ||
| const FunctionProtoType * | Old, | ||
| SourceLocation | OldLoc, | ||
| const FunctionProtoType * | New, | ||
| SourceLocation | NewLoc ) |
Definition at line 663 of file SemaExceptionSpec.cpp.
References clang::CheckEquivalentExceptionSpecImpl(), getLangOpts(), and New.
| bool clang::Sema::CheckEquivalentExceptionSpec | ( | FunctionDecl * | Old, |
| FunctionDecl * | New ) |
Definition at line 292 of file SemaExceptionSpec.cpp.
References clang::Type::castAs(), clang::CheckEquivalentExceptionSpecImpl(), Context, clang::CPlusPlus11, clang::CPlusPlus17, clang::FixItHint::CreateInsertion(), DelayedEquivalentExceptionSpecChecks, clang::SemaBase::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::exceptionSpecNotKnownYet(), clang::Type::getAs(), clang::TypeLoc::getAs(), clang::FunctionDecl::getBuiltinID(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), getPrintingPolicy(), clang::ValueDecl::getType(), clang::hasImplicitExceptionSpec(), clang::TypeLoc::IgnoreParens(), clang::isDynamicExceptionSpec(), clang::FunctionDecl::isExternC(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), New, OS, clang::SemaBase::PDiag(), and clang::FunctionProtoType::ExceptionSpecInfo::Type.
Referenced by ActOnExplicitInstantiation(), areMultiversionVariantFunctionsCompatible(), CheckDelayedMemberExceptionSpecs(), clang::CheckSpecForTypesEquivalent(), MergeFunctionDecl(), and MergeVarDeclExceptionSpecs().
Definition at line 909 of file SemaExceptionSpec.cpp.
References CheckExceptionSpecSubset(), clang::CPlusPlus17, clang::SourceRange::getBegin(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::GetUnderlyingFunction(), clang::FunctionProtoType::hasDependentExceptionSpec(), and clang::SemaBase::PDiag().
Referenced by clang::InitializationSequence::Perform(), and PerformImplicitConversion().
| void Sema::checkExceptionSpecification | ( | bool | IsTopLevel, |
| ExceptionSpecificationType | EST, | ||
| ArrayRef< ParsedType > | DynamicExceptions, | ||
| ArrayRef< SourceRange > | DynamicExceptionRanges, | ||
| Expr * | NoexceptExpr, | ||
| SmallVectorImpl< QualType > & | Exceptions, | ||
| FunctionProtoType::ExceptionSpecInfo & | ESI ) |
Check the given exception-specification and update the exception specification information with the results.
Definition at line 19412 of file SemaDeclCXX.cpp.
References CheckSpecifiedExceptionType(), collectUnexpandedParameterPacks(), Context, DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::EST_BasicNoexcept, clang::EST_Dynamic, clang::FunctionProtoType::ExceptionSpecInfo::Exceptions, clang::Type::getCanonicalTypeUnqualified(), clang::Expr::getType(), GetTypeFromParser(), clang::isComputedNoexcept(), clang::Expr::isTypeDependent(), clang::FunctionProtoType::ExceptionSpecInfo::NoexceptExpr, clang::FunctionProtoType::ExceptionSpecInfo::Type, and UPPC_ExceptionType.
Referenced by actOnDelayedExceptionSpecification(), and GetFullTypeForDeclarator().
| 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 ) |
CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subset (or equivalent) of the first function type.
This is used by override and pointer assignment checks.
Definition at line 758 of file SemaExceptionSpec.cpp.
References clang::FunctionProtoType::canThrow(), CheckParamExceptionSpec(), clang::CT_Can, clang::CT_Cannot, clang::SemaBase::Diag(), clang::EST_DependentNoexcept, clang::EST_Dynamic, clang::EST_NoThrow, clang::FunctionProtoType::exceptions(), clang::Type::getAs(), clang::PartialDiagnostic::getDiagID(), clang::FunctionProtoType::getExceptionSpecType(), getLangOpts(), handlerCanCatch(), clang::isUnresolvedExceptionSpec(), clang::SourceLocation::isValid(), and ResolveExceptionSpec().
Referenced by CheckExceptionSpecCompatibility(), and CheckOverridingFunctionExceptionSpec().
| bool Sema::CheckExplicitlyDefaultedComparison | ( | Scope * | S, |
| FunctionDecl * | MD, | ||
| DefaultedComparisonKind | DCK ) |
Definition at line 8907 of file SemaDeclCXX.cpp.
References clang::Qualifiers::addConst(), clang::QualType::addConst(), clang::cast(), clang::Type::castAs(), CheckComparisonCategoryType(), CheckConstexprParameterTypes(), CheckConstexprReturnType(), clang::Constexpr, Context, clang::CPlusPlus23, clang::FunctionDecl::DefaultedOrDeletedFunctionInfo::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::SourceRange::getBegin(), clang::DeclaratorDecl::getBeginLoc(), clang::CXXRecordDecl::getCanonicalDecl(), clang::FunctionDecl::getCanonicalDecl(), clang::FunctionDecl::getDeclaredReturnType(), clang::FunctionDecl::getDefaultLoc(), clang::FunctionDecl::getExceptionSpecType(), clang::Decl::getFriendObjectKind(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::DeclContext::getParent(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), int, inTemplateInstantiation(), clang::isa(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::TagDecl::isDependentType(), clang::Type::isDependentType(), clang::Decl::isImplicit(), clang::SourceLocation::isInvalid(), clang::QualType::isNull(), clang::Type::isUndeducedAutoType(), clang::SourceLocation::isValid(), lookupOperatorsForDefaultedComparison(), None, Ok, 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::setDefaultedOrDeletedInfo(), clang::ValueDecl::setType(), SubstAutoType(), clang::T, ThreeWay, clang::FunctionProtoType::ExceptionSpecInfo::Type, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, and clang::CanQual< T >::withConst().
Referenced by CheckExplicitlyDefaultedFunction(), and SetDeclDefaulted().
| void Sema::CheckExplicitlyDefaultedFunction | ( | Scope * | S, |
| FunctionDecl * | MD ) |
Definition at line 7725 of file SemaDeclCXX.cpp.
References clang::Sema::DefaultedFunctionKind::asComparison(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::cast(), CheckExplicitlyDefaultedComparison(), CheckExplicitlyDefaultedSpecialMember(), clang::RecordDecl::fields(), clang::Decl::getDeclContext(), getDefaultedFunctionKind(), clang::FunctionDecl::getDefaultLoc(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::Sema::DefaultedFunctionKind::isComparison(), clang::DeclContext::isDependentContext(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::Sema::DefaultedFunctionKind::isSpecialMember(), clang::Decl::setInvalidDecl(), and UnusedPrivateFields.
Referenced by CheckCompletedCXXClass().
| bool Sema::CheckExplicitlyDefaultedSpecialMember | ( | CXXMethodDecl * | MD, |
| CXXSpecialMemberKind | CSM, | ||
| SourceLocation | DefaultLoc ) |
Definition at line 7752 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), clang::Consteval, clang::Constexpr, Context, clang::CopyAssignment, clang::CopyConstructor, clang::CPlusPlus14, clang::CPlusPlus20, clang::FixItHint::CreateReplacement(), clang::DefaultConstructor, defaultedSpecialMemberIsConstexpr(), clang::Destructor, Diag(), clang::EST_Unevaluated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::First, clang::Qualifiers::getAddressSpace(), clang::DeclaratorDecl::getBeginLoc(), clang::CXXMethodDecl::getCanonicalDecl(), clang::CXXMethodDecl::getFunctionObjectParameterType(), getLangOpts(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::CXXMethodDecl::getNumExplicitParams(), clang::CXXRecordDecl::getNumVBases(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::QualType::getQualifiers(), clang::FunctionDecl::getSourceRange(), clang::FunctionDecl::getTemplatedKind(), clang::ValueDecl::getType(), clang::CXXRecordDecl::implicitCopyAssignmentHasConstParam(), clang::CXXRecordDecl::implicitCopyConstructorHasConstParam(), inTemplateInstantiation(), clang::Invalid, clang::isa(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::QualType::isConstQualified(), clang::TagDecl::isDependentType(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::QualType::isNull(), clang::Type::isReferenceType(), clang::FunctionDecl::isTemplateInstantiation(), clang::SourceLocation::isValid(), clang::FunctionDecl::isVariadic(), clang::QualType::isVolatileQualified(), clang::MoveAssignment, clang::None, clang::FunctionDecl::setConstexprKind(), SetDeclDeleted(), clang::ValueDecl::setType(), ShouldDeleteSpecialMember(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, clang::FunctionDecl::TK_NonTemplate, clang::FunctionProtoType::ExceptionSpecInfo::Type, clang::Unspecified, and clang::CXXRecordDecl::vbases().
Referenced by CheckExplicitlyDefaultedFunction(), and SetDeclDefaulted().
| void Sema::CheckExplicitObjectLambda | ( | Declarator & | D | ) |
Definition at line 11566 of file SemaDeclCXX.cpp.
References CheckExplicitObjectMemberFunction().
Referenced by getLambdaType().
| void Sema::CheckExplicitObjectMemberFunction | ( | Declarator & | D, |
| DeclarationName | Name, | ||
| QualType | R, | ||
| bool | IsLambda, | ||
| DeclContext * | DC = nullptr ) |
Definition at line 11570 of file SemaDeclCXX.cpp.
References clang::cast(), computeDeclContext(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, Diag(), clang::DeclaratorDecl::getBeginLoc(), clang::Declarator::getContext(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Declarator::getFunctionTypeInfo(), clang::Decl::getLocation(), clang::DeclarationName::getNameKind(), clang::Declarator::getSourceRange(), clang::ParmVarDecl::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::ParmVarDecl::hasDefaultArg(), clang::DeclaratorChunk::FunctionTypeInfo::hasMutableQualifier(), clang::DeclSpec::isFriendSpecified(), clang::Declarator::isFunctionDeclarator(), clang::Declarator::isInvalidType(), clang::DeclContext::isRecord(), clang::Declarator::isStaticMember(), clang::DeclSpec::isVirtualSpecified(), clang::Member, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::DeclSpec::SCS_static, and clang::Declarator::setInvalidType().
Referenced by CheckExplicitObjectLambda(), CheckExplicitObjectMemberFunction(), and CreateNewFunctionDecl().
| void Sema::CheckExplicitObjectMemberFunction | ( | DeclContext * | DC, |
| Declarator & | D, | ||
| DeclarationName | Name, | ||
| QualType | R ) |
Definition at line 11561 of file SemaDeclCXX.cpp.
References CheckExplicitObjectMemberFunction().
| bool Sema::CheckExplicitObjectOverride | ( | CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old ) |
Definition at line 18779 of file SemaDeclCXX.cpp.
References Diag(), clang::Decl::getLocation(), and New.
Referenced by AddOverriddenMethods().
| void Sema::CheckExtraCXXDefaultArguments | ( | Declarator & | D | ) |
CheckExtraCXXDefaultArguments - Check for any extra default arguments in the declarator, which is not a function declaration or definition and therefore is not permitted to have default arguments.
This routine should be invoked for every declarator that is not a function declaration or definition.
Definition at line 402 of file SemaDeclCXX.cpp.
References clang::cast(), clang::DeclaratorChunk::ParamInfo::DefaultArgTokens, Diag(), clang::DeclaratorChunk::Fun, clang::DeclaratorChunk::Function, clang::Declarator::getNumTypeObjects(), clang::Declarator::getTypeObject(), clang::Declarator::isFunctionDeclarationContext(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::ParamInfo::Param, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::DeclaratorChunk::Paren, and UnparsedDefaultArgLocs.
Referenced by ActOnCastExpr(), ActOnCXXNamedCast(), ActOnTypeName(), CheckFunctionOrTemplateParamDeclarator(), HandleDeclarator(), HandleField(), and HandleMSProperty().
| ExprResult Sema::CheckExtVectorCast | ( | SourceRange | R, |
| QualType | DestTy, | ||
| Expr * | CastExpr, | ||
| CastKind & | Kind ) |
Definition at line 7912 of file SemaExpr.cpp.
References areLaxCompatibleVectorTypes(), Context, clang::SemaBase::Diag(), clang::ExprError(), clang::SourceRange::getBegin(), getLangOpts(), clang::Expr::getType(), clang::Type::isExtVectorType(), clang::Type::isPointerType(), clang::Type::isVectorType(), OpenCL(), and prepareVectorSplat().
| FieldDecl * Sema::CheckFieldDecl | ( | DeclarationName | Name, |
| QualType | T, | ||
| TypeSourceInfo * | TInfo, | ||
| RecordDecl * | Record, | ||
| SourceLocation | Loc, | ||
| bool | Mutable, | ||
| Expr * | BitfieldWidth, | ||
| InClassInitStyle | InitStyle, | ||
| SourceLocation | TSSL, | ||
| AccessSpecifier | AS, | ||
| NamedDecl * | PrevDecl, | ||
| Declarator * | D = nullptr ) |
Build a new FieldDecl and check its well-formedness.
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.
Definition at line 19179 of file SemaDecl.cpp.
References AbstractFieldType, clang::cast(), CheckAlignasUnderalignment(), checkDuplicateDefaultInit(), CheckNontrivialField(), clang::Type::containsErrors(), Context, clang::CPlusPlus, clang::FieldDecl::Create(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsCXXRecordDecl(), clang::DeclarationName::getAsIdentifierInfo(), getCurScope(), clang::NamedDecl::getDeclName(), clang::Declarator::getDeclSpec(), getLangOpts(), clang::Decl::getLocation(), getOpenCLOptions(), clang::DeclSpec::getStorageClassSpecLoc(), clang::Decl::hasAttrs(), clang::ICIS_NoInit, clang::isa(), clang::LangOptions::isCompatibleWithMSVC(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Decl::isInvalidDecl(), clang::Declarator::isInvalidType(), clang::NamedDecl::isPlaceholderVar(), clang::Type::isReferenceType(), clang::SourceLocation::isValid(), LangOpts, clang::LangOptionsBase::MSVC2015, ObjC(), PPC(), ProcessDeclAttributes(), RequireCompleteSizedType(), RequireCompleteType(), RequireNonAbstractType(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::T, tryToFixVariablyModifiedVarType(), VerifyBitField(), and warnOnCTypeHiddenInCPlusPlus().
Referenced by HandleField().
Check that the expression co_await promise.final_suspend() shall not be potentially-throwing.
Definition at line 655 of file SemaCoroutine.cpp.
References checkNoThrow(), clang::SemaBase::Diag(), and clang::Decl::getEndLoc().
Referenced by ActOnCoroutineBodyStart().
| void Sema::CheckFloatComparison | ( | SourceLocation | Loc, |
| const Expr * | LHS, | ||
| const Expr * | RHS, | ||
| BinaryOperatorKind | Opcode ) |
Check for comparisons of floating-point values using == and !=.
Issue a warning if the comparison is not likely to do what the programmer intended.
Definition at line 11046 of file SemaChecking.cpp.
References Context, clang::SemaBase::Diag(), clang::Type::getAs(), clang::Stmt::getSourceRange(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::FloatingLiteral::getValue(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParens(), clang::BinaryOperator::isEqualityOp(), and clang::BuiltinType::isFloatingPoint().
Referenced by checkArithmeticOrEnumeralCompare(), CheckSizelessVectorCompareOperands(), and CheckVectorCompareOperands().
| bool Sema::CheckForConstantInitializer | ( | Expr * | Init, |
| unsigned | DiagID = diag::err_init_element_not_constant ) |
type checking declaration initializers (C99 6.7.8)
Definition at line 12842 of file SemaDecl.cpp.
References Context, clang::SemaBase::Diag(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), and clang::Init.
Referenced by AddInitializerToDecl(), and BuildCompoundLiteralExpr().
| void Sema::CheckForFunctionRedefinition | ( | FunctionDecl * | FD, |
| const FunctionDecl * | EffectiveDefinition = nullptr, | ||
| SkipBodyInfo * | SkipBody = nullptr ) |
Definition at line 16008 of file SemaDecl.cpp.
References canRedefineFunction(), clang::cast(), clang::declaresSameEntity(), Definition, clang::SemaBase::Diag(), clang::Decl::FOK_None, clang::FunctionDecl::getInstantiatedFromMemberFunction(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::GNUMode, clang::Internal, clang::FunctionDecl::isDefined(), isRedefinitionAllowedFor(), makeMergedDefinitionVisible(), clang::SkipBodyInfo::Previous, clang::SC_Extern, clang::Decl::setInvalidDecl(), clang::SkipBodyInfo::ShouldSkip, and TypoCorrectedFunctionDefinitions.
Referenced by ActOnStartOfFunctionDef(), checkNewAttributesAfterDef(), and MergeCXXFunctionDecl().
| ExprResult Sema::CheckForImmediateInvocation | ( | ExprResult | E, |
| FunctionDecl * | Decl ) |
Wrap the expression in a ConstantExpr if it is a potential immediate invocation.
Opportunistically remove the callee from ReferencesToConsteval if we can. It's OK if this fails; we'll also remove this in HandleImmediateInvocations, but catching it here allows us to avoid walking the AST looking for it in simple cases.
Value-dependent constant expressions should not be immediately evaluated until they are instantiated.
Definition at line 18006 of file SemaExpr.cpp.
References clang::Call, Cleanup, clang::ConstantExpr::Create(), clang::ExprWithCleanups::Create(), clang::Expr::EvalStatus::Diag, clang::Expr::EvaluateAsConstantExpr(), ExprEvalContexts, clang::ActionResult< PtrTy, Compress >::get(), getASTContext(), clang::ConstantExpr::getStorageKind(), clang::APValue::hasValue(), clang::Expr::IgnoreImplicit(), isAlwaysConstantEvaluatedContext(), isCheckingDefaultArgumentOrInitializer(), isImmediateFunctionContext(), isUnevaluatedContext(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Expr::isValueDependent(), MarkExpressionAsImmediateEscalating(), clang::ConstantExpr::MoveIntoResult(), RebuildingImmediateInvocation, and clang::Expr::EvalResult::Val.
Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildCXXConstructExpr(), BuildCXXMemberCallExpr(), BuildLiteralOperatorCall(), BuildOverloadedArrowExpr(), BuildResolvedCallExpr(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), and PerformConstructorInitialization().
| bool Sema::CheckFormatStringsCompatible | ( | FormatStringType | FST, |
| const StringLiteral * | AuthoritativeFormatString, | ||
| const StringLiteral * | TestedFormatString, | ||
| const Expr * | FunctionCallArg = nullptr ) |
Verify that two format strings (as understood by attribute(format) and attribute(format_matches) are compatible.
If they are incompatible, diagnostics are emitted with the assumption that AuthoritativeFormatString is correct and TestedFormatString is wrong. If FunctionCallArg is provided, diagnostics will point to it and a note will refer to TestedFormatString or AuthoritativeFormatString as appropriate.
Definition at line 9618 of file SemaChecking.cpp.
References CompareFormatSpecifiers(), clang::FreeBSDKPrintf, clang::Kprintf, clang::NSString, clang::OSLog, clang::OSTrace, and clang::Printf.
Referenced by CheckFormatString(), and mergeFormatMatchesAttr().
| Sema::AccessResult Sema::CheckFriendAccess | ( | NamedDecl * | D | ) |
Checks access to the target of a friend declaration.
Definition at line 1817 of file SemaAccess.cpp.
References AR_accessible, AR_dependent, AR_inaccessible, clang::AS_public, clang::cast(), CheckEffectiveAccess(), Context, CurContext, clang::Decl::getAccess(), clang::Decl::getAsFunction(), clang::Decl::getDeclContext(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getNameInfo(), clang::DeclaratorDecl::getQualifier(), clang::DeclaratorDecl::getQualifierLoc(), clang::DeclarationNameInfo::getSourceRange(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::isa(), and clang::DeclAccessPair::make().
Referenced by ActOnFriendFunctionDecl().
| bool Sema::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.
Definition at line 4272 of file SemaChecking.cpp.
References clang::cast(), checkCall(), CheckTCBEnforcement(), Context, clang::SemaObjC::DiagnoseCStringFormatDirectiveInCFAPI(), clang::CallExpr::getArgs(), clang::FunctionDecl::getBuiltinID(), clang::CallExpr::getCallee(), clang::Expr::getExprLoc(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::FunctionDecl::getMemoryFunctionKind(), clang::CallExpr::getNumArgs(), clang::CallExpr::getRParenLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), getVariadicCallType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), clang::isa(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::FunctionDecl::isStatic(), and ObjC().
Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildCXXMemberCallExpr(), BuildLiteralOperatorCall(), BuildOverloadedArrowExpr(), BuildResolvedCallExpr(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedUnaryOp(), and handleCleanupAttr().
| bool Sema::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.
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.
Definition at line 1416 of file SemaConcept.cpp.
References CheckConstraintSatisfaction(), CheckFunctionConstraints(), clang::Decl::getLocation(), clang::DeclContext::getNonTransparentContext(), clang::DeclContext::getParent(), clang::FunctionDecl::getTemplatedKind(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::DeclContext::isDependentContext(), clang::isLambdaCallOperator(), clang::isLambdaConversionOperator(), clang::ConstraintSatisfaction::IsSatisfied, clang::DeclContext::isTransparentContext(), clang::SourceLocation::isValid(), clang::Method, and clang::FunctionDecl::TK_FunctionTemplateSpecialization.
Referenced by ActOnExplicitInstantiation(), AddConversionCandidate(), AddMethodCandidate(), AddOverloadCandidate(), AddSurrogateCandidate(), checkAddressOfFunctionIsAvailable(), CheckFunctionConstraints(), CheckMemberSpecialization(), DiagnoseUseOfDecl(), InstantiateClassMembers(), NoteFunctionCandidate(), NoteSurrogateCandidate(), and SetEligibleMethods().
| 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).
| IsMemberSpecialization | whether this new function declaration is a member specialization (that replaces any definition provided by the previous declaration). |
This sets NewFD->isInvalidDecl() to true if there was an error.
Definition at line 12221 of file SemaDecl.cpp.
References ActOnConversionDeclarator(), clang::SemaOpenMP::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(), clang::Decl::addAttr(), clang::Qualifiers::addConst(), AddOverriddenMethods(), AllowOverloadingOfFunction(), ARM(), clang::cast(), clang::Type::castAs(), CheckConstPureAttributesUsage(), CheckConstructor(), CheckCXXDefaultArguments(), CheckDeductionGuideTemplate(), checkForConflictWithNonVisibleExternC(), CheckLiteralOperatorDeclaration(), CheckMultiVersionFunction(), CheckOverload(), CheckOverloadedOperatorDeclaration(), clang::SemaARM::CheckSMEFunctionDefAttributes(), clang::SemaSYCL::CheckSYCLEntryPointFunctionDecl(), clang::SemaSYCL::CheckSYCLExternalFunctionDecl(), clang::SemaCUDA::checkTargetOverload(), checkThisInStaticMemberFunctionType(), clang::AssociatedConstraint::ConstraintExpr, clang::Constructor, Context, clang::CPlusPlus, clang::CPlusPlus14, clang::CPlusPlus17, clang::FixItHint::CreateInsertion(), CUDA(), CurContext, clang::Destructor, clang::SemaBase::Diag(), clang::Decl::FOK_None, clang::TypeLoc::getAs(), clang::Decl::getAsFunction(), clang::Decl::getAttr(), clang::Stmt::getBeginLoc(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionProtoType::getExtProtoInfo(), clang::Decl::getFriendObjectKind(), clang::FunctionTemplateDecl::getInstantiatedFromMemberTemplate(), getLangOpts(), clang::FunctionDecl::getLiteralIdentifier(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::CXXMethodDecl::getMethodQualifiers(), clang::FunctionProtoType::getParamTypes(), clang::FunctionDecl::getPrimaryTemplate(), clang::FunctionDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::Qualifiers::hasConst(), clang::TypeLoc::IgnoreParens(), inferLifetimeCaptureByAttribute(), inTemplateInstantiation(), clang::isa(), clang::FunctionDecl::isConstexpr(), clang::NamedDecl::isCXXClassMember(), clang::DeclContext::isDependentContext(), clang::FunctionDecl::isExternC(), clang::Type::isIncompleteType(), clang::Type::isObjCObjectPointerType(), IsOverload(), clang::FunctionDecl::isOverloadedOperator(), clang::QualType::isPODType(), clang::CXXMethodDecl::isStatic(), clang::Type::isUndeducedType(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), LangOpts, clang::Match, MergeFunctionDecl(), clang::FunctionTemplateDecl::mergePrevDecl(), clang::Method, clang::NonFunction, OpenMP(), clang::Overload, clang::FunctionDecl::parameters(), PPC(), Previous, clang::Redeclaration, clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::RedeclarableTemplateDecl::setMemberSpecialization(), clang::FunctionDecl::setPreviousDeclaration(), clang::ValueDecl::setType(), shouldLinkDependentDeclWithPrevious(), SubstAutoTypeDependent(), SYCL(), clang::T, clang::TSK_ExplicitSpecialization, and clang::FunctionProtoType::ExtProtoInfo::TypeQuals.
Referenced by ActOnFunctionDeclarator(), and CheckImplicitSpecialMemberDeclaration().
|
inline |
Check if IdxExpr is a valid parameter index for a function or instance method D.
May output an error.
Definition at line 5162 of file Sema.h.
References clang::AANT_ArgumentIntegerConstant, Context, clang::SemaBase::Diag(), getAttrLoc(), clang::getFunctionOrMethodNumParams(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::hasFunctionProto(), clang::hasImplicitObjectParameter(), clang::isFunctionOrMethodOrBlockForAttrSubject(), clang::isFunctionOrMethodVariadic(), clang::Expr::isTypeDependent(), and UINT_MAX.
Referenced by AddAllocAlignAttr(), checkParamIsIntegerType(), handleArgumentWithTypeTagAttr(), handleFormatArgAttr(), handleNonNullAttr(), handleOwnershipAttr(), handleRestrictAttr(), and handleXRayLogArgsAttr().
| void Sema::CheckFunctionOrTemplateParamDeclarator | ( | Scope * | S, |
| Declarator & | D ) |
Common checks for a parameter-declaration that should apply to both function parameters and non-type template parameters.
Definition at line 15491 of file SemaDecl.cpp.
References CheckExtraCXXDefaultArguments(), clang::CPlusPlus, clang::SemaBase::Diag(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::DeclarationNameInfo::getName(), clang::Declarator::getName(), GetNameForDeclarator(), clang::CXXScopeSpec::getRange(), 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, and clang::CXXScopeSpec::isSet().
Referenced by ActOnNonTypeTemplateParameter(), and ActOnParamDeclarator().
| bool Sema::CheckFunctionReturnType | ( | QualType | T, |
| SourceLocation | Loc ) |
Definition at line 2550 of file SemaType.cpp.
References checkNonTrivialCUnion(), Context, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), clang::Default, clang::SemaBase::Diag(), clang::FunctionReturn, getLangOpts(), HLSL(), NTCUK_Copy, NTCUK_Destruct, and clang::T.
Referenced by BuildFunctionType().
| bool Sema::CheckFunctionTemplateConstraints | ( | SourceLocation | PointOfInstantiation, |
| FunctionDecl * | Decl, | ||
| ArrayRef< TemplateArgument > | TemplateArgs, | ||
| ConstraintSatisfaction & | Satisfaction ) |
Definition at line 1691 of file SemaConcept.cpp.
References CheckConstraintSatisfaction(), clang::ConstraintSatisfaction::IsSatisfied, clang::Method, and clang::Template.
Referenced by FinishTemplateArgumentDeduction().
| 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.
| FD | the function declaration, which will be updated to become a function template specialization. |
| ExplicitTemplateArgs | the explicitly-provided template arguments, if any. Note that this may be valid info even when 0 arguments are explicitly provided as in, e.g., void sort<>(char*, char*); as it anyway contains info on the angle brackets locations. |
| Previous | the set of declarations that may be specialized by this function specialization. |
| QualifiedFriend | whether this is a lookup for a qualified friend declaration with no explicit template argument list that might be befriending a function template specialization. |
Definition at line 9522 of file SemaTemplate.cpp.
References clang::TemplateSpecCandidateSet::addCandidate(), clang::Qualifiers::addConst(), clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::begin(), clang::cast(), clang::Type::castAs(), CheckSpecializationInstantiationRedecl(), CheckTemplateSpecializationScope(), Context, clang::CPlusPlus17, clang::TemplateArgumentList::CreateCopy(), clang::CRK_None, CUDA(), clang::CUDATargetMismatch, DeduceTemplateArguments(), clang::SemaBase::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::FunctionDecl::getInstantiatedFromMemberFunction(), 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(), clang::DeclContext::InEnclosingNamespaceSetOf(), clang::SemaCUDA::inheritTargetAttrs(), clang::isa(), clang::FunctionTemplateSpecializationInfo::isExplicitSpecialization(), clang::isUnresolvedExceptionSpec(), LangOpts, clang::MakeDeductionFailureInfo(), MarkUnusedFileScopedDecl(), clang::TemplateSpecCandidateSet::NoteCandidates(), NoteOverloadCandidate(), clang::SemaBase::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(), and CheckOverload().
| bool Sema::CheckIfFunctionSpecializationIsImmediate | ( | FunctionDecl * | FD, |
| SourceLocation | Loc ) |
Definition at line 5502 of file SemaTemplateDeduction.cpp.
References clang::cast(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::getTemplateSpecializationArgs(), InstantiateFunctionDeclaration(), InstantiateFunctionDefinition(), clang::FunctionDecl::isImmediateEscalating(), clang::Decl::isInvalidDecl(), clang::isLambdaConversionOperator(), and runWithSufficientStackSpace().
Referenced by DeduceTemplateArguments().
| bool Sema::CheckIfOverriddenFunctionIsMarkedFinal | ( | const CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old ) |
CheckIfOverriddenFunctionIsMarkedFinal - Checks whether a virtual member function overrides a virtual member function marked 'final', according to C++11 [class.virtual]p4.
Definition at line 3346 of file SemaDeclCXX.cpp.
References Diag(), clang::Decl::getAttr(), clang::Decl::getLocation(), and New.
Referenced by AddOverriddenMethods().
| void Sema::checkIllFormedTrivialABIStruct | ( | CXXRecordDecl & | RD | ) |
Check that the C++ class annoated with "trivial_abi" satisfies all the conditions that are needed for the attribute to have an effect.
Definition at line 10583 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::cast(), clang::CXXRecordDecl::ctors(), clang::CXXRecordDecl::defaultedCopyConstructorIsDeleted(), clang::CXXRecordDecl::defaultedMoveConstructorIsDeleted(), Diag(), clang::Decl::dropAttr(), clang::RecordDecl::fields(), clang::Type::getAsCanonical(), clang::Decl::getAttr(), clang::Type::getBaseElementTypeUnsafe(), clang::QualType::getObjCLifetime(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::ValueDecl::getType(), clang::QualType::hasAddressDiscriminatedPointerAuth(), IsCXXTriviallyRelocatableType(), clang::TagDecl::isDependentType(), clang::CXXRecordDecl::isPolymorphic(), clang::isTemplateInstantiation(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsImplicitMoveConstructor(), and clang::Qualifiers::OCL_Weak.
Referenced by CheckCompletedCXXClass().
| bool Sema::CheckImmediateEscalatingFunctionDefinition | ( | FunctionDecl * | FD, |
| const sema::FunctionScopeInfo * | FSI ) |
Definition at line 2581 of file SemaDeclCXX.cpp.
References clang::CPlusPlus20, Diag(), DiagnoseImmediateEscalatingReason(), clang::sema::FunctionScopeInfo::FoundImmediateEscalatingExpression, clang::FunctionDecl::getCanonicalDecl(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isImmediateEscalating(), clang::FunctionDecl::isImmediateFunction(), clang::FunctionDecl::setBodyContainsImmediateEscalatingExpressions(), and UndefinedButUsed.
Referenced by ActOnFinishFunctionBody().
| void Sema::CheckImplicitConversion | ( | Expr * | E, |
| QualType | T, | ||
| SourceLocation | CC, | ||
| bool * | ICContext = nullptr, | ||
| bool | IsListInit = false ) |
Definition at line 12777 of file SemaChecking.cpp.
References clang::SemaObjC::adornBoolConversionDiagWithTernaryFixit(), ARM(), clang::cast(), clang::SemaObjC::checkArrayLiteral(), clang::SemaObjC::checkDictionaryLiteral(), Context, clang::CPlusPlus, clang::SemaBase::Diag(), DiagnoseAlwaysNonNullPointer(), DiagnoseFloatingImpCast(), DiagnoseImpCast(), DiagnoseIntInBoolContext(), DiagnoseMixedUnicodeImplicitConversion(), DiagnoseNullConversion(), DiagRuntimeBehavior(), DiscardingCFIUncheckedCallee(), DiscardMisalignedMemberAddress(), clang::Expr::EvaluateAsFixedPoint(), clang::Expr::EvaluateAsInt(), clang::Expr::EvaluateAsRValue(), clang::CallExpr::getArg(), clang::Type::getAs(), getASTContext(), clang::Expr::getEnumCoercedType(), clang::Expr::getExprLoc(), clang::ASTContext::getFloatingTypeSemanticOrder(), clang::Expr::getIntegerConstantExpr(), getLangOpts(), clang::CallExpr::getNumArgs(), clang::VectorType::getNumElements(), clang::ConstantMatrixType::getNumElementsFlattened(), clang::Stmt::getSourceRange(), clang::Type::getSveEltType(), clang::Expr::getType(), clang::QualType::getTypePtr(), HLSL(), clang::Expr::IgnoreParenImpCasts(), clang::isa(), clang::Type::isBooleanType(), isConstantEvaluatedContext(), clang::BuiltinType::isFloatingPoint(), clang::Type::isFloatingType(), clang::BuiltinType::isInteger(), clang::Type::isIntegerType(), clang::SourceLocation::isInvalid(), clang::Expr::isKnownToHaveBooleanValue(), IsSameFloatAfterCast(), isSameWidthConstantConversion(), clang::BuiltinType::isSignedInteger(), clang::Type::isSveVLSBuiltinType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Expr::NPCK_NotNull, ObjC(), clang::SemaBase::PDiag(), PrettyPrintInRange(), clang::Result, clang::Expr::SE_AllowSideEffects, SourceMgr, clang::T, clang::Target, toString(), TryGetExprRange(), and clang::Expr::EvalResult::Val.
Referenced by AnalyzeImplicitConversions(), CheckBoolLikeConversion(), CheckCommaOperand(), CheckConditionalOperand(), CheckConditionalOperator(), and clang::checkOpenCLEnqueueIntType().
| 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).
| Type | The type to which the nullability specifier will be added. On success, this type will be updated appropriately. |
| Nullability | The nullability specifier to add. |
| DiagLoc | The location to use for diagnostics. |
| AllowArrayTypes | Whether to accept nullability specifiers on an array type (e.g., because it will decay to a pointer). |
| OverrideExisting | Whether to override an existing, locally-specified nullability specifier rather than complaining about the conflict. |
Definition at line 7417 of file SemaType.cpp.
References CheckNullabilityTypeSpecifier().
Referenced by ApplyNullability().
| void Sema::CheckImplicitSpecialMemberDeclaration | ( | Scope * | S, |
| FunctionDecl * | FD ) |
Check a completed declaration of an implicit special member.
Definition at line 14136 of file SemaDeclCXX.cpp.
References clang::LookupResult::addDecl(), CheckFunctionDeclaration(), ForExternalRedeclaration, clang::LookupResult::getAcceptableDecl(), clang::NamedDecl::getDeclName(), clang::DeclContext::getParent(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::DeclContext::lookup(), LookupOrdinaryName, clang::LookupResult::resolveKind(), and clang::LookupResult::suppressDiagnostics().
Referenced by DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), and DeclareImplicitMoveConstructor().
| void Sema::checkIncorrectVTablePointerAuthenticationAttribute | ( | CXXRecordDecl & | RD | ) |
Check that VTable Pointer authentication is only being set on the first first instantiation of the vtable.
Definition at line 10668 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), Context, Diag(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::CXXRecordDecl::isPolymorphic(), and RequireCompleteType().
Referenced by CheckCompletedCXXClass().
Additional checks for a using declaration referring to a constructor name.
Definition at line 13435 of file SemaDeclCXX.cpp.
References clang::cast(), CurContext, Diag(), findDirectBaseWithType(), clang::NestedNameSpecifier::getAsType(), clang::UsingDecl::getNameInfo(), clang::UsingDecl::getQualifier(), clang::DeclarationNameInfo::getSourceRange(), clang::UsingDecl::getUsingLoc(), clang::UsingDecl::hasTypename(), and clang::Decl::setInvalidDecl().
Referenced by BuildUsingDeclaration().
| void Sema::checkInitializerLifetime | ( | const InitializedEntity & | Entity, |
| Expr * | Init ) |
Check that the lifetime of the initializer (and its subobjects) is sufficient for initializing the entity, and perform lifetime extension (when permitted) if not.
Definition at line 7664 of file SemaInit.cpp.
References clang::sema::checkInitLifetime(), and clang::Init.
Referenced by CollectFieldInitializer(), clang::InitializationSequence::Perform(), and TryOrBuildParenListInitialization().
| void Sema::checkLifetimeCaptureBy | ( | FunctionDecl * | FDecl, |
| bool | IsMemberFunction, | ||
| const Expr * | ThisArg, | ||
| ArrayRef< const Expr * > | Args ) |
Definition at line 3991 of file SemaChecking.cpp.
References clang::sema::checkCaptureByLifetime(), clang::TypeLoc::getAsAdjusted(), clang::Decl::getAttr(), clang::AttributedTypeLoc::getAttrAs(), clang::AttributedTypeLoc::getModifiedLoc(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), and clang::isa().
Referenced by checkCall().
| 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 17033 of file SemaDeclCXX.cpp.
References checkLiteralOperatorTemplateParameterList(), Context, Diag(), clang::Type::getAs(), 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::PointerType::getPointeeType(), clang::Type::getPointeeType(), clang::FunctionDecl::getPrimaryTemplate(), getSourceManager(), clang::QualType::getUnqualifiedType(), clang::isa(), 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::NotReserved, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_size(), and clang::FunctionDecl::parameters().
Referenced by CheckFunctionDeclaration().
| bool Sema::checkLiteralOperatorId | ( | const CXXScopeSpec & | SS, |
| const UnqualifiedId & | Id, | ||
| bool | IsUDSuffix ) |
Definition at line 485 of file SemaExprCXX.cpp.
References clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::UnqualifiedId::getBeginLoc(), clang::UnqualifiedId::getEndLoc(), clang::NestedNameSpecifier::getKind(), clang::UnqualifiedId::getKind(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::getScopeRep(), clang::UnqualifiedId::getSourceRange(), clang::NestedNameSpecifier::Global, clang::UnqualifiedId::Identifier, clang::IK_LiteralOperatorId, clang::IdentifierInfo::isReserved(), clang::isReservedInAllContexts(), clang::IdentifierInfo::isReservedLiteralSuffixId(), clang::NestedNameSpecifier::MicrosoftSuper, clang::NestedNameSpecifier::Namespace, clang::NotStartsWithUnderscore, clang::NestedNameSpecifier::Null, PP, and clang::NestedNameSpecifier::Type.
|
inline |
Definition at line 13631 of file SemaExpr.cpp.
References CheckMatrixLogicalOperands(), CheckVectorLogicalOperands(), Context, clang::CPlusPlus, clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), diagnoseScopedEnums(), clang::Expr::EvaluateAsInt(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getEndLoc(), clang::Expr::getExprLoc(), clang::APValue::getInt(), getLangOpts(), getLocForEndOfToken(), clang::Stmt::getSourceRange(), clang::Expr::getType(), inTemplateInstantiation(), InvalidOperands(), clang::Type::isBooleanType(), clang::Type::isConstantMatrixType(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::SourceLocation::isMacroID(), clang::Type::isScalarType(), clang::Expr::isValueDependent(), clang::Type::isVectorType(), PerformContextuallyConvertToBool(), clang::Result, UsualUnaryConversions(), and clang::Expr::EvalResult::Val.
Referenced by CreateBuiltinBinOp().
| void Sema::CheckLookupAccess | ( | const LookupResult & | R | ) |
Checks access to all the declarations in the given result set.
Definition at line 1907 of file SemaAccess.cpp.
References clang::AS_public, clang::LookupResult::begin(), CheckAccess(), Context, clang::LookupResult::end(), clang::LookupResult::getBaseObjectType(), getLangOpts(), clang::LookupResult::getNameLoc(), clang::LookupResult::getNamingClass(), and clang::sema::AccessedEntity::Member.
| bool Sema::CheckLoopHintExpr | ( | Expr * | E, |
| SourceLocation | Loc, | ||
| bool | AllowZero ) |
Definition at line 3678 of file SemaExpr.cpp.
References clang::SemaBase::Diag(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isBooleanType(), clang::Type::isCharType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isValueDependent(), toString(), and VerifyIntegerConstantExpression().
Referenced by handleHLSLLoopHintAttr(), and handleLoopHintAttr().
| ExprResult Sema::CheckLValueToRValueConversionOperand | ( | Expr * | E | ) |
Definition at line 20150 of file SemaExpr.cpp.
References checkNonTrivialCUnion(), clang::ExprError(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), clang::Type::isRecordType(), clang::QualType::isVolatileQualified(), clang::LValueToRValueVolatile, clang::NOUR_Constant, NTCUK_Copy, NTCUK_Destruct, rebuildPotentialResultsAsNonOdrUsed(), and clang::Result.
Referenced by ActOnConstantExpression(), and DefaultLvalueConversion().
| void Sema::CheckMain | ( | FunctionDecl * | FD, |
| const DeclSpec & | D ) |
Definition at line 12607 of file SemaDecl.cpp.
References clang::cast(), clang::CC_C, Context, clang::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::Qualifiers::empty(), clang::Type::getAs(), clang::Decl::getAttr(), clang::SourceRange::getBegin(), clang::FunctionType::getCallConv(), 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::FunctionType::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::FunctionDecl::getStorageClass(), clang::DeclSpec::getStorageClassSpecLoc(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::GNUMode, clang::Decl::hasAttr(), HLSL(), clang::isa(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::DeclContext::isExternCContext(), clang::FunctionDecl::isInlineSpecified(), clang::Decl::isInNamedModule(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isNoreturnSpecified(), clang::SourceRange::isValid(), clang::FunctionProtoType::isVariadic(), OpenCL(), clang::Qualifiers::removeConst(), clang::SC_Static, clang::FunctionDecl::setConstexprKind(), clang::FunctionDecl::setHasImplicitReturnZero(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::QualifierCollector::strip(), clang::T, clang::Unspecified, and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by ActOnFunctionDeclarator().
| bool Sema::CheckMatrixCast | ( | SourceRange | R, |
| QualType | DestTy, | ||
| QualType | SrcTy, | ||
| CastKind & | Kind ) |
Definition at line 7820 of file SemaExpr.cpp.
References areMatrixTypesOfTheSameDimension(), clang::SemaBase::Diag(), clang::SourceRange::getBegin(), and clang::Type::isMatrixType().
| QualType Sema::CheckMatrixElementwiseOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| bool | IsCompAssign ) |
Type checking for matrix binary operators.
Definition at line 13467 of file SemaExpr.cpp.
References Context, DefaultFunctionArrayLvalueConversion(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::MatrixType::getElementType(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), InvalidOperands(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and tryConvertExprToType().
Referenced by CheckAdditionOperands(), CheckMatrixMultiplyOperands(), CheckMultiplyDivideOperands(), and CheckSubtractionOperands().
| QualType Sema::CheckMatrixLogicalOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc ) |
Definition at line 13448 of file SemaExpr.cpp.
References clang::SemaHLSL::emitLogicalOperatorFixIt(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), getLangOpts(), HLSL(), clang::LangOptionsBase::HLSL_2021, InvalidOperands(), and clang::SemaBase::SemaRef.
Referenced by CheckLogicalOperands().
| QualType Sema::CheckMatrixMultiplyOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| bool | IsCompAssign ) |
Definition at line 13513 of file SemaExpr.cpp.
References CheckMatrixElementwiseOperands(), Context, DefaultFunctionArrayLvalueConversion(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::MatrixType::getElementType(), clang::ConstantMatrixType::getNumColumns(), clang::ConstantMatrixType::getNumRows(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), InvalidOperands(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by CheckMultiplyDivideOperands().
| Sema::AccessResult Sema::CheckMemberAccess | ( | SourceLocation | UseLoc, |
| CXXRecordDecl * | NamingClass, | ||
| DeclAccessPair | Found ) |
Checks access to a member.
Definition at line 1751 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, clang::Found, and getLangOpts().
| Sema::AccessResult Sema::CheckMemberOperatorAccess | ( | SourceLocation | Loc, |
| Expr * | ObjectExpr, | ||
| ArrayRef< Expr * > | ArgExprs, | ||
| DeclAccessPair | FoundDecl ) |
Definition at line 1804 of file SemaAccess.cpp.
References CheckMemberOperatorAccess().
| Sema::AccessResult Sema::CheckMemberOperatorAccess | ( | SourceLocation | Loc, |
| Expr * | ObjectExpr, | ||
| const SourceRange & | Range, | ||
| DeclAccessPair | FoundDecl ) |
Definition at line 1780 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, clang::Type::castAsCXXRecordDecl(), CheckAccess(), Context, clang::Found, getLangOpts(), clang::Stmt::getSourceRange(), and clang::Expr::getType().
Referenced by BuildCallToObjectOfClassType(), BuildCXXCastArgument(), BuildOverloadedArrowExpr(), CheckMemberOperatorAccess(), CheckMemberOperatorAccess(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), diagnoseNoViableConversion(), clang::InitializationSequence::Perform(), and recordConversion().
| 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 1795 of file SemaAccess.cpp.
References CheckMemberOperatorAccess(), clang::Found, and clang::Stmt::getSourceRange().
| Sema::MemberPointerConversionResult Sema::CheckMemberPointerConversion | ( | QualType | FromType, |
| const MemberPointerType * | ToPtrType, | ||
| CastKind & | Kind, | ||
| CXXCastPath & | BasePath, | ||
| SourceLocation | CheckLoc, | ||
| SourceRange | OpRange, | ||
| bool | IgnoreBaseAccess, | ||
| MemberPointerConversionDirection | Direction ) |
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 produces a
Definition at line 3685 of file SemaOverload.cpp.
References Ambiguous, AR_accessible, AR_delayed, AR_dependent, AR_inaccessible, BuildBasePathArray(), CheckBaseClassAccess(), Context, clang::declaresSameEntity(), Diag(), DifferentPointee, clang::CXXBasePaths::front(), getAmbiguousPathsDisplayString(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::CXXBasePaths::getDetectedVirtual(), clang::MemberPointerType::getMostRecentCXXRecordDecl(), clang::MemberPointerType::getPointeeType(), clang::MemberPointerType::getQualifier(), Inaccessible, int, clang::CXXBasePaths::isAmbiguous(), isCompleteType(), IsDerivedFrom(), NotDerived, clang::SemaBase::PDiag(), Success, Upcast, and Virtual.
Referenced by PerformImplicitConversion().
| 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.
| Member | the member declaration, which will be updated to become a specialization. |
| Previous | the set of declarations, one of which may be specialized by this function specialization; the set will be modified to contain the redeclared member. |
Definition at line 9794 of file SemaTemplate.cpp.
References clang::UnresolvedSetImpl::addDecl(), adjustCCAndNoReturn(), Ambiguous, clang::UnresolvedSetImpl::begin(), clang::cast(), CheckFunctionConstraints(), CheckSpecializationInstantiationRedecl(), CheckTemplateSpecializationScope(), Context, clang::SemaBase::Diag(), clang::UnresolvedSetImpl::empty(), clang::UnresolvedSetImpl::end(), clang::Decl::FOK_None, clang::Function, clang::FunctionDecl::getCanonicalDecl(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::FunctionDecl::getInstantiatedFromMemberFunction(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::Decl::getLocation(), clang::CXXRecordDecl::getMemberSpecializationInfo(), clang::EnumDecl::getMemberSpecializationInfo(), clang::FunctionDecl::getMemberSpecializationInfo(), clang::VarDecl::getMemberSpecializationInfo(), getMoreConstrainedFunction(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), getTemplateSpecializationKind(), hasExplicitCallingConv(), clang::isa(), clang::FunctionDecl::isDeleted(), clang::VarDecl::isStaticDataMember(), clang::Member, clang::Method, Previous, clang::FunctionDecl::setDeletedAsWritten(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.
Referenced by ActOnFunctionDeclarator(), ActOnTag(), and ActOnVariableDeclarator().
| IfExistsResult Sema::CheckMicrosoftIfExistsSymbol | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| const DeclarationNameInfo & | TargetNameInfo ) |
Definition at line 7756 of file SemaExprCXX.cpp.
References clang::Ambiguous, clang::Dependent, clang::DoesNotExist, clang::Exists, clang::Found, clang::FoundOverloaded, clang::FoundUnresolvedValue, clang::DeclarationNameInfo::getName(), clang::LookupResult::getResultKind(), clang::DeclarationName::isDependentName(), LookupAnyName, LookupParsedName(), NotForRedeclaration, clang::NotFound, clang::NotFoundInCurrentInstantiation, and clang::LookupResult::suppressDiagnostics().
Referenced by CheckMicrosoftIfExistsSymbol().
| IfExistsResult Sema::CheckMicrosoftIfExistsSymbol | ( | Scope * | S, |
| SourceLocation | KeywordLoc, | ||
| bool | IsIfExists, | ||
| CXXScopeSpec & | SS, | ||
| UnqualifiedId & | Name ) |
Definition at line 7789 of file SemaExprCXX.cpp.
References CheckMicrosoftIfExistsSymbol(), DiagnoseUnexpandedParameterPack(), clang::Error, GetNameFromUnqualifiedId(), UPPC_IfExists, and UPPC_IfNotExists.
| bool Sema::checkMSInheritanceAttrOnDefinition | ( | CXXRecordDecl * | RD, |
| SourceRange | Range, | ||
| bool | BestCase, | ||
| MSInheritanceModel | SemanticSpelling ) |
Definition at line 4752 of file SemaDeclAttr.cpp.
References clang::CXXRecordDecl::calculateInheritanceModel(), clang::SemaBase::Diag(), clang::CXXRecordDecl::getDefinition(), clang::Decl::getLocation(), clang::CXXRecordDecl::hasDefinition(), clang::TagDecl::isCompleteDefinition(), and clang::Unspecified.
Referenced by ActOnFields(), and mergeMSInheritanceAttr().
| void Sema::CheckMSVCRTEntryPoint | ( | FunctionDecl * | FD | ) |
Definition at line 12807 of file SemaDecl.cpp.
References clang::CC_C, clang::CC_X86StdCall, Context, clang::SemaBase::Diag(), clang::FunctionType::getCallConv(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionType::getExtInfo(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), hasExplicitCallingConv(), clang::Type::isAnyPointerType(), isDefaultStdCall(), clang::Type::isIntegralOrEnumerationType(), clang::Decl::isInvalidDecl(), clang::Type::isNullPtrType(), clang::FunctionDecl::setHasImplicitReturnZero(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::T, and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by ActOnFunctionDeclarator().
| QualType Sema::CheckMultiplyDivideOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc ) |
Definition at line 10977 of file SemaExpr.cpp.
References clang::Arithmetic, checkArithmeticNull(), CheckMatrixElementwiseOperands(), CheckMatrixMultiplyOperands(), CheckSizelessVectorOperands(), CheckVectorOperands(), clang::CompAssign, DetectPrecisionLossInComplexDivision(), DiagnoseBadDivideOrRemainderValues(), DiagnoseDivisionSizeofPointerOrArray(), diagnoseScopedEnums(), clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), clang::Expr::getType(), InvalidOperands(), clang::Type::isArithmeticType(), clang::Type::isConstantMatrixType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Type::isSveVLSBuiltinType(), clang::Type::isVectorType(), and UsualArithmeticConversions().
Referenced by CreateBuiltinBinOp().
| bool Sema::CheckNoInlineAttr | ( | const Stmt * | OrigSt, |
| const Stmt * | CurSt, | ||
| const AttributeCommonInfo & | A ) |
Definition at line 287 of file SemaStmtAttr.cpp.
References CheckStmtInlineAttr().
Referenced by handleNoInlineAttr().
| bool Sema::CheckNonDependentConversions | ( | FunctionTemplateDecl * | FunctionTemplate, |
| ArrayRef< QualType > | ParamTypes, | ||
| ArrayRef< Expr * > | Args, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| ConversionSequenceList & | Conversions, | ||
| CheckNonDependentConversionsFlag | UserConversionFlag, | ||
| 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.
isConvertingConstructor takes copy/move constructors into account!
Definition at line 8196 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::allocateConversionSequences(), clang::cast(), Conversions, clang::OverloadCandidateSet::CSK_AddressOfOverloadSet, FunctionTemplate, clang::Type::getAsCXXRecordDecl(), clang::getConstructorInfo(), clang::OverloadCandidateSet::getKind(), getLangOpts(), clang::OverloadCandidateSet::getLocation(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), getType(), clang::CXXRecordDecl::hasDefinition(), clang::isa(), clang::CXXConstructorDecl::isConvertingConstructor(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isPointerType(), LookupConstructors(), clang::Method, clang::Sema::CheckNonDependentConversionsFlag::OnlyInitializeNonUserDefinedConversions, clang::Reversed, clang::Sema::CheckNonDependentConversionsFlag::SuppressUserConversions, TryCopyInitialization(), TryObjectArgumentInitialization(), Unevaluated, and clang::Unevaluated.
| void Sema::checkNonTrivialCUnion | ( | QualType | QT, |
| SourceLocation | Loc, | ||
| NonTrivialCUnionContext | UseContext, | ||
| unsigned | NonTrivialKind ) |
Emit diagnostics if a non-trivial C union type or a struct that contains a non-trivial C union is used in an invalid context.
Definition at line 13674 of file SemaDecl.cpp.
References clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), clang::QualType::hasNonTrivialToPrimitiveDestructCUnion(), NTCUK_Copy, NTCUK_Destruct, and NTCUK_Init.
Referenced by ActOnBlockStmtExpr(), ActOnFunctionDeclarator(), ActOnUninitializedDecl(), ActOnVariableDeclarator(), BuildCompoundLiteralExpr(), CheckFunctionReturnType(), CheckLValueToRValueConversionOperand(), checkNonTrivialCUnionInInitializer(), CheckParameter(), CreateBuiltinBinOp(), and markEscapingByrefs().
| 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 13414 of file SemaDecl.cpp.
References checkNonTrivialCUnion(), checkNonTrivialCUnionInInitializer(), clang::CopyInit, clang::DefaultInitializedObject, clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::QualType::hasNonTrivialToPrimitiveDefaultInitializeCUnion(), clang::Init, clang::isa(), clang::SourceLocation::isValid(), NTCUK_Copy, and NTCUK_Init.
Referenced by AddInitializerToDecl(), BuildCompoundLiteralExpr(), and checkNonTrivialCUnionInInitializer().
Definition at line 19379 of file SemaDecl.cpp.
References clang::Decl::addAttr(), Context, clang::CopyAssignment, clang::CopyConstructor, clang::CPlusPlus, clang::CPlusPlus11, clang::DefaultConstructor, clang::Destructor, clang::SemaBase::Diag(), DiagnoseNontrivial(), clang::Type::getAsCXXRecordDecl(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), clang::FieldDecl::getParent(), getSourceManager(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Invalid, clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), and clang::TagDecl::isUnion().
Referenced by BuildAnonymousStructOrUnion(), and CheckFieldDecl().
| QualType Sema::CheckNonTypeTemplateParameterType | ( | QualType | T, |
| SourceLocation | Loc ) |
Definition at line 1450 of file SemaTemplate.cpp.
References Context, clang::CPlusPlus20, clang::SemaBase::Diag(), getLangOpts(), RequireStructuralType(), and clang::T.
| QualType Sema::CheckNonTypeTemplateParameterType | ( | TypeSourceInfo *& | TSI, |
| SourceLocation | Loc ) |
Check that the type of a non-type template parameter is well-formed.
Definition at line 1337 of file SemaTemplate.cpp.
References CheckNonTypeTemplateParameterType(), clang::TypeSourceInfo::getType(), clang::Type::isUndeducedType(), and SubstAutoTypeSourceInfoDependent().
Referenced by ActOnNonTypeTemplateParameter(), CheckNonTypeTemplateParameterType(), CheckTemplateArgument(), and CheckTemplateArgument().
| OverloadKind Sema::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.
This routine returns OverloadKind::Match or OverloadKind::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 OverloadKind::Match or OverloadKind::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 OverloadKind::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 OverloadKind::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 1213 of file SemaOverload.cpp.
References clang::LookupResult::addAllDecls(), clang::LookupResult::begin(), clang::cast(), CheckFunctionTemplateSpecialization(), CurContext, clang::LookupResult::end(), clang::Decl::getAsFunction(), clang::LookupResult::getAsSingle(), getASTContext(), clang::LookupResult::getLookupKind(), HideUsingShadowDecl(), clang::isa(), IsOverload(), isVisible(), LookupUsingDeclName, clang::Match, New, clang::NonFunction, clang::Overload, and clang::LookupResult::Temporary.
Referenced by CheckFunctionDeclaration(), and CheckUsingShadowDecl().
| bool Sema::CheckOverloadedOperatorDeclaration | ( | FunctionDecl * | FnDecl | ) |
CheckOverloadedOperatorDeclaration - Check whether the declaration of this overloaded operator is well-formed.
If so, returns false; otherwise, emits appropriate diagnostics and returns true.
Definition at line 16809 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), Diag(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::getDefaultArgRange(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), clang::isa(), clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::FunctionDecl::isOverloadedOperator(), clang::Type::isRecordType(), clang::Type::isSpecificBuiltinType(), clang::FunctionProtoType::isVariadic(), LangOpts, clang::NUM_OVERLOADED_OPERATORS, and clang::FunctionDecl::parameters().
Referenced by CheckFunctionDeclaration().
| void Sema::CheckOverrideControl | ( | NamedDecl * | D | ) |
CheckOverrideControl - Check C++11 override control semantics.
Definition at line 3243 of file SemaDeclCXX.cpp.
References clang::FixItHint::CreateRemoval(), Diag(), clang::Decl::dropAttr(), FindHiddenVirtualMethods(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::Decl::hasAttr(), clang::Type::isDependentType(), clang::CXXMethodDecl::isInstance(), clang::Decl::isInvalidDecl(), clang::CXXMethodDecl::isVirtual(), NoteHiddenVirtualMethods(), clang::Decl::setInvalidDecl(), and clang::CXXMethodDecl::size_overridden_methods().
Referenced by ActOnCXXMemberDeclarator().
| bool Sema::CheckOverridingFunctionAttributes | ( | CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old ) |
Definition at line 18678 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), Context, Diag(), diagnoseFunctionEffectMergeConflicts(), clang::FunctionProtoType::ExtProtoInfo::FunctionEffects, clang::Decl::getAttr(), clang::FunctionType::getCallConv(), clang::FunctionProtoType::getExtParameterInfo(), clang::FunctionDecl::getFunctionEffects(), clang::Decl::getLocation(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ValueDecl::getType(), clang::FunctionProtoType::hasExtParameterInfos(), clang::FunctionEffectSet::insert(), IsInvalidSMECallConversion(), clang::FunctionType::ExtParameterInfo::isNoEscape(), clang::Sema::FunctionEffectDiff::Merge, New, clang::Sema::FunctionEffectDiff::NoAction, clang::SC_Static, and clang::Sema::FunctionEffectDiff::Warn.
Referenced by AddOverriddenMethods().
| bool clang::Sema::CheckOverridingFunctionExceptionSpec | ( | const CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old ) |
CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec.
Definition at line 950 of file SemaExceptionSpec.cpp.
References clang::Type::castAs(), CheckExceptionSpecSubset(), DelayedOverridingExceptionSpecChecks, clang::EST_Unparsed, clang::exceptionSpecNotKnownYet(), clang::FunctionProtoType::getExceptionSpecType(), getLangOpts(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), clang::isa(), New, and clang::SemaBase::PDiag().
Referenced by actOnDelayedExceptionSpecification(), AddOverriddenMethods(), and CheckDelayedMemberExceptionSpecs().
| bool Sema::CheckOverridingFunctionReturnType | ( | const CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old ) |
CheckOverridingFunctionReturnType - Checks whether the return types are covariant, according to C++ [class.virtual]p5.
Both types must be pointers or references to classes.
Definition at line 18793 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), CheckDerivedToBaseConversion(), Context, Diag(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), getASTContext(), clang::QualType::getLocalCVRQualifiers(), clang::Decl::getLocation(), clang::Type::getPointeeType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ValueDecl::getType(), clang::QualType::isAtLeastAsQualifiedAs(), clang::TagDecl::isBeingDefined(), clang::Type::isDependentType(), IsDerivedFrom(), clang::QualType::isNull(), clang::Type::isStructureOrClassType(), New, and RequireCompleteType().
Referenced by AddOverriddenMethods().
| ExprResult Sema::CheckPackExpansion | ( | Expr * | Pattern, |
| SourceLocation | EllipsisLoc, | ||
| UnsignedOrNone | NumExpansions ) |
Invoked when parsing an expression followed by an ellipsis, which creates a pack expansion.
| Pattern | The expression preceding the ellipsis, which will become the pattern of the pack expansion. |
| EllipsisLoc | The location of the ellipsis. |
Definition at line 823 of file SemaTemplateVariadic.cpp.
References clang::Expr::containsUnexpandedParameterPack(), Context, clang::SemaBase::Diag(), clang::ExprError(), and clang::Stmt::getSourceRange().
| QualType Sema::CheckPackExpansion | ( | QualType | Pattern, |
| SourceRange | PatternRange, | ||
| SourceLocation | EllipsisLoc, | ||
| UnsignedOrNone | NumExpansions ) |
Construct a pack expansion type from the pattern of the pack expansion.
Definition at line 798 of file SemaTemplateVariadic.cpp.
References clang::Type::containsUnexpandedParameterPack(), Context, clang::SemaBase::Diag(), and clang::Type::getContainedDeducedType().
| TypeSourceInfo * Sema::CheckPackExpansion | ( | TypeSourceInfo * | Pattern, |
| SourceLocation | EllipsisLoc, | ||
| UnsignedOrNone | NumExpansions ) |
Construct a pack expansion type from the pattern of the pack expansion.
Definition at line 780 of file SemaTemplateVariadic.cpp.
References CheckPackExpansion(), Context, clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushFullCopy(), clang::Result, and clang::PackExpansionTypeLoc::setEllipsisLoc().
Referenced by ActOnPackExpansion(), ActOnPackExpansion(), CheckPackExpansion(), clang::TreeTransform< AdjustConstraints >::RebuildPackExpansion(), clang::TreeTransform< AdjustConstraints >::RebuildPackExpansion(), clang::TreeTransform< AdjustConstraints >::RebuildPackExpansionType(), and SubstParmVarDecl().
| ParmVarDecl * Sema::CheckParameter | ( | DeclContext * | DC, |
| SourceLocation | StartLoc, | ||
| SourceLocation | NameLoc, | ||
| const IdentifierInfo * | Name, | ||
| QualType | T, | ||
| TypeSourceInfo * | TSInfo, | ||
| StorageClass | SC ) |
Definition at line 15762 of file SemaDecl.cpp.
References clang::Sema::DelayedDiagnostics::add(), checkNonTrivialCUnion(), Context, clang::ParmVarDecl::Create(), clang::FixItHint::CreateInsertion(), clang::Default, clang::SemaBase::Diag(), clang::FunctionParam, getEnclosingLambdaOrBlock(), clang::TypeLoc::getEndLoc(), getLangOpts(), getLocForEndOfToken(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getTypeLoc(), clang::sema::DelayedDiagnostic::makeForbiddenType(), New, NTCUK_Copy, NTCUK_Destruct, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, OpenCL(), clang::opencl_private, PPC(), clang::Sema::DelayedDiagnostics::shouldDelayDiagnostics(), clang::T, and clang::wasm_funcref.
Referenced by ActOnParamDeclarator(), and SubstParmVarDecl().
| bool Sema::CheckParameterPacksForExpansion | ( | SourceLocation | EllipsisLoc, |
| SourceRange | PatternRange, | ||
| ArrayRef< UnexpandedParameterPack > | Unexpanded, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| bool | FailOnPackProducingTemplates, | ||
| bool & | ShouldExpand, | ||
| bool & | RetainExpansion, | ||
| UnsignedOrNone & | NumExpansions, | ||
| bool | Diagnose = true ) |
Determine whether we could expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern.
| EllipsisLoc | The location of the ellipsis that identifies the pack expansion. |
| PatternRange | The source range that covers the entire pattern of the pack expansion. |
| Unexpanded | The set of unexpanded parameter packs within the pattern. |
| ShouldExpand | Will be set to true if the transformer should expand the corresponding pack expansions into separate arguments. When set, NumExpansions must also be set. |
| RetainExpansion | Whether the caller should add an unexpanded pack expansion after all of the expanded arguments. This is used when extending explicitly-specified template argument packs per C++0x [temp.arg.explicit]p9. |
| NumExpansions | The number of separate arguments that will be in the expanded form of the corresponding pack expansion. This is both an input and an output parameter, which can be set by the caller if the number of expansions is known a priori (e.g., due to a prior substitution) and will be set by the callee when the number of expansions is known. The callee must set this value when ShouldExpand is true; it may set this value in other cases. |
ShouldExpand (and possibly NumExpansions) must be set. Definition at line 842 of file SemaTemplateVariadic.cpp.
References clang::cast(), clang::Type::castAs(), CurrentInstantiationScope, clang::SemaBase::Diag(), Diagnose, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsType(), clang::SourceRange::getBegin(), clang::getDepthAndIndex(), clang::NamedDecl::getIdentifier(), clang::IdentifierLoc::getIdentifierInfo(), clang::TemplateArgument::getKind(), clang::IdentifierLoc::getLoc(), clang::FunctionParmPackExpr::getNumExpansions(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::TemplateArgument::getNumTemplateExpansions(), clang::MultiLevelTemplateArgumentList::hasTemplateArgument(), clang::isa(), clang::TemplateArgument::isPackExpansion(), clang::isPackProducingBuiltinTemplateName(), clang::SourceLocation::isValid(), and clang::TemplateArgument::Type.
Referenced by instantiateDependentAlignedAttr(), InstantiateMemInitializers(), and PreparePackForExpansion().
| bool clang::Sema::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.
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 878 of file SemaExceptionSpec.cpp.
References clang::CheckSpecForTypesEquivalent(), clang::SemaBase::PDiag(), and clang::Target.
Referenced by CheckExceptionSpecSubset().
| 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 14835 of file SemaChecking.cpp.
References AbstractParamType, clang::C23, clang::CPlusPlus, clang::Destructor, clang::SemaBase::Diag(), diagnoseArrayStarInParamType(), DiagnoseUseOfDecl(), getLangOpts(), clang::DeclContext::getParent(), clang::Attr::getSpelling(), clang::DeclContext::isFunctionOrMethod(), LangOpts, LookupDestructor(), MarkFunctionReferenced(), RequireCompleteType(), and RequireNonAbstractType().
Referenced by ActOnBlockArguments(), ActOnStartOfFunctionDef(), and CompleteLambdaCallOperator().
| 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 21509 of file SemaExpr.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::CXXScopeSpec::Adopt(), BuildDeclRefExpr(), clang::cast(), clang::SemaPseudoObject::checkRValue(), CheckTemplateIdType(), clang::Expr::containsErrors(), Context, clang::DeclRefExpr::copyTemplateArgumentsInto(), clang::CPlusPlus20, clang::CallExpr::Create(), CreateBuiltinMatrixSingleSubscriptExpr(), CreateRecoveryExpr(), clang::DeclarationName::CXXDestructorName, clang::SemaBase::Diag(), clang::SemaObjC::diagnoseARCUnbridgedCast(), diagnoseUnknownAnyExpr(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsPlaceholderType(), clang::DeclarationNameInfo::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::DeclRefExpr::getDecl(), clang::DeclarationNameInfo::getEndLoc(), clang::Expr::getExprLoc(), clang::DeclRefExpr::getFoundDecl(), clang::BuiltinType::getKind(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::DeclRefExpr::getNameInfo(), clang::DeclRefExpr::getQualifierLoc(), clang::DeclRefExpr::getTemplateKeywordLoc(), clang::Expr::getType(), clang::DeclRefExpr::hasExplicitTemplateArgs(), clang::DeclRefExpr::hasQualifier(), HLSL(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParens(), ImpCastExprToType(), InstantiateFunctionDefinition(), clang::isa(), clang::TemplateArgument::isDependent(), clang::QualType::isNull(), clang::None, ObjC(), clang::SemaBase::PDiag(), PseudoObject(), resolveAndFixAddressOfSingleOverloadCandidate(), ResolveAndFixSingleFunctionTemplateSpecialization(), clang::Result, clang::SemaObjC::stripARCUnbridgedCast(), tryToRecoverWithCall(), clang::VK_LValue, and clang::VK_PRValue.
Referenced by ActOnArraySubscriptExpr(), ActOnCoawaitExpr(), ActOnConditionalOp(), ActOnDecltypeExpression(), ActOnFinishFullExpr(), ActOnForEachLValueExpr(), ActOnGCCAsmStmt(), ActOnStartCXXMemberReference(), BuildArrayType(), BuildBinOp(), BuildCallExpr(), BuildCoreturnStmt(), BuildCoyieldExpr(), BuildCXXAssumeExpr(), BuildCXXNew(), BuildCXXNoexceptExpr(), BuildCXXTypeId(), BuildExpressionTrait(), BuildInitList(), BuildResolvedCoawaitExpr(), BuildUnaryOp(), BuildUnresolvedCoawaitExpr(), CheckAddressOfOperand(), CheckArgsForPlaceholders(), CheckArrow(), CheckBooleanCondition(), CheckCommaOperands(), CheckConditionalOperands(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckObjCCollectionLiteralElement(), checkPlaceholderForOverload(), checkPointerAuthValue(), CheckRealImagOperand(), CreateBuiltinMatrixSingleSubscriptExpr(), CreateBuiltinMatrixSubscriptExpr(), CreateOverloadedBinOp(), CreateUnaryExprOrTypeTraitExpr(), DeduceAutoType(), DefaultFunctionArrayConversion(), DefaultLvalueConversion(), DefaultVariadicArgumentPromotion(), HandleExprEvaluationContextForTypeof(), IgnoredValueConversions(), clang::InitializationSequence::InitializeFrom(), LookupInlineAsmIdentifier(), clang::InitializationSequence::Perform(), PerformContextualImplicitConversion(), PerformImplicitConversion(), and PerformMemberExprBaseConversion().
| bool Sema::checkPointerAuthDiscriminatorArg | ( | Expr * | Arg, |
| PointerAuthDiscArgKind | Kind, | ||
| unsigned & | IntVal ) |
Definition at line 1586 of file SemaChecking.cpp.
References clang::Addr, Context, clang::SemaBase::Diag(), clang::Extra, clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Max, clang::PointerAuthQualifier::MaxDiscriminator, and clang::Result.
Referenced by HandlePtrAuthQualifier().
| bool Sema::checkPointerAuthEnabled | ( | SourceLocation | Loc, |
| SourceRange | Range ) |
Definition at line 1535 of file SemaChecking.cpp.
References clang::SemaBase::Diag(), and getLangOpts().
Referenced by checkPointerAuthEnabled(), and checkPtrAuthTypeDiscriminatorOperandType().
| 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 3568 of file SemaOverload.cpp.
References CheckDerivedToBaseConversion(), Context, Diag(), Diagnose, DiagRuntimeBehavior(), clang::Type::getAs(), clang::Expr::getExprLoc(), getLangOpts(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isFunctionType(), clang::Expr::isNullPointerConstant(), clang::Type::isRecordType(), isUnevaluatedContext(), clang::Expr::NPC_ValueDependentIsNotNull, clang::Expr::NPC_ValueDependentIsNull, clang::Expr::NPCK_ZeroExpression, and clang::SemaBase::PDiag().
Referenced by CheckSingleAssignmentConstraints(), and PerformImplicitConversion().
| QualType Sema::CheckPointerToMemberOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| ExprValueKind & | VK, | ||
| SourceLocation | OpLoc, | ||
| bool | isIndirect ) |
Definition at line 5366 of file SemaExprCXX.cpp.
References CheckDerivedToBaseConversion(), clang::Expr::Classify(), Context, clang::CPlusPlus20, clang::FixItHint::CreateReplacement(), clang::declaresSameEntity(), DefaultLvalueConversion(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::Stmt::getBeginLoc(), clang::QualType::getCVRQualifiers(), clang::Stmt::getEndLoc(), getLangOpts(), clang::MemberPointerType::getMostRecentCXXRecordDecl(), clang::MemberPointerType::getPointeeType(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParens(), ImpCastExprToType(), clang::isa(), IsDerivedFrom(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::Classification::isLValue(), clang::Expr::isPRValue(), clang::Expr::Classification::isRValue(), RequireCompleteType(), clang::Result, clang::RQ_LValue, clang::RQ_None, clang::RQ_RValue, TemporaryMaterializationConversion(), clang::VK_LValue, and clang::VK_PRValue.
Referenced by CreateBuiltinBinOp().
| void Sema::CheckPtrComparisonWithNullChar | ( | ExprResult & | E, |
| ExprResult & | NullE ) |
Definition at line 12610 of file SemaExpr.cpp.
References Context, clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::Type::isAnyPointerType(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, clang::Expr::NPCK_ZeroExpression, PP, and clang::T.
Referenced by CheckCompareOperands().
| bool Sema::CheckPureMethod | ( | CXXMethodDecl * | Method, |
| SourceRange | InitRange ) |
Mark the given method pure.
| Method | the method to be marked pure. |
| InitRange | the source range that covers the "0" initializer. |
Definition at line 18899 of file SemaDeclCXX.cpp.
References Diag(), clang::SourceRange::getEnd(), clang::SourceLocation::isValid(), and clang::Method.
Referenced by ActOnPureSpecifier().
| bool Sema::CheckQualifiedFunctionForTypeId | ( | QualType | T, |
| SourceLocation | Loc ) |
Definition at line 1784 of file SemaType.cpp.
References clang::SemaBase::Diag(), clang::Qualifiers::empty(), getFunctionQualifiersAsString(), clang::FunctionProtoType::getMethodQuals(), clang::FunctionProtoType::getRefQualifier(), clang::RQ_None, and clang::T.
Referenced by BuildCXXTypeId().
| bool Sema::CheckQualifiedMemberReference | ( | Expr * | BaseExpr, |
| QualType | BaseType, | ||
| const CXXScopeSpec & | SS, | ||
| const LookupResult & | R ) |
Definition at line 618 of file SemaExprMember.cpp.
References clang::LookupResult::begin(), clang::cast(), computeDeclContext(), DiagnoseQualifiedMemberReference(), clang::LookupResult::end(), clang::CXXRecordDecl::getCanonicalDecl(), clang::LookupResult::getLookupNameInfo(), clang::DeclContext::getNonTransparentContext(), clang::LookupResult::getRepresentativeDecl(), clang::CXXRecordDecl::isProvablyNotDerivedFrom(), and clang::DeclContext::isRecord().
Referenced by BuildMemberReferenceExpr().
Definition at line 752 of file SemaStmtAttr.cpp.
References CheckForDuplicateLoopAttrs().
[module.interface]p6: A redeclaration of an entity X is implicitly exported if X was introduced by an exported declaration; otherwise it shall not be exported.
Definition at line 1738 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), clang::NamedDecl::getFormalLinkage(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclContext::getNonTransparentContext(), clang::Internal, clang::DeclContext::isFileContext(), clang::Decl::isInExportDeclContext(), clang::Decl::isInNamedModule(), clang::Module, and New.
Referenced by CheckRedeclarationInModule().
A wrapper function for checking the semantic restrictions of a redeclaration within a module.
Definition at line 1784 of file SemaDecl.cpp.
References CheckRedeclarationExported(), CheckRedeclarationModuleOwnership(), and New.
Referenced by ActOnAliasDeclaration(), ActOnTag(), CheckClassTemplate(), MergeFunctionDecl(), and MergeVarDecl().
We've determined that New is a redeclaration of Old.
Check that they have compatible owning modules.
Definition at line 1671 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), getASTContext(), clang::Module::getFullModuleName(), clang::Decl::getLocation(), clang::Decl::getOwningModule(), clang::Decl::getOwningModuleForLinkage(), isImplicitInstantiation(), clang::Module::isModuleImplementation(), clang::Module::isModulePartition(), clang::Module::isNamedModule(), clang::Module::isPrivateModule(), makeMergedDefinitionVisible(), New, and clang::Module::Parent.
Referenced by CheckRedeclarationInModule().
| bool Sema::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.
Definition at line 5737 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkExactlyNumArgs(), checkUInt32Argument(), Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), clang::ParsedAttr::isInvalid(), and clang::ParsedAttr::setInvalid().
Referenced by handleFunctionTypeAttr().
| QualType Sema::CheckRemainderOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| bool | IsCompAssign = false ) |
Definition at line 11023 of file SemaExpr.cpp.
References clang::Arithmetic, checkArithmeticNull(), CheckSizelessVectorOperands(), CheckVectorOperands(), clang::CompAssign, DiagnoseBadDivideOrRemainderValues(), diagnoseScopedEnums(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::VectorType::getElementType(), getLangOpts(), clang::Expr::getType(), clang::Type::hasFloatingRepresentation(), clang::Type::hasIntegerRepresentation(), HLSL(), InvalidOperands(), clang::Type::isDoubleType(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Type::isSveVLSBuiltinType(), clang::Type::isVectorType(), and UsualArithmeticConversions().
Referenced by CreateBuiltinBinOp().
| bool Sema::checkSectionName | ( | SourceLocation | LiteralLoc, |
| StringRef | Str ) |
Definition at line 3339 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), isValidSectionSpecifier(), and toString().
Referenced by ActOnPragmaMSSeg(), and handleSectionAttr().
| void Sema::CheckShadow | ( | NamedDecl * | D, |
| NamedDecl * | ShadowedDecl, | ||
| const LookupResult & | R ) |
Diagnose variable or built-in function shadowing.
Implements -Wshadow.
This method is called whenever a VarDecl is added to a "useful" scope.
| ShadowedDecl | the declaration that is shadowed by the given variable |
| R | the lookup of the name |
Definition at line 8536 of file SemaDecl.cpp.
References clang::cast(), computeShadowedDeclKind(), clang::SemaBase::Diag(), clang::DeclContext::Encloses(), clang::DeclContext::Equals(), getCaptureLocation(), getCurFunction(), clang::Decl::getDeclContext(), getFunctionLevelDeclContext(), clang::getLambdaAwareParentOfDeclContext(), getLangOpts(), clang::DeclContext::getLexicalParent(), clang::Decl::getLocation(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::DeclContext::getParent(), clang::DeclContext::getRedeclContext(), clang::isa(), clang::SourceLocation::isInvalid(), clang::isLambdaCallOperator(), clang::NamedDecl::isPlaceholderVar(), clang::DeclContext::isRecord(), and clang::LCD_None.
Referenced by ActOnBlockArguments(), ActOnDecompositionDeclarator(), ActOnEnumConstant(), ActOnLambdaExpressionAfterIntroducer(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnStartRequiresExpr(), ActOnTypedefNameDecl(), ActOnVariableDeclarator(), and CheckShadow().
Check -Wshadow without the advantage of a previous lookup.
Definition at line 8698 of file SemaDecl.cpp.
References CheckShadow(), Diags, ForVisibleRedeclaration, clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), getShadowedDeclaration(), LookupName(), and LookupOrdinaryName.
| 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 8712 of file SemaDecl.cpp.
References clang::cast(), clang::CPlusPlus, clang::SemaBase::Diag(), clang::Decl::getDeclContext(), getLangOpts(), clang::Decl::getLocation(), and clang::Expr::IgnoreParenImpCasts().
Referenced by CheckForModifiableLvalue().
| QualType Sema::CheckShiftOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc, | ||
| bool | IsCompAssign = false ) |
Definition at line 11945 of file SemaExpr.cpp.
References clang::AltiVecBool, checkArithmeticNull(), checkSizelessVectorShift(), checkVectorShift(), DiagnoseBadShiftValues(), diagnoseScopedEnums(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Expr::getType(), clang::Type::hasIntegerRepresentation(), InvalidOperands(), clang::Type::isFixedPointOrIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isSveVLSBuiltinType(), clang::Type::isVectorType(), LangOpts, and UsualUnaryConversions().
Referenced by CreateBuiltinBinOp().
| 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.
| LHSType | The destination type for the assignment. |
| RHS | The source expression for the assignment. |
| Diagnose | If true, diagnostics may be produced when checking for assignability. If a diagnostic is produced, RHS will be set to ExprError(). Note that this function may still return without producing a diagnostic, even for an invalid assignment. |
| DiagnoseCFAudited | If true, the target is a function parameter in an audited Core Foundation API and does not need to be checked for ARC retain issues. |
| ConvertRHS | If true, RHS will be updated to model the conversions necessary to perform the assignment. If false, Diagnose must also be false. |
Definition at line 9908 of file SemaExpr.cpp.
References clang::SemaObjC::ACR_okay, clang::Assigning, clang::C23, CheckAssignmentConstraints(), CheckPointerConversion(), checkPointerTypesForAssignment(), CheckSufficientAllocSize(), clang::Compatible, clang::CompatibleVoidPtrToNonVoidPtr, Context, clang::CPlusPlus, DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), Diagnose, FixOverloadedFunctionReference(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::QualType::getAtomicUnqualifiedType(), clang::Stmt::getBeginLoc(), clang::QualType::getCanonicalType(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getNonLValueExprType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), ImpCastExprToType(), clang::Implicit, clang::Incompatible, clang::IncompatibleObjCWeakRef, clang::Type::isAtomicType(), clang::Type::isBlockPointerType(), clang::Type::isBooleanType(), clang::ImplicitConversionSequence::isFailure(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::SourceLocation::isMacroID(), clang::Expr::isNullPointerConstant(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isQueueT(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Type::isVoidPointerType(), clang::Expr::NPC_ValueDependentIsNull, ObjC(), PerformImplicitConversion(), ResolveAddressOfOverloadedFunction(), TryImplicitConversion(), and clang::VK_PRValue.
Referenced by ActOnIndirectGotoStmt(), CheckAssignmentOperands(), clang::checkCollectionLiteralElement(), IsStandardConversion(), and clang::InitializationSequence::Perform().
| QualType Sema::CheckSizelessVectorCompareOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc ) |
Definition at line 13250 of file SemaExpr.cpp.
References CheckFloatComparison(), CheckSizelessVectorOperands(), clang::Comparison, clang::SemaBase::Diag(), diagnoseTautologicalComparison(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), GetSignedSizelessVectorType(), clang::Expr::getType(), clang::Type::hasFloatingRepresentation(), clang::QualType::isNull(), and clang::BuiltinType::isSVEBool().
Referenced by CheckCompareOperands().
| QualType Sema::CheckSizelessVectorOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| bool | IsCompAssign, | ||
| ArithConvKind | OperationKind ) |
Definition at line 10725 of file SemaExpr.cpp.
References clang::Arithmetic, Context, DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isLValue(), clang::Type::isRealType(), clang::BuiltinType::isSVEBool(), clang::Type::isSveVLSBuiltinType(), tryGCCVectorConvertAndSplat(), and clang::Vector.
Referenced by CheckAdditionOperands(), CheckBitwiseOperands(), CheckMultiplyDivideOperands(), CheckRemainderOperands(), CheckSizelessVectorCompareOperands(), CheckSubtractionOperands(), and CheckVectorConditionalTypes().
| bool Sema::CheckSpanLikeType | ( | const AttributeCommonInfo & | CI, |
| const QualType & | Ty ) |
Check that the type is a plain record with one field being a pointer type and the other field being an integer.
This matches the common implementation of std::span or sized_allocation_t in P0901R11.
Definition at line 1842 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::Type::getAsRecordDecl(), clang::AttributeCommonInfo::getLoc(), isCompleteType(), clang::Type::isDependentType(), clang::TagDecl::isUnion(), and clang::T.
Referenced by handleMallocSpanAttr(), and instantiateDependentMallocSpanAttr().
| bool Sema::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.
| NewLoc | the location of the new explicit specialization or instantiation. |
| NewTSK | the kind of the new explicit specialization or instantiation. |
| PrevDecl | the previous declaration of the entity. |
| PrevTSK | the kind of the old explicit specialization or instantiatin. |
| PrevPointOfInstantiation | if valid, indicates where the previous declaration was instantiated (either implicitly or explicitly). |
| HasNoEffect | will be set to true to indicate that the new specialization or instantiation has no effect and should be ignored. |
Definition at line 9316 of file SemaTemplate.cpp.
References Context, clang::SemaBase::Diag(), DiagLocForExplicitInstantiation(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::getPreviousDecl(), getTemplateSpecializationKind(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), StripImplicitInstantiation(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by ActOnExplicitInstantiation(), ActOnExplicitInstantiation(), ActOnExplicitInstantiation(), CheckFunctionTemplateSpecialization(), CheckMemberSpecialization(), and InstantiateClassMembers().
| void Sema::checkSpecializationReachability | ( | SourceLocation | Loc, |
| NamedDecl * | Spec ) |
Definition at line 11804 of file SemaTemplate.cpp.
References checkSpecializationVisibility(), getLangOpts(), and Reachable.
Referenced by CheckVarTemplateId(), and MarkFunctionReferenced().
| 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 11795 of file SemaTemplate.cpp.
References getLangOpts(), and Visible.
Referenced by checkSpecializationReachability(), and DoMarkVarDeclReferenced().
| 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.
| [in,out] | T | The exception type. This will be decayed to a pointer type when the input is an array or a function type. |
Definition at line 117 of file SemaExceptionSpec.cpp.
References Context, clang::SemaBase::Diag(), clang::Type::getAsRecordDecl(), getLangOpts(), clang::Type::getPointeeType(), clang::Type::isSizelessType(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), RequireCompleteType(), and clang::T.
Referenced by checkExceptionSpecification().
| 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 6218 of file SemaExpr.cpp.
References Context, clang::CPlusPlus, clang::SemaBase::Diag(), DiagnoseCalleeStaticArrayParam(), getASTContext(), clang::ArrayType::getElementType(), getLangOpts(), clang::ConstantArrayType::getSize(), clang::ArrayType::getSizeModifier(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInCharsIfKnown(), clang::ConstantArrayType::getZExtSize(), clang::Expr::IgnoreParenCasts(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_NeverValueDependent, and clang::Static.
Referenced by GatherArgumentsForCall().
| void Sema::CheckStaticLocalForDllExport | ( | VarDecl * | VD | ) |
Check if VD needs to be dllexport/dllimport due to being in a dllexport/import function.
Definition at line 15122 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::cast(), getASTContext(), clang::Decl::getAttr(), clang::getDLLAttr(), clang::Decl::getParentFunctionOrMethod(), clang::Decl::hasAttr(), and clang::VarDecl::isStaticLocal().
Referenced by FinalizeDeclaration().
| 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 117 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentString, clang::SemaBase::Diag(), clang::Stmt::getBeginLoc(), and clang::Expr::IgnoreParenCasts().
Referenced by CheckCallingConvAttr(), checkFunctionConditionAttr(), checkStringLiteralArgumentAttr(), CreateAnnotationAttr(), handleAbiTagAttr(), handleAcquireHandleAttr(), handleAliasAttr(), HandleAnnotateTypeAttr(), handleArmAgnosticAttribute(), handleArmStateAttribute(), handleAttrWithMessage(), handleBTFDeclTagAttr(), handleCallableWhenAttr(), handleCapabilityAttr(), handleCodeModelAttr(), handleCodeSegAttr(), handleDeprecatedAttr(), handleDiagnoseIfAttr(), handleEnforceTCBAttr(), handleErrorAttr(), handleFunctionReturnThunksAttr(), handleFunctionTypeAttr(), handleHandleAttr(), handleIFuncAttr(), handleModularFormat(), handleNoBuiltinAttr(), handleNoSanitizeAttr(), handleNoSpecializations(), handlePatchableFunctionEntryAttr(), handleSectionAttr(), handleSuppressAttr(), handleSuppressAttr(), HandleSwiftAttr(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTLSModelAttr(), handleUuidAttr(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakRefAttr(), handleZeroCallUsedRegsAttr(), and instantiateDependentAnnotationAttr().
| bool Sema::checkStringLiteralArgumentAttr | ( | const ParsedAttr & | Attr, |
| unsigned | ArgNum, | ||
| StringRef & | Str, | ||
| SourceLocation * | ArgLocation = nullptr ) |
Check if the argument ArgNum of Attr is a ASCII string literal.
If not emit an error and return false. If the argument is an identifier it will emit an error with a fixit hint and treat it as if it was a string literal.
Definition at line 134 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentString, checkStringLiteralArgumentAttr(), clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Stmt::getBeginLoc(), clang::IdentifierLoc::getIdentifierInfo(), clang::IdentifierLoc::getLoc(), getLocForEndOfToken(), clang::IdentifierInfo::getName(), clang::Expr::IgnoreParenCasts(), and clang::ParsedAttr::isArgIdent().
| Sema::AccessResult Sema::CheckStructuredBindingMemberAccess | ( | SourceLocation | UseLoc, |
| CXXRecordDecl * | DecomposedClass, | ||
| DeclAccessPair | Field ) |
Checks implicit access to a member in a structured binding.
Definition at line 1766 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, and getLangOpts().
Referenced by CheckMemberDecompositionFields().
| QualType Sema::CheckSubtractionOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc, | ||
| QualType * | CompLHSTy = nullptr ) |
Definition at line 11495 of file SemaExpr.cpp.
References clang::Arithmetic, checkArithmeticBinOpPointerOperands(), checkArithmeticNull(), checkArithmeticOnObjCPointer(), checkArithmeticOpPointerOperand(), CheckMatrixElementwiseOperands(), CheckSizelessVectorOperands(), CheckVectorOperands(), clang::CompAssign, Context, clang::CPlusPlus, clang::SemaBase::Diag(), diagnoseArithmeticOnNullPointer(), diagnosePointerIncompatibility(), diagnoseScopedEnums(), diagnoseSubtractionOnNullPointer(), clang::Expr::EvaluateAsInt(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::APValue::getInt(), getLangOpts(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::IgnoreParenCasts(), InvalidOperands(), clang::isa(), 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, UsualArithmeticConversions(), and clang::Expr::EvalResult::Val.
Referenced by CreateBuiltinBinOp().
| ExprResult Sema::CheckSwitchCondition | ( | SourceLocation | SwitchLoc, |
| Expr * | Cond ) |
Definition at line 1108 of file SemaStmt.cpp.
References clang::Cond, clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getLocation(), clang::Type::isEnumeralType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), PerformContextualImplicitConversion(), Sema(), clang::T, and UsualUnaryConversions().
Referenced by ActOnCondition(), and CheckConditionVariable().
| bool Sema::checkTargetAttr | ( | SourceLocation | LiteralLoc, |
| StringRef | Str ) |
Definition at line 3473 of file SemaDeclAttr.cpp.
References clang::ParsedTargetAttr::BranchProtection, Context, clang::ParsedTargetAttr::CPU, clang::SemaBase::Diag(), clang::ParsedTargetAttr::Duplicate, Feature, clang::ParsedTargetAttr::Features, None, clang::Target, Tune, clang::ParsedTargetAttr::Tune, and Unknown.
Referenced by handleTargetAttr().
| void Sema::CheckTCBEnforcement | ( | const SourceLocation | CallExprLoc, |
| const NamedDecl * | Callee ) |
Enforce the bounds of a TCB CheckTCBEnforcement - Enforces that every function in a named TCB only directly calls other functions in the same TCB as marked by the enforce_tcb and enforce_tcb_leaf attributes.
Definition at line 16877 of file SemaChecking.cpp.
References clang::SemaBase::Diag(), getCurFunctionOrMethodDecl(), clang::Decl::hasAttr(), isUnevaluatedContext(), and clang::Decl::specific_attrs().
Referenced by CheckFunctionCall().
| ExprResult Sema::CheckTemplateArgument | ( | NamedDecl * | Param, |
| QualType | ParamType, | ||
| Expr * | Arg, | ||
| TemplateArgument & | SugaredConverted, | ||
| TemplateArgument & | CanonicalConverted, | ||
| bool | StrictCheck, | ||
| 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 7113 of file SemaTemplate.cpp.
References ActOnConstantExpression(), ActOnFinishFullExpr(), clang::AlreadyDiagnosed, BuildConvertedConstantExpression(), clang::cast(), clang::Type::castAs(), CheckConvertedConstantExpression(), CheckNonTypeTemplateParameterType(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentPointerToMember(), ConstantEvaluated, Context, clang::CPlusPlus11, clang::CPlusPlus17, clang::CPlusPlus20, clang::InitializationKind::CreateForInit(), CTAK_Deduced, DeduceAutoType(), DeduceTemplateSpecializationFromInitializer(), DefaultLvalueConversion(), clang::SemaBase::Diag(), DiagnoseUseOfDecl(), EvaluateConvertedConstantExpression(), clang::ExprError(), FixOverloadedFunctionReference(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Type::getAsEnumDecl(), clang::Stmt::getBeginLoc(), clang::Decl::getCanonicalDecl(), clang::QualType::getCanonicalType(), clang::Type::getContainedDeducedType(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::MemberPointerType::getPointeeType(), clang::PointerType::getPointeeType(), clang::ReferenceType::getPointeeType(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::getUnqualifiedType(), clang::QualType::hasQualifiers(), clang::Expr::IgnoreParenImpCasts(), ImpCastExprToType(), InitializationSequence, clang::InitializedEntity::InitializeTemplateParameter(), clang::Inits, clang::isa(), clang::Type::isArrayType(), clang::Type::isBitIntType(), clang::Type::isBooleanType(), 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::isPointerOrReferenceType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Type::isRValueReferenceType(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Expr::isTypeDependent(), clang::ActionResult< PtrTy, Compress >::isUnset(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::Expr::isValueDependent(), NoteTemplateParameterLocation(), NPV_Error, NPV_NotNullPointer, NPV_NullPointer, clang::InitializationSequence::Perform(), ResolveAddressOfOverloadedFunction(), clang::Result, Sema(), SubstAutoTypeDependent(), clang::Success, clang::T, clang::TempArgStrict, clang::TemplateArg, toString(), VerifyIntegerConstantExpression(), clang::VK_LValue, clang::VK_PRValue, and clang::VK_XValue.
| bool Sema::CheckTemplateArgument | ( | NamedDecl * | Param, |
| TemplateArgumentLoc & | Arg, | ||
| NamedDecl * | Template, | ||
| SourceLocation | TemplateLoc, | ||
| SourceLocation | RAngleLoc, | ||
| unsigned | ArgumentPackIndex, | ||
| CheckTemplateArgumentInfo & | CTAI, | ||
| CheckTemplateArgumentKind | CTAK ) |
Check that the given template argument corresponds to the given template parameter.
| Param | The template parameter against which the argument will be checked. |
| Arg | The template argument, which may be updated due to conversions. |
| Template | The template in which the template argument resides. |
| TemplateLoc | The location of the template name for the template whose argument list we're matching. |
| RAngleLoc | The location of the right angle bracket ('>') that closes the template argument list. |
| ArgumentPackIndex | The index into the argument pack where this argument will be placed. Only valid if the parameter is a parameter pack. |
| CTAK | Describes how we arrived at this particular template argument: explicitly written, deduced, etc. |
Definition at line 5515 of file SemaTemplate.cpp.
References ActOnPackExpansion(), clang::MultiLevelTemplateArgumentList::addOuterRetainedLevels(), clang::CXXScopeSpec::Adopt(), BuildExpressionFromNonTypeTemplateArgument(), clang::Sema::CheckTemplateArgumentInfo::CanonicalConverted, clang::cast(), CheckNonTypeTemplateParameterType(), CheckTemplateArgument(), CheckTemplateTemplateArgument(), CheckTemplateTypeArgument(), Context, convertTypeTemplateArgumentToTemplate(), clang::DependentScopeDeclRefExpr::Create(), CTAK_Specified, CurContext, clang::TemplateArgument::Declaration, clang::SemaBase::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::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::TemplateTemplateParmDecl::isExpandedParameterPack(), clang::Type::isInstantiationDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::QualType::isNull(), clang::TemplateArgument::isNull(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Sema::CheckTemplateArgumentInfo::MatchingTTP, NoteTemplateParameterLocation(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::Sema::CheckTemplateArgumentInfo::PartialOrdering, clang::Sema::CheckTemplateArgumentInfo::StrictPackMatch, clang::TemplateArgument::StructuralValue, SubstTemplateParams(), SubstType(), clang::Sema::CheckTemplateArgumentInfo::SugaredConverted, clang::T, clang::Template, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, clang::TemplateTemplateParmDecl::templateParameterKind(), clang::TNK_Concept_template, clang::TNK_Var_template, and clang::TemplateArgument::Type.
Referenced by ActOnTypeParameter(), CheckTemplateArgument(), CheckTemplateArgumentList(), CheckTemplateTypeArgument(), ConvertDeducedTemplateArgument(), ConvertDeducedTemplateArguments(), and LookupLiteralOperator().
| bool Sema::CheckTemplateArgument | ( | TypeSourceInfo * | Arg | ) |
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 6511 of file SemaTemplate.cpp.
References Context, clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Type::hasUnnamedOrLocalType(), clang::Type::isVariablyModifiedType(), and LangOpts.
| bool Sema::CheckTemplateArgumentList | ( | TemplateDecl * | Template, |
| SourceLocation | TemplateLoc, | ||
| TemplateArgumentListInfo & | TemplateArgs, | ||
| const DefaultArguments & | DefaultArgs, | ||
| bool | PartialTemplateArgs, | ||
| CheckTemplateArgumentInfo & | CTAI, | ||
| 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.
| Template | The template to which the template arguments are being provided. |
| TemplateLoc | The location of the template name in the source. |
| TemplateArgs | The list of template arguments. If the template is a template template parameter, this function may extend the set of template arguments to also include substituted, defaulted template arguments. |
| PartialTemplateArgs | True if the list of template arguments is intentionally partial, e.g., because we're checking just the initial set of template arguments. |
| Converted | Will receive the converted, canonicalized template arguments. |
| UpdateArgsWithConversions | If true, update TemplateArgs to contain the converted forms of the template arguments as written. Otherwise, TemplateArgs will not be modified. |
| ConstraintsNotSatisfied | If provided, and an error occurred, will receive true if the cause for the error is the associated constraints of the template not being satisfied by the template arguments. |
| DefaultArgs | any default arguments from template specialization deduction. |
Definition at line 5828 of file SemaTemplate.cpp.
References CheckTemplateArgumentList(), clang::ConstraintsNotSatisfied, GetTemplateParameterList(), and clang::Template.
Referenced by ActOnClassTemplateSpecialization(), ActOnExplicitInstantiation(), ActOnVarTemplateSpecialization(), CheckConceptTemplateId(), CheckDeducedPlaceholderConstraints(), CheckTemplateArgumentList(), CheckTemplateIdType(), CheckVarOrConceptTemplateTemplateId(), CheckVarTemplateId(), FinishTemplateArgumentDeduction(), isTemplateTemplateParameterAtLeastAsSpecializedAs(), and SubstituteExplicitTemplateArguments().
| bool Sema::CheckTemplateArgumentList | ( | TemplateDecl * | Template, |
| TemplateParameterList * | Params, | ||
| SourceLocation | TemplateLoc, | ||
| TemplateArgumentListInfo & | TemplateArgs, | ||
| const DefaultArguments & | DefaultArgs, | ||
| bool | PartialTemplateArgs, | ||
| CheckTemplateArgumentInfo & | CTAI, | ||
| bool | UpdateArgsWithConversions = true, | ||
| bool * | ConstraintsNotSatisfied = nullptr ) |
Check that the given template argument list is well-formed for specializing the given template.
Definition at line 5841 of file SemaTemplate.cpp.
References _2, clang::TemplateArgumentListInfo::addArgument(), clang::DefaultArguments::Args, clang::TemplateParameterList::begin(), clang::Sema::CheckTemplateArgumentInfo::CanonicalConverted, clang::cast(), clang::TypeLoc::castAs(), clang::Decl::castToDeclContext(), CheckTemplateArgument(), collectUnexpandedParameterPacks(), clang::ConstraintsNotSatisfied, Context, clang::TemplateArgument::CreatePackCopy(), CTAK_Specified, CurrentInstantiationScope, clang::SemaBase::Diag(), diagnoseMissingArgument(), clang::TemplateParameterList::end(), EnsureTemplateArgumentListConstraints(), clang::First, clang::TemplateArgumentLoc::getArgument(), getArgument(), clang::TemplateParameterList::getDepth(), clang::getExpandedPackSize(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateArgumentLoc::getLocInfo(), clang::TemplateArgument::getPackExpansionPattern(), clang::TemplateArgumentListInfo::getRAngleLoc(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateParameterList::getSourceRange(), getTemplateInstantiationArgs(), getTemplateNameKindForDiagnostics(), clang::isa(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::TemplateArgument::isNull(), clang::NonTypeTemplateParmDecl::isPackExpansion(), clang::TemplateArgument::isPackExpansion(), clang::isPackProducingBuiltinTemplateName(), clang::Sema::CheckTemplateArgumentInfo::MatchingTTP, clang::Method, NoteTemplateLocation(), NoteTemplateParameterLocation(), clang::Sema::CheckTemplateArgumentInfo::PartialOrdering, clang::TemplateArgumentListInfo::size(), clang::DefaultArguments::StartPos, clang::Sema::CheckTemplateArgumentInfo::StrictPackMatch, SubstDefaultTemplateArgumentIfAvailable(), clang::Sema::CheckTemplateArgumentInfo::SugaredConverted, clang::Template, and clang::TemplateName.
| bool Sema::CheckTemplateDeclScope | ( | Scope * | S, |
| TemplateParameterList * | TemplateParams ) |
Check whether a template can be declared within this scope.
If the template declaration is valid in this scope, returns false. Otherwise, issues a diagnostic and returns true.
Definition at line 8425 of file SemaTemplate.cpp.
References clang::SemaBase::Diag(), clang::Scope::getDeclParent(), clang::Scope::getEntity(), clang::DeclContext::getExternCContext(), clang::TemplateParameterList::getParam(), clang::DeclContext::getRedeclContext(), clang::Decl::getSourceRange(), clang::TemplateParameterList::getSourceRange(), clang::TemplateParameterList::getTemplateLoc(), clang::DeclContext::isExternCContext(), clang::DeclContext::isFileContext(), clang::SourceLocation::isInvalid(), and clang::TemplateParameterList::size().
Referenced by ActOnAliasDeclaration(), ActOnClassTemplateSpecialization(), ActOnFunctionDeclarator(), ActOnTag(), ActOnVariableDeclarator(), and CheckClassTemplate().
| QualType Sema::CheckTemplateIdType | ( | ElaboratedTypeKeyword | Keyword, |
| TemplateName | Template, | ||
| SourceLocation | TemplateLoc, | ||
| TemplateArgumentListInfo & | TemplateArgs, | ||
| Scope * | Scope, | ||
| bool | ForNestedNameSpecifier ) |
Definition at line 3735 of file SemaTemplate.cpp.
References clang::MultiLevelTemplateArgumentList::addOuterRetainedLevels(), clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), clang::sema::TemplateDeductionInfo::addSFINAEDiagnostic(), AliasTemplate, clang::TemplateArgumentListInfo::arguments(), clang::Sema::CheckTemplateArgumentInfo::CanonicalConverted, checkBuiltinTemplateIdType(), CheckTemplateArgumentList(), ClassTemplate, Context, clang::ClassTemplateSpecializationDecl::Create(), CurContext, clang::SemaBase::Diag(), DiagnoseUseOfDecl(), clang::TemplateArgument::Expression, findFailedBooleanCondition(), clang::TemplateName::getAsTemplateDecl(), clang::TemplateArgumentListInfo::getRAngleLoc(), getSFINAEContext(), clang::Stmt::getSourceRange(), clang::KeywordHelpers::getTagTypeKindForKeyword(), clang::TemplateName::getTemplateDeclAndDefaultArgs(), clang::TypedefNameDecl::getUnderlyingType(), clang::sema::TemplateDeductionInfo::hasSFINAEDiagnostic(), InstantiateAttrsForDecl(), clang::isa(), clang::Type::isCanonicalUnqualified(), clang::TemplateName::isDependent(), isEnableIfAliasTemplate(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Keyword, clang::None, NoteAllFoundTemplates(), clang::SemaBase::PDiag(), clang::sema::TemplateDeductionInfo::peekSFINAEDiagnostic(), resolveAssumedTemplateNameAsType(), clang::SemaBase::SemaRef, clang::Decl::setLexicalDeclContext(), clang::Sema::CheckTemplateArgumentInfo::StrictPackMatch, SubstType(), clang::Sema::CheckTemplateArgumentInfo::SugaredConverted, clang::sema::TemplateDeductionInfo::takeSFINAEDiagnostic(), clang::Template, clang::TSK_Undeclared, clang::TypeAliasTemplate, and clang::Typename.
Referenced by ActOnCXXNestedNameSpecifier(), ActOnTagTemplateIdType(), ActOnTemplateIdType(), ActOnTypenameType(), BuildStdClassTemplate(), builtinCommonTypeImpl(), checkBuiltinTemplateIdType(), CheckPlaceholderExpr(), FindInstantiatedDecl(), getStdTrait(), lookupCoroutineHandleType(), and lookupPromiseType().
| 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.
| NewParams | Template parameter list for a new template declaration. This template parameter list will be updated with any default arguments that are carried through from the previous template parameter list. |
| OldParams | If provided, template parameter list from a previous declaration of the same template. Default template arguments will be merged from the old template parameter list to the new template parameter list. |
| TPC | Describes the context in which we are checking the given template parameter list. |
| SkipBody | If we might have already made a prior merged definition of this template visible, the corresponding body-skipping information. Default argument redefinition is not an error when skipping such a body, because (under the ODR) we can assume the default arguments are the same as the prior merged definition. |
Definition at line 2410 of file SemaTemplate.cpp.
References clang::TemplateParameterList::begin(), clang::cast(), Context, clang::SemaBase::Diag(), DiagnoseDefaultTemplateArgument(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TemplateParameterList::end(), getASTContext(), clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::NonTypeTemplateParmDecl::getDefaultArgumentLoc(), clang::TemplateTypeParmDecl::getDefaultArgumentLoc(), clang::Module::getFullModuleName(), clang::Decl::getImportedOwningModule(), clang::Decl::getLocation(), clang::TemplateArgumentLoc::getLocation(), clang::Decl::getOwningModule(), clang::TemplateArgumentLoc::getSourceRange(), clang::NonTypeTemplateParmDecl::hasDefaultArgument(), clang::TemplateTemplateParmDecl::hasDefaultArgument(), clang::TemplateTypeParmDecl::hasDefaultArgument(), hasVisibleDefaultArgument(), clang::Invalid, clang::TemplateTemplateParmDecl::isPackExpansion(), clang::TemplateTemplateParmDecl::isParameterPack(), clang::TemplateTemplateParmDecl::removeDefaultArgument(), clang::TemplateTemplateParmDecl::setInheritedDefaultArgument(), clang::SkipBodyInfo::ShouldSkip, TPC_FriendClassTemplate, TPC_Other, TPC_TemplateTemplateParameterPack, and UPPC_NonTypeTemplateParameterType.
Referenced by ActOnAliasDeclaration(), ActOnFunctionDeclarator(), ActOnTemplateTemplateParameter(), ActOnVariableDeclarator(), CheckClassTemplate(), and MatchTemplateParametersToScopeSpecifier().
| void Sema::CheckTemplatePartialSpecialization | ( | ClassTemplatePartialSpecializationDecl * | Partial | ) |
Definition at line 4299 of file SemaTemplate.cpp.
References checkTemplatePartialSpecialization().
Referenced by ActOnClassTemplateSpecialization(), and ActOnVarTemplateSpecialization().
| void Sema::CheckTemplatePartialSpecialization | ( | VarTemplatePartialSpecializationDecl * | Partial | ) |
Definition at line 4304 of file SemaTemplate.cpp.
References checkTemplatePartialSpecialization().
| bool Sema::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.
| TemplateNameLoc | the location of the template name. |
| PrimaryTemplate | the template parameters of the primary class template. |
| NumExplicit | the number of explicitly-specified template arguments. |
| TemplateArgs | the template arguments of the class template partial specialization. |
true if there was an error, false otherwise. Definition at line 8705 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(), and ActOnVarTemplateSpecialization().
| bool Sema::CheckTemplateTemplateArgument | ( | TemplateTemplateParmDecl * | Param, |
| TemplateParameterList * | Params, | ||
| TemplateArgumentLoc & | Arg, | ||
| bool | PartialOrdering, | ||
| bool * | StrictPackMatch ) |
Check a template argument against its corresponding template template parameter.
This routine implements the semantics of C++ [temp.arg.template]. It returns true if an error occurred, and false otherwise.
Definition at line 7814 of file SemaTemplate.cpp.
References CheckDeclCompatibleWithTemplateTemplate(), clang::SemaBase::Diag(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateParameterList::getAssociatedConstraints(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgumentLoc::getLocation(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateName::getTemplateDeclAndDefaultArgs(), IsAtLeastAsConstrained(), clang::TemplateName::isDependent(), isTemplateTemplateParameterAtLeastAsSpecializedAs(), MaybeEmitAmbiguousAtomicConstraintsDiagnostic(), clang::PartialOrdering, and clang::Template.
Referenced by CheckTemplateArgument().
| bool Sema::CheckTemplateTypeArgument | ( | TemplateTypeParmDecl * | Param, |
| TemplateArgumentLoc & | Arg, | ||
| SmallVectorImpl< TemplateArgument > & | SugaredConverted, | ||
| SmallVectorImpl< TemplateArgument > & | CanonicalConverted ) |
Definition at line 5154 of file SemaTemplate.cpp.
References clang::CXXScopeSpec::Adopt(), clang::Sema::CodeSynthesisContext::BuildingDeductionGuides, CheckTemplateArgument(), CodeSynthesisContexts, Context, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), diagnoseMissingTemplateArguments(), clang::TemplateArgument::Expression, clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getAsExpr(), clang::DeclarationName::getAsIdentifierInfo(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::TemplateArgument::getKind(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getScopeRep(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), inParameterMappingSubstitution(), LookupOrdinaryName, LookupParsedName(), clang::None, NoteTemplateParameterLocation(), 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, and clang::TemplateArgument::Type.
Referenced by CheckTemplateArgument().
| bool Sema::checkThisInStaticMemberFunctionAttributes | ( | CXXMethodDecl * | Method | ) |
Check whether 'this' shows up in the attributes of the given static member function.
Definition at line 19370 of file SemaDeclCXX.cpp.
References clang::Method.
Referenced by ActOnFinishDelayedAttribute(), and checkThisInStaticMemberFunctionType().
| bool Sema::checkThisInStaticMemberFunctionExceptionSpec | ( | CXXMethodDecl * | Method | ) |
Whether this' shows up in the exception specification of a static member function.
Definition at line 19328 of file SemaDeclCXX.cpp.
References clang::EST_BasicNoexcept, clang::EST_DependentNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::EST_MSAny, clang::EST_NoexceptFalse, clang::EST_NoexceptTrue, clang::EST_None, clang::EST_NoThrow, clang::EST_Unevaluated, clang::EST_Uninstantiated, clang::EST_Unparsed, clang::FunctionProtoType::exceptions(), clang::TypeLoc::getAs(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getNoexceptExpr(), clang::TypeSourceInfo::getTypeLoc(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), and clang::Method.
Referenced by actOnDelayedExceptionSpecification(), and checkThisInStaticMemberFunctionType().
| bool Sema::checkThisInStaticMemberFunctionType | ( | CXXMethodDecl * | Method | ) |
Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-qualifier-seq would be.
Definition at line 19291 of file SemaDeclCXX.cpp.
References checkThisInStaticMemberFunctionAttributes(), checkThisInStaticMemberFunctionExceptionSpec(), clang::TypeLoc::getAs(), clang::FunctionTypeLoc::getReturnLoc(), clang::TypeSourceInfo::getTypeLoc(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), clang::FunctionProtoType::hasTrailingReturn(), and clang::Method.
Referenced by CheckFunctionDeclaration().
| void Sema::CheckThreadLocalForLargeAlignment | ( | VarDecl * | VD | ) |
Definition at line 15159 of file SemaDecl.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::CharUnits::getQuantity(), clang::VarDecl::getTLSKind(), and clang::VarDecl::hasDependentAlignment().
Referenced by FinalizeDeclaration().
| AssignConvertType Sema::CheckTransparentUnionArgumentConstraints | ( | QualType | ArgType, |
| ExprResult & | RHS ) |
Definition at line 9854 of file SemaExpr.cpp.
References clang::Type::castAs(), CheckAssignmentConstraints(), clang::Compatible, ConstructTransparentUnion(), Context, clang::RecordDecl::fields(), clang::ActionResult< PtrTy, Compress >::get(), clang::PointerType::getPointeeType(), clang::Expr::getType(), clang::Decl::hasAttr(), ImpCastExprToType(), clang::Incompatible, clang::Expr::isNullPointerConstant(), clang::Type::isPointerType(), clang::Type::isVoidType(), and clang::Expr::NPC_ValueDependentIsNull.
Referenced by clang::InitializationSequence::Perform(), and PerformImplicitConversion().
| bool Sema::CheckTypeConstraint | ( | TemplateIdAnnotation * | TypeConstraint | ) |
Definition at line 1113 of file SemaTemplate.cpp.
References clang::cast(), CheckConceptUseInDefinition(), clang::SemaBase::Diag(), clang::OpaquePtr< PtrTy >::get(), clang::TemplateName::getAsTemplateDecl(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::Template, and clang::TemplateIdAnnotation::TemplateNameLoc.
Referenced by BuildTypeConstraint().
| void Sema::checkTypeDeclType | ( | DeclContext * | LookupCtx, |
| DiagCtorKind | DCK, | ||
| TypeDecl * | TD, | ||
| SourceLocation | NameLoc ) |
Returns the TypeDeclType for the given type declaration, as ASTContext::getTypeDeclType would, but performs the required semantic checks for name lookup of said entity.
Definition at line 147 of file SemaDecl.cpp.
References clang::cast(), clang::declaresSameEntity(), clang::SemaBase::Diag(), DiagnoseUseOfDecl(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), MarkAnyDeclReferenced(), None, and Typename.
Referenced by CheckTypenameType(), and getTypeName().
| void Sema::CheckTypedefForVariablyModifiedType | ( | Scope * | S, |
| TypedefNameDecl * | D ) |
Definition at line 6902 of file SemaDecl.cpp.
References Context, clang::SemaBase::Diag(), clang::Scope::getFnParent(), clang::Decl::getLocation(), clang::TypeSourceInfo::getType(), clang::TypedefNameDecl::getTypeSourceInfo(), setFunctionHasBranchProtectedScope(), clang::Decl::setInvalidDecl(), clang::TypedefNameDecl::setTypeSourceInfo(), clang::T, toString(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().
Referenced by ActOnAliasDeclaration(), and ActOnTypedefDeclarator().
| QualType Sema::CheckTypenameType | ( | ElaboratedTypeKeyword | Keyword, |
| SourceLocation | KeywordLoc, | ||
| NestedNameSpecifierLoc | QualifierLoc, | ||
| const IdentifierInfo & | II, | ||
| SourceLocation | IILoc, | ||
| bool | DeducedTSTContext = true ) |
Build the type that describes a C++ typename specifier, e.g., "typename T::type".
Definition at line 11253 of file SemaTemplate.cpp.
References clang::CXXScopeSpec::Adopt(), clang::Ambiguous, checkTypeDeclType(), computeDeclContext(), clang::Cond, Context, clang::CPlusPlus17, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), findFailedBooleanCondition(), clang::Found, clang::FoundOverloaded, clang::FoundUnresolvedValue, clang::getAsTypeTemplateDecl(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getBeginLoc(), clang::Expr::getExprLoc(), getLangOpts(), clang::Decl::getLocation(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), clang::Stmt::getSourceRange(), getTemplateNameKindForDiagnostics(), clang::isa(), clang::NestedNameSpecifier::isDependent(), isEnableIf(), clang::SourceLocation::isValid(), clang::Keyword, LookupName(), LookupOrdinaryName, LookupQualifiedName(), clang::None, None, NoteTemplateLocation(), clang::NotFound, clang::NotFoundInCurrentInstantiation, RequireCompleteDeclContext(), clang::Result, clang::TemplateName, clang::NestedNameSpecifier::Type, clang::Typename, and Typename.
| QualType Sema::CheckTypenameType | ( | ElaboratedTypeKeyword | Keyword, |
| SourceLocation | KeywordLoc, | ||
| NestedNameSpecifierLoc | QualifierLoc, | ||
| const IdentifierInfo & | II, | ||
| SourceLocation | IILoc, | ||
| TypeSourceInfo ** | TSI, | ||
| bool | DeducedTSTContext ) |
Definition at line 11208 of file SemaTemplate.cpp.
References CheckTypenameType(), Context, clang::TypeLocBuilder::getTypeSourceInfo(), clang::isa(), clang::Keyword, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), clang::TypeSpecTypeLoc::setNameLoc(), and clang::T.
Referenced by ActOnTemplatedFriendTag(), ActOnTypenameType(), ActOnTypeRequirement(), BuildMemInitializer(), CheckTypenameType(), getDestructorName(), and getTypeName().
| 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 2127 of file Sema.cpp.
References ARM(), clang::C, clang::cast(), Context, clang::SemaBase::Diag(), clang::Type::getAs(), clang::QualType::getCanonicalType(), getCurLexicalContext(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::TargetInfo::hasFPReturn(), clang::TargetInfo::hasLongDoubleType(), clang::TargetInfo::hasRISCVVTypes(), clang::isa(), clang::IsArmStreamingFunction(), 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::SemaBase::PDiag(), RISCV(), clang::FunctionType::SME_PStateSMCompatibleMask, clang::SveFixedLengthData, clang::SveFixedLengthPredicate, SYCL(), and targetDiag().
Referenced by ActOnFinishFunctionBody(), CreateBuiltinBinOp(), and DiagnoseUseOfDecl().
| bool Sema::CheckTypeTraitArity | ( | unsigned | Arity, |
| SourceLocation | Loc, | ||
| size_t | N ) |
Definition at line 1424 of file SemaTypeTraits.cpp.
References clang::SemaBase::Diag().
Referenced by BuildTypeTrait().
|
inline |
If Expr is a valid integer constant, get the value of the integer expression and return success or failure.
May output an error.
Negative argument is implicitly converted to unsigned, unless StrictlyUnsigned is true.
Definition at line 4860 of file Sema.h.
References clang::AANT_ArgumentIntegerConstant, Context, clang::SemaBase::Diag(), getAttrLoc(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::Expr::isTypeDependent(), toString(), and UINT_MAX.
Referenced by clang::checkAMDGPUFlatWorkGroupSizeArguments(), clang::checkAMDGPUMaxNumWorkGroupsArguments(), clang::checkAMDGPUWavesPerEUArguments(), CheckCallingConvAttr(), checkPositiveIntArgument(), CheckRegparmAttr(), handleCallbackAttr(), handleCallConvAttr(), handleDiagnoseAsBuiltinAttr(), handleFormatAttr(), handleFormatAttrCommon(), handleInitPriorityAttr(), handleLayoutVersion(), handleMinVectorWidthAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handleVTablePointerAuthentication(), and sharedGetConstructorDestructorAttrExpr().
| bool Sema::CheckUnaryExprOrTypeTraitOperand | ( | Expr * | E, |
| UnaryExprOrTypeTrait | ExprKind ) |
Check the constraints on expression operands to unary type expression and type traits.
Completes any types necessary and validates the constraints on the operand expression. The logic mostly mirrors the type-based overload, but may modify the expression as it completes the type for that expression through template instantiation, etc.
Definition at line 4283 of file SemaExpr.cpp.
References CheckExtensionTraitOperandType(), CheckObjCTraitOperandConstraints(), CheckUnevaluatedOperand(), CheckVecStepTraitOperandType(), CheckVectorElementsTraitOperandType(), Context, clang::SemaBase::Diag(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::getTraitSpelling(), clang::Expr::getType(), clang::Expr::HasSideEffects(), clang::Expr::IgnoreParens(), inTemplateInstantiation(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::Expr::isInstantiationDependent(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::Type::isVariableArrayType(), clang::Type::isWebAssemblyTableType(), RequireCompleteSizedExprType(), RequireCompleteSizedType(), clang::Result, and warnOnSizeofOnArrayDecay().
Referenced by CheckAlignasTypeArgument(), CheckAlignOfExpr(), CheckVecStepExpr(), CreateUnaryExprOrTypeTraitExpr(), and CreateUnaryExprOrTypeTraitExpr().
| 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 4591 of file SemaExpr.cpp.
References clang::C2y, captureVariablyModifiedType(), CheckExtensionTraitOperandType(), CheckObjCTraitOperandConstraints(), checkPtrAuthTypeDiscriminatorOperandType(), CheckVecStepTraitOperandType(), CheckVectorElementsTraitOperandType(), clang::DeclContext::containsDecl(), Context, clang::CPlusPlus, clang::SemaBase::Diag(), FunctionScopes, clang::Type::getAs(), getLangOpts(), clang::Type::getPointeeType(), clang::getTraitSpelling(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isIncompleteArrayType(), clang::Type::isVariablyModifiedType(), clang::Type::isWebAssemblyTableType(), and RequireCompleteSizedType().
| ExprResult Sema::CheckUnevaluatedOperand | ( | Expr * | E | ) |
Definition at line 7518 of file SemaExprCXX.cpp.
References CheckUnusedVolatileAssignment().
Referenced by ActOnDecltypeExpression(), BuildCXXNoexceptExpr(), BuildCXXTypeId(), and CheckUnaryExprOrTypeTraitOperand().
| ExprResult Sema::checkUnknownAnyArg | ( | SourceLocation | callLoc, |
| Expr * | result, | ||
| QualType & | paramType ) |
Type-check an expression that's being passed to an __unknown_anytype parameter.
Definition at line 21443 of file SemaExpr.cpp.
References Context, DefaultArgumentPromotion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and PerformCopyInitialization().
Referenced by GatherArgumentsForCall().
| 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 21419 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().
| Sema::AccessResult Sema::CheckUnresolvedLookupAccess | ( | UnresolvedLookupExpr * | E, |
| DeclAccessPair | FoundDecl ) |
Definition at line 1569 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, CheckAccess(), Context, clang::Found, getLangOpts(), clang::OverloadExpr::getNameLoc(), clang::UnresolvedLookupExpr::getNamingClass(), and clang::Stmt::getSourceRange().
Referenced by FinishOverloadedCallExpr(), and FixOverloadedFunctionReference().
| Sema::AccessResult Sema::CheckUnresolvedMemberAccess | ( | UnresolvedMemberExpr * | E, |
| DeclAccessPair | FoundDecl ) |
Perform access-control checking on a previously-unresolved member access which has now been resolved to a member.
Definition at line 1583 of file SemaAccess.cpp.
References AR_accessible, clang::AS_public, clang::Type::castAs(), CheckAccess(), Context, clang::Found, clang::UnresolvedMemberExpr::getBaseType(), getLangOpts(), clang::UnresolvedMemberExpr::getMemberLoc(), clang::UnresolvedMemberExpr::getNamingClass(), getPointeeType(), clang::Stmt::getSourceRange(), and clang::UnresolvedMemberExpr::isArrow().
Referenced by BuildCallToMemberFunction().
| 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 15512 of file SemaChecking.cpp.
References checkUnsafeAssignObject(), clang::QualType::getObjCLifetime(), clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Weak.
Referenced by AddInitializerToDecl(), and checkUnsafeExprAssigns().
| void Sema::checkUnsafeExprAssigns | ( | SourceLocation | Loc, |
| Expr * | LHS, | ||
| Expr * | RHS ) |
checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expression.
Definition at line 15525 of file SemaChecking.cpp.
References clang::cast(), checkUnsafeAssignObject(), checkUnsafeAssigns(), clang::SemaBase::Diag(), Diags, getCurFunction(), clang::ObjCPropertyRefExpr::getExplicitProperty(), clang::QualType::getObjCLifetime(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyDecl::getPropertyAttributesAsWritten(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ObjCPropertyDecl::getType(), clang::Expr::IgnoreParens(), clang::ObjCPropertyRefExpr::isImplicitProperty(), clang::QualType::isNull(), clang::Type::isObjCRetainableType(), clang::ObjCPropertyAttribute::kind_assign, clang::ObjCPropertyAttribute::kind_weak, clang::sema::FunctionScopeInfo::markSafeWeakUse(), clang::Qualifiers::OCL_None, and clang::Qualifiers::OCL_Weak.
Referenced by CheckAssignmentOperands().
| 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 8304 of file SemaDeclAttr.cpp.
References checkUnusedDeclAttributes(), clang::Declarator::getAttributes(), clang::DeclSpec::getAttributes(), clang::DeclaratorChunk::getAttrs(), clang::Declarator::getDeclarationAttributes(), clang::Declarator::getDeclSpec(), clang::Declarator::getNumTypeObjects(), and clang::Declarator::getTypeObject().
Referenced by ActOnCastExpr(), ActOnTypeName(), and checkUnusedDeclAttributes().
| 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 17970 of file SemaExpr.cpp.
References clang::CPlusPlus20, ExprEvalContexts, getLangOpts(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), and clang::QualType::isVolatileQualified().
Referenced by CheckUnevaluatedOperand(), and IgnoredValueConversions().
| bool Sema::CheckUseOfCXXMethodAsAddressOfOperand | ( | SourceLocation | OpLoc, |
| const Expr * | Op, | ||
| const CXXMethodDecl * | MD ) |
Definition at line 14636 of file SemaExpr.cpp.
References clang::cast(), clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::NamedDecl::getName(), clang::CXXMethodDecl::getParent(), clang::Stmt::getSourceRange(), clang::Expr::IgnoreParens(), and clang::isa().
Referenced by CheckAddressOfOperand(), and FixOverloadedFunctionReference().
| 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 13529 of file SemaDeclCXX.cpp.
References clang::cast(), computeDeclContext(), clang::CPlusPlus11, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), CurContext, Diag(), clang::LookupResult::getAsSingle(), clang::DeclarationName::getAsString(), 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().
| bool Sema::CheckUsingDeclRedeclaration | ( | SourceLocation | UsingLoc, |
| bool | HasTypenameKeyword, | ||
| const CXXScopeSpec & | SS, | ||
| SourceLocation | NameLoc, | ||
| const LookupResult & | Previous ) |
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 13458 of file SemaDeclCXX.cpp.
References CurContext, Diag(), clang::NestedNameSpecifier::getCanonical(), clang::Decl::getLocation(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::isa(), and clang::NestedNameSpecifier::isDependent().
Referenced by BuildUsingDeclaration().
| bool Sema::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.
Definition at line 12743 of file SemaDeclCXX.cpp.
References clang::cast(), CheckOverload(), Context, clang::CPlusPlus11, CurContext, Diag(), DiagnoseClassNameShadow(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), clang::DeclContext::getParent(), clang::isa(), clang::RecordDecl::isAnonymousStructOrUnion(), IsEquivalentForUsingDecl(), isEquivalentInternalLinkageDeclaration(), clang::CXXRecordDecl::isInjectedClassName(), isProvablyNotDerivedFrom(), isVisible(), clang::Match, clang::NonFunction, clang::Overload, Previous, clang::Decl::setInvalidDecl(), and clang::Target.
Referenced by BuildUsingDeclaration(), and BuildUsingEnumDeclaration().
We've just determined that Old and New both appear to be definitions of the same variable.
Either diagnose or fix the problem.
Definition at line 4972 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), clang::VarDecl::getDescribedVarTemplate(), hasVisibleDefinition(), clang::Internal, clang::isa(), makeMergedDefinitionVisible(), New, and notePreviousDefinition().
Referenced by AddInitializerToDecl(), and MergeVarDecl().
| 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 9199 of file SemaDecl.cpp.
References checkForConflictWithNonVisibleExternC(), CheckVariableDeclarationType(), clang::Decl::isInvalidDecl(), MergeVarDecl(), and Previous.
Referenced by ActOnVariableDeclarator(), and BuildVariableInstantiation().
| void Sema::CheckVariableDeclarationType | ( | VarDecl * | NewVD | ) |
Definition at line 8884 of file SemaDecl.cpp.
References ARM(), clang::C23, clang::cast(), CheckAlignasUnderalignment(), CheckC23ConstexprVarType(), clang::SemaRISCV::checkRVVTypeSupport(), Context, clang::CPlusPlus, clang::FixItHint::CreateInsertion(), CurContext, clang::Default, clang::SemaBase::Diag(), diagnoseOpenCLTypes(), getASTContext(), getCurFunctionDecl(), getCurScope(), getLangOpts(), clang::Decl::getLocation(), getOpenCLOptions(), clang::VariableArrayType::getSizeExpr(), clang::Stmt::getSourceRange(), clang::VarDecl::getStorageClass(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasGlobalStorage(), clang::NamedDecl::hasLinkage(), clang::VarDecl::hasLocalStorage(), clang::HIP, clang::isa(), clang::OpenCLOptions::isAvailableOption(), clang::VarDecl::isConstexpr(), clang::VarDecl::isFileVarDecl(), clang::Decl::isInvalidDecl(), clang::VarDecl::isLocalVarDecl(), clang::QualType::isNull(), clang::VarDecl::isStaticLocal(), clang::VarDecl::isThisDeclarationADefinition(), LangOpts, clang::LangOptionsBase::NonGC, OpenCL(), clang::opencl_constant, clang::opencl_global, clang::opencl_local, clang::opencl_private, PPC(), RequireLiteralType(), RISCV(), clang::SC_Static, setFunctionHasBranchProtectedScope(), clang::Decl::setInvalidDecl(), clang::ValueDecl::setType(), clang::DeclaratorDecl::setTypeSourceInfo(), clang::T, TryToFixInvalidVariablyModifiedType(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().
Referenced by buildCoroutinePromise(), CheckVariableDeclaration(), and DeduceVariableDeclarationType().
| void Sema::checkVariadicArgument | ( | const Expr * | E, |
| VariadicCallType | CT ) |
Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic if not.
Definition at line 1014 of file SemaExpr.cpp.
References clang::CPlusPlus11, clang::SemaBase::Diag(), DiagRuntimeBehavior(), clang::QualType::DK_nontrivial_c_struct, clang::Stmt::getBeginLoc(), getLangOpts(), clang::Expr::getType(), hasCStrMethod(), clang::Invalid, clang::isa(), clang::QualType::isDestructedType(), clang::Type::isObjCObjectType(), clang::Type::isRecordType(), isValidVarArgType(), clang::MSVCUndefined, clang::SemaBase::PDiag(), clang::Undefined, clang::Valid, and clang::ValidInCXX11.
Referenced by checkCall().
| ExprResult Sema::CheckVarOrConceptTemplateTemplateId | ( | const CXXScopeSpec & | SS, |
| const DeclarationNameInfo & | NameInfo, | ||
| TemplateTemplateParmDecl * | Template, | ||
| SourceLocation | TemplateLoc, | ||
| const TemplateArgumentListInfo * | TemplateArgs ) |
Definition at line 4802 of file SemaTemplate.cpp.
References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::begin(), CheckTemplateArgumentList(), clang::UnresolvedLookupExpr::Create(), clang::UnresolvedSetImpl::end(), getASTContext(), clang::CXXScopeSpec::getWithLocInContext(), clang::Template, clang::TNK_Concept_template, and clang::TNK_Var_template.
Referenced by BuildTemplateIdExpr(), and formImmediatelyDeclaredConstraint().
| 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 4780 of file SemaTemplate.cpp.
References BuildDeclarationNameExpr(), clang::cast(), CheckVarTemplateId(), clang::ExprError(), clang::DeclarationNameInfo::getLoc(), clang::VarDecl::getTemplateSpecializationKind(), clang::VarDecl::setTemplateSpecializationKind(), clang::Template, and clang::TSK_ImplicitInstantiation.
| DeclResult Sema::CheckVarTemplateId | ( | VarTemplateDecl * | Template, |
| SourceLocation | TemplateLoc, | ||
| SourceLocation | TemplateNameLoc, | ||
| const TemplateArgumentListInfo & | TemplateArgs, | ||
| bool | SetWrittenArgs ) |
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.
Definition at line 4563 of file SemaTemplate.cpp.
References clang::TemplateSpecCandidateSet::addCandidate(), clang::AS_public, BuildVarTemplateInstantiation(), clang::Sema::CheckTemplateArgumentInfo::CanonicalConverted, checkSpecializationReachability(), CheckTemplateArgumentList(), Context, DeduceTemplateArguments(), clang::SemaBase::Diag(), clang::TemplateSpecCandidateSet::getLocation(), getMoreSpecializedPartialSpecialization(), getTemplateArgumentBindingsText(), clang::ValueDecl::getType(), clang::DeclAccessPair::make(), clang::MakeDeductionFailureInfo(), ParsingInitForAutoVars, PP, clang::Result, clang::TemplateSpecCandidate::set(), clang::Decl::setInvalidDecl(), clang::Success, clang::Sema::CheckTemplateArgumentInfo::SugaredConverted, clang::sema::TemplateDeductionInfo::takeSugared(), and clang::Template.
Referenced by ActOnExplicitInstantiation(), BuildMemberReferenceExpr(), BuildTemplateIdExpr(), and CheckVarTemplateId().
Definition at line 4461 of file SemaExpr.cpp.
References CheckUnaryExprOrTypeTraitOperand(), clang::Expr::IgnoreParens(), and clang::Expr::isTypeDependent().
Referenced by CreateUnaryExprOrTypeTraitExpr().
| bool Sema::CheckVectorCast | ( | SourceRange | R, |
| QualType | VectorTy, | ||
| QualType | Ty, | ||
| CastKind & | Kind ) |
Definition at line 7841 of file SemaExpr.cpp.
References areLaxCompatibleVectorTypes(), Context, clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::Type::isIntegralType(), and clang::Type::isVectorType().
| QualType Sema::CheckVectorCompareOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc ) |
CheckVectorCompareOperands - vector comparisons are a clang extension that operates on extended vector types.
Instead of producing an IntTy result, like a scalar comparison, a vector comparison produces a vector of integer types.
Definition at line 13189 of file SemaExpr.cpp.
References clang::AltiVecVector, clang::Type::castAs(), CheckFloatComparison(), CheckVectorOperands(), Context, clang::SemaBase::Diag(), diagnoseTautologicalComparison(), clang::LangOptionsBase::GCC, clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), GetSignedVectorType(), clang::Expr::getType(), clang::VectorType::getVectorKind(), clang::Type::hasFloatingRepresentation(), clang::QualType::isNull(), clang::LangOptionsBase::Mixed, and clang::LangOptionsBase::XL.
Referenced by CheckCompareOperands().
| QualType Sema::CheckVectorConditionalTypes | ( | ExprResult & | Cond, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS, | ||
| SourceLocation | QuestionLoc ) |
Definition at line 5709 of file SemaExprCXX.cpp.
References clang::Type::castAs(), CheckSizelessVectorOperands(), CheckVectorOperands(), clang::Cond, clang::Conditional, Context, DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), clang::ASTContext::BuiltinVectorTypeInfo::EC, clang::ASTContext::BuiltinVectorTypeInfo::ElementType, clang::Generic, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), ImpCastExprToType(), clang::Type::isEnumeralType(), clang::Type::isExtVectorType(), clang::QualType::isNull(), clang::Type::isSizelessVectorType(), clang::Type::isVectorType(), LangOpts, and UsualArithmeticConversions().
Referenced by CXXCheckConditionalOperands().
| QualType Sema::CheckVectorLogicalOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc ) |
Definition at line 13413 of file SemaExpr.cpp.
References CheckVectorOperands(), clang::CPlusPlus, clang::SemaHLSL::emitLogicalOperatorFixIt(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), getLangOpts(), GetSignedVectorType(), clang::Expr::getType(), clang::Type::hasFloatingRepresentation(), HLSL(), clang::LangOptionsBase::HLSL_2021, InvalidLogicalVectorOperands(), InvalidOperands(), clang::isa(), clang::QualType::isNull(), and OpenCL().
Referenced by CheckLogicalOperands().
| 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 10457 of file SemaExpr.cpp.
References clang::AltiVecBool, clang::AltiVecVector, anyAltivecTypes(), Context, DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), clang::Generic, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::VectorType::getElementType(), getLangOpts(), clang::VectorType::getNumElements(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::VectorType::getVectorKind(), clang::SemaHLSL::handleVectorBinOpConversion(), HLSL(), ImpCastExprToType(), InvalidOperands(), clang::isa(), clang::Type::isExtVectorBoolType(), clang::Type::isExtVectorType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isLaxVectorConversion(), clang::Expr::isLValue(), clang::Type::isMFloat8Type(), clang::Type::isRealType(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isScalarType(), clang::Type::isSizelessBuiltinType(), clang::Type::isSVESizelessBuiltinType(), clang::Type::isVectorType(), OpenCL(), clang::RVVFixedLengthData, clang::RVVFixedLengthMask, clang::RVVFixedLengthMask_1, clang::RVVFixedLengthMask_2, clang::RVVFixedLengthMask_4, clang::SveFixedLengthData, clang::SveFixedLengthPredicate, tryGCCVectorConvertAndSplat(), tryVectorConvertAndSplat(), and clang::Vector.
Referenced by CheckAdditionOperands(), CheckBitwiseOperands(), CheckConditionalOperands(), CheckMultiplyDivideOperands(), CheckRemainderOperands(), CheckSubtractionOperands(), CheckVectorCompareOperands(), CheckVectorConditionalTypes(), CheckVectorLogicalOperands(), CXXCheckConditionalOperands(), and OpenCLCheckVectorConditional().
| void Sema::CheckVirtualDtorCall | ( | CXXDestructorDecl * | dtor, |
| SourceLocation | Loc, | ||
| bool | IsDelete, | ||
| bool | CallCanBeVirtual, | ||
| bool | WarnOnNonAbstractTypes, | ||
| SourceLocation | DtorLoc ) |
Definition at line 4360 of file SemaExprCXX.cpp.
References clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::QualType::getAsStringInternal(), clang::CXXMethodDecl::getFunctionObjectParameterType(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), getPrintingPolicy(), getSourceManager(), clang::Decl::hasAttr(), clang::CXXRecordDecl::isAbstract(), clang::CXXRecordDecl::isPolymorphic(), isUnevaluatedContext(), and clang::CXXMethodDecl::isVirtual().
Referenced by ActOnCXXDelete(), and BuildCallToMemberFunction().
| 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.
| S | The scope in which we're performing name lookup. |
| SS | The nested-name-specifier that precedes the name. |
| Name | The identifier. If typo correction finds an alternative name, this pointer parameter will be updated accordingly. |
| NameLoc | The location of the identifier. |
| NextToken | The token following the identifier. Used to help disambiguate the name. |
| CCC | The correction callback, if typo correction is desired. |
Definition at line 898 of file SemaDecl.cpp.
References clang::Ambiguous, clang::cast(), clang::Class, computeDeclContext(), clang::Sema::NameClassification::Concept(), Context, CorrectTypo(), clang::CPlusPlus, clang::CPlusPlus20, clang::UnresolvedLookupExpr::Create(), CreateParsedType(), clang::Sema::NameClassification::DependentNonType(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::Sema::NameClassification::Error(), clang::ErrorRecovery, FilterAcceptableTemplateNames(), FirstDecl, clang::Found, clang::FoundOverloaded, clang::FoundUnresolvedValue, clang::Sema::NameClassification::FunctionTemplate(), clang::ActionResult< PtrTy, Compress >::get(), getAsTemplateNameDecl(), getCurMethodDecl(), getLangOpts(), clang::DeclarationNameInfo::getName(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::UsingShadowDecl::getTargetDecl(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::CXXScopeSpec::getWithLocInContext(), hasAnyAcceptableTemplateNames(), ImplicitlyDefineFunction(), clang::Token::is(), clang::isa(), isCurrentClassName(), clang::CXXScopeSpec::isEmpty(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CXXScopeSpec::isInvalid(), clang::Token::isNot(), clang::Token::isOneOf(), isResultTypeOrTemplate(), clang::CXXScopeSpec::isSet(), isTagTypeWithMissingTag(), clang::ActionResult< PtrTy, Compress >::isUsable(), LookupBuiltin(), clang::SemaObjC::LookupIvarInObjCMethod(), LookupOrdinaryName, LookupParsedName(), clang::OpaquePtr< QualType >::make(), MarkAnyDeclReferenced(), clang::None, clang::Sema::NameClassification::NonType(), clang::NotFound, clang::NotFoundInCurrentInstantiation, ObjC(), clang::Sema::NameClassification::OverloadSet(), clang::SemaBase::PDiag(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), recoverFromTypeInKnownDependentBase(), clang::Result, clang::TagTypeLoc::setElaboratedKeywordLoc(), clang::TypeSpecTypeLoc::setNameLoc(), clang::T, clang::Template, clang::TemplateName, clang::Sema::NameClassification::TypeTemplate(), clang::Sema::NameClassification::UndeclaredNonType(), clang::Sema::NameClassification::UndeclaredTemplate(), clang::Sema::NameClassification::Unknown(), UseArgumentDependentLookup(), and clang::Sema::NameClassification::VarTemplate().
CleanupMergedEnum - We have just merged the decl 'New' by making another definition visible.
This method performs any necessary cleanup on the parser state to discard child nodes from newly parsed decl we are retiring.
Definition at line 2711 of file SemaDecl.cpp.
References getNonFieldDeclScope(), IdResolver, clang::Scope::isDeclScope(), New, and clang::Scope::RemoveDecl().
Referenced by ActOnDuplicateDefinition(), and MergeTypedefNameDecl().
| void Sema::CleanupVarDeclMarking | ( | ) |
Definition at line 20184 of file SemaExpr.cpp.
References clang::cast(), MarkVarDeclODRUsed(), and MaybeODRUseExprs.
Referenced by ActOnGCCAsmStmt(), InstantiateDefaultCtorDefaultArgs(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), and PopExpressionEvaluationContext().
|
inline |
Definition at line 1443 of file Sema.h.
Referenced by AddRecordMembersCompletionResults(), and ProduceSignatureHelp().
| void Sema::collectUnexpandedParameterPacks | ( | const DeclarationNameInfo & | NameInfo, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded ) |
Collect the set of unexpanded parameter packs within the given name.
| NameInfo | The name that will be traversed to find unexpanded parameter packs. |
Definition at line 696 of file SemaTemplateVariadic.cpp.
|
static |
Collect the set of unexpanded parameter packs within the given expression.
Definition at line 703 of file SemaTemplateVariadic.cpp.
| void Sema::collectUnexpandedParameterPacks | ( | NestedNameSpecifierLoc | NNS, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded ) |
Collect the set of unexpanded parameter packs within the given nested-name-specifier.
| NNS | The nested-name-specifier that will be traversed to find unexpanded parameter packs. |
Definition at line 689 of file SemaTemplateVariadic.cpp.
| void Sema::collectUnexpandedParameterPacks | ( | QualType | T, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded ) |
Collect the set of unexpanded parameter packs within the given type.
| T | The type that will be traversed to find unexpanded parameter packs. |
Definition at line 679 of file SemaTemplateVariadic.cpp.
References clang::T.
| void Sema::collectUnexpandedParameterPacks | ( | TemplateArgument | Arg, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded ) |
Collect the set of unexpanded parameter packs within the given template argument.
| Arg | The template argument that will be traversed to find unexpanded parameter packs. |
Definition at line 667 of file SemaTemplateVariadic.cpp.
Referenced by clang::FoldExpandedConstraint::AreCompatibleForSubsumption(), CheckTemplateArgumentList(), collectUnexpandedParameterPacks(), instantiateDependentAlignedAttr(), InstantiateMemInitializers(), and PreparePackForExpansion().
| void Sema::collectUnexpandedParameterPacks | ( | TemplateArgumentLoc | Arg, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded ) |
Collect the set of unexpanded parameter packs within the given template argument.
| Arg | The template argument that will be traversed to find unexpanded parameter packs. |
Definition at line 673 of file SemaTemplateVariadic.cpp.
| void Sema::collectUnexpandedParameterPacks | ( | TypeLoc | TL, |
| SmallVectorImpl< UnexpandedParameterPack > & | Unexpanded ) |
Collect the set of unexpanded parameter packs within the given type.
| TL | The type that will be traversed to find unexpanded parameter packs. |
Definition at line 684 of file SemaTemplateVariadic.cpp.
| Sema::ReferenceCompareResult Sema::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).
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 5131 of file SemaOverload.cpp.
References Context, getASTContext(), isCompleteType(), IsDerivedFrom(), IsFunctionConversion(), clang::Type::isFunctionType(), clang::Type::isObjCObjectOrInterfaceType(), isQualificationConversionStep(), clang::Type::isReferenceType(), Ref_Compatible, Ref_Incompatible, Ref_Related, and withoutUnaligned().
Referenced by CXXCheckConditionalOperands(), FindConversionForRefInit(), TryListConversion(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), and TryRefInitWithConversionFunction().
| 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.
Definition at line 16413 of file SemaDeclCXX.cpp.
References clang::Constructor, DiagnoseSentinelCalls(), clang::DoesNotApply, GatherArgumentsForCall(), clang::FunctionProtoType::getNumParams(), and clang::Invalid.
Referenced by BuildCXXCastArgument(), CopyObject(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), and PerformImplicitConversion().
| void Sema::completeExprArrayBound | ( | Expr * | E | ) |
Definition at line 9167 of file SemaType.cpp.
References Context, clang::Expr::getExprLoc(), clang::Expr::IgnoreParens(), InstantiateVariableDefinition(), clang::isTemplateInstantiation(), clang::Normal, runWithSufficientStackSpace(), clang::Expr::setType(), clang::T, and clang::TSK_ImplicitInstantiation.
Referenced by getCompletedType().
| void Sema::CompleteLambdaCallOperator | ( | CXXMethodDecl * | Method, |
| SourceLocation | LambdaLoc, | ||
| SourceLocation | CallOperatorLoc, | ||
| const AssociatedConstraint & | TrailingRequiresClause, | ||
| TypeSourceInfo * | MethodTyInfo, | ||
| ConstexprSpecKind | ConstexprKind, | ||
| StorageClass | SC, | ||
| ArrayRef< ParmVarDecl * > | Params, | ||
| bool | HasExplicitResultType ) |
Definition at line 1030 of file SemaLambda.cpp.
References clang::DeclContext::addDecl(), buildLambdaScopeReturnType(), buildTypeForLambdaCallOperator(), CheckParmsForFunctionDef(), getCurrentLambdaScopeUnsafe(), getGenericLambdaTemplateParameterList(), clang::sema::LambdaScopeInfo::Lambda, clang::Method, clang::CXXRecordDecl::setLambdaIsGeneric(), clang::CXXRecordDecl::setLambdaTypeInfo(), and clang::Decl::setLexicalDeclContext().
Referenced by ActOnStartOfLambdaDefinition().
| void Sema::CompleteMemberSpecialization | ( | NamedDecl * | Member, |
| LookupResult & | Previous ) |
Definition at line 10031 of file SemaTemplate.cpp.
References clang::cast(), completeMemberSpecializationImpl(), clang::Enum, clang::Function, clang::Member, and Previous.
Referenced by ActOnFunctionDeclarator(), ActOnTag(), and ActOnVariableDeclarator().
| VarTemplateSpecializationDecl * Sema::CompleteVarTemplateSpecializationDecl | ( | VarTemplateSpecializationDecl * | VarSpec, |
| VarDecl * | PatternDecl, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Instantiates a variable template specialization by completing it with appropriate type information and initializer.
Definition at line 6043 of file SemaTemplateInstantiateDecl.cpp.
References deduceOpenCLAddressSpace(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), InstantiateVariableInitializer(), clang::VarDecl::isThisDeclarationADefinition(), OpenCL(), clang::VarTemplateSpecializationDecl::setCompleteDefinition(), clang::ValueDecl::setType(), and SubstType().
Referenced by InstantiateVariableDefinition().
| DeclContext * Sema::computeDeclContext | ( | const CXXScopeSpec & | SS, |
| bool | EnteringContext = false ) |
Compute the DeclContext that is associated with the given scope specifier.
| SS | the C++ scope specifier as it appears in the source |
| EnteringContext | when true, we will be entering the context of this scope specifier, so we can retrieve the declaration context of a class template or class template partial specialization even if it is not the current instantiation. |
SS, or NULL if the declaration context cannot be computed (e.g., because it is dependent and not the current instantiation). Definition at line 48 of file SemaCXXScopeSpec.cpp.
References clang::Type::castAsTagDecl(), ClassTemplate, Context, diagnoseMissingImport(), clang::NestedNameSpecifier::getAsMicrosoftSuper(), clang::NestedNameSpecifier::getAsNamespaceAndPrefix(), clang::NestedNameSpecifier::getAsType(), getCurrentInstantiationOf(), clang::TemplateParameterList::getDepth(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::getTemplateParamLists(), clang::NestedNameSpecifier::Global, clang::CXXRecordDecl::hasDefinition(), hasReachableDefinition(), clang::NestedNameSpecifier::isDependent(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isSet(), isSFINAEContext(), clang::NestedNameSpecifier::MicrosoftSuper, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::Null, PartialSpecialization, and clang::NestedNameSpecifier::Type.
| DeclContext * Sema::computeDeclContext | ( | QualType | T | ) |
Compute the DeclContext that is associated with the given type.
| T | the type for which we are attempting to find a DeclContext. |
Definition at line 41 of file SemaCXXScopeSpec.cpp.
References CurContext, and clang::T.
Referenced by ActOnCXXEnterDeclaratorScope(), ActOnCXXExitDeclaratorScope(), ActOnCXXMemberDeclarator(), ActOnFriendFunctionDecl(), ActOnPseudoDestructorExpr(), ActOnTag(), ActOnTemplateIdType(), ActOnTemplateName(), ActOnTypenameType(), ActOnVariableDeclarator(), buildCoroutineHandle(), BuildCXXNestedNameSpecifier(), BuildMemberPointerType(), BuildMemberReferenceExpr(), BuildMemInitializer(), BuildQualifiedDeclarationNameExpr(), BuildQualifiedTemplateIdExpr(), BuildUsingDeclaration(), CheckBaseSpecifier(), CheckClassTemplate(), CheckExplicitObjectMemberFunction(), CheckQualifiedMemberReference(), CheckTypenameType(), CheckUsingDeclQualifier(), ClassifyName(), DiagnoseEmptyLookup(), DiagnoseUnknownTemplateName(), DiagnoseUnknownTypeName(), getCurrentClass(), getDestructorName(), GetFullTypeForDeclarator(), getTypeName(), HandleDeclarator(), isCurrentClassNameTypo(), isDeclaratorFunctionLike(), LookupParsedName(), LookupTemplateName(), MatchTemplateParametersToScopeSpecifier(), and TryNamespaceTypoCorrection().
| 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 16366 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), and clang::ReturnStmt::setNRVOCandidate().
Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().
|
inlinestatic |
Definition at line 7846 of file Sema.h.
Referenced by ActOnCondition(), ActOnConditionVariable(), and clang::TreeTransform< Derived >::TransformCondition().
| 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 503 of file SemaAttr.cpp.
References clang::AANT_ArgumentConstantExpr, Context, clang::ConstantExpr::Create(), clang::ImplicitCastExpr::Create(), clang::Expr::EvalStatus::Diag, clang::SemaBase::Diag(), clang::Expr::EvaluateAsConstantExpr(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::QualType::getNonReferenceType(), clang::Expr::getType(), 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 CreateAnnotationAttr(), and HandleAnnotateTypeAttr().
| bool Sema::ConstraintExpressionDependsOnEnclosingTemplate | ( | const FunctionDecl * | Friend, |
| unsigned | TemplateDepth, | ||
| const Expr * | Constraint ) |
Definition at line 1849 of file SemaTemplate.cpp.
References clang::Friend.
Referenced by FriendConstraintsDependOnEnclosingTemplate().
| 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.,
To determine whether we have an (unnamed) function parameter pack or a variadic function.
Definition at line 1136 of file SemaTemplateVariadic.cpp.
References clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::cast(), 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::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::T, 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.
| bool Sema::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.
Call is the call expression itself, and Fn is the function expression. For a C++ member function, this routine does not attempt to convert the object argument. Returns true if the call is ill-formed.
Definition at line 5957 of file SemaExpr.cpp.
References clang::Call, Context, clang::SemaBase::Diag(), diagnoseTypo(), GatherArgumentsForCall(), clang::FunctionDecl::getBuiltinID(), clang::TypoCorrection::getCorrectionRange(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getParametersSourceRange(), getVariadicCallType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), clang::Invalid, isParenthetizedAndQualifiedAddressOfExpr(), clang::FunctionProtoType::isVariadic(), clang::SemaBase::PDiag(), and TryTypoCorrectionForCall().
Referenced by BuildCallToMemberFunction(), and BuildResolvedCallExpr().
| Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup | ( | Decl * | Ptr, |
| Decl * | OwnedType = nullptr ) |
Definition at line 79 of file SemaDecl.cpp.
References Context, clang::DeclGroupRef::Create(), and clang::OpaquePtr< DeclGroupRef >::make().
Referenced by ActOnModuleDecl(), buildCoroutineParameterMoves(), BuildCXXForRangeStmt(), instantiateOMPDeclareSimdDeclAttr(), instantiateOMPDeclareVariantAttr(), and precomputeExpr().
| ExprResult Sema::ConvertMemberDefaultInitExpression | ( | FieldDecl * | FD, |
| Expr * | InitExpr, | ||
| SourceLocation | InitLoc ) |
Definition at line 4172 of file SemaDeclCXX.cpp.
References clang::InitializationKind::CreateCopy(), clang::InitializationKind::CreateDirectList(), clang::Stmt::getBeginLoc(), clang::Stmt::getEndLoc(), clang::FieldDecl::getInClassInitStyle(), clang::ICIS_ListInit, InitializationSequence, clang::InitializedEntity::InitializeMemberFromDefaultMemberInitializer(), and clang::Seq.
Referenced by ActOnFinishCXXInClassMemberInitializer(), and BuildCXXDefaultInitExpr().
| ExprResult Sema::ConvertParamDefaultArgument | ( | ParmVarDecl * | Param, |
| Expr * | DefaultArg, | ||
| SourceLocation | EqualLoc ) |
Definition at line 281 of file SemaDeclCXX.cpp.
References Context, clang::InitializationKind::CreateCopy(), InitializationSequence, clang::InitializedEntity::InitializeParameter(), MaybeCreateExprWithCleanups(), clang::InitializationSequence::Perform(), RequireCompleteType(), and clang::Result.
Referenced by ActOnParamDefaultArgument(), BuildCXXDefaultArgExpr(), and SubstDefaultArgument().
| ExprResult Sema::ConvertVectorExpr | ( | Expr * | E, |
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RParenLoc ) |
ConvertVectorExpr - Handle __builtin_convertvector.
Definition at line 6060 of file SemaChecking.cpp.
References clang::Type::castAs(), Context, clang::ConvertVectorExpr::Create(), CurFPFeatureOverrides(), clang::SemaBase::Diag(), clang::ExprError(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::Type::isDependentType(), clang::Type::isVectorType(), clang::OK_Ordinary, and clang::VK_PRValue.
Referenced by ActOnConvertVectorExpr().
| TypoCorrection Sema::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.
| TypoName | the DeclarationNameInfo structure that contains the name that was present in the source code along with its location. |
| LookupKind | the name-lookup criteria used to search for the name. |
| S | the scope in which name lookup occurs. |
| SS | the nested-name-specifier that precedes the name we're looking for, if present. |
| CCC | A CorrectionCandidateCallback object that provides further validation of typo correction candidates. It also provides flags for determining the set of keywords permitted. |
| MemberContext | if non-NULL, the context in which to look for a member access expression. |
| EnteringContext | whether we're entering the context described by the nested-name-specifier SS. |
| OPT | when non-NULL, the search for visible declarations will also walk the protocols in the qualified interfaces of OPT. |
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 5411 of file SemaLookup.cpp.
References checkCorrectionVisibility(), Consumer, clang::ErrorRecovery, ExternalSource, clang::DeclarationName::getAsIdentifierInfo(), clang::DeclarationName::getAsString(), clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getEditDistance(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::IdentifierInfo::getName(), clang::Result, clang::TypoCorrection::setCorrectionRange(), clang::CorrectionCandidateCallback::WantObjCSuper, and clang::CorrectionCandidateCallback::WantRemainingKeywords.
Referenced by ActOnSizeofParameterPackExpr(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), BuildUsingDeclaration(), ClassifyName(), DiagnoseEmptyLookup(), diagnoseExprIntendedAsTemplateName(), DiagnoseInvalidRedeclaration(), DiagnoseUnknownTypeName(), getTypeName(), ImplicitlyDefineFunction(), LookupMemberExpr(), LookupTemplateName(), resolveAssumedTemplateNameAsType(), TryNamespaceTypoCorrection(), and TryTypoCorrectionForCall().
| Attr * Sema::CreateAnnotationAttr | ( | const AttributeCommonInfo & | CI, |
| StringRef | Annot, | ||
| MutableArrayRef< Expr * > | Args ) |
CreateAnnotationAttr - Creates an annotation Annot with Args arguments.
Definition at line 2940 of file Sema.cpp.
References ConstantFoldAttrArgs(), and Context.
Referenced by CreateAnnotationAttr(), handleAnnotateAttr(), instantiateDependentAnnotationAttr(), and ProcessStmtAttribute().
| Attr * Sema::CreateAnnotationAttr | ( | const ParsedAttr & | AL | ) |
Definition at line 2951 of file Sema.cpp.
References checkStringLiteralArgumentAttr(), CreateAnnotationAttr(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::isArgIdent().
| FunctionDecl * Sema::CreateBuiltin | ( | IdentifierInfo * | II, |
| QualType | Type, | ||
| unsigned | ID, | ||
| SourceLocation | Loc ) |
Definition at line 2367 of file SemaDecl.cpp.
References clang::DeclContext::addDecl(), AddKnownFunctionAttributes(), clang::C, clang::Consteval, Context, clang::CPlusPlus, clang::CPlusPlus20, clang::FunctionDecl::Create(), clang::LinkageSpecDecl::Create(), clang::ParmVarDecl::Create(), getCurFPFeatures(), getLangOpts(), clang::Type::isFunctionProtoType(), New, clang::SC_Extern, clang::SC_None, clang::Decl::setImplicit(), clang::ParmVarDecl::setScopeInfo(), and clang::Unspecified.
Referenced by LazilyCreateBuiltin().
| ExprResult Sema::CreateBuiltinArraySubscriptExpr | ( | Expr * | Base, |
| SourceLocation | LLoc, | ||
| Expr * | Idx, | ||
| SourceLocation | RLoc ) |
Definition at line 5264 of file SemaExpr.cpp.
References clang::SemaObjC::BuildObjCSubscriptExpression(), captureVariablyModifiedType(), clang::Type::castAs(), clang::DeclContext::containsDecl(), Context, clang::CPlusPlus, clang::CPlusPlus11, DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), clang::ExprError(), FunctionScopes, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), getASTContext(), clang::Stmt::getBeginLoc(), getDependentArraySubscriptType(), clang::VectorType::getElementType(), clang::Expr::getIntegerConstantExpr(), getLangOpts(), clang::Type::getPointeeType(), getPointeeType(), 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::Type::isSubscriptableVectorType(), clang::BuiltinType::isSVEBool(), clang::Type::isSveVLSBuiltinType(), clang::Expr::isTypeDependent(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), LangOpts, ObjC(), 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(), CreateOverloadedArraySubscriptExpr(), and clang::InitializationSequence::Perform().
| ExprResult Sema::CreateBuiltinBinOp | ( | SourceLocation | OpLoc, |
| BinaryOperatorKind | Opc, | ||
| Expr * | LHSExpr, | ||
| Expr * | RHSExpr, | ||
| bool | ForFoldExpression = false ) |
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 15238 of file SemaExpr.cpp.
References clang::Assignment, CheckAdditionOperands(), CheckAssignmentOperands(), CheckBitwiseOperands(), CheckCommaOperands(), CheckCompareOperands(), CheckLogicalOperands(), CheckMultiplyDivideOperands(), checkNonTrivialCUnion(), checkObjCPointerIntrospection(), CheckPointerToMemberOperands(), CheckRemainderOperands(), CheckShiftOperands(), CheckSubtractionOperands(), checkTypeSupport(), Context, convertHalfVecBinOp(), clang::CPlusPlus, clang::CPlusPlus11, clang::BinaryOperator::Create(), clang::CompoundAssignOperator::Create(), clang::InitializationKind::CreateDirectList(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), CurFPFeatureOverrides(), clang::SemaBase::Diag(), DiagnoseDirectIsaAccess(), DiagnoseSelfAssignment(), DiagnoseSelfMove(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsCXXRecordDecl(), clang::Stmt::getBeginLoc(), getCurScope(), clang::Stmt::getEndLoc(), clang::Expr::getExprLoc(), getLangOpts(), getLocForEndOfToken(), clang::Expr::getObjectKind(), clang::BinaryOperator::getOpcodeStr(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::QualType::hasNonTrivialToPrimitiveCopyCUnion(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParens(), clang::Init, InitializationSequence, clang::InitializedEntity::InitializeTemporary(), InvalidOperands(), clang::isa(), 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(), NTCUK_Copy, clang::OK_ObjCProperty, clang::OK_Ordinary, OpenCL(), clang::InitializationSequence::Perform(), RecordModifiableNonNullParam(), TUScope, UsualUnaryConversions(), clang::VK_LValue, and clang::VK_PRValue.
Referenced by actOnOMPReductionKindClause(), BuildBinOp(), buildCounterUpdate(), buildPostUpdate(), buildSingleCopyAssignRecursively(), and CreateOverloadedBinOp().
| ExprResult Sema::CreateBuiltinMatrixSingleSubscriptExpr | ( | Expr * | Base, |
| Expr * | RowIdx, | ||
| SourceLocation | RBLoc ) |
Definition at line 5094 of file SemaExpr.cpp.
References CheckPlaceholderExpr(), Context, clang::SemaBase::Diag(), clang::Dim, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::Expr::getIntegerConstantExpr(), clang::Expr::getType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::Expr::isTypeDependent().
Referenced by CheckPlaceholderExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildMatrixSingleSubscriptExpr().
| ExprResult Sema::CreateBuiltinMatrixSubscriptExpr | ( | Expr * | Base, |
| Expr * | RowIdx, | ||
| Expr * | ColumnIdx, | ||
| SourceLocation | RBLoc ) |
Definition at line 5150 of file SemaExpr.cpp.
References CheckPlaceholderExpr(), Context, clang::SemaBase::Diag(), clang::Dim, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::Expr::getIntegerConstantExpr(), clang::Expr::getType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and clang::Expr::isTypeDependent().
Referenced by ActOnArraySubscriptExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildMatrixSubscriptExpr().
| ExprResult Sema::CreateBuiltinUnaryOp | ( | SourceLocation | OpLoc, |
| UnaryOperatorKind | Opc, | ||
| Expr * | InputExpr, | ||
| bool | IsAfterAmp = false ) |
Definition at line 15934 of file SemaExpr.cpp.
References clang::AltiVecBool, clang::Type::castAs(), CheckAddressOfOperand(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckRealImagOperand(), Context, convertVector(), clang::CPlusPlus, clang::UnaryOperator::Create(), CurFPFeatureOverrides(), DefaultFunctionArrayLvalueConversion(), DefaultLvalueConversion(), clang::SemaBase::Diag(), clang::ExprError(), ExprEvalContexts, clang::Generic, clang::ActionResult< PtrTy, Compress >::get(), clang::VectorType::getElementType(), getLangOpts(), clang::VectorType::getNumElements(), clang::Expr::getObjectKind(), clang::Type::getPointeeType(), GetSignedVectorType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::VectorType::getVectorKind(), clang::Type::hasBooleanRepresentation(), clang::Type::hasIntegerRepresentation(), HLSL(), ImpCastExprToType(), clang::isa(), 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::isSpecificBuiltinType(), clang::Type::isSveVLSBuiltinType(), clang::Expr::isTypeDependent(), isUnevaluatedContext(), clang::SourceLocation::isValid(), clang::Type::isVectorType(), clang::QualType::isWebAssemblyReferenceType(), needsConversionOfHalfVec(), clang::OK_Ordinary, OpenCL(), RecordModifiableNonNullParam(), ScalarTypeToBooleanCastKind(), clang::T, UsualUnaryConversions(), and clang::VK_PRValue.
Referenced by actOnOMPReductionKindClause(), buildCapture(), buildCaptureDecl(), BuildCaptureInit(), buildCoroutinePromise(), BuildExpressionFromDeclTemplateArgument(), BuildUnaryOp(), collectPlacementArgs(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), DefineImplicitLambdaToBlockPointerConversion(), and FixOverloadedFunctionReference().
| RecordDecl * Sema::CreateCapturedStmtRecordDecl | ( | CapturedDecl *& | CD, |
| SourceLocation | Loc, | ||
| unsigned | NumParams ) |
Definition at line 4618 of file SemaStmt.cpp.
References clang::DeclContext::addDecl(), Context, clang::CPlusPlus, clang::CapturedDecl::Create(), clang::CXXRecordDecl::Create(), clang::RecordDecl::Create(), CurContext, getLangOpts(), clang::DeclContext::getParent(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), clang::DeclContext::isRecord(), clang::RecordDecl::setCapturedRecord(), clang::Decl::setImplicit(), clang::TagDecl::startDefinition(), and clang::Struct.
Referenced by ActOnCapturedRegionStart(), and ActOnCapturedRegionStart().
| CUDAClusterDimsAttr * Sema::createClusterDimsAttr | ( | const AttributeCommonInfo & | CI, |
| Expr * | X, | ||
| Expr * | Y, | ||
| Expr * | Z ) |
Add a cluster_dims attribute to a particular declaration.
Definition at line 5901 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), makeClusterDimsArgExpr(), and X.
Referenced by addClusterDimsAttr().
| ExprResult Sema::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 *.
FIXME: it'd be better to split this interface into two so we don't take a void *, but see the FIXME on ActOnGenericSelectionExpr as to why that isn't a trivial change.
Definition at line 1762 of file SemaExpr.cpp.
References clang::Expr::containsUnexpandedParameterPack(), clang::Type::containsUnexpandedParameterPack(), Context, clang::GenericSelectionExpr::Create(), DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), clang::DiagnosticsEngine::Error, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::QualType::getCanonicalType(), getDiagnostics(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::TypeLoc::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), getType(), clang::TypeSourceInfo::getTypeLoc(), clang::QualType::hasQualifiers(), clang::Expr::HasSideEffects(), clang::Expr::IgnoreParens(), inTemplateInstantiation(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), LangOpts, and Unevaluated.
Referenced by ActOnGenericSelectionExpr(), clang::TreeTransform< AdjustConstraints >::RebuildGenericSelectionExpr(), clang::TreeTransform< AdjustConstraints >::RebuildGenericSelectionExpr(), and rebuildPotentialResultsAsNonOdrUsed().
| 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 832 of file SemaModule.cpp.
References clang::DeclContext::addDecl(), clang::Module::AllVisible, Consumer, clang::ImportDecl::CreateImplicit(), getASTContext(), getLangOpts(), getModuleLoader(), clang::ASTContext::getTranslationUnitDecl(), isSFINAEContext(), and clang::ModuleLoader::makeModuleVisible().
Referenced by diagnoseMissingImport().
| CXXMethodDecl * Sema::CreateLambdaCallOperator | ( | SourceRange | IntroducerRange, |
| CXXRecordDecl * | Class ) |
Definition at line 994 of file SemaLambda.cpp.
References clang::AS_public, clang::Class, Context, clang::CXXMethodDecl::Create(), clang::SourceRange::getBegin(), getCurFPFeatures(), clang::DeclarationNameLoc::makeCXXOperatorNameLoc(), clang::Method, clang::SC_None, and clang::Unspecified.
Referenced by ActOnLambdaExpressionAfterIntroducer().
| CXXRecordDecl * Sema::createLambdaClosureType | ( | SourceRange | IntroducerRange, |
| TypeSourceInfo * | Info, | ||
| unsigned | LambdaDependencyKind, | ||
| LambdaCaptureDefault | CaptureDefault ) |
Create a new lambda closure type.
Definition at line 248 of file SemaLambda.cpp.
References clang::DeclContext::addDecl(), clang::Class, Context, clang::CXXRecordDecl::CreateLambda(), CurContext, clang::SourceRange::getBegin(), getCurLambda(), and getGenericLambdaTemplateParameterList().
Referenced by ActOnLambdaExpressionAfterIntroducer().
| 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 871 of file SemaLambda.cpp.
References Context, clang::VarDecl::Create(), clang::TypeLoc::getAs(), getCurLambda(), clang::TypeSourceInfo::getTypeLoc(), clang::Init, clang::ValueDecl::isParameterPack(), clang::sema::CapturingScopeInfo::LocalPacks, clang::Decl::markUsed(), clang::SC_Auto, clang::VarDecl::setInit(), clang::VarDecl::setInitCapture(), clang::VarDecl::setInitStyle(), and clang::Decl::setReferenced().
Referenced by ActOnLambdaExpressionAfterIntroducer().
| CUDALaunchBoundsAttr * Sema::CreateLaunchBoundsAttr | ( | const AttributeCommonInfo & | CI, |
| Expr * | MaxThreads, | ||
| Expr * | MinBlocks, | ||
| Expr * | MaxBlocks ) |
Create an CUDALaunchBoundsAttr attribute.
Definition at line 5821 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::Stmt::getBeginLoc(), getOffloadArch(), clang::Stmt::getSourceRange(), makeLaunchBoundsArgExpr(), clang::OffloadArchToString(), SM, clang::SM_90, and clang::UNKNOWN.
Referenced by AddLaunchBoundsAttr().
| MaterializeTemporaryExpr * Sema::CreateMaterializeTemporaryExpr | ( | QualType | T, |
| Expr * | Temporary, | ||
| bool | BoundToLvalueReference ) |
Definition at line 7791 of file SemaInit.cpp.
References Cleanup, Context, currentEvaluationContext(), clang::Sema::ExpressionEvaluationContextRecord::ForRangeLifetimeExtendTemps, isInLifetimeExtendingContext(), and clang::T.
Referenced by BuildCoyieldExpr(), BuildResolvedCoawaitExpr(), CheckAddressOfOperand(), ImpCastExprToType(), clang::InitializationSequence::Perform(), PerformImplicitObjectArgumentInitialization(), and TemporaryMaterializationConversion().
| ExprResult Sema::CreateOverloadedArraySubscriptExpr | ( | SourceLocation | LLoc, |
| SourceLocation | RLoc, | ||
| Expr * | Base, | ||
| MultiExprArg | Args ) |
Definition at line 15891 of file SemaOverload.cpp.
References AddBuiltinOperatorCandidates(), AddMemberOperatorCandidates(), clang::OverloadCandidateSet::BestViableFunction(), clang::cast(), checkArgPlaceholdersForOverload(), CheckCallReturnType(), CheckForImmediateInvocation(), CheckFunctionCall(), CheckMemberOperatorAccess(), Context, clang::CXXOperatorCallExpr::Create(), CreateBuiltinArraySubscriptExpr(), CreateFunctionRefExpr(), CreateUnresolvedLookupExpr(), clang::OverloadCandidateSet::CSK_Operator, CurFPFeatureOverrides(), clang::OverloadCandidateSet::empty(), clang::ExprError(), clang::ForBuiltinOverloadedOp, clang::ActionResult< PtrTy, Compress >::get(), clang::DeclarationNameInfo::getInfo(), clang::DeclarationNameInfo::getLoc(), clang::QualType::getNonLValueExprType(), clang::FunctionDecl::getReturnType(), clang::StringLiteral::getString(), getType(), clang::Expr::getValueKindForType(), clang::Expr::hasAnyTypeDependentArguments(), InitializeExplicitObjectArgument(), clang::ActionResult< PtrTy, Compress >::isInvalid(), MaybeBindToTemporary(), clang::Method, clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::Passing, clang::SemaBase::PDiag(), PerformImplicitConversion(), PerformImplicitObjectArgumentInitialization(), PrepareArgumentsForCallToObjectOfClassType(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::OverloadCandidateSet::size(), and clang::VK_PRValue.
Referenced by ActOnArraySubscriptExpr().
| ExprResult Sema::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.
| OpLoc | The location of the operator itself (e.g., '+'). |
| Opc | The BinaryOperatorKind that describes this operator. |
| Fns | The set of non-member functions that will be considered by overload resolution. The caller needs to build this set based on the context using, e.g., LookupOverloadedOperatorName() and ArgumentDependentLookup(). This set should not contain any member functions; those will be added by CreateOverloadedBinOp(). |
| LHS | Left-hand argument. |
| RHS | Right-hand argument. |
| PerformADL | Whether to consider operator candidates found by ADL. |
| AllowRewrittenCandidates | Whether to consider candidates found by C++20 operator rewrites. |
| DefaultedFn | If we are synthesizing a defaulted operator function, the function in question. Such a function is never a candidate in our overload resolution. This also enables synthesizing a three-way comparison from < and == as described in C++20 [class.spaceship]p1. |
Definition at line 15293 of file SemaOverload.cpp.
References allowAmbiguity(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::OverloadCandidateSet::BestViableFunction(), clang::ImplicitConversionSequence::Better, BuildSynthesizedThreeWayComparison(), clang::cast(), clang::sema::checkAssignmentLifetime(), checkCall(), CheckCallReturnType(), CheckForImmediateInvocation(), CheckMemberOperatorAccess(), CheckPlaceholderExpr(), checkPlaceholderForOverload(), CompareImplicitConversionSequences(), clang::OverloadCandidateSet::CompleteCandidates(), Context, clang::OverloadCandidate::Conversions, clang::CPlusPlus20, clang::BinaryOperator::Create(), clang::CompoundAssignOperator::Create(), clang::CXXOperatorCallExpr::Create(), clang::IntegerLiteral::Create(), CreateBuiltinBinOp(), CreateBuiltinUnaryOp(), CreateFunctionRefExpr(), CreateOverloadedBinOp(), CreateUnresolvedLookupExpr(), clang::CRK_DifferentOperator, clang::CRK_None, clang::OverloadCandidateSet::CSK_Operator, CurFPFeatureOverrides(), clang::declaresSameEntity(), Diag(), diagnoseNullableToNonnullConversion(), DiagnoseSelfMove(), DiagnoseTwoPhaseOperatorLookup(), clang::DoesNotApply, clang::UnresolvedSetImpl::empty(), clang::Sema::CodeSynthesisContext::Entity, clang::OverloadCandidateSet::exclude(), clang::ExprError(), clang::ForBuiltinOverloadedOp, clang::OverloadCandidate::Function, clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), getDefaultedFunctionKind(), getLangOpts(), clang::Decl::getLocation(), clang::QualType::getNonLValueExprType(), clang::BinaryOperator::getOpcodeStr(), clang::BinaryOperator::getOpcodeStr(), clang::getOperatorSpelling(), clang::BinaryOperator::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::OverloadCandidateSet::getRewriteInfo(), clang::Stmt::getSourceRange(), clang::StringLiteral::getString(), clang::Expr::getType(), getType(), clang::Expr::getValueKindForType(), InitializeExplicitObjectArgument(), clang::InitializedEntity::InitializeParameter(), clang::isa(), clang::Type::isBooleanType(), clang::Sema::DefaultedFunctionKind::isComparison(), clang::BinaryOperator::isCompoundAssignmentOp(), isImplicitlyDeleted(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), isRecordType(), clang::OverloadCandidate::isReversed(), clang::OverloadCandidateSet::OperatorRewriteInfo::isReversible(), clang::Sema::DefaultedFunctionKind::isSpecialMember(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Sema::CodeSynthesisContext::Kind, LookupOverloadedBinOp(), MaybeBindToTemporary(), clang::Method, clang::OverloadCandidateSet::NoteCandidates(), NoteDeletedFunction(), 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::Passing, clang::SemaBase::PDiag(), PerformCopyInitialization(), PerformImplicitConversion(), PerformImplicitObjectArgumentInitialization(), popCodeSynthesisContext(), pushCodeSynthesisContext(), clang::Result, clang::Sema::CodeSynthesisContext::RewritingOperatorAsSpaceship, clang::OverloadCandidateSet::shouldDeferDiags(), clang::OverloadCandidateSet::size(), clang::OverloadCandidate::Viable, clang::VK_LValue, clang::VK_PRValue, and clang::Zero.
Referenced by BuildOverloadedBinOp(), BuildSynthesizedThreeWayComparison(), CreateOverloadedBinOp(), HasNonDeletedDefaultedEqualityComparison(), and clang::TreeTransform< AdjustConstraints >::RebuildCXXRewrittenBinaryOperator().
| ExprResult Sema::CreateOverloadedUnaryOp | ( | SourceLocation | OpLoc, |
| UnaryOperatorKind | Opc, | ||
| const UnresolvedSetImpl & | Fns, | ||
| Expr * | input, | ||
| bool | RequiresADL = true ) |
Create a unary operation that may resolve to an overloaded operator.
| OpLoc | The location of the operator itself (e.g., '*'). |
| Opc | The UnaryOperatorKind that describes this operator. |
| Fns | The set of non-member functions that will be considered by overload resolution. The caller needs to build this set based on the context using, e.g., LookupOverloadedOperatorName() and ArgumentDependentLookup(). This set should not contain any member functions; those will be added by CreateOverloadedUnaryOp(). |
| Input | The input argument. |
Definition at line 15028 of file SemaOverload.cpp.
References AddArgumentDependentLookupCandidates(), AddBuiltinOperatorCandidates(), AddMemberOperatorCandidates(), AddNonMemberOperatorCandidates(), clang::OverloadCandidateSet::BestViableFunction(), clang::Type::castAs(), CheckCallReturnType(), CheckForImmediateInvocation(), CheckFunctionCall(), CheckMemberOperatorAccess(), checkPlaceholderForOverload(), Context, clang::CXXOperatorCallExpr::Create(), clang::IntegerLiteral::Create(), clang::UnaryOperator::Create(), CreateBuiltinUnaryOp(), CreateFunctionRefExpr(), CreateUnresolvedLookupExpr(), clang::OverloadCandidateSet::CSK_Operator, CurFPFeatureOverrides(), DiagnoseTwoPhaseOperatorLookup(), clang::UnresolvedSetImpl::empty(), clang::ExprError(), clang::ForBuiltinOverloadedOp, clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getNonLValueExprType(), clang::UnaryOperator::getOpcodeStr(), clang::UnaryOperator::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::Stmt::getSourceRange(), clang::StringLiteral::getString(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::getValueKindForType(), InitializeExplicitObjectArgument(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), MaybeBindToTemporary(), clang::Method, 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::Passing, clang::SemaBase::PDiag(), PerformCopyInitialization(), PerformImplicitConversion(), PerformImplicitObjectArgumentInitialization(), clang::OverloadCandidateSet::size(), clang::VK_LValue, clang::VK_PRValue, and clang::Zero.
Referenced by BuildOperatorCoawaitCall(), and BuildUnaryOp().
| ParsedType Sema::CreateParsedType | ( | QualType | T, |
| TypeSourceInfo * | TInfo ) |
Package the given type and TSI into a ParsedType.
Create a LocInfoType to hold the given QualType and TypeSourceInfo.
Definition at line 6398 of file SemaType.cpp.
References BumpAlloc, clang::Type::getTypeClass(), clang::OpaquePtr< QualType >::make(), and clang::T.
Referenced by ActOnCastExpr(), ActOnDependentTag(), ActOnMSVCUnknownTypeName(), ActOnPackExpansion(), ActOnTagTemplateIdType(), ActOnTemplateIdType(), ActOnTypeName(), ActOnTypenameType(), ActOnTypenameType(), BuildCXXForRangeStmt(), ClassifyName(), getDestructorName(), getInheritingConstructorName(), getTypeName(), RebuildDeclaratorInCurrentInstantiation(), and recoverFromTypeInKnownDependentBase().
| ExprResult Sema::CreateRecoveryExpr | ( | SourceLocation | Begin, |
| SourceLocation | End, | ||
| ArrayRef< Expr * > | SubExprs, | ||
| QualType | T = QualType() ) |
Attempts to produce a RecoveryExpr after some AST node cannot be created.
Definition at line 21730 of file SemaExpr.cpp.
References Context, clang::RecoveryExpr::Create(), clang::ExprError(), isSFINAEContext(), and clang::T.
Referenced by ActOnBlockStmtExpr(), ActOnCondition(), ActOnCXXTypeConstructExpr(), ActOnFinishCXXInClassMemberInitializer(), ActOnParamDefaultArgumentError(), ActOnStartCXXMemberReference(), ActOnUninitializedDecl(), AddInitializerToDecl(), BuildBaseInitializer(), BuildCallToMemberFunction(), BuildDeclarationNameExpr(), BuildDelegatingInitializer(), BuildDependentDeclRefExpr(), BuildMemberInitializer(), BuildReturnStmt(), CheckPlaceholderExpr(), diagnoseNoViableConversion(), FinishOverloadedCallExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildRecoveryExpr().
| concepts::Requirement::SubstitutionDiagnostic * Sema::createSubstDiagAt | ( | SourceLocation | Location, |
| EntityPrinter | Printer ) |
create a Requirement::SubstitutionDiagnostic with only a SubstitutedEntity and DiagLoc using ASTContext's allocator.
Definition at line 2545 of file SemaTemplateInstantiate.cpp.
References clang::C, Context, and OS.
Referenced by BuildExprRequirement().
| ExprResult Sema::CreateUnaryExprOrTypeTraitExpr | ( | Expr * | E, |
| SourceLocation | OpLoc, | ||
| UnaryExprOrTypeTrait | ExprKind ) |
Build a sizeof or alignof expression given an expression operand.
Definition at line 4730 of file SemaExpr.cpp.
References CheckAlignOfExpr(), CheckPlaceholderExpr(), CheckUnaryExprOrTypeTraitOperand(), CheckVecStepExpr(), Context, clang::SemaBase::Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getEnd(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isInvalid(), clang::Expr::isTypeDependent(), clang::Type::isVariableArrayType(), clang::Expr::refersToBitField(), and TransformToPotentiallyEvaluated().
| ExprResult Sema::CreateUnaryExprOrTypeTraitExpr | ( | TypeSourceInfo * | TInfo, |
| SourceLocation | OpLoc, | ||
| UnaryExprOrTypeTrait | ExprKind, | ||
| SourceRange | R ) |
Build a sizeof or alignof expression given a type operand.
Definition at line 4698 of file SemaExpr.cpp.
References CheckUnaryExprOrTypeTraitOperand(), Context, currentEvaluationContext(), clang::ExprError(), clang::SourceRange::getEnd(), clang::getTraitSpelling(), clang::TypeSourceInfo::getType(), clang::Type::isVariablyModifiedType(), clang::T, and TransformToPotentiallyEvaluated().
Referenced by ActOnUnaryExprOrTypeTraitExpr(), clang::TreeTransform< AdjustConstraints >::RebuildUnaryExprOrTypeTrait(), and clang::TreeTransform< AdjustConstraints >::RebuildUnaryExprOrTypeTrait().
| ExprResult Sema::CreateUnresolvedLookupExpr | ( | CXXRecordDecl * | NamingClass, |
| NestedNameSpecifierLoc | NNSLoc, | ||
| DeclarationNameInfo | DNI, | ||
| const UnresolvedSetImpl & | Fns, | ||
| bool | PerformADL = true ) |
Definition at line 14933 of file SemaOverload.cpp.
References clang::UnresolvedSetImpl::begin(), Context, clang::UnresolvedLookupExpr::Create(), and clang::UnresolvedSetImpl::end().
Referenced by ActOnCXXFoldExpr(), BuildForRangeBeginEndCall(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().
|
inline |
Definition at line 1448 of file Sema.h.
Referenced by ActOnCXXTryBlock(), ActOnExplicitInstantiation(), ActOnFunctionDeclarator(), ActOnStartOfLambdaDefinition(), ActOnVariableDeclarator(), AddKnownFunctionAttributes(), AddMethodCandidate(), AddOverloadCandidate(), BuildArrayType(), BuildCXXConstructExpr(), BuildCXXThrow(), BuildLambdaExpr(), BuildResolvedCallExpr(), BuildVAArgExpr(), CheckCallingConvAttr(), CheckCompletedCXXClass(), CheckCompleteVariableDeclaration(), CheckFunctionDeclaration(), CheckFunctionTemplateSpecialization(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DeduceFunctionTypeFromReturnExpr(), DiagnoseBadTarget(), DiagnoseExceptionUse(), DiagnoseUseOfDecl(), emitCallStackNotes(), FinalizeDeclaration(), FindAllocationFunctions(), getCCForDeclaratorChunk(), GetDeclSpecTypeForDeclarator(), getEmissionStatus(), GetFullTypeForDeclarator(), handleCallConvAttr(), handleLambdaNumbering(), handleSharedAttr(), InstantiateVariableInitializer(), clang::isBetterOverloadCandidate(), IsOverloadOrOverrideImpl(), isUsualDeallocationFunction(), MarkFunctionReferenced(), MarkVarDeclODRUsed(), ProcessDeclAttributeList(), resolveAddressOfSingleOverloadCandidate(), ShouldDeleteSpecialMember(), shouldIgnoreInHostDeviceCheck(), SubstituteExplicitTemplateArguments(), and targetDiag().
|
inline |
Definition at line 2052 of file Sema.h.
References FpPragmaStack.
Referenced by actOnOMPReductionKindClause(), ActOnPragmaCXLimitedRange(), ActOnPragmaFEnvAccess(), ActOnPragmaFEnvRound(), ActOnPragmaFloatControl(), ActOnPragmaFPContract(), ActOnPragmaFPEvalMethod(), ActOnPragmaFPValueChangingOption(), BuildBinOp(), BuildCallExpr(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildCStyleCastExpr(), BuildCXXCastArgument(), BuildCXXFunctionalCastExpr(), BuildCXXMemberCallExpr(), BuildCXXNamedCast(), BuildCXXTypeConstructExpr(), BuildExpressionFromIntegralTemplateArgumentValue(), BuildLiteralOperatorCall(), buildMemcpyForAssignmentOp(), BuildOverloadedArrowExpr(), BuildOverloadedCallExpr(), buildOverloadedCallSet(), BuildResolvedCallExpr(), buildSingleCopyAssignRecursively(), BuildSynthesizedThreeWayComparison(), ConvertVectorExpr(), CreateBuiltinBinOp(), CreateBuiltinUnaryOp(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), DefaultLvalueConversion(), FixOverloadedFunctionReference(), ImpCastExprToType(), clang::InitializationSequence::Perform(), recordConversion(), and setExceptionMode().
|
inline |
Definition at line 6956 of file Sema.h.
References ExprEvalContexts.
|
inline |
Definition at line 6950 of file Sema.h.
References ExprEvalContexts.
Referenced by ActOnCallExpr(), BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), checkSuspensionContext(), CreateMaterializeTemporaryExpr(), CreateUnaryExprOrTypeTraitExpr(), DeduceTemplateArguments(), DiagnoseMisalignedMembers(), DiscardMisalignedMemberAddress(), DoEmitAvailabilityWarning(), InstantiateVariableInitializer(), isAlwaysConstantEvaluatedContext(), isCheckingDefaultArgumentOrInitializer(), isConstantEvaluatedContext(), isImmediateFunctionContext(), isInLifetimeExtendingContext(), isOdrUseContext(), isUnevaluatedContext(), needsRebuildOfDefaultArgOrInit(), and PushExpressionEvaluationContextForFunction().
|
inline |
Is the module scope we are in a C++ Header Unit?
Definition at line 3595 of file Sema.h.
References false.
Referenced by ActOnStartOfFunctionDef(), and AddInitializerToDecl().
|
inline |
Is the module scope we are an implementation unit?
Definition at line 9884 of file Sema.h.
References false.
Referenced by ActOnModuleImport(), ActOnModuleImport(), and ActOnStartExportDecl().
| 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 5830 of file SemaExprCXX.cpp.
References CheckCXXBooleanCondition(), CheckVectorConditionalTypes(), CheckVectorOperands(), CompareReferenceRelationship(), clang::Cond, clang::Conditional, Context, ConvertForConditional(), DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), DiagnoseConditionalForNull(), clang::SemaObjC::FindCompositeObjCPointerType(), FindCompositePointerType(), FindConditionalOverload(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::Expr::getObjectKind(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::Expr::IgnoreParenImpCasts(), ImpCastExprToType(), clang::InitializedEntity::InitializeTemporary(), clang::isa(), clang::Type::isArithmeticType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Expr::isOrdinaryOrBitFieldObject(), clang::Type::isRecordType(), clang::Expr::isTypeDependent(), isValidVectorForConditionalCondition(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::Type::isWebAssemblyTableType(), ObjC(), 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 - A declaration (maybe definition) needs #pragma weak applied to it, possibly with an alias.
Definition at line 8397 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), Context, CurContext, DeclClonePragmaWeak(), clang::WeakInfo::getAlias(), clang::NamedDecl::getIdentifier(), clang::WeakInfo::getLocation(), clang::IdentifierInfo::getName(), PushOnScopeChains(), clang::Decl::setDeclContext(), clang::Decl::setLexicalDeclContext(), and WeakTopLevelDecl.
Referenced by ActOnPragmaWeakAlias(), and ProcessPragmaWeak().
| FunctionTemplateDecl * Sema::DeclareAggregateDeductionGuideFromInitList | ( | TemplateDecl * | Template, |
| MutableArrayRef< QualType > | ParamTypes, | ||
| SourceLocation | Loc ) |
Definition at line 1445 of file SemaTemplateDeductionGuide.cpp.
References clang::Aggregate, AggregateDeductionCandidates, AliasTemplate, clang::cast(), clang::Found, clang::FunctionDecl::getDescribedFunctionTemplate(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::FunctionTemplateDecl::getTemplatedDecl(), isCompleteType(), clang::DeclContext::isDependentContext(), clang::Sema::ContextRAII::pop(), clang::T, and clang::Template.
Referenced by DeduceTemplateSpecializationFromInitializer().
| 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 3479 of file SemaExprCXX.cpp.
References AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), clang::DeclContextLookupResult::begin(), clang::CC_C, Context, clang::CPlusPlus11, clang::FunctionDecl::Create(), clang::ParmVarDecl::Create(), clang::DeclContextLookupResult::end(), clang::EST_BasicNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::FunctionProtoType::ExceptionSpecInfo::Exceptions, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::Func, getCurFPFeatures(), getLangOpts(), getStdBadAlloc(), IdResolver, clang::isa(), clang::DeclarationName::isAnyOperatorNew(), LangOpts, clang::DeclContext::lookup(), clang::Decl::ReachableWhenImported, clang::SC_None, StdBadAlloc, clang::T, clang::FunctionProtoType::ExceptionSpecInfo::Type, and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by DeclareGlobalNewDelete().
| void Sema::DeclareGlobalNewDelete | ( | ) |
DeclareGlobalNewDelete - Declare the global forms of operator new and delete.
These are:
Note that the placement and nothrow forms of new are not implicitly declared. Their use requires including <new>.
Definition at line 3348 of file SemaExprCXX.cpp.
References clang::Class, Context, clang::CPlusPlus11, clang::CXXRecordDecl::Create(), clang::EnumDecl::Create(), DeclareGlobalAllocationFunction(), getCurrentModule(), getLangOpts(), getOrCreateStdNamespace(), getStdAlignValT(), getStdBadAlloc(), GlobalNewDeleteDeclared, PP, clang::Decl::ReachableWhenImported, clang::Decl::setImplicit(), clang::Decl::setLocalOwningModule(), clang::Decl::setModuleOwnershipKind(), SizeT, StdAlignValT, and StdBadAlloc.
Referenced by FindAllocationFunctions(), and FindUsualDeallocationFunction().
| CXXMethodDecl * Sema::DeclareImplicitCopyAssignment | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit copy assignment operator for the given class.
| ClassDecl | The class declaration into which the implicit copy assignment operator will be added. |
Definition at line 15086 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::Constexpr, Context, clang::CopyAssignment, clang::CXXMethodDecl::Create(), clang::ParmVarDecl::Create(), clang::CUDA, CUDA(), clang::Default, defaultedSpecialMemberIsConstexpr(), getASTContext(), getCurFPFeatures(), getDefaultCXXMethodAddrSpace(), getLangOpts(), clang::Decl::getLocation(), getScopeForContext(), clang::CXXRecordDecl::hasTrivialCopyAssignment(), clang::CXXRecordDecl::implicitCopyAssignmentHasConstParam(), clang::CXXRecordDecl::needsImplicitCopyAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForCopyAssignment(), clang::None, PushOnScopeChains(), clang::SC_None, SetDeclDeleted(), clang::CXXRecordDecl::setImplicitCopyAssignmentIsDeleted(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), and clang::Unspecified.
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and ForceDeclarationOfImplicitMembers().
| CXXConstructorDecl * Sema::DeclareImplicitCopyConstructor | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit copy constructor for the given class.
| ClassDecl | The class declaration into which the implicit copy constructor will be added. |
Definition at line 15839 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::ConsiderTrivialABI, clang::Constexpr, Context, clang::CopyConstructor, clang::CXXConstructorDecl::Create(), clang::ParmVarDecl::Create(), clang::CUDA, CUDA(), clang::Default, defaultedSpecialMemberIsConstexpr(), getASTContext(), getCurFPFeatures(), getDefaultCXXMethodAddrSpace(), getLangOpts(), clang::Decl::getLocation(), getScopeForContext(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::hasTrivialCopyConstructorForCall(), clang::CXXRecordDecl::implicitCopyConstructorHasConstParam(), inTemplateInstantiation(), clang::CXXRecordDecl::isLambda(), clang::CXXRecordDecl::needsImplicitCopyConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor(), clang::None, PushOnScopeChains(), clang::SC_None, SetDeclDeleted(), clang::CXXRecordDecl::setImplicitCopyConstructorIsDeleted(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), and clang::Unspecified.
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and ForceDeclarationOfImplicitMembers().
| void Sema::DeclareImplicitDeductionGuides | ( | TemplateDecl * | Template, |
| SourceLocation | Loc ) |
Declare implicit deduction guides for a class template if we've not already done so.
Definition at line 1510 of file SemaTemplateDeductionGuide.cpp.
References AliasTemplate, clang::cast(), clang::Copy, Definition, clang::CXXRecordDecl::getDefinition(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::FunctionTemplateDecl::getTemplatedDecl(), isCompleteType(), clang::DeclContext::isDependentContext(), clang::FunctionDecl::isFunctionTemplateSpecialization(), LookupConstructors(), clang::FunctionDecl::parameters(), clang::Sema::ContextRAII::pop(), and clang::Template.
Referenced by DeclareImplicitMemberFunctionsWithName().
| CXXConstructorDecl * Sema::DeclareImplicitDefaultConstructor | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit default constructor for the given class.
| ClassDecl | The class declaration into which the implicit default constructor will be added. |
Definition at line 14176 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::Constexpr, Context, clang::CXXConstructorDecl::Create(), clang::CUDA, CUDA(), clang::DefaultConstructor, defaultedSpecialMemberIsConstexpr(), getASTContext(), getCurFPFeatures(), getLangOpts(), clang::Decl::getLocation(), getScopeForContext(), clang::CXXRecordDecl::hasTrivialDefaultConstructor(), clang::CXXRecordDecl::needsImplicitDefaultConstructor(), PushOnScopeChains(), clang::Decl::setAccess(), SetDeclDeleted(), clang::FunctionDecl::setDefaulted(), clang::FunctionDecl::setTrivial(), ShouldDeleteSpecialMember(), and clang::Unspecified.
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), findTrivialSpecialMember(), and ForceDeclarationOfImplicitMembers().
| CXXDestructorDecl * Sema::DeclareImplicitDestructor | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit destructor for the given class.
| ClassDecl | The class declaration into which the implicit destructor will be added. |
Definition at line 14465 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::Constexpr, Context, clang::CXXDestructorDecl::Create(), clang::CUDA, CUDA(), defaultedSpecialMemberIsConstexpr(), clang::Destructor, getASTContext(), getCurFPFeatures(), getLangOpts(), clang::Decl::getLocation(), getScopeForContext(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CXXRecordDecl::hasTrivialDestructorForCall(), clang::TagDecl::isCompleteDefinition(), clang::CXXRecordDecl::needsImplicitDestructor(), PushOnScopeChains(), SetDeclDeleted(), ShouldDeleteSpecialMember(), and clang::Unspecified.
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), findTrivialSpecialMember(), and ForceDeclarationOfImplicitMembers().
| void Sema::DeclareImplicitEqualityComparison | ( | CXXRecordDecl * | RD, |
| FunctionDecl * | Spaceship ) |
Definition at line 9238 of file SemaDeclCXX.cpp.
References clang::Sema::CodeSynthesisContext::DeclaringImplicitEqualityComparison, clang::Sema::CodeSynthesisContext::Entity, clang::Sema::CodeSynthesisContext::Kind, clang::Sema::CodeSynthesisContext::PointOfInstantiation, popCodeSynthesisContext(), pushCodeSynthesisContext(), and SubstSpaceshipAsEqualEqual().
Referenced by AddImplicitlyDeclaredMembersToClass().
| CXXMethodDecl * Sema::DeclareImplicitMoveAssignment | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit move assignment operator for the given class.
| ClassDecl | The Class declaration into which the implicit move assignment operator will be added. |
Definition at line 15445 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::Constexpr, Context, clang::CXXMethodDecl::Create(), clang::ParmVarDecl::Create(), clang::CUDA, CUDA(), clang::Default, defaultedSpecialMemberIsConstexpr(), getASTContext(), getCurFPFeatures(), getDefaultCXXMethodAddrSpace(), getLangOpts(), clang::Decl::getLocation(), getScopeForContext(), clang::CXXRecordDecl::hasTrivialMoveAssignment(), clang::MoveAssignment, clang::CXXRecordDecl::needsImplicitMoveAssignment(), clang::CXXRecordDecl::needsOverloadResolutionForMoveAssignment(), clang::None, PushOnScopeChains(), clang::SC_None, SetDeclDeleted(), clang::CXXRecordDecl::setImplicitMoveAssignmentIsDeleted(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), and clang::Unspecified.
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and ForceDeclarationOfImplicitMembers().
| CXXConstructorDecl * Sema::DeclareImplicitMoveConstructor | ( | CXXRecordDecl * | ClassDecl | ) |
Declare the implicit move constructor for the given class.
| ClassDecl | The Class declaration into which the implicit move constructor will be added. |
Definition at line 15989 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, CheckImplicitSpecialMemberDeclaration(), clang::ConsiderTrivialABI, clang::Constexpr, Context, clang::CXXConstructorDecl::Create(), clang::ParmVarDecl::Create(), clang::CUDA, CUDA(), clang::Default, defaultedSpecialMemberIsConstexpr(), getASTContext(), getCurFPFeatures(), getDefaultCXXMethodAddrSpace(), getLangOpts(), clang::Decl::getLocation(), getScopeForContext(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasTrivialMoveConstructor(), clang::CXXRecordDecl::hasTrivialMoveConstructorForCall(), clang::MoveConstructor, clang::CXXRecordDecl::needsImplicitMoveConstructor(), clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor(), clang::None, PushOnScopeChains(), clang::SC_None, SetDeclDeleted(), clang::CXXRecordDecl::setImplicitMoveConstructorIsDeleted(), ShouldDeleteSpecialMember(), SpecialMemberIsTrivial(), and clang::Unspecified.
Referenced by AddImplicitlyDeclaredMembersToClass(), DeclareImplicitMemberFunctionsWithName(), and ForceDeclarationOfImplicitMembers().
| NamedDecl * Sema::DeclClonePragmaWeak | ( | 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.
Definition at line 8353 of file SemaDeclAttr.cpp.
References BuildParmVarDeclForTypedef(), clang::cast(), clang::FunctionDecl::Create(), clang::VarDecl::Create(), clang::Type::getAs(), clang::Decl::getASTContext(), getCurFPFeatures(), clang::Decl::getDeclContext(), clang::DeclaratorDecl::getQualifier(), clang::DeclaratorDecl::getQualifierLoc(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::FunctionDecl::hasPrototype(), clang::isa(), clang::SC_None, clang::DeclaratorDecl::setQualifierInfo(), and clang::Unspecified.
Referenced by DeclApplyPragmaWeak().
| 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 2435 of file SemaExpr.cpp.
References Context, clang::OpaquePtr< PtrTy >::get(), clang::UnqualifiedId::getKind(), GetNameFromUnqualifiedId(), clang::TemplateIdAnnotation::getTemplateArgs(), clang::IK_TemplateId, clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::NumArgs, clang::TemplateIdAnnotation::RAngleLoc, clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, clang::TemplateIdAnnotation::TemplateNameLoc, and translateTemplateArguments().
Referenced by ActOnIdExpression(), and ActOnMemberAccessExpr().
| TemplateDeductionResult Sema::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)
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.
| Type | the type pattern using the auto type-specifier. |
| Init | the initializer for the variable whose type is to be deduced. |
| Result | if type deduction was successful, this will be set to the deduced type. |
| Info | the argument will be updated to provide additional information about template argument deduction. |
| DependentDeduction | Set 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. |
| IgnoreConstraints | Set if we should not fail if the deduced type does not satisfy the type-constraint in the auto type. |
Definition at line 5202 of file SemaTemplateDeduction.cpp.
References clang::AlreadyDiagnosed, BuildStdInitializerList(), clang::C23, CheckDeducedPlaceholderConstraints(), CheckOriginalCallArgDeduction(), CheckPlaceholderExpr(), Context, clang::CPlusPlus, clang::TemplateTypeParmDecl::Create(), DeduceTemplateArgumentsFromCallArgument(), clang::SemaBase::Diag(), clang::sema::TemplateDeductionInfo::FirstArg, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), getASTContext(), clang::Type::getContainedAutoType(), getDecltypeForExpr(), clang::sema::TemplateDeductionInfo::getDeducedDepth(), getKind(), getLangOpts(), clang::sema::TemplateDeductionInfo::getLocation(), clang::TypeDecl::getTypeForDecl(), clang::Incomplete, clang::Inconsistent, clang::Init, clang::Invalid, clang::isa(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::SourceRange::isInvalid(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::TemplateArgument::Null, clang::Result, clang::sema::TemplateDeductionInfo::SecondArg, clang::Success, and clang::TemplateArgument::Type.
Referenced by BuildCXXNew(), BuildCXXTypeConstructExpr(), CheckTemplateArgument(), DeduceFunctionTypeFromReturnExpr(), deduceVarTypeFromInitializer(), and FinishForRangeVarDecl().
| void Sema::deduceClosureReturnType | ( | sema::CapturingScopeInfo & | CSI | ) |
Deduce a block or lambda's return type based on the return statements present in the body.
Definition at line 712 of file SemaLambda.cpp.
References adjustBlockReturnsToEnum(), Context, clang::CPlusPlus, clang::CPlusPlus14, clang::SemaBase::Diag(), findCommonEnumForBlockReturns(), getASTContext(), clang::ReturnStmt::getBeginLoc(), getLangOpts(), clang::Type::getNullability(), clang::ReturnStmt::getRetValue(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::hasWeakerNullability(), clang::isa(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::Type::isUndeducedType(), clang::sema::FunctionScopeInfo::Returns, clang::sema::CapturingScopeInfo::ReturnType, and clang::ASTContext::VoidTy.
Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().
| bool Sema::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.
Definition at line 3797 of file SemaStmt.cpp.
References clang::AlreadyDiagnosed, Context, CUDA(), DeduceAutoType(), clang::SemaBase::Diag(), diagnoseIgnoredQualifiers(), clang::OverloadExpr::find(), clang::sema::TemplateDeductionInfo::FirstArg, clang::Type::getAs(), getCurLambda(), clang::FunctionDecl::getDeclaredReturnType(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getLocalCVRQualifiers(), clang::Decl::getLocation(), getReturnTypeLoc(), clang::FunctionDecl::getSourceRange(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::TypeLoc::getType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::sema::CapturingScopeInfo::HasImplicitReturnType, clang::Inconsistent, clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::Decl::isInvalidDecl(), clang::isLambdaConversionOperator(), clang::Type::isRecordType(), clang::Type::isVoidType(), clang::TemplateSpecCandidateSet::NoteCandidates(), clang::sema::TemplateDeductionInfo::SecondArg, and clang::Success.
Referenced by ActOnCapScopeReturnStmt(), ActOnFinishFunctionBody(), and BuildReturnStmt().
| void clang::Sema::deduceHLSLAddressSpace | ( | VarDecl * | decl | ) |
References clang::ast_matchers::decl, clang::DirectInit, and clang::Init.
| void Sema::deduceOpenCLAddressSpace | ( | ValueDecl * | decl | ) |
Definition at line 7053 of file SemaDecl.cpp.
References Context, getLangOpts(), getOpenCLOptions(), clang::Type::isArrayType(), clang::Type::isSamplerT(), clang::Type::isVoidType(), clang::opencl_global, and clang::opencl_private.
Referenced by ActOnParamDeclarator(), ActOnVariableDeclarator(), CompleteVarTemplateSpecializationDecl(), and DeduceVariableDeclarationType().
| bool Sema::DeduceReturnType | ( | FunctionDecl * | FD, |
| SourceLocation | Loc, | ||
| bool | Diagnose = true ) |
Definition at line 5439 of file SemaTemplateDeduction.cpp.
References clang::cast(), clang::Type::castAs(), Context, clang::SemaBase::Diag(), Diagnose, clang::Type::getAs(), clang::CXXRecordDecl::getLambdaCallOperator(), getLambdaConversionFunctionResultType(), clang::Decl::getLocation(), clang::Type::getPointeeType(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::getTemplateSpecializationArgs(), InstantiateFunctionDeclaration(), InstantiateFunctionDefinition(), clang::Decl::isInvalidDecl(), clang::isLambdaConversionOperator(), clang::Type::isUndeducedType(), and runWithSufficientStackSpace().
Referenced by AddConversionCandidate(), CanUseDecl(), completeFunctionType(), DeduceTemplateArguments(), DiagnoseUseOfDecl(), and GetTypeOfFunction().
| TemplateDeductionResult Sema::DeduceTemplateArguments | ( | ClassTemplatePartialSpecializationDecl * | Partial, |
| ArrayRef< TemplateArgument > | TemplateArgs, | ||
| sema::TemplateDeductionInfo & | Info ) |
Definition at line 3460 of file SemaTemplateDeduction.cpp.
Referenced by ActOnExplicitInstantiation(), AddMethodTemplateCandidateImmediately(), AddTemplateConversionCandidateImmediately(), AddTemplateOverloadCandidateImmediately(), CheckFunctionTemplateSpecialization(), CheckVarTemplateId(), DeduceTemplateArguments(), DeduceTemplateArgumentsFromType(), FindAllocationFunctions(), getPatternForClassTemplateSpecialization(), isTemplateTemplateParameterAtLeastAsSpecializedAs(), LookupDirect(), and ResolveOverloadForDeduction().
| TemplateDeductionResult Sema::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.
Definition at line 4905 of file SemaTemplateDeduction.cpp.
References clang::cast(), Context, DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateArgumentsFromCallArgument(), clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), getFirstInnerIndex(), clang::sema::TemplateDeductionInfo::getLocation(), clang::FunctionDecl::getParamDecl(), clang::Type::getPointeeType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::Invalid, clang::Type::isArrayType(), clang::CXXMethodDecl::isExplicitObjectMemberFunction(), clang::Type::isFunctionType(), clang::Decl::isInvalidDecl(), clang::Type::isMemberPointerType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), None, clang::Result, runWithSufficientStackSpace(), clang::TemplateParameterList::size(), clang::Specialization, clang::Success, clang::TDF_ArgWithReferenceType, clang::TDF_IgnoreQualifiers, and Unevaluated.
| TemplateDeductionResult Sema::DeduceTemplateArguments | ( | FunctionTemplateDecl * | FunctionTemplate, |
| TemplateArgumentListInfo * | ExplicitTemplateArgs, | ||
| ArrayRef< Expr * > | Args, | ||
| FunctionDecl *& | Specialization, | ||
| sema::TemplateDeductionInfo & | Info, | ||
| bool | PartialOverloading, | ||
| bool | AggregateDeductionCandidate, | ||
| bool | PartialOrdering, | ||
| QualType | ObjectType, | ||
| Expr::Classification | ObjectClassification, | ||
| bool | ForOverloadSetAddressResolution, | ||
| llvm::function_ref< bool(ArrayRef< QualType >, bool)> | CheckNonDependent ) |
Perform template argument deduction from a function call (C++ [temp.deduct.call]).
| FunctionTemplate | the function template for which we are performing template argument deduction. |
| ExplicitTemplateArgs | the explicit template arguments provided for this call. |
| Args | the function call arguments |
| Specialization | if template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction. |
| Info | the argument will be updated to provide additional information about template argument deduction. |
| CheckNonDependent | A callback to invoke to check conversions for non-dependent parameters, between deduction and substitution, per DR1391. If this returns true, substitution will be skipped and we return TemplateDeductionResult::NonDependentConversionFailure. The callback is passed the parameter types (after substituting explicit template arguments). |
Definition at line 4486 of file SemaTemplateDeduction.cpp.
References CurContext, DeduceTemplateArgumentsFromCallArgument(), clang::Function, FunctionTemplate, getASTContext(), getFirstInnerIndex(), clang::sema::TemplateDeductionInfo::getLocation(), getType(), hasDeducibleTemplateParameters(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Invalid, clang::InvalidExplicitArguments, clang::QualType::isNull(), clang::PartialOrdering, clang::Result, runWithSufficientStackSpace(), clang::TemplateParameterList::size(), clang::Specialization, clang::SubstitutionFailure, clang::Success, clang::TooFewArguments, clang::TooManyArguments, and Unevaluated.
| 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).
| FunctionTemplate | the function template for which we are performing template argument deduction. |
| ExplicitTemplateArgs | the explicitly-specified template arguments. |
| Specialization | if template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction. |
| Info | the argument will be updated to provide additional information about template argument deduction. |
| IsAddressOfFunction | If true, we are deducing as part of taking the address of a function template in a context where we do not have a target type, per [over.over]. If false, we are looking up a function template specialization based on its signature, which only happens when deducing a function parameter type from an argument that is a template-id naming a function template specialization. |
Definition at line 5038 of file SemaTemplateDeduction.cpp.
References DeduceTemplateArguments(), FunctionTemplate, and clang::Specialization.
| 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.
| FunctionTemplate | the function template for which we are performing template argument deduction. |
| ExplicitTemplateArgs | the explicitly-specified template arguments. |
| ArgFunctionType | the function type that will be used as the "argument" type (A) when performing template argument deduction from the function template's function type. This type may be NULL, if there is no argument type to compare against, in C++0x [temp.arg.explicit]p3. |
| Specialization | if template argument deduction was successful, this will be set to the function template specialization produced by template argument deduction. |
| Info | the argument will be updated to provide additional information about template argument deduction. |
| IsAddressOfFunction | If true, we are deducing as part of taking the address of a function template per [temp.deduct.funcaddr] and [over.over]. If false, we are looking up a function template specialization based on its signature, per [temp.deduct.decl]. |
Definition at line 4773 of file SemaTemplateDeduction.cpp.
References adjustCCAndNoReturn(), CheckIfFunctionSpecializationIsImmediate(), Context, clang::CPlusPlus14, clang::CPlusPlus20, currentEvaluationContext(), DeduceReturnType(), DeduceTemplateArgumentsByTypeMatch(), clang::sema::TemplateDeductionInfo::FirstArg, clang::Function, FunctionTemplate, getLangOpts(), clang::sema::TemplateDeductionInfo::getLocation(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::Invalid, clang::QualType::isNull(), clang::Sema::ExpressionEvaluationContextRecord::isPotentiallyEvaluated(), isSameOrCompatibleFunctionType(), clang::MiscellaneousDeductionFailure, clang::NonDeducedMismatch, None, PotentiallyEvaluated, clang::Result, runWithSufficientStackSpace(), clang::sema::TemplateDeductionInfo::SecondArg, clang::TemplateParameterList::size(), clang::Specialization, SubstAutoType(), SubstAutoTypeDependent(), clang::SubstitutionFailure, clang::Success, clang::TDF_AllowCompatibleFunctionType, clang::TDF_TopLevelParameterTypeList, and Unevaluated.
| TemplateDeductionResult Sema::DeduceTemplateArguments | ( | TemplateParameterList * | TemplateParams, |
| ArrayRef< TemplateArgument > | Ps, | ||
| ArrayRef< TemplateArgument > | As, | ||
| sema::TemplateDeductionInfo & | Info, | ||
| SmallVectorImpl< DeducedTemplateArgument > & | Deduced, | ||
| bool | NumberOfArgumentsMustMatch ) |
Definition at line 2857 of file SemaTemplateDeduction.cpp.
References ParameterToArgument.
| TemplateDeductionResult Sema::DeduceTemplateArguments | ( | VarTemplatePartialSpecializationDecl * | Partial, |
| ArrayRef< TemplateArgument > | TemplateArgs, | ||
| sema::TemplateDeductionInfo & | Info ) |
Definition at line 3466 of file SemaTemplateDeduction.cpp.
| TemplateDeductionResult Sema::DeduceTemplateArgumentsFromType | ( | TemplateDecl * | TD, |
| QualType | FromType, | ||
| sema::TemplateDeductionInfo & | Info ) |
Deduce the template arguments of the given template from FromType.
Used to implement the IsDeducible constraint for alias CTAD per C++ [over.match.class.deduct]p4.
It only supports class or type alias templates.
Definition at line 3473 of file SemaTemplateDeduction.cpp.
References AliasTemplate, Context, DeduceTemplateArguments(), clang::sema::TemplateDeductionInfo::getLocation(), clang::TemplateDecl::getTemplateParameters(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::InstantiationDepth, clang::Invalid, clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::Result, runWithSufficientStackSpace(), clang::TemplateParameterList::size(), clang::SubstitutionFailure, clang::Success, and Unevaluated.
| QualType Sema::DeduceTemplateSpecializationFromInitializer | ( | TypeSourceInfo * | TInfo, |
| const InitializedEntity & | Entity, | ||
| const InitializationKind & | Kind, | ||
| MultiExprArg | Init ) |
Definition at line 10065 of file SemaInit.cpp.
References AddOverloadCandidate(), AddTemplateOverloadCandidate(), clang::Aggregate, AliasTemplate, clang::AS_public, clang::LookupResult::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::cast(), clang::OverloadCandidateSet::clear(), clang::Complete, Context, clang::CPlusPlus20, clang::OverloadCandidateSet::CSK_Normal, DeclareAggregateDeductionGuideFromInitList(), clang::SemaBase::Diag(), clang::SemaBase::DiagCompat(), DiagnoseUseOfDecl(), clang::LookupResult::empty(), clang::LookupResult::end(), clang::Type::getAsCXXRecordDecl(), getASTContext(), clang::TemplateName::getAsTemplateDecl(), clang::TypeLoc::getBeginLoc(), clang::Type::getContainedDeducedType(), clang::Decl::getDeclContext(), clang::RecordDecl::getDefinition(), clang::TypeLoc::getEndLoc(), getLangOpts(), clang::OverloadCandidateSet::getPersistentArgsArray(), clang::TypeLoc::getSourceRange(), clang::FunctionTemplateDecl::getTemplatedDecl(), getTemplateNameKindForDiagnostics(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Expr::hasAnyTypeDependentArguments(), clang::InitializationKind::IK_Direct, clang::Inits, clang::isa(), 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, clang::SemaBase::PDiag(), clang::Result, SubstAutoTypeSourceInfo(), SubstAutoTypeSourceInfoDependent(), clang::LookupResult::suppressDiagnostics(), and clang::Template.
Referenced by BuildCXXNew(), BuildCXXTypeConstructExpr(), CheckTemplateArgument(), and deduceVarTypeFromInitializer().
Definition at line 13377 of file SemaDecl.cpp.
References CheckVariableDeclarationType(), clang::SemaHLSL::deduceAddressSpace(), deduceOpenCLAddressSpace(), deduceVarTypeFromInitializer(), clang::DirectInit, clang::NamedDecl::getDeclName(), getLangOpts(), clang::VarDecl::getPreviousDecl(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), HLSL(), clang::Init, clang::Decl::isInvalidDecl(), clang::NamedDecl::isLinkageValid(), clang::QualType::isNull(), MergeVarDeclTypes(), ObjC(), OpenCL(), clang::Decl::setInvalidDecl(), and clang::ValueDecl::setType().
Referenced by ActOnUninitializedDecl(), and AddInitializerToDecl().
| QualType Sema::deduceVarTypeFromInitializer | ( | VarDecl * | VDecl, |
| DeclarationName | Name, | ||
| QualType | Type, | ||
| TypeSourceInfo * | TSI, | ||
| SourceRange | Range, | ||
| bool | DirectInit, | ||
| Expr * | Init ) |
Definition at line 13229 of file SemaDecl.cpp.
References clang::AlreadyDiagnosed, clang::C23, Context, clang::InitializationKind::CreateForInit(), DeduceAutoType(), DeduceTemplateSpecializationFromInitializer(), clang::SemaBase::Diag(), DiagnoseAutoDeductionFailure(), clang::DirectInit, forceUnknownAnyToType(), clang::TypeLoc::getBeginLoc(), clang::Type::getContainedDeducedType(), clang::NamedDecl::getDeclName(), clang::Expr::getExprLoc(), getLangOpts(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::VarDecl::hasExternalStorage(), clang::Init, clang::InitializedEntity::InitializeVariable(), inTemplateInstantiation(), clang::isa(), clang::Type::isArrayType(), clang::Type::isConstantArrayType(), clang::VarDecl::isInitCapture(), clang::QualType::isNull(), clang::Type::isObjCIdType(), clang::VarDecl::isStaticDataMember(), clang::Result, and clang::Success.
Referenced by buildLambdaInitCaptureInitialization(), and DeduceVariableDeclarationType().
| ExprResult Sema::DefaultArgumentPromotion | ( | Expr * | E | ) |
DefaultArgumentPromotion (C99 6.5.2.2p6).
Used for function calls that do not have a prototype. Arguments that have type float or __fp16 are promoted to double. All other argument types are converted by UsualUnaryConversions().
Definition at line 884 of file SemaExpr.cpp.
References Context, clang::CPlusPlus, clang::ExprError(), clang::LangOptionsBase::ExtendTo64, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::BuiltinType::getKind(), getLangOpts(), getOpenCLOptions(), clang::Expr::getType(), ImpCastExprToType(), clang::InitializedEntity::InitializeTemporary(), clang::Expr::isGLValue(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Type::isNullPtrType(), isUnevaluatedContext(), clang::Type::isUnsignedIntegerType(), OpenCL(), PerformCopyInitialization(), and UsualUnaryConversions().
Referenced by BuildResolvedCallExpr(), checkUnknownAnyArg(), and DefaultVariadicArgumentPromotion().
| ExprResult Sema::DefaultFunctionArrayConversion | ( | Expr * | E, |
| bool | Diagnose = true ) |
DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
Definition at line 516 of file SemaExpr.cpp.
References clang::C99, checkAddressOfFunctionIsAvailable(), CheckPlaceholderExpr(), Context, clang::CPlusPlus, Diagnose, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParenCasts(), ImpCastExprToType(), clang::Type::isArrayType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isLValue(), and clang::QualType::isNull().
Referenced by ActOnStmtExprResult(), BuildExpressionFromDeclTemplateArgument(), DefaultFunctionArrayLvalueConversion(), IgnoredValueConversions(), isNullPointerValueTemplateArgument(), LookupMemberExpr(), rebuildUnknownAnyFunction(), and resolveAndFixAddressOfSingleOverloadCandidate().
| ExprResult Sema::DefaultFunctionArrayLvalueConversion | ( | Expr * | E, |
| bool | Diagnose = true ) |
Definition at line 755 of file SemaExpr.cpp.
References DefaultFunctionArrayConversion(), DefaultLvalueConversion(), Diagnose, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
Referenced by ActOnCapScopeReturnStmt(), ActOnGCCAsmStmt(), actOnOMPReductionKindClause(), BuildAtomicExpr(), BuiltinFunctionStart(), BuiltinIsWithinLifetime(), BuiltinOverflow(), BuiltinVectorMathConversions(), CheckArrow(), CheckBooleanCondition(), CheckCommaOperands(), CheckCompareOperands(), clang::checkGenericCastToPtr(), CheckMatrixElementwiseOperands(), CheckMatrixMultiplyOperands(), CheckSingleAssignmentConstraints(), CheckSizelessVectorOperands(), CheckVectorConditionalTypes(), CheckVectorOperands(), ConvertMaskedBuiltinArgs(), CreateBuiltinArraySubscriptExpr(), CreateBuiltinUnaryOp(), CreateGenericSelectionExpr(), CXXCheckConditionalOperands(), GetVTablePointer(), IgnoredValueConversions(), OpenCLArithmeticConversions(), OpenCLCheckVectorConditional(), PerformMemberExprBaseConversion(), clang::processConstant32BitIntArgument(), ResolveAndFixSingleFunctionTemplateSpecialization(), rewriteBuiltinFunctionDecl(), and UsualUnaryConversions().
| ExprResult Sema::DefaultLvalueConversion | ( | Expr * | E | ) |
Definition at line 640 of file SemaExpr.cpp.
References clang::Atomic, BoundsSafetyCheckUseOfCountAttrPtr(), CheckForNullPointerDereference(), CheckLValueToRValueConversionOperand(), CheckPlaceholderExpr(), Cleanup, Context, clang::CPlusPlus, clang::ImplicitCastExpr::Create(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), CurFPFeatureOverrides(), clang::SemaBase::Diag(), DiagnoseDirectIsaAccess(), clang::QualType::DK_nontrivial_c_struct, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getObjCLifetime(), getOpenCLOptions(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), clang::Expr::IgnoreParenCasts(), isCompleteType(), clang::QualType::isDestructedType(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, Compress >::isInvalid(), LookupOrdinaryName, LookupSingleName(), clang::Qualifiers::OCL_Weak, OpenCL(), clang::T, TUScope, and clang::VK_PRValue.
Referenced by ActOnCaseExpr(), ActOnCXXDelete(), actOnOMPReductionKindClause(), BuildArrayType(), BuildBuiltinOffsetOf(), buildCapture(), BuildVectorLiteral(), BuiltinBswapg(), BuiltinCountZeroBitsGeneric(), BuiltinDumpStruct(), BuiltinPopcountg(), BuiltinTriviallyRelocate(), CallExprUnaryConversions(), CheckCompareOperands(), CheckEnumConstant(), CheckObjCCollectionLiteralElement(), checkOpenMPIterationSpace(), CheckPointerToMemberOperands(), CheckRealImagOperand(), CheckTemplateArgument(), CreateBuiltinUnaryOp(), createTransparentClause(), DefaultFunctionArrayLvalueConversion(), finishContextualImplicitConversion(), FinishOpenMPLinearClause(), IgnoredValueConversions(), LookupMemberExpr(), PerformContextualImplicitConversion(), PerformImplicitConversion(), processImplicitMapsWithDefaultMappers(), and VerifyIntegerConstantExpression().
| ExprResult Sema::DefaultVariadicArgumentPromotion | ( | Expr * | E, |
| VariadicCallType | CT, | ||
| FunctionDecl * | FDecl ) |
Definition at line 1059 of file SemaExpr.cpp.
References ActOnBinOp(), ActOnIdExpression(), BuildCallExpr(), clang::Call, CheckPlaceholderExpr(), clang::CPlusPlus, DefaultArgumentPromotion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsPlaceholderType(), clang::Stmt::getBeginLoc(), clang::Stmt::getEndLoc(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::Type::isBlockPointerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isValidVarArgType(), maybeExtendBlockObject(), clang::Method, ObjC(), PP, RequireCompleteType(), clang::UnqualifiedId::setIdentifier(), clang::SemaObjC::stripARCUnbridgedCast(), TUScope, and clang::Undefined.
Referenced by BuildCallToObjectOfClassType(), GatherArgumentsForCall(), and SelectBestMethod().
| void Sema::DefineDefaultedComparison | ( | SourceLocation | Loc, |
| FunctionDecl * | FD, | ||
| DefaultedComparisonKind | DCK ) |
Definition at line 9252 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), Context, clang::FunctionDecl::doesThisDeclarationHaveABody(), clang::ActionResult< PtrTy, Compress >::get(), getASTMutationListener(), clang::Decl::getEndLoc(), clang::Decl::getLocation(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), clang::Decl::markUsed(), ResolveExceptionSpec(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::FunctionDecl::willHaveBody().
Referenced by DefineDefaultedFunction(), MarkFunctionReferenced(), and SetDeclDefaulted().
| void Sema::DefineImplicitCopyAssignment | ( | SourceLocation | CurrentLocation, |
| CXXMethodDecl * | MethodDecl ) |
Defines an implicitly-declared copy assignment operator.
Definition at line 15221 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(), getASTMutationListener(), getCurrentThisType(), clang::Decl::getEndLoc(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getNonObjectParameter(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::ValueDecl::getType(), clang::RecordDecl::hasFlexibleArrayMember(), clang::Invalid, 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::isReferenceType(), clang::SourceLocation::isValid(), LangOpts, LookupMemberName, clang::Decl::markUsed(), Other, ResolveExceptionSpec(), clang::LookupResult::resolveKind(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::VK_LValue, and clang::FunctionDecl::willHaveBody().
Referenced by DefineDefaultedFunction(), and MarkFunctionReferenced().
| void Sema::DefineImplicitCopyConstructor | ( | SourceLocation | CurrentLocation, |
| CXXConstructorDecl * | Constructor ) |
DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy constructor.
Definition at line 15941 of file SemaDeclCXX.cpp.
References ActOnCompoundStmt(), Context, clang::CopyConstructor, clang::CPlusPlus11, diagnoseDeprecatedCopyOperation(), getASTMutationListener(), getLangOpts(), MarkVTableUsed(), ResolveExceptionSpec(), and SetCtorInitializers().
Referenced by DefineDefaultedFunction(), and MarkFunctionReferenced().
| void Sema::DefineImplicitDefaultConstructor | ( | SourceLocation | CurrentLocation, |
| CXXConstructorDecl * | Constructor ) |
DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default constructor.
Definition at line 14240 of file SemaDeclCXX.cpp.
References clang::CompoundStmt, clang::Constructor, Context, getASTMutationListener(), clang::Decl::isInvalidDecl(), MarkVTableUsed(), ResolveExceptionSpec(), and SetCtorInitializers().
Referenced by DefineDefaultedFunction(), MarkFunctionReferenced(), and PerformConstructorInitialization().
| void Sema::DefineImplicitDestructor | ( | SourceLocation | CurrentLocation, |
| CXXDestructorDecl * | Destructor ) |
DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default destructor.
Definition at line 14531 of file SemaDeclCXX.cpp.
References CheckDestructor(), clang::CompoundStmt, Context, clang::Destructor, getASTMutationListener(), MarkBaseAndMemberDestructorsReferenced(), MarkVTableUsed(), and ResolveExceptionSpec().
Referenced by DefineDefaultedFunction(), and MarkFunctionReferenced().
| 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 16193 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(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), and clang::VK_PRValue.
Referenced by MarkFunctionReferenced().
| void Sema::DefineImplicitLambdaToFunctionPointerConversion | ( | SourceLocation | CurrentLoc, |
| CXXConversionDecl * | Conv ) |
Define the "body" of the conversion from a lambda object to a function pointer.
This routine doesn't actually define a sensible body; rather, it fills in the initialization expression needed to copy the lambda object into the block, and IR generation actually generates the real body of the block pointer conversion.
Definition at line 16124 of file SemaDeclCXX.cpp.
References BuildDeclRefExpr(), BuildReturnStmt(), clang::Type::castAs(), clang::CompoundStmt, Context, clang::CompoundStmt::Create(), getASTMutationListener(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::CXXRecordDecl::getLambdaStaticInvoker(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::ValueDecl::getType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), InstantiateFunctionDeclaration(), clang::Type::isUndeducedType(), MarkFunctionReferenced(), clang::Decl::markUsed(), clang::FunctionDecl::setBody(), clang::Decl::setReferenced(), clang::ValueDecl::setType(), and clang::VK_LValue.
Referenced by MarkFunctionReferenced().
| void Sema::DefineImplicitMoveAssignment | ( | SourceLocation | CurrentLocation, |
| CXXMethodDecl * | MethodDecl ) |
Defines an implicitly-declared move assignment operator.
Definition at line 15608 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(), getASTMutationListener(), getCurrentThisType(), clang::Decl::getEndLoc(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getNonObjectParameter(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), getPointeeType(), clang::QualType::getQualifiers(), clang::ValueDecl::getType(), clang::RecordDecl::hasFlexibleArrayMember(), clang::Invalid, 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::isReferenceType(), clang::SourceLocation::isValid(), LangOpts, LookupMemberName, clang::Decl::markUsed(), Other, ResolveExceptionSpec(), clang::LookupResult::resolveKind(), clang::FunctionDecl::setBody(), clang::Decl::setInvalidDecl(), clang::VK_LValue, clang::VK_XValue, and clang::FunctionDecl::willHaveBody().
Referenced by DefineDefaultedFunction(), and MarkFunctionReferenced().
| void Sema::DefineImplicitMoveConstructor | ( | SourceLocation | CurrentLocation, |
| CXXConstructorDecl * | Constructor ) |
DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move constructor.
Definition at line 16079 of file SemaDeclCXX.cpp.
References ActOnCompoundStmt(), Context, getASTMutationListener(), MarkVTableUsed(), clang::MoveConstructor, ResolveExceptionSpec(), and SetCtorInitializers().
Referenced by DefineDefaultedFunction(), and MarkFunctionReferenced().
| void Sema::DefineInheritingConstructor | ( | SourceLocation | UseLoc, |
| CXXConstructorDecl * | Constructor ) |
Define the specified inheriting constructor.
Definition at line 14384 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::CompoundStmt, clang::Constructor, Context, clang::Sema::InheritedConstructorInfo::findConstructorForBase(), getASTMutationListener(), clang::Decl::getLocation(), clang::ConstructorUsingShadowDecl::getParent(), clang::Init, clang::Inits, MarkFunctionReferenced(), MarkVTableUsed(), ResolveExceptionSpec(), SetCtorInitializers(), and clang::CXXRecordDecl::vbases().
Referenced by MarkFunctionReferenced().
| bool Sema::DefineUsedVTables | ( | ) |
Define all of the vtables that have been used in this translation unit and reference any virtual members used by those vtables.
Definition at line 19065 of file SemaDeclCXX.cpp.
References clang::cast(), clang::Class, Consumer, Context, Diag(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::FunctionDecl::hasBody(), clang::FunctionDecl::isInlined(), LoadExternalVTableUses(), MarkVirtualMemberExceptionSpecsNeeded(), MarkVirtualMembersReferenced(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ImplicitInstantiation, VTablesUsed, and VTableUses.
Referenced by ActOnEndOfTranslationUnitFragment().
| 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.
| Stmts | If 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. |
Definition at line 20709 of file SemaExpr.cpp.
References AnalysisWarnings, clang::SemaBase::Diag(), ExprEvalContexts, FunctionScopes, getCurFunction(), and clang::Decl::isFirstDecl().
Referenced by DiagRuntimeBehavior().
DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of an overriding method.
Definition at line 3311 of file SemaDeclCXX.cpp.
References clang::CXXMethodDecl::begin_overridden_methods(), Diag(), Diags, clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), getSourceManager(), clang::Decl::hasAttr(), clang::Inconsistent, clang::isa(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), and clang::CXXMethodDecl::size_overridden_methods().
Referenced by CheckCompletedCXXClass().
| void Sema::DiagnoseAbstractType | ( | const CXXRecordDecl * | RD | ) |
Definition at line 6023 of file SemaDeclCXX.cpp.
References Diag(), Diags, clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getFinalOverriders(), clang::Method, and PureVirtualClassDiagSet.
Referenced by CheckCompletedCXXClass(), RequireNonAbstractType(), and SetCtorInitializers().
| void Sema::DiagnoseAlwaysNonNullPointer | ( | Expr * | E, |
| Expr::NullPointerConstantKind | NullType, | ||
| bool | IsEqual, | ||
| SourceRange | Range ) |
Diagnose pointers that are always non-null.
| E | the expression containing the pointer |
| NullKind | NPCK_NotNull if E is a cast to bool, otherwise, E is compared to a null pointer |
| IsEqual | True when the comparison is equal to a null pointer |
| Range | Extra SourceRange to highlight in the diagnostic |
Definition at line 13650 of file SemaChecking.cpp.
References clang::Call, CheckForReference(), clang::FixItHint::CreateInsertion(), clang::SemaBase::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::isa(), 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(), clang::SemaBase::PDiag(), clang::Stmt::printPretty(), SM, clang::Decl::specific_attrs(), clang::T, clang::FunctionDecl::TK_FunctionTemplate, and tryExprAsCall().
Referenced by CheckCompareOperands(), and CheckImplicitConversion().
| void Sema::DiagnoseAmbiguousLookup | ( | LookupResult & | Result | ) |
Produce a diagnostic describing the ambiguity that resulted from name lookup.
| Result | The result of the ambiguous lookup to be diagnosed. |
Definition at line 2793 of file SemaLookup.cpp.
References clang::AmbiguousBaseSubobjects, clang::AmbiguousBaseSubobjectTypes, clang::AmbiguousReference, clang::AmbiguousReferenceToPlaceholderVariable, clang::AmbiguousTagHiding, clang::CXXBasePaths::begin(), clang::cast(), Context, clang::CXXBasePath::Decls, clang::SemaBase::Diag(), clang::LookupResult::Filter::done(), clang::CXXBasePaths::end(), clang::LookupResult::Filter::erase(), clang::Found, clang::CXXBasePaths::front(), getAmbiguousPathsDisplayString(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::NamedDecl::getUnderlyingDecl(), clang::LookupResult::Filter::hasNext(), clang::isa(), clang::Decl::isInIdentifierNamespace(), clang::LookupResult::Filter::next(), and clang::Result.
Referenced by ActOnSizeofParameterPackExpr().
| 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 7646 of file SemaOverload.cpp.
References clang::cast(), Context, diagnoseDiagnoseIfAttrsWith(), clang::Function, and clang::Result.
Referenced by checkCall().
| 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 7664 of file SemaOverload.cpp.
References Context, diagnoseDiagnoseIfAttrsWith(), and clang::Result.
Referenced by DiagnoseUseOfDecl().
| void Sema::DiagnoseAssignmentAsCondition | ( | Expr * | E | ) |
DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition, warn if it's an assignment.
Definition at line 20838 of file SemaExpr.cpp.
References clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), DiagnoseAssignmentAsCondition(), clang::Stmt::getBeginLoc(), clang::SourceRange::getEnd(), getLocForEndOfToken(), clang::Selector::getNameForSlot(), clang::Stmt::getSourceRange(), clang::Expr::IgnoreParenCasts(), clang::Selector::isUnarySelector(), ObjC(), clang::OMF_init, and Open.
Referenced by CheckBooleanCondition(), and DiagnoseAssignmentAsCondition().
DiagnoseAssignmentEnum - Warn if assignment to enum is a constant integer not in the range of enum values.
Definition at line 1728 of file SemaStmt.cpp.
References AdjustAPSInt(), clang::Type::castAsEnumDecl(), CmpEnumVals(), Context, clang::SemaBase::Diag(), Diags, EqEnumVals(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::QualType::getUnqualifiedType(), clang::Type::isEnumeralType(), clang::Type::isIntegerType(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and IsValueInFlagEnum().
Referenced by 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 17267 of file SemaExpr.cpp.
References clang::Assigning, clang::Type::castAs(), clang::Casting, clang::Compatible, clang::CompatiblePointerDiscardsQualifiers, clang::CompatibleVoidPtrToNonVoidPtr, Context, clang::Converting, clang::CPlusPlus, clang::SemaBase::Diag(), DiagnoseAssignmentEnum(), clang::SemaObjC::EmitRelatedResultTypeNote(), clang::SemaObjC::EmitRelatedResultTypeNoteForReturn(), clang::OverloadExpr::find(), clang::FunctionVoidPointer, clang::Qualifiers::getAddressSpace(), clang::ObjCObjectPointerType::getInterfaceType(), getLangOpts(), clang::Decl::getLocation(), clang::Qualifiers::getObjCLifetime(), clang::Type::getPointeeOrArrayElementType(), clang::Type::getPointeeType(), clang::Qualifiers::getPointerAuth(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::QualType::getUnqualifiedType(), HandleFunctionTypeMismatch(), clang::ObjCInterfaceDecl::hasDefinition(), clang::ConversionFixItGenerator::Hints, clang::Incompatible, clang::IncompatibleBlockPointer, clang::IncompatibleFunctionPointer, clang::IncompatibleFunctionPointerStrict, clang::IncompatibleNestedPointerAddressSpaceMismatch, clang::IncompatibleNestedPointerQualifiers, clang::IncompatibleObjCQualifiedId, clang::IncompatibleObjCWeakRef, clang::IncompatiblePointer, clang::IncompatiblePointerDiscardsQualifiers, clang::IncompatiblePointerSign, clang::IncompatibleVectors, clang::Initializing, clang::IntToBlockPointer, clang::IntToPointer, clang::Type::isArrayType(), clang::PointerAuthQualifier::isEquivalent(), isInvalid(), clang::ConversionFixItGenerator::isNull(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedIdType(), clang::Type::isSpecificBuiltinType(), IsStringLiteralToNonConstPointerConversion(), clang::ConversionFixItGenerator::Kind, maybeDiagnoseAssignmentToFunction(), NoteAllOverloadCandidates(), ObjC(), clang::Passing, clang::Passing_CFAudited, clang::SemaBase::PDiag(), clang::PointerToInt, clang::ObjCObjectPointerType::quals(), clang::Returning, clang::Sending, and clang::ConversionFixItGenerator::tryToFixConversion().
Referenced by ActOnIndirectGotoStmt(), CheckAssignmentOperands(), clang::InitializationSequence::Perform(), and PerformImplicitConversion().
Definition at line 5423 of file SemaTemplateDeduction.cpp.
References clang::SemaBase::Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Init, clang::isa(), and clang::VarDecl::isInitCapture().
Referenced by deduceVarTypeFromInitializer().
| void Sema::DiagnoseAvailabilityOfDecl | ( | NamedDecl * | D, |
| ArrayRef< SourceLocation > | Locs ) |
Definition at line 1162 of file SemaAvailability.cpp.
References DiagnoseAvailabilityOfDecl().
| void Sema::DiagnoseAvailabilityOfDecl | ( | NamedDecl * | D, |
| ArrayRef< SourceLocation > | Locs, | ||
| const ObjCInterfaceDecl * | UnknownObjCClass, | ||
| bool | ObjCPropertyAccess, | ||
| bool | AvoidPartialAvailabilityChecks, | ||
| ObjCInterfaceDecl * | ClassReceiver ) |
Definition at line 1120 of file SemaAvailability.cpp.
References clang::AR_Available, clang::AR_NotYetIntroduced, Context, EmitAvailabilityWarning(), clang::ObjCPropertyDecl::findPropertyDecl(), getCurFunctionAvailabilityContext(), clang::Result, and ShouldDiagnoseAvailabilityOfDecl().
Referenced by DiagnoseAvailabilityOfDecl(), DiagnoseUseOfDecl(), and InstantiateClassTemplateSpecialization().
| bool Sema::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:
Definition at line 6285 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), clang::DeclarationNameInfo::getLoc(), and clang::DeclarationNameInfo::getName().
Referenced by ActOnAliasDeclaration(), ActOnEnumConstant(), ActOnTag(), CheckClassTemplate(), CheckUsingShadowDecl(), and HandleDeclarator().
| void Sema::DiagnoseCommaOperator | ( | const Expr * | LHS, |
| SourceLocation | Loc ) |
Look for instances where it is likely the comma operator is confused with another operator.
There is an explicit list of acceptable expressions for the left hand side of the comma operator, otherwise emit a warning.
Definition at line 14384 of file SemaExpr.cpp.
References clang::Scope::BreakScope, Context, clang::Scope::ContinueScope, clang::Scope::ControlScope, clang::FixItHint::CreateInsertion(), clang::Scope::DeclScope, clang::SemaBase::Diag(), clang::Stmt::getBeginLoc(), getCurScope(), clang::Stmt::getEndLoc(), clang::Scope::getFlags(), getLangOpts(), clang::Stmt::getSourceRange(), IgnoreCommaOperand(), inTemplateInstantiation(), clang::SourceLocation::isMacroID(), LangOpts, and PP.
Referenced by CheckCommaOperands().
| bool Sema::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.
Returns true if a diagnostic is emitted.
Definition at line 8166 of file SemaExpr.cpp.
References Context, clang::SemaBase::Diag(), findMacroSpelling(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, clang::Expr::NPCK_CXX11_nullptr, clang::Expr::NPCK_NotNull, clang::Expr::NPCK_ZeroExpression, and clang::Expr::NPCK_ZeroLiteral.
Referenced by CheckConditionalOperands(), and CXXCheckConditionalOperands().
| bool clang::Sema::diagnoseConflictingFunctionEffect | ( | const FunctionEffectsRef & | FX, |
| const FunctionEffectWithCondition & | EC, | ||
| SourceLocation | NewAttrLoc ) |
Warn and return true if adding a function effect to a set would create a conflict.
Definition at line 1416 of file SemaFunctionEffects.cpp.
References clang::FunctionEffect::Allocating, clang::FunctionEffectWithCondition::Cond, clang::FunctionEffectWithCondition::description(), Diag(), clang::FunctionEffectWithCondition::Effect, clang::EffectConditionExpr::getCondition(), clang::Incompatible, clang::FunctionEffect::kind(), and clang::FunctionEffect::NonBlocking.
Referenced by handleNonBlockingNonAllocatingTypeAttr().
| void Sema::DiagnoseDeletedDefaultedFunction | ( | FunctionDecl * | FD | ) |
Produce notes explaining why a defaulted function was defined as deleted.
Definition at line 10008 of file SemaDeclCXX.cpp.
References clang::Sema::DefaultedFunctionKind::asComparison(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::cast(), getDefaultedFunctionKind(), clang::Decl::getLexicalDeclContext(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Sema::DefaultedFunctionKind::isSpecialMember(), and ShouldDeleteSpecialMember().
Referenced by CheckCompletedCXXClass(), and NoteDeletedFunction().
| 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 2457 of file SemaExpr.cpp.
References clang::LookupResult::begin(), CheckCXXThisCapture(), CodeSynthesisContexts, clang::FixItHint::CreateInsertion(), CurContext, clang::Sema::CodeSynthesisContext::DefaultFunctionArgumentInstantiation, clang::SemaBase::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().
| bool Sema::DiagnoseEmptyLookup | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| LookupResult & | R, | ||
| CorrectionCandidateCallback & | CCC, | ||
| TemplateArgumentListInfo * | ExplicitTemplateArgs = nullptr, | ||
| ArrayRef< Expr * > | Args = {}, | ||
| DeclContext * | LookupCtx = nullptr ) |
Diagnose an empty lookup.
Definition at line 2516 of file SemaExpr.cpp.
References clang::LookupResult::addDecl(), AddOverloadCandidate(), AddOverloadedCallCandidates(), AddTemplateOverloadCandidate(), clang::AS_none, clang::OverloadCandidateSet::BestViableFunction(), clang::cast(), clang::LookupResult::clear(), computeDeclContext(), Context, CorrectTypo(), clang::CPlusPlus, clang::OverloadCandidateSet::CSK_Normal, CurContext, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::SemaBase::Diag(), DiagnoseDependentMemberLookup(), diagnoseTypo(), clang::LookupResult::empty(), clang::ErrorRecovery, clang::NestedNameSpecifier::getAsRecordDecl(), clang::DeclarationName::getAsString(), clang::TypoCorrection::getAsString(), 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::DeclarationName::getNameKind(), clang::LookupResult::getNameLoc(), clang::DeclContext::getRedeclContext(), clang::DeclarationNameInfo::getSourceRange(), clang::NamedDecl::getUnderlyingDecl(), clang::isa(), clang::NamedDecl::isCXXClassMember(), clang::CXXScopeSpec::isEmpty(), clang::TypoCorrection::isOverloaded(), LookupQualifiedName(), LookupTemplateName(), clang::DeclAccessPair::make(), clang::OR_Success, clang::SemaBase::PDiag(), clang::LookupResult::resolveKind(), clang::LookupResult::setLookupName(), clang::LookupResult::setNamingClass(), clang::TemplateArgumentListInfo::size(), clang::LookupResult::suppressDiagnostics(), TemplateNameIsRequired, and clang::TypoCorrection::WillReplaceSpecifier().
Referenced by ActOnIdExpression(), ActOnLambdaExpressionAfterIntroducer(), and BuildRecoveryCallExpr().
Warn if a for/while loop statement S, which is followed by PossibleBody, has a suspicious null statement as a body.
Definition at line 15641 of file SemaChecking.cpp.
References CurrentInstantiationScope, clang::SemaBase::Diag(), Diags, clang::Stmt::getBeginLoc(), clang::NullStmt::getSemiLoc(), clang::isa(), ShouldDiagnoseEmptyStmtBody(), and SourceMgr.
Referenced by ActOnCompoundStmt().
| 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 15620 of file SemaChecking.cpp.
References CurrentInstantiationScope, clang::SemaBase::Diag(), clang::NullStmt::getSemiLoc(), ShouldDiagnoseEmptyStmtBody(), and SourceMgr.
Referenced by ActOnEndOfDeferStmt(), ActOnFinishSwitchStmt(), ActOnIfStmt(), and FinishCXXForRangeStmt().
| void Sema::DiagnoseEqualityWithExtraParens | ( | ParenExpr * | ParenE | ) |
Redundant parentheses over an equality comparison can indicate that the user intended an assignment used as condition.
Definition at line 20894 of file SemaExpr.cpp.
References Context, clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::ParenExpr::getBeginLoc(), clang::SourceRange::getEnd(), clang::Stmt::getSourceRange(), clang::ParenExpr::getSubExpr(), clang::Expr::IgnoreParens(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isMacroID(), clang::ParenExpr::isProducedByFoldExpansion(), clang::Expr::isTypeDependent(), and clang::Expr::MLV_Valid.
Referenced by CheckBooleanCondition().
| void Sema::diagnoseEquivalentInternalLinkageDeclarations | ( | SourceLocation | Loc, |
| const NamedDecl * | D, | ||
| ArrayRef< const NamedDecl * > | Equiv ) |
Definition at line 11221 of file SemaOverload.cpp.
References Diag(), clang::Module::getFullModuleName(), clang::Decl::getLocation(), and getOwningModule().
Referenced by clang::LookupResult::resolveKind().
| void Sema::DiagnoseExceptionUse | ( | SourceLocation | Loc, |
| bool | IsTry ) |
Definition at line 4500 of file SemaStmt.cpp.
References Context, CUDA(), CurContext, getLangOpts(), getSourceManager(), clang::T, and targetDiag().
Referenced by ActOnCXXTryBlock(), and BuildCXXThrow().
| void Sema::diagnoseExprIntendedAsTemplateName | ( | Scope * | S, |
| ExprResult | TemplateName, | ||
| SourceLocation | Less, | ||
| SourceLocation | Greater ) |
Definition at line 633 of file SemaTemplate.cpp.
References clang::CXXScopeSpec::Adopt(), CorrectTypo(), clang::SemaBase::Diag(), diagnoseTypo(), clang::ErrorRecovery, clang::Found, clang::DeclarationName::getAsString(), getAsTemplateNameDecl(), clang::DeclarationNameInfo::getBeginLoc(), clang::TypoCorrection::getCorrectionDecl(), getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::CXXScopeSpec::getRange(), clang::Greater, clang::TypoCorrection::isKeyword(), clang::Less, LookupMemberName, LookupOrdinaryName, clang::SemaBase::PDiag(), and Sema().
| void Sema::diagnoseFunctionEffectConversion | ( | QualType | DstType, |
| QualType | SrcType, | ||
| SourceLocation | Loc ) |
Warn when implicitly changing function effects.
Definition at line 696 of file Sema.cpp.
References clang::SemaBase::Diag(), and clang::FunctionEffectsRef::get().
Referenced by ImpCastExprToType().
| void clang::Sema::diagnoseFunctionEffectMergeConflicts | ( | const FunctionEffectSet::Conflicts & | Errs, |
| SourceLocation | NewLoc, | ||
| SourceLocation | OldLoc ) |
Definition at line 1462 of file SemaFunctionEffects.cpp.
References Diag().
Referenced by CheckOverridingFunctionAttributes(), and MergeFunctionDecl().
| void Sema::DiagnoseFunctionSpecifiers | ( | const DeclSpec & | DS | ) |
Diagnose function specifiers on a declaration of an identifier that does not identify a function.
Definition at line 6835 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), clang::DeclSpec::getExplicitSpecLoc(), clang::DeclSpec::getNoreturnSpecLoc(), clang::DeclSpec::getVirtualSpecLoc(), clang::DeclSpec::hasExplicitSpecifier(), clang::DeclSpec::isNoreturnSpecified(), and clang::DeclSpec::isVirtualSpecified().
Referenced by ActOnParamDeclarator(), ActOnTypedefDeclarator(), ActOnVariableDeclarator(), HandleField(), HandleMSProperty(), and ParsedFreeStandingDeclSpec().
| void Sema::DiagnoseHiddenVirtualMethods | ( | CXXMethodDecl * | MD | ) |
Diagnose methods which overload virtual methods in a base class without overriding any.
Definition at line 10566 of file SemaDeclCXX.cpp.
References Diag(), Diags, FindHiddenVirtualMethods(), clang::Decl::getLocation(), clang::Decl::isInvalidDecl(), and NoteHiddenVirtualMethods().
Referenced by CheckCompletedCXXClass().
| void Sema::diagnoseIgnoredQualifiers | ( | unsigned | DiagID, |
| unsigned | Quals, | ||
| SourceLocation | FallbackLoc, | ||
| SourceLocation | ConstQualLoc = SourceLocation(), | ||
| SourceLocation | VolatileQualLoc = SourceLocation(), | ||
| SourceLocation | RestrictQualLoc = SourceLocation(), | ||
| SourceLocation | AtomicQualLoc = SourceLocation(), | ||
| SourceLocation | UnalignedQualLoc = SourceLocation() ) |
Definition at line 2914 of file SemaType.cpp.
References clang::FixItHint::CreateRemoval(), clang::SemaBase::Diag(), getSourceManager(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), clang::NumQuals, clang::DeclSpec::TQ_atomic, clang::DeclSpec::TQ_const, clang::DeclSpec::TQ_restrict, clang::DeclSpec::TQ_unaligned, and clang::DeclSpec::TQ_volatile.
Referenced by CheckConstructorDeclarator(), CheckDestructorDeclarator(), DeduceFunctionTypeFromReturnExpr(), and diagnoseRedundantReturnTypeQualifiers().
| void Sema::DiagnoseImmediateEscalatingReason | ( | FunctionDecl * | FD | ) |
Definition at line 2601 of file SemaDeclCXX.cpp.
References clang::CallExpr::arguments(), Diag(), clang::CXXCtorInitializer::getAnyMember(), clang::Stmt::getBeginLoc(), clang::CallExpr::getCallee(), clang::CXXConstructExpr::getConstructor(), clang::DeclRefExpr::getDecl(), clang::CallExpr::getDirectCallee(), clang::Decl::getLocation(), clang::CXXCtorInitializer::getSourceRange(), clang::Stmt::getSourceRange(), clang::FunctionDecl::hasBody(), clang::Expr::IgnoreImplicit(), clang::Init, clang::isa(), clang::FunctionDecl::isConsteval(), clang::CXXConstructExpr::isImmediateEscalating(), clang::DeclRefExpr::isImmediateEscalating(), clang::FunctionDecl::isImmediateEscalating(), clang::CXXCtorInitializer::isWritten(), Sema(), clang::SemaBase::SemaRef, clang::T, and clang::DynamicRecursiveASTVisitorBase< false >::TraverseConstructorInitializer().
Referenced by CheckImmediateEscalatingFunctionDefinition(), EvaluateAndDiagnoseImmediateInvocation(), and HandleImmediateInvocations().
| bool Sema::DiagnoseInvalidExplicitObjectParameterInLambda | ( | CXXMethodDecl * | Method, |
| SourceLocation | CallLoc ) |
Returns true if the explicit object parameter was invalid.
Definition at line 415 of file SemaLambda.cpp.
References BuildBasePathArray(), CheckBaseClassAccess(), Context, clang::SemaBase::Diag(), clang::CXXBasePaths::front(), getAmbiguousPathsDisplayString(), getASTContext(), clang::ASTContext::getCanonicalTagType(), clang::Decl::getLocation(), clang::CXXBasePaths::isAmbiguous(), clang::CXXRecordDecl::isCapturelessLambda(), IsDerivedFrom(), clang::isLambdaCallWithExplicitObjectParameter(), and clang::Method.
Referenced by PrepareExplicitObjectArgument().
| void Sema::DiagnoseInvalidJumps | ( | Stmt * | Body | ) |
Definition at line 1094 of file JumpDiagnostics.cpp.
Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().
| void Sema::DiagnoseMisalignedMembers | ( | ) |
Diagnoses the current set of gathered accesses.
This happens at the end of each expression evaluation context. Diagnostics are emitted only for accesses gathered in the current evaluation context.
Definition at line 16240 of file SemaChecking.cpp.
References currentEvaluationContext(), clang::SemaBase::Diag(), clang::NamedDecl::getName(), clang::Decl::getSourceRange(), and clang::Sema::ExpressionEvaluationContextRecord::MisalignedMembers.
Referenced by PopExpressionEvaluationContext().
| 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 5662 of file SemaLookup.cpp.
References Context, diagnoseMissingImport(), getDefinitionToImport(), clang::Decl::getLocation(), and getOwningModule().
Referenced by computeDeclContext(), diagnoseMissingArgument(), diagnoseMissingImport(), diagnoseTypo(), DiagnoseUninstantiableTemplate(), and RequireCompleteEnumDecl().
| void Sema::diagnoseMissingImport | ( | SourceLocation | Loc, |
| const NamedDecl * | Decl, | ||
| SourceLocation | DeclLoc, | ||
| ArrayRef< Module * > | Modules, | ||
| MissingImportKind | MIK, | ||
| bool | Recover ) |
Definition at line 5692 of file SemaLookup.cpp.
References createImplicitModuleImportForErrorRecovery(), clang::SemaBase::Diag(), getASTContext(), getCurrentModule(), clang::Module::getFullModuleName(), getHeaderNameForHeader(), clang::Module::getPrimaryModuleInterfaceName(), clang::Module::getTopLevelModule(), clang::Module::getTopLevelModuleName(), clang::isa(), clang::Module::isExplicitGlobalModule(), clang::Module::isImplicitGlobalModule(), clang::Module::isModuleMapModule(), clang::Module::isPrivateModule(), PP, and SourceMgr.
| void Sema::diagnoseMissingTemplateArguments | ( | const CXXScopeSpec & | SS, |
| bool | TemplateKeyword, | ||
| TemplateDecl * | TD, | ||
| SourceLocation | Loc ) |
Definition at line 4848 of file SemaTemplate.cpp.
References Context, diagnoseMissingTemplateArguments(), and clang::CXXScopeSpec::getScopeRep().
| void Sema::diagnoseMissingTemplateArguments | ( | TemplateName | Name, |
| SourceLocation | Loc ) |
Definition at line 4839 of file SemaTemplate.cpp.
References clang::SemaBase::Diag(), clang::TemplateName::getAsTemplateDecl(), getTemplateNameKindForDiagnostics(), and NoteTemplateLocation().
Referenced by ActOnTemplateTemplateArgument(), BuildDeclarationNameExpr(), BuildMemberReferenceExpr(), BuildTemplateIdExpr(), CheckTemplateTypeArgument(), diagnoseMissingTemplateArguments(), and DiagnoseUnknownTypeName().
Definition at line 4243 of file SemaOverload.cpp.
References clang::OverloadCandidateSet::CompleteCandidates(), clang::OverloadCandidateSet::CSK_Normal, Diag(), clang::OverloadCandidateSet::empty(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), IsUserDefinedConversion(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_No_Viable_Function, RequireCompleteType(), and clang::ImplicitConversionSequence::UserDefined.
Referenced by BuildConvertedConstantExpression(), and PerformContextuallyConvertToBool().
| void Sema::DiagnoseNonDefaultPragmaAlignPack | ( | PragmaAlignPackDiagnoseKind | Kind, |
| SourceLocation | IncludeLoc ) |
Definition at line 550 of file SemaAttr.cpp.
References AlignPackIncludeStack, AlignPackStack, ChangedStateAtExit, clang::Sema::AlignPackIncludeState::CurrentPragmaLocation, clang::Sema::AlignPackIncludeState::CurrentValue, clang::SemaBase::Diag(), NonDefaultStateAtInclude, and clang::Sema::AlignPackIncludeState::ShouldWarnOnInclude.
| void Sema::DiagnoseNontrivial | ( | const CXXRecordDecl * | Record, |
| CXXSpecialMemberKind | CSM ) |
Diagnose why the specified class does not have a trivial special member of the given kind.
Definition at line 10290 of file SemaDeclCXX.cpp.
References checkTrivialSubobjectCall(), Context, clang::CopyAssignment, clang::CopyConstructor, clang::Decl::getLocation(), clang::IgnoreTrivialABI, and TSK_CompleteObject.
Referenced by CheckNontrivialField().
| 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 680 of file Sema.cpp.
References clang::SemaBase::Diag(), clang::Type::getNullability(), clang::NonNull, clang::Nullable, and clang::NullableResult.
Referenced by CreateOverloadedBinOp(), ImpCastExprToType(), PerformConstructorInitialization(), and PerformImplicitConversion().
| void Sema::DiagnosePrecisionLossInComplexDivision | ( | ) |
Definition at line 1235 of file SemaAttr.cpp.
References clang::SemaBase::Diag(), ExcessPrecisionNotSatisfied, LocationOfExcessPrecisionNotSatisfied, and clang::Num.
Referenced by ActOnEndOfTranslationUnit().
| 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.
| SS | The nested-name-specifier of the declarator-id. |
| DC | The declaration context to which the nested-name-specifier resolves. |
| Name | The name of the entity being declared. |
| Loc | The location of the name of the entity being declared. |
| IsMemberSpecialization | Whether we are declaring a member specialization. |
| TemplateId | The template-id, if any. |
Definition at line 6300 of file SemaDecl.cpp.
References clang::cast(), clang::CXXScopeSpec::clear(), Context, clang::FixItHint::CreateRemoval(), CurContext, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXDestructorName, clang::SemaBase::Diag(), clang::DeclContext::Encloses(), clang::DeclContext::Equals(), clang::NestedNameSpecifierLoc::getAsTypeLoc(), clang::DeclarationName::getCXXNameType(), clang::DeclarationName::getNameKind(), clang::DeclContext::getParent(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::isa(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isValid(), clang::SourceLocation::isValid(), LangOpts, clang::CXXScopeSpec::location_data(), clang::T, and clang::TemplateIdAnnotation::TemplateKWLoc.
Referenced by ActOnClassTemplateSpecialization(), ActOnCXXMemberDeclarator(), ActOnTag(), CheckClassTemplate(), and HandleDeclarator().
| void Sema::DiagnoseReturnInConstructorExceptionHandler | ( | CXXTryStmt * | TryBlock | ) |
Definition at line 18656 of file SemaDeclCXX.cpp.
References clang::CXXTryStmt::getHandler(), clang::CXXTryStmt::getNumHandlers(), and SearchForReturnInStmt().
Referenced by ActOnFinishFunctionBody().
| void Sema::DiagnoseSelfMove | ( | const Expr * | LHSExpr, |
| const Expr * | RHSExpr, | ||
| SourceLocation | OpLoc ) |
DiagnoseSelfMove - Emits a warning if a value is moved to itself.
Definition at line 15709 of file SemaChecking.cpp.
References clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), Diags, clang::CallExpr::getArg(), clang::MemberExpr::getBase(), clang::DeclRefExpr::getBeginLoc(), clang::Decl::getCanonicalDecl(), clang::DeclRefExpr::getDecl(), clang::MemberExpr::getMemberDecl(), clang::CallExpr::getNumArgs(), getSelfAssignmentClassMemberCandidate(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), inTemplateInstantiation(), clang::isa(), and clang::CallExpr::isCallToStdMove().
Referenced by CreateBuiltinBinOp(), and CreateOverloadedBinOp().
| void Sema::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.
Definition at line 412 of file SemaExpr.cpp.
References Context, clang::CPlusPlus11, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::Decl::getAttr(), clang::NamedDecl::getDeclName(), clang::Stmt::getEndLoc(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::AttributeCommonInfo::getRange(), int, clang::SourceLocation::isInvalid(), clang::Expr::isValueDependent(), and PP.
Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildCXXNew(), BuildResolvedCallExpr(), and CompleteConstructorCall().
| 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 8670 of file SemaDecl.cpp.
References clang::cast(), computeShadowedDeclKind(), clang::SemaBase::Diag(), getCaptureLocation(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::isa(), clang::sema::CapturingScopeInfo::isCXXThisCaptured(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), and clang::sema::LambdaScopeInfo::ShadowingDecls.
Referenced by BuildLambdaExpr().
| 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 15736 of file SemaDecl.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::Type::isDependentType(), clang::QualType::isPODType(), LangOpts, clang::Parameter, and clang::T.
Referenced by ActOnFinishFunctionBody().
| void Sema::DiagnoseStaticAssertDetails | ( | const Expr * | E | ) |
Try to print more useful information about a failed static_assert with expression \E.
Definition at line 17655 of file SemaDeclCXX.cpp.
References clang::Cond, Context, ConvertAPValueToString(), Diag(), DiagnoseTypeTraitDetails(), clang::Expr::EvaluateAsRValue(), clang::Expr::getType(), clang::isa(), clang::Type::isBooleanType(), clang::Result, and UsefulToPrintExpr().
Referenced by BuildStaticAssertDeclaration().
| 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.
| Loc | The location of the declaration that shadows a template parameter. |
| PrevDecl | The template parameter that the declaration shadows. |
| SupportedForCompatibility | Whether to issue the diagnostic as a warning for compatibility with older versions of clang. Ignored when MSVC compatibility is enabled. |
Definition at line 906 of file SemaTemplate.cpp.
References clang::cast(), clang::SemaBase::Diag(), getLangOpts(), clang::Decl::isTemplateParameter(), and NoteTemplateParameterLocation().
Referenced by ActOnAliasDeclaration(), ActOnDecompositionDeclarator(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnNamespaceAliasDef(), ActOnParamDeclarator(), ActOnTag(), BuildUsingDeclaration(), CheckClassTemplate(), HandleDeclarator(), HandleField(), HandleMSProperty(), and maybeDiagnoseTemplateParameterShadow().
| void Sema::DiagnoseTypeTraitDetails | ( | const Expr * | E | ) |
If E represents a built-in type trait, or a known standard type trait, try to print more information about why the type type-trait failed.
This assumes we already evaluated the expression to a false boolean value.
Definition at line 2681 of file SemaTypeTraits.cpp.
References clang::Expr::containsErrors(), DiagnoseIsEmptyReason(), DiagnoseIsFinalReason(), DiagnoseNonAbstractReason(), DiagnoseNonAggregateReason(), DiagnoseNonAssignableReason(), DiagnoseNonConstructibleReason(), DiagnoseNonStandardLayoutReason(), DiagnoseNonTriviallyCopyableReason(), DiagnoseNonTriviallyRelocatableReason(), ExtractTypeTraitFromExpression(), clang::Type::getAsCXXRecordDecl(), clang::Stmt::getBeginLoc(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isDependentType(), and clang::CXXRecordDecl::isEffectivelyFinal().
Referenced by DiagnoseStaticAssertDetails(), and diagnoseWellFormedUnsatisfiedConstraintExpr().
| void Sema::diagnoseTypo | ( | const TypoCorrection & | Correction, |
| const PartialDiagnostic & | TypoDiag, | ||
| bool | ErrorRecovery = true ) |
Definition at line 5636 of file SemaLookup.cpp.
References diagnoseTypo(), clang::ErrorRecovery, and clang::SemaBase::PDiag().
Referenced by ActOnSizeofParameterPackExpr(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), BuildUsingDeclaration(), ClassifyName(), ConvertArgumentsForCall(), DiagnoseEmptyLookup(), diagnoseExprIntendedAsTemplateName(), DiagnoseInvalidRedeclaration(), diagnoseTypo(), DiagnoseUnknownTypeName(), getTypeName(), ImplicitlyDefineFunction(), LookupMemberExpr(), LookupTemplateName(), resolveAssumedTemplateNameAsType(), and TryNamespaceTypoCorrection().
| 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.
| Correction | The result of performing typo correction. |
| TypoDiag | The diagnostic to produce. This will have the corrected string added to it (and usually also a fixit). |
| PrevNote | A note to use when indicating the location of the entity to which we are correcting. Will have the correction string added to it. |
| ErrorRecovery | If true (the default), the caller is going to recover from the typo as if the corrected string had been typed. In this case, PDiag must be an error, and we will attach a fixit to it. |
Definition at line 5789 of file SemaLookup.cpp.
References clang::FixItHint::CreateReplacement(), Declaration, clang::SemaBase::Diag(), diagnoseMissingImport(), clang::ErrorRecovery, 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(), clang::nullptr, and clang::TypoCorrection::requiresImport().
| void Sema::diagnoseUnavailableAlignedAllocation | ( | const FunctionDecl & | FD, |
| SourceLocation | Loc ) |
Produce diagnostics if FD is an aligned allocation or deallocation function that is unavailable.
Definition at line 2123 of file SemaExprCXX.cpp.
References clang::alignedAllocMinVersion(), clang::SemaBase::Diag(), clang::QualType::getAsString(), getASTContext(), clang::NamedDecl::getDeclName(), getPlatformName(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::DeclarationName::isAnyOperatorDelete(), isUnavailableAlignedAllocationFunction(), and clang::T.
Referenced by DiagnoseUseOfDecl().
| bool Sema::DiagnoseUnexpandedParameterPack | ( | const CXXScopeSpec & | SS, |
| UnexpandedParameterPackContext | UPPC ) |
If the given nested-name-specifier contains an unexpanded parameter pack, diagnose the error.
| SS | The nested-name-specifier that is being checked for unexpanded parameter packs. |
Definition at line 588 of file SemaTemplateVariadic.cpp.
References clang::NestedNameSpecifier::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::SourceRange::getBegin(), clang::CXXScopeSpec::getRange(), and clang::CXXScopeSpec::getScopeRep().
| bool Sema::DiagnoseUnexpandedParameterPack | ( | const DeclarationNameInfo & | NameInfo, |
| UnexpandedParameterPackContext | UPPC ) |
If the given name contains an unexpanded parameter pack, diagnose the error.
| NameInfo | The name (with source location information) that is being checked for unexpanded parameter packs. |
Definition at line 604 of file SemaTemplateVariadic.cpp.
References clang::Type::containsUnexpandedParameterPack(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDeductionGuideName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::DeclarationName::getCXXNameType(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::DeclarationNameInfo::getNamedTypeInfo(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, and clang::DeclarationName::ObjCZeroArgSelector.
| bool Sema::DiagnoseUnexpandedParameterPack | ( | Expr * | E, |
| UnexpandedParameterPackContext | UPPC = UPPC_Expression ) |
If the given expression contains an unexpanded parameter pack, diagnose the error.
| E | The expression that is being checked for unexpanded parameter packs. |
Definition at line 540 of file SemaTemplateVariadic.cpp.
References clang::Expr::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::Stmt::getBeginLoc(), and getEnclosingLambdaOrBlock().
| bool Sema::DiagnoseUnexpandedParameterPack | ( | SourceLocation | Loc, |
| TemplateName | Template, | ||
| UnexpandedParameterPackContext | UPPC ) |
If the given template name contains an unexpanded parameter pack, diagnose the error.
| Loc | The location of the template name. |
| Template | The template name that is being checked for unexpanded parameter packs. |
Definition at line 640 of file SemaTemplateVariadic.cpp.
References DiagnoseUnexpandedParameterPacks(), and clang::Template.
| bool Sema::DiagnoseUnexpandedParameterPack | ( | SourceLocation | Loc, |
| TypeSourceInfo * | T, | ||
| UnexpandedParameterPackContext | UPPC ) |
If the given type contains an unexpanded parameter pack, diagnose the error.
| Loc | The source location where a diagnostc should be emitted. |
| T | The type that is being checked for unexpanded parameter packs. |
Definition at line 524 of file SemaTemplateVariadic.cpp.
References DiagnoseUnexpandedParameterPacks(), and clang::T.
Referenced by ActOnAliasDeclaration(), ActOnBaseSpecifier(), ActOnBlockArguments(), ActOnCaseExpr(), ActOnClassTemplateSpecialization(), ActOnCXXAssumeAttr(), ActOnCXXForRangeStmt(), ActOnDecompositionDeclarator(), ActOnExceptionDeclarator(), ActOnFinishConceptDefinition(), ActOnFinishCXXInClassMemberInitializer(), ActOnFinishFullExpr(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnGCCAsmStmtString(), ActOnLambdaExpressionAfterIntroducer(), ActOnNonTypeTemplateParameter(), ActOnParamDefaultArgument(), ActOnRequiresClause(), ActOnStaticAssertDeclaration(), ActOnTag(), ActOnTemplateTemplateParameter(), ActOnTypeParameter(), ActOnUsingDeclaration(), ActOnVarTemplateSpecialization(), AddInitializerToDecl(), BuildBaseInitializer(), BuildMemberInitializer(), BuildReturnStmt(), BuildTypeConstraint(), clang::checkAMDGPUMaxNumWorkGroupsArguments(), clang::checkAMDGPUWavesPerEUArguments(), CheckEnumConstant(), checkExceptionSpecification(), CheckMicrosoftIfExistsSymbol(), CheckTemplateParameterList(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), getLambdaType(), handleAlignedAttr(), HandleDeclarator(), HandleField(), HandleMSProperty(), InventTemplateParameter(), makeAttributeArgExpr(), makeClusterDimsArgExpr(), makeLaunchBoundsArgExpr(), and VerifyBitField().
| bool Sema::DiagnoseUnexpandedParameterPack | ( | TemplateArgumentLoc | Arg, |
| UnexpandedParameterPackContext | UPPC ) |
If the given template argument contains an unexpanded parameter pack, diagnose the error.
| Arg | The template argument that is being checked for unexpanded parameter packs. |
Definition at line 654 of file SemaTemplateVariadic.cpp.
References clang::TemplateArgument::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgumentLoc::getLocation(), and clang::TemplateArgument::isNull().
| bool Sema::DiagnoseUnexpandedParameterPackInRequiresExpr | ( | RequiresExpr * | RE | ) |
If the given requirees-expression contains an unexpanded reference to one of its own parameter packs, diagnose the error.
| RE | The requiress-expression that is being checked for unexpanded parameter packs. |
Definition at line 565 of file SemaTemplateVariadic.cpp.
References clang::Expr::containsUnexpandedParameterPack(), DiagnoseUnexpandedParameterPacks(), clang::RequiresExpr::getBeginLoc(), clang::RequiresExpr::getLocalParameters(), and UPPC_Requirement.
Referenced by ActOnRequiresExpr().
| 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.
| Loc | The location at which we should emit the diagnostic. |
| UPPC | The context in which we are diagnosing unexpanded parameter packs. |
| Unexpanded | the set of unexpanded parameter packs. |
Definition at line 434 of file SemaTemplateVariadic.cpp.
References clang::cast(), clang::declaresSameEntity(), clang::SemaBase::Diag(), clang::Func, FunctionScopes, getEnclosingLambdaOrBlock(), and clang::NamedDecl::getIdentifier().
Referenced by CheckTemplateParameterList(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPack(), DiagnoseUnexpandedParameterPack(), and DiagnoseUnexpandedParameterPackInRequiresExpr().
| void Sema::DiagnoseUnguardedAvailabilityViolations | ( | Decl * | FD | ) |
Issue any -Wunguarded-availability warnings in FD.
Definition at line 1089 of file SemaAvailability.cpp.
References clang::Decl::getAsFunction().
Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().
| bool Sema::DiagnoseUninstantiableTemplate | ( | SourceLocation | PointOfInstantiation, |
| NamedDecl * | Instantiation, | ||
| bool | InstantiatedFromMember, | ||
| const NamedDecl * | Pattern, | ||
| const NamedDecl * | PatternDef, | ||
| TemplateSpecializationKind | TSK, | ||
| bool | Complain = true, | ||
| bool * | Unreachable = nullptr ) |
Determine whether we would be unable to instantiate this template (because it either has no definition, or is in the process of being instantiated).
Definition at line 811 of file SemaTemplate.cpp.
References Context, Definition, clang::SemaBase::Diag(), diagnoseMissingImport(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), hasReachableDefinition(), clang::isa(), clang::Decl::isInvalidDecl(), isSFINAEContext(), NoteTemplateLocation(), clang::Decl::setInvalidDecl(), clang::TSK_ExplicitInstantiationDeclaration, and clang::TSK_ImplicitInstantiation.
Referenced by InstantiateEnum(), InstantiateFunctionDefinition(), and InstantiateVariableDefinition().
| void Sema::DiagnoseUniqueObjectDuplication | ( | const VarDecl * | Dcl | ) |
Definition at line 13794 of file SemaDecl.cpp.
References Context, clang::SemaBase::Diag(), clang::VarDecl::getAnyInitializer(), clang::Decl::getASTContext(), clang::Decl::getLocation(), clang::ValueDecl::getType(), GloballyUniqueObjectMightBeAccidentallyDuplicated(), clang::Init, clang::isa(), clang::Decl::isTemplated(), and looksMutable().
Referenced by CheckCompleteVariableDeclaration().
| void Sema::DiagnoseUnknownAttribute | ( | const ParsedAttr & | AL | ) |
Definition at line 8312 of file SemaDeclAttr.cpp.
References Context, clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::SourceRange::getBegin(), getLangOpts(), clang::AttributeCommonInfo::getNormalizedAttrName(), clang::AttributeCommonInfo::getNormalizedFullName(), clang::AttributeCommonInfo::getNormalizedRange(), clang::AttributeCommonInfo::getNormalizedScopeName(), clang::AttributeCommonInfo::getRange(), clang::AttributeCommonInfo::getScopeLoc(), clang::AttributeCommonInfo::isExplicitScope(), clang::AttributeCommonInfo::tryGetCorrectedAttrName(), and clang::AttributeCommonInfo::tryGetCorrectedScopeName().
Referenced by ActOnBaseSpecifier(), CheckAttrTarget(), checkUnusedDeclAttributes(), ProcessDeclAttribute(), and ProcessStmtAttribute().
| bool Sema::DiagnoseUnknownTemplateName | ( | const IdentifierInfo & | II, |
| SourceLocation | IILoc, | ||
| Scope * | S, | ||
| const CXXScopeSpec * | SS, | ||
| TemplateTy & | SuggestedTemplate, | ||
| TemplateNameKind & | SuggestedKind ) |
Definition at line 363 of file SemaTemplate.cpp.
References computeDeclContext(), Context, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::OpaquePtr< PtrTy >::get(), isDependentScopeSpecifier(), clang::CXXScopeSpec::isSet(), clang::OpaquePtr< TemplateName >::make(), and clang::TNK_Dependent_template_name.
| void Sema::DiagnoseUnknownTypeName | ( | IdentifierInfo *& | II, |
| SourceLocation | IILoc, | ||
| Scope * | S, | ||
| CXXScopeSpec * | SS, | ||
| ParsedType & | SuggestedType, | ||
| bool | IsTemplateName = false ) |
Definition at line 718 of file SemaDecl.cpp.
References ActOnTypenameType(), computeDeclContext(), clang::NestedNameSpecifier::containsErrors(), Context, CorrectTypo(), clang::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), diagnoseMissingTemplateArguments(), diagnoseTypo(), clang::ErrorRecovery, clang::ActionResult< PtrTy, Compress >::get(), clang::OpaquePtr< PtrTy >::get(), clang::SourceRange::getBegin(), getLangOpts(), clang::IdentifierInfo::getName(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), GetTypeFromParser(), getTypeName(), isDependentScopeSpecifier(), clang::IdentifierInfo::isEditorPlaceholder(), clang::CXXScopeSpec::isInvalid(), isMicrosoftMissingTypename(), clang::CXXScopeSpec::isSet(), isTemplateName(), clang::CXXScopeSpec::isValid(), LookupOrdinaryName, clang::CXXScopeSpec::MakeTrivial(), clang::SemaBase::PDiag(), clang::UnqualifiedId::setIdentifier(), and clang::TNK_Type_template.
Referenced by BuildCXXNestedNameSpecifier().
| void Sema::DiagnoseUnsatisfiedConstraint | ( | const ConceptSpecializationExpr * | ConstraintExpr, |
| bool | First = true ) |
Emit diagnostics explaining why a constraint expression was deemed unsatisfied.
Definition at line 1991 of file SemaConcept.cpp.
References DiagnoseUnsatisfiedConstraint(), clang::First, clang::ConceptSpecializationExpr::getBeginLoc(), clang::ConceptSpecializationExpr::getSatisfaction(), clang::ASTConstraintSatisfaction::IsSatisfied, and clang::ASTConstraintSatisfaction::records().
| void Sema::DiagnoseUnsatisfiedConstraint | ( | const ConstraintSatisfaction & | Satisfaction, |
| SourceLocation | Loc = {}, | ||
| bool | First = true ) |
Emit diagnostics explaining why a constraint expression was deemed unsatisfied.
| First | whether this is the first time an unsatisfied constraint is diagnosed for this error. |
Definition at line 1982 of file SemaConcept.cpp.
References clang::ConstraintSatisfaction::Details, DiagnoseUnsatisfiedConstraint(), clang::First, and clang::ConstraintSatisfaction::IsSatisfied.
Referenced by checkAddressOfFunctionIsAvailable(), CheckDeducedPlaceholderConstraints(), DiagnoseBadDeduction(), DiagnoseUnsatisfiedConstraint(), DiagnoseUnsatisfiedConstraint(), diagnoseUnsatisfiedRequirement(), DiagnoseUseOfDecl(), diagnoseWellFormedUnsatisfiedConstraintExpr(), EnsureTemplateArgumentListConstraints(), NoteFunctionCandidate(), and NoteSurrogateCandidate().
| void Sema::DiagnoseUnterminatedPragmaAlignPack | ( | ) |
Definition at line 589 of file SemaAttr.cpp.
References AlignPackStack, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::Lexer::findLocationAfterToken(), clang::SourceLocation::isValid(), LangOpts, and SourceMgr.
Referenced by ActOnEndOfTranslationUnit().
| void Sema::DiagnoseUnterminatedPragmaAttribute | ( | ) |
Definition at line 1245 of file SemaAttr.cpp.
References clang::SemaBase::Diag(), and PragmaAttributeStack.
Referenced by ActOnEndOfTranslationUnit().
| void Sema::DiagnoseUnusedButSetDecl | ( | const VarDecl * | VD, |
| DiagReceiverTy | DiagReceiver ) |
If VD is set but not otherwise used, diagnose, for a parameter or a variable.
Definition at line 2180 of file SemaDecl.cpp.
References clang::Type::getBaseElementTypeUnsafe(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::Decl::hasAttr(), clang::isa(), clang::VarDecl::isCXXCondDecl(), clang::NamedDecl::isPlaceholderVar(), clang::Decl::isReferenced(), clang::SemaBase::PDiag(), and RefsMinusAssignments.
Referenced by ActOnPopScope().
| void Sema::DiagnoseUnusedDecl | ( | const NamedDecl * | ND | ) |
Definition at line 2149 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), and DiagnoseUnusedDecl().
Referenced by ActOnPopScope(), BuildVariableInstantiation(), DiagnoseUnusedDecl(), and DiagnoseUnusedNestedTypedefs().
| 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 2154 of file SemaDecl.cpp.
References clang::cast(), Context, GenerateFixForUnusedDecl(), getLangOpts(), clang::Decl::getLocation(), clang::isa(), clang::SemaBase::PDiag(), ShouldDiagnoseUnusedDecl(), and UnusedLocalTypedefNameCandidates.
DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused, warn.
Definition at line 405 of file SemaStmt.cpp.
Referenced by ActOnFinishFullExpr(), and CheckCommaOperands().
| bool Sema::DiagnoseUnusedLambdaCapture | ( | SourceRange | CaptureRange, |
| SourceRange | FixItRange, | ||
| const sema::Capture & | From ) |
Diagnose if an explicit lambda capture is unused.
Returns true if a diagnostic is emitted.
Definition at line 2028 of file SemaLambda.cpp.
References CaptureHasSideEffects(), clang::FixItHint::CreateRemoval(), clang::SemaBase::Diag(), getLangOpts(), clang::sema::Capture::getLocation(), clang::sema::Capture::getVariable(), clang::sema::Capture::isInitCapture(), clang::sema::Capture::isNonODRUsed(), clang::NamedDecl::isPlaceholderVar(), clang::sema::Capture::isThisCapture(), clang::SourceRange::isValid(), and clang::sema::Capture::isVLATypeCapture().
Referenced by BuildLambdaExpr().
| void Sema::DiagnoseUnusedNestedTypedefs | ( | const RecordDecl * | D | ) |
Definition at line 2131 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), and DiagnoseUnusedNestedTypedefs().
Referenced by ActOnPopScope(), DiagnoseUnusedNestedTypedefs(), and DiagnoseUnusedNestedTypedefs().
| void Sema::DiagnoseUnusedNestedTypedefs | ( | const RecordDecl * | D, |
| DiagReceiverTy | DiagReceiver ) |
Definition at line 2136 of file SemaDecl.cpp.
References clang::DeclContext::decls(), DiagnoseUnusedDecl(), DiagnoseUnusedNestedTypedefs(), clang::TagDecl::isDependentType(), and clang::T.
| void Sema::DiagnoseUnusedParameters | ( | ArrayRef< ParmVarDecl * > | Parameters | ) |
Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
Definition at line 15720 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), inTemplateInstantiation(), and clang::Parameter.
Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().
| 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.
Definition at line 225 of file SemaExpr.cpp.
References clang::cast(), CheckConceptUseInDefinition(), CheckFunctionConstraints(), checkTypeSupport(), Concept, Context, clang::CPlusPlus, clang::CPlusPlus14, CUDA(), CurContext, DeduceReturnType(), clang::SemaBase::Diag(), diagnoseArgIndependentDiagnoseIfAttrs(), DiagnoseAvailabilityOfDecl(), diagnoseUnavailableAlignedAllocation(), DiagnoseUnsatisfiedConstraint(), DiagnoseUnusedOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), Diags, clang::LangOptionsBase::FEM_UnsetOnCommandLine, clang::Decl::getCanonicalDecl(), getCurFunction(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::SemaOpenMP::getOpenMPDeclareMapperVarName(), clang::StringLiteral::getString(), clang::Decl::hasAttr(), clang::sema::FunctionScopeInfo::HasOMPDeclareReductionCombiner, clang::isa(), clang::ConstraintSatisfaction::IsSatisfied, LangOpts, NoteDeletedFunction(), OpenMP(), ParsingInitForAutoVars, PP, SuppressedDiagnostics, targetDiag(), and clang::VarDecl::TLS_None.
Referenced by ActOnCXXDelete(), ActOnDecltypeExpression(), ActOnLambdaExpressionAfterIntroducer(), ActOnNamespaceAliasDef(), ActOnUsingDirective(), BuildCallToObjectOfClassType(), BuildCXXCastArgument(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildDeclarationNameExpr(), BuildMemberReferenceExpr(), BuildTypeofExprType(), CheckConceptTemplateId(), CheckConstrainedAuto(), CheckCXXThrowOperand(), CheckDestructor(), checkDestructorReference(), CheckParmsForFunctionDef(), CheckTemplateArgument(), CheckTemplateIdType(), checkTypeDeclType(), ClassifyName(), ConvertDeclSpecToType(), CreateFunctionRefExpr(), DeduceTemplateSpecializationFromInitializer(), DiagnoseUseOfOverloadedDecl(), diagnoseUseOfProtocols(), FinalizeVarWithDestructor(), FinishOverloadedCallExpr(), GetEnumUnderlyingType(), getTypeName(), LookupMemberExpr(), MarkBaseDestructorsReferenced(), MarkFieldDestructorReferenced(), MarkVirtualBaseDestructorsReferenced(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformImplicitConversion(), resolveAndFixAddressOfSingleOverloadCandidate(), ResolveAndFixSingleFunctionTemplateSpecialization(), and SetDelegatingInitializer().
| void Sema::DiagnoseUseOfDeletedFunction | ( | SourceLocation | Loc, |
| SourceRange | Range, | ||
| DeclarationName | Name, | ||
| OverloadCandidateSet & | CandidateSet, | ||
| FunctionDecl * | Fn, | ||
| MultiExprArg | Args, | ||
| bool | IsMember = false ) |
Definition at line 17171 of file SemaOverload.cpp.
References clang::StringLiteral::getString(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, and clang::SemaBase::PDiag().
Referenced by BuildCallToMemberFunction(), FinishOverloadedCallExpr(), resolveAllocationOverloadInterior(), and resolveBuiltinNewDeleteOverload().
|
inline |
Definition at line 6995 of file Sema.h.
References DiagnoseUseOfDecl().
Referenced by BuildCallToMemberFunction(), BuildCXXConstructExpr(), clang::InitializationSequence::Perform(), and PerformConstructorInitialization().
Warn when implicitly casting 0 to nullptr.
Definition at line 708 of file Sema.cpp.
References CodeSynthesisContexts, clang::CPlusPlus11, clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), Diags, findMacroSpelling(), clang::Stmt::getBeginLoc(), getCurFunctionDecl(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::isa(), clang::FunctionDecl::isDefaulted(), clang::Type::isNullPtrType(), clang::Sema::CodeSynthesisContext::RewritingOperatorAsSpaceship, and SourceMgr.
Referenced by ImpCastExprToType().
| 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 5515 of file SemaDecl.cpp.
References clang::CPlusPlus, DiagPlaceholderVariableDefinition(), clang::First, getLangOpts(), clang::Decl::getLocation(), and clang::NamedDecl::isPlaceholderVar().
Referenced by ActOnDefinedDeclarationSpecifier().
| void Sema::DiagPlaceholderVariableDefinition | ( | SourceLocation | Loc | ) |
Definition at line 715 of file SemaDeclCXX.cpp.
References clang::CPlusPlus26, Diag(), and getLangOpts().
Referenced by ActOnDecompositionDeclarator(), ActOnLambdaExpressionAfterIntroducer(), ActOnVariableDeclarator(), CheckAnonMemberRedeclaration(), and DiagPlaceholderFieldDeclDefinitions().
| bool Sema::DiagRedefinedPlaceholderFieldDecl | ( | SourceLocation | Loc, |
| RecordDecl * | ClassDecl, | ||
| const IdentifierInfo * | Name ) |
Definition at line 4333 of file SemaDeclCXX.cpp.
References Diag(), clang::Found, clang::Decl::getDeclContext(), getLangOpts(), clang::Decl::getLocation(), clang::isa(), clang::NamedDecl::isPlaceholderVar(), clang::DeclContext::lookup(), and clang::Result.
| 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 20761 of file SemaExpr.cpp.
References ConstantEvaluated, DiagIfReachable(), DiscardedStatement, ExprEvalContexts, ImmediateFunctionContext, PotentiallyEvaluated, PotentiallyEvaluatedIfUsed, Unevaluated, UnevaluatedAbstract, and UnevaluatedList.
| bool Sema::DiagRuntimeBehavior | ( | SourceLocation | Loc, |
| const Stmt * | Statement, | ||
| const PartialDiagnostic & | PD ) |
Conditionally issue a diagnostic based on the current evaluation context.
| Statement | If Statement is non-null, delay reporting the diagnostic until the function body is parsed, and then do a basic reachability analysis to determine if the statement is reachable. If it is unreachable, the diagnostic will not be emitted. |
Definition at line 20788 of file SemaExpr.cpp.
References DiagRuntimeBehavior().
Referenced by AnalyzeComparison(), BuildVAArgExpr(), BuiltinConstantArgRange(), CheckForNullPointerDereference(), CheckForNullPointerDereference(), CheckImplicitConversion(), CheckNonNullArgument(), CheckPointerConversion(), CheckTautologicalComparison(), checkVariadicArgument(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseFloatingImpCast(), DiagnoseImpCast(), diagnoseSubtractionOnNullPointer(), diagnoseTautologicalComparison(), DiagRuntimeBehavior(), and LookupMemberExpr().
|
inline |
| void Sema::DiscardCleanupsInEvaluationContext | ( | ) |
Definition at line 18414 of file SemaExpr.cpp.
References Cleanup, ExprCleanupObjects, ExprEvalContexts, and MaybeODRUseExprs.
Referenced by ActOnBlockError(), ActOnBlockStmtExpr(), ActOnCapturedRegionEnd(), ActOnCapturedRegionError(), ActOnExprStmtError(), ActOnFinishFunctionBody(), ActOnGCCAsmStmt(), ActOnLambdaError(), ActOnStmtExprError(), BuildBaseInitializer(), BuildCXXDefaultInitExpr(), BuildMemberInitializer(), BuildStmtExpr(), checkForMultipleExportedDefaultConstructors(), and MaybeCreateExprWithCleanups().
Returns true if From is a function or pointer to a function with the cfi_unchecked_callee attribute but To is a function or pointer to function without this attribute.
Definition at line 12757 of file SemaChecking.cpp.
References Context, clang::Type::getAs(), clang::Type::getPointeeType(), and clang::QualType::isNull().
Referenced by CheckImplicitConversion().
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 16253 of file SemaChecking.cpp.
References clang::cast(), Context, currentEvaluationContext(), clang::Expr::IgnoreParens(), clang::isa(), clang::Sema::ExpressionEvaluationContextRecord::MisalignedMembers, and clang::T.
Referenced by ActOnCastExpr(), BuildCXXNamedCast(), CheckImplicitConversion(), and clang::InitializationSequence::Perform().
| void Sema::emitAndClearUnusedLocalTypedefWarnings | ( | ) |
Definition at line 1152 of file Sema.cpp.
References clang::SemaBase::Diag(), ExternalSource, clang::isa(), and UnusedLocalTypedefNameCandidates.
Referenced by ActOnEndOfTranslationUnit().
| void Sema::emitDeferredDiags | ( | ) |
Definition at line 2020 of file Sema.cpp.
References DeclsToCheckForDeferredDiags, DeviceDeferredDiags, ExternalSource, and LangOpts.
Referenced by ActOnEndOfTranslationUnitFragment().
| void Sema::EmitDiagnostic | ( | unsigned | DiagID, |
| const DiagnosticBuilder & | DB ) |
Cause the built diagnostic to be emitted on the DiagosticsEngine.
This is closely coupled to the SemaDiagnosticBuilder class and should not be used elsewhere.
Definition at line 1685 of file Sema.cpp.
References clang::sema::TemplateDeductionInfo::addSFINAEDiagnostic(), clang::sema::TemplateDeductionInfo::addSuppressedDiagnostic(), Context, clang::CPlusPlus11, clang::SemaBase::Diag(), Diags, getDiagnostics(), clang::DiagnosticIDs::getDiagnosticSFINAEResponse(), clang::Diagnostic::getID(), getLangOpts(), clang::Diagnostic::getLocation(), getPrintingPolicy(), getSFINAEContext(), clang::sema::TemplateDeductionInfo::hasSFINAEDiagnostic(), clang::DiagnosticsEngine::Ignored, PrintContextStack(), clang::DiagnosticIDs::SFINAE_AccessControl, clang::DiagnosticIDs::SFINAE_Report, clang::DiagnosticIDs::SFINAE_SubstitutionFailure, and clang::DiagnosticIDs::SFINAE_Suppress.
| 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.
| Template | The template to which the template arguments are being provided. |
| TemplateArgs | The converted, canonicalized template arguments. |
| TemplateIDRange | The source range of the template id that caused the constraints check. |
Definition at line 1623 of file SemaConcept.cpp.
References CheckConstraintSatisfaction(), clang::SemaBase::Diag(), DiagnoseUnsatisfiedConstraint(), clang::TemplateDecl::getAssociatedConstraints(), clang::SourceRange::getBegin(), clang::MultiLevelTemplateArgumentList::getInnermost(), getTemplateArgumentBindingsText(), getTemplateNameKindForDiagnostics(), clang::TemplateDecl::getTemplateParameters(), clang::ConstraintSatisfaction::IsSatisfied, and clang::TemplateName.
Referenced by CheckTemplateArgumentList().
| 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 1402 of file SemaDecl.cpp.
References CurContext, EnterTemplatedContext(), clang::Scope::getEntity(), clang::Scope::getParent(), clang::Scope::isTemplateParamScope(), and clang::Scope::setEntity().
Referenced by ActOnCXXEnterDeclaratorScope(), and ActOnCXXEnterDeclInitializer().
| 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 1450 of file SemaDecl.cpp.
References clang::cast(), clang::DeclContext::getLookupParent(), clang::Scope::getParent(), getTemplateDepth(), clang::Scope::isTemplateParamScope(), and clang::Scope::setLookupEntity().
Referenced by ActOnClassTemplateSpecialization(), ActOnReenterTemplateScope(), CheckClassTemplate(), and EnterDeclaratorContext().
| bool Sema::EvaluateAsString | ( | Expr * | Message, |
| APValue & | Result, | ||
| ASTContext & | Ctx, | ||
| StringEvaluationContext | EvalContext, | ||
| bool | ErrorOnInvalidMessage ) |
Definition at line 17821 of file SemaDeclCXX.cpp.
References EvaluateAsStringImpl(), and clang::Result.
Referenced by ActOnGCCAsmStmtString(), and BuildStaticAssertDeclaration().
| bool Sema::EvaluateAsString | ( | Expr * | Message, |
| std::string & | Result, | ||
| ASTContext & | Ctx, | ||
| StringEvaluationContext | EvalContext, | ||
| bool | ErrorOnInvalidMessage ) |
Definition at line 17828 of file SemaDeclCXX.cpp.
References EvaluateAsStringImpl(), and clang::Result.
| ExprResult Sema::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)
Definition at line 6544 of file SemaOverload.cpp.
References Context, clang::ConstantExpr::Create(), clang::Expr::EvalStatus::Diag, Diag(), clang::Expr::EvaluateAsConstantExpr(), clang::ExprError(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), clang::APValue::isAbsent(), clang::APValue::isInt(), clang::None, clang::Result, clang::T, clang::TempArgStrict, clang::TemplateArg, and clang::Expr::EvalResult::Val.
Referenced by CheckConvertedConstantExpression(), and CheckTemplateArgument().
| void Sema::EvaluateImplicitExceptionSpec | ( | SourceLocation | Loc, |
| FunctionDecl * | FD ) |
Evaluate the implicit exception specification for a defaulted special member function.
Definition at line 7712 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), computeImplicitExceptionSpec(), clang::EST_Unevaluated, clang::FunctionProtoType::getExceptionSpecType(), clang::ValueDecl::getType(), and UpdateExceptionSpec().
Referenced by ResolveExceptionSpec().
| void Sema::ExitDeclaratorContext | ( | Scope * | S | ) |
Definition at line 1437 of file SemaDecl.cpp.
References CurContext, clang::Scope::getEntity(), and clang::Scope::getParent().
Referenced by ActOnCXXExitDeclaratorScope(), and ActOnCXXExitDeclInitializer().
Definition at line 2098 of file SemaExpr.cpp.
References clang::PredefinedExpr::ComputeName(), Context, CurContext, clang::SemaBase::Diag(), getLangOpts(), getPredefinedExprDecl(), getPredefinedExprKind(), clang::isa(), clang::isFunctionLocalStringLiteralMacro(), clang::tok::isStringLiteral(), OS, PP, clang::Token::setKind(), clang::Token::startToken(), clang::Lexer::Stringify(), and Tok.
Referenced by ActOnStringLiteral(), and ActOnUnevaluatedStringLiteral().
Definition at line 13486 of file SemaOverload.cpp.
References Context, and clang::Type::getAs().
Referenced by IsStandardConversion().
| void Sema::FillInlineAsmIdentifierInfo | ( | Expr * | Res, |
| llvm::InlineAsmIdentifierInfo & | Info ) |
Definition at line 790 of file SemaStmtAsm.cpp.
References Context, clang::Expr::EvaluateAsLValue(), clang::Expr::EvaluateAsRValue(), clang::APValue::getInt(), clang::Expr::getType(), clang::isa(), clang::Expr::EvalResult::isGlobalLValue(), clang::Expr::isPRValue(), clang::T, and clang::Expr::EvalResult::Val.
| void Sema::FilterAcceptableTemplateNames | ( | LookupResult & | R, |
| bool | AllowFunctionTemplates = true, | ||
| bool | AllowDependent = true ) |
Definition at line 151 of file SemaTemplate.cpp.
References clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), getAsTemplateNameDecl(), clang::LookupResult::Filter::hasNext(), clang::LookupResult::makeFilter(), and clang::LookupResult::Filter::next().
Referenced by ClassifyName(), isTemplateName(), and LookupTemplateName().
| void Sema::FilterLookupForScope | ( | LookupResult & | R, |
| DeclContext * | Ctx, | ||
| Scope * | S, | ||
| bool | ConsiderLinkage, | ||
| bool | AllowInlineNamespace ) |
Filters out lookup results that don't fall within the given scope as determined by isDeclInScope.
Definition at line 1641 of file SemaDecl.cpp.
References Context, clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::LookupResult::Filter::hasNext(), isDeclInScope(), isOutOfScopePreviousDeclaration(), clang::LookupResult::makeFilter(), and clang::LookupResult::Filter::next().
Referenced by ActOnAliasDeclaration(), ActOnDecompositionDeclarator(), ActOnFinishConceptDefinition(), ActOnFunctionDeclarator(), ActOnNamespaceAliasDef(), ActOnStartConceptDefinition(), ActOnTypedefNameDecl(), and ActOnVariableDeclarator().
| void Sema::FilterUsingLookup | ( | Scope * | S, |
| LookupResult & | lookup ) |
Remove decls we can't actually see from a lookup being used to declare shadow using decls.
| S | - The scope of the potential shadow decl |
| Previous | - The lookup of a potential shadow decl's name. |
Definition at line 13086 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::Decl::isLocalExternDecl(), clang::LookupResult::Filter::next(), and Previous.
Referenced by BuildUsingDeclaration(), and BuildUsingEnumDeclaration().
| void Sema::FinalizeDeclaration | ( | Decl * | D | ) |
FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions necessary after any initializer has been attached.
Definition at line 15179 of file SemaDecl.cpp.
References clang::Decl::addAttr(), AddPushedVisibilityAttribute(), AnalysisWarnings, clang::cast(), clang::SemaCUDA::checkAllowedInitializer(), checkAttributesAfterMerging(), CheckStaticLocalForDllExport(), CheckThreadLocalForLargeAlignment(), Context, CUDA(), clang::SemaBase::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(), clang::Initializer, inTemplateInstantiation(), clang::isa(), 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, RegisterTypeTagForDatatype(), clang::Decl::setInvalidDecl(), and clang::Decl::specific_attrs().
Referenced by ActOnCXXForRangeIdentifier(), FinalizeDeclaration(), and FinishForRangeVarDecl().
| Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup | ( | Scope * | S, |
| const DeclSpec & | DS, | ||
| ArrayRef< Decl * > | Group ) |
Definition at line 15341 of file SemaDecl.cpp.
References clang::SemaOpenMP::ActOnOpenMPDeclareTargetInitializer(), BuildDeclaratorGroup(), Context, clang::CPlusPlus, clang::SemaBase::Diag(), getLangOpts(), clang::Decl::getLocation(), clang::DeclSpec::getRepAsDecl(), clang::DeclaratorDecl::getSourceRange(), clang::ValueDecl::getType(), clang::DeclSpec::getTypeSpecType(), handleTagNumbering(), clang::Type::hasAutoForTrailingReturnType(), clang::DeclSpec::hasAutoTypeSpec(), hasDeducedAuto(), clang::DeclSpec::isDeclRep(), clang::DeclSpec::isTypeSpecOwned(), LangOpts, and OpenMP().
Referenced by ActOnCXXForRangeIdentifier().
| void Sema::FinalizeVarWithDestructor | ( | VarDecl * | VD, |
| CXXRecordDecl * | DeclInit ) |
FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable.
Definition at line 16350 of file SemaDeclCXX.cpp.
References CheckDestructorAccess(), clang::Expr::containsErrors(), Context, clang::Destructor, Diag(), DiagnoseUseOfDecl(), clang::VarDecl::evaluateDestruction(), clang::VarDecl::evaluateValue(), getASTContext(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDefinitionOrSelf(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasGlobalStorage(), clang::CXXRecordDecl::hasIrrelevantDestructor(), clang::Type::isArrayType(), clang::VarDecl::isConstexpr(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::VarDecl::isNoDestroy(), clang::VarDecl::isStaticLocal(), clang::Expr::isValueDependent(), LookupDestructor(), MarkFunctionReferenced(), clang::VarDecl::needsDestruction(), clang::Note, and clang::SemaBase::PDiag().
Referenced by ActOnBlockStmtExpr(), BuildExceptionDeclaration(), and CheckCompleteVariableDeclaration().
| bool Sema::FindAllocationFunctions | ( | SourceLocation | StartLoc, |
| SourceRange | Range, | ||
| AllocationFunctionScope | NewScope, | ||
| AllocationFunctionScope | DeleteScope, | ||
| QualType | AllocType, | ||
| bool | IsArray, | ||
| ImplicitAllocationParameters & | IAP, | ||
| 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 2930 of file SemaExprCXX.cpp.
References adjustCCAndNoReturn(), clang::alignedAllocationModeFromBool(), clang::AS_public, clang::LookupResult::begin(), clang::cast(), clang::Type::castAsCXXRecordDecl(), CheckDeleteOperator(), clang::Class, clang::LookupResult::clear(), Context, clang::CPlusPlus11, CUDA(), DeclareGlobalNewDelete(), DeduceTemplateArguments(), clang::SemaBase::Diag(), Diagnose, clang::LookupResult::empty(), clang::LookupResult::end(), clang::SemaCUDA::EraseUnwantedMatches(), clang::Type::getAsCXXRecordDecl(), getCurFunctionDecl(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::LookupResult::getNamingClass(), clang::ImplicitAllocationParameters::getNumImplicitArgs(), getStdAlignValT(), clang::Global, hasNewExtendedAlignment(), clang::isAlignedAllocation(), clang::LookupResult::isAmbiguous(), isNonPlacementDeallocationFunction(), clang::QualType::isNull(), clang::DeclContext::isRecord(), clang::Type::isRecordType(), clang::isSizedDeallocation(), clang::isTypeAwareAllocation(), clang::FunctionDecl::isTypeAwareOperatorNewOrDelete(), LookupGlobalDeallocationFunctions(), LookupOrdinaryName, LookupQualifiedName(), clang::DeclAccessPair::make(), clang::LookupResult::makeFilter(), clang::Match, clang::No, OptionallyTyped, clang::ImplicitAllocationParameters::PassAlignment, clang::ImplicitDeallocationParameters::PassAlignment, clang::ImplicitDeallocationParameters::PassSize, clang::ImplicitAllocationParameters::PassTypeIdentity, clang::ImplicitDeallocationParameters::PassTypeIdentity, RequireCompleteType(), resolveAllocationOverload(), resolveDeallocationOverload(), clang::sizedDeallocationModeFromBool(), clang::Success, clang::LookupResult::suppressDiagnostics(), tryBuildStdTypeIdentity(), clang::ImplicitAllocationParameters::Type, Untyped, and clang::FunctionProtoType::ExtProtoInfo::Variadic.
Referenced by BuildCXXNew().
| 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 3311 of file SemaLookup.cpp.
References addAssociatedClassesAndNamespaces(), Context, clang::OverloadExpr::decls(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::Decl::getAsFunction(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::NamedDecl::getUnderlyingDecl(), and clang::Result.
Referenced by ArgumentDependentLookup(), argumentDependentLookup(), and DiagnoseTwoPhaseLookup().
| 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).
| Loc | The location of the operator requiring these two expressions to be converted to the composite pointer type. |
| ConvertArgs | If false, do not convert E1 and E2 to the target type. |
The class for a pointer-to-member; a constant array type with a bound (if any) for an array. FIXME: Store Qualifier for pointer-to-member.
Definition at line 6123 of file SemaExprCXX.cpp.
References clang::FunctionProtoType::ExtProtoInfo::CFIUncheckedCallee, Context, clang::CPlusPlus, clang::CPlusPlus17, clang::CPlusPlus20, clang::InitializationKind::CreateCopy(), clang::declaresSameEntity(), clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::Qualifiers::fromCVRUMask(), clang::ActionResult< PtrTy, Compress >::get(), clang::Qualifiers::getAddressSpace(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), getASTContext(), clang::ASTContext::getConstantArrayType(), clang::Qualifiers::getCVRUQualifiers(), clang::ArrayType::getElementType(), clang::ASTContext::getIncompleteArrayType(), getLangOpts(), clang::ASTContext::getMemberPointerType(), clang::MemberPointerType::getMostRecentCXXRecordDecl(), clang::FunctionType::ExtInfo::getNoReturn(), clang::Qualifiers::getObjCGCAttr(), clang::Qualifiers::getObjCLifetime(), clang::ASTContext::getObjCObjectPointerType(), clang::MemberPointerType::getPointeeType(), clang::ObjCObjectPointerType::getPointeeType(), clang::PointerType::getPointeeType(), clang::Type::getPointeeType(), clang::Qualifiers::getPointerAuth(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::Expr::getType(), ImpCastExprToType(), InitializationSequence, clang::InitializedEntity::InitializeTemporary(), clang::isa(), clang::Qualifiers::isAddressSpaceSupersetOf(), clang::Type::isAnyPointerType(), IsDerivedFrom(), clang::PointerAuthQualifier::isEquivalent(), 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::Normal, clang::Expr::NPC_ValueDependentIsNull, clang::InitializationSequence::Perform(), Pointer, clang::Qualifiers::setAddressSpace(), clang::Qualifiers::setObjCGCAttr(), clang::Qualifiers::setObjCLifetime(), clang::Qualifiers::setPointerAuth(), clang::T, and clang::FunctionType::ExtInfo::withNoReturn().
Referenced by convertPointersToCompositeType(), CXXCheckConditionalOperands(), and FindCompositePointerType().
|
inline |
Definition at line 8819 of file Sema.h.
References FindCompositePointerType(), and clang::ActionResult< PtrTy, Compress >::get().
| bool Sema::FindDeallocationFunction | ( | SourceLocation | StartLoc, |
| CXXRecordDecl * | RD, | ||
| DeclarationName | Name, | ||
| FunctionDecl *& | Operator, | ||
| ImplicitDeallocationParameters | IDP, | ||
| bool | Diagnose = true ) |
Definition at line 3657 of file SemaExprCXX.cpp.
References clang::cast(), CheckDeleteOperator(), Context, clang::SemaBase::Diag(), Diagnose, clang::Found, hasNewExtendedAlignment(), clang::isAlignedAllocation(), LookupOrdinaryName, LookupQualifiedName(), clang::Match, clang::ImplicitDeallocationParameters::PassAlignment, resolveDeallocationOverload(), and clang::Yes.
Referenced by ActOnCXXDelete(), FindDeallocationFunctionForDestructor(), findDeleteForPromise(), and ShouldDeleteSpecialMember().
| FunctionDecl * Sema::FindDeallocationFunctionForDestructor | ( | SourceLocation | StartLoc, |
| CXXRecordDecl * | RD, | ||
| bool | Diagnose, | ||
| bool | LookForGlobal, | ||
| DeclarationName | Name ) |
Definition at line 3631 of file SemaExprCXX.cpp.
References clang::alignedAllocationModeFromBool(), Context, Diagnose, FindDeallocationFunction(), FindUsualDeallocationFunction(), hasNewExtendedAlignment(), clang::No, clang::ImplicitDeallocationParameters::PassAlignment, clang::ImplicitDeallocationParameters::PassSize, ShouldUseTypeAwareOperatorNewOrDelete(), and clang::Yes.
Referenced by CheckDestructor().
Find the failed Boolean condition within a given Boolean constant expression, and describe it with a string.
Definition at line 3660 of file SemaTemplate.cpp.
References collectConjunctionTerms(), clang::Cond, ConstantEvaluated, Context, getPrintingPolicy(), clang::Expr::IgnoreParenImpCasts(), clang::isa(), lookThroughRangesV3Condition(), PP, clang::PrintingPolicy::PrintAsCanonical, and clang::Stmt::printPretty().
Referenced by BuildStaticAssertDeclaration(), CheckTemplateIdType(), and CheckTypenameType().
| 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 349 of file SemaCXXScopeSpec.cpp.
References clang::Found, clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), isAcceptableNestedNameSpecifier(), LookupName(), LookupNestedNameSpecifierName, clang::Result, clang::T, and clang::NestedNameSpecifier::Type.
Referenced by ActOnMemberAccessExpr().
| void Sema::FindHiddenVirtualMethods | ( | CXXMethodDecl * | MD, |
| SmallVectorImpl< CXXMethodDecl * > & | OverloadedMethods ) |
Check if a method overloads virtual methods in a base class without overriding any.
Definition at line 10530 of file SemaDeclCXX.cpp.
References AddMostOverridenMethods(), clang::NamedDecl::getDeclName(), clang::CXXMethodDecl::getParent(), clang::DeclarationName::isIdentifier(), clang::DeclContext::lookup(), and clang::CXXRecordDecl::lookupInBases().
Referenced by CheckOverrideControl(), and DiagnoseHiddenVirtualMethods().
| 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 14292 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::cast(), clang::Type::castAs(), clang::TypeLoc::castAs(), clang::Constexpr, Context, clang::CXXConstructorDecl::Create(), clang::ParmVarDecl::Create(), clang::declaresSameEntity(), clang::DefaultConstructor, 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::Decl::getLocation(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionProtoType::getParamType(), clang::FunctionProtoType::getParamTypes(), clang::ConstructorUsingShadowDecl::getParent(), clang::FunctionType::getReturnType(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::TypeSourceInfo::getType(), clang::ValueDecl::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(), and PerformConstructorInitialization().
| DeclContext * Sema::FindInstantiatedContext | ( | SourceLocation | Loc, |
| DeclContext * | DC, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Finds the instantiation of the given declaration context within the current instantiation.
Definition at line 6857 of file SemaTemplateInstantiateDecl.cpp.
References FindInstantiatedDecl().
Referenced by 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:
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 6879 of file SemaTemplateInstantiateDecl.cpp.
References clang::TemplateArgumentListInfo::addArgument(), ArgPackSubstIndex, clang::Sema::CodeSynthesisContext::BuildingDeductionGuides, clang::cast(), CheckTemplateIdType(), ClassTemplate, CodeSynthesisContexts, Context, CurContext, CurrentInstantiationScope, clang::DeclContext::decls_begin(), clang::DeclContext::decls_end(), clang::SemaBase::Diag(), clang::Enum, clang::DeclContext::Equals(), FindInstantiatedContext(), FindInstantiatedDecl(), findInstantiationOf(), clang::Found, 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::CXXRecordDecl::getTemplateSpecializationKind(), clang::EnumDecl::getTemplateSpecializationKind(), getTrivialTemplateArgumentLoc(), getType(), hasUncompilableErrorOccurred(), clang::isa(), isDependentContextAtLevel(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), isInstantiationOf(), clang::Decl::isInvalidDecl(), clang::DeclContext::lookup(), clang::None, clang::TemplateArgument::Pack, RequireCompleteType(), clang::Result, clang::SemaBase::SemaRef, clang::TemplateParameterList::size(), SubstDecl(), SubstDeclarationNameInfo(), clang::T, clang::TemplateName, clang::TSK_ExplicitSpecialization, and usesPartialOrExplicitSpecialization().
Referenced by BuildVariableInstantiation(), FindInstantiatedContext(), FindInstantiatedDecl(), HandleDependentAccessCheck(), InstantiateMemInitializers(), and SubstParmVarDecl().
| NamedDecl * Sema::findLocallyScopedExternCDecl | ( | DeclarationName | Name | ) |
Look for a locally scoped extern "C" declaration by the given name.
Definition at line 6829 of file SemaDecl.cpp.
References Context, clang::nullptr, and clang::Result.
Referenced by checkForConflictWithNonVisibleExternC(), checkGlobalOrExternCConflict(), and ImplicitlyDefineFunction().
| bool Sema::findMacroSpelling | ( | SourceLocation & | loc, |
| StringRef | name ) |
Looks through the macro-expansion chain for the given location, looking for a macro expansion with the given name.
If one is found, returns true and sets the location to that expansion loc.
Definition at line 2301 of file Sema.cpp.
References getPreprocessor(), getSourceManager(), and clang::SourceLocation::isMacroID().
Referenced by AnalyzeBitFieldAssignment(), diagnoseBadTypeAttribute(), DiagnoseConditionalForNull(), and diagnoseZeroToNullptrConversion().
| FunctionDecl * Sema::FindUsualDeallocationFunction | ( | SourceLocation | StartLoc, |
| ImplicitDeallocationParameters | IDP, | ||
| DeclarationName | Name, | ||
| bool | Diagnose = true ) |
Definition at line 3605 of file SemaExprCXX.cpp.
References CheckDeleteOperator(), DeclareGlobalNewDelete(), Diagnose, clang::LookupResult::getNamingClass(), LookupGlobalDeallocationFunctions(), LookupOrdinaryName, OptionallyTyped, resolveDeallocationOverload(), and clang::Result.
Referenced by ActOnCXXDelete(), FindDeallocationFunctionForDestructor(), and findDeleteForPromise().
| StmtResult Sema::FinishCXXForRangeStmt | ( | Stmt * | ForRange, |
| Stmt * | Body ) |
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 3204 of file SemaStmt.cpp.
References clang::cast(), DiagnoseEmptyStmtBody(), DiagnoseForRangeVariableCopies(), clang::SemaObjC::FinishObjCForCollectionStmt(), clang::ForStmt::getRParenLoc(), clang::isa(), ObjC(), clang::ForStmt::setBody(), and clang::StmtError().
Referenced by clang::TreeTransform< AdjustConstraints >::FinishCXXForRangeStmt().
| void Sema::finishLambdaExplicitCaptures | ( | sema::LambdaScopeInfo * | LSI | ) |
Note that we have finished the explicit captures for the given lambda.
Definition at line 563 of file SemaLambda.cpp.
References clang::sema::LambdaScopeInfo::finishedExplicitCaptures().
Referenced by ActOnLambdaExpressionAfterIntroducer().
| TemplateDeductionResult Sema::FinishTemplateArgumentDeduction | ( | FunctionTemplateDecl * | FunctionTemplate, |
| SmallVectorImpl< DeducedTemplateArgument > & | Deduced, | ||
| unsigned | NumExplicitlySpecified, | ||
| FunctionDecl *& | Specialization, | ||
| sema::TemplateDeductionInfo & | Info, | ||
| SmallVectorImpl< OriginalCallArg > const * | OriginalCallArgs, | ||
| bool | PartialOverloading, | ||
| bool | PartialOrdering, | ||
| bool | ForOverloadSetAddressResolution, | ||
| llvm::function_ref< bool(bool)> | CheckNonDependent = [](bool ) { return false; } ) |
Finish template argument deduction for a function template, checking the deduced template arguments for completeness and forming the function template specialization.
| OriginalCallArgs | If non-NULL, the original call arguments against which the deduced argument types should be compared. |
| CheckNonDependent | Callback before substituting into the declaration with the deduced template arguments. |
| OnlyInitializeNonUserDefinedConversions | is used as a workaround for some breakages introduced by CWG2369, where non-user-defined conversions are checked first before the constraints. |
Definition at line 3922 of file SemaTemplateDeduction.cpp.
References clang::Sema::OriginalCallArg::ArgIdx, clang::TemplateArgumentList::asArray(), clang::sema::TemplateDeductionInfo::AssociatedConstraintsSatisfaction, clang::Sema::CheckTemplateArgumentInfo::CanonicalConverted, CheckFunctionTemplateConstraints(), 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(), FunctionTemplate, clang::sema::TemplateDeductionInfo::getLocation(), getPackIndexForParam(), instantiateExplicitSpecifierDeferred(), clang::InstantiationDepth, clang::isa(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::isLambdaCallOperator(), clang::isLambdaConversionOperator(), clang::QualType::isNull(), isSameDeclaration(), clang::ConstraintSatisfaction::IsSatisfied, clang::MiscellaneousDeductionFailure, clang::NonDependentConversionFailure, clang::Sema::OriginalCallArg::OriginalParamType, clang::PartialOrdering, clang::sema::TemplateDeductionInfo::reset(), clang::Result, clang::Specialization, SubstDecl(), clang::SubstitutionFailure, SubstType(), clang::Success, clang::Sema::CheckTemplateArgumentInfo::SugaredConverted, SuppressedDiagnostics, clang::sema::TemplateDeductionInfo::takeCanonical(), and clang::sema::TemplateDeductionInfo::takeSugared().
| ExprResult Sema::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).
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 16945 of file SemaOverload.cpp.
References clang::AS_none, BuildCXXThisExpr(), BuildDeclRefExpr(), BuildMemberExpr(), clang::cast(), CheckUnresolvedLookupAccess(), CheckUseOfCXXMethodAsAddressOfOperand(), Context, clang::GenericSelectionExpr::Create(), clang::ImplicitCastExpr::Create(), clang::UnaryOperator::Create(), CreateBuiltinUnaryOp(), CurFPFeatureOverrides(), clang::ExprError(), FixOverloadedFunctionReference(), clang::Found, clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::isa(), isCompleteType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Method, clang::OK_Ordinary, clang::DeclRefExpr::setHadMultipleCandidates(), clang::ast_matchers::type, clang::VK_LValue, and clang::VK_PRValue.
Referenced by BuildCallToMemberFunction(), CheckSingleAssignmentConstraints(), CheckTemplateArgument(), clang::InitializationSequence::Diagnose(), FinishOverloadedCallExpr(), FixOverloadedFunctionReference(), FixOverloadedFunctionReference(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), resolveAndFixAddressOfSingleOverloadCandidate(), and ResolveAndFixSingleFunctionTemplateSpecialization().
| ExprResult Sema::FixOverloadedFunctionReference | ( | ExprResult | E, |
| DeclAccessPair | FoundDecl, | ||
| FunctionDecl * | Fn ) |
Definition at line 17147 of file SemaOverload.cpp.
References FixOverloadedFunctionReference(), clang::Found, and clang::ActionResult< PtrTy, Compress >::get().
| void Sema::ForceDeclarationOfImplicitMembers | ( | CXXRecordDecl * | Class | ) |
Force the declaration of any implicitly-declared members of this class.
Definition at line 1023 of file SemaLookup.cpp.
References CanDeclareSpecialMemberFunction(), clang::Class, clang::CPlusPlus11, DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), and getLangOpts().
Referenced by checkClassLevelDLLAttribute().
| ExprResult Sema::forceUnknownAnyToType | ( | Expr * | E, |
| QualType | ToType ) |
Force an expression with unknown-type to an expression of the given type.
Definition at line 21439 of file SemaExpr.cpp.
Referenced by ActOnFinishFullExpr(), AddInitializerToDecl(), and deduceVarTypeFromInitializer().
| bool Sema::FormatStringHasSArg | ( | const StringLiteral * | FExpr | ) |
Definition at line 9688 of file SemaChecking.cpp.
References Context, getLangOpts(), clang::StringLiteral::getString(), clang::Expr::getType(), clang::analyze_format_string::ParseFormatStringHasSArg(), and clang::T.
Referenced by DiagnoseCStringFormatDirectiveInObjCAPI().
| RedeclarationKind Sema::forRedeclarationInCurContext | ( | ) | const |
Definition at line 5846 of file SemaLookup.cpp.
References clang::cast(), CurContext, ForExternalRedeclaration, and ForVisibleRedeclaration.
Referenced by ActOnAliasDeclaration(), ActOnFinishConceptDefinition(), ActOnStartConceptDefinition(), ActOnTag(), BuildVariableInstantiation(), CheckClassTemplate(), HandleDeclarator(), isDeclaratorFunctionLike(), and shouldSkipAnonEnumBody().
| void Sema::FreeVisContext | ( | ) |
FreeVisContext - Deallocate and null out VisContext.
Definition at line 1412 of file SemaAttr.cpp.
References VisContext.
Referenced by PopPragmaVisibility(), and ~Sema().
| bool Sema::FriendConstraintsDependOnEnclosingTemplate | ( | const FunctionDecl * | FD | ) |
Definition at line 1602 of file SemaConcept.cpp.
References CalculateTemplateDepthForConstraints(), ConstraintExpressionDependsOnEnclosingTemplate(), clang::TemplateDecl::getAssociatedConstraints(), clang::FunctionDecl::getDescribedFunctionTemplate(), and clang::Decl::getFriendObjectKind().
Referenced by ActOnFunctionDeclarator().
| bool Sema::FunctionNonObjectParamTypesAreEqual | ( | const FunctionDecl * | OldFunction, |
| const FunctionDecl * | NewFunction, | ||
| unsigned * | ArgPos = nullptr, | ||
| bool | Reversed = false ) |
Definition at line 3546 of file SemaOverload.cpp.
References clang::cast(), FunctionParamTypesAreEqual(), clang::Decl::getFunctionType(), clang::FunctionDecl::getNumNonObjectParams(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), and clang::Reversed.
Referenced by sameFunctionParameterTypeLists().
| 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 3512 of file SemaOverload.cpp.
References Context, New, and clang::Reversed.
Referenced by FunctionNonObjectParamTypesAreEqual(), FunctionParamTypesAreEqual(), HandleFunctionTypeMismatch(), and IsOverloadOrOverrideImpl().
| bool Sema::FunctionParamTypesAreEqual | ( | const FunctionProtoType * | OldType, |
| const FunctionProtoType * | NewType, | ||
| unsigned * | ArgPos = nullptr, | ||
| bool | Reversed = false ) |
Definition at line 3539 of file SemaOverload.cpp.
References FunctionParamTypesAreEqual(), clang::FunctionProtoType::param_types(), and clang::Reversed.
| bool Sema::GatherArgumentsForCall | ( | SourceLocation | CallLoc, |
| FunctionDecl * | FDecl, | ||
| const FunctionProtoType * | Proto, | ||
| unsigned | FirstParam, | ||
| ArrayRef< Expr * > | Args, | ||
| SmallVectorImpl< Expr * > & | AllArgs, | ||
| VariadicCallType | CallType = VariadicCallType::DoesNotApply, | ||
| bool | AllowExplicit = false, | ||
| bool | IsListInitialization = false ) |
GatherArgumentsForCall - Collector argument expressions for various form of call prototypes.
Definition at line 6097 of file SemaExpr.cpp.
References clang::SemaHLSL::ActOnOutParamExpr(), BuildCXXDefaultArgExpr(), CheckStaticArrayArgument(), checkUnknownAnyArg(), Context, DefaultVariadicArgumentPromotion(), clang::DoesNotApply, clang::ActionResult< PtrTy, Compress >::get(), clang::FunctionType::ExtParameterInfo::getABI(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Stmt::getBeginLoc(), clang::FunctionProtoType::getExtParameterInfo(), getLangOpts(), clang::FunctionProtoType::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionProtoType::getParamType(), clang::FunctionType::getReturnType(), clang::Expr::getType(), clang::Decl::hasAttr(), HLSL(), clang::HLSLInOut, clang::HLSLOut, clang::Expr::IgnoreParenNoopCasts(), clang::InitializedEntity::InitializeParameter(), clang::Invalid, clang::Type::isBlockPointerType(), clang::FunctionDecl::isExternC(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::FunctionType::ExtParameterInfo::isNoEscape(), clang::FunctionProtoType::isParamConsumed(), ObjC(), PerformCopyInitialization(), RequireCompleteType(), clang::InitializedEntity::setParameterCFAudited(), and clang::SemaObjC::stripARCUnbridgedCast().
Referenced by BuildCXXNew(), CompleteConstructorCall(), and ConvertArgumentsForCall().
| 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:
Definition at line 3211 of file SemaDeclCXX.cpp.
References Context, clang::QualType::getAsString(), and clang::CXXBasePaths::getOrigin().
Referenced by AttachBaseSpecifiers(), CheckDerivedToBaseConversion(), CheckMemberPointerConversion(), DiagnoseAmbiguousLookup(), DiagnoseInvalidExplicitObjectParameterInLambda(), and findDecomposableBaseClass().
|
inline |
Definition at line 928 of file Sema.h.
References Consumer.
Referenced by getASTMutationListener(), clang::hlsl::HandleRootSignatureTarget(), and clang::ParseAST().
|
inline |
Definition at line 927 of file Sema.h.
References Context.
Referenced by ActOnArraySubscriptExpr(), ActOnCapturedRegionEnd(), ActOnCXXNestedNameSpecifierIndexedPack(), ActOnEndOfTranslationUnit(), ActOnExplicitInstantiation(), ActOnFinishExportDecl(), ActOnGCCAsmStmtString(), ActOnModuleDecl(), ActOnModuleImport(), ActOnPseudoDestructorExpr(), addImplicitBindingAttrToDecl(), AddImplicitlyDeclaredMembersToClass(), AddOverloadCandidate(), AddOverrideResults(), addStaticToLambdaDeclSpecifier(), AnalyzeCompoundAssignment(), assignInheritanceModel(), BuildBitIntType(), BuildCallExpr(), buildCapture(), buildCaptureDecl(), BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), buildDeclareReductionRef(), buildDeclRefExpr(), buildDistanceFunc(), BuildExpressionFromDeclTemplateArgument(), buildLambdaCaptureFixit(), buildLoopVarFunc(), BuildModuleInclude(), BuildPackIndexingExpr(), BuildPointerType(), BuildReferenceType(), buildUserDefinedMapperRef(), BuiltinFunctionStart(), BuiltinMaskedGather(), BuiltinMaskedScatter(), BuiltinOverflow(), BuiltinTriviallyRelocate(), clang::hlsl::BuiltinTypeMethodBuilder::BuiltinTypeMethodBuilder(), canPassInRegisters(), castVector(), CheckAllArgsHaveSameType(), clang::CheckAllArgsHaveSameType(), CheckArgTypeMatches(), checkArithmeticBinOpPointerOperands(), checkArrayExpressionDoesNotReferToUnitySize(), checkArrayExpressionDoesNotReferToWholeSize(), CheckBuiltinTargetInSupported(), CheckBuiltinTargetNotInUnsupported(), checkBuiltinTemplateIdType(), checkClassLevelDLLAttribute(), CheckCompareOperands(), checkConditionalPointerCompatibility(), CheckConstraintSatisfaction(), CheckCountedByAttrOnField(), CheckDeclarationCausesMultiVersioning(), CheckDeducedPlaceholderConstraints(), CheckExpectedBitWidth(), CheckForImmediateInvocation(), checkFormatStringExpr(), clang::checkGenericCastToPtr(), CheckImplicitConversion(), CheckMissingFormatAttribute(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionAdditionalRules(), CheckMultiVersionFunction(), CheckMultiVersionValue(), checkNoThrow(), CheckObjCDictionaryLiteralDuplicateKeys(), checkObjCMethodX86VectorTypes(), checkObjCPointerTypesForAssignment(), checkOpenMPLoop(), CheckOriginalCallArgDeduction(), CheckOverload(), CheckOverridingFunctionReturnType(), checkPointerTypesForAssignment(), CheckRedeclarationModuleOwnership(), checkSizelessVectorShift(), CheckStaticArrayArgument(), CheckStaticLocalForDllExport(), CheckTemplateParameterList(), CheckUnicodeArithmeticConversions(), CheckVariableDeclarationType(), CheckVarOrConceptTemplateTemplateId(), CheckVectorSelect(), CheckWaveActive(), compareEnableIfAttrs(), CompareReferenceRelationship(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), constructBufferConceptDecl(), clang::hlsl::TemplateParameterListBuilder::constructConceptSpecializationExpr(), constructStructuredBufferConstraintExpr(), constructTypedBufferConstraintExpr(), convertHalfVecBinOp(), CreateBuiltinArraySubscriptExpr(), createFieldForHostLayoutStruct(), clang::CreateHLSLAttributedResourceType(), createHostLayoutStruct(), createHostLayoutStructForBuffer(), createImplicitModuleImportForErrorRecovery(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), clang::CStyleCastPtrExpr(), clang::CStyleCastPtrExpr(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DeduceAutoType(), deduceClosureReturnType(), DeduceFromInitializerList(), deduceOpenCLPointeeAddrSpace(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateSpecializationFromInitializer(), DetectPrecisionLossInComplexDivision(), clang::InitializationSequence::Diagnose(), DiagnoseBadConversion(), DiagnoseImpCast(), DiagnoseInvalidExplicitObjectParameterInLambda(), DiagnoseLocalRegisterBinding(), diagnoseMissingImport(), DiagnoseMixedUnicodeImplicitConversion(), DiagnoseNarrowingInInitList(), diagnoseObjCLiteralComparison(), diagnoseRepeatedUseOfWeak(), diagnoseUnavailableAlignedAllocation(), DoEmitAvailabilityWarning(), emitBadConversionNotes(), emitReadOnlyPlacementAttrWarning(), clang::PreferredTypeBuilder::enterCondition(), clang::PreferredTypeBuilder::enterSubscript(), EvaluateAndDiagnoseImmediateInvocation(), EvaluateAsStringImpl(), EvaluateSizeTTypeTrait(), FinalizeVarWithDestructor(), FindCompositePointerType(), findOMPAllocatorHandleT(), FixDependencyOfIdExpressionsInLambdaWithDependentObjectParameter(), getAllocatorKind(), GetDecompositionElementCount(), getDefaultCXXMethodAddrSpace(), getEmissionStatus(), GetExplicitObjectExpr(), getHostLayoutStructName(), getImplicitCodeSegAttrFromClass(), getImplicitCodeSegOrSectionAttrForFunction(), getMoreSpecialized(), getOpenCLKernelParameterType(), getParallelRegionParams(), getPreferredTypeOfBinaryRHS(), getPreferredTypeOfUnaryArg(), getTargetRegionParams(), getTaskloopRegionParams(), getTaskRegionParams(), handleDeviceKernelAttr(), handleFloatVectorBinOpConversion(), handleIntegerVectorBinOpConversion(), handleLoopHintAttr(), handleMIGServerRoutineAttr(), handleNakedAttr(), handlePackedAttr(), handlerCanCatch(), clang::hlsl::HandleRootSignatureTarget(), handleVecTypeHint(), hasNewExtendedAlignment(), hasUserDefinedMapper(), clang::InitializationSequence::InitializeFrom(), instantiateDependentAllocAlignAttr(), instantiateDependentDiagnoseIfAttr(), instantiateDependentEnableIfAttr(), instantiateDependentHLSLParamModifierAttr(), instantiateDependentMallocSpanAttr(), instantiateDependentOpenACCRoutineDeclAttr(), instantiateDependentReqdWorkGroupSizeAttr(), instantiateDependentSYCLKernelAttr(), instantiateOMPDeclareVariantAttr(), InstantiateVariableDefinition(), InstantiateVariableInitializer(), clang::isBetterOverloadCandidate(), isConstNotMutableType(), IsCXXTriviallyRelocatableType(), IsCXXTriviallyRelocatableType(), IsLayoutCompatible(), isMacroDefined(), isObjCPointerConversion(), IsPointerInterconvertibleBaseOf(), IsQualificationConversion(), IsRedefinitionInModule(), IsStandardConversion(), isTriviallyEqualityComparableType(), IsTriviallyRelocatableType(), IsVectorConversion(), LookupSpecialMemberFromXValue(), makeClusterDimsArgExpr(), mapCodeCompletionContext(), MarkFunctionReferenced(), markUsedForAliasOrIfunc(), MarkVarDeclODRUsed(), mergeEnforceTCBAttrImpl(), MergeFunctionDecl(), mergeParamDeclTypes(), clang::ParseAST(), parseOpenMPReductionId(), PerformImplicitConversion(), PerformPendingInstantiations(), ProcessAPINotes(), processCapturedRegions(), clang::processConstant32BitIntArgument(), propagateDLLAttrToBaseClassTemplate(), rejectConstNotMutableType(), repeatForLambdaConversionFunctionCallingConvs(), reportOriginalDsa(), sameFunctionParameterTypeLists(), setPrototype(), ShouldDiagnoseAvailabilityInContext(), ShouldDiagnoseAvailabilityOfDecl(), tryGCCVectorConvertAndSplat(), TryObjectArgumentInitialization(), TryOCLZeroOpaqueTypeInitialization(), TryOrBuildParenListInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), updateAttrsForLateParsedTemplate(), validatePackoffset(), and VerifyBitField().
|
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.
| D | A declaration found by name lookup. |
| AllowFunctionTemplates | Whether function templates should be considered valid results. |
| AllowDependent | Whether unresolved using declarations (that might name templates) should be considered valid results. |
Otherwise, returns null.
Note that this may return an UnresolvedUsingValueDecl if AllowDependent is true. In all other cases it will return a TemplateDecl (or null).
Definition at line 106 of file SemaTemplate.cpp.
References clang::cast(), clang::NamedDecl::getUnderlyingDecl(), and clang::isa().
Referenced by ClassifyName(), diagnoseExprIntendedAsTemplateName(), FilterAcceptableTemplateNames(), hasAnyAcceptableTemplateNames(), isTemplateName(), LookupQualifiedName(), and LookupTemplateName().
| ASTMutationListener * Sema::getASTMutationListener | ( | ) | const |
Definition at line 651 of file Sema.cpp.
References getASTConsumer(), and clang::ASTConsumer::GetASTMutationListener().
Referenced by ActOnModuleDecl(), DefineDefaultedComparison(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), InstantiateDefaultArgument(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), InstantiateVariableInitializer(), and UpdateExceptionSpec().
| SourceLocation Sema::getAttrLoc | ( | const AttributeCommonInfo & | CI | ) |
Definition at line 91 of file SemaDeclAttr.cpp.
References clang::AttributeCommonInfo::getLoc().
|
inlinestatic |
A helper function to provide Attribute Location for the Attr types AND the ParsedAttr.
Definition at line 4849 of file Sema.h.
Referenced by checkFunctionOrMethodParameterIndex(), checkUInt32Argument(), and handlePatchableFunctionEntryAttr().
| 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 3564 of file SemaDecl.cpp.
References clang::T.
Referenced by handleFunctionTypeAttr(), and MergeFunctionDecl().
| 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 19764 of file SemaExpr.cpp.
References clang::Implicit, and tryCaptureVariable().
Referenced by BuildDeclarationNameExpr(), and getDecltypeForExpr().
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 9225 of file SemaType.cpp.
References completeExprArrayBound(), clang::Expr::getType(), and clang::Type::isIncompleteArrayType().
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), DoMarkVarDeclReferenced(), RequireCompleteExprType(), TryReferenceInitialization(), and TryReferenceListInitialization().
| ParsedType Sema::getConstructorName | ( | const IdentifierInfo & | II, |
| SourceLocation | NameLoc, | ||
| Scope * | S, | ||
| CXXScopeSpec & | SS, | ||
| bool | EnteringContext ) |
Definition at line 71 of file SemaExprCXX.cpp.
References Context, clang::SemaBase::Diag(), getCurrentClass(), clang::NamedDecl::getIdentifier(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::DeclContext::isDependentContext(), clang::Decl::isInvalidDecl(), clang::CXXScopeSpec::isNotEmpty(), clang::DeclContext::lookup(), clang::OpaquePtr< QualType >::make(), clang::None, RequireCompleteDeclContext(), and clang::T.
| 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.
| Info | The NamedReturnInfo object to update. |
| ReturnType | This is the return type of the function. |
Definition at line 3485 of file SemaStmt.cpp.
References clang::Sema::NamedReturnInfo::Candidate, Context, clang::ValueDecl::getType(), clang::Type::getTypeClass(), 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().
| BlockScopeInfo * Sema::getCurBlock | ( | ) |
Retrieve the current block, if any.
Definition at line 2519 of file Sema.cpp.
References CodeSynthesisContexts, CurContext, and FunctionScopes.
Referenced by ActOnBlockArguments(), ActOnBlockStart(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), checkDeclInTargetContext(), and clang::PreferredTypeBuilder::enterReturn().
| CapturedRegionScopeInfo * Sema::getCurCapturedRegion | ( | ) |
Retrieve the current captured region, if any.
Definition at line 2893 of file Sema.cpp.
References FunctionScopes.
Referenced by checkDeclInTargetContext(), and processCapturedRegions().
| sema::CompoundScopeInfo & Sema::getCurCompoundScope | ( | ) | const |
Definition at line 432 of file SemaStmt.cpp.
References clang::sema::FunctionScopeInfo::CompoundScopes, and getCurFunction().
Referenced by ActOnCompoundStmt(), ActOnForStmt(), and ActOnWhileStmt().
|
inline |
Definition at line 922 of file Sema.h.
References CurFPFeatures.
Referenced by ActOnAfterCompoundStatementLeadingPragmas(), ActOnCompoundStmt(), addBlockPointerConversion(), addFunctionPointerConversion(), CreateBuiltin(), CreateLambdaCallOperator(), CreateNewFunctionDecl(), DeclareGlobalAllocationFunction(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DeclClonePragmaWeak(), findInheritingConstructor(), InsertOCLBuiltinDeclarationsFromTable(), MarkAsLateParsedTemplate(), PushCompoundScope(), and rewriteBuiltinFunctionDecl().
|
inline |
Definition at line 1321 of file Sema.h.
References FunctionScopes, and clang::nullptr.
Referenced by ActOnAddrLabel(), ActOnAfterCompoundStatementLeadingPragmas(), ActOnBlockStmtExpr(), ActOnCapScopeReturnStmt(), ActOnCaseExpr(), ActOnCaseStmt(), ActOnCompoundStmt(), ActOnCoroutineBodyStart(), ActOnCoyieldExpr(), ActOnCXXTryBlock(), ActOnDefaultStmt(), ActOnFinishFunctionBody(), ActOnFinishSwitchStmt(), ActOnReturnStmt(), ActOnSEHTryBlock(), ActOnStartOfSwitchStmt(), AddInitializerToDecl(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), BuildArrayType(), BuildCompoundLiteralExpr(), buildCoroutineParameterMoves(), buildCoroutinePromise(), BuildDeclRefExpr(), BuildReturnStmt(), CheckAssignmentOperands(), CheckCompletedCoroutineBody(), CheckCompleteVariableDeclaration(), CheckConstraintExpression(), checkCoroutineContext(), CheckShadow(), checkUnsafeExprAssigns(), DiagIfReachable(), DiagnoseAlwaysNonNullPointer(), DiagnoseUseOfDecl(), getCurCompoundScope(), handleFallThroughAttr(), hasAnyUnrecoverableErrorsInThisFunction(), LookupMemberExpr(), MarkExpressionAsImmediateEscalating(), PopCompoundScope(), PushCompoundScope(), and RecordModifiableNonNullParam().
| FunctionScopeInfo * Sema::getCurFunctionAvailabilityContext | ( | ) |
Retrieve the current function, if any, that should be analyzed for potential availability violations.
Definition at line 1109 of file SemaAvailability.cpp.
References FunctionScopes.
Referenced by DiagnoseAvailabilityOfDecl().
| 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 1660 of file Sema.cpp.
References getFunctionLevelDeclContext().
Referenced by ActOnFinishFunctionBody(), ActOnStartOfFunctionDef(), ActOnVariableDeclarator(), AddMethodCandidate(), AddOverloadCandidate(), BuildMemberReferenceExpr(), BuildResolvedCallExpr(), BuildReturnStmt(), BuildUnresolvedCoawaitExpr(), CheckVariableDeclarationType(), checkVAStartABI(), DiagnoseBadTarget(), diagnoseUseOfInternalDeclInInlineFunction(), diagnoseZeroToNullptrConversion(), DoEmitAvailabilityWarning(), FindAllocationFunctions(), getSelfAssignmentClassMemberCandidate(), clang::isBetterOverloadCandidate(), isOpenMPCapturedRegionInArmSMEFunction(), IsSimplyAccessible(), isUsualDeallocationFunction(), LookupMemberExpr(), resolveAddressOfSingleOverloadCandidate(), and targetDiag().
| 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 1672 of file Sema.cpp.
References clang::cast(), getFunctionLevelDeclContext(), and clang::isa().
Referenced by AddKeywordsToConsumer(), BuildReturnStmt(), CheckTCBEnforcement(), and handleInitPriorityAttr().
| LambdaScopeInfo * Sema::getCurGenericLambda | ( | ) |
Retrieve the current generic lambda info, if any.
Definition at line 2589 of file Sema.cpp.
References getCurLambda().
Referenced by clang::getStackIndexOfNearestEnclosingCaptureCapableLambda().
| LambdaScopeInfo * Sema::getCurLambda | ( | bool | IgnoreNonLambdaCapturingScope = false | ) |
Retrieve the current lambda scope info, if any.
| IgnoreNonLambdaCapturingScope | true if should find the top-most lambda scope info ignoring all inner capturing scopes that are not lambda scopes. |
Definition at line 2564 of file Sema.cpp.
References CodeSynthesisContexts, CurContext, FunctionScopes, and clang::isa().
Referenced by ActOnFinishFullExpr(), ActOnFinishFunctionBody(), ActOnLambdaExplicitTemplateParameterList(), ActOnLambdaExpressionAfterIntroducer(), ActOnSuperScopeSpecifier(), checkDeclInTargetContext(), CheckExplicitObjectParameter(), createLambdaClosureType(), createLambdaInitCaptureVarDecl(), DeduceFunctionTypeFromReturnExpr(), DoMarkPotentialCapture(), getCurGenericLambda(), GetDeclSpecTypeForDeclarator(), getDecltypeForExpr(), GetFullTypeForDeclarator(), rebuildPotentialResultsAsNonOdrUsed(), RecordParsingTemplateParameterDepth(), and tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs().
|
inline |
Definition at line 1125 of file Sema.h.
References CurContext, and OriginalLexicalContext.
Referenced by ActOnGCCAsmStmt(), ActOnStartOfFunctionDef(), ActOnTagFinishDefinition(), checkTypeSupport(), and EmitAvailabilityWarning().
| ObjCMethodDecl * Sema::getCurMethodDecl | ( | ) |
getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the method being parsed.
If we're currently in a 'block', this returns the containing context.
Definition at line 1665 of file Sema.cpp.
References getFunctionLevelDeclContext(), clang::DeclContext::getParent(), and clang::isa().
Referenced by ActOnFinishFunctionBody(), ActOnIdExpression(), ActOnNameClassifiedAsNonType(), AddClassMessageCompletions(), AddOrdinaryNameResults(), AddSuperSendCompletion(), BuildReturnStmt(), CheckForModifiableLvalue(), ClassifyName(), findMethodInCurrentClass(), clang::findRetainCycleOwner(), getBaseMessageSendResultType(), IsSimplyAccessible(), LookupMemberExpr(), and LookupPotentialTypoResult().
| 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 2691 of file SemaDeclCXX.cpp.
References computeDeclContext(), clang::CPlusPlus, CurContext, getLangOpts(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isNotEmpty().
Referenced by getConstructorName(), and isCurrentClassName().
| 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).
| NNS | a dependent nested name specifier. |
Definition at line 158 of file SemaCXXScopeSpec.cpp.
References clang::CPlusPlus, CurContext, clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), getLangOpts(), clang::NestedNameSpecifier::isDependent(), clang::T, and clang::NestedNameSpecifier::Type.
Referenced by computeDeclContext().
| std::tuple< MangleNumberingContext *, Decl * > Sema::getCurrentMangleNumberContext | ( | const DeclContext * | DC | ) |
Compute the mangling number context for a lambda expression or block literal.
Also return the extra mangling decl if any.
| DC | - The DeclContext containing the lambda expression or block literal. |
Definition at line 279 of file SemaLambda.cpp.
References clang::cast(), Concept, Context, CurContext, DefaultArgument, ExprEvalContexts, clang::DeclContext::getLexicalParent(), clang::DeclContext::getParent(), inTemplateInstantiation(), clang::isa(), isInInlineFunction(), clang::ASTContext::NeedExtraManglingDecl, and Normal.
Referenced by ActOnBlockStart(), ActOnVariableDeclarator(), BuildAnonymousStructOrUnion(), handleLambdaNumbering(), and handleTagNumbering().
|
inline |
Get the module unit whose scope we are currently within.
Definition at line 9879 of file Sema.h.
References clang::nullptr.
Referenced by ActOnAnnotModuleEnd(), ActOnEndOfTranslationUnit(), ActOnFinishLinkageSpecification(), ActOnModuleImport(), ActOnModuleImport(), ActOnTag(), ActOnTagFinishDefinition(), AddOrdinaryNameResults(), DeclareGlobalNewDelete(), diagnoseMissingImport(), makeMergedDefinitionVisible(), and notePreviousDefinition().
| QualType Sema::getCurrentThisType | ( | ) |
Try to retrieve the type of the 'this' pointer.
Definition at line 1212 of file SemaExprCXX.cpp.
References adjustCVQualifiersForCXXThisWithinLambda(), clang::cast(), Context, CurContext, CXXThisTypeOverride, FunctionScopes, getFunctionLevelDeclContext(), inTemplateInstantiation(), clang::isa(), clang::isLambdaCallOperator(), clang::isLambdaCallWithImplicitObjectParameter(), and clang::QualType::isNull().
Referenced by ActOnCXXThis(), ActOnDependentIdExpression(), ActOnLambdaClosureQualifiers(), ActOnLambdaExpressionAfterIntroducer(), addThisCompletion(), BuildCaptureInit(), BuildImplicitMemberExpr(), CaptureHasSideEffects(), CheckCXXThisCapture(), DefineImplicitCopyAssignment(), DefineImplicitMoveAssignment(), GetExplicitObjectType(), getPrivateItem(), LookupInlineAsmField(), and recoverFromMSUnqualifiedLookup().
|
inline |
Retrieve the parser's current scope.
This routine must only be used when it is certain that semantic analysis and the parser are in precisely the same context, which is not the case when, e.g., we are performing any kind of template instantiation. Therefore, the only safe places to use this scope are in the parser itself and in routines directly invoked from the parser and never from template substitution or instantiation.
Definition at line 1121 of file Sema.h.
Referenced by ActOnCaseStmt(), ActOnCXXTryBlock(), ActOnDefaultStmt(), ActOnGotoStmt(), ActOnIndirectGotoStmt(), ActOnLabelStmt(), ActOnMSVCUnknownTypeName(), ActOnReturnStmt(), ActOnStartOfLambdaDefinition(), ActOnSuperScopeSpecifier(), BuildCompoundLiteralExpr(), BuildCXXForRangeStmt(), BuildCXXThrow(), buildDistanceFunc(), buildLoopVarFunc(), BuildMemberReferenceExpr(), BuildNonArrayForRange(), BuiltinInvoke(), BuiltinSEHScopeCheck(), CheckAccess(), CheckFieldDecl(), checkSuspensionContext(), CheckVariableDeclarationType(), CreateBuiltinBinOp(), DiagnoseCommaOperator(), emitReplacement(), findOMPAllocatorHandleT(), findOMPAlloctraitT(), findOMPDependT(), findOMPEventHandleT(), finishLinearClauses(), GetDeclSpecTypeForDeclarator(), getScopeForContext(), isValidInteropVariable(), LookupInlineAsmField(), LookupInlineAsmIdentifier(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().
| DarwinSDKInfo * Sema::getDarwinSDKInfoForAvailabilityChecking | ( | ) |
Definition at line 123 of file Sema.cpp.
References clang::parseDarwinSDKInfo(), and PP.
Referenced by getDarwinSDKInfoForAvailabilityChecking().
| DarwinSDKInfo * Sema::getDarwinSDKInfoForAvailabilityChecking | ( | SourceLocation | Loc, |
| StringRef | Platform ) |
Definition at line 112 of file Sema.cpp.
References clang::SemaBase::Diag(), and getDarwinSDKInfoForAvailabilityChecking().
Referenced by handleAvailabilityAttr(), and shouldInferAvailabilityAttribute().
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 9749 of file SemaType.cpp.
References Context, getCapturedDeclRefType(), getCurLambda(), clang::ValueDecl::getType(), clang::Expr::IgnoreParens(), clang::isa(), clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), and clang::T.
Referenced by BuildDecltypeType(), and DeduceAutoType().
| UnsignedOrNone Sema::GetDecompositionElementCount | ( | QualType | DecompType, |
| SourceLocation | Loc ) |
Definition at line 1675 of file SemaDeclCXX.cpp.
References CheckMemberDecompositionFields(), Context, findDecomposableBaseClass(), clang::ASTContext::getAsConstantArrayType(), getASTContext(), clang::DeclAccessPair::getDecl(), isTupleLike(), clang::TagDecl::isUnion(), clang::Qualifiers::removeCVRQualifiers(), RequireCompleteType(), and clang::T.
Referenced by EvaluateSizeTTypeTrait().
| LangAS Sema::getDefaultCXXMethodAddrSpace | ( | ) | const |
Returns default addr space for method qualifiers.
Definition at line 1679 of file Sema.cpp.
References clang::Default, getASTContext(), clang::ASTContext::getDefaultOpenCLPointeeAddrSpace(), getLangOpts(), and OpenCL().
Referenced by DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), getDummyLambdaType(), and GetFullTypeForDeclarator().
|
inline |
Definition at line 2293 of file Sema.h.
References Diags, clang::PartialDiagnostic::Emit(), and clang::PartialDiagnostic::getDiagID().
Referenced by PrintContextStack(), PrintInstantiationStack(), and PrintPragmaAttributeInstantiationPoint().
|
inline |
Definition at line 8254 of file Sema.h.
References clang::Sema::DefaultedFunctionKind::asComparison(), and getDefaultedFunctionKind().
Referenced by MarkFunctionReferenced().
| Sema::DefaultedFunctionKind Sema::getDefaultedFunctionKind | ( | const FunctionDecl * | FD | ) |
Determine the kind of defaulting that would be done for a given function.
If the function is both a default constructor and a copy / move constructor (due to having a default argument for the first parameter), this picks CXXSpecialMemberKind::DefaultConstructor.
FIXME: Check that case is properly handled by all callers.
Definition at line 6743 of file SemaDeclCXX.cpp.
References clang::CopyAssignment, clang::CopyConstructor, clang::CPlusPlus20, clang::DefaultConstructor, clang::Destructor, Equal, clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), getLangOpts(), clang::isa(), clang::CXXConstructorDecl::isCopyConstructor(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::CXXConstructorDecl::isMoveConstructor(), clang::MoveAssignment, clang::MoveConstructor, NotEqual, Relational, and ThreeWay.
Referenced by BuildFieldReferenceExpr(), CheckCompletedCXXClass(), CheckExplicitlyDefaultedFunction(), computeImplicitExceptionSpec(), CreateOverloadedBinOp(), DefineDefaultedFunction(), DiagnoseDeletedDefaultedFunction(), DiagnoseNonTriviallyCopyableReason(), getDefaultedComparisonKind(), getSpecialMember(), InstantiateFunctionDefinition(), PrintInstantiationStack(), and SetDeclDefaulted().
| ParsedType Sema::getDestructorName | ( | const IdentifierInfo & | II, |
| SourceLocation | NameLoc, | ||
| Scope * | S, | ||
| CXXScopeSpec & | SS, | ||
| ParsedType | ObjectType, | ||
| bool | EnteringContext ) |
Definition at line 119 of file SemaExprCXX.cpp.
References clang::CXXScopeSpec::Adopt(), clang::cast(), CheckTypenameType(), computeDeclContext(), Context, clang::FixItHint::CreateInsertion(), CreateParsedType(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::Found, clang::Type::getAsCXXRecordDecl(), clang::NestedNameSpecifierLoc::getAsNamespaceAndPrefix(), clang::NestedNameSpecifierLoc::getAsTypeLoc(), clang::CXXScopeSpec::getEndLoc(), clang::Scope::getEntity(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::NamedDecl::getNameAsString(), clang::CXXScopeSpec::getRange(), GetTypeFromParser(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXScopeSpec::getWithLocInContext(), clang::LookupResult::Filter::hasNext(), clang::isa(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isNull(), clang::CXXScopeSpec::isSet(), LookupDestructorName, LookupName(), LookupQualifiedName(), MarkAnyDeclReferenced(), clang::LookupResult::Filter::next(), clang::None, clang::NamespaceAndPrefixLoc::Prefix, RequireCompleteDeclContext(), and clang::T.
| ParsedType Sema::getDestructorTypeForDecltype | ( | const DeclSpec & | DS, |
| ParsedType | ObjectType ) |
Definition at line 458 of file SemaExprCXX.cpp.
References BuildDecltypeType(), Context, clang::SemaBase::Diag(), clang::DeclSpec::getRepAsExpr(), GetTypeFromParser(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::OpaquePtr< QualType >::make(), clang::T, clang::DeclSpec::TST_decltype, clang::DeclSpec::TST_decltype_auto, and clang::DeclSpec::TST_error.
|
inline |
Definition at line 924 of file Sema.h.
References Diags.
Referenced by ActOnCXXTypeid(), ActOnFinishFunctionBody(), clang::sema::checkAssignmentLifetime(), clang::sema::checkCaptureByLifetime(), CheckCastAlign(), CheckCommaOperands(), CheckCompleteVariableDeclaration(), CheckConstexprFunctionBody(), CheckFallThroughForBody(), CheckMissingFormatAttribute(), checkMoreSpecializedThanPrimary(), CreateGenericSelectionExpr(), createSubstDiag(), DiagnoseBadDeduction(), diagnoseTautologicalComparison(), DiagnoseUninitializedConstPtrUse(), DiagnoseUninitializedConstRefUse(), DiagnoseUninitializedUse(), DoEmitAvailabilityWarning(), EmitDiagnostic(), handleDiagnoseIfAttr(), clang::hlsl::HandleRootSignatureTarget(), clang::PCHGenerator::HandleTranslationUnit(), hasUncompilableErrorOccurred(), clang::inferNoReturnAttr(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), isAcceptableTagRedeclaration(), MergeTypedefNameDecl(), Sema(), and clang::sema::shouldRunGSLAssignmentAnalysis().
| Sema::FunctionEmissionStatus Sema::getEmissionStatus | ( | const FunctionDecl * | Decl, |
| bool | Final = false ) |
Definition at line 21020 of file SemaDecl.cpp.
References CUDA(), CUDADiscarded, clang::Destructor, clang::Device, Emitted, getASTContext(), clang::FunctionDecl::getCanonicalDecl(), clang::FunctionDecl::getDefinition(), clang::Global, clang::Decl::hasAttr(), clang::FunctionDecl::hasSkippedBody(), clang::Host, clang::SemaCUDA::IdentifyTarget(), clang::DeclContext::isDependentContext(), clang::isDiscardableGVALinkage(), LangOpts, OMPDiscarded, OpenMP(), clang::T, TemplateDiscarded, clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, and Unknown.
Referenced by ActOnFinishFunctionBody().
| FunctionScopeInfo * Sema::getEnclosingFunction | ( | ) | const |
Definition at line 2534 of file Sema.cpp.
References FunctionScopes, and clang::isa().
| CapturingScopeInfo * Sema::getEnclosingLambdaOrBlock | ( | ) | const |
Get the innermost lambda or block enclosing the current location, if any.
This looks through intervening non-lambda, non-block scopes such as local functions.
Definition at line 2546 of file Sema.cpp.
References CodeSynthesisContexts, CurContext, and FunctionScopes.
Referenced by ActOnNonTypeTemplateParameter(), ActOnTemplateTemplateParameter(), ActOnTypeParameter(), CheckParameter(), DiagnoseUnexpandedParameterPack(), and DiagnoseUnexpandedParameterPacks().
| SourceRange Sema::getExprRange | ( | Expr * | E | ) | const |
Definition at line 507 of file SemaExpr.cpp.
References clang::Stmt::getSourceRange().
|
inline |
Definition at line 930 of file Sema.h.
References ExternalSource.
Referenced by AddClassMessageCompletions(), and CheckExtVectorComponent().
| std::string Sema::getFixItZeroInitializerForType | ( | QualType | T, |
| SourceLocation | Loc ) const |
Get a string to suggest for zero-initialization of a type.
Definition at line 204 of file SemaFixItUtils.cpp.
References getScalarZeroExpressionForType(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::hasUserProvidedDefaultConstructor(), clang::CXXRecordDecl::isAggregate(), LangOpts, s, and clang::T.
Referenced by maybeRecoverWithZeroInitialization(), SuggestInitializationFixit(), and warnAboutAmbiguousFunction().
| std::string Sema::getFixItZeroLiteralForType | ( | QualType | T, |
| SourceLocation | Loc ) const |
Definition at line 223 of file SemaFixItUtils.cpp.
References getScalarZeroExpressionForType(), and clang::T.
Referenced by DiagnoseNullConversion().
|
static |
Given a function and its FormatAttr or FormatMatchesAttr info, attempts to populate the FormatStringInfo parameter with the attribute's correct format_idx and firstDataArg.
Returns true when the format fits the function and the FormatStringInfo has been populated.
Definition at line 3769 of file SemaChecking.cpp.
References clang::cast(), getFormatStringInfo(), clang::Decl::getFunctionType(), and clang::hasImplicitObjectParameter().
Referenced by checkFormatStringExpr(), and getFormatStringInfo().
|
static |
Definition at line 3784 of file SemaChecking.cpp.
References clang::Sema::FormatStringInfo::ArgPassingKind, FAPK_Fixed, FAPK_VAList, FAPK_Variadic, clang::Sema::FormatStringInfo::FirstDataArg, and clang::Sema::FormatStringInfo::FormatIdx.
|
static |
Definition at line 7207 of file SemaChecking.cpp.
References GetFormatStringType().
|
static |
Definition at line 7211 of file SemaChecking.cpp.
References GetFormatStringType().
|
static |
Definition at line 7191 of file SemaChecking.cpp.
References clang::FreeBSDKPrintf, clang::Kprintf, clang::NSString, clang::OSLog, clang::Printf, clang::Scanf, clang::Strfmon, clang::Strftime, and clang::Unknown.
Referenced by checkFormatStringExpr(), GetFormatStringType(), GetFormatStringType(), handleFormatMatchesAttr(), and mergeFormatMatchesAttr().
|
static |
Definition at line 7168 of file SemaChecking.cpp.
References clang::FreeBSDKPrintf, clang::Kprintf, clang::NSString, clang::OSLog, clang::Printf, clang::Scanf, clang::Strfmon, and clang::Strftime.
Referenced by checkFormatStringExpr(), and CheckMissingFormatAttribute().
| UnsignedOrNone Sema::getFullyPackExpandedSize | ( | TemplateArgument | Arg | ) |
Given a template argument that contains an unexpanded parameter pack, but which has already been substituted, attempt to determine the number of elements that will be produced once this argument is fully-expanded.
This is intended for use when transforming 'sizeof...(Arg)' in order to avoid actually expanding the pack where possible.
Definition at line 1444 of file SemaTemplateVariadic.cpp.
References clang::TemplateArgument::containsUnexpandedParameterPack(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::Type::getAs(), clang::TemplateArgument::getAsExpr(), clang::TemplateName::getAsSubstTemplateTemplateParmPack(), clang::TemplateArgument::getAsTemplate(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_elements(), clang::TemplateArgument::pack_size(), clang::TemplateArgument::StructuralValue, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
| DeclContext * Sema::getFunctionLevelDeclContext | ( | bool | AllowLambda = false | ) | const |
If AllowLambda is true, treat lambda as function.
Definition at line 1640 of file Sema.cpp.
References clang::cast(), CurContext, clang::DeclContext::getParent(), and clang::isa().
Referenced by CheckCXXThisType(), CheckShadow(), ClassifyImplicitMemberAccess(), DiagnoseConstAssignment(), diagnoseInstanceReference(), enclosingClassIsRelatedToClassInWhichMembersWereFound(), getCurFunctionDecl(), getCurFunctionOrMethodDecl(), getCurMethodDecl(), and getCurrentThisType().
|
inline |
Definition at line 11380 of file Sema.h.
References FunctionScopes, and FunctionScopesStart.
Referenced by getTemplateDepth().
| 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 2927 of file SemaTemplateDeduction.cpp.
References Context, and getTrivialTemplateArgumentLoc().
| 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).
| FD | Function being declared. |
| IsDefinition | Whether it is a definition or just a declaration. |
Definition at line 11300 of file SemaDecl.cpp.
References CodeSegStack, getASTContext(), getImplicitCodeSegAttrFromClass(), and clang::Decl::hasAttr().
Referenced by ActOnFunctionDeclarator(), ActOnStartOfLambdaDefinition(), and checkClassLevelCodeSegAttribute().
| ParsedType Sema::getInheritingConstructorName | ( | CXXScopeSpec & | SS, |
| SourceLocation | NameLoc, | ||
| const IdentifierInfo & | Name ) |
Handle the result of the special case name lookup for inheriting constructor declarations.
'NS::X::X' and 'NS::X<...>::X' are treated as constructor names in member using declarations, even if 'X' is not the name of the corresponding type.
Definition at line 57 of file SemaExprCXX.cpp.
References Context, CreateParsedType(), clang::NestedNameSpecifier::getAsType(), clang::CXXScopeSpec::getScopeRep(), and clang::Type.
|
inline |
Definition at line 11374 of file Sema.h.
References InventedParameterInfos, and InventedParameterInfosStart.
Referenced by getTemplateDepth().
| QualType Sema::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.
Definition at line 1671 of file SemaLambda.cpp.
References Context, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionProtoType::getExtProtoInfo(), clang::FunctionProtoType::getParamTypes(), clang::FunctionType::getReturnType(), clang::FunctionProtoType::ExtProtoInfo::RefQualifier, clang::RQ_None, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by addBlockPointerConversion(), addFunctionPointerConversions(), and DeduceReturnType().
|
inline |
Definition at line 920 of file Sema.h.
References LangOpts.
Referenced by ActOnAnnotModuleBegin(), ActOnAnnotModuleEnd(), ActOnArraySubscriptExpr(), ActOnBlockArguments(), ActOnBlockStmtExpr(), ActOnCapScopeReturnStmt(), ActOnCaseExpr(), ActOnCastExpr(), ActOnCharacterConstant(), ActOnCompoundStmt(), ActOnConditionalOp(), ActOnCXXAssumeAttr(), ActOnCXXDelete(), ActOnCXXMemberDeclarator(), ActOnCXXNamedCast(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNew(), ActOnCXXTryBlock(), ActOnCXXTypeid(), ActOnDecltypeExpression(), ActOnDecompositionDeclarator(), ActOnDependentMemberExpr(), ActOnDoStmt(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnEnumConstant(), ActOnExplicitInstantiation(), ActOnFields(), ActOnFinishFullExpr(), ActOnFinishFunctionBody(), ActOnFinishKNRParamDeclarations(), ActOnFinishLinkageSpecification(), ActOnForEachDeclStmt(), ActOnForStmt(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnIdExpression(), ActOnIfStmt(), ActOnInitList(), ActOnLabelStmt(), ActOnLambdaExpressionAfterIntroducer(), ActOnMemberAccessExpr(), ActOnModuleDecl(), ActOnModuleImport(), ActOnModuleImport(), ActOnMSVCUnknownTypeName(), ActOnNameClassifiedAsUndeclaredNonType(), ActOnNumericConstant(), actOnOMPReductionKindClause(), ActOnPackIndexingExpr(), ActOnPackIndexingType(), ActOnParamDeclarator(), ActOnParamDefaultArgument(), ActOnParenExpr(), ActOnPopScope(), ActOnPragmaCXLimitedRange(), ActOnPragmaFEnvAccess(), ActOnPragmaFEnvRound(), ActOnPragmaFloatControl(), ActOnPragmaFPContract(), ActOnPragmaFPEvalMethod(), ActOnPragmaFPValueChangingOption(), ActOnPragmaMSAllocText(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnSEHTryBlock(), ActOnStartCXXMemberReference(), ActOnStartExportDecl(), ActOnStartLinkageSpecification(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnStartOfTranslationUnit(), ActOnStringLiteral(), ActOnTag(), ActOnTemplateIdType(), ActOnTemplateName(), ActOnTemplateTypeArgument(), ActOnTypedefDeclarator(), ActOnTypeName(), ActOnTypenameType(), ActOnUnevaluatedStringLiteral(), ActOnUninitializedDecl(), ActOnUsingDeclaration(), ActOnVariableDeclarator(), AddAlignmentAttributesForRecord(), AddBuiltinCandidate(), AddConversionCandidate(), addFixitForObjCARCConversion(), addFunctionPointerConversion(), AddImplicitlyDeclaredMembersToClass(), AddInitializerToDecl(), AddKeywordsToConsumer(), AddKnownFunctionAttributes(), AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), AddMethodCandidate(), AddMethodTemplateCandidate(), AddModeAttr(), AddMsStructLayoutForRecord(), AddOrdinaryNameResults(), AddOverloadCandidate(), AddRecordMembersCompletionResults(), AddSurrogateCandidate(), AddTemplateConversionCandidate(), AddTemplateOverloadCandidate(), AdjustDestructorExceptionSpec(), AdjustFunctionParmAndArgTypesForDeduction(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeImplicitConversions(), clang::OverloadCandidateSet::BestViableFunction(), BuildAnonymousStructOrUnion(), BuildArrayType(), BuildAtomicType(), BuildBinOp(), BuildBlockPointerType(), BuildCallExpr(), BuildCallToMemberFunction(), buildCapture(), buildCaptureDecl(), buildCapturedStmtCaptureList(), BuildCompoundLiteralExpr(), BuildConvertedConstantExpression(), BuildCStyleCastExpr(), BuildCXXConstructExpr(), BuildCXXForRangeStmt(), BuildCXXNamedCast(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildCXXThrow(), BuildCXXTypeConstructExpr(), BuildDeclarationNameExpr(), buildDeclareReductionRef(), BuildDeclRefExpr(), BuildExceptionDeclaration(), BuildExpressionFromIntegralTemplateArgumentValue(), BuildExtVectorType(), BuildFieldReferenceExpr(), BuildFunctionType(), BuildImplicitMemberExpr(), buildLambdaCaptureFixit(), BuildLambdaExpr(), buildLambdaInitCaptureInitialization(), buildLambdaThisCaptureFixit(), BuildMatrixType(), BuildMemberPointerType(), BuildMemberReferenceExpr(), BuildMemInitializer(), BuildModuleInclude(), buildOverloadedCallSet(), BuildPointerType(), BuildPredefinedExpr(), BuildPseudoDestructorExpr(), BuildQualifiedDeclarationNameExpr(), BuildQualifiedType(), BuildRecoveryCallExpr(), BuildReferenceType(), BuildResolvedCallExpr(), BuildReturnStmt(), buildSingleCopyAssignRecursively(), BuildStaticAssertDeclaration(), BuildTypeofExprType(), BuildUnaryOp(), buildUserDefinedMapperRef(), BuildUsingDeclaration(), BuildVAArgExpr(), BuildVectorLiteral(), BuiltinDumpStruct(), BuiltinOverflow(), canCalleeThrow(), canPassInRegisters(), CanUseDecl(), captureInBlock(), captureInCapturedRegion(), CheckAdditionOperands(), CheckAddressOfMemberAccess(), CheckAddressOfOperand(), checkAllocateClauses(), CheckAllocatedType(), CheckAllocationAccess(), CheckAltivecInitFromScalar(), CheckAnonMemberRedeclaration(), checkARCPropertyImpl(), checkArithmeticBinOpPointerOperands(), checkArithmeticOpPointerOperand(), checkArraySize(), CheckAssignmentConstraints(), CheckAssignmentOperands(), CheckBaseSpecifier(), CheckBitwiseOperands(), checkBlockPointerTypesForAssignment(), CheckBooleanCondition(), CheckBoolLikeConversion(), CheckC23ConstexprInitConversion(), CheckC23ConstexprInitStringLiteral(), checkCall(), checkCancelRegion(), checkCaseValue(), checkClassLevelDLLAttribute(), CheckCommaOperands(), CheckCompareOperands(), CheckComparisonCategoryType(), CheckCompletedCXXClass(), CheckCompleteVariableDeclaration(), checkCondition(), CheckConditionalOperand(), CheckConditionalOperands(), checkConditionalPointerCompatibility(), CheckConstexprCtorInitializer(), CheckConstexprDeclStmt(), CheckConstexprDestructorSubobjects(), CheckConstexprFunctionBody(), CheckConstexprFunctionDefinition(), CheckConstexprFunctionStmt(), CheckConstexprMissingReturn(), CheckConstexprParameterTypes(), CheckConstexprReturnType(), CheckConstraintExpression(), CheckConstructorAccess(), CheckConstructorAccess(), CheckConversionDeclarator(), CheckCountedByAttrOnField(), CheckCXX2CRelocatable(), CheckCXX98CompatAccessibleCopy(), CheckCXXThrowOperand(), CheckDerivedToBaseConversion(), CheckDestructorAccess(), CheckDistantExceptionSpec(), CheckEffectiveAccess(), checkEnumArithmeticConversions(), CheckEnumConstant(), CheckEquivalentExceptionSpec(), CheckEquivalentExceptionSpec(), CheckEquivalentExceptionSpec(), clang::CheckEquivalentExceptionSpecImpl(), checkEscapingByref(), CheckExceptionSpecCompatibility(), CheckExceptionSpecSubset(), CheckExplicitInstantiationScope(), CheckExplicitlyDefaultedComparison(), CheckExplicitlyDefaultedSpecialMember(), CheckExplicitObjectParameter(), checkExportedDecl(), clang::sema::checkExprLifetimeImpl(), CheckExtVectorCast(), CheckExtVectorComponent(), CheckFieldDecl(), checkForConflictWithNonVisibleExternC(), CheckForFunctionRedefinition(), CheckFormatString(), CheckForModifiableLvalue(), CheckFriendAccess(), CheckFunctionCall(), CheckFunctionDeclaration(), CheckFunctionOrTemplateParamDeclarator(), CheckFunctionReturnType(), CheckFunctionTemplateSpecialization(), checkGenericLoopLastprivate(), checkGlobalOrExternCConflict(), checkIfClauses(), CheckImmediateEscalatingFunctionDefinition(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), CheckLogicalOperands(), CheckLookupAccess(), CheckMain(), checkMapClauseExpressionBase(), CheckMatrixLogicalOperands(), CheckMemaccessSize(), CheckMemberAccess(), CheckMemberOperatorAccess(), CheckMissingFormatAttribute(), CheckMultiplyDivideOperands(), checkNestingOfRegions(), checkNewAttributesAfterDef(), CheckNonDependentConversions(), CheckNontrivialField(), CheckNonTypeTemplateParameterType(), CheckObjCCollectionLiteralElement(), checkObjCPointerIntrospection(), checkOpenMPIterationSpace(), checkOpenMPLoop(), CheckOperatorNewDeleteTypes(), CheckOriginalCallArgDeduction(), CheckOverridingFunctionExceptionSpec(), CheckParameter(), CheckParmsForFunctionDef(), CheckPlaceholderExpr(), checkPointerAuthEnabled(), CheckPointerConversion(), CheckPointerToMemberOperands(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckRemainderOperands(), checkSectionsDirective(), CheckShadow(), CheckShadowingDeclModification(), CheckSimplerImplicitMovesMSVCWorkaround(), CheckSingleAssignmentConstraints(), CheckSpecializationInstantiationRedecl(), checkSpecializationReachability(), checkSpecializationVisibility(), CheckSpecifiedExceptionType(), CheckStaticArrayArgument(), CheckStringInit(), CheckStructuredBindingMemberAccess(), CheckSubtractionOperands(), CheckTautologicalComparison(), CheckTemplateArgument(), CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateSpecializationScope(), CheckTemplateTypeArgument(), CheckTypenameType(), CheckUnaryExprOrTypeTraitOperand(), checkUndefinedButUsed(), CheckUnicodeArithmeticConversions(), 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(), CreateOverloadedBinOp(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMemberFunctionsWithName(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DeduceAutoType(), deduceClosureReturnType(), DeduceFunctionTypeFromReturnExpr(), DeduceNonTypeTemplateArgument(), deduceOpenCLAddressSpace(), deducePropertyOwnershipFromType(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateSpecializationFromInitializer(), DeduceVariableDeclarationType(), deduceVarTypeFromInitializer(), DefaultArgumentPromotion(), defaultedSpecialMemberIsConstexpr(), DefaultFunctionArrayConversion(), DefaultLvalueConversion(), DefaultVariadicArgumentPromotion(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitMoveAssignment(), DetectPrecisionLossInComplexDivision(), clang::InitializationSequence::Diagnose(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnNullPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), DiagnoseAssignmentResult(), DiagnoseBadShiftValues(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseCommaOperator(), DiagnoseDependentMemberLookup(), DiagnoseEmptyLookup(), DiagnoseExceptionUse(), diagnoseExprIntendedAsTemplateName(), clang::ParsedAttr::diagnoseLangOpts(), diagnoseListInit(), DiagnoseMismatchedNewDelete(), diagnoseMissingConstinit(), DiagnoseNarrowingInInitList(), DiagnoseNullConversion(), diagnoseOpenCLTypes(), DiagnoseRetainableFlexibleArrayMember(), DiagnoseSentinelCalls(), diagnoseSubtractionOnNullPointer(), diagnoseTautologicalComparison(), DiagnoseTemplateParameterShadow(), diagnoseTypo(), diagnoseUncapturableValueReferenceOrBinding(), DiagnoseUnknownAttribute(), DiagnoseUnknownTypeName(), DiagnoseUnusedButSetDecl(), DiagnoseUnusedDecl(), DiagnoseUnusedLambdaCapture(), DiagnoseUseOfDecl(), diagnoseUseOfInternalDeclInInlineFunction(), DiagnoseWeakIvars(), diagnoseXorMisusedAsPow(), diagnoseZeroToNullptrConversion(), DiagPlaceholderFieldDeclDefinitions(), DiagPlaceholderVariableDefinition(), DiagRedefinedPlaceholderFieldDecl(), DiagReservedModuleName(), DiagUninitUse(), DoEmitAvailabilityWarning(), EmitDiagForCXXThrowInNonThrowingFunc(), EmitDiagnostic(), emitReplacement(), ExpandFunctionLocalPredefinedMacros(), filterNonConflictingPreviousTypedefDecls(), FinalizeDeclaration(), FinalizeDeclaratorGroup(), FindAllocationFunctions(), FindCompositePointerType(), findDeleteForPromise(), clang::DeclSpec::Finish(), FinishForRangeVarDecl(), FixOverloadedFunctionReference(), ForceDeclarationOfImplicitMembers(), FormatStringHasSArg(), funcHasParameterSizeMangling(), clang::FunctionCallFilterCCC::FunctionCallFilterCCC(), GatherArgumentsForCall(), getCCForDeclaratorChunk(), getCurrentClass(), getCurrentInstantiationOf(), GetDeclSpecTypeForDeclarator(), getDefaultCXXMethodAddrSpace(), getDefaultedFunctionKind(), getDummyLambdaType(), GetFullTypeForDeclarator(), getLambdaType(), getNamedReturnInfo(), getNonFieldDeclScope(), getNonOdrUseReasonInCurrentContext(), getNonTagTypeDeclKind(), getOpenCLKernelParameterType(), getPrivateItem(), getTargetRegionParams(), getTopMostPointOfInstantiation(), GetTypeForDeclarator(), GetTypeForDeclaratorCast(), getTypeName(), GetTypeOfFunction(), getUDSuffixLoc(), GloballyUniqueObjectMightBeAccidentallyDuplicated(), HandleAddressSpaceTypeAttribute(), HandleArmSveVectorBitsTypeAttr(), handleAvailabilityAttr(), handleConstructorAttr(), HandleDeclarator(), handleDelayedForbiddenType(), handleDeprecatedAttr(), handleDeviceKernelAttr(), handleFallThroughAttr(), HandleField(), handleFloatConversion(), handleFunctionTypeAttr(), handleGlobalAttr(), HandleImmediateInvocations(), handleInitPriorityAttr(), handleLambdaNumbering(), handleLikely(), HandleMatrixTypeAttr(), handleMSConstexprAttr(), handleMSConstexprAttr(), HandleMSProperty(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoCfCheckAttr(), handleObjCOwnershipTypeAttr(), HandlePtrAuthQualifier(), HandleRISCVRVVVectorBitsTypeAttr(), handleSharedAttr(), handleStandardNoReturnAttr(), handleTagNumbering(), handleUnlikely(), handleUnusedAttr(), handleVTablePointerAuthentication(), handleWarnUnusedResult(), hasAcceptableDefinition(), HasAccess(), hasNewExtendedAlignment(), hasStructuralCompatLayout(), hasUserDefinedMapper(), IgnoredValueConversions(), ImpCastExprToType(), ImplicitlyDefineFunction(), clang::inferNoReturnAttr(), Initialize(), clang::InitializationSequence::InitializeFrom(), InsertOCLBuiltinDeclarationsFromTable(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), InstantiateVariableInitializer(), isAbstractType(), isAcceptableTagRedeclContext(), clang::isBetterOverloadCandidate(), IsBlockPointerConversion(), isCapturingReferenceToHostVarInCUDADeviceLambda(), isConstNotMutableType(), IsCppCompatWarning(), isCurrentClassNameTypo(), IsCXX98CompatWarning(), IsDerivedFrom(), IsEnumConstOrFromMacro(), isExternalWithNoLinkageType(), IsFloatingPointPromotion(), isFunctionDefinitionDiscarded(), isIncompleteDeclExternC(), IsIntegralPromotion(), isMainFileLoc(), IsMatrixConversion(), isMemberAccessibleForDeletion(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isObjCPointerConversion(), isOpenMPCapturedRegionInArmSMEFunction(), IsOverloadOrOverrideImpl(), IsPointerConversion(), isPotentialImplicitMemberAccess(), isReferenceToNonConstCapture(), isResultTypeOrTemplate(), IsSimplyAccessible(), IsStandardConversion(), isStdClassTemplate(), isStdInitializerList(), isStdTypeIdentity(), isTagTypeWithMissingTag(), isTautologicalBoundsCheck(), isTemplateName(), isUnavailableAlignedAllocationFunction(), isUsualDeallocationFunction(), isValidVarArgType(), isVariableCapturable(), IsVectorConversion(), LookupBinOp(), LookupBuiltin(), LookupDirect(), lookupExternCFunctionOrVariable(), LookupInlineAsmField(), LookupMemberExpr(), LookupName(), LookupObjCInterfaceDeclForLiteral(), LookupSpecialMember(), LookupTemplateName(), mapCodeCompletionContext(), MarkDeclRefReferenced(), MarkExpressionAsImmediateEscalating(), MarkExprReferenced(), MarkFunctionReferenced(), MarkMemberReferenced(), MaybeBindToTemporary(), maybeExtendBlockObject(), MaybeProduceObjCObject(), MergeCompatibleFunctionDecls(), MergeCXXFunctionDecl(), mergeDeclAttribute(), MergeFunctionDecl(), mergeInternalLinkageAttr(), mergeInternalLinkageAttr(), MergeTypedefNameDecl(), mergeTypeWithPrevious(), MergeVarDecl(), MergeVarDeclExceptionSpecs(), MergeVarDeclTypes(), mightBeIntendedToBeTemplateName(), NoteFunctionCandidate(), OpenCLCheckVectorConditional(), parseDeclareSimdClauses(), ParsedFreeStandingDeclSpec(), clang::InitializationSequence::Perform(), PerformContextualImplicitConversion(), PerformImplicitConversion(), PerformImplicitConversion(), PerformMoveOrCopyInitialization(), PopExpressionEvaluationContext(), PrintInstantiationStack(), ProcessDeclAttribute(), ProcessDeclAttributeList(), processImplicitMapsWithDefaultMappers(), ProcessPragmaExport(), PushCapturedRegionScope(), PushExpressionEvaluationContextForFunction(), PushOnScopeChains(), RegisterLocallyScopedExternCDecl(), repeatForLambdaConversionFunctionCallingConvs(), reportOriginalDsa(), RequireLiteralType(), RequireStructuralType(), resolveAddressOfSingleOverloadCandidate(), ResolveConstructorOverload(), SelectBestMethod(), Sema(), SetDeclDefaulted(), setExceptionMode(), clang::DeclSpec::SetStorageClassSpec(), setTagNameForLinkagePurposes(), clang::OverloadCandidateSet::shouldDeferDiags(), ShouldDeleteSpecialMember(), ShouldDiagnoseAvailabilityInContext(), shouldIgnoreDueToReservedName(), shouldSkipAnonEnumBody(), ShouldSplatAltivecScalarInCast(), SubstituteExplicitTemplateArguments(), TemporaryMaterializationConversion(), tryCaptureVariable(), TryConstructorInitialization(), TryConstructorOrParenListInitialization(), TryDefaultInitialization(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), tryLookupUnambiguousFieldDecl(), TryNamespaceTypoCorrection(), TryOCLSamplerInitialization(), TryOCLZeroOpaqueTypeInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryUserDefinedConversion(), TryValueInitialization(), tryVectorConvertAndSplat(), UseArgumentDependentLookup(), UsualUnaryFPConversions(), ValidateObjCLiteralInterfaceDecl(), VerifyBitField(), VerifyIntegerConstantExpression(), warnAboutRedundantParens(), warnOnCTypeHiddenInCPlusPlus(), and warnOnReservedIdentifier().
| SourceLocation Sema::getLocationOfStringLiteralByte | ( | const StringLiteral * | SL, |
| unsigned | ByteNo ) const |
Definition at line 124 of file SemaChecking.cpp.
References Context, clang::StringLiteral::getLocationOfByte(), getSourceManager(), and LangOpts.
Referenced by ActOnGCCAsmStmt(), and CheckC23ConstexprInitStringLiteral().
| SourceLocation Sema::getLocForEndOfToken | ( | SourceLocation | Loc, |
| unsigned | Offset = 0 ) |
Calls Lexer::getLocForEndOfToken()
Definition at line 83 of file Sema.cpp.
References clang::Lexer::getLocForEndOfToken(), LangOpts, and SourceMgr.
Referenced by ActOnCXXDelete(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnLambdaExpressionAfterIntroducer(), addFixitForObjCARCConversion(), BuildLambdaExpr(), BuiltinDumpStruct(), CheckCompletedCXXClass(), CheckConversionDeclarator(), CheckEquivalentExceptionSpec(), CheckExplicitlyDefaultedComparison(), CheckFoldOperand(), CheckFunctionDeclaration(), CheckLogicalOperands(), CheckMain(), CheckMemorySizeofForComparison(), CheckParameter(), checkStringLiteralArgumentAttr(), checkTypeParamListConsistency(), CheckUsingDeclQualifier(), ConstructFixItRangeForUnusedCapture(), CreateBuiltinBinOp(), CreateIfFixit(), clang::InitializationSequence::Diagnose(), DiagnoseAlwaysNonNullPointer(), DiagnoseAssignmentAsCondition(), DiagnoseDirectIsaAccess(), DiagnoseIntInBoolContext(), diagnoseLogicalNotOnLHSofCheck(), DiagnoseMismatchedNewDelete(), DiagnoseNarrowingInInitList(), diagnoseNoViableConversion(), diagnoseObjCARCConversion(), diagnoseObjCLiteralComparison(), DiagnoseSentinelCalls(), diagnoseXorMisusedAsPow(), DoEmitAvailabilityWarning(), clang::DeclSpec::Finish(), fixItNullability(), GetFullTypeForDeclarator(), handleFallThroughAttr(), isNullPointerValueTemplateArgument(), maybeRecoverWithZeroInitialization(), setTagNameForLinkagePurposes(), SuggestInitializationFixit(), clang::ConversionFixItGenerator::tryToFixConversion(), tryToRecoverWithCall(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().
| 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 1612 of file SemaLookup.cpp.
References CodeSynthesisContextLookupModules, CodeSynthesisContexts, getDefiningModule(), and LookupModulesCache.
Referenced by isModuleVisible().
| 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 2901 of file Sema.cpp.
References DeleteExprs.
| ModuleLoader & Sema::getModuleLoader | ( | ) | const |
Retrieve the module loader associated with the preprocessor.
Definition at line 109 of file Sema.cpp.
References PP.
Referenced by ActOnModuleDecl(), ActOnModuleImport(), BuildModuleInclude(), and createImplicitModuleImportForErrorRecovery().
| FunctionDecl * Sema::getMoreConstrainedFunction | ( | FunctionDecl * | FD1, |
| FunctionDecl * | FD2 ) |
Returns the more constrained function according to the rules of partial ordering by constraints (C++ [temp.constr.order]).
| FD1 | the first function |
| FD2 | the second function |
Definition at line 6150 of file SemaTemplateDeduction.cpp.
References clang::FunctionDecl::getAssociatedConstraints(), clang::Decl::getDescribedTemplate(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::isa(), IsAtLeastAsConstrained(), and clang::FunctionDecl::isFunctionTemplateSpecialization().
Referenced by CheckMemberSpecialization(), getMorePartialOrderingConstrained(), and resolveAddressOfSingleOverloadCandidate().
| ClassTemplatePartialSpecializationDecl * Sema::getMoreSpecializedPartialSpecialization | ( | ClassTemplatePartialSpecializationDecl * | PS1, |
| ClassTemplatePartialSpecializationDecl * | PS2, | ||
| SourceLocation | Loc ) |
Returns the more specialized class template partial specialization according to the rules of partial ordering of class template partial specializations (C++ [temp.class.order]).
| PS1 | the first class template partial specialization |
| PS2 | the second class template partial specialization |
Definition at line 6419 of file SemaTemplateDeduction.cpp.
References Context, clang::ClassTemplatePartialSpecializationDecl::getCanonicalInjectedSpecializationType(), and getMoreSpecialized().
Referenced by CheckVarTemplateId(), and getPatternForClassTemplateSpecialization().
| VarTemplatePartialSpecializationDecl * Sema::getMoreSpecializedPartialSpecialization | ( | VarTemplatePartialSpecializationDecl * | PS1, |
| VarTemplatePartialSpecializationDecl * | PS2, | ||
| SourceLocation | Loc ) |
Definition at line 6444 of file SemaTemplateDeduction.cpp.
References clang::TemplateArgumentList::asArray(), Context, clang::VarTemplateDecl::getCanonicalDecl(), getMoreSpecialized(), clang::VarTemplateSpecializationDecl::getSpecializedTemplate(), clang::VarTemplateSpecializationDecl::getTemplateArgs(), and clang::None.
| FunctionTemplateDecl * Sema::getMoreSpecializedTemplate | ( | FunctionTemplateDecl * | FT1, |
| FunctionTemplateDecl * | FT2, | ||
| SourceLocation | Loc, | ||
| TemplatePartialOrderingContext | TPOC, | ||
| unsigned | NumCallArguments1, | ||
| QualType | RawObj1Ty = {}, | ||
| QualType | RawObj2Ty = {}, | ||
| bool | Reversed = false, | ||
| bool | PartialOverloading = false ) |
Returns the more specialized function template according to the rules of function template partial ordering (C++ [temp.func.order]).
| FT1 | the first function template |
| FT2 | the second function template |
| TPOC | the context in which we are performing partial ordering of function templates. |
| NumCallArguments1 | The number of arguments in the call to FT1, used only when TPOC is TPOC_Call. Does not include the object argument when calling a member function. |
| RawObj1Ty | The 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 |
| RawObj2Ty | The 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 |
| Reversed | If 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. |
Definition at line 5854 of file SemaTemplateDeduction.cpp.
References clang::Type::castAs(), Context, Equal, clang::TemplateDecl::getAssociatedConstraints(), GetImplicitObjectParameterType(), getMoreSpecializedTrailingPackTieBreaker(), clang::FunctionDecl::getOverloadedOperator(), clang::CXXMethodDecl::getRefQualifier(), clang::FunctionDecl::getReturnType(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ValueDecl::getType(), clang::FunctionDecl::hasCXXExplicitFunctionObjectParameter(), IsAtLeastAsConstrained(), isAtLeastAsSpecializedAs(), clang::Type::isRValueReferenceType(), clang::CXXMethodDecl::isStatic(), Less, More, clang::OO_None, 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().
| UnresolvedSetIterator Sema::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.
| SpecBegin | the start iterator of the function template specializations that we will be comparing. |
| SpecEnd | the end iterator of the function template specializations, paired with SpecBegin. |
| Loc | the location where the ambiguity or no-specializations diagnostic should occur. |
| NoneDiag | partial diagnostic used to diagnose cases where there are no matching candidates. |
| AmbigDiag | partial diagnostic used to diagnose an ambiguity, if one occurs. |
| CandidateDiag | partial diagnostic used for each function template specialization that is a candidate in the ambiguous ordering. One parameter in this diagnostic should be unbound, which will correspond to the string describing the template arguments for the function template specialization. |
Definition at line 6075 of file SemaTemplateDeduction.cpp.
References Ambiguous, clang::cast(), clang::declaresSameEntity(), clang::SemaBase::Diag(), getMoreSpecializedTemplate(), getTemplateArgumentBindingsText(), HandleFunctionTypeMismatch(), clang::QualType::isNull(), clang::TemplateSpecCandidateSet::NoteCandidates(), and clang::TPOC_Other.
Referenced by ActOnExplicitInstantiation(), and CheckFunctionTemplateSpecialization().
| 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.
| VD | The NRVO candidate variable. |
Definition at line 3433 of file SemaStmt.cpp.
References Context, clang::Decl::getKind(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::hasDependentAlignment(), clang::VarDecl::hasLocalStorage(), clang::VarDecl::isExceptionVariable(), clang::Type::isIncompleteType(), clang::Type::isObjectType(), clang::Type::isRValueReferenceType(), clang::QualType::isVolatileQualified(), clang::Sema::NamedReturnInfo::MoveEligible, clang::Sema::NamedReturnInfo::MoveEligibleAndCopyElidable, and clang::Sema::NamedReturnInfo::S.
| 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.
| E | The 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. |
| Mode | Overrides detection of current language mode and uses the rules for C++23. |
Definition at line 3407 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().
| DeclarationNameInfo Sema::GetNameForDeclarator | ( | Declarator & | D | ) |
GetNameForDeclarator - Determine the full declaration name for the given Declarator.
Definition at line 5992 of file SemaDecl.cpp.
References clang::Declarator::getName(), and GetNameFromUnqualifiedId().
Referenced by ActOnCXXMemberDeclarator(), ActOnExplicitInstantiation(), ActOnFriendFunctionDecl(), ActOnFunctionDeclarator(), ActOnVariableDeclarator(), CheckFunctionOrTemplateParamDeclarator(), CreateNewFunctionDecl(), and HandleDeclarator().
| DeclarationNameInfo Sema::GetNameFromUnqualifiedId | ( | const UnqualifiedId & | Name | ) |
Retrieves the declaration name from a parsed unqualified-id.
Definition at line 5997 of file SemaDecl.cpp.
References clang::UnqualifiedId::ConstructorName, Context, clang::UnqualifiedId::ConversionFunctionId, CurContext, clang::UnqualifiedId::DestructorName, clang::SemaBase::Diag(), clang::UnqualifiedId::EndLocation, clang::OpaquePtr< PtrTy >::get(), clang::UnionOpaquePtr< T >::get(), clang::TemplateName::getAsTemplateDecl(), clang::NamedDecl::getIdentifier(), clang::UnqualifiedId::getKind(), getTemplateNameKindForDiagnostics(), GetTypeFromParser(), clang::UnqualifiedId::Identifier, 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::isa(), clang::QualType::isNull(), clang::TemplateIdAnnotation::Name, NoteTemplateLocation(), clang::UnqualifiedId::OFI::Operator, clang::UnqualifiedId::OperatorFunctionId, clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc(), clang::DeclarationNameInfo::setCXXOperatorNameRange(), clang::DeclarationNameInfo::setLoc(), clang::DeclarationNameInfo::setName(), clang::DeclarationNameInfo::setNamedTypeInfo(), clang::UnqualifiedId::StartLocation, clang::UnqualifiedId::OFI::SymbolLocations, clang::Template, clang::TemplateIdAnnotation::Template, clang::UnqualifiedId::TemplateId, clang::UnqualifiedId::TemplateName, and clang::TemplateIdAnnotation::TemplateNameLoc.
Referenced by ActOnAliasDeclaration(), ActOnMSDependentExistsStmt(), ActOnTemplateName(), ActOnUsingDeclaration(), CheckMicrosoftIfExistsSymbol(), DecomposeUnqualifiedId(), and GetNameForDeclarator().
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++:
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 2342 of file SemaDecl.cpp.
References clang::CPlusPlus, clang::Scope::DeclScope, clang::Scope::getEntity(), clang::Scope::getFlags(), getLangOpts(), clang::Scope::getParent(), clang::Scope::isClassScope(), and clang::DeclContext::isTransparentContext().
Referenced by ActOnEnumConstant(), ActOnTag(), and CleanupMergedEnum().
| 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 2349 of file SemaExpr.cpp.
References Context, getLangOpts(), isCapturingReferenceToHostVarInCUDADeviceLambda(), isUnevaluatedContext(), clang::NOUR_Constant, clang::NOUR_None, clang::NOUR_Unevaluated, and OpenMP().
Referenced by BuildDeclRefExpr(), and BuildMemberExpr().
| NonTagKind Sema::getNonTagTypeDeclKind | ( | const Decl * | D, |
| TagTypeKind | TTK ) |
Given a non-tag type declaration, returns an enum useful for indicating what kind of non-tag type this is.
Definition at line 17560 of file SemaDecl.cpp.
References clang::Class, clang::Enum, getLangOpts(), clang::Interface, clang::isa(), clang::NonClass, clang::NonEnum, clang::NonStruct, clang::NonUnion, clang::Struct, clang::Template, clang::TemplateTemplateArgument, clang::TypeAlias, clang::TypeAliasTemplate, clang::Typedef, and clang::Union.
Referenced by ActOnExplicitInstantiation(), and ActOnTag().
| const NormalizedConstraint * Sema::getNormalizedAssociatedConstraints | ( | ConstrainedDeclOrNestedRequirement | Entity, |
| ArrayRef< AssociatedConstraint > | AssociatedConstraints ) |
Definition at line 2432 of file SemaConcept.cpp.
Referenced by CheckConstraintSatisfaction(), and MaybeEmitAmbiguousAtomicConstraintsDiagnostic().
| IdentifierInfo * Sema::getNullabilityKeyword | ( | NullabilityKind | nullability | ) |
Retrieve the keyword associated.
Definition at line 3824 of file SemaType.cpp.
References clang::NonNull, clang::Nullable, clang::NullableResult, PP, and clang::Unspecified.
Referenced by GetFullTypeForDeclarator().
| UnsignedOrNone 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 1128 of file SemaTemplateVariadic.cpp.
References clang::cast(), getNumArgumentsInExpansionFromUnexpanded(), and clang::T.
Referenced by getPackIndexForParam().
| UnsignedOrNone Sema::getNumArgumentsInExpansionFromUnexpanded | ( | llvm::ArrayRef< UnexpandedParameterPack > | Unexpanded, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 1063 of file SemaTemplateVariadic.cpp.
References clang::cast(), CurrentInstantiationScope, clang::getDepthAndIndex(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::MultiLevelTemplateArgumentList::hasTemplateArgument(), clang::isa(), clang::isPackProducingBuiltinTemplateName(), and clang::Result.
Referenced by getNumArgumentsInExpansion().
|
inline |
Definition at line 921 of file Sema.h.
References OpenCLFeatures.
Referenced by ActOnNumericConstant(), BuildMemberPointerType(), BuildPointerType(), BuildReferenceType(), CheckAssignmentOperands(), CheckFieldDecl(), CheckVariableDeclarationType(), ConvertDeclSpecToType(), deduceOpenCLAddressSpace(), DefaultArgumentPromotion(), DefaultLvalueConversion(), diagnoseOpenCLTypes(), GetFullTypeForDeclarator(), getOpenCLKernelParameterType(), Initialize(), clang::InitializationSequence::Perform(), clang::DeclSpec::SetStorageClassSpec(), and TryOCLZeroOpaqueTypeInitialization().
|
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 2125 of file Sema.h.
References OptimizeOffPragmaLocation.
| LabelDecl * Sema::GetOrCreateMSAsmLabel | ( | StringRef | ExternalLabelName, |
| SourceLocation | Location, | ||
| bool | AlwaysCreate ) |
Definition at line 1012 of file SemaStmtAsm.cpp.
References clang::C, Context, clang::LabelDecl::isMSAsmLabel(), LookupOrCreateLabel(), clang::Decl::markUsed(), OS, PP, clang::Decl::setLocation(), clang::LabelDecl::setMSAsmLabel(), and clang::LabelDecl::setMSAsmLabelResolved().
| NamespaceDecl * Sema::getOrCreateStdNamespace | ( | ) |
Retrieve the special "std" namespace, which may require us to implicitly define the namespace.
Definition at line 12193 of file SemaDeclCXX.cpp.
References Context, clang::NamespaceDecl::Create(), getStdNamespace(), PP, and StdNamespace.
Referenced by ActOnUsingDirective(), and DeclareGlobalNewDelete().
Get the module owning an entity.
Definition at line 3601 of file Sema.h.
References clang::Decl::getOwningModule().
Referenced by diagnoseEquivalentInternalLinkageDeclarations(), diagnoseMissingImport(), getDefiningModule(), hasAcceptableDefaultArgument(), and isEquivalentInternalLinkageDeclaration().
|
inline |
Definition at line 11787 of file Sema.h.
References ArgPackSubstIndex, and clang::TemplateArgument::pack_size().
|
inline |
Definition at line 11792 of file Sema.h.
References ArgPackSubstIndex, clang::TemplateArgument::getPackExpansionPattern(), clang::TemplateArgument::isPackExpansion(), and clang::TemplateArgument::pack_elements().
|
inline |
Definition at line 926 of file Sema.h.
References PP.
Referenced by ActOnDocumentableDecls(), AddOverrideResults(), CheckUnreachable(), DiagnoseSwitchLabelsFallthrough(), diagnoseXorMisusedAsPow(), DoEmitAvailabilityWarning(), findMacroSpelling(), clang::hlsl::HandleRootSignatureTarget(), InsertOCLBuiltinDeclarationsFromTable(), isLibstdcxxEagerExceptionSpecHack(), clang::ParseAST(), clang::hlsl::ParseHLSLRootSignature(), clang::PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(), clang::ReplCompletionConsumer::ProcessCodeCompleteResults(), ProduceSignatureHelp(), ShouldDiagnoseAvailabilityInContext(), and clang::ASTWriter::WriteAST().
|
inlinestatic |
|
inlinestatic |
Definition at line 15082 of file Sema.h.
References clang::Stmt::getSourceRange().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 15083 of file Sema.h.
References clang::TypeLoc::getSourceRange().
|
inline |
Retrieve a suitable printing policy for diagnostics.
Definition at line 1192 of file Sema.h.
References Context, getPrintingPolicy(), and PP.
Referenced by ActOnCXXForRangeIdentifier(), BoundsSafetyCheckUseOfCountAttrPtr(), CheckDeducedPlaceholderConstraints(), CheckEquivalentExceptionSpec(), checkPreviousOMPAllocateAttribute(), CheckVirtualDtorCall(), DiagnoseAlwaysNonNullPointer(), diagnoseNoViableConversion(), EmitDiagnostic(), findFailedBooleanCondition(), getCompletionPrintingPolicy(), getPrintingPolicy(), getTemplateArgumentBindingsText(), InstantiateFunctionDefinition(), MarkFunctionReferenced(), noteLocation(), PrintInstantiationStack(), and ProcessAPINotes().
|
static |
Retrieve a suitable printing policy for diagnostics.
Definition at line 152 of file Sema.cpp.
References clang::PrintingPolicy::Bool, Context, clang::PrintingPolicy::EntireContentsOfLargeArray, and PP.
| SourceRange Sema::getRangeForNextToken | ( | SourceLocation | Loc, |
| bool | IncludeMacros, | ||
| bool | IncludeComments, | ||
| std::optional< tok::TokenKind > | ExpectedToken = std::nullopt ) |
Calls Lexer::findNextToken() to find the next token, and if the locations of both ends of the token can be resolved it return that range; Otherwise it returns an invalid SourceRange.
Definition at line 88 of file Sema.cpp.
References clang::Lexer::findNextToken(), clang::SourceLocation::isMacroID(), clang::SourceLocation::isValid(), LangOpts, and SourceMgr.
Referenced by ConstructFixItRangeForUnusedCapture().
| TypeLoc Sema::getReturnTypeLoc | ( | FunctionDecl * | FD | ) | const |
Definition at line 3790 of file SemaStmt.cpp.
References clang::TypeLoc::getAsAdjusted(), clang::TypeSourceInfo::getTypeLoc(), and clang::DeclaratorDecl::getTypeSourceInfo().
Referenced by ActOnConversionDeclarator(), and DeduceFunctionTypeFromReturnExpr().
| 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.
Definition at line 2318 of file Sema.cpp.
References clang::Scope::DeclScope, getCurScope(), clang::DeclContext::getPrimaryContext(), and clang::Scope::TemplateParamScope.
Referenced by buildImplicitMapper(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), and TryTypoCorrectionForCall().
|
static |
Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope.
Otherwise return NULL.
Definition at line 1626 of file SemaDecl.cpp.
References clang::Scope::getEntity(), clang::Scope::getParent(), and clang::DeclContext::getPrimaryContext().
Referenced by ActOnFriendFunctionDecl(), ActOnTag(), and CheckClassTemplate().
Returns a field in a CXXRecordDecl that has the same name as the decl SelfAssigned when inside a CXXMethodDecl.
Definition at line 15059 of file SemaExpr.cpp.
References clang::RecordDecl::field_end(), clang::RecordDecl::fields(), getCurFunctionDecl(), clang::NamedDecl::getDeclName(), clang::isa(), clang::CXXRecordDecl::isLambda(), and clang::Method.
Referenced by DiagnoseSelfAssignment(), and DiagnoseSelfMove().
|
inlinenodiscard |
Returns a pointer to the current SFINAE context, if any.
Definition at line 13693 of file Sema.h.
References CurrentSFINAEContext.
Referenced by CheckTemplateIdType(), EmitDiagnostic(), and PrintStats().
| 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 8526 of file SemaDecl.cpp.
References Diags, clang::LookupResult::getFoundDecl(), clang::isa(), and shouldWarnIfShadowedDecl().
| 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 8513 of file SemaDecl.cpp.
References Diags, clang::Decl::getDeclContext(), clang::LookupResult::getFoundDecl(), clang::isa(), clang::DeclContext::isRecord(), and shouldWarnIfShadowedDecl().
Referenced by ActOnDecompositionDeclarator(), ActOnTypedefNameDecl(), ActOnVariableDeclarator(), and CheckShadow().
| 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 8499 of file SemaDecl.cpp.
References Diags, clang::LookupResult::getFoundDecl(), clang::VarDecl::hasGlobalStorage(), clang::isa(), clang::VarDecl::isStaticLocal(), and shouldWarnIfShadowedDecl().
Definition at line 13177 of file SemaExpr.cpp.
References Context, clang::Type::isSizelessBuiltinType(), and V.
Referenced by CheckSizelessVectorCompareOperands().
Return a signed ext_vector_type that is of identical size and number of elements.
For floating point vectors, return an integer type of identical size and number of elements. In the non ext_vector_type case, search from the largest type to the smallest type to avoid cases where long long == long, where long gets picked over long long.
Definition at line 13134 of file SemaExpr.cpp.
References Context, clang::Generic, clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::isa(), clang::Type::isExtVectorBoolType(), and V.
Referenced by CheckVectorCompareOperands(), CheckVectorLogicalOperands(), convertHalfVecBinOp(), and CreateBuiltinUnaryOp().
|
inline |
Definition at line 925 of file Sema.h.
References SourceMgr.
Referenced by ActOnAnnotModuleEnd(), ActOnEndOfTranslationUnit(), ActOnFields(), ActOnFinishFunctionBody(), ActOnModuleDecl(), ActOnStringLiteral(), ActOnVariableDeclarator(), addFixitForObjCARCConversion(), AnalyzeImplicitConversions(), BuildCXXNew(), BuildModuleInclude(), BuildUsingDeclaration(), BuiltinOverflow(), CheckConstexprFunctionBody(), CheckConstraintSatisfaction(), CheckLiteralOperatorDeclaration(), CheckMemaccessSize(), CheckMoveOnConstruction(), CheckNontrivialField(), CheckUnreachable(), CheckVirtualDtorCall(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAlwaysNonNullPointer(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseExceptionUse(), diagnoseIgnoredQualifiers(), DiagnoseMismatchedNewDelete(), diagnoseRepeatedUseOfWeak(), diagnoseUseOfInternalDeclInInlineFunction(), diagnoseXorMisusedAsPow(), DiagReservedModuleName(), DoEmitAvailabilityWarning(), EmitDiagForCXXThrowInNonThrowingFunc(), findMacroSpelling(), clang::DeclSpec::Finish(), GetFullTypeForDeclarator(), getLocationOfStringLiteralByte(), getUDSuffixLoc(), handleObjCOwnershipTypeAttr(), handleStandardNoReturnAttr(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), IsEnumConstOrFromMacro(), isSameWidthConstantConversion(), notePreviousDefinition(), clang::ParseAST(), clang::PrintingCodeCompleteConsumer::ProcessOverloadCandidates(), and Sema().
|
inline |
Definition at line 6327 of file Sema.h.
References clang::Sema::DefaultedFunctionKind::asSpecialMember(), and getDefaultedFunctionKind().
Referenced by CheckCompletedCXXClass(), CheckConstructorAccess(), clang::InitializationSequence::Diagnose(), MergeCXXFunctionDecl(), MergeFunctionDecl(), and ShouldDeleteSpecialMember().
| EnumDecl * Sema::getStdAlignValT | ( | ) | const |
Definition at line 12045 of file SemaDeclCXX.cpp.
References Context, and StdAlignValT.
Referenced by ActOnTag(), BuildCXXNew(), CheckOperatorNewDeleteTypes(), DeclareGlobalNewDelete(), FindAllocationFunctions(), getTypeSourceInfoForStdAlignValT(), and isNonPlacementDeallocationFunction().
| CXXRecordDecl * Sema::getStdBadAlloc | ( | ) | const |
Definition at line 12040 of file SemaDeclCXX.cpp.
References Context, and StdBadAlloc.
Referenced by ActOnTag(), DeclareGlobalAllocationFunction(), and DeclareGlobalNewDelete().
| NamespaceDecl * Sema::getStdNamespace | ( | ) | const |
Definition at line 12049 of file SemaDeclCXX.cpp.
References Context, and StdNamespace.
Referenced by ActOnCXXTypeid(), ActOnStartNamespaceDef(), ActOnTag(), BuildStdClassTemplate(), buildStdNoThrowDeclRef(), CheckComparisonCategoryType(), DiagnoseTwoPhaseLookup(), emitReplacement(), getOrCreateStdNamespace(), getStdTrait(), isStdClassTemplate(), lookupCoroutineHandleType(), lookupCoroutineTraits(), LookupStdClassTemplate(), and LookupStdSourceLocationImpl().
| IdentifierInfo * Sema::getSuperIdentifier | ( | ) | const |
| std::string Sema::getTemplateArgumentBindingsText | ( | const TemplateParameterList * | Params, |
| const TemplateArgument * | Args, | ||
| unsigned | NumArgs ) |
| std::string Sema::getTemplateArgumentBindingsText | ( | const TemplateParameterList * | Params, |
| const TemplateArgumentList & | Args ) |
Produces a formatted string that describes the binding of template parameters to template arguments.
Definition at line 11565 of file SemaTemplate.cpp.
References clang::TemplateArgumentList::data(), getTemplateArgumentBindingsText(), and clang::TemplateArgumentList::size().
Referenced by checkAddressOfFunctionIsAvailable(), CheckVarTemplateId(), DiagnoseBadDeduction(), EnsureTemplateArgumentListConstraints(), getMostSpecialized(), getPatternForClassTemplateSpecialization(), getTemplateArgumentBindingsText(), and PrintInstantiationStack().
| TemplateArgumentLoc Sema::getTemplateArgumentPackExpansionPattern | ( | TemplateArgumentLoc | OrigLoc, |
| SourceLocation & | Ellipsis, | ||
| UnsignedOrNone & | NumExpansions ) const |
Returns the pattern of the pack expansion for a template argument.
| OrigLoc | The template argument to expand. |
| Ellipsis | Will be set to the location of the ellipsis. |
| NumExpansions | Will be set to the number of expansions that will be generated from this pack expansion, if known a priori. |
Definition at line 1383 of file SemaTemplateVariadic.cpp.
References clang::cast(), 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::TemplateArgument::getNumTemplateExpansions(), clang::TemplateArgument::getPackExpansionPattern(), clang::PackExpansionExpr::getPattern(), clang::PackExpansionTypeLoc::getPatternLoc(), clang::TemplateArgumentLoc::getTemplateEllipsisLoc(), clang::TemplateArgumentLoc::getTemplateKWLoc(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::TypeLoc::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::TemplateArgumentLoc::getTypeSourceInfo(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TemplateArgument::Integral, clang::TemplateArgument::isCanonicalExpr(), 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.
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 59 of file SemaTemplate.cpp.
References getFunctionScopes(), getInventedParameterInfos(), clang::Scope::getParent(), and clang::Scope::getTemplateParamParent().
Referenced by ActOnStmtExpr(), and EnterTemplatedContext().
| MultiLevelTemplateArgumentList Sema::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, | ||
| bool | ForDefaultArgumentSubstitution = false ) |
Retrieve the template argument list(s) that should be used to instantiate the definition of the given declaration.
| ND | the declaration for which we are computing template instantiation arguments. |
| DC | In 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. |
| Innermost | if non-NULL, specifies a template argument list for the template declaration passed as ND. |
| RelativeToPrimary | true if we should get the template arguments relative to the primary template, even when we're dealing with a specialization. This is only relevant for function template specializations. |
| Pattern | If non-NULL, indicates the pattern from which we will be instantiating the definition of the given declaration, ND. This is used to determine the proper set of template instantiation arguments for friend function template specializations. |
| ForConstraintInstantiation | when 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. |
| SkipForSpecialization | when specified, any template specializations in a traversal would be ignored. |
| ForDefaultArgumentSubstitution | indicates we should continue looking when encountering a specialized member function template, rather than returning immediately. |
Definition at line 489 of file SemaTemplateInstantiate.cpp.
References clang::Decl::castFromDeclContext(), Context, clang::Function, clang::isa(), clang::Decl::isFileContextDecl(), and clang::Result.
Referenced by ActOnExplicitInstantiation(), BuildCXXDefaultInitExpr(), CalculateTemplateDepthForConstraints(), CheckDeducedArgumentConstraints(), CheckFunctionConstraintsWithoutInstantiation(), CheckTemplateArgumentList(), InstantiateClassTemplateSpecialization(), InstantiateClassTemplateSpecializationMembers(), InstantiateDefaultArgument(), InstantiateExceptionSpec(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), RequireCompleteEnumDecl(), SubstConceptTemplateArguments(), SubstituteConceptsInConstraintExpression(), and SubstituteConstraintExpressionWithoutSatisfaction().
| Sema::TemplateNameKindForDiagnostics Sema::getTemplateNameKindForDiagnostics | ( | TemplateName | Name | ) |
Definition at line 1351 of file SemaDecl.cpp.
References AliasTemplate, ClassTemplate, Concept, DependentTemplate, FunctionTemplate, clang::TemplateName::getAsTemplateDecl(), clang::isa(), TemplateTemplateParam, and VarTemplate.
Referenced by CheckTemplateArgumentList(), CheckTypenameType(), DeduceTemplateSpecializationFromInitializer(), diagnoseMissingArgument(), diagnoseMissingTemplateArguments(), EnsureTemplateArgumentListConstraints(), GetDeclSpecTypeForDeclarator(), and GetNameFromUnqualifiedId().
| TemplateParameterList * Sema::GetTemplateParameterList | ( | TemplateDecl * | TD | ) |
Returns the template parameter list with all default template argument information.
Definition at line 1885 of file SemaTemplate.cpp.
References clang::cast(), clang::Decl::FOK_None, clang::Decl::getFriendObjectKind(), clang::NamedDecl::getMostRecentDecl(), and clang::Decl::getPreviousDecl().
Referenced by CheckClassTemplate(), and CheckTemplateArgumentList().
| 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 11814 of file SemaTemplate.cpp.
References CodeSynthesisContexts, clang::CPlusPlus, getLangOpts(), clang::Decl::getLocation(), clang::isa(), and clang::FunctionDecl::isFunctionTemplateSpecialization().
Referenced by DoEmitAvailabilityWarning().
| TemplateArgumentLoc Sema::getTrivialTemplateArgumentLoc | ( | const TemplateArgument & | Arg, |
| QualType | NTTPType, | ||
| SourceLocation | Loc, | ||
| NamedDecl * | TemplateParam = nullptr ) |
Allocate a TemplateArgumentLoc where all locations have been initialized to the given location.
| Arg | The template argument we are producing template argument location information for. |
| NTTPType | For a declaration template argument, the type of the non-type template parameter that corresponds to this template argument. Can be null if no type sugar is available to add to the type from the template argument. |
| Loc | The source location to use for the resulting template argument. |
Definition at line 2869 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::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getNullPtrType(), clang::TemplateArgument::getParamTypeForDecl(), clang::TemplateArgument::Integral, clang::QualType::isNull(), clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::StructuralValue, clang::Template, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, clang::TemplateParam, and clang::TemplateArgument::Type.
Referenced by ActOnNonTypeTemplateParameter(), checkBuiltinTemplateIdType(), clang::hlsl::TemplateParameterListBuilder::constructConceptSpecializationExpr(), ConvertDeducedTemplateArgument(), FindInstantiatedDecl(), FinishTemplateArgumentDeduction(), formImmediatelyDeclaredConstraint(), getIdentityTemplateArgumentLoc(), getTrivialIntegralTemplateArgument(), getTrivialTypeTemplateArgument(), and isTemplateTemplateParameterAtLeastAsSpecializedAs().
| TypeSourceInfo * Sema::GetTypeForDeclarator | ( | Declarator & | D | ) |
GetTypeForDeclarator - Convert the type for the specified declarator to Type instances.
The result of this call will never be null, but the associated type may be a null type if there's an unrecoverable error.
Definition at line 5717 of file SemaType.cpp.
References GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getLangOpts(), inferARCWriteback(), clang::Declarator::isPrototypeContext(), and clang::T.
Referenced by ActOnBlockArguments(), ActOnCXXNew(), ActOnDecompositionDeclarator(), ActOnExceptionDeclarator(), ActOnExplicitInstantiation(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnNonTypeTemplateParameter(), ActOnParamDeclarator(), ActOnTypeName(), BuildAnonymousStructOrUnion(), BuildMicrosoftCAnonymousStruct(), getLambdaType(), HandleDeclarator(), HandleField(), and HandleMSProperty().
| TypeSourceInfo * Sema::GetTypeForDeclaratorCast | ( | Declarator & | D, |
| QualType | FromTy ) |
Definition at line 5829 of file SemaType.cpp.
References Context, GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getLangOpts(), ObjC(), clang::Qualifiers::OCL_None, and transferARCOwnership().
Referenced by ActOnBuiltinBitCastExpr(), ActOnCastExpr(), and ActOnCXXNamedCast().
|
static |
Definition at line 2793 of file SemaType.cpp.
References clang::OpaquePtr< PtrTy >::get(), and clang::QualType::isNull().
Referenced by ActOnAliasDeclaration(), ActOnAlignasTypeArgument(), ActOnArrayTypeTrait(), ActOnAsTypeExpr(), ActOnBaseSpecifier(), ActOnBuiltinOffsetOf(), ActOnCompoundLiteral(), ActOnConvertVectorExpr(), ActOnCXXTypeConstructExpr(), ActOnCXXTypeid(), ActOnCXXUuidof(), ActOnGenericSelectionExpr(), clang::SemaOpenMP::ActOnOMPIteratorExpr(), ActOnPackExpansion(), ActOnPseudoDestructorExpr(), ActOnTag(), ActOnTemplateName(), ActOnTemplateTypeArgument(), ActOnTypeParameter(), ActOnTypeRequirement(), ActOnTypeTrait(), ActOnUnaryExprOrTypeTraitExpr(), ActOnUsingEnumDeclaration(), ActOnVAArg(), AddClassMessageCompletions(), ApplyAPINotesType(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), canDelayFunctionBody(), CheckConversionDeclarator(), CheckDeductionGuideDeclarator(), CheckDestructorDeclarator(), checkExceptionSpecification(), ConvertDeclSpecToType(), CreateNewFunctionDecl(), DiagnoseUnknownTypeName(), GetDeclSpecTypeForDeclarator(), getDestructorName(), getDestructorTypeForDecltype(), GetFullTypeForDeclarator(), GetNameFromUnqualifiedId(), handleAlignedAttr(), handleLifetimeCategoryAttr(), handlePreferredName(), handlePreferredTypeAttr(), handleTypeTagForDatatypeAttr(), handleVecTypeHint(), ProcessAPINotes(), RebuildDeclaratorInCurrentInstantiation(), and translateTemplateArgument().
| ParsedType Sema::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.
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 274 of file SemaDecl.cpp.
References ActOnTypenameType(), clang::Ambiguous, clang::AmbiguousTagHiding, checkTypeDeclType(), CheckTypenameType(), computeDeclContext(), Context, CorrectTypo(), clang::CPlusPlus, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), CreateParsedType(), clang::SemaBase::DiagCompat(), diagnoseTypo(), DiagnoseUseOfDecl(), clang::ErrorRecovery, clang::Found, clang::FoundOverloaded, clang::FoundUnresolvedValue, clang::ActionResult< PtrTy, Compress >::get(), clang::OpaquePtr< PtrTy >::get(), clang::getAsTypeTemplateDecl(), clang::SourceRange::getBegin(), clang::TypoCorrection::getCorrectionAsIdentifierInfo(), clang::TypoCorrection::getCorrectionSpecifier(), getLangOpts(), clang::Decl::getLocation(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::UsingShadowDecl::getTargetDecl(), getTypeName(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXScopeSpec::getWithLocInContext(), Implicit, clang::isa(), clang::DeclContext::isDependentContext(), isDependentScopeSpecifier(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isNotEmpty(), clang::Type::isRecordType(), isTemplateName(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupTagName, clang::OpaquePtr< QualType >::make(), clang::CXXScopeSpec::MakeTrivial(), clang::No, clang::None, None, clang::NotFound, clang::NotFoundInCurrentInstantiation, clang::SemaBase::PDiag(), clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), recoverFromTypeInKnownDependentBase(), RequireCompleteDeclContext(), clang::Result, clang::DeducedTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::TagTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::ObjCInterfaceTypeLoc::setNameLoc(), clang::TypeSpecTypeLoc::setNameLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::T, clang::Template, clang::TemplateName, clang::Typename, and clang::Yes.
Referenced by ActOnPseudoDestructorExpr(), DiagnoseUnknownTypeName(), findOMPAllocatorHandleT(), findOMPAlloctraitT(), findOMPDependT(), findOMPEventHandleT(), and getTypeName().
| 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 946 of file Sema.cpp.
References clang::cast(), clang::VarDecl::DeclarationOnly, clang::Decl::hasAttr(), clang::isa(), isExternalWithNoLinkageType(), clang::Decl::isInvalidDecl(), clang::Undefined, and UndefinedButUsed.
Referenced by checkUndefinedButUsed().
| VariadicCallType Sema::getVariadicCallType | ( | FunctionDecl * | FDecl, |
| const FunctionProtoType * | Proto, | ||
| Expr * | Fn ) |
Definition at line 5853 of file SemaExpr.cpp.
References clang::Block, clang::Constructor, Context, clang::DoesNotApply, clang::Function, clang::FunctionProtoType::isVariadic(), and clang::Method.
Referenced by CheckFunctionCall(), and ConvertArgumentsForCall().
Certain globally-unique variables might be accidentally duplicated if built into multiple shared libraries with hidden visibility.
This can cause problems if the variable is mutable, its initialization is effectful, or its address is taken.
Definition at line 13695 of file SemaDecl.cpp.
References Context, clang::CPlusPlus, clang::Decl::getASTContext(), clang::Decl::getDeclContext(), getLangOpts(), clang::LinkageInfo::getLinkage(), clang::Decl::getLocation(), clang::DeclContext::getNonClosureAncestor(), clang::ASTContext::getSourceManager(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::VarDecl::getTemplateSpecializationKind(), clang::LinkageInfo::getVisibility(), clang::Decl::hasAttr(), clang::HiddenVisibility, clang::isExternalFormalLinkage(), clang::VarDecl::isInline(), clang::FunctionDecl::isInlined(), clang::SourceManager::isInMainFile(), clang::VarDecl::isStaticLocal(), clang::VarDecl::isThisDeclarationADefinition(), clang::Target, and clang::TSK_Undeclared.
Referenced by DiagnoseUniqueObjectDuplication().
| NamedDecl * Sema::HandleDeclarator | ( | Scope * | S, |
| Declarator & | D, | ||
| MultiTemplateParamsArg | TemplateParameterLists ) |
Get the innermost enclosing declaration scope.
Definition at line 6436 of file SemaDecl.cpp.
References ActOnDecompositionDeclarator(), ActOnFunctionDeclarator(), ActOnTypedefDeclarator(), ActOnVariableDeclarator(), clang::cast(), clang::SemaOpenMP::checkDeclIsAllowedInOpenMPTarget(), CheckExtraCXXDefaultArguments(), computeDeclContext(), clang::CPlusPlus, CurContext, clang::SemaBase::Diag(), DiagnoseClassNameShadow(), diagnoseQualifiedDeclaration(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForExternalRedeclaration, forRedeclarationInCurContext(), clang::DeclSpec::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::Scope::getDeclParent(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifierLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::DeclarationNameInfo::getName(), clang::Declarator::getName(), GetNameForDeclarator(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::Declarator::getSourceRange(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getStorageClassSpec(), clang::Scope::getTemplateParamParent(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), hasDefinition(), clang::IK_TemplateId, clang::isa(), clang::Declarator::isDecompositionDeclarator(), clang::DeclContext::isDependentContext(), clang::DeclSpec::isFriendSpecified(), clang::Type::isFunctionType(), clang::CXXScopeSpec::isInvalid(), clang::Declarator::isInvalidType(), clang::DeclContext::isRecord(), clang::CXXScopeSpec::isSet(), clang::Decl::isTemplateParameter(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), LookupRedeclarationWithLinkage, New, OpenMP(), 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, UPPC_DeclarationType, and warnOnCTypeHiddenInCPlusPlus().
Referenced by ActOnCXXMemberDeclarator(), ActOnDeclarator(), ActOnStartOfFunctionDef(), and ActOnTemplateDeclarator().
| void Sema::HandleDelayedAccessCheck | ( | sema::DelayedDiagnostic & | DD, |
| Decl * | Ctx ) |
Definition at line 1503 of file SemaAccess.cpp.
References AR_inaccessible, CheckEffectiveAccess(), clang::sema::DelayedDiagnostic::getAccessData(), clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::Decl::isLocalExternDecl(), clang::sema::DelayedDiagnostic::Loc, clang::Target, and clang::sema::DelayedDiagnostic::Triggered.
Referenced by PopParsingDeclaration().
| void Sema::handleDelayedAvailabilityCheck | ( | sema::DelayedDiagnostic & | DD, |
| Decl * | Ctx ) |
Definition at line 709 of file SemaAvailability.cpp.
References clang::sema::DelayedDiagnostic::Availability, DoEmitAvailabilityWarning(), clang::sema::DelayedDiagnostic::getAvailabilityMessage(), clang::sema::DelayedDiagnostic::getAvailabilityOffendingDecl(), clang::sema::DelayedDiagnostic::getAvailabilityReferringDecl(), clang::sema::DelayedDiagnostic::getAvailabilityResult(), clang::sema::DelayedDiagnostic::getAvailabilitySelectorLocs(), clang::sema::DelayedDiagnostic::getObjCProperty(), clang::sema::DelayedDiagnostic::getUnknownObjCClass(), clang::sema::DelayedDiagnostic::Kind, and clang::sema::DelayedDiagnostic::Triggered.
Referenced by PopParsingDeclaration().
| void Sema::HandleDependentAccessCheck | ( | const DependentDiagnostic & | DD, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 1529 of file SemaAccess.cpp.
References clang::cast(), CheckAccess(), Context, FindInstantiatedDecl(), clang::DependentDiagnostic::getAccess(), clang::DependentDiagnostic::getAccessBaseObjectType(), clang::DependentDiagnostic::getAccessLoc(), clang::DependentDiagnostic::getAccessNamingClass(), clang::DependentDiagnostic::getAccessTarget(), clang::DependentDiagnostic::getDiagnostic(), clang::DependentDiagnostic::isAccessToMember(), clang::QualType::isNull(), clang::DeclAccessPair::make(), and SubstType().
Referenced by PerformDependentDiagnostics().
| ExprResult Sema::HandleExprEvaluationContextForTypeof | ( | Expr * | E | ) |
Definition at line 18422 of file SemaExpr.cpp.
References CheckPlaceholderExpr(), clang::ExprError(), clang::Expr::getType(), clang::Type::isVariablyModifiedType(), clang::Result, and TransformToPotentiallyEvaluated().
| 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 19084 of file SemaDecl.cpp.
References clang::Ambiguous, CheckExtraCXXDefaultArguments(), CheckFieldDecl(), Context, clang::CPlusPlus, clang::SemaBase::Diag(), DiagnoseFunctionSpecifiers(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForVisibleRedeclaration, clang::Found, clang::FoundOverloaded, clang::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::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::TypeSourceInfo::getType(), GetTypeForDeclarator(), isDeclInScope(), clang::Declarator::isDecompositionDeclarator(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isModulePrivateSpecified(), clang::Decl::isTemplateParameter(), LookupMemberName, LookupName(), clang::NotFound, clang::NotFoundInCurrentInstantiation, Previous, PushOnScopeChains(), clang::DeclSpec::SCS_mutable, clang::Declarator::setInvalidType(), clang::NamedDecl::setModulePrivate(), clang::T, and UPPC_DataMemberType.
Referenced by ActOnCXXMemberDeclarator(), and ActOnField().
| void Sema::HandleFunctionTypeMismatch | ( | PartialDiagnostic & | PDiag, |
| QualType | FromType, | ||
| QualType | ToType ) |
HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types.
Catches different number of parameter, mismatch in parameter types, and different return types.
Definition at line 3407 of file SemaOverload.cpp.
References clang::cast(), clang::Type::castAs(), Context, clang::declaresSameEntity(), ft_default, ft_different_class, ft_noexcept, ft_parameter_arity, ft_parameter_mismatch, ft_qualifer_mismatch, ft_return_type, FunctionParamTypesAreEqual(), clang::Type::getAs(), clang::Type::getCanonicalTypeUnqualified(), clang::FunctionProtoType::getMethodQuals(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::Type::isInstantiationDependentType(), clang::Type::isMemberPointerType(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::SemaBase::PDiag(), and tryGetFunctionProtoType().
Referenced by clang::InitializationSequence::Diagnose(), DiagnoseAssignmentResult(), getMostSpecialized(), NoteHiddenVirtualMethods(), and NoteOverloadCandidate().
| void Sema::handleLambdaNumbering | ( | CXXRecordDecl * | Class, |
| CXXMethodDecl * | Method, | ||
| std::optional< CXXRecordDecl::LambdaNumbering > | NumberingOverride = std::nullopt ) |
Number lambda for linkage purposes if necessary.
Definition at line 478 of file SemaLambda.cpp.
References clang::Class, Context, clang::CXXRecordDecl::LambdaNumbering::ContextDecl, CUDA(), clang::CXXRecordDecl::LambdaNumbering::DeviceManglingNumber, getCurrentMangleNumberContext(), clang::MangleNumberingContext::getDeviceManglingNumber(), getLangOpts(), clang::MangleNumberingContext::getManglingNumber(), clang::MangleNumberingContext::getNextLambdaIndex(), clang::CXXRecordDecl::LambdaNumbering::HasKnownInternalLinkage, clang::CXXRecordDecl::LambdaNumbering::IndexInContext, clang::CXXRecordDecl::LambdaNumbering::ManglingNumber, clang::Method, and clang::ASTContext::NeedExtraManglingDecl.
Referenced by ActOnStartOfLambdaDefinition().
| 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 19500 of file SemaDeclCXX.cpp.
References clang::Ambiguous, CheckExtraCXXDefaultArguments(), Context, clang::CPlusPlus, clang::MSPropertyDecl::Create(), Diag(), DiagnoseFunctionSpecifiers(), DiagnoseTemplateParameterShadow(), DiagnoseUnexpandedParameterPack(), ForVisibleRedeclaration, clang::Found, clang::FoundOverloaded, clang::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::TypeSourceInfo::getType(), GetTypeForDeclarator(), isDeclInScope(), clang::DeclSpec::isInlineSpecified(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isModulePrivateSpecified(), clang::Decl::isTemplateParameter(), LookupMemberName, LookupName(), clang::NotFound, clang::NotFoundInCurrentInstantiation, Previous, ProcessDeclAttributes(), PushOnScopeChains(), clang::Decl::setAccess(), clang::Declarator::setInvalidType(), clang::NamedDecl::setModulePrivate(), clang::T, TUScope, and UPPC_DataMemberType.
Referenced by ActOnCXXMemberDeclarator().
Definition at line 675 of file SemaExceptionSpec.cpp.
References AR_accessible, AR_delayed, AR_dependent, AR_inaccessible, CheckBaseClassAccess(), clang::Qualifiers::compatiblyIncludes(), Context, clang::CXXBasePaths::front(), clang::Type::getAs(), getASTContext(), clang::Type::getPointeeType(), clang::CXXBasePaths::isAmbiguous(), clang::QualType::isConstQualified(), IsDerivedFrom(), IsFunctionConversion(), clang::Type::isMemberPointerType(), clang::Type::isNullPtrType(), clang::Type::isObjectType(), clang::Type::isPointerType(), IsQualificationConversion(), clang::Type::isRecordType(), clang::Type::isVoidType(), and clang::QualType::isVolatileQualified().
Referenced by CheckExceptionSpecSubset(), and throwEscapes().
Definition at line 5016 of file SemaDecl.cpp.
References Context, getCurrentMangleNumberContext(), getLangOpts(), clang::MangleNumberingContext::getManglingNumber(), getMSManglingNumber(), and clang::isa().
Referenced by ActOnAliasDeclaration(), FinalizeDeclaratorGroup(), and ParsedFreeStandingDeclSpec().
| 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 1717 of file SemaLookup.cpp.
References clang::cast().
Referenced by hasReachableDefaultArgument(), and hasVisibleDefaultArgument().
|
inline |
Definition at line 15547 of file Sema.h.
References hasAcceptableDefinition().
| bool Sema::hasAcceptableDefinition | ( | NamedDecl * | D, |
| NamedDecl ** | Suggested, | ||
| AcceptableKind | Kind, | ||
| bool | OnlyNeedComplete = false ) |
Definition at line 9277 of file SemaType.cpp.
References clang::cast(), CodeSynthesisContexts, Context, getLangOpts(), hasMergedDefinitionInCurrentModule(), hasVisibleMergedDefinition(), clang::isa(), isAcceptable(), clang::NamedDecl::isModulePrivate(), and clang::Decl::setVisibleDespiteOwningModule().
Referenced by hasAcceptableDefinition(), hasReachableDefinition(), and hasVisibleDefinition().
| bool Sema::hasAnyAcceptableTemplateNames | ( | LookupResult & | R, |
| bool | AllowFunctionTemplates = true, | ||
| bool | AllowDependent = true, | ||
| bool | AllowNonTemplateFunctions = false ) |
Definition at line 163 of file SemaTemplate.cpp.
References clang::LookupResult::begin(), clang::LookupResult::end(), getAsTemplateNameDecl(), and clang::isa().
Referenced by ClassifyName().
| bool Sema::hasAnyUnrecoverableErrorsInThisFunction | ( | ) | const |
Determine whether any errors occurred within this function/method/ block.
Definition at line 2495 of file Sema.cpp.
References getCurFunction().
Referenced by ActOnBlockStmtExpr(), ActOnFinishFunctionBody(), and BuildStmtExpr().
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 8502 of file SemaChecking.cpp.
References CXXRecordMembersNamed(), and clang::Expr::getType().
Referenced by checkVariadicArgument().
Definition at line 8238 of file SemaType.cpp.
References clang::T.
Referenced by adjustMemberFunctionCC(), CheckMemberSpecialization(), and CheckMSVCRTEntryPoint().
Definition at line 1684 of file SemaLookup.cpp.
References Context.
Referenced by hasAcceptableDefinition().
|
inline |
Determine whether any declaration of an entity is reachable.
Definition at line 9672 of file Sema.h.
References hasReachableDeclarationSlow(), and isReachable().
| bool Sema::hasReachableDeclarationSlow | ( | const NamedDecl * | D, |
| llvm::SmallVectorImpl< Module * > * | Modules = nullptr ) |
Definition at line 2119 of file SemaLookup.cpp.
References hasAcceptableDeclarationImpl(), isReachable(), and Reachable.
Referenced by hasReachableDeclaration().
| 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 1736 of file SemaLookup.cpp.
References hasAcceptableDefaultArgument(), and Reachable.
Referenced by diagnoseMissingArgument(), and SubstDefaultTemplateArgumentIfAvailable().
Definition at line 15539 of file Sema.h.
References hasReachableDefinition().
| 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.
| D | The definition of the entity. |
| Suggested | Filled in with the declaration that should be made reachable in order to provide a definition of this entity. |
| OnlyNeedComplete | If true, we only need the type to be complete, not defined. This only matters for enums with a fixed underlying type, since in all other cases, a type is complete if and only if it is defined. |
Definition at line 9387 of file SemaType.cpp.
References hasAcceptableDefinition(), and Reachable.
Referenced by CheckConceptRedefinition(), computeDeclContext(), DiagnoseUninstantiableTemplate(), hasReachableDefinition(), clang::LookupResult::isAvailableForLookup(), and RequireCompleteEnumDecl().
| 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 1797 of file SemaLookup.cpp.
References Reachable.
| 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 1831 of file SemaLookup.cpp.
References hasAcceptableMemberSpecialization(), and Reachable.
Determine if D and Suggested have a structurally compatible layout as described in C11 6.2.7/1.
Definition at line 9262 of file SemaType.cpp.
References clang::Default, clang::Decl::getASTContext(), getLangOpts(), and clang::StructuralEquivalenceContext::IsEquivalent().
Referenced by ActOnDuplicateDefinition().
| bool Sema::hasUncompilableErrorOccurred | ( | ) | const |
Whether uncompilable error has occurred.
This includes error happens in deferred diagnostics.
Definition at line 1786 of file Sema.cpp.
References CurContext, DeviceDeferredDiags, Diags, getDiagnostics(), and hasUncompilableErrorOccurred().
Referenced by ActOnFinishFunctionBody(), FindInstantiatedDecl(), hasUncompilableErrorOccurred(), maybeAddDeclWithEffects(), and performFunctionEffectAnalysis().
|
inline |
Determine whether any declaration of an entity is visible.
Definition at line 9663 of file Sema.h.
References hasVisibleDeclarationSlow(), and isVisible().
| bool Sema::hasVisibleDeclarationSlow | ( | const NamedDecl * | D, |
| llvm::SmallVectorImpl< Module * > * | Modules ) |
Definition at line 2111 of file SemaLookup.cpp.
References hasAcceptableDeclarationImpl(), isVisible(), and Visible.
Referenced by hasVisibleDeclaration().
| 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 1730 of file SemaLookup.cpp.
References hasAcceptableDefaultArgument(), and Visible.
Referenced by CheckDeductionGuideTemplate(), CheckTemplateParameterList(), and isPreferredLookupResult().
Definition at line 15520 of file Sema.h.
References hasVisibleDefinition().
| 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.
| D | The definition of the entity. |
| Suggested | Filled in with the declaration that should be made visible in order to provide a definition of this entity. |
| OnlyNeedComplete | If true, we only need the type to be complete, not defined. This only matters for enums with a fixed underlying type, since in all other cases, a type is complete if and only if it is defined. |
Definition at line 9370 of file SemaType.cpp.
References hasAcceptableDefinition(), and Visible.
Referenced by checkVarDeclRedefinition(), hasVisibleDefinition(), isRedefinitionAllowedFor(), MergeTypedefNameDecl(), and shouldSkipAnonEnumBody().
| 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 1791 of file SemaLookup.cpp.
References Visible.
| 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 1825 of file SemaLookup.cpp.
References hasAcceptableMemberSpecialization(), and Visible.
Definition at line 1677 of file SemaLookup.cpp.
References Context, and isModuleVisible().
Referenced by hasAcceptableDefinition().
|
inline |
| 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 12967 of file SemaDeclCXX.cpp.
References clang::cast(), clang::DeclarationName::CXXConversionFunctionName, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::UsingShadowDecl::getIntroducer(), clang::DeclarationName::getNameKind(), IdResolver, clang::Scope::RemoveDecl(), clang::DeclContext::removeDecl(), and clang::BaseUsingDecl::removeShadowDecl().
Referenced by CheckOverload().
|
inline |
Definition at line 1458 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnFunctionDeclarator(), ActOnMemberAccessExpr(), ActOnNumericConstant(), ActOnParamDeclarator(), ActOnStartExportDecl(), ActOnUninitializedDecl(), ActOnVariableDeclarator(), AddInitializerToDecl(), BuildBinOp(), BuildImplicitMemberExpr(), BuildMemberPointerType(), BuildPointerType(), BuildReferenceType(), CheckBaseSpecifier(), CheckFunctionReturnType(), CheckImplicitConversion(), CheckMain(), CheckMatrixLogicalOperands(), CheckPlaceholderExpr(), CheckRemainderOperands(), CheckVectorLogicalOperands(), CheckVectorOperands(), ConvertDeclSpecToType(), CreateBuiltinUnaryOp(), DeduceVariableDeclarationType(), GatherArgumentsForCall(), GetFullTypeForDeclarator(), clang::hlsl::HandleRootSignatureTarget(), instantiateDependentHLSLParamModifierAttr(), IsFloatingPointPromotion(), isValidVarArgType(), LookupBuiltin(), mergeDeclAttribute(), MergeFunctionDecl(), clang::hlsl::ParseHLSLRootSignature(), PerformImplicitConversion(), ProcessDeclAttribute(), and TryListInitialization().
| ExprResult Sema::IgnoredValueConversions | ( | Expr * | E | ) |
IgnoredValueConversions - Given that an expression's result is syntactically ignored, perform any conversions that are required.
Perform the conversions required for an expression used in a context that ignores the result.
Definition at line 7442 of file SemaExprCXX.cpp.
References CheckPlaceholderExpr(), CheckUnusedVolatileAssignment(), Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus17, DefaultFunctionArrayConversion(), DefaultFunctionArrayLvalueConversion(), DefaultLvalueConversion(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAsEnumDecl(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::Expr::hasPlaceholderType(), ImpCastExprToType(), clang::EnumDecl::isComplete(), clang::Type::isFunctionType(), isInLifetimeExtendingContext(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPRValue(), clang::Expr::isReadIfDiscardedInCPlusPlus11(), clang::Type::isVoidType(), MaybeDecrementCount(), RefsMinusAssignments, RequireCompleteType(), and TemporaryMaterializationConversion().
Referenced by ActOnFinishFullExpr(), actOnOMPReductionKindClause(), BuildMemberReferenceExpr(), BuildReturnStmt(), and CheckCommaOperands().
| ExprResult Sema::ImpCastExprToType | ( | Expr * | E, |
| QualType | Ty, | ||
| CastKind | Kind, | ||
| ExprValueKind | VK = VK_PRValue, | ||
| const CXXCastPath * | BasePath = nullptr, | ||
| CheckedConversionKind | CCK = CheckedConversionKind::Implicit ) |
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 756 of file Sema.cpp.
References Context, clang::CPlusPlus, clang::CPlusPlus11, clang::ImplicitCastExpr::Create(), CreateMaterializeTemporaryExpr(), CurFPFeatureOverrides(), clang::SemaBase::Diag(), diagnoseFunctionEffectConversion(), diagnoseNullableToNonnullConversion(), diagnoseZeroToNullptrConversion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getBeginLoc(), clang::CastExpr::getCastKindName(), clang::Expr::getExprLoc(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::isa(), isCast(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPRValue(), clang::SC_Register, and clang::VK_PRValue.
Referenced by ActOnBlockStmtExpr(), ActOnCaseExpr(), ActOnCXXDelete(), ActOnGCCAsmStmt(), ActOnNumericConstant(), BuildAtomicExpr(), BuildCallExpr(), BuildCXXTypeId(), BuildExpressionFromDeclTemplateArgument(), BuildImplicitBaseInitializer(), BuildResolvedCallExpr(), BuildReturnStmt(), BuildVectorLiteral(), BuiltinCallWithStaticChain(), CallExprUnaryConversions(), castElement(), castVector(), checkArithmeticOrEnumeralThreeWayCompare(), CheckAssignmentConstraints(), CheckCompareOperands(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), checkConditionalObjectPointersCompatibility(), CheckConditionalOperands(), checkConditionalPointerCompatibility(), CheckEnumConstant(), checkMemberDecomposition(), CheckPlaceholderExpr(), checkPointerIntegerMismatch(), CheckPointerToMemberOperands(), CheckSingleAssignmentConstraints(), checkSizelessVectorShift(), CheckTemplateArgument(), CheckTemplateArgumentPointerToMember(), CheckTransparentUnionArgumentConstraints(), CheckVectorConditionalTypes(), CheckVectorOperands(), checkVectorShift(), ConstantFoldAttrArgs(), convertVector(), CreateBuiltinArraySubscriptExpr(), CreateBuiltinUnaryOp(), CreateFunctionRefExpr(), CXXCheckConditionalOperands(), DeduceNullPtrTemplateArgument(), DefaultArgumentPromotion(), DefaultFunctionArrayConversion(), FindCompositePointerType(), handleComplexFloatConversion(), handleComplexIntConversion(), handleComplexIntegerToFloatConversion(), handleFloatConversion(), handleIntToFloatConversion(), IgnoredValueConversions(), LookupMemberExpr(), OpenCLConvertScalarsToVectors(), clang::InitializationSequence::Perform(), PerformImplicitConversion(), PerformImplicitObjectArgumentInitialization(), PerformObjectMemberConversion(), PerformQualificationConversion(), prepareMatrixSplat(), PrepareScalarCast(), prepareVectorSplat(), rebuildPotentialResultsAsNonOdrUsed(), ShouldTryAgainWithRedefinitionType(), tryGCCVectorConvertAndSplat(), tryVectorConvertAndSplat(), UsualArithmeticConversions(), UsualUnaryConversions(), and UsualUnaryFPConversions().
| NamedDecl * Sema::ImplicitlyDefineFunction | ( | SourceLocation | Loc, |
| IdentifierInfo & | II, | ||
| Scope * | S ) |
ImplicitlyDefineFunction - An undeclared identifier was used in a function call, forming a call to an implicitly defined function (per C99 6.5.1p2).
Definition at line 17006 of file SemaDecl.cpp.
References ActOnDeclarator(), AddKnownFunctionAttributes(), clang::Declarator::AddTypeInfo(), clang::Block, clang::C99, clang::cast(), Context, CorrectTypo(), clang::SemaBase::Diag(), Diagnose, diagnoseTypo(), Diags, clang::Error, clang::DiagnosticsEngine::Error, clang::EST_None, findLocallyScopedExternCDecl(), clang::DeclSpec::getAttributes(), clang::TypoCorrection::getCorrectionDecl(), clang::Scope::getEntity(), clang::DeclaratorChunk::getFunction(), getLangOpts(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::Scope::getParent(), clang::isa(), clang::Scope::isCompoundStmtScope(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isImplicit(), clang::DeclContext::isTranslationUnit(), LangOpts, LookupOrdinaryName, clang::ParsedAttributesView::none(), clang::NonError, clang::SemaBase::PDiag(), PushOnScopeChains(), clang::Declarator::SetIdentifier(), clang::Decl::setImplicit(), clang::DeclSpec::SetTypeSpecType(), and clang::DeclSpec::TST_int.
Referenced by ActOnIdExpression(), and ClassifyName().
|
inline |
Determine whether we are currently performing constraint substitution.
Definition at line 13968 of file Sema.h.
References CodeSynthesisContexts.
Referenced by inParameterMappingSubstitution().
|
inline |
| void Sema::inferGslOwnerPointerAttribute | ( | CXXRecordDecl * | Record | ) |
Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types.
Definition at line 168 of file SemaAttr.cpp.
References addGslOwnerPointerAttributeIfNotExisting(), Context, and inferGslPointerAttribute().
Referenced by ActOnClassTemplateSpecialization(), ActOnTag(), and CheckClassTemplate().
| void Sema::inferGslPointerAttribute | ( | NamedDecl * | ND, |
| CXXRecordDecl * | UnderlyingRecord ) |
Add gsl::Pointer attribute to std::container::iterator.
| ND | The declaration that introduces the name std::container::iterator. |
| UnderlyingRecord | The record named by ND. |
Definition at line 112 of file SemaAttr.cpp.
References addGslOwnerPointerAttributeIfNotExisting(), Context, clang::Decl::getDeclContext(), and clang::NamedDecl::getName().
Referenced by ActOnTypedefNameDecl(), inferGslOwnerPointerAttribute(), and inferGslPointerAttribute().
| void Sema::inferGslPointerAttribute | ( | TypedefNameDecl * | TD | ) |
Add [[gsl::Pointer]] attributes for std:: types.
Definition at line 151 of file SemaAttr.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::QualType::getCanonicalType(), clang::QualType::getTypePtr(), clang::TypedefNameDecl::getUnderlyingType(), and inferGslPointerAttribute().
| void Sema::inferLifetimeBoundAttribute | ( | FunctionDecl * | FD | ) |
Add [[clang:::lifetimebound]] attr for std:: functions and methods.
Definition at line 220 of file SemaAttr.cpp.
References Context, clang::FunctionDecl::getBuiltinID(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::Decl::hasAttr(), clang::isa(), and clang::Type::isVoidType().
Referenced by AddKnownFunctionAttributes().
| void Sema::inferLifetimeCaptureByAttribute | ( | FunctionDecl * | FD | ) |
Add [[clang:::lifetime_capture_by(this)]] to STL container methods.
Definition at line 277 of file SemaAttr.cpp.
References Context, and clang::lifetimes::isGslPointerType().
Referenced by AddKnownFunctionAttributes(), and CheckFunctionDeclaration().
| void Sema::inferNullableClassAttribute | ( | CXXRecordDecl * | CRD | ) |
Add _Nullable attributes for std:: types.
Definition at line 322 of file SemaAttr.cpp.
References Context, clang::NamedDecl::getName(), clang::Decl::hasAttr(), clang::Decl::isInStdNamespace(), clang::Nullable, and clang::TagDecl::redecls().
Referenced by ActOnTag(), and CheckClassTemplate().
| void Sema::Initialize | ( | ) |
Perform initialization that occurs after the parser has been initialized but before it parses anything.
Definition at line 371 of file Sema.cpp.
References addImplicitTypedef(), clang::OpenCLOptions::addSupport(), clang::Class, Consumer, Context, clang::CPlusPlus, getLangOpts(), clang::LangOptions::getOpenCLCompatibleVersion(), getOpenCLOptions(), IdResolver, ObjC(), OpenCL(), PP, PushOnScopeChains(), TUScope, and VAListTagName.
| ExprResult Sema::InitializeExplicitObjectArgument | ( | Sema & | S, |
| Expr * | Obj, | ||
| FunctionDecl * | Fun ) |
Definition at line 6701 of file SemaOverload.cpp.
References Context, GetExplicitObjectExpr(), clang::Expr::getExprLoc(), clang::FunctionDecl::getParamDecl(), clang::InitializedEntity::InitializeParameter(), PerformCopyInitialization(), and Sema().
Referenced by BuildCXXMemberCallExpr(), BuildOverloadedArrowExpr(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().
|
inline |
Definition at line 8223 of file Sema.h.
References ExprEvalContexts, and PotentiallyEvaluated.
Referenced by EvaluateAndDiagnoseImmediateInvocation(), and HandleImmediateInvocations().
|
inline |
Definition at line 13973 of file Sema.h.
References CodeSynthesisContexts, and inConstraintSubstitution().
Referenced by CheckTemplateTypeArgument(), formImmediatelyDeclaredConstraint(), and SubstTypeConstraint().
| void Sema::InstantiateAttrs | ( | const MultiLevelTemplateArgumentList & | TemplateArgs, |
| const Decl * | Pattern, | ||
| Decl * | Inst, | ||
| LateInstantiatedAttrVec * | LateAttrs = nullptr, | ||
| LocalInstantiationScope * | OuterMostScope = nullptr ) |
Definition at line 854 of file SemaTemplateInstantiateDecl.cpp.
References clang::SemaSwift::AddParameterABIAttr(), clang::SemaObjC::AddXConsumedAttr(), clang::Decl::attrs(), attrToRetainOwnershipKind(), clang::cast(), clang::Constructor, Context, CurrentInstantiationScope, clang::Destructor, instantiateDependentAlignedAttr(), instantiateDependentAlignValueAttr(), instantiateDependentAllocAlignAttr(), instantiateDependentAMDGPUFlatWorkGroupSizeAttr(), instantiateDependentAMDGPUMaxNumWorkGroupsAttr(), instantiateDependentAMDGPUWavesPerEUAttr(), instantiateDependentAnnotationAttr(), instantiateDependentAssumeAlignedAttr(), instantiateDependentCUDAClusterDimsAttr(), instantiateDependentCUDALaunchBoundsAttr(), instantiateDependentDiagnoseIfAttr(), instantiateDependentEnableIfAttr(), instantiateDependentHLSLParamModifierAttr(), instantiateDependentMallocSpanAttr(), instantiateDependentModeAttr(), instantiateDependentOpenACCRoutineDeclAttr(), instantiateDependentReqdWorkGroupSizeAttr(), instantiateDependentSYCLKernelAttr(), instantiateOMPDeclareSimdDeclAttr(), instantiateOMPDeclareVariantAttr(), clang::sema::instantiateTemplateAttribute(), clang::isa(), isRelevantAttr(), New, ObjC(), sharedInstantiateConstructorDestructorAttr(), and Swift().
Referenced by BuildVariableInstantiation(), InstantiateEnum(), and SubstParmVarDecl().
| void Sema::InstantiateAttrsForDecl | ( | const MultiLevelTemplateArgumentList & | TemplateArgs, |
| const Decl * | Pattern, | ||
| Decl * | Inst, | ||
| LateInstantiatedAttrVec * | LateAttrs = nullptr, | ||
| LocalInstantiationScope * | OuterMostScope = nullptr ) |
Definition at line 809 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::attrs(), Context, clang::sema::instantiateTemplateAttributeForDecl(), isRelevantAttr(), and New.
Referenced by CheckTemplateIdType().
| 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.
| PointOfInstantiation | The point of instantiation within the source code. |
| Instantiation | is the declaration whose definition is being instantiated. This will be either a class template specialization or a member class of a class template specialization. |
| Pattern | is the pattern from which the instantiation occurs. This will be either the declaration of a class template or the declaration of a member class of a class template. |
| TemplateArgs | The template arguments to be substituted into the pattern. |
| TSK | the kind of implicit or explicit instantiation to perform. |
| Complain | whether to complain if the class cannot be instantiated due to the lack of a definition. |
Definition at line 3421 of file SemaTemplateInstantiate.cpp.
References clang::Sema::RecursiveInstGuard::Template.
Referenced by ActOnExplicitInstantiation(), and 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 4059 of file SemaTemplateInstantiate.cpp.
References CheckFunctionConstraints(), CheckSpecializationInstantiationRedecl(), Consumer, Context, clang::DeclContext::decls(), clang::Enum, clang::DeclContextLookupResult::find_first(), clang::Function, clang::CXXRecordDecl::getDefinition(), clang::EnumDecl::getDefinition(), clang::VarDecl::getDefinition(), clang::CXXRecordDecl::getInstantiatedFromMemberClass(), clang::VarDecl::getInstantiatedFromStaticDataMember(), clang::VarDecl::getMemberSpecializationInfo(), clang::MemberSpecializationInfo::getPointOfInstantiation(), clang::CXXRecordDecl::getTemplateInstantiationPattern(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), clang::Decl::hasAttr(), InstantiateClass(), InstantiateClassMembers(), InstantiateEnum(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), InstantiateVariableDefinition(), clang::isa(), 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().
| bool Sema::InstantiateClassTemplateSpecialization | ( | SourceLocation | PointOfInstantiation, |
| ClassTemplateSpecializationDecl * | ClassTemplateSpec, | ||
| TemplateSpecializationKind | TSK, | ||
| bool | Complain, | ||
| bool | PrimaryStrictPackMatch ) |
Definition at line 4014 of file SemaTemplateInstantiate.cpp.
References clang::AR_Available, clang::cast(), DiagnoseAvailabilityOfDecl(), clang::ActionResult< PtrTy, Compress >::get(), clang::CXXRecordDecl::getCanonicalDecl(), getPatternForClassTemplateSpecialization(), getTemplateInstantiationArgs(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::ActionResult< PtrTy, Compress >::isUsable(), ShouldDiagnoseAvailabilityOfDecl(), clang::Sema::RecursiveInstGuard::Template, and clang::TSK_Undeclared.
Referenced by ActOnExplicitInstantiation().
| 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 4285 of file SemaTemplateInstantiate.cpp.
References getTemplateInstantiationArgs(), and InstantiateClassMembers().
Referenced by ActOnExplicitInstantiation().
| bool Sema::InstantiateDefaultArgument | ( | SourceLocation | CallLoc, |
| FunctionDecl * | FD, | ||
| ParmVarDecl * | Param ) |
Definition at line 5279 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::FOK_None, getASTMutationListener(), clang::Decl::getFriendObjectKind(), clang::Decl::getLexicalDeclContext(), getTemplateInstantiationArgs(), clang::FunctionDecl::getTemplateInstantiationPattern(), and SubstDefaultArgument().
Referenced by BuildCXXDefaultArgExpr(), and CheckCXXDefaultArgExpr().
| 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 1067 of file SemaTemplateInstantiateDecl.cpp.
References CheckCXXDefaultArgExpr(), CleanupVarDeclMarking(), Context, clang::Decl::getAttr(), clang::Attr::getLocation(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), and clang::CXXConstructorDecl::isDefaultConstructor().
Referenced by ActOnStartOfFunctionDef(), InstantiateFunctionDefinition(), and ReferenceDllExportedMembers().
| bool Sema::InstantiateEnum | ( | SourceLocation | PointOfInstantiation, |
| EnumDecl * | Instantiation, | ||
| EnumDecl * | Pattern, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| TemplateSpecializationKind | TSK ) |
Instantiate the definition of an enum from a given pattern.
| PointOfInstantiation | The point of instantiation within the source code. |
| Instantiation | is the declaration whose definition is being instantiated. This will be a member enumeration of a class temploid specialization, or a local enumeration within a function temploid specialization. |
| Pattern | The templated declaration from which the instantiation occurs. |
| TemplateArgs | The template arguments to be substituted into the pattern. |
| TSK | The kind of implicit or explicit instantiation to perform. |
true if an error occurred, false otherwise. Definition at line 3685 of file SemaTemplateInstantiate.cpp.
References Context, DiagnoseUninstantiableTemplate(), clang::EnumDecl::getDefinition(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::EnumDecl::getMemberSpecializationInfo(), InstantiateAttrs(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::MemberSpecializationInfo::setPointOfInstantiation(), clang::MemberSpecializationInfo::setTemplateSpecializationKind(), clang::Decl::setVisibleDespiteOwningModule(), and clang::Sema::RecursiveInstGuard::Template.
Referenced by InstantiateClassMembers(), and RequireCompleteEnumDecl().
| void Sema::InstantiateExceptionSpec | ( | SourceLocation | PointOfInstantiation, |
| FunctionDecl * | Function ) |
Definition at line 5327 of file SemaTemplateInstantiateDecl.cpp.
References clang::SemaBase::Diag(), clang::EST_None, clang::EST_Uninstantiated, clang::Sema::RecursiveInstGuard::ExceptionSpec, clang::FunctionProtoType::getExceptionSpecTemplate(), clang::FunctionProtoType::getExceptionSpecType(), clang::Decl::getLexicalDeclContext(), getTemplateInstantiationArgs(), clang::Sema::InstantiatingTemplate::isInvalid(), SubstExceptionSpec(), clang::Template, and UpdateExceptionSpec().
Referenced by ResolveExceptionSpec().
| ExplicitSpecifier Sema::instantiateExplicitSpecifier | ( | const MultiLevelTemplateArgumentList & | TemplateArgs, |
| ExplicitSpecifier | ES ) |
Definition at line 636 of file SemaTemplateInstantiateDecl.cpp.
References clang::Cond, ConstantEvaluated, clang::ActionResult< PtrTy, Compress >::get(), clang::ExplicitSpecifier::getExpr(), clang::ExplicitSpecifier::getKind(), clang::ExplicitSpecifier::Invalid(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Result, SubstExpr(), tryResolveExplicitSpecifier(), and Unevaluated.
Referenced by instantiateExplicitSpecifierDeferred().
| FunctionDecl * Sema::InstantiateFunctionDeclaration | ( | 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.
Usually this should not be used, and template argument deduction should be used in its place.
Definition at line 5517 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().
| 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.
| PointOfInstantiation | the point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the function, but it's close. |
| Function | the already-instantiated declaration of a function template specialization or member function of a class template specialization. |
| Recursive | if true, recursively instantiates any functions that are required by this instantiation. |
| DefinitionRequired | if true, then we are performing an explicit instantiation where the body of the function is required. Complain if there is no such body. |
Definition at line 5533 of file SemaTemplateInstantiateDecl.cpp.
References ActOnFinishFunctionBody(), ActOnSkippedFunctionBody(), ActOnStartOfFunctionDef(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::cast(), Consumer, Context, clang::CopyAssignment, clang::CopyConstructor, clang::CPlusPlus11, CurFPFeatures, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::SemaBase::Diag(), DiagnoseUninstantiableTemplate(), ExprEvalContexts, ExternalSource, FpPragmaStack, clang::Function, clang::ActionResult< PtrTy, Compress >::get(), getASTMutationListener(), clang::DeclaratorDecl::getBeginLoc(), clang::TypeLoc::getBeginLoc(), clang::FunctionDecl::getBody(), clang::Type::getContainedAutoType(), clang::Decl::getDeclContext(), getDefaultedFunctionKind(), clang::FunctionDecl::getDefinition(), getDefinition(), getDiagnostics(), clang::Decl::getEndLoc(), clang::DeclarationNameInfo::getInfo(), clang::DeclaratorDecl::getInnerLocStart(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::DeclarationNameInfo::getNamedTypeInfo(), clang::FunctionDecl::getNameInfo(), clang::DeclarationName::getNameKind(), clang::TagTypeLoc::getNameLoc(), clang::Decl::getPreviousDecl(), getPrintingPolicy(), clang::FunctionDecl::getReturnType(), getSourceManager(), getTemplateInstantiationArgs(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::FunctionDecl::hasSkippedBody(), InstantiateDefaultCtorDefaultArgs(), InstantiateMemInitializers(), clang::isa(), clang::FunctionDecl::isDefaulted(), clang::Decl::isFromASTFile(), clang::isGenericLambdaCallOperatorOrStaticInvokerSpecialization(), clang::FunctionDecl::isInlined(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::FunctionDecl::isLateTemplateParsed(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::FunctionDecl::isThisDeclarationInstantiatedFromAFriendDefinition(), LateParsedInstantiations, LateParsedTemplateMap, LateTemplateParser, clang::DeclarationNameLoc::makeNamedTypeLoc(), clang::Method, clang::MoveAssignment, clang::MoveConstructor, clang::None, OpaqueParser, OS, PendingInstantiations, clang::Sema::LocalEagerInstantiationScope::perform(), PerformDependentDiagnostics(), clang::Sema::ContextRAII::pop(), PotentiallyEvaluated, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTrivial(), clang::Result, Sema(), clang::SemaBase::SemaRef, SetDeclDefaulted(), clang::TagTypeLoc::setElaboratedKeywordLoc(), clang::TagTypeLoc::setNameLoc(), clang::TagTypeLoc::setQualifierLoc(), clang::ValueDecl::setType(), clang::DeclaratorDecl::setTypeSourceInfo(), SourceMgr, SubstQualifier(), SubstStmt(), clang::T, clang::Sema::RecursiveInstGuard::Template, 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(), MarkFunctionReferenced(), and PerformPendingInstantiations().
| bool Sema::InstantiateInClassInitializer | ( | SourceLocation | PointOfInstantiation, |
| FieldDecl * | Instantiation, | ||
| FieldDecl * | Pattern, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Instantiate the definition of a field from the given pattern.
| PointOfInstantiation | The point of instantiation within the source code. |
| Instantiation | is the declaration whose definition is being instantiated. This will be a class of a class temploid specialization, or a local enumeration within a function temploid specialization. |
| Pattern | The templated declaration from which the instantiation occurs. |
| TemplateArgs | The template arguments to be substituted into the pattern. |
true if an error occurred, false otherwise. Definition at line 3740 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::isa(), clang::Sema::InstantiatingTemplate::isInvalid(), PotentiallyEvaluated, clang::Decl::setInvalidDecl(), SubstInitializer(), and clang::Sema::RecursiveInstGuard::Template.
Referenced by BuildCXXDefaultInitExpr(), and InstantiateClassMembers().
| void Sema::InstantiateMemInitializers | ( | CXXConstructorDecl * | New, |
| const CXXConstructorDecl * | Tmpl, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 6510 of file SemaTemplateInstantiateDecl.cpp.
References ActOnMemInitializers(), BuildBaseInitializer(), BuildDelegatingInitializer(), BuildMemberInitializer(), clang::cast(), CheckParameterPacksForExpansion(), collectUnexpandedParameterPacks(), CurContext, FindInstantiatedDecl(), clang::ActionResult< PtrTy, Compress >::get(), clang::TypeLoc::getSourceRange(), clang::TypeSourceInfo::getType(), clang::Init, clang::CXXConstructorDecl::inits(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Member, New, SubstInitializer(), and SubstType().
Referenced by InstantiateFunctionDefinition().
| 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.
| PointOfInstantiation | the point at which the instantiation was required. Note that this is not precisely a "point of instantiation" for the variable, but it's close. |
| Var | the already-instantiated declaration of a templated variable. |
| Recursive | if true, recursively instantiates any functions that are required by this instantiation. |
| DefinitionRequired | if true, then we are performing an explicit instantiation where a definition of the variable is required. Complain if there is no such definition. |
Definition at line 6276 of file SemaTemplateInstantiateDecl.cpp.
References clang::TemplateArgumentListInfo::addArgument(), AnalysisWarnings, clang::TemplateArgumentList::asArray(), clang::cast(), CompleteVarTemplateSpecializationDecl(), Consumer, Context, clang::CPlusPlus11, clang::SemaBase::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::getTemplateArgsAsWritten(), getTemplateInstantiationArgs(), clang::VarTemplateSpecializationDecl::getTemplateInstantiationArgs(), clang::VarDecl::getTemplateInstantiationPattern(), clang::VarDecl::getTemplateSpecializationKind(), clang::VarDecl::getTemplateSpecializationKindForInstantiation(), clang::VarDecl::hasInit(), InstantiateVariableInitializer(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::VarDecl::isOutOfLine(), clang::DeclContext::isRecord(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::mightBeUsableInConstantExpressions(), PendingInstantiations, clang::Sema::GlobalEagerInstantiationScope::perform(), clang::Sema::LocalEagerInstantiationScope::perform(), clang::Sema::ContextRAII::pop(), clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::VarTemplateSpecializationDecl::setTemplateArgsAsWritten(), clang::VarDecl::setTemplateSpecializationKind(), clang::Decl::setVisibleDespiteOwningModule(), SubstDecl(), clang::Sema::RecursiveInstGuard::Template, clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().
Referenced by ActOnExplicitInstantiation(), completeExprArrayBound(), DoMarkVarDeclReferenced(), InstantiateClassMembers(), and PerformPendingInstantiations().
| void Sema::InstantiateVariableInitializer | ( | VarDecl * | Var, |
| VarDecl * | OldVar, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Instantiate the initializer of a variable.
Definition at line 6201 of file SemaTemplateInstantiateDecl.cpp.
References ActOnUninitializedDecl(), AddInitializerToDecl(), clang::VarDecl::CallInit, clang::SemaCUDA::checkAllowedInitializer(), CUDA(), currentEvaluationContext(), clang::Sema::ExpressionEvaluationContextRecord::DeclForInitializer, clang::DirectInit, clang::Sema::ExpressionEvaluationContextRecord::EK_VariableInit, clang::Evaluated, getASTContext(), getASTMutationListener(), clang::Decl::getDeclContext(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::VarDecl::getInit(), clang::VarDecl::getInitStyle(), getLangOpts(), clang::Decl::hasAttr(), clang::VarDecl::hasInit(), clang::Init, clang::Sema::ExpressionEvaluationContextRecord::InLifetimeExtendingContext, clang::Expr::isConstantInitializer(), clang::VarDecl::isCXXForRangeDecl(), clang::VarDecl::isDirectInit(), clang::VarDecl::isInline(), clang::VarDecl::isInlineSpecified(), clang::VarDecl::isObjCForDecl(), clang::VarDecl::isOutOfLine(), clang::VarDecl::isStaticDataMember(), parentEvaluationContext(), PotentiallyEvaluated, clang::Sema::ExpressionEvaluationContextRecord::RebuildDefaultArgOrDefaultInit, clang::VarDecl::setImplicitlyInline(), clang::VarDecl::setInlineSpecified(), clang::Decl::setInvalidDecl(), and SubstInitializer().
Referenced by BuildVariableInstantiation(), CompleteVarTemplateSpecializationDecl(), and InstantiateVariableDefinition().
|
inline |
Determine whether we are currently performing template instantiation.
Definition at line 13963 of file Sema.h.
References CodeSynthesisContexts, and NonInstantiationEntries.
Referenced by ActOnFields(), ActOnStartOfFunctionDef(), AddImplicitlyDeclaredMembersToClass(), BuildBinOp(), BuildCXXNoexceptExpr(), BuildCXXTypeId(), BuiltinSEHScopeCheck(), CheckCompleteVariableDeclaration(), CheckExplicitlyDefaultedComparison(), CheckExplicitlyDefaultedSpecialMember(), CheckFunctionDeclaration(), CheckIdentityFieldAssignment(), checkLiteralOperatorTemplateParameterList(), CheckLogicalOperands(), CheckMoveOnConstruction(), CheckTautologicalComparison(), CheckUnaryExprOrTypeTraitOperand(), CreateGenericSelectionExpr(), DeclareImplicitCopyConstructor(), deduceVarTypeFromInitializer(), DiagnoseAlwaysNonNullPointer(), diagnoseAndRemoveTypeQualifiers(), DiagnoseCommaOperator(), DiagnoseFloatingImpCast(), DiagnoseForRangeVariableCopies(), DiagnoseSelfAssignment(), DiagnoseSelfMove(), diagnoseTautologicalComparison(), DiagnoseTwoPhaseLookup(), DiagnoseUnusedParameters(), FinalizeDeclaration(), getCurrentMangleNumberContext(), getCurrentThisType(), HandleImmediateInvocations(), handleNonNullAttr(), isAcceptableTagRedeclaration(), makeUnavailableInSystemHeader(), MergeFunctionDecl(), warnAboutRedundantParens(), and warnBracedScalarInit().
| QualType Sema::InvalidLogicalVectorOperands | ( | SourceLocation | Loc, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS ) |
Diagnose cases where a scalar was implicitly converted to a vector and diagnose the underlying types.
Otherwise, diagnose the error as invalid vector logical operands for non-C++ cases.
Definition at line 10170 of file SemaExpr.cpp.
References clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreImpCasts(), clang::Type::isVectorType(), and clang::Vector.
Referenced by CheckVectorLogicalOperands().
| QualType Sema::InvalidOperands | ( | SourceLocation | Loc, |
| ExprResult & | LHS, | ||
| ExprResult & | RHS ) |
the following "Check" methods will return a valid/converted QualType or a null QualType (indicating an error diagnostic was issued).
type checking binary operators (subroutines of CreateBuiltinBinOp).
Definition at line 10146 of file SemaExpr.cpp.
References clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), and clang::Expr::getType().
Referenced by CheckAdditionOperands(), checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), CheckBitwiseOperands(), CheckCompareOperands(), CheckLogicalOperands(), CheckMatrixElementwiseOperands(), CheckMatrixLogicalOperands(), CheckMatrixMultiplyOperands(), CheckMultiplyDivideOperands(), CheckRemainderOperands(), CheckShiftOperands(), CheckSubtractionOperands(), CheckVectorLogicalOperands(), CheckVectorOperands(), convertPointersToCompositeType(), and CreateBuiltinBinOp().
| IdentifierInfo * Sema::InventAbbreviatedTemplateParameterTypeName | ( | const IdentifierInfo * | ParamName, |
| unsigned | Index ) |
Invent a new identifier for parameters of abbreviated templates.
Definition at line 139 of file Sema.cpp.
References Context, clang::IdentifierInfo::getName(), and OS.
Referenced by InventTemplateParameter().
| bool Sema::isAbstractType | ( | SourceLocation | Loc, |
| QualType | T ) |
Definition at line 5991 of file SemaDeclCXX.cpp.
References Context, clang::CPlusPlus, clang::CXXRecordDecl::getDefinition(), getLangOpts(), clang::CXXRecordDecl::isAbstract(), clang::TagDecl::isBeingDefined(), and clang::T.
Referenced by RequireNonAbstractType().
|
inline |
Determine whether a declaration is acceptable (visible/reachable).
Definition at line 15508 of file Sema.h.
References isReachable(), isVisible(), and Visible.
Referenced by hasAcceptableDeclarationImpl(), hasAcceptableDefaultArgument(), and hasAcceptableDefinition().
Determines whether the given declaration is an valid acceptable result for name lookup of a nested-name-specifier.
| SD | Declaration checked for nested-name-specifier. |
| IsExtension | If not null and the declaration is accepted as an extension, the pointed variable is assigned true. |
Definition at line 305 of file SemaCXXScopeSpec.cpp.
References clang::cast(), Context, clang::NamedDecl::getUnderlyingDecl(), and clang::isa().
Referenced by BuildCXXNestedNameSpecifier(), and FindFirstQualifierInScope().
| bool Sema::isAcceptableTagRedeclaration | ( | const TagDecl * | Previous, |
| TagTypeKind | NewTag, | ||
| bool | isDefinition, | ||
| SourceLocation | NewTagLoc, | ||
| const IdentifierInfo * | Name ) |
Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declaration.
Definition at line 17585 of file SemaDecl.cpp.
References clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), getDiagnostics(), clang::Decl::getLocation(), getRedeclDiagFromTagKind(), clang::TagDecl::getTagKind(), clang::KeywordHelpers::getTagTypeKindName(), inTemplateInstantiation(), isClassCompatTagKind(), clang::DiagnosticsEngine::isIgnored(), isTemplate(), clang::NewTag, and Previous.
Referenced by ActOnClassTemplateSpecialization(), ActOnExplicitInstantiation(), ActOnTag(), ActOnTagTemplateIdType(), and CheckClassTemplate().
|
inline |
Definition at line 8191 of file Sema.h.
References currentEvaluationContext(), clang::Sema::ExpressionEvaluationContextRecord::InConditionallyConstantEvaluateContext, clang::Sema::ExpressionEvaluationContextRecord::isConstantEvaluated(), and isConstantEvaluatedOverride.
Referenced by CheckForImmediateInvocation().
|
inline |
Definition at line 8074 of file Sema.h.
References clang::Compatible, clang::CompatiblePointerDiscardsQualifiers, and clang::CompatibleVoidPtrToNonVoidPtr.
Referenced by ActOnCleanupAttr(), CheckAssignmentConstraints(), CheckAssignmentOperands(), clang::checkCollectionLiteralElement(), checkPointerTypesForAssignment(), and clang::InitializationSequence::Perform().
| bool Sema::IsAtLeastAsConstrained | ( | const NamedDecl * | D1, |
| MutableArrayRef< AssociatedConstraint > | AC1, | ||
| const NamedDecl * | D2, | ||
| MutableArrayRef< AssociatedConstraint > | 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.
| Result | If no error occurred, receives the result of true if D1 is at least constrained than D2, and false otherwise. |
Definition at line 2493 of file SemaConcept.cpp.
References CalculateTemplateDepthForConstraints(), clang::FunctionDecl::getTemplatedKind(), clang::Result, clang::SubsumptionChecker::Subsumes(), clang::FunctionDecl::TK_FunctionTemplate, and clang::FunctionDecl::TK_NonTemplate.
Referenced by CheckTemplateTemplateArgument(), getMoreConstrainedFunction(), getMoreSpecialized(), getMoreSpecializedTemplate(), and SetEligibleMethods().
|
inline |
Definition at line 6972 of file Sema.h.
References clang::Sema::ExpressionEvaluationContextRecord::EK_AttrArgument, and ExprEvalContexts.
Referenced by ActOnIdExpression(), and BuildDeclarationNameExpr().
| bool Sema::IsBlockPointerConversion | ( | QualType | FromType, |
| QualType | ToType, | ||
| QualType & | ConvertedType ) |
Definition at line 3292 of file SemaOverload.cpp.
References Context, clang::CPlusPlus, clang::Type::getAs(), clang::FunctionType::getExtInfo(), getLangOpts(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::QualType::getUnqualifiedType(), clang::QualType::hasQualifiers(), isObjCPointerConversion(), clang::Type::isRecordType(), and clang::FunctionProtoType::isVariadic().
Referenced by IsStandardConversion().
|
inlinestatic |
Definition at line 2547 of file Sema.h.
References clang::CStyleCast, clang::FunctionalCast, and clang::OtherCast.
Referenced by diagnoseObjCARCConversion(), ImpCastExprToType(), and PerformImplicitConversion().
|
inline |
Definition at line 8215 of file Sema.h.
References clang::Sema::ExpressionEvaluationContextRecord::Context, currentEvaluationContext(), clang::Sema::ExpressionEvaluationContextRecord::IsCurrentlyCheckingDefaultArgumentOrInitializer, and PotentiallyEvaluatedIfUsed.
Referenced by BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), CheckForImmediateInvocation(), and MarkDeclRefReferenced().
|
inline |
Definition at line 15450 of file Sema.h.
References Default, and clang::T.
Referenced by ActOnCXXDelete(), AddConversionCandidate(), AddMemberOperatorCandidates(), BuildArrayType(), buildDeclareReductionRef(), CheckAddressOfOperand(), CheckMemberPointerConversion(), CheckSpanLikeType(), checkTupleLikeDecomposition(), CompareReferenceRelationship(), DeclareAggregateDeductionGuideFromInitList(), DeclareImplicitDeductionGuides(), DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateSpecializationFromInitializer(), DefaultLvalueConversion(), FixOverloadedFunctionReference(), getStdTrait(), IsDerivedFrom(), IsIntegralPromotion(), isNullPointerValueTemplateArgument(), IsUserDefinedConversion(), PerformContextualImplicitConversion(), RequireLiteralType(), ResolveConstructorOverload(), TryConstructorInitialization(), TryInitializerListConstruction(), TryListConversion(), TryListInitialization(), TryReferenceInit(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
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 2895 of file SemaOverload.cpp.
References clang::Type::getAs(), clang::ComplexType::getElementType(), IsFloatingPointPromotion(), and IsIntegralPromotion().
Referenced by IsStandardConversion().
|
inline |
Definition at line 2614 of file Sema.h.
References currentEvaluationContext(), clang::Sema::ExpressionEvaluationContextRecord::isConstantEvaluated(), and isConstantEvaluatedOverride.
Referenced by AnalyzeComparison(), BuiltinConstantArgRange(), checkFormatStringExpr(), CheckImplicitConversion(), CheckNonNullArguments(), CheckTautologicalComparison(), CheckUnicodeArithmeticConversions(), DiagnoseMixedUnicodeImplicitConversion(), and MarkDeclRefReferenced().
| 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 2705 of file SemaDeclCXX.cpp.
References getCurrentClass(), and clang::NamedDecl::getIdentifier().
Referenced by ClassifyName().
| 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 2711 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().
| bool Sema::IsCXXTriviallyRelocatableType | ( | const CXXRecordDecl & | RD | ) |
Definition at line 257 of file SemaTypeTraits.cpp.
References CheckCXX2CRelocatable(), getASTContext(), clang::ASTContext::CXXRecordDeclRelocationInfo::IsRelocatable, and clang::ASTContext::setRelocationInfoForCXXRecord().
Determines if a type is trivially relocatable according to the C++26 rules.
Definition at line 266 of file SemaTypeTraits.cpp.
References Context, clang::Type::getAsCXXRecordDecl(), getASTContext(), clang::ASTContext::getBaseElementType(), clang::QualType::hasNonTrivialObjCLifetime(), IsCXXTriviallyRelocatableType(), clang::Type::isIncompleteType(), clang::Type::isScalarType(), clang::Type::isVariableArrayType(), and clang::Type::isVectorType().
Referenced by BuiltinTriviallyRelocate(), checkIllFormedTrivialABIStruct(), DiagnoseNonTriviallyRelocatableReason(), IsCXXTriviallyRelocatableType(), IsEligibleForTrivialRelocation(), and IsTriviallyRelocatableType().
| bool Sema::isDeclaratorFunctionLike | ( | Declarator & | D | ) |
Determine whether.
| D | is function like (function or function template) for parsing. |
Definition at line 2917 of file Sema.cpp.
References computeDeclContext(), forRedeclarationInCurContext(), clang::Declarator::getBeginLoc(), clang::Declarator::getCXXScopeSpec(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::isa(), clang::DeclSpec::isFriendSpecified(), clang::CXXScopeSpec::isSet(), LookupOrdinaryName, LookupQualifiedName(), and clang::Result.
| 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.
| AllowInlineNamespace | If true, allow the declaration to be in the enclosing namespace set of the context, rather than contained directly within it. |
Definition at line 1621 of file SemaDecl.cpp.
References IdResolver.
Referenced by ActOnDecompositionDeclarator(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnTag(), ActOnVariableDeclarator(), CheckAnonMemberRedeclaration(), CheckClassTemplate(), FilterLookupForScope(), FilterUsingLookup(), HandleField(), HandleMSProperty(), and MergeCXXFunctionDecl().
| bool Sema::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.
Definition at line 331 of file SemaTemplate.cpp.
References Context, clang::LookupResult::empty(), clang::LookupResult::getAsSingle(), clang::getAsTypeTemplateDecl(), clang::CXXScopeSpec::getScopeRep(), clang::LookupResult::isAmbiguous(), LookupOrdinaryName, LookupTemplateName(), clang::OpaquePtr< TemplateName >::make(), clang::LookupResult::suppressDiagnostics(), and clang::Template.
| bool Sema::isDependentScopeSpecifier | ( | const CXXScopeSpec & | SS | ) |
Definition at line 151 of file SemaCXXScopeSpec.cpp.
References clang::CXXScopeSpec::getScopeRep(), clang::NestedNameSpecifier::isDependent(), clang::CXXScopeSpec::isInvalid(), and clang::CXXScopeSpec::isSet().
Referenced by ActOnDependentMemberExpr(), ActOnTemplateIdType(), ActOnUsingEnumDeclaration(), BuildCXXNestedNameSpecifier(), BuildMemberPointerType(), BuildMemberReferenceExpr(), BuildMemInitializer(), DiagnoseUnknownTemplateName(), DiagnoseUnknownTypeName(), getDestructorName(), getTypeName(), LookupParsedName(), and LookupTemplateName().
| bool Sema::IsDerivedFrom | ( | SourceLocation | Loc, |
| CXXRecordDecl * | Derived, | ||
| CXXRecordDecl * | Base ) |
Definition at line 3072 of file SemaDeclCXX.cpp.
References IsDerivedFrom().
| bool Sema::IsDerivedFrom | ( | SourceLocation | Loc, |
| CXXRecordDecl * | Derived, | ||
| CXXRecordDecl * | Base, | ||
| CXXBasePaths & | Paths ) |
Determine whether the type Derived is a C++ class that is derived from the type Base.
Definition at line 3050 of file SemaDeclCXX.cpp.
References Context, clang::CPlusPlus, getLangOpts(), clang::TagDecl::isBeingDefined(), isCompleteType(), clang::CXXRecordDecl::isDerivedFrom(), and clang::Decl::isInvalidDecl().
Referenced by ActOnConversionDeclarator(), AddConversionCandidate(), AddOverloadCandidate(), BuildBuiltinOffsetOf(), buildDeclareReductionRef(), buildUserDefinedMapperRef(), CheckDerivedToBaseConversion(), CheckMemberPointerConversion(), CheckOriginalCallArgDeduction(), CheckOverridingFunctionReturnType(), CheckPointerToMemberOperands(), CompareDerivedToBaseConversions(), CompareReferenceRelationship(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), DiagnoseBadConversion(), DiagnoseInvalidExplicitObjectParameterInLambda(), FindBaseInitializer(), FindCompositePointerType(), handlerCanCatch(), hasUserDefinedMapper(), clang::InitializationSequence::InitializeFrom(), IsDerivedFrom(), IsDerivedFrom(), IsDerivedFrom(), IsMemberPointerConversion(), IsPointerConversion(), IsPointerInterconvertibleBaseOf(), IsUserDefinedConversion(), PerformObjectMemberConversion(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryObjectArgumentInitialization(), and TryUserDefinedConversion().
| bool Sema::IsDerivedFrom | ( | SourceLocation | Loc, |
| QualType | Derived, | ||
| QualType | Base ) |
Definition at line 3079 of file SemaDeclCXX.cpp.
References clang::Type::getAsCXXRecordDecl(), and IsDerivedFrom().
| bool Sema::IsDerivedFrom | ( | SourceLocation | Loc, |
| QualType | Derived, | ||
| QualType | Base, | ||
| CXXBasePaths & | Paths ) |
Definition at line 3086 of file SemaDeclCXX.cpp.
References clang::Type::getAsCXXRecordDecl(), and IsDerivedFrom().
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 11177 of file SemaOverload.cpp.
References clang::cast(), Context, and getOwningModule().
Referenced by CheckUsingShadowDecl().
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 935 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 - 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 2858 of file SemaOverload.cpp.
References clang::CPlusPlus, clang::Type::getAs(), getLangOpts(), and HLSL().
Referenced by IsComplexPromotion(), IsStandardConversion(), and IsVectorOrMatrixElementConversion().
Determine whether the conversion from FromType to ToType is a valid conversion of ExtInfo/ExtProtoInfo on the nested function type.
More precisely, this method checks whether FromType can be transformed into an exact match for ToType, by transforming its extended function type information in legal manner (e.g. by strictly stripping "noreturn" or "noexcept", or by stripping "noescape" for arguments).
Definition at line 1914 of file SemaOverload.cpp.
References clang::cast(), clang::CanQual< T >::castAs(), Context, clang::declaresSameEntity(), clang::EST_None, clang::FunctionProtoType::ExtProtoInfo::ExtParameterInfos, clang::FunctionProtoType::ExtProtoInfo::FunctionEffects, clang::Type::getAs(), clang::MemberPointerType::getMostRecentCXXRecordDecl(), clang::FunctionType::ExtInfo::getNoReturn(), clang::MemberPointerType::getPointeeType(), getPointeeType(), clang::QualType::getTypePtr(), clang::nullptr, and clang::FunctionType::ExtInfo::withNoReturn().
Referenced by BuildExpressionFromDeclTemplateArgument(), CheckOriginalCallArgDeduction(), checkPointerTypesForAssignment(), CompareReferenceRelationship(), handlerCanCatch(), IsStandardConversion(), and TryFunctionConversion().
|
inline |
Definition at line 8203 of file Sema.h.
References currentEvaluationContext(), and clang::Sema::ExpressionEvaluationContextRecord::isImmediateFunctionContext().
Referenced by CheckForImmediateInvocation(), and MarkDeclRefReferenced().
| bool Sema::isImplicitlyDeleted | ( | FunctionDecl * | FD | ) |
Determine whether the given function is an implicitly-deleted special member function.
Definition at line 16120 of file SemaDeclCXX.cpp.
References clang::isa(), clang::FunctionDecl::isDefaulted(), and clang::FunctionDecl::isDeleted().
Referenced by CreateOverloadedBinOp(), and clang::InitializationSequence::Diagnose().
| bool Sema::isIncompatibleTypedef | ( | const TypeDecl * | Old, |
| TypedefNameDecl * | New ) |
Definition at line 2515 of file SemaDecl.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::isa(), clang::Type::isDependentType(), clang::SourceLocation::isValid(), clang::Type::isVariablyModifiedType(), New, and notePreviousDefinition().
Referenced by MergeTypedefNameDecl().
| bool Sema::isInitListConstructor | ( | const FunctionDecl * | Ctor | ) |
Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2.
Definition at line 12398 of file SemaDeclCXX.cpp.
References clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::FunctionDecl::hasOneParamOrDefaultArgs(), and isStdInitializerList().
Referenced by DeduceTemplateSpecializationFromInitializer(), IsInitializerListConstructorConversion(), ResolveConstructorOverload(), and TryUserDefinedConversion().
|
inline |
Definition at line 8207 of file Sema.h.
References currentEvaluationContext(), and clang::Sema::ExpressionEvaluationContextRecord::InLifetimeExtendingContext.
Referenced by BuildCXXDefaultInitExpr(), CreateMaterializeTemporaryExpr(), and IgnoredValueConversions().
| bool Sema::IsInsideALocalClassWithinATemplateFunction | ( | ) |
Definition at line 11627 of file SemaTemplate.cpp.
References CurContext, clang::DeclContext::getParent(), clang::FunctionDecl::getTemplatedKind(), clang::DeclContext::isNamespace(), clang::DeclContext::isTranslationUnit(), and clang::FunctionDecl::TK_NonTemplate.
IsIntegralPromotion - Determines whether the conversion from the expression From (whose potentially-adjusted type is FromType) to ToType is an integral promotion (C++ 4.5).
If so, returns true and sets PromotedType to the promoted type.
Definition at line 2694 of file SemaOverload.cpp.
References Context, clang::CPlusPlus, clang::Type::getAs(), clang::Type::getAsEnumDecl(), clang::Stmt::getBeginLoc(), clang::BuiltinType::getKind(), getLangOpts(), clang::Expr::getSourceBitField(), clang::Type::isAnyCharacterType(), clang::Type::isBooleanType(), clang::Type::isCharType(), isCompleteType(), clang::Type::isEnumeralType(), clang::Type::isIntegerType(), IsIntegralPromotion(), clang::Type::isIntegralType(), clang::Type::isSignedIntegerType(), and clang::Type::isUnsignedIntegerType().
Referenced by CheckTemplateArgument(), IsComplexPromotion(), IsIntegralPromotion(), IsStandardConversion(), and IsVectorOrMatrixElementConversion().
Definition at line 9116 of file SemaExpr.cpp.
References Context, and clang::FunctionType::SME_AttributeMask.
Referenced by CheckOverridingFunctionAttributes(), and MergeFunctionDecl().
| 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 881 of file SemaCXXScopeSpec.cpp.
References BuildCXXNestedNameSpecifier(), and clang::CXXScopeSpec::isInvalid().
Is this a legal conversion between two types, one of which is known to be a vector type?
Definition at line 7792 of file SemaExpr.cpp.
References clang::LangOptionsBase::All, areLaxCompatibleVectorTypes(), Context, clang::Type::getAs(), clang::LangOptionsBase::Integer, clang::Type::isIntegralOrEnumerationType(), clang::Type::isVectorType(), and clang::LangOptionsBase::None.
Referenced by CheckAssignmentConstraints(), CheckVectorOperands(), and IsVectorConversion().
Definition at line 15946 of file SemaChecking.cpp.
References getASTContext(), and isLayoutCompatible().
| 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(), getPreprocessor(), and clang::IdentifierInfo::isStr().
|
inline |
Definition at line 1778 of file Sema.h.
References clang::Found, isMemberAccessibleForDeletion(), and clang::SemaBase::PDiag().
| 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 1600 of file SemaAccess.cpp.
References AR_accessible, AR_delayed, AR_dependent, AR_inaccessible, clang::AS_public, CheckAccess(), Context, clang::SemaBase::Diag(), clang::Found, and getLangOpts().
Referenced by isMemberAccessibleForDeletion().
| 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 3649 of file SemaOverload.cpp.
References Context, clang::declaresSameEntity(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::MemberPointerType::getMostRecentCXXRecordDecl(), clang::MemberPointerType::getPointeeType(), clang::MemberPointerType::getQualifier(), IsDerivedFrom(), clang::Expr::isNullPointerConstant(), clang::Expr::NPC_ValueDependentIsNotNull, and clang::Expr::NPC_ValueDependentIsNull.
Referenced by IsStandardConversion().
| 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:
Definition at line 699 of file SemaDecl.cpp.
References clang::cast(), Context, CurContext, clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getScopeRep(), clang::Scope::isFunctionPrototypeScope(), clang::NestedNameSpecifier::MicrosoftSuper, clang::T, and clang::NestedNameSpecifier::Type.
Referenced by DiagnoseUnknownTypeName().
Definition at line 1932 of file SemaLookup.cpp.
References getLookupModules(), clang::Module::getTopLevelModule(), clang::Module::isGlobalModule(), and clang::Module::isModuleVisible().
Referenced by checkModuleImportContext(), and hasVisibleMergedDefinition().
| bool Sema::isMoreSpecializedThanPrimary | ( | ClassTemplatePartialSpecializationDecl * | T, |
| sema::TemplateDeductionInfo & | Info ) |
Definition at line 6430 of file SemaTemplateDeduction.cpp.
References clang::sema::TemplateDeductionInfo::clearSFINAEDiagnostic(), Context, clang::ClassTemplateDecl::getCanonicalInjectedSpecializationType(), clang::ClassTemplatePartialSpecializationDecl::getCanonicalInjectedSpecializationType(), getMoreSpecialized(), and clang::ClassTemplateSpecializationDecl::getSpecializedTemplate().
Referenced by checkMoreSpecializedThanPrimary().
| bool Sema::isMoreSpecializedThanPrimary | ( | VarTemplatePartialSpecializationDecl * | T, |
| sema::TemplateDeductionInfo & | Info ) |
Definition at line 6462 of file SemaTemplateDeduction.cpp.
References clang::TemplateArgumentList::asArray(), clang::sema::TemplateDeductionInfo::clearSFINAEDiagnostic(), Context, clang::VarTemplateDecl::getCanonicalDecl(), clang::RedeclarableTemplateDecl::getInjectedTemplateArgs(), getMoreSpecialized(), clang::VarTemplateSpecializationDecl::getSpecializedTemplate(), clang::VarTemplateSpecializationDecl::getTemplateArgs(), and clang::None.
| bool Sema::isObjCPointerConversion | ( | QualType | FromType, |
| QualType | ToType, | ||
| QualType & | ConvertedType, | ||
| bool & | IncompatibleObjC ) |
isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion.
Subroutine of IsPointerConversion, with the same arguments and return values.
Definition at line 3121 of file SemaOverload.cpp.
References AdoptQualifiers(), BuildSimilarlyQualifiedPointerType(), Context, clang::CPlusPlus, clang::Type::getAs(), getASTContext(), clang::ObjCObjectPointerType::getInterfaceType(), getLangOpts(), clang::FunctionProtoType::getMethodQuals(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::ObjCObjectPointerType::getPointeeType(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::FunctionType::getReturnType(), clang::QualType::isAtLeastAsQualifiedAs(), clang::Type::isObjCBuiltinType(), isObjCPointerConversion(), clang::Type::isPointerType(), clang::FunctionProtoType::isVariadic(), and ObjC().
Referenced by isAllowableExplicitConversion(), IsBlockPointerConversion(), isObjCPointerConversion(), IsPointerConversion(), and SelectPropertyForSynthesisFromProtocols().
| bool Sema::IsOverload | ( | FunctionDecl * | New, |
| FunctionDecl * | Old, | ||
| bool | UseMemberUsingDeclRules, | ||
| bool | ConsiderCudaAttrs = true ) |
Definition at line 1643 of file SemaOverload.cpp.
References IsOverloadOrOverrideImpl(), and New.
Referenced by AddOverrideResults(), CheckFunctionDeclaration(), CheckMultiVersionAdditionalDecl(), and CheckOverload().
| bool Sema::IsOverride | ( | FunctionDecl * | MD, |
| FunctionDecl * | BaseMD, | ||
| bool | UseMemberUsingDeclRules, | ||
| bool | ConsiderCudaAttrs = true ) |
Definition at line 1649 of file SemaOverload.cpp.
References IsOverloadOrOverrideImpl().
Referenced by AddOverriddenMethods().
| 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 2973 of file SemaOverload.cpp.
References BuildSimilarlyQualifiedPointerType(), clang::Type::castAs(), Context, clang::CPlusPlus, clang::Type::getAs(), clang::Stmt::getBeginLoc(), getLangOpts(), clang::PointerType::getPointeeType(), clang::Type::isBlockPointerType(), IsDerivedFrom(), clang::Type::isFunctionType(), clang::Type::isIncompleteOrObjectType(), isNullPointerConstantForConversion(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), isObjCPointerConversion(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isVectorType(), and clang::Type::isVoidType().
Referenced by IsStandardConversion().
| bool Sema::IsPointerInterconvertibleBaseOf | ( | const TypeSourceInfo * | Base, |
| const TypeSourceInfo * | Derived ) |
Definition at line 15952 of file SemaChecking.cpp.
References clang::Type::getAsCXXRecordDecl(), getASTContext(), clang::TypeLoc::getBeginLoc(), clang::Type::getCanonicalTypeUnqualified(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), IsDerivedFrom(), clang::CXXRecordDecl::isStandardLayout(), and clang::Type::isStructureOrClassType().
| bool Sema::isPotentialImplicitMemberAccess | ( | const CXXScopeSpec & | SS, |
| LookupResult & | R, | ||
| bool | IsAddressOfOperand ) |
Check whether an expression might be an implicit class member access.
Definition at line 284 of file SemaExprMember.cpp.
References clang::LookupResult::begin(), clang::CPlusPlus, clang::LookupResult::empty(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::isa(), clang::NamedDecl::isCXXClassMember(), clang::CXXScopeSpec::isEmpty(), clang::LookupResult::isOverloadedResult(), and clang::LookupResult::isUnresolvableResult().
Referenced by ActOnIdExpression(), BuildQualifiedDeclarationNameExpr(), and BuildQualifiedTemplateIdExpr().
|
inline |
Are precise floating point semantics currently enabled?
Definition at line 2217 of file Sema.h.
References CurFPFeatures.
Referenced by ActOnPragmaFEnvAccess(), and ActOnPragmaFloatControl().
| 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).
| ObjCLifetimeConversion | Output parameter that will be set to indicate when the qualification conversion involves a change in the Objective-C object lifetime. |
Definition at line 3881 of file SemaOverload.cpp.
References Context, getASTContext(), clang::QualType::getUnqualifiedType(), and isQualificationConversionStep().
Referenced by CheckOriginalCallArgDeduction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), CompareQualificationConversions(), handlerCanCatch(), isAllowableExplicitConversion(), isNullPointerValueTemplateArgument(), and IsStandardConversion().
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 16190 of file SemaExpr.cpp.
References clang::isa(), clang::NamedDecl::isCXXClassMember(), and clang::Method.
Referenced by BuildUnaryOp().
Determine whether a declaration is reachable.
Definition at line 15501 of file Sema.h.
References clang::Decl::isUnconditionallyVisible(), and Reachable.
Referenced by ArgumentDependentLookup(), hasReachableDeclaration(), hasReachableDeclarationSlow(), isAcceptable(), and IsRedefinitionInModule().
Definition at line 15529 of file Sema.h.
References isRedefinitionAllowedFor(), and Visible.
Determine if D has a definition which allows we redefine it in current TU.
Suggested is the definition that should be made visible to expose the definition.
Definition at line 21129 of file SemaDecl.cpp.
References hasVisibleDefinition(), clang::Decl::isInAnotherModuleUnit(), and Visible.
Referenced by ActOnClassTemplateSpecialization(), ActOnTag(), CheckClassTemplate(), CheckForFunctionRedefinition(), and isRedefinitionAllowedFor().
Check the redefinition in C++20 Modules.
[basic.def.odr]p14: For any definable item D with definitions in multiple translation units,
Return true if the redefinition is not allowed. Return false otherwise.
Definition at line 1794 of file SemaDecl.cpp.
References getASTContext(), clang::Decl::getOwningModule(), clang::Module::getTopLevelModule(), clang::Module::isHeaderLikeModule(), clang::Module::isNamedModule(), isReachable(), New, and Sema().
Referenced by CheckConceptRedefinition().
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.
| P | the template parameter type. |
| A | the argument type. |
Definition at line 1408 of file SemaTemplateDeduction.cpp.
References Context, clang::Type::getAs(), and TryFunctionConversion().
Referenced by DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), ResolveOverloadForDeduction(), and ResolveSingleFunctionTemplateSpecialization().
|
inlinenodiscard |
Definition at line 13696 of file Sema.h.
References CurrentSFINAEContext.
Referenced by ActOnCXXDelete(), ActOnPseudoDestructorExpr(), BuildArrayType(), BuildCXXDefaultInitExpr(), buildOverloadedCallSet(), CheckAddressOfOperand(), CheckArrow(), CheckCompareOperands(), computeDeclContext(), CopyObject(), createImplicitModuleImportForErrorRecovery(), CreateRecoveryExpr(), diagnoseNoViableConversion(), DiagnoseUninstantiableTemplate(), LookupMemberExpr(), MaybeEmitAmbiguousAtomicConstraintsDiagnostic(), recordConversion(), RequireCompleteEnumDecl(), SubstituteExplicitTemplateArguments(), and tryToRecoverWithCall().
| bool Sema::IsSimplyAccessible | ( | NamedDecl * | Decl, |
| 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.
| Target | the declaration to check if it can be accessed |
| NamingClass | the class in which the lookup was started. |
| BaseType | type of the left side of member access expression. BaseType and NamingClass are used for C++ access control. Depending on the lookup case, they should be set to the following:
|
Definition at line 1923 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, clang::ObjCIvarDecl::Public, and clang::Target.
Tests whether Ty is an instance of std::initializer_list and, if it is and Element is not NULL, assigns the element type to Element.
Definition at line 12301 of file SemaDeclCXX.cpp.
References clang::CPlusPlus, getLangOpts(), isStdClassTemplate(), and StdInitializerList.
Referenced by CompareImplicitConversionSequences(), DeduceFromInitializerList(), diagnoseListInit(), isInitListConstructor(), clang::InitializationSequence::Perform(), TryInitializerListConstruction(), TryListConversion(), and TryListInitialization().
| bool Sema::isStdTypeIdentity | ( | QualType | Ty, |
| QualType * | TypeArgument, | ||
| const Decl ** | MalformedDecl = nullptr ) |
Tests whether Ty is an instance of std::type_identity and, if it is and TypeArgument is not NULL, assigns the element type to Element.
If MalformedDecl is not null, and type_identity was ruled out due to being incorrectly structured despite having the correct name, the faulty Decl will be assigned to MalformedDecl.
Definition at line 12312 of file SemaDeclCXX.cpp.
References clang::CPlusPlus, getLangOpts(), isStdClassTemplate(), and StdTypeIdentity.
Referenced by IsPotentiallyTypeAwareOperatorNewOrDelete(), and resolveAllocationOverload().
Definition at line 170 of file SemaInit.cpp.
References Context, clang::Init, and SIF_None.
Referenced by TryListConversion().
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 4488 of file SemaExprCXX.cpp.
References clang::Binary, Context, clang::Type::getAs(), clang::Type::getPointeeType(), clang::Expr::IgnoreParens(), clang::Ordinary, clang::Unevaluated, clang::UTF16, clang::UTF32, clang::UTF8, and clang::Wide.
Referenced by DiagnoseAssignmentResult(), and IsStandardConversion().
| 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 675 of file SemaDecl.cpp.
References clang::Class, clang::Enum, clang::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.
| TemplateNameKind Sema::isTemplateName | ( | Scope * | S, |
| CXXScopeSpec & | SS, | ||
| bool | hasTemplateKeyword, | ||
| const UnqualifiedId & | Name, | ||
| ParsedType | ObjectType, | ||
| bool | EnteringContext, | ||
| TemplateTy & | Template, | ||
| bool & | MemberOfUnknownSpecialization, | ||
| bool | Disambiguation = false ) |
Definition at line 178 of file SemaTemplate.cpp.
References clang::LookupResult::begin(), clang::cast(), Context, clang::CPlusPlus, clang::SemaBase::Diag(), clang::LookupResult::empty(), clang::LookupResult::end(), FilterAcceptableTemplateNames(), FoundNothing, clang::OpaquePtr< PtrTy >::get(), getAsTemplateNameDecl(), clang::UnqualifiedId::getBeginLoc(), clang::UnqualifiedId::getKind(), getLangOpts(), clang::CXXScopeSpec::getScopeRep(), clang::UsingShadowDecl::getTargetDecl(), clang::Scope::getTemplateParamParent(), clang::UnqualifiedId::Identifier, clang::IK_Identifier, clang::IK_LiteralOperatorId, clang::IK_OperatorFunctionId, clang::isa(), clang::LookupResult::isAmbiguous(), clang::CXXScopeSpec::isInvalid(), clang::isPackProducingBuiltinTemplateName(), LookupOrdinaryName, LookupTemplateName(), clang::OpaquePtr< TemplateName >::make(), None, clang::UnqualifiedId::OFI::Operator, clang::UnqualifiedId::OperatorFunctionId, clang::LookupResult::suppressDiagnostics(), clang::Template, clang::TemplateName, clang::TNK_Concept_template, clang::TNK_Function_template, clang::TNK_Non_template, clang::TNK_Type_template, clang::TNK_Undeclared_template, clang::TNK_Var_template, and clang::LookupResult::wasNotFoundInCurrentInstantiation().
Referenced by ActOnTemplateName(), DiagnoseUnknownTypeName(), and getTypeName().
| bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs | ( | TemplateParameterList * | PParam, |
| TemplateDecl * | PArg, | ||
| TemplateDecl * | AArg, | ||
| const DefaultArguments & | DefaultArgs, | ||
| SourceLocation | ArgLoc, | ||
| bool | PartialOrdering, | ||
| bool * | StrictPackMatch ) |
Definition at line 6483 of file SemaTemplateDeduction.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::AlreadyDiagnosed, ArgumentToParameter, Both, CheckTemplateArgumentList(), clang::ConstraintsNotSatisfied, Context, clang::CUDATargetMismatch, clang::DeducedMismatch, clang::DeducedMismatchNested, DeduceTemplateArguments(), clang::SemaBase::Diag(), clang::sema::TemplateDeductionInfo::FirstArg, clang::getAsNamedDecl(), clang::TemplateParameterList::getDepth(), clang::TemplateParameterList::getInjectedTemplateArgs(), clang::TemplateArgument::getKind(), clang::TemplateParameterList::getLAngleLoc(), clang::Decl::getLocation(), clang::sema::TemplateDeductionInfo::getLocation(), clang::TemplateParameterList::getParam(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateParameterList::getTemplateLoc(), clang::TemplateDecl::getTemplateParameters(), getTrivialTemplateArgumentLoc(), clang::sema::TemplateDeductionInfo::hasStrictPackMatch(), clang::Incomplete, clang::IncompletePack, clang::Inconsistent, clang::InstantiationDepth, clang::Invalid, clang::InvalidExplicitArguments, clang::Sema::InstantiatingTemplate::isInvalid(), clang::Decl::isInvalidDecl(), clang::TemplateArgument::isPackExpansion(), clang::MiscellaneousDeductionFailure, clang::NonDeducedMismatch, clang::NonDependentConversionFailure, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::sema::TemplateDeductionInfo::Param, clang::PartialOrdering, runWithSufficientStackSpace(), clang::sema::TemplateDeductionInfo::SecondArg, clang::TemplateParameterList::size(), clang::Sema::CheckTemplateArgumentInfo::StrictPackMatch, clang::SubstitutionFailure, clang::Success, clang::Sema::CheckTemplateArgumentInfo::SugaredConverted, clang::TooFewArguments, clang::TooManyArguments, and clang::Underqualified.
Referenced by CheckTemplateTemplateArgument().
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 1487 of file SemaExprCXX.cpp.
References clang::Class, and CXXThisTypeOverride.
Referenced by ActOnStartCXXMemberReference(), and LookupMemberExprInRecord().
| bool Sema::isUnavailableAlignedAllocationFunction | ( | const FunctionDecl & | FD | ) | const |
Determine whether FD is an aligned allocation or deallocation function that is unavailable.
Definition at line 2109 of file SemaExprCXX.cpp.
References getLangOpts(), clang::FunctionDecl::isDefined(), and clang::FunctionDecl::isReplaceableGlobalAllocationFunction().
Referenced by CanUseDecl(), and diagnoseUnavailableAlignedAllocation().
|
inline |
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
Definition at line 8199 of file Sema.h.
References currentEvaluationContext(), and clang::Sema::ExpressionEvaluationContextRecord::isUnevaluated().
Referenced by ActOnIfStmt(), BuildBuiltinOffsetOf(), BuildCXXTypeId(), BuildDeclarationNameExpr(), BuildDeclRefExpr(), CheckAddressOfOperand(), CheckCXXThisCapture(), CheckForImmediateInvocation(), CheckIdentityFieldAssignment(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckIndirectionOperand(), CheckPointerConversion(), checkSuspensionContext(), CheckTCBEnforcement(), checkTypeSupport(), CheckVirtualDtorCall(), CreateBuiltinUnaryOp(), DefaultArgumentPromotion(), DiagnoseSelfAssignment(), DoMarkVarDeclReferenced(), getNonOdrUseReasonInCurrentContext(), inferARCLifetimeForPointee(), clang::InitializationSequence::InitializeFrom(), LookupMemberExpr(), MarkDeclRefReferenced(), MarkVTableUsed(), PerformConstructorInitialization(), SubstituteExplicitTemplateArguments(), TransformToPotentiallyEvaluated(), TransformToPotentiallyEvaluated(), TryConstructorInitialization(), and TryOrBuildParenListInitialization().
| 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 424 of file SemaTemplateVariadic.cpp.
References FunctionScopes, and clang::isa().
| bool Sema::isUsualDeallocationFunction | ( | const CXXMethodDecl * | FD | ) |
Definition at line 1689 of file SemaExprCXX.cpp.
References clang::SemaCUDA::CFP_HostDevice, clang::SemaCUDA::CFP_WrongSide, CUDA(), getCurFunctionDecl(), getLangOpts(), clang::FunctionDecl::getNumParams(), clang::SemaCUDA::IdentifyPreference(), clang::Method, and clang::Result.
Referenced by CheckOperatorDeleteDeclaration(), and isNonPlacementDeallocationFunction().
Determine if type T is a valid subject for a nonnull and similar attributes.
Dependent types are considered valid so they can be checked during instantiation time. 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 1245 of file SemaDeclAttr.cpp.
References clang::RecordDecl::fields(), clang::RecordDecl::getDefinitionOrSelf(), clang::Decl::hasAttr(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), and clang::T.
Referenced by AddAllocAlignAttr(), AddAssumeAlignedAttr(), attrNonNullArgCheck(), CheckNonNullArguments(), handleNoEscapeAttr(), and handleNonNullAttr().
| llvm::Error Sema::isValidSectionSpecifier | ( | StringRef | Str | ) |
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 3327 of file SemaDeclAttr.cpp.
References Context.
Referenced by ActOnPragmaClangSection(), checkCodeSegName(), checkSectionName(), and handlePatchableFunctionEntryAttr().
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 7710 of file SemaExpr.cpp.
References clang::VectorType::getVectorKind(), clang::Type::isSVESizelessBuiltinType(), clang::Type::isVectorType(), and clang::SveFixedLengthData.
| VarArgKind Sema::isValidVarArgType | ( | const QualType & | Ty | ) |
Determine the degree of POD-ness for an expression.
Incomplete types are considered POD, since this check can be performed when we're in an unevaluated context.
Definition at line 953 of file SemaExpr.cpp.
References Context, clang::CPlusPlus11, clang::QualType::DK_nontrivial_c_struct, clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), getLangOpts(), HLSL(), clang::Invalid, clang::QualType::isCXX98PODType(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::Type::isIncompleteType(), clang::Type::isObjCLifetimeType(), clang::Type::isObjCObjectType(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), clang::MSVCUndefined, clang::Undefined, clang::Valid, and clang::ValidInCXX11.
Referenced by checkVariadicArgument(), and DefaultVariadicArgumentPromotion().
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 20693 of file SemaDecl.cpp.
References clang::EnumDecl::enumerators(), FlagBitsCache, clang::EnumDecl::isClosedFlag(), and clang::TagDecl::isCompleteDefinition().
Referenced by ActOnEnumBody(), DiagnoseAssignmentEnum(), and ShouldDiagnoseSwitchCaseNotInEnum().
Determine whether a declaration is visible to name lookup.
Definition at line 15495 of file Sema.h.
References clang::Decl::isUnconditionallyVisible(), and Visible.
Referenced by ActOnNamespaceAliasDef(), ArgumentDependentLookup(), argumentDependentLookup(), CheckOverload(), CheckUsingShadowDecl(), filterNonConflictingPreviousTypedefDecls(), hasVisibleDeclaration(), hasVisibleDeclarationSlow(), isAcceptable(), isPreferredLookupResult(), LookupQualifiedNameInUsingDirectives(), MergeCXXFunctionDecl(), and shouldAddReversedEqEq().
| NamedDecl * Sema::LazilyCreateBuiltin | ( | IdentifierInfo * | II, |
| unsigned | ID, | ||
| Scope * | S, | ||
| bool | ForRedeclaration, | ||
| SourceLocation | Loc ) |
LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope.
lazily create a decl for it. ForRedeclaration is true if we're creating this built-in in anticipation of redeclaring the built-in.
Definition at line 2411 of file SemaDecl.cpp.
References Context, CreateBuiltin(), CurContext, clang::SemaBase::Diag(), clang::Error, clang::ASTContext::GE_Missing_setjmp, clang::ASTContext::GE_Missing_type, getHeaderName(), clang::QualType::isNull(), LangOpts, LookupNecessaryTypesForBuiltin(), New, PushOnScopeChains(), RegisterLocallyScopedExternCDecl(), and TUScope.
Referenced by LookupBuiltin().
| void Sema::LazyProcessLifetimeCaptureByParams | ( | FunctionDecl * | FD | ) |
Definition at line 4282 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::TypeLoc::getAsAdjusted(), clang::AttributedTypeLoc::getAttrAs(), clang::AttributedTypeLoc::getModifiedLoc(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::hasImplicitObjectParameter(), and clang::FunctionDecl::parameters().
Referenced by AddKnownFunctionAttributes().
| clang::Sema::LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION | ( | ) |
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.
| void Sema::LoadExternalVTableUses | ( | ) |
Load any externally-stored vtable uses.
Definition at line 18979 of file SemaDeclCXX.cpp.
References ExternalSource, VTablesUsed, and VTableUses.
Referenced by DefineUsedVTables(), and MarkVTableUsed().
| void Sema::LoadExternalWeakUndeclaredIdentifiers | ( | ) |
Load weak undeclared identifiers from the external source.
Definition at line 1061 of file Sema.cpp.
References ExternalSource, and WeakUndeclaredIdentifiers.
Referenced by ActOnEndOfTranslationUnit(), and ProcessPragmaWeak().
| void Sema::LookupBinOp | ( | Scope * | S, |
| SourceLocation | OpLoc, | ||
| BinaryOperatorKind | Opc, | ||
| UnresolvedSetImpl & | Functions ) |
Definition at line 15728 of file SemaExpr.cpp.
References clang::CPlusPlus20, getLangOpts(), clang::BinaryOperator::getOverloadedOperator(), clang::getRewrittenOverloadedOperator(), LookupOverloadedOperatorName(), and clang::OO_None.
Referenced by ActOnCXXFoldExpr(), BuildOverloadedBinOp(), and HasNonDeletedDefaultedEqualityComparison().
| bool Sema::LookupBuiltin | ( | LookupResult & | R | ) |
Lookup a builtin function, when name lookup would otherwise fail.
Definition at line 921 of file SemaLookup.cpp.
References clang::LookupResult::addDecl(), Context, clang::CPlusPlus, clang::CreateRISCVIntrinsicManager(), clang::DeclarationName::getAsIdentifierInfo(), clang::IdentifierInfo::getBuiltinID(), getLangOpts(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::IdentifierInfo::getName(), clang::LookupResult::getNameLoc(), HLSL(), InsertOCLBuiltinDeclarationsFromTable(), clang::SemaRISCV::IntrinsicManager, clang::LookupResult::isForRedeclaration(), LazilyCreateBuiltin(), LookupOrdinaryName, LookupRedeclarationWithLinkage, OpenCL(), PP, RISCV(), and TUScope.
Referenced by ClassifyName(), LookupDirect(), and LookupName().
| DeclContext::lookup_result Sema::LookupConstructors | ( | CXXRecordDecl * | Class | ) |
Look up the constructors for the given class.
Definition at line 3631 of file SemaLookup.cpp.
References CanDeclareSpecialMemberFunction(), clang::Class, Context, runWithSufficientStackSpace(), and clang::T.
Referenced by BuildUsingDeclaration(), CheckCXX98CompatAccessibleCopy(), CheckNonDependentConversions(), CopyObject(), DeclareImplicitDeductionGuides(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), TryConstructorInitialization(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
| CXXMethodDecl * Sema::LookupCopyingAssignment | ( | CXXRecordDecl * | Class, |
| unsigned | Quals, | ||
| bool | RValueThis, | ||
| unsigned | ThisQuals ) |
Look up the copying assignment operator for the given class.
Definition at line 3649 of file SemaLookup.cpp.
References clang::Class, clang::Qualifiers::Const, clang::CopyAssignment, LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.
| CXXConstructorDecl * Sema::LookupCopyingConstructor | ( | CXXRecordDecl * | Class, |
| unsigned | Quals ) |
Look up the copying constructor for the given class.
Definition at line 3611 of file SemaLookup.cpp.
References clang::Class, clang::Qualifiers::Const, clang::CopyConstructor, LookupSpecialMember(), clang::Result, and clang::Qualifiers::Volatile.
Referenced by CheckCXXThrowOperand().
| 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 2007 of file SemaCoroutine.cpp.
References clang::SemaBase::Diag(), clang::Found, getStdNamespace(), LookupOrdinaryName, LookupQualifiedName(), PP, clang::Result, and StdCoroutineTraitsCache.
Referenced by lookupPromiseType().
| CXXConstructorDecl * Sema::LookupDefaultConstructor | ( | CXXRecordDecl * | Class | ) |
Look up the default constructor for the given class.
Definition at line 3603 of file SemaLookup.cpp.
References clang::Class, clang::DefaultConstructor, LookupSpecialMember(), and clang::Result.
Referenced by TryConstructorInitialization(), TryListInitialization(), and TryValueInitialization().
| CXXDestructorDecl * Sema::LookupDestructor | ( | CXXRecordDecl * | Class | ) |
Look for the destructor of the given class.
During semantic analysis, this routine should be used in lieu of CXXRecordDecl::getDestructor().
Definition at line 3678 of file SemaLookup.cpp.
References clang::Class, clang::Destructor, and LookupSpecialMember().
Referenced by ActOnCXXDelete(), ActOnDecltypeExpression(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), CheckCXXThrowOperand(), checkDestructorReference(), CheckParmsForFunctionDef(), FinalizeVarWithDestructor(), LookupDestructorIfRelevant(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), and SetDelegatingInitializer().
| LabelDecl * Sema::LookupExistingLabel | ( | IdentifierInfo * | II, |
| SourceLocation | IdentLoc ) |
Perform a name lookup for a label with the specified name; this does not create a new label if the lookup fails.
Definition at line 4456 of file SemaLookup.cpp.
References clang::cast(), CurContext, clang::Decl::getDeclContext(), LookupLabel, LookupSingleName(), and NotForRedeclaration.
Referenced by LookupOrCreateLabel().
| NamedDecl * Sema::lookupExternCFunctionOrVariable | ( | IdentifierInfo * | IdentId, |
| SourceLocation | NameLoc, | ||
| Scope * | curScope ) |
Definition at line 1330 of file SemaAttr.cpp.
References clang::CPlusPlus, getLangOpts(), clang::isa(), LookupName(), LookupOrdinaryName, and clang::Result.
Referenced by ActOnPragmaExport().
| bool Sema::LookupInlineAsmField | ( | StringRef | Base, |
| StringRef | Member, | ||
| unsigned & | Offset, | ||
| SourceLocation | AsmLoc ) |
Definition at line 863 of file SemaStmtAsm.cpp.
References Context, clang::CPlusPlus, clang::Type::getAs(), clang::Type::getAsCanonical(), getCurrentThisType(), getCurScope(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::Type::getPointeeType(), clang::LookupResult::isSingleResult(), LookupMemberName, LookupName(), LookupOrdinaryName, LookupQualifiedName(), MarkAnyDeclReferenced(), clang::Member, RequireCompleteType(), and clang::Result.
| ExprResult Sema::LookupInlineAsmIdentifier | ( | CXXScopeSpec & | SS, |
| SourceLocation | TemplateKWLoc, | ||
| UnqualifiedId & | Id, | ||
| bool | IsUnevaluatedContext ) |
Definition at line 816 of file SemaStmtAsm.cpp.
References ActOnIdExpression(), CheckNakedParmReference(), CheckPlaceholderExpr(), clang::ExprError(), getCurScope(), PopExpressionEvaluationContext(), PushExpressionEvaluationContext(), RequireCompleteExprType(), clang::Result, ReuseLambdaContextDecl, clang::T, and UnevaluatedAbstract.
| ExprResult Sema::LookupInlineAsmVarDeclField | ( | Expr * | RefExpr, |
| StringRef | Member, | ||
| SourceLocation | AsmLoc ) |
Definition at line 934 of file SemaStmtAsm.cpp.
References BuildMemberReferenceExpr(), Context, clang::CXXDependentScopeMemberExpr::Create(), clang::LookupResult::getFoundDecl(), clang::Expr::getType(), LookupMemberName, LookupQualifiedName(), clang::Member, clang::Result, clang::DeclarationNameInfo::setLoc(), clang::DeclarationNameInfo::setName(), and clang::T.
| bool Sema::LookupInSuper | ( | LookupResult & | R, |
| CXXRecordDecl * | Class ) |
Perform qualified name lookup into all base classes of the given class.
| R | captures both the lookup criteria and any lookup results found. |
| Class | The context in which qualified name lookup will search. Name lookup will search in all base classes merging the results. |
Definition at line 2765 of file SemaLookup.cpp.
References clang::LookupResult::addDecl(), clang::Class, Context, clang::LookupResult::empty(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), LookupQualifiedName(), clang::CXXRecordDecl::MergeAccess(), clang::LookupResult::resolveKind(), clang::Result, and clang::LookupResult::setNamingClass().
Referenced by LookupParsedName(), and LookupQualifiedName().
| Sema::LiteralOperatorLookupResult Sema::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].
Normal overload resolution is not used to select which literal operator to call for a user-defined literal. Look up the provided literal operator name, and filter the results to the appropriate set for the given argument types.
Definition at line 3686 of file SemaLookup.cpp.
References clang::Ambiguous, CheckTemplateArgument(), Context, CTAK_Specified, clang::SemaBase::Diag(), clang::LookupResult::Filter::done(), clang::LookupResult::Filter::erase(), clang::Decl::getAsFunction(), clang::LookupResult::getLookupName(), clang::LookupResult::getNameLoc(), clang::TemplateParameterList::getParam(), clang::LookupResult::getResultKind(), clang::NamedDecl::getUnderlyingDecl(), clang::Sema::SFINAETrap::hasErrorOccurred(), clang::LookupResult::Filter::hasNext(), clang::Decl::isInvalidDecl(), clang::Decl::isTemplateParameterPack(), LOLR_Cooked, LOLR_Error, LOLR_ErrorNoDiagnostic, LOLR_Raw, LOLR_StringTemplatePack, LOLR_Template, LookupName(), clang::LookupResult::makeFilter(), clang::LookupResult::Filter::next(), NoteOverloadCandidate(), clang::LookupResult::Filter::restart(), and clang::TemplateParameterList::size().
Referenced by ActOnNumericConstant(), ActOnStringLiteral(), and BuildCookedLiteralOperatorCall().
| CXXMethodDecl * Sema::LookupMovingAssignment | ( | CXXRecordDecl * | Class, |
| unsigned | Quals, | ||
| bool | RValueThis, | ||
| unsigned | ThisQuals ) |
Look up the moving assignment operator for the given class.
Definition at line 3664 of file SemaLookup.cpp.
References clang::Class, clang::Qualifiers::Const, LookupSpecialMember(), clang::MoveAssignment, clang::Result, and clang::Qualifiers::Volatile.
| CXXConstructorDecl * Sema::LookupMovingConstructor | ( | CXXRecordDecl * | Class, |
| unsigned | Quals ) |
Look up the moving constructor for the given class.
Definition at line 3622 of file SemaLookup.cpp.
References clang::Class, clang::Qualifiers::Const, LookupSpecialMember(), clang::MoveConstructor, clang::Result, and clang::Qualifiers::Volatile.
| 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
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.
| S | The scope from which unqualified name lookup will begin. If the lookup criteria permits, name lookup may also search in the parent scopes. | |
| [in,out] | R | Specifies the lookup to perform (e.g., the name to look up and the lookup kind), and is updated with the results of lookup including zero or more declarations and possibly additional information used to diagnose ambiguities. |
true if lookup succeeded and false otherwise. Definition at line 2214 of file SemaLookup.cpp.
References clang::LookupResult::addDecl(), clang::CPlusPlus, clang::Scope::DeclScope, clang::DeclContext::Equals(), ExternalSource, clang::LookupResult::getAcceptableDecl(), clang::Scope::getEntity(), clang::Scope::getFlags(), getLangOpts(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::Scope::getParent(), clang::DeclContext::getRedeclContext(), IdResolver, clang::isa(), clang::Scope::isDeclScope(), isNamespaceOrTranslationUnitScope(), clang::DeclContext::isTransparentContext(), LookupBuiltin(), LookupObjCImplicitSelfParam, LookupRedeclarationWithLinkage, clang::LookupResult::resolveKind(), and clang::LookupResult::setShadowed().
Referenced by ActOnAliasDeclaration(), ActOnDecompositionDeclarator(), ActOnEnumConstant(), ActOnFinishConceptDefinition(), ActOnFriendFunctionDecl(), ActOnIdExpression(), ActOnLambdaExpressionAfterIntroducer(), ActOnNamespaceAliasDef(), ActOnParamDeclarator(), ActOnPragmaDump(), ActOnPragmaUnused(), ActOnSizeofParameterPackExpr(), ActOnStartConceptDefinition(), ActOnTag(), BuildBuiltinCallExpr(), BuildCXXNestedNameSpecifier(), buildMemcpyForAssignmentOp(), BuildOperatorCoawaitLookupExpr(), BuildUsingDeclaration(), BuildUsingEnumDeclaration(), CheckAnonMemberRedeclaration(), CheckClassTemplate(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), CheckShadow(), CheckTypenameType(), DiagnoseInvalidRedeclaration(), emitReplacement(), FindFirstQualifierInScope(), getDestructorName(), getOpenCLEnumType(), getOpenCLTypedefType(), getTypeName(), HandleDeclarator(), HandleField(), HandleMSProperty(), isTagName(), isValidInteropVariable(), lookupExternCFunctionOrVariable(), LookupInlineAsmField(), LookupLiteralOperator(), clang::LookupNamed(), clang::LookupNamespace(), LookupOverloadedOperatorName(), LookupParsedName(), LookupPredefedObjCSuperType(), LookupSingleName(), LookupTemplateName(), markUsedForAliasOrIfunc(), ProcessAPINotes(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().
Definition at line 1007 of file SemaLookup.cpp.
References LookupPredefedObjCSuperType().
Referenced by ActOnFunctionDeclarator(), and LazilyCreateBuiltin().
| LabelDecl * Sema::LookupOrCreateLabel | ( | IdentifierInfo * | II, |
| SourceLocation | IdentLoc, | ||
| 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 4466 of file SemaLookup.cpp.
References clang::cast(), Context, clang::LabelDecl::Create(), CurContext, clang::Scope::getFnParent(), clang::SourceLocation::isValid(), LookupExistingLabel(), and PushOnScopeChains().
Referenced by GetOrCreateMSAsmLabel().
| void Sema::LookupOverloadedBinOp | ( | OverloadCandidateSet & | CandidateSet, |
| OverloadedOperatorKind | Op, | ||
| const UnresolvedSetImpl & | Fns, | ||
| ArrayRef< Expr * > | Args, | ||
| bool | RequiresADL = true ) |
Perform lookup for an overloaded binary operator.
Definition at line 15224 of file SemaOverload.cpp.
References AddArgumentDependentLookupCandidates(), AddBuiltinOperatorCandidates(), AddMemberOperatorCandidates(), AddNonMemberOperatorCandidates(), clang::OverloadCandidateSet::OperatorRewriteInfo::AllowRewrittenCandidates, clang::OverloadCandidateSet::OperatorRewriteInfo::allowsReversed(), Context, clang::OverloadCandidateSet::getLocation(), clang::OverloadCandidateSet::getPersistentArgsArray(), clang::OverloadCandidateSet::getRewriteInfo(), clang::getRewrittenOverloadedOperator(), clang::OO_None, and clang::Reversed.
Referenced by CreateOverloadedBinOp().
| void Sema::LookupOverloadedOperatorName | ( | OverloadedOperatorKind | Op, |
| Scope * | S, | ||
| UnresolvedSetImpl & | Functions ) |
Definition at line 3365 of file SemaLookup.cpp.
References clang::UnresolvedSetImpl::append(), clang::LookupResult::begin(), Context, clang::LookupResult::end(), clang::LookupResult::isAmbiguous(), LookupName(), and LookupOperatorName.
Referenced by BuildUnaryOp(), and LookupBinOp().
| bool Sema::LookupParsedName | ( | LookupResult & | R, |
| Scope * | S, | ||
| CXXScopeSpec * | SS, | ||
| QualType | ObjectType, | ||
| 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.
| S | The scope from which unqualified name lookup will begin. |
| SS | An optional C++ scope-specifier, e.g., "::N::M". |
| EnteringContext | Indicates whether we are going to enter the context of the scope-specifier SS (if present). |
Definition at line 2711 of file SemaLookup.cpp.
References clang::Type::castAs(), computeDeclContext(), clang::Type::getAs(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::DeclContext::isDependentContext(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::CXXScopeSpec::isEmpty(), clang::Type::isIncompleteType(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::QualType::isNull(), LookupInSuper(), LookupName(), LookupQualifiedName(), clang::NestedNameSpecifier::MicrosoftSuper, RequireCompleteDeclContext(), clang::LookupResult::setContextRange(), and clang::LookupResult::setNotFoundInCurrentInstantiation().
Referenced by ActOnExplicitInstantiation(), ActOnIdExpression(), ActOnNamespaceAliasDef(), ActOnUsingDirective(), buildDeclareReductionRef(), BuildMemInitializer(), BuildQualifiedDeclarationNameExpr(), buildUserDefinedMapperRef(), CheckMicrosoftIfExistsSymbol(), CheckTemplateTypeArgument(), ClassifyName(), hasUserDefinedMapper(), isTagTypeWithMissingTag(), LookupMemberExprInRecord(), and LookupPotentialTypoResult().
| 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.
| R | captures both the lookup criteria and any lookup results found. |
| LookupCtx | The context in which qualified name lookup will search. If the lookup criteria permits, name lookup may also search in the parent contexts or (for C++ classes) base classes. |
| InUnqualifiedLookup | true if this is qualified name lookup that occurs as part of unqualified name lookup. |
Definition at line 2431 of file SemaLookup.cpp.
References clang::LookupResult::addDecl(), clang::AS_none, clang::CXXBasePathElement::Base, clang::CXXBasePaths::begin(), clang::DeclContextLookupResult::begin(), Context, clang::DeclarationName::CXXConversionFunctionName, clang::CXXBasePath::Decls, clang::CXXBasePaths::end(), clang::DeclListNode::iterator::end(), clang::Found, clang::CXXBasePaths::front(), clang::LookupResult::getAcceptableDecl(), getAsTemplateNameDecl(), clang::Decl::getCanonicalDecl(), clang::DeclarationName::getCXXNameType(), clang::CXXRecordDecl::getDefinition(), clang::LookupResult::getIdentifierNamespace(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupName(), clang::DeclarationName::getNameKind(), clang::CXXBaseSpecifier::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::DeclContext::isFileContext(), clang::LookupResult::isForRedeclaration(), clang::Decl::isInIdentifierNamespace(), clang::QualType::isNull(), clang::LookupResult::isTemplateNameLookup(), clang::DeclContext::lookup(), LookupDirect(), clang::CXXRecordDecl::lookupInBases(), LookupLabel, LookupNamespaceName, LookupObjCProtocolName, LookupOperatorName, LookupQualifiedNameInUsingDirectives(), clang::CXXRecordDecl::MergeAccess(), Next, clang::LookupResult::resolveKind(), clang::Result, clang::LookupResult::setAmbiguousBaseSubobjects(), clang::LookupResult::setAmbiguousBaseSubobjectTypes(), clang::LookupResult::setNamingClass(), clang::LookupResult::setNotFoundInCurrentInstantiation(), clang::CXXBasePaths::setOrigin(), clang::DeclContext::setUseQualifiedLookup(), clang::DeclContext::shouldUseQualifiedLookup(), and clang::CXXBasePathElement::SubobjectNumber.
Referenced by ActOnCXXTypeid(), ActOnFriendFunctionDecl(), ActOnStartNamespaceDef(), ActOnTag(), AddMemberOperatorCandidates(), BuildBuiltinOffsetOf(), BuildCallToObjectOfClassType(), buildCoroutineHandle(), BuildCXXNestedNameSpecifier(), buildDeclareReductionRef(), BuildNonArrayForRange(), BuildOverloadedArrowExpr(), buildSingleCopyAssignRecursively(), buildStdNoThrowDeclRef(), BuildUsingDeclaration(), BuildUsingEnumDeclaration(), BuildVariableInstantiation(), CheckClassTemplate(), checkTupleLikeDecomposition(), CheckTypenameType(), CXXRecordMembersNamed(), DeduceTemplateSpecializationFromInitializer(), DiagnoseEmptyLookup(), DiagnoseInvalidRedeclaration(), DiagnoseTwoPhaseLookup(), DiagnoseTypeAwareAllocators(), doesUsualArrayDeleteWantSize(), emitReplacement(), EvaluateAsStringImpl(), FindAllocationFunctions(), FindDeallocationFunction(), getDestructorName(), getStdTrait(), getTypeName(), HandleDeclarator(), clang::HLSLExternalSemaSource::InitializeSema(), isDeclaratorFunctionLike(), lookupCoroutineHandleType(), lookupCoroutineTraits(), LookupGlobalDeallocationFunctions(), LookupInlineAsmField(), LookupInlineAsmVarDeclField(), LookupInSuper(), lookupMember(), lookupMember(), clang::LookupNamed(), clang::LookupNamespace(), LookupParsedName(), LookupPotentialTypoResult(), lookupPromiseType(), LookupQualifiedName(), LookupStdClassTemplate(), LookupStdSourceLocationImpl(), LookupTemplateName(), resolveAllocationOverloadInterior(), resolveBuiltinNewDeleteOverload(), and shouldAddReversedEqEq().
| 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.
| R | captures both the lookup criteria and any lookup results found. |
| LookupCtx | The context in which qualified name lookup will search. |
| SS | An optional C++ scope-specifier. |
Definition at line 2703 of file SemaLookup.cpp.
References clang::CXXScopeSpec::getScopeRep(), LookupInSuper(), LookupQualifiedName(), and clang::NestedNameSpecifier::MicrosoftSuper.
| NamedDecl * Sema::LookupSingleName | ( | Scope * | S, |
| DeclarationName | Name, | ||
| SourceLocation | Loc, | ||
| LookupNameKind | NameKind, | ||
| RedeclarationKind | Redecl = RedeclarationKind::NotForRedeclaration ) |
Look up a name, looking for a single declaration.
Return null if the results were absent, ambiguous, or overloaded.
It is preferable to use the elaborated form and explicitly handle ambiguity and overloaded.
Definition at line 3356 of file SemaLookup.cpp.
References clang::LookupResult::getAsSingle(), and LookupName().
Referenced by ActOnEndOfTranslationUnit(), ActOnExceptionDeclarator(), ActOnPragmaMSAllocText(), ActOnPragmaRedefineExtname(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), CreateBuiltinBinOp(), createFriendTagNNSFixIt(), DefaultLvalueConversion(), DiagnoseDirectIsaAccess(), findOMPAllocatorHandleT(), isMethodDeclaredInRootProtocol(), LookupExistingLabel(), LookupObjCInterfaceDeclForLiteral(), maybeDiagnoseTemplateParameterShadow(), and shouldSkipAnonEnumBody().
| Sema::SpecialMemberOverloadResult Sema::LookupSpecialMember | ( | CXXRecordDecl * | D, |
| CXXSpecialMemberKind | SM, | ||
| bool | ConstArg, | ||
| bool | VolatileArg, | ||
| bool | RValueThis, | ||
| bool | ConstThis, | ||
| bool | VolatileThis ) |
Definition at line 3382 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::cast(), clang::Expr::Classify(), Context, clang::CopyAssignment, clang::CopyConstructor, clang::CPlusPlus11, clang::OverloadCandidateSet::CSK_Normal, clang::DefaultConstructor, clang::Destructor, clang::DeclContextLookupResult::empty(), clang::DeclContextLookupResult::end(), clang::getConstructorInfo(), clang::DeclAccessPair::getDecl(), clang::CXXRecordDecl::getDefinition(), clang::CXXRecordDecl::getDestructor(), getLangOpts(), clang::Decl::getLocation(), clang::NamedDecl::getUnderlyingDecl(), clang::isa(), clang::FunctionDecl::isDeleted(), clang::DeclContext::lookup(), clang::DeclAccessPair::make(), clang::MoveAssignment, clang::MoveConstructor, 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(), lookupCallFromSpecialMember(), LookupCopyingAssignment(), LookupCopyingConstructor(), LookupDefaultConstructor(), LookupDestructor(), LookupMovingAssignment(), and LookupMovingConstructor().
| bool Sema::LookupTemplateName | ( | LookupResult & | R, |
| Scope * | S, | ||
| CXXScopeSpec & | SS, | ||
| QualType | ObjectType, | ||
| bool | EnteringContext, | ||
| RequiredTemplateKind | RequiredTemplate = SourceLocation(), | ||
| AssumedTemplateKind * | ATK = nullptr, | ||
| bool | AllowTypoCorrection = true ) |
Definition at line 387 of file SemaTemplate.cpp.
References clang::Type::castAs(), clang::LookupResult::clear(), computeDeclContext(), CorrectTypo(), clang::CPlusPlus11, clang::SemaBase::Diag(), diagnoseTypo(), clang::LookupResult::empty(), clang::ErrorRecovery, FilterAcceptableTemplateNames(), clang::Found, FoundFunctions, FoundNothing, clang::Type::getAs(), clang::DeclarationName::getAsString(), getAsTemplateNameDecl(), clang::Decl::getCanonicalDecl(), clang::LookupResult::getFoundDecl(), getLangOpts(), clang::Decl::getLocation(), clang::CXXScopeSpec::getRange(), clang::Sema::RequiredTemplateKind::getTemplateKeywordLoc(), clang::NamedDecl::getUnderlyingDecl(), clang::Sema::RequiredTemplateKind::hasTemplateKeyword(), clang::isa(), clang::LookupResult::isAmbiguous(), isDependentScopeSpecifier(), clang::Type::isDependentType(), clang::CXXScopeSpec::isEmpty(), clang::Type::isIncompleteType(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::isNotEmpty(), clang::QualType::isNull(), clang::Type::isObjCObjectOrInterfaceType(), clang::LookupResult::isSingleResult(), clang::Type::isVectorType(), LookupName(), LookupOrdinaryName, LookupQualifiedName(), None, clang::nullptr, clang::SemaBase::PDiag(), RequireCompleteDeclContext(), clang::LookupResult::setTemplateNameLookup(), clang::CorrectionCandidateCallback::WantCXXNamedCasts, clang::CorrectionCandidateCallback::WantExpressionKeywords, clang::CorrectionCandidateCallback::WantRemainingKeywords, and clang::CorrectionCandidateCallback::WantTypeSpecifiers.
Referenced by ActOnIdExpression(), ActOnTemplateName(), BuildQualifiedTemplateIdExpr(), DiagnoseEmptyLookup(), isDeductionGuideName(), isTemplateName(), and LookupMemberExprInRecord().
| void Sema::LookupVisibleDecls | ( | DeclContext * | Ctx, |
| LookupNameKind | Kind, | ||
| VisibleDeclConsumer & | Consumer, | ||
| bool | IncludeGlobalScope = true, | ||
| bool | IncludeDependentBases = false, | ||
| bool | LoadExternal = true ) |
Definition at line 4448 of file SemaLookup.cpp.
References Consumer.
| void Sema::LookupVisibleDecls | ( | Scope * | S, |
| LookupNameKind | Kind, | ||
| VisibleDeclConsumer & | Consumer, | ||
| bool | IncludeGlobalScope = true, | ||
| bool | LoadExternal = true ) |
Definition at line 4440 of file SemaLookup.cpp.
References Consumer.
Referenced by AddRecordMembersCompletionResults().
|
inline |
|
inline |
Definition at line 1473 of file Sema.h.
Referenced by handleInterruptAttr().
|
inline |
Definition at line 7809 of file Sema.h.
References ActOnFinishFullExpr(), clang::ActionResult< PtrTy, Compress >::get(), and clang::Expr::getExprLoc().
Referenced by BuildCoreturnStmt(), and buildSingleCopyAssignRecursively().
|
inline |
Definition at line 7802 of file Sema.h.
References clang::Expr::getExprLoc(), and MakeFullExpr().
Referenced by isNonNegativeIntegerValue(), and MakeFullExpr().
|
inline |
Definition at line 7805 of file Sema.h.
References ActOnFinishFullExpr().
| void Sema::makeMergedDefinitionVisible | ( | NamedDecl * | ND | ) |
Make a merged definition of an existing hidden definition ND visible at the specified location.
Definition at line 1557 of file SemaLookup.cpp.
References Context, clang::DeclContextLookupResult::empty(), getCurrentModule(), clang::DeclContext::getRedeclContext(), clang::DeclContext::lookup(), clang::DeclContext::makeDeclVisibleInContext(), makeMergedDefinitionVisible(), and clang::Decl::setVisibleDespiteOwningModule().
Referenced by ActOnClassTemplateSpecialization(), ActOnDuplicateDefinition(), ActOnDuplicateODRHashDefinition(), ActOnTag(), CheckClassTemplate(), CheckForFunctionRedefinition(), CheckRedeclarationModuleOwnership(), checkVarDeclRedefinition(), makeMergedDefinitionVisible(), and MergeTypedefNameDecl().
|
inline |
| 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 630 of file Sema.cpp.
References clang::Decl::addAttr(), Context, CurContext, clang::Decl::hasAttr(), and inTemplateInstantiation().
Referenced by diagnoseObjCARCConversion().
| 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 20597 of file SemaExpr.cpp.
References MarkFunctionReferenced(), MarkVariableReferenced(), and clang::Decl::setReferenced().
Referenced by ActOnSizeofParameterPackExpr(), BuildCXXNestedNameSpecifier(), BuildMemInitializer(), CheckTemplateArgumentAddressOfObjectOrFunction(), checkTypeDeclType(), ClassifyName(), getDestructorName(), LookupInlineAsmField(), and MarkExprReferenced().
| void Sema::MarkAsLateParsedTemplate | ( | FunctionDecl * | FD, |
| Decl * | FnD, | ||
| CachedTokens & | Toks ) |
Definition at line 11605 of file SemaTemplate.cpp.
References getCurFPFeatures(), LateParsedTemplateMap, and clang::FunctionDecl::setLateTemplateParsed().
| void Sema::MarkBaseAndMemberDestructorsReferenced | ( | SourceLocation | Loc, |
| CXXRecordDecl * | Record ) |
MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of its members and bases as referenced.
Definition at line 5924 of file SemaDeclCXX.cpp.
References clang::RecordDecl::fields(), clang::DeclContext::isDependentContext(), clang::TagDecl::isUnion(), MarkBaseDestructorsReferenced(), and MarkFieldDestructorReferenced().
Referenced by ActOnFinishFunctionBody(), and DefineImplicitDestructor().
| void Sema::MarkCaptureUsedInEnclosingContext | ( | ValueDecl * | Capture, |
| SourceLocation | Loc, | ||
| unsigned | CapturingScopeIndex ) |
Definition at line 18938 of file SemaExpr.cpp.
References MarkVarDeclODRUsed().
Referenced by CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures().
| void Sema::MarkDeclarationsReferencedInExpr | ( | Expr * | E, |
| bool | SkipLocalVariables = false, | ||
| ArrayRef< const Expr * > | StopAt = {} ) |
Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced".
| SkipLocalVariables | If true, don't mark local variables as 'referenced'. |
| StopAt | Subexpressions that we shouldn't recurse into. |
Definition at line 20702 of file SemaExpr.cpp.
Referenced by BuildCXXDefaultInitExpr(), and CheckCXXDefaultArgExpr().
| 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 20648 of file SemaExpr.cpp.
References clang::T.
| void Sema::MarkDeclRefReferenced | ( | DeclRefExpr * | E, |
| const Expr * | Base = nullptr ) |
Perform reference-marking and odr-use handling for a DeclRefExpr.
Note, this may change the dependence of the DeclRefExpr, and so needs to be handled with care if the DeclRefExpr is not newly-created.
Definition at line 20544 of file SemaExpr.cpp.
References ExprEvalContexts, clang::DeclRefExpr::getDecl(), getLangOpts(), clang::DeclRefExpr::getLocation(), isCheckingDefaultArgumentOrInitializer(), isConstantEvaluatedContext(), isImmediateFunctionContext(), isUnevaluatedContext(), MarkExprReferenced(), clang::Method, RebuildingImmediateInvocation, and RefsMinusAssignments.
Referenced by BuildDeclRefExpr(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), and CreateFunctionRefExpr().
|
static |
Marks all of the template parameters that will be deduced by a call to the given function template.
Definition at line 7175 of file SemaTemplateDeduction.cpp.
References clang::Function, FunctionTemplate, clang::TemplateParameterList::getDepth(), MarkUsedTemplateParameters(), and clang::TemplateParameterList::size().
|
inline |
Definition at line 12916 of file Sema.h.
References Context, FunctionTemplate, and MarkDeducedTemplateParameters().
Referenced by CheckDeductionGuideTemplate(), clang::CodeCompletionResult::createCodeCompletionStringForDecl(), and MarkDeducedTemplateParameters().
| void Sema::MarkExpressionAsImmediateEscalating | ( | Expr * | E | ) |
Definition at line 17985 of file SemaExpr.cpp.
References clang::Call, clang::CPlusPlus20, ExprEvalContexts, getCurFunction(), getLangOpts(), and clang::Expr::IgnoreImplicit().
Referenced by CheckForImmediateInvocation(), and HandleImmediateInvocations().
| void Sema::MarkFunctionParmPackReferenced | ( | FunctionParmPackExpr * | E | ) |
Perform reference-marking and odr-use handling for a FunctionParmPackExpr.
Definition at line 20587 of file SemaExpr.cpp.
References clang::FunctionParmPackExpr::getParameterPackLocation(), MarkExprReferenced(), and RefsMinusAssignments.
| 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 18587 of file SemaExpr.cpp.
References clang::cast(), clang::SemaCUDA::CheckCall(), CheckCompleteDestructorVariant(), CheckCompleteParameterTypesForMangler(), checkSpecializationReachability(), CodeSynthesisContexts, clang::Constructor, Consumer, Context, CUDA(), CurContext, DefineDefaultedComparison(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), clang::Destructor, clang::Func, funcHasParameterSizeMangling(), getASTContext(), getDefaultedComparisonKind(), clang::FunctionProtoType::getExceptionSpecType(), getLangOpts(), clang::CXXRecordDecl::getNumVBases(), clang::DeclContext::getParent(), getPrintingPolicy(), ImmediateFunctionContext, clang::Init, InstantiateFunctionDefinition(), clang::isa(), isExternalWithNoLinkageType(), isImplicitlyDefinableConstexprFunction(), clang::SourceLocation::isInvalid(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), isOdrUseContext(), isPotentiallyConstantEvaluatedContext(), clang::isUnresolvedExceptionSpec(), LangOpts, MarkFunctionReferenced(), MarkVTableUsed(), None, OS, PendingInstantiations, PendingLocalImplicitInstantiations, PotentiallyEvaluated, clang::SemaCUDA::RecordImplicitHostDeviceFuncUsedByDevice(), ResolveExceptionSpec(), runWithSufficientStackSpace(), clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, and UndefinedButUsed.
Referenced by ActOnCXXDelete(), ActOnDecltypeExpression(), BuildCXXConstructExpr(), BuildCXXNew(), CheckCXXThrowOperand(), CheckDestructor(), checkDestructorReference(), CheckParmsForFunctionDef(), DeduceTemplateSpecializationFromInitializer(), DefineImplicitLambdaToFunctionPointerConversion(), DefineInheritingConstructor(), FinalizeVarWithDestructor(), findDeleteForPromise(), MarkAnyDeclReferenced(), MarkBaseDestructorsReferenced(), MarkFieldDestructorReferenced(), MarkFunctionReferenced(), MarkVirtualBaseDestructorsReferenced(), MarkVirtualMembersReferenced(), MarkVTableUsed(), MaybeBindToTemporary(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), ReferenceDllExportedMembers(), and SetDelegatingInitializer().
| void Sema::MarkMemberReferenced | ( | MemberExpr * | E | ) |
Perform reference-marking and odr-use handling for a MemberExpr.
Definition at line 20568 of file SemaExpr.cpp.
References clang::MemberExpr::getBeginLoc(), getLangOpts(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getMemberLoc(), clang::SourceLocation::isValid(), MarkExprReferenced(), clang::Method, clang::MemberExpr::performsVirtualDispatch(), and RefsMinusAssignments.
Referenced by BuildMemberExpr().
| void Sema::MarkThisReferenced | ( | CXXThisExpr * | This | ) |
Definition at line 1447 of file SemaExprCXX.cpp.
References CheckCXXThisCapture(), CurContext, FunctionScopes, clang::FunctionProtoType::getParamType(), and clang::Type::isDependentType().
Referenced by BuildCXXThisExpr().
| void Sema::MarkTypoCorrectedFunctionDefinition | ( | const NamedDecl * | F | ) |
Definition at line 9323 of file SemaDecl.cpp.
References TypoCorrectedFunctionDefinitions.
Referenced by DiagnoseInvalidRedeclaration().
| void Sema::MarkUnusedFileScopedDecl | ( | const DeclaratorDecl * | D | ) |
If it's a file scoped decl that must warn if not used, keep track of it.
Definition at line 1974 of file SemaDecl.cpp.
References clang::First, ShouldWarnIfUnusedFileScopedDecl(), and UnusedFileScopedDecls.
Referenced by ActOnFunctionDeclarator(), CheckFunctionTemplateSpecialization(), and FinalizeDeclaration().
| void Sema::MarkUsedTemplateParameters | ( | ArrayRef< TemplateArgument > | TemplateArgs, |
| unsigned | Depth, | ||
| llvm::SmallBitVector & | Used ) |
Definition at line 7159 of file SemaTemplateDeduction.cpp.
References Context, MarkUsedTemplateParameters(), and Used.
| void Sema::MarkUsedTemplateParameters | ( | ArrayRef< TemplateArgumentLoc > | TemplateArgs, |
| unsigned | Depth, | ||
| llvm::SmallBitVector & | Used ) |
Definition at line 7167 of file SemaTemplateDeduction.cpp.
References Context, getArgument(), MarkUsedTemplateParameters(), and Used.
| void Sema::MarkUsedTemplateParameters | ( | const Expr * | E, |
| bool | OnlyDeduced, | ||
| unsigned | Depth, | ||
| llvm::SmallBitVector & | Used ) |
Mark which template parameters are used in a given expression.
| E | the expression from which template parameters will be deduced. |
| Used | a bit vector whose elements will be set to true to indicate when the corresponding template parameter will be deduced. |
Definition at line 7130 of file SemaTemplateDeduction.cpp.
References Context, MarkUsedTemplateParameters(), and Used.
Referenced by checkTemplatePartialSpecialization(), MarkDeducedTemplateParameters(), MarkUsedTemplateParameters(), MarkUsedTemplateParameters(), MarkUsedTemplateParameters(), and MarkUsedTemplateParameters().
| 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.
| TemplateArgs | the template argument list from which template parameters will be deduced. |
| Used | a bit vector whose elements will be set to true to indicate when the corresponding template parameter will be deduced. |
Definition at line 7143 of file SemaTemplateDeduction.cpp.
References clang::TemplateArgumentList::asArray(), Context, hasPackExpansionBeforeEnd(), MarkUsedTemplateParameters(), clang::TemplateArgumentList::size(), and Used.
| void Sema::MarkUsedTemplateParametersForSubsumptionParameterMapping | ( | const Expr * | E, |
| unsigned | Depth, | ||
| llvm::SmallBitVector & | Used ) |
Mark which template parameters are named in a given expression.
Unlike MarkUsedTemplateParameters, this excludes parameter that are used but not directly named by an expression - i.e. it excludes any template parameter that denotes the type of a referenced NTTP.
| Used | a bit vector whose elements will be set to true to indicate when the corresponding template parameter will be deduced. |
Definition at line 7136 of file SemaTemplateDeduction.cpp.
References Used.
| 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 20441 of file SemaExpr.cpp.
References DoMarkVarDeclReferenced(), and RefsMinusAssignments.
Referenced by CheckComparisonCategoryType(), MarkAnyDeclReferenced(), and ReferenceDllExportedMembers().
| void Sema::MarkVirtualBaseDestructorsReferenced | ( | SourceLocation | Location, |
| CXXRecordDecl * | ClassDecl, | ||
| llvm::SmallPtrSetImpl< const CXXRecordDecl * > * | 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 5944 of file SemaDeclCXX.cpp.
References AR_accessible, CheckDerivedToBaseConversion(), CheckDestructorAccess(), Context, DiagnoseUseOfDecl(), clang::Decl::getLocation(), LookupDestructorIfRelevant(), MarkFunctionReferenced(), clang::SemaBase::PDiag(), and clang::CXXRecordDecl::vbases().
Referenced by CheckCompleteDestructorVariant(), and MarkBaseDestructorsReferenced().
| 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 19159 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::methods(), and ResolveExceptionSpec().
Referenced by DefineUsedVTables().
| void Sema::MarkVirtualMembersReferenced | ( | SourceLocation | Loc, |
| const CXXRecordDecl * | RD, | ||
| bool | ConstexprOnly = false ) |
MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced.
Definition at line 19166 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::CXXRecordDecl::getFinalOverriders(), clang::CXXRecordDecl::getNumVBases(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isPureVirtual(), MarkFunctionReferenced(), and MarkVirtualMembersReferenced().
Referenced by DefineUsedVTables(), MarkVirtualMembersReferenced(), and MarkVTableUsed().
| void Sema::MarkVTableUsed | ( | SourceLocation | Loc, |
| CXXRecordDecl * | Class, | ||
| bool | DefinitionRequired = false ) |
Note that the vtable for the given class was used at the given location.
Definition at line 19003 of file SemaDeclCXX.cpp.
References CheckDestructor(), clang::Class, Context, CurContext, clang::FunctionDecl::isDefined(), clang::FunctionDecl::isDeleted(), isUnevaluatedContext(), clang::CXXMethodDecl::isVirtual(), LangOpts, LoadExternalVTableUses(), MarkFunctionReferenced(), MarkVirtualMembersReferenced(), OpenMP(), clang::TU_Prefix, TUKind, VTablesUsed, and VTableUses.
Referenced by ActOnExplicitInstantiation(), ActOnExplicitInstantiation(), ActOnFinishFunctionBody(), ActOnTagFinishDefinition(), BuildCXXTypeId(), CheckCompletedCXXClass(), CheckCXXThrowOperand(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), InstantiateClassMembers(), MarkFunctionReferenced(), and ReferenceDllExportedMembers().
| 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.
| DeclStartLoc | the start of the declaration that has a scope specifier or a template parameter list. |
| DeclLoc | The location of the declaration itself. |
| SS | the scope specifier that will be matched to the given template parameter lists. This scope specifier precedes a qualified name that is being declared. |
| TemplateId | The template-id following the scope specifier, if there is one. Used to check for a missing 'template<>'. |
| ParamLists | the template parameter lists, from the outermost to the innermost template parameter lists. |
| IsFriend | Whether to apply the slightly different rules for matching template parameters to scope specifiers in friend declarations. |
| IsMemberSpecialization | will be set true if the scope specifier denotes a fully-specialized type, and therefore this is a declaration of a member specialization. |
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 2827 of file SemaTemplate.cpp.
References CheckTemplateParameterList(), computeDeclContext(), Context, clang::TemplateParameterList::Create(), clang::FixItHint::CreateInsertion(), DependsOnTemplateParameters(), clang::SemaBase::Diag(), clang::Enum, clang::TemplateName::getAsDeducedTemplateName(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsTemplateDecl(), clang::NestedNameSpecifier::getKind(), getRangeOfTypeInNestedNameSpecifier(), clang::CXXScopeSpec::getScopeRep(), clang::Invalid, clang::isa(), clang::SourceLocation::isValid(), clang::TemplateIdAnnotation::LAngleLoc, clang::TemplateIdAnnotation::RAngleLoc, clang::T, clang::Template, TemplateParameterListsAreEqual(), TPC_ClassTemplateMember, TPL_TemplateMatch, clang::TSK_ExplicitSpecialization, and clang::NestedNameSpecifier::Type.
Referenced by ActOnClassTemplateSpecialization(), ActOnFunctionDeclarator(), ActOnStartFunctionDeclarationDeclarator(), ActOnTag(), ActOnTemplatedFriendTag(), and ActOnVariableDeclarator().
| void clang::Sema::maybeAddDeclWithEffects | ( | const Decl * | D, |
| const FunctionEffectsRef & | FX ) |
Potentially add a FunctionDecl or BlockDecl to DeclsWithEffectsToVerify.
Definition at line 1473 of file SemaFunctionEffects.cpp.
References addDeclWithEffects(), clang::cast(), Diags, clang::Decl::getAsFunction(), clang::Decl::getLocation(), clang::Decl::hasBody(), hasUncompilableErrorOccurred(), SourceMgr, and clang::FunctionDecl::willHaveBody().
|
inline |
Inline checks from the start of maybeAddDeclWithEffects, to minimize performance impact on code not using effects.
Definition at line 15677 of file Sema.h.
References Context, clang::FunctionEffectsRef::empty(), and maybeAddDeclWithEffects().
Referenced by ActOnBlockStmtExpr(), ActOnStartOfFunctionDef(), BuildLambdaExpr(), maybeAddDeclWithEffects(), and MergeFunctionDecl().
| 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 6509 of file SemaExprCXX.cpp.
References clang::Bind, clang::Call, clang::cast(), CheckDestructorAccess(), Cleanup, Context, clang::CPlusPlus, clang::CXXBindTemporaryExpr::Create(), clang::CXXTemporary::Create(), clang::ImplicitCastExpr::Create(), clang::Destructor, DiagnoseUseOfDecl(), clang::QualType::DK_nontrivial_c_struct, clang::Sema::ExpressionEvaluationContextRecord::EK_Decltype, clang::ExprError(), ExprEvalContexts, clang::Expr::getExprLoc(), getLangOpts(), clang::ObjCMethodDecl::getMethodFamily(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::Decl::hasAttr(), clang::isa(), clang::DeclContext::isDependentContext(), clang::QualType::isDestructedType(), clang::Expr::isGLValue(), clang::Decl::isInvalidDecl(), clang::Type::isObjCARCImplicitlyUnretainedType(), clang::Type::isObjCRetainableType(), LookupDestructor(), MarkFunctionReferenced(), clang::nullptr, clang::OMF_performSelector, clang::SemaBase::PDiag(), clang::T, and clang::VK_PRValue.
Referenced by BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildCompoundLiteralExpr(), BuildCXXCastArgument(), BuildLambdaExpr(), BuildLiteralOperatorCall(), BuildOverloadedArrowExpr(), BuildResolvedCallExpr(), BuildStmtExpr(), CopyObject(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), clang::InitializationSequence::Perform(), and PerformConstructorInitialization().
| ExprResult Sema::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.
Definition at line 8135 of file SemaExpr.cpp.
References ActOnBinOp(), ActOnParenExpr(), clang::ExprError(), clang::ParenListExpr::getExpr(), clang::Expr::getExprLoc(), clang::ParenListExpr::getLParenLoc(), clang::ParenListExpr::getNumExprs(), clang::ParenListExpr::getRParenLoc(), and clang::Result.
Referenced by ActOnArraySubscriptExpr(), ActOnCastExpr(), ActOnMemberAccessExpr(), ActOnPostfixUnaryOp(), ActOnStartCXXMemberReference(), and BuildCallExpr().
MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups, surround it with a ExprWithCleanups node.
Otherwise, just returns the passed-in expression.
Definition at line 6680 of file SemaExprCXX.cpp.
References Cleanup, CleanupVarDeclMarking(), Context, clang::ExprWithCleanups::Create(), DiscardCleanupsInEvaluationContext(), ExprCleanupObjects, and ExprEvalContexts.
Referenced by ActOnBlockStmtExpr(), ActOnFinishFullExpr(), ActOnUninitializedDecl(), buildCoawaitCalls(), buildCoroutinePromise(), BuildExceptionDeclaration(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), checkEscapingByref(), ConvertParamDefaultArgument(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), maybeTailCall(), and RemoveNestedImmediateInvocation().
| ExprResult Sema::MaybeCreateExprWithCleanups | ( | ExprResult | SubExpr | ) |
Definition at line 6673 of file SemaExprCXX.cpp.
References clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and MaybeCreateExprWithCleanups().
Definition at line 6702 of file SemaExprCXX.cpp.
References Cleanup, CleanupVarDeclMarking(), Context, clang::CompoundStmt::Create(), and MaybeCreateExprWithCleanups().
Referenced by ActOnFinishFullStmt().
| bool Sema::MaybeEmitAmbiguousAtomicConstraintsDiagnostic | ( | const NamedDecl * | D1, |
| ArrayRef< AssociatedConstraint > | AC1, | ||
| const NamedDecl * | D2, | ||
| ArrayRef< AssociatedConstraint > | 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.
Definition at line 2557 of file SemaConcept.cpp.
References Context, clang::SemaBase::Diag(), clang::Stmt::getBeginLoc(), clang::AtomicConstraint::getConstraintExpr(), getNormalizedAssociatedConstraints(), clang::Stmt::getSourceRange(), clang::NormalizedConstraintWithParamMapping::hasMatchingParameterMapping(), isSFINAEContext(), clang::Stmt::Profile(), and clang::SubsumptionChecker::Subsumes().
Referenced by checkMoreSpecializedThanPrimary(), CheckTemplateTemplateArgument(), and MaybeDiagnoseAmbiguousConstraints().
| void Sema::maybeExtendBlockObject | ( | ExprResult & | E | ) |
Do an explicit extend of the given block pointer if we're in ARC.
Definition at line 7471 of file SemaExpr.cpp.
References Cleanup, Context, clang::ImplicitCastExpr::Create(), clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), clang::Expr::getType(), clang::Type::isBlockPointerType(), clang::Expr::isPRValue(), and clang::VK_PRValue.
Referenced by CheckAssignmentConstraints(), DefaultVariadicArgumentPromotion(), and PrepareScalarCast().
| void Sema::MaybeSuggestAddingStaticToDecl | ( | const FunctionDecl * | D | ) |
Definition at line 214 of file SemaExpr.cpp.
References clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::First, clang::Redeclarable< decl_type >::getFirstDecl(), and hasAnyExplicitStorageClass().
Referenced by ActOnVariableDeclarator(), and diagnoseUseOfInternalDeclInInlineFunction().
| AlwaysInlineAttr * Sema::mergeAlwaysInlineAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| const IdentifierInfo * | Ident ) |
Definition at line 5031 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by handleAlwaysInlineAttr(), and mergeDeclAttribute().
| AvailabilityAttr * Sema::mergeAvailabilityAttr | ( | NamedDecl * | D, |
| const AttributeCommonInfo & | CI, | ||
| const IdentifierInfo * | Platform, | ||
| bool | Implicit, | ||
| VersionTuple | Introduced, | ||
| VersionTuple | Deprecated, | ||
| VersionTuple | Obsoleted, | ||
| bool | IsUnavailable, | ||
| StringRef | Message, | ||
| bool | IsStrict, | ||
| StringRef | Replacement, | ||
| AvailabilityMergeKind | AMK, | ||
| int | Priority, | ||
| const IdentifierInfo * | IIEnvironment ) |
Definition at line 2350 of file SemaDeclAttr.cpp.
References checkAvailabilityAttr(), Context, clang::SemaBase::Diag(), clang::Decl::getAttrs(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeCommonInfo::getRange(), clang::Decl::hasAttrs(), Implicit, clang::None, clang::OptionalProtocolImplementation, clang::Override, clang::ProtocolImplementation, clang::Redeclaration, and versionsMatch().
Referenced by handleAvailabilityAttr(), and mergeDeclAttribute().
| BTFDeclTagAttr * Sema::mergeBTFDeclTagAttr | ( | Decl * | D, |
| const BTFDeclTagAttr & | AL ) |
Definition at line 6362 of file SemaDeclAttr.cpp.
References Context, and hasBTFDeclTagAttr().
Referenced by mergeDeclAttribute().
| CodeSegAttr * Sema::mergeCodeSegAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| StringRef | Name ) |
Definition at line 3433 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::FunctionDecl::isFunctionTemplateSpecialization().
Referenced by handleCodeSegAttr(), and mergeDeclAttribute().
| 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.
Definition at line 4473 of file SemaDecl.cpp.
References Context, clang::CPlusPlus, getLangOpts(), clang::FunctionDecl::getMostRecentDecl(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::FunctionDecl::isPureVirtual(), clang::Decl::isUsed(), MergeCXXFunctionDecl(), mergeDeclAttributes(), mergeParamDeclAttributes(), mergeParamDeclTypes(), and New.
Referenced by MergeFunctionDecl().
| 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 453 of file SemaDeclCXX.cpp.
References clang::cast(), CheckForFunctionRedefinition(), Diag(), clang::Decl::FOK_None, clang::Decl::FOK_Undeclared, functionDeclHasDefaultArgument(), clang::FunctionDecl::getConstexprKind(), clang::ParmVarDecl::getDefaultArgRange(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::Decl::getFriendObjectKind(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionDecl::getMostRecentDecl(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getPreviousDecl(), getSpecialMember(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::ParmVarDecl::hasDefaultArg(), clang::ParmVarDecl::hasInheritedDefaultArg(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUnparsedDefaultArg(), clang::Invalid, clang::isa(), isDeclInScope(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isInlined(), clang::Decl::isLocalExternDecl(), clang::LookupResult::isVisible(), isVisible(), New, 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().
| void Sema::mergeDeclAttributes | ( | NamedDecl * | New, |
| Decl * | Old, | ||
| AvailabilityMergeKind | AMK = AvailabilityMergeKind::Redeclaration ) |
mergeDeclAttributes - Copy attributes from the Old decl to the New one.
Definition at line 3211 of file SemaDecl.cpp.
References clang::cast(), checkNewAttributesAfterDef(), Context, clang::VarDecl::DeclarationOnly, clang::SemaBase::Diag(), diagnoseMissingConstinit(), clang::Decl::getAttr(), clang::VarDecl::getInitializingDeclaration(), clang::Decl::getLocation(), clang::Decl::getMostRecentDecl(), getRange(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::isa(), clang::Decl::isUsed(), mergeAlignedAttrs(), mergeDeclAttribute(), New, clang::NewTag, clang::None, clang::OptionalProtocolImplementation, clang::Override, clang::ProtocolImplementation, clang::Redeclaration, clang::Decl::specific_attrs(), and clang::TSK_ExplicitSpecialization.
Referenced by ActOnTag(), CheckClassTemplate(), findInheritingConstructor(), MergeCompatibleFunctionDecls(), mergeObjCMethodDecls(), MergeTypedefNameDecl(), MergeVarDecl(), and rewriteBuiltinFunctionDecl().
| DLLExportAttr * Sema::mergeDLLExportAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI ) |
Definition at line 6432 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::Decl::hasAttr().
Referenced by handleDLLAttr(), and mergeDeclAttribute().
| DLLImportAttr * Sema::mergeDLLImportAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI ) |
Definition at line 6419 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by handleDLLAttr(), and mergeDeclAttribute().
| EnforceTCBAttr * Sema::mergeEnforceTCBAttr | ( | Decl * | D, |
| const EnforceTCBAttr & | AL ) |
Definition at line 6990 of file SemaDeclAttr.cpp.
References mergeEnforceTCBAttrImpl().
Referenced by mergeDeclAttribute().
| EnforceTCBLeafAttr * Sema::mergeEnforceTCBLeafAttr | ( | Decl * | D, |
| const EnforceTCBLeafAttr & | AL ) |
Definition at line 6995 of file SemaDeclAttr.cpp.
References mergeEnforceTCBAttrImpl().
Referenced by mergeDeclAttribute().
| ErrorAttr * Sema::mergeErrorAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| StringRef | NewUserDiagnostic ) |
Definition at line 3868 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getNormalizedFullName(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::Match.
Referenced by handleErrorAttr(), and mergeDeclAttribute().
| FormatAttr * Sema::mergeFormatAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| const IdentifierInfo * | Format, | ||
| int | FormatIdx, | ||
| int | FirstArg ) |
Definition at line 3893 of file SemaDeclAttr.cpp.
References Context, clang::AttributeCommonInfo::getRange(), and clang::Decl::specific_attrs().
Referenced by handleFormatAttr(), and mergeDeclAttribute().
| FormatMatchesAttr * Sema::mergeFormatMatchesAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| const IdentifierInfo * | Format, | ||
| int | FormatIdx, | ||
| StringLiteral * | FormatStr ) |
Definition at line 3912 of file SemaDeclAttr.cpp.
References CheckFormatStringsCompatible(), Context, GetFormatStringType(), clang::AttributeCommonInfo::getRange(), and clang::Decl::specific_attrs().
Referenced by handleFormatMatchesAttr(), and mergeDeclAttribute().
| bool Sema::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'.
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 3686 of file SemaDecl.cpp.
References adjustDeclContextForDeclaratorDecl(), BuiltinFunction, canFullyTypeCheckRedeclaration(), canRedefineFunction(), clang::cast(), clang::Type::castAs(), clang::FunctionProtoType::ExtProtoInfo::CFIUncheckedCallee, CheckEquivalentExceptionSpec(), CheckRedeclarationInModule(), checkUsingShadowRedecl(), Context, clang::CPlusPlus, clang::ParmVarDecl::Create(), clang::SemaBase::Diag(), diagnoseFunctionEffectMergeConflicts(), clang::First, clang::Decl::FOK_None, clang::FunctionProtoType::ExtProtoInfo::FunctionEffects, clang::Type::getAs(), clang::Decl::getAsFunction(), getASTContext(), clang::FunctionDecl::getBuiltinID(), getCallingConvAttributedType(), clang::FunctionDecl::getCanonicalDecl(), clang::FunctionType::ExtInfo::getCC(), clang::Type::getContainedAutoType(), clang::FunctionDecl::getDeclaredReturnType(), clang::NamedDecl::getDeclName(), clang::FunctionType::getExtInfo(), clang::FunctionProtoType::getExtProtoInfo(), clang::Redeclarable< decl_type >::getFirstDecl(), clang::Decl::getFriendObjectKind(), clang::FunctionDecl::getFunctionEffects(), 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::ValueDecl::getType(), clang::FunctionEffectSet::getUnion(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), hasIdenticalPassObjectSizeAttrs(), clang::FunctionDecl::hasInheritedPrototype(), clang::FunctionDecl::hasPrototype(), clang::FunctionDecl::hasWrittenPrototype(), haveIncompatibleLanguageLinkages(), HLSL(), inTemplateInstantiation(), clang::isa(), clang::QualType::isCanonical(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::FunctionDecl::isExternC(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::Decl::isImplicit(), clang::Decl::isInAnotherModuleUnit(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), IsInvalidSMECallConversion(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), clang::DeclContext::isRecord(), clang::CXXMethodDecl::isStatic(), clang::FunctionDecl::isTrivial(), clang::Decl::isUsed(), maybeAddDeclWithEffects(), MergeCompatibleFunctionDecls(), New, notePreviousDefinition(), clang::nullptr, clang::FunctionDecl::redecls(), clang::FunctionDecl::redecls_end(), clang::SC_None, clang::SC_Static, clang::Decl::setImplicit(), clang::FunctionDecl::setTrivial(), SubstAutoType(), SubstAutoTypeDependent(), 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().
| InternalLinkageAttr * Sema::mergeInternalLinkageAttr | ( | Decl * | D, |
| const InternalLinkageAttr & | AL ) |
Definition at line 5068 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::ExpectedFunctionVariableOrClass, clang::ExpectedVariableOrFunction, and getLangOpts().
| InternalLinkageAttr * Sema::mergeInternalLinkageAttr | ( | Decl * | D, |
| const ParsedAttr & | AL ) |
Definition at line 5046 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::ExpectedFunctionVariableOrClass, clang::ExpectedVariableOrFunction, getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by handleInternalLinkageAttr(), and mergeDeclAttribute().
| MinSizeAttr * Sema::mergeMinSizeAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI ) |
Definition at line 5089 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by handleMinSizeAttr(), and mergeDeclAttribute().
| ModularFormatAttr * Sema::mergeModularFormatAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| const IdentifierInfo * | ModularImplFn, | ||
| StringRef | ImplName, | ||
| MutableArrayRef< StringRef > | Aspects ) |
Definition at line 7124 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and modularFormatAttrsEquiv().
Referenced by mergeDeclAttribute().
| MSInheritanceAttr * Sema::mergeMSInheritanceAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| bool | BestCase, | ||
| MSInheritanceModel | Model ) |
Definition at line 6478 of file SemaDeclAttr.cpp.
References clang::cast(), checkMSInheritanceAttrOnDefinition(), Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), and clang::isa().
Referenced by handleMSInheritanceAttr(), and mergeDeclAttribute().
| void Sema::mergeObjCMethodDecls | ( | ObjCMethodDecl * | New, |
| ObjCMethodDecl * | Old ) |
Definition at line 4509 of file SemaDecl.cpp.
References clang::SemaObjC::CheckObjCMethodOverride(), clang::Decl::getDeclContext(), clang::isa(), clang::ObjCMethodDecl::isOptional(), mergeDeclAttributes(), mergeParamDeclAttributes(), ObjC(), clang::OptionalProtocolImplementation, clang::Override, clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), clang::ProtocolImplementation, and clang::Redeclaration.
| OptimizeNoneAttr * Sema::mergeOptimizeNoneAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI ) |
Definition at line 5102 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by handleOptimizeNoneAttr(), and mergeDeclAttribute().
| SectionAttr * Sema::mergeSectionAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| StringRef | Name ) |
Definition at line 3307 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getAttributeSpellingListIndex(), clang::AttributeCommonInfo::getLoc(), and clang::FunctionDecl::isFunctionTemplateSpecialization().
Referenced by handleSectionAttr(), and mergeDeclAttribute().
| 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 2549 of file SemaDecl.cpp.
References clang::C11, CleanupMergedEnum(), Context, clang::CPlusPlus, CurContext, clang::SemaBase::Diag(), clang::LookupResult::getAsSingle(), getDiagnostics(), getLangOpts(), clang::Decl::getLocation(), getPointeeType(), clang::LookupResult::getRepresentativeDecl(), hasVisibleDefinition(), clang::isa(), clang::Decl::isImplicit(), isIncompatibleTypedef(), clang::Decl::isInvalidDecl(), clang::Type::isStructureType(), clang::SourceLocation::isValid(), makeMergedDefinitionVisible(), mergeDeclAttributes(), New, clang::NewTag, notePreviousDefinition(), ObjC(), clang::T, and clang::Typedef.
Referenced by ActOnTypedefNameDecl().
| TypeVisibilityAttr * Sema::mergeTypeVisibilityAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| TypeVisibilityAttr::VisibilityType | Vis ) |
Definition at line 2962 of file SemaDeclAttr.cpp.
Referenced by handleVisibilityAttr(), and mergeDeclAttribute().
| UuidAttr * Sema::mergeUuidAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| StringRef | UuidAsWritten, | ||
| MSGuidDecl * | GuidDecl ) |
Definition at line 6155 of file SemaDeclAttr.cpp.
References Context, clang::declaresSameEntity(), clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by handleUuidAttr(), and mergeDeclAttribute().
| 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 4666 of file SemaDecl.cpp.
References adjustDeclContextForDeclaratorDecl(), CheckRedeclarationInModule(), checkUsingShadowRedecl(), checkVarDeclRedefinition(), clang::CPlusPlus, clang::VarDecl::DeclarationOnly, clang::VarDecl::Definition, clang::SemaBase::Diag(), clang::Decl::getAccess(), clang::VarDecl::getCanonicalDecl(), clang::VarDecl::getDefinition(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::VarDecl::getMostRecentDecl(), getNoteDiagForInvalidRedeclaration(), clang::Decl::getPreviousDecl(), clang::VarDecl::getStorageClass(), clang::VarTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::VarDecl::getTLSKind(), clang::Decl::hasAttr(), clang::NamedDecl::hasExternalFormalLinkage(), clang::VarDecl::hasInit(), clang::NamedDecl::hasLinkage(), haveIncompatibleLanguageLinkages(), clang::VarDecl::isConstexpr(), clang::Decl::isInAnotherModuleUnit(), clang::VarDecl::isInline(), clang::VarDecl::isLocalVarDeclOrParm(), clang::DeclContext::isRecord(), clang::VarDecl::isStaticDataMember(), clang::Decl::isUsed(), mergeDeclAttributes(), mergeTypeWithPrevious(), MergeVarDeclTypes(), New, notePreviousDefinition(), Previous, clang::SC_Extern, clang::SC_Static, clang::Decl::setAccess(), clang::Redeclarable< decl_type >::setPreviousDecl(), TemplateParameterListsAreEqual(), clang::VarDecl::TLS_Dynamic, TPL_TemplateMatch, and UndefinedButUsed.
Referenced by CheckVariableDeclaration().
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 1725 of file SemaDeclCXX.cpp.
References clang::Type::castAs(), CheckEquivalentExceptionSpec(), Context, clang::Type::getAs(), getLangOpts(), clang::Decl::getLocation(), clang::Type::getPointeeType(), getPointeeType(), clang::ValueDecl::getType(), clang::Type::isFunctionProtoType(), and New.
Referenced by MergeVarDeclTypes().
MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'.
Figure out how to merge their types, emitting diagnostics as appropriate.
Declarations using the auto type specifier (C++ [decl.spec.auto]) call back to here in AddInitializerToDecl. We can't check them before the initializer is attached.
Definition at line 4550 of file SemaDecl.cpp.
References clang::Type::containsErrors(), Context, clang::CPlusPlus, diagnoseVarDeclTypeMismatch(), clang::ArrayType::getElementType(), getLangOpts(), clang::VarDecl::getMostRecentDecl(), clang::VarDecl::getPreviousDecl(), clang::ValueDecl::getType(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isIncompleteArrayType(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), clang::Type::isObjCObjectPointerType(), MergeVarDeclExceptionSpecs(), and New.
Referenced by DeduceVariableDeclarationType(), and MergeVarDecl().
| VisibilityAttr * Sema::mergeVisibilityAttr | ( | Decl * | D, |
| const AttributeCommonInfo & | CI, | ||
| VisibilityAttr::VisibilityType | Vis ) |
Definition at line 2955 of file SemaDeclAttr.cpp.
Referenced by handleVisibilityAttr(), and mergeDeclAttribute().
| void Sema::mergeVisibilityType | ( | Decl * | D, |
| SourceLocation | Loc, | ||
| VisibilityAttr::VisibilityType | Type ) |
Definition at line 2931 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), Context, clang::SemaBase::Diag(), and clang::Decl::getAttr().
Referenced by ActOnPragmaExport(), and ProcessPragmaExport().
|
inline |
Determine whether it's plausible that E was intended to be a template-name.
Definition at line 3847 of file Sema.h.
References clang::CPlusPlus, clang::Dependent, clang::ActionResult< PtrTy, Compress >::get(), getLangOpts(), and clang::ActionResult< PtrTy, Compress >::isInvalid().
|
inline |
Definition at line 1478 of file Sema.h.
Referenced by handleInterruptAttr().
| 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 1300 of file SemaAttr.cpp.
References AddOptnoneAttributeIfNoConflicts(), clang::DeclaratorDecl::getBeginLoc(), and MSPragmaOptimizeIsOn.
Referenced by ActOnFunctionDeclarator().
|
inline |
Definition at line 1483 of file Sema.h.
Referenced by handleInterruptAttr().
|
inline |
Definition at line 8211 of file Sema.h.
References currentEvaluationContext(), and clang::Sema::ExpressionEvaluationContextRecord::RebuildDefaultArgOrDefaultInit.
Referenced by BuildCXXDefaultArgExpr(), and BuildCXXDefaultInitExpr().
| bool Sema::NeedToCaptureVariable | ( | ValueDecl * | Var, |
| SourceLocation | Loc ) |
Checks if the variable must be captured.
Definition at line 19756 of file SemaExpr.cpp.
References clang::Implicit, and tryCaptureVariable().
Referenced by BuildDeclRefExpr().
| void Sema::NoteAllFoundTemplates | ( | TemplateName | Name | ) |
Definition at line 3190 of file SemaTemplate.cpp.
References clang::SemaBase::Diag(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsTemplateDecl(), clang::isa(), and clang::Template.
Referenced by ActOnCXXNestedNameSpecifier(), and CheckTemplateIdType().
| void Sema::NoteAllOverloadCandidates | ( | Expr * | E, |
| QualType | DestType = QualType(), | ||
| bool | TakingAddress = false ) |
Definition at line 11819 of file SemaOverload.cpp.
References Context, clang::CRK_None, clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), clang::Expr::getType(), and NoteOverloadCandidate().
Referenced by DiagnoseAssignmentResult(), handleCleanupAttr(), handleRestrictAttr(), ResolveAndFixSingleFunctionTemplateSpecialization(), and ResolveSingleFunctionTemplateSpecialization().
| void Sema::NoteDeletedFunction | ( | FunctionDecl * | FD | ) |
Emit a note explaining that this function is deleted.
Definition at line 124 of file SemaExpr.cpp.
References clang::SemaBase::Diag(), DiagnoseDeletedDefaultedFunction(), clang::Decl::getLocation(), clang::Decl::isImplicit(), and NoteDeletedInheritingConstructor().
Referenced by CheckCXX98CompatAccessibleCopy(), CheckDeleteOperator(), CopyObject(), CreateOverloadedBinOp(), DeduceTemplateSpecializationFromInitializer(), clang::InitializationSequence::Diagnose(), and DiagnoseUseOfDecl().
| void Sema::NoteDeletedInheritingConstructor | ( | CXXConstructorDecl * | CD | ) |
Definition at line 14376 of file SemaDeclCXX.cpp.
References clang::DefaultConstructor, clang::CXXConstructorDecl::getInheritedConstructor(), clang::Decl::getLocation(), clang::InheritedConstructor::getShadowDecl(), and ShouldDeleteSpecialMember().
Referenced by NoteDeletedFunction().
| void Sema::NoteHiddenVirtualMethods | ( | CXXMethodDecl * | MD, |
| SmallVectorImpl< CXXMethodDecl * > & | OverloadedMethods ) |
Definition at line 10556 of file SemaDeclCXX.cpp.
References Diag(), clang::ValueDecl::getType(), HandleFunctionTypeMismatch(), and clang::SemaBase::PDiag().
Referenced by CheckOverrideControl(), and DiagnoseHiddenVirtualMethods().
| void Sema::NoteOverloadCandidate | ( | const NamedDecl * | Found, |
| const FunctionDecl * | Fn, | ||
| OverloadCandidateRewriteKind | RewriteKind = OverloadCandidateRewriteKind(), | ||
| QualType | DestType = QualType(), | ||
| bool | TakingAddress = false ) |
Definition at line 11742 of file SemaOverload.cpp.
References checkAddressOfCandidateIsAvailable(), Diag(), clang::Found, HandleFunctionTypeMismatch(), clang::SemaBase::PDiag(), and shouldSkipNotingLambdaConversionDecl().
Referenced by CheckFunctionTemplateSpecialization(), clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), LookupLiteralOperator(), NoteAllOverloadCandidates(), and NoteFunctionCandidate().
| void Sema::notePreviousDefinition | ( | const NamedDecl * | Old, |
| SourceLocation | New ) |
Definition at line 4917 of file SemaDecl.cpp.
References clang::Module::DefinitionLoc, clang::SemaBase::Diag(), getCurrentModule(), clang::Module::getFullModuleName(), clang::Decl::getLocation(), clang::Decl::getOwningModule(), getSourceManager(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isValid(), New, and PP.
Referenced by ActOnEnumConstant(), ActOnTag(), CheckConceptRedefinition(), checkNewAttributesAfterDef(), checkVarDeclRedefinition(), isIncompatibleTypedef(), MergeFunctionDecl(), MergeTypedefNameDecl(), and MergeVarDecl().
| void Sema::NoteTemplateLocation | ( | const NamedDecl & | Decl, |
| std::optional< SourceRange > | ParamRange = {} ) |
Definition at line 7888 of file SemaTemplate.cpp.
References clang::Decl::getLocation(), clang::SourceLocation::isValid(), and noteLocation().
Referenced by CheckDeductionGuideDeclarator(), checkMoreSpecializedThanPrimary(), CheckTemplateArgumentList(), CheckTypenameType(), DeduceTemplateSpecializationFromInitializer(), diagnoseMissingArgument(), diagnoseMissingTemplateArguments(), DiagnoseUninstantiableTemplate(), GetDeclSpecTypeForDeclarator(), and GetNameFromUnqualifiedId().
| void Sema::NoteTemplateParameterLocation | ( | const NamedDecl & | Decl | ) |
Definition at line 7900 of file SemaTemplate.cpp.
References noteLocation().
Referenced by ActOnStartOfLambdaDefinition(), CheckNonTypeTemplatePartialSpecializationArgs(), CheckTemplateArgument(), CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentList(), CheckTemplateArgumentPointerToMember(), CheckTemplateTypeArgument(), DiagnoseTemplateParameterShadow(), and isNullPointerValueTemplateArgument().
|
inline |
Definition at line 1493 of file Sema.h.
Referenced by ActOnCastExpr(), ActOnCXXForRangeStmt(), ActOnDependentMemberExpr(), ActOnEndOfTranslationUnit(), ActOnFields(), ActOnFinishFunctionBody(), ActOnFunctionDeclarator(), ActOnIdExpression(), ActOnModuleImport(), ActOnNameClassifiedAsNonType(), ActOnPopScope(), ActOnVariableDeclarator(), AddClassMessageCompletions(), AddInitializerToDecl(), addMethodsToPool(), ApplyAPINotesType(), applyCocoaAPICheck(), BuildExceptionDeclaration(), BuildFunctionType(), BuildLambdaExpr(), CheckAssignmentConstraints(), CheckAssignmentOperands(), clang::checkCollectionLiteralElement(), CheckCompareOperands(), CheckCompleteVariableDeclaration(), CheckConditionalOperands(), CheckFieldDecl(), CheckFunctionCall(), CheckImplicitConversion(), CheckKeyForObjCARCConversion(), CheckObjCCollectionLiteralElement(), CheckPlaceholderExpr(), CheckPropertyAgainstProtocol(), CheckSingleAssignmentConstraints(), clang::checkSwiftAsyncErrorBlock(), CheckTautologicalComparison(), checkUnsafeAssignLiteral(), ClassifyName(), classifyPointerDeclarator(), CreateBuiltinArraySubscriptExpr(), CXXCheckConditionalOperands(), DeduceVariableDeclarationType(), DefaultVariadicArgumentPromotion(), DiagnoseAssignmentAsCondition(), DiagnoseAssignmentResult(), DiagnoseCStringFormatDirectiveInObjCAPI(), DiagnoseFloatingImpCast(), DiagnoseMismatchedSelectors(), diagnoseObjCARCConversion(), diagnoseObjCLiteralComparison(), DiagnoseUnusedOfDecl(), emitBadConversionNotes(), FinishCXXForRangeStmt(), FinishForRangeVarDecl(), GatherArgumentsForCall(), GetTypeForDeclaratorCast(), handleFormatArgAttr(), handleFormatAttrCommon(), handleFunctionTypeAttr(), hasIsEqualMethod(), HelperIsMethodInObjCType(), HelperToDiagnoseMismatchedMethodsInGlobalPool(), Initialize(), clang::InitializationSequence::InitializeFrom(), InstantiateAttrs(), clang::isErrorParameter(), isMethodDeclaredInRootProtocol(), isObjCPointerConversion(), IsStandardConversion(), LookupDirectMethodInGlobalPool(), LookupMemberExpr(), LookupMethodInReceiverType(), LookupObjCInterfaceDeclForLiteral(), mergeObjCMethodDecls(), MergeTypedefNameDecl(), moveMethodToBackOfGlobalList(), PerformImplicitConversion(), PerformImplicitConversion(), ProcessDeclAttribute(), clang::ASTReader::ReadMethodPool(), clang::TreeTransform< AdjustConstraints >::RebuildCXXForRangeStmt(), clang::TreeTransform< AdjustConstraints >::RebuildObjCArrayLiteral(), clang::TreeTransform< AdjustConstraints >::RebuildObjCAtCatchStmt(), clang::TreeTransform< AdjustConstraints >::RebuildObjCAtFinallyStmt(), clang::TreeTransform< AdjustConstraints >::RebuildObjCAtSynchronizedOperand(), clang::TreeTransform< AdjustConstraints >::RebuildObjCAtSynchronizedStmt(), clang::TreeTransform< AdjustConstraints >::RebuildObjCAtThrowStmt(), clang::TreeTransform< AdjustConstraints >::RebuildObjCAtTryStmt(), clang::TreeTransform< AdjustConstraints >::RebuildObjCAutoreleasePoolStmt(), clang::TreeTransform< AdjustConstraints >::RebuildObjCBoxedExpr(), clang::TreeTransform< AdjustConstraints >::RebuildObjCDictionaryLiteral(), clang::TreeTransform< AdjustConstraints >::RebuildObjCExceptionDecl(), clang::TreeTransform< AdjustConstraints >::RebuildObjCForCollectionStmt(), clang::TreeTransform< AdjustConstraints >::RebuildObjCSubscriptRefExpr(), Sema(), ShouldDiagnoseAvailabilityOfDecl(), tryObjCWritebackConversion(), and ValidateObjCLiteralInterfaceDecl().
|
inline |
Definition at line 1498 of file Sema.h.
Referenced by ActOnArraySubscriptExpr(), ActOnEndOfTranslationUnit(), ActOnFunctionDeclarator(), ActOnVariableDeclarator(), AddInitializerToDecl(), BuildCXXThrow(), MarkExprReferenced(), mergeDeclAttribute(), clang::Parser::ParseOpenACCDirectiveStmt(), clang::TreeTransform< AdjustConstraints >::RebuildArraySectionExpr(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCAsteriskSizeExpr(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCAtomicConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCCacheConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCCombinedConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCComputeConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCDataConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCEnterDataConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCExitDataConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCHostDataConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCInitConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCLoopConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCSetConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCShutdownConstruct(), clang::TreeTransform< AdjustConstraints >::RebuildOpenACCUpdateConstruct(), and clang::TreeTransform< AdjustConstraints >::RebuildOpenACCWaitConstruct().
|
inline |
Definition at line 1503 of file Sema.h.
Referenced by ActOnCastExpr(), ActOnFunctionDeclarator(), ActOnNumericConstant(), ActOnParamDeclarator(), ActOnUninitializedDecl(), ActOnVariableDeclarator(), BuildArrayType(), BuildBlockPointerType(), BuildMemberPointerType(), BuildPointerType(), BuildReferenceType(), BuildVectorLiteral(), CheckAssignmentOperands(), CheckCompareOperands(), CheckCompleteVariableDeclaration(), CheckConditionalOperands(), CheckExtVectorCast(), CheckMain(), CheckParameter(), CheckVariableDeclarationType(), CheckVectorLogicalOperands(), CheckVectorOperands(), CompleteVarTemplateSpecializationDecl(), CreateBuiltinBinOp(), CreateBuiltinUnaryOp(), DeduceVariableDeclarationType(), DefaultArgumentPromotion(), DefaultLvalueConversion(), getDefaultCXXMethodAddrSpace(), Initialize(), LookupBuiltin(), and ProcessDeclAttribute().
|
inline |
Definition at line 1508 of file Sema.h.
Referenced by ActOnArraySubscriptExpr(), ActOnCallExpr(), ActOnDeclarator(), ActOnDecompositionDeclarator(), ActOnEndOfTranslationUnit(), actOnOMPReductionKindClause(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), BuildArrayType(), buildCapture(), buildCapturedStmtCaptureList(), BuildCXXForRangeStmt(), BuildFieldReferenceExpr(), buildImplicitMap(), BuildVAArgExpr(), captureInBlock(), captureInCapturedRegion(), CheckFunctionDeclaration(), DiagnoseUseOfDecl(), FinalizeDeclaratorGroup(), getEmissionStatus(), getNonOdrUseReasonInCurrentContext(), HandleDeclarator(), instantiateOMPDeclareSimdDeclAttr(), instantiateOMPDeclareVariantAttr(), isNonNegativeIntegerValue(), isOpenMPDeviceDelayedContext(), MarkExprReferenced(), MarkVarDeclODRUsed(), MarkVTableUsed(), parseDeclareSimdClauses(), PopFunctionScopeInfo(), ProcessDeclAttribute(), processImplicitMapsWithDefaultMappers(), ProcessOpenMPDoacrossClauseCommon(), PushCapturedRegionScope(), PushFunctionScope(), clang::TreeTransform< AdjustConstraints >::RebuildArraySectionExpr(), clang::TreeTransform< AdjustConstraints >::RebuildOMPAffinityClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPAlignClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPAlignedClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPAllocateClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPAllocatorClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPArrayShapingExpr(), clang::TreeTransform< AdjustConstraints >::RebuildOMPAtClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPBindClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPCanonicalLoop(), clang::TreeTransform< AdjustConstraints >::RebuildOMPCollapseClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPCopyinClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPCopyprivateClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDefaultClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDefaultmapClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDependClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDepobjClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDestroyClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDetachClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDeviceClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDistScheduleClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDoacrossClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPDynGroupprivateClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPExclusiveClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPExecutableDirective(), clang::TreeTransform< AdjustConstraints >::RebuildOMPFilterClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPFinalClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPFirstprivateClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPFlushClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPFromClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPFullClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPGrainsizeClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPHasDeviceAddrClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPHintClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPHoldsClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPIfClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPInclusiveClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPInformationalDirective(), clang::TreeTransform< AdjustConstraints >::RebuildOMPInitClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPInReductionClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPIsDevicePtrClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPIteratorExpr(), clang::TreeTransform< AdjustConstraints >::RebuildOMPLastprivateClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPLinearClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPLoopRangeClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPMapClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPMessageClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPNocontextClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPNontemporalClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPNovariantsClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPNowaitClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPNumTasksClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPNumTeamsClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPNumThreadsClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPOrderClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPOrderedClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPPartialClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPPermutationClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPPriorityClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPPrivateClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPProcBindClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPReductionClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPSafelenClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPScheduleClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPSeverityClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPSharedClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPSimdlenClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPSizesClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPTaskReductionClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPThreadLimitClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPToClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPTransparentClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPUseClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPUseDeviceAddrClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPUseDevicePtrClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPUsesAllocatorsClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPXAttributeClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPXBareClause(), clang::TreeTransform< AdjustConstraints >::RebuildOMPXDynCGroupMemClause(), clang::TreeTransform< AdjustConstraints >::RebuildOpenMPTransparentClause(), Sema(), setBranchProtectedScope(), targetDiag(), tryCaptureVariable(), and ~Sema().
|
inline |
Definition at line 8238 of file Sema.h.
References ExprEvalContexts, and PotentiallyEvaluated.
Referenced by BuildCXXDefaultArgExpr(), and BuildCXXDefaultInitExpr().
|
inline |
Definition at line 6962 of file Sema.h.
References ExprEvalContexts.
Referenced by BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), InstantiateVariableInitializer(), parentEvaluationContext(), PopExpressionEvaluationContext(), PushExpressionEvaluationContext(), PushExpressionEvaluationContextForFunction(), and TransformToPotentiallyEvaluated().
|
inline |
Definition at line 6968 of file Sema.h.
References parentEvaluationContext(), and Sema().
| Decl * Sema::ParsedFreeStandingDeclSpec | ( | Scope * | S, |
| AccessSpecifier | AS, | ||
| DeclSpec & | DS, | ||
| const ParsedAttributesView & | DeclAttrs, | ||
| MultiTemplateParamsArg | TemplateParams, | ||
| bool | IsExplicitInstantiation, | ||
| RecordDecl *& | AnonRecord, | ||
| SourceLocation | EllipsisLoc = {} ) |
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 5221 of file SemaDecl.cpp.
References ActOnDocumentableDecl(), ActOnFriendTypeDecl(), BuildAnonymousStructOrUnion(), BuildMicrosoftCAnonymousStruct(), clang::C23, clang::cast(), Context, clang::CPlusPlus, clang::FixItHint::CreateRemoval(), CurContext, clang::SemaBase::Diag(), DiagnoseFunctionSpecifiers(), clang::ParsedAttributesView::empty(), clang::Enum, clang::OpaquePtr< PtrTy >::get(), clang::Type::getAsRecordDecl(), clang::DeclSpec::getAtomicSpecLoc(), clang::DeclSpec::getAttributes(), clang::DeclSpec::getBeginLoc(), clang::DeclSpec::getConstexprSpecifier(), clang::DeclSpec::getConstexprSpecLoc(), clang::DeclSpec::getConstSpecLoc(), GetDiagnosticTypeSpecifierID(), clang::DeclSpec::getInlineSpecLoc(), getLangOpts(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::DeclSpec::getRepAsDecl(), clang::DeclSpec::getRepAsType(), clang::DeclSpec::getRestrictSpecLoc(), clang::DeclSpec::getSourceRange(), clang::DeclSpec::getSpecifierName(), clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::getStorageClassSpecLoc(), clang::DeclSpec::getThreadStorageClassSpec(), clang::DeclSpec::getThreadStorageClassSpecLoc(), clang::DeclSpec::getTypeQualifiers(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getUnalignedSpecLoc(), handleTagNumbering(), clang::DeclSpec::hasConstexprSpecifier(), clang::isa(), clang::DeclSpec::isExternInLinkageSpec(), clang::DeclSpec::isFriendSpecified(), clang::DeclSpec::isInlineSpecified(), clang::SourceLocation::isInvalid(), clang::Decl::isInvalidDecl(), clang::DeclSpec::isMissingDeclaratorOk(), clang::DeclSpec::isModulePrivateSpecified(), clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_typedef, clang::DeclSpec::SCS_unspecified, 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.
| 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 4996 of file SemaDecl.cpp.
References ParsedFreeStandingDeclSpec().
Referenced by ParsedFreeStandingDeclSpec().
| LifetimeCaptureByAttr * Sema::ParseLifetimeCaptureByAttr | ( | const ParsedAttr & | AL, |
| StringRef | ParamName ) |
Definition at line 4225 of file SemaDeclAttr.cpp.
References Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Expr::getExprLoc(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::getLoc(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), clang::AttributeCommonInfo::getRange(), clang::ParsedAttr::isArgExpr(), and clang::ParsedAttr::isArgIdent().
Referenced by handleLifetimeCaptureByAttr().
| TypedefDecl * Sema::ParseTypedefDecl | ( | Scope * | S, |
| Declarator & | D, | ||
| QualType | T, | ||
| TypeSourceInfo * | TInfo ) |
Subroutines of ActOnDeclarator().
Definition at line 17404 of file SemaDecl.cpp.
References clang::cast(), Context, clang::TypedefDecl::Create(), clang::FixItHint::CreateRemoval(), CurContext, clang::SemaBase::Diag(), clang::Declarator::getBeginLoc(), clang::Declarator::getDeclSpec(), clang::Declarator::getIdentifier(), clang::Declarator::getIdentifierLoc(), clang::Decl::getLocation(), clang::DeclSpec::getModulePrivateSpecLoc(), clang::DeclSpec::getRepAsDecl(), clang::DeclSpec::getTypeSpecType(), clang::Declarator::isInvalidType(), clang::DeclSpec::isModulePrivateSpecified(), clang::Decl::setInvalidDecl(), clang::NamedDecl::setModulePrivate(), setTagNameForLinkagePurposes(), clang::T, clang::TST_class, clang::TST_enum, clang::TST_interface, clang::TST_struct, and clang::TST_union.
Referenced by ActOnTypedefDeclarator().
| 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.
| Loc | The source location of the construct that requires the conversion. |
| From | The expression we're converting from. |
| Converter | Used to control and diagnose the conversion process. |
Definition at line 6875 of file SemaOverload.cpp.
References clang::UnresolvedSetImpl::addDecl(), clang::OverloadCandidateSet::BestViableFunction(), clang::cast(), CheckPlaceholderExpr(), collectViableConversionCandidates(), Conversions, clang::CPlusPlus, clang::CPlusPlus14, clang::OverloadCandidateSet::CSK_Normal, DefaultLvalueConversion(), diagnoseAmbiguousConversion(), clang::Sema::ContextualImplicitConverter::diagnoseIncomplete(), clang::Sema::ContextualImplicitConverter::diagnoseNoMatch(), diagnoseNoViableConversion(), clang::ExprError(), finishContextualImplicitConversion(), clang::Found, clang::ActionResult< PtrTy, Compress >::get(), clang::CXXConversionDecl::getConversionType(), getLangOpts(), clang::QualType::getNonReferenceType(), clang::Stmt::getSourceRange(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::Expr::getType(), clang::NamedDecl::getUnderlyingDecl(), clang::QualType::getUnqualifiedType(), clang::Expr::hasPlaceholderType(), isCompleteType(), 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(), RequireCompleteType(), Sema(), clang::UnresolvedSetImpl::size(), clang::Sema::ContextualImplicitConverter::Suppress, and clang::T.
Referenced by ActOnCXXDelete(), BuildCXXNew(), BuiltinRotateGeneric(), CheckSwitchCondition(), and VerifyIntegerConstantExpression().
| ExprResult Sema::PerformContextuallyConvertToBool | ( | Expr * | From | ) |
PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C++0x [conv]p3).
Definition at line 6258 of file SemaOverload.cpp.
References checkPlaceholderForOverload(), Context, clang::Converting, Diag(), DiagnoseMultipleUserDefinedConversion(), clang::ExprError(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ImplicitConversionSequence::isBad(), PerformImplicitConversion(), and TryContextuallyConvertToBool().
Referenced by buildCoawaitCalls(), BuildCXXAssumeExpr(), BuildStaticAssertDeclaration(), CheckCXXBooleanCondition(), checkFunctionConditionAttr(), CheckLogicalOperands(), and instantiateDependentFunctionAttrCondition().
| 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 6656 of file SemaOverload.cpp.
References checkPlaceholderForOverload(), Context, clang::Converting, clang::ExprError(), clang::ImplicitConversionSequence::isBad(), PerformImplicitConversion(), and TryContextuallyConvertToObjCPointer().
| ExprResult Sema::PerformCopyInitialization | ( | const InitializedEntity & | Entity, |
| SourceLocation | EqualLoc, | ||
| ExprResult | Init, | ||
| bool | TopLevelOfInitList = false, | ||
| bool | AllowExplicit = false ) |
Definition at line 9995 of file SemaInit.cpp.
References clang::OverloadCandidate::Conversions, clang::InitializationKind::CreateCopy(), CurrentParameterCopyTypes, clang::ExprError(), clang::OverloadCandidate::FailureKind, clang::InitializationSequence::FK_ConstructorOverloadFailed, clang::Function, clang::Stmt::getBeginLoc(), clang::InitializedEntity::getType(), clang::Init, InitializationSequence, clang::SourceLocation::isInvalid(), clang::InitializedEntity::isParameterKind(), clang::BadConversionSequence::no_conversion, clang::OR_No_Viable_Function, clang::ovl_fail_bad_conversion, clang::Result, clang::Seq, clang::InitializationSequence::SK_ConstructorInitialization, and clang::OverloadCandidate::Viable.
Referenced by ActOnBlockStmtExpr(), ActOnStmtExprResult(), BuildAtomicExpr(), BuildBlockForLambdaConversion(), BuildConvertedConstantExpression(), BuildLiteralOperatorCall(), BuildResolvedCallExpr(), BuildReturnStmt(), BuildVAArgExpr(), BuiltinAlignment(), BuiltinLaunder(), checkBuiltinArgument(), checkEscapingByref(), CheckObjCCollectionLiteralElement(), checkUnknownAnyArg(), convertArgsForAvailabilityChecks(), convertArgumentToType(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), CXXCheckConditionalOperands(), DefaultArgumentPromotion(), GatherArgumentsForCall(), InitializeExplicitObjectArgument(), makeAttributeArgExpr(), makeLaunchBoundsArgExpr(), PerformMoveOrCopyInitialization(), and PrepareArgumentsForCallToObjectOfClassType().
| void Sema::PerformDependentDiagnostics | ( | const DeclContext * | Pattern, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 7283 of file SemaTemplateInstantiateDecl.cpp.
References clang::DependentDiagnostic::Access, clang::DeclContext::ddiags(), and HandleDependentAccessCheck().
Referenced by InstantiateFunctionDefinition().
| void clang::Sema::performFunctionEffectAnalysis | ( | TranslationUnitDecl * | TU | ) |
Definition at line 1514 of file SemaFunctionEffects.cpp.
References Diags, and hasUncompilableErrorOccurred().
Referenced by ActOnEndOfTranslationUnit().
| 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 1883 of file SemaOverload.cpp.
References checkPlaceholderForOverload(), clang::ExprError(), clang::Stmt::getBeginLoc(), getLangOpts(), clang::Expr::getType(), clang::ObjC, ObjC(), clang::Passing, PerformImplicitConversion(), clang::Sending, and TryImplicitConversion().
| ExprResult Sema::PerformImplicitConversion | ( | Expr * | From, |
| QualType | ToType, | ||
| const ImplicitConversionSequence & | ICS, | ||
| AssignmentAction | Action, | ||
| CheckedConversionKind | CCK = CheckedConversionKind::Implicit ) |
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 4590 of file SemaExprCXX.cpp.
References clang::UserDefinedConversionSequence::After, clang::ImplicitConversionSequence::AmbiguousConversion, clang::ImplicitConversionSequence::BadConversion, clang::UserDefinedConversionSequence::Before, BuildCXXCastArgument(), clang::cast(), CheckAssignmentConstraints(), clang::Compatible, Context, clang::UserDefinedConversionSequence::ConversionFunction, clang::Converting, clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), DiagnoseAssignmentResult(), clang::ImplicitConversionSequence::EllipsisConversion, clang::UserDefinedConversionSequence::EllipsisConversion, clang::ExprError(), clang::ForBuiltinOverloadedOp, 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::Expr::getType(), clang::ValueDecl::getType(), clang::UserDefinedConversionSequence::HadMultipleCandidates, clang::Incompatible, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isRecordType(), clang::SemaBase::PDiag(), PerformImplicitConversion(), clang::ImplicitConversionSequence::Standard, clang::ImplicitConversionSequence::StandardConversion, clang::ImplicitConversionSequence::StaticObjectArgumentConversion, clang::ImplicitConversionSequence::UserDefined, and clang::ImplicitConversionSequence::UserDefinedConversion.
Referenced by ActOnCXXDelete(), BuildConvertedConstantExpression(), buildCounterInit(), buildCounterUpdate(), BuildCXXNew(), CheckDestructor(), checkOpenMPLoop(), CheckSingleAssignmentConstraints(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), findOMPAllocatorHandleT(), clang::InitializationSequence::Perform(), PerformContextuallyConvertToBool(), PerformContextuallyConvertToObjCPointer(), PerformImplicitConversion(), PerformImplicitConversion(), and widenIterationCount().
| 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 4706 of file SemaExprCXX.cpp.
References adjustVectorType(), Ambiguous, clang::Assigning, BuildCXXConstructExpr(), clang::cast(), clang::Type::castAs(), clang::Type::castAsEnumDecl(), clang::Casting, CheckDerivedToBaseConversion(), CheckExceptionSpecCompatibility(), CheckMemberPointerConversion(), clang::SemaObjC::CheckObjCConversion(), CheckPlaceholderExpr(), CheckPointerConversion(), CheckTransparentUnionArgumentConstraints(), clang::Compatible, clang::Complete, CompleteConstructorCall(), Context, clang::Converting, clang::StandardConversionSequence::CopyConstructor, clang::CPlusPlus11, clang::ImplicitCastExpr::Create(), clang::CStyleCast, DefaultLvalueConversion(), clang::StandardConversionSequence::DeprecatedStringLiteralToCharPtr, clang::SemaBase::Diag(), diagnoseNullableToNonnullConversion(), DiagnoseUseOfDecl(), DifferentPointee, clang::StandardConversionSequence::Dimension, Downcast, clang::SemaObjC::EmitRelatedResultTypeNote(), clang::ExprError(), clang::StandardConversionSequence::First, FixOverloadedFunctionReference(), clang::Found, clang::StandardConversionSequence::FoundCopyConstructor, clang::FunctionalCast, clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), getASTContext(), clang::Stmt::getBeginLoc(), clang::ArrayParameterType::getConstantArrayType(), clang::Expr::getExprLoc(), getLangOpts(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::Expr::getObjectKind(), clang::Type::getPointeeType(), getPointeeType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKind(), clang::AtomicType::getValueType(), clang::Qualifiers::hasUnaligned(), HLSL(), 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_Array_RValue, clang::ICK_HLSL_Matrix_Splat, clang::ICK_HLSL_Matrix_Truncation, clang::ICK_HLSL_Vector_Splat, 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(), Inaccessible, clang::StandardConversionSequence::IncompatibleObjC, clang::Initializing, clang::Qualifiers::isAddressSpaceSupersetOf(), clang::Type::isArrayParameterType(), clang::Type::isBlockPointerType(), clang::Type::isBooleanType(), clang::Type::isBuiltinType(), isCast(), clang::Type::isConstantMatrixType(), clang::EnumDecl::isFixed(), clang::Type::isFixedPointType(), clang::Type::isFloatingType(), clang::Type::isHalfType(), clang::Type::isIntegerType(), clang::Type::isIntegralType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Expr::isNullPointerConstant(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Expr::isPRValue(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), clang::Type::isVectorType(), NotDerived, clang::Expr::NPC_ValueDependentIsNull, ObjC(), clang::OK_ObjCProperty, clang::Passing, clang::Passing_CFAudited, clang::SemaObjC::PrepareCastToObjCObjectPointer(), prepareMatrixSplat(), prepareVectorSplat(), ResolveAddressOfOverloadedFunction(), clang::Returning, ScalarTypeToBooleanCastKind(), clang::StandardConversionSequence::Second, clang::Sending, Success, TemporaryMaterializationConversion(), clang::StandardConversionSequence::Third, Virtual, and clang::VK_PRValue.
| 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 6138 of file SemaOverload.cpp.
References clang::ImplicitConversionSequence::Bad, clang::BadConversionSequence::bad_qualifiers, clang::Expr::Classify(), Context, CreateMaterializeTemporaryExpr(), Diag(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Stmt::getBeginLoc(), clang::Qualifiers::getCVRQualifiers(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), clang::ICK_Derived_To_Base, ImpCastExprToType(), 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::Method, clang::BadConversionSequence::no_conversion, PerformObjectMemberConversion(), 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 BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildCXXMemberCallExpr(), BuildOverloadedArrowExpr(), convertArgsForAvailabilityChecks(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().
| ExprResult Sema::PerformMemberExprBaseConversion | ( | Expr * | Base, |
| bool | IsArrow ) |
Perform conversions on the LHS of a member access expression.
Definition at line 1208 of file SemaExprMember.cpp.
References CheckPlaceholderExpr(), and DefaultFunctionArrayLvalueConversion().
Referenced by LookupMemberExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildMemberExpr().
| 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 3542 of file SemaStmt.cpp.
References Context, clang::CPlusPlus, clang::CPlusPlus11, clang::CPlusPlus23, clang::ImplicitCastExpr::Create(), clang::InitializationKind::CreateCopy(), getLangOpts(), clang::Value::getType(), InitializationSequence, 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().
| 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 3006 of file SemaExpr.cpp.
References clang::Type::castAs(), CheckDerivedToBaseConversion(), Context, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::SourceRange::getBegin(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::getValueKind(), ImpCastExprToType(), clang::isa(), clang::Type::isDependentType(), IsDerivedFrom(), clang::Type::isRecordType(), clang::Member, clang::Method, clang::Qualifiers::setAddressSpace(), and clang::NestedNameSpecifier::Type.
Referenced by BuildFieldReferenceExpr(), PerformImplicitObjectArgumentInitialization(), and clang::TreeTransform< AdjustConstraints >::RebuildMemberExpr().
Performs template instantiation for all implicit template instantiations we have seen until this point.
Definition at line 7191 of file SemaTemplateInstantiateDecl.cpp.
References clang::cast(), Context, clang::ASTContext::forEachMultiversionedFunctionVersion(), clang::Function, getASTContext(), clang::VarDecl::getMostRecentDecl(), clang::VarDecl::getTemplateSpecializationKind(), clang::VarDecl::getTemplateSpecializationKindForInstantiation(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), clang::isa(), clang::FunctionDecl::isDefined(), clang::Decl::isInvalidDecl(), clang::VarDecl::isStaticDataMember(), LangOpts, PendingInstantiations, PendingLocalImplicitInstantiations, clang::FunctionDecl::setInstantiationIsPending(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, clang::TSK_ExplicitSpecialization, clang::TSK_ImplicitInstantiation, clang::TSK_Undeclared, clang::TU_Prefix, and TUKind.
Referenced by ActOnEndOfTranslationUnit(), and ActOnEndOfTranslationUnitFragment().
| ExprResult Sema::PerformQualificationConversion | ( | Expr * | E, |
| QualType | Ty, | ||
| ExprValueKind | VK = VK_PRValue, | ||
| CheckedConversionKind | CCK = CheckedConversionKind::Implicit ) |
Definition at line 7829 of file SemaInit.cpp.
References clang::QualType::getAddressSpace(), clang::Type::getPointeeType(), clang::Expr::getType(), ImpCastExprToType(), and clang::VK_PRValue.
Referenced by clang::InitializationSequence::Perform().
| void Sema::popCodeSynthesisContext | ( | ) |
Definition at line 851 of file SemaTemplateInstantiate.cpp.
References CodeSynthesisContextLookupModules, CodeSynthesisContexts, LastEmittedCodeSynthesisContextDepth, LookupModulesCache, and NonInstantiationEntries.
Referenced by CreateOverloadedBinOp(), DeclareImplicitEqualityComparison(), and ReferenceDllExportedMembers().
| void Sema::PopCompoundScope | ( | ) |
Definition at line 2488 of file Sema.cpp.
References clang::sema::FunctionScopeInfo::CompoundScopes, and getCurFunction().
Referenced by ActOnFinishOfCompoundStmt(), and ActOnFinishTopLevelStmtDecl().
| void Sema::PopDeclContext | ( | ) |
Definition at line 1377 of file SemaDecl.cpp.
References CurContext.
Referenced by ActOnBlockError(), ActOnBlockStmtExpr(), ActOnCapturedRegionEnd(), ActOnCapturedRegionError(), ActOnFinishDelayedMemberDeclarations(), ActOnFinishExportDecl(), ActOnFinishFunctionBody(), ActOnFinishLinkageSpecification(), ActOnFinishNamespaceDef(), ActOnFinishTopLevelStmtDecl(), ActOnLambdaError(), ActOnLambdaExpressionAfterIntroducer(), ActOnTagDefinitionError(), and ActOnTagFinishDefinition().
| void Sema::PopExpressionEvaluationContext | ( | ) |
Definition at line 18341 of file SemaExpr.cpp.
References Cleanup, CleanupVarDeclMarking(), clang::CPlusPlus17, clang::CPlusPlus20, clang::CPlusPlus23, clang::SemaBase::Diag(), DiagnoseMisalignedMembers(), ExprCleanupObjects, clang::Sema::ExpressionEvaluationContextRecord::ExprContext, ExprEvalContexts, clang::Sema::ExpressionEvaluationContextRecord::ForRangeLifetimeExtendTemps, getLangOpts(), HandleImmediateInvocations(), clang::Sema::ExpressionEvaluationContextRecord::InLifetimeExtendingContext, clang::Sema::ExpressionEvaluationContextRecord::isConstantEvaluated(), clang::Sema::ExpressionEvaluationContextRecord::isUnevaluated(), clang::Sema::ExpressionEvaluationContextRecord::Lambdas, MaybeODRUseExprs, clang::Sema::ExpressionEvaluationContextRecord::NumCleanupObjects, clang::Sema::ExpressionEvaluationContextRecord::ParentCleanup, parentEvaluationContext(), clang::Sema::ExpressionEvaluationContextRecord::SavedMaybeODRUseExprs, clang::Sema::ExpressionEvaluationContextRecord::VolatileAssignmentLHSs, and WarnOnPendingNoDerefs().
Referenced by ActOnBlockError(), ActOnBlockStmtExpr(), ActOnCapturedRegionEnd(), ActOnCapturedRegionError(), ActOnCXXExitDeclInitializer(), ActOnLambdaError(), ActOnStmtExprError(), BuildCXXMemberCallExpr(), BuildLambdaExpr(), BuildStmtExpr(), and LookupInlineAsmIdentifier().
| Sema::PoppedFunctionScopePtr Sema::PopFunctionScopeInfo | ( | const sema::AnalysisBasedWarnings::Policy * | WP = nullptr, |
| Decl * | D = nullptr, | ||
| QualType | BlockType = QualType() ) |
Pop a function (or block or lambda or captured region) scope from the stack.
| WP | The warning policy to use for CFG-based warnings, or null if such warnings should not be produced. |
| D | The declaration corresponding to this function scope, if producing CFG-based warnings. |
| BlockType | The type of the block expression, if D is a BlockDecl. |
Definition at line 2449 of file Sema.cpp.
References AnalysisWarnings, clang::SemaBase::Diag(), FunctionScopes, clang::inferNoReturnAttr(), LangOpts, markEscapingByrefs(), and OpenMP().
Referenced by ActOnBlockError(), ActOnBlockStmtExpr(), ActOnCapturedRegionEnd(), ActOnCapturedRegionError(), ActOnFinishCXXInClassMemberInitializer(), ActOnFinishFunctionBody(), ActOnFinishTopLevelStmtDecl(), ActOnLambdaError(), and BuildLambdaExpr().
|
inline |
Definition at line 6576 of file Sema.h.
References clang::Sema::DelayedDiagnostics::popUndelayed().
| void Sema::PopParsingDeclaration | ( | ParsingDeclState | state, |
| Decl * | decl ) |
Definition at line 8569 of file SemaDeclAttr.cpp.
References clang::sema::DelayedDiagnostic::Access, clang::sema::DelayedDiagnostic::Availability, clang::ast_matchers::decl, clang::sema::DelayedDiagnostic::ForbiddenType, clang::Sema::DelayedDiagnostics::getCurrentPool(), clang::sema::DelayedDiagnosticPool::getParent(), HandleDelayedAccessCheck(), handleDelayedAvailabilityCheck(), handleDelayedForbiddenType(), clang::isa(), clang::sema::DelayedDiagnosticPool::pool_begin(), clang::sema::DelayedDiagnosticPool::pool_end(), and clang::Sema::DelayedDiagnostics::popWithoutEmitting().
| 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 1549 of file SemaAttr.cpp.
References clang::SemaBase::Diag(), FreeVisContext(), NoVisibility, and VisContext.
Referenced by ActOnFinishNamespaceDef(), and ActOnPragmaVisibility().
|
inline |
Definition at line 1513 of file Sema.h.
Referenced by BuildCXXThrow(), checkCall(), CheckFieldDecl(), CheckFunctionDeclaration(), CheckParameter(), and CheckVariableDeclarationType().
|
inline |
Definition at line 7997 of file Sema.h.
References Context, and Switch.
Referenced by ActOnCondition().
| bool Sema::PrepareBuiltinElementwiseMathOneArgCall | ( | CallExpr * | TheCall, |
| EltwiseBuiltinArgTyRestriction | ArgTyRestr = EltwiseBuiltinArgTyRestriction::None ) |
Definition at line 16391 of file SemaChecking.cpp.
References BuiltinVectorMathConversions(), checkArgCount(), checkMathBuiltinElementType(), clang::ActionResult< PtrTy, Compress >::get(), clang::CallExpr::getArg(), clang::Stmt::getBeginLoc(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::CallExpr::setArg(), and clang::Expr::setType().
| ExprResult Sema::prepareMatrixSplat | ( | QualType | MatrixTy, |
| Expr * | SplattedExpr ) |
Prepare SplattedExpr for a matrix splat operation, adding implicit casts if necessary.
Definition at line 7894 of file SemaExpr.cpp.
References clang::Type::castAs(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getType(), ImpCastExprToType(), clang::Type::isFloatingType(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and PrepareScalarCast().
Referenced by PerformImplicitConversion().
| CastKind Sema::PrepareScalarCast | ( | ExprResult & | src, |
| QualType | destType ) |
Prepares for a scalar cast, performing all the necessary stages except the final cast and returning the kind required.
Definition at line 7484 of file SemaExpr.cpp.
References clang::Type::castAs(), Context, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::ComplexType::getElementType(), clang::Expr::getExprLoc(), clang::Type::getPointeeType(), clang::Type::getScalarTypeKind(), clang::Expr::getType(), ImpCastExprToType(), clang::Expr::isNullPointerConstant(), maybeExtendBlockObject(), clang::Expr::NPC_ValueDependentIsNull, clang::Type::STK_BlockPointer, clang::Type::STK_Bool, clang::Type::STK_CPointer, clang::Type::STK_FixedPoint, clang::Type::STK_Floating, clang::Type::STK_FloatingComplex, clang::Type::STK_Integral, clang::Type::STK_IntegralComplex, clang::Type::STK_MemberPointer, and clang::Type::STK_ObjCObjectPointer.
Referenced by BuildVectorLiteral(), CheckAssignmentConstraints(), CheckConditionalOperands(), CXXCheckConditionalOperands(), prepareMatrixSplat(), and prepareVectorSplat().
| ExprResult Sema::prepareVectorSplat | ( | QualType | VectorTy, |
| Expr * | SplattedExpr ) |
Prepare SplattedExpr for a vector splat operation, adding implicit casts if necessary.
Definition at line 7861 of file SemaExpr.cpp.
References clang::Type::castAs(), Context, clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getType(), ImpCastExprToType(), clang::Type::isBooleanType(), clang::Type::isExtVectorType(), clang::Type::isFloatingType(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and PrepareScalarCast().
Referenced by CheckAssignmentConstraints(), CheckExtVectorCast(), and PerformImplicitConversion().
|
inline |
Definition at line 13684 of file Sema.h.
References getDefaultDiagFunc(), and PrintContextStack().
Referenced by EmitDiagnostic(), and PrintContextStack().
|
inline |
Definition at line 13675 of file Sema.h.
References CodeSynthesisContexts, LastEmittedCodeSynthesisContextDepth, PragmaAttributeCurrentTargetDecl, PrintInstantiationStack(), and PrintPragmaAttributeInstantiationPoint().
Referenced by BuildStaticAssertDeclaration().
|
inline |
Definition at line 13688 of file Sema.h.
References getDefaultDiagFunc(), and PrintInstantiationStack().
Referenced by PrintContextStack(), and PrintInstantiationStack().
| void Sema::PrintInstantiationStack | ( | InstantiationContextDiagFuncRef | DiagFunc | ) |
Prints the current instantiation stack through a series of notes.
Definition at line 901 of file SemaTemplateInstantiate.cpp.
References clang::Sema::DefaultedFunctionKind::asComparison(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::Sema::CodeSynthesisContext::BuildingBuiltinDumpStructCall, clang::Sema::CodeSynthesisContext::BuildingDeductionGuides, clang::cast(), CodeSynthesisContexts, clang::Sema::CodeSynthesisContext::ConstraintNormalization, clang::Sema::CodeSynthesisContext::ConstraintsCheck, clang::Sema::CodeSynthesisContext::ConstraintSubstitution, Context, convertCallArgsToString(), clang::CPlusPlus11, 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, getDefaultedFunctionKind(), getLangOpts(), clang::NamedDecl::getName(), getPrintingPolicy(), getTemplateArgumentBindingsText(), clang::TemplateDecl::getTemplateParameters(), clang::Sema::CodeSynthesisContext::InitializingStructuredBinding, clang::isa(), clang::Sema::DefaultedFunctionKind::isComparison(), clang::Sema::DefaultedFunctionKind::isSpecialMember(), clang::SourceLocation::isValid(), clang::Sema::CodeSynthesisContext::LambdaExpressionSubstitution, clang::Sema::CodeSynthesisContext::MarkingClassDllexported, clang::Sema::CodeSynthesisContext::Memoization, clang::Sema::CodeSynthesisContext::NestedRequirementConstraintsCheck, OS, clang::Sema::CodeSynthesisContext::ParameterMappingSubstitution, clang::Sema::CodeSynthesisContext::PartialOrderingTTP, clang::SemaBase::PDiag(), clang::NamedDecl::printName(), clang::Sema::CodeSynthesisContext::PriorTemplateArgumentSubstitution, clang::Sema::CodeSynthesisContext::RequirementInstantiation, clang::Sema::CodeSynthesisContext::RequirementParameterInstantiation, clang::Sema::CodeSynthesisContext::RewritingOperatorAsSpaceship, clang::Template, clang::Sema::CodeSynthesisContext::TemplateInstantiation, and clang::Sema::CodeSynthesisContext::TypeAliasTemplateInstantiation.
|
inline |
Definition at line 2305 of file Sema.h.
References getDefaultDiagFunc(), and PrintPragmaAttributeInstantiationPoint().
Referenced by PrintContextStack(), and PrintPragmaAttributeInstantiationPoint().
| void Sema::PrintPragmaAttributeInstantiationPoint | ( | InstantiationContextDiagFuncRef | DiagFunc | ) |
Definition at line 1228 of file SemaAttr.cpp.
References clang::SemaBase::PDiag(), and PragmaAttributeCurrentTargetDecl.
| void Sema::PrintStats | ( | ) | const |
Print out statistics about the semantic analysis.
Definition at line 670 of file Sema.cpp.
References AnalysisWarnings, BumpAlloc, getSFINAEContext(), and int.
Referenced by clang::ParseAST().
| bool Sema::ProcessAccessDeclAttributeList | ( | AccessSpecDecl * | ASDecl, |
| const ParsedAttributesView & | AttrList ) |
Annotation attributes are the only attributes allowed after an access specifier.
Definition at line 8271 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), and ProcessDeclAttribute().
Referenced by ActOnAccessSpecifier().
| 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 984 of file SemaAPINotes.cpp.
References APINotes, clang::Class, Context, clang::Found, clang::QualType::getAsString(), getASTContext(), clang::Decl::getDeclContext(), clang::Lexer::getImmediateMacroName(), clang::Decl::getLocation(), clang::Selector::getNameForSlot(), clang::Selector::getNumArgs(), clang::getOperatorSpelling(), getPrintingPolicy(), clang::api_notes::ObjCSelectorRef::Identifiers, clang::isa(), clang::Selector::isUnarySelector(), clang::ObjCPropertyAttribute::kind_class, LangOpts, LookupName(), clang::Method, clang::api_notes::ObjCSelectorRef::NumArgs, ProcessVersionedAPINotes(), clang::Property, clang::T, clang::Typedef, UnwindNamespaceContext(), and UnwindTagContext().
Referenced by ActOnClassTemplateSpecialization(), ActOnEnumBody(), ActOnEnumConstant(), ActOnExplicitInstantiation(), ActOnExplicitInstantiation(), ActOnFields(), ActOnFinishDelayedAttribute(), ActOnTag(), ProcessDeclAttributes(), and setTagNameForLinkagePurposes().
| void Sema::ProcessDeclAttributeDelayed | ( | Decl * | D, |
| const ParsedAttributesView & | AttrList ) |
Helper for delayed processing TransparentUnion or BPFPreserveAccessIndexAttr attribute.
Definition at line 8257 of file SemaDeclAttr.cpp.
References BPF(), clang::cast(), clang::SemaBPF::handlePreserveAIRecord(), handleTransparentUnionAttr(), and clang::Decl::hasAttr().
| void Sema::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.
Definition at line 8148 of file SemaDeclAttr.cpp.
References clang::ParsedAttributesView::begin(), clang::cast(), Context, CUDA(), clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::ParsedAttributesView::empty(), clang::ExpectedKernelFunction, clang::Decl::getAttr(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::hasAttr(), isKernelDecl(), clang::OMF_init, ProcessDeclAttribute(), and clang::Decl::setInvalidDecl().
Referenced by ActOnAliasDeclaration(), ActOnClassTemplateSpecialization(), ActOnDecompositionDeclarator(), ActOnEmptyDeclaration(), ActOnEnumBody(), ActOnEnumConstant(), ActOnExplicitInstantiation(), ActOnExplicitInstantiation(), ActOnFields(), ActOnFinishConceptDefinition(), ActOnFinishDelayedAttribute(), ActOnStartNamespaceDef(), ActOnTag(), ActOnUsingDirective(), AddPragmaAttributes(), BuildUsingDeclaration(), CheckClassTemplate(), and ProcessDeclAttributes().
| void Sema::ProcessDeclAttributes | ( | Scope * | S, |
| Decl * | D, | ||
| const Declarator & | PD ) |
ProcessDeclAttributes - Given a declarator (PD) with attributes indicated in it, apply them to D.
This is a bit tricky because PD can have attributes specified in many different places, and we need to find and apply them all.
Definition at line 8448 of file SemaDeclAttr.cpp.
References clang::ParsedAttributesView::addAtEnd(), AddPragmaAttributes(), clang::Declarator::getAttributes(), clang::DeclSpec::getAttributes(), clang::DeclaratorChunk::getAttrs(), clang::Declarator::getDeclarationAttributes(), clang::Declarator::getDeclSpec(), clang::Declarator::getNumTypeObjects(), clang::Declarator::getTypeObject(), ProcessAPINotes(), and ProcessDeclAttributeList().
Referenced by ActOnBlockArguments(), ActOnExceptionDeclarator(), ActOnFunctionDeclarator(), ActOnParamDeclarator(), ActOnStartOfLambdaDefinition(), ActOnTypedefDeclarator(), ActOnVariableDeclarator(), BuildAnonymousStructOrUnion(), CheckFieldDecl(), and HandleMSProperty().
| void Sema::ProcessPragmaExport | ( | DeclaratorDecl * | newDecl | ) |
Definition at line 7653 of file SemaDecl.cpp.
References clang::CPlusPlus, clang::SemaBase::Diag(), clang::NamedDecl::getIdentifier(), getLangOpts(), clang::NamedDecl::hasExternalFormalLinkage(), clang::isa(), mergeVisibilityType(), and PendingExportedNames.
Referenced by ActOnFunctionDeclarator(), and ActOnVariableDeclarator().
Definition at line 8418 of file SemaDeclAttr.cpp.
References DeclApplyPragmaWeak(), clang::NamedDecl::getIdentifier(), clang::FunctionDecl::isExternC(), LoadExternalWeakUndeclaredIdentifiers(), and WeakUndeclaredIdentifiers.
Referenced by ActOnFunctionDeclarator(), and ActOnVariableDeclarator().
| 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 741 of file SemaStmtAttr.cpp.
References CheckForDuplicateLoopAttrs(), CheckForIncompatibleAttributes(), ProcessStmtAttribute(), and clang::ParsedAttributesView::Range.
Referenced by ActOnAttributedStmt().
| void Sema::propagateDLLAttrToBaseClassTemplate | ( | CXXRecordDecl * | Class, |
| Attr * | ClassAttr, | ||
| ClassTemplateSpecializationDecl * | BaseTemplateSpec, | ||
| SourceLocation | BaseLoc ) |
Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibility.
Definition at line 6684 of file SemaDeclCXX.cpp.
References clang::Decl::addAttr(), clang::cast(), checkClassLevelDLLAttribute(), clang::Class, clang::Attr::clone(), Diag(), getASTContext(), clang::getDLLAttr(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::ClassTemplateSpecializationDecl::getPointOfInstantiation(), clang::ClassTemplateSpecializationDecl::getSpecializationKind(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::ClassTemplateSpecializationDecl::isExplicitSpecialization(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by CheckBaseSpecifier(), and dllExportImportClassTemplateSpecialization().
|
inline |
Definition at line 1518 of file Sema.h.
Referenced by BuildBinOp(), BuildUnaryOp(), and CheckPlaceholderExpr().
Definition at line 2349 of file Sema.cpp.
References clang::Block, CapturingFunctionScopes, FunctionScopes, and clang::SemaBase::getDiagnostics().
Referenced by ActOnBlockStart().
| void Sema::PushCapturedRegionScope | ( | Scope * | RegionScope, |
| CapturedDecl * | CD, | ||
| RecordDecl * | RD, | ||
| CapturedRegionKind | K, | ||
| unsigned | OpenMPCaptureLevel = 0 ) |
Definition at line 2879 of file Sema.cpp.
References CapturingFunctionScopes, Context, clang::CR_OpenMP, FunctionScopes, clang::CapturedDecl::getContextParam(), clang::SemaBase::getDiagnostics(), getLangOpts(), and OpenMP().
Referenced by ActOnCapturedRegionStart(), and ActOnCapturedRegionStart().
| bool Sema::pushCodeSynthesisContext | ( | CodeSynthesisContext | Ctx | ) |
Definition at line 824 of file SemaTemplateInstantiate.cpp.
References CodeSynthesisContexts, clang::Sema::CodeSynthesisContext::InstantiationRange, clang::Sema::CodeSynthesisContext::isInstantiationRecord(), NonInstantiationEntries, clang::Sema::CodeSynthesisContext::PointOfInstantiation, and clang::SemaBase::SemaRef.
Referenced by CreateOverloadedBinOp(), DeclareImplicitEqualityComparison(), and ReferenceDllExportedMembers().
| void Sema::PushCompoundScope | ( | bool | IsStmtExpr | ) |
Definition at line 2483 of file Sema.cpp.
References getCurFPFeatures(), and getCurFunction().
Referenced by ActOnStartOfCompoundStmt(), and ActOnStartTopLevelStmtDecl().
| void Sema::PushDeclContext | ( | Scope * | S, |
| DeclContext * | DC ) |
Set the current declaration context until it gets popped.
Definition at line 1370 of file SemaDecl.cpp.
References CurContext, clang::DeclContext::getLexicalParent(), and clang::Scope::setEntity().
Referenced by ActOnBlockStart(), ActOnCapturedRegionStart(), ActOnCapturedRegionStart(), ActOnLambdaClosureParameters(), ActOnLambdaExpressionAfterIntroducer(), ActOnStartDelayedMemberDeclarations(), ActOnStartExportDecl(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartOfFunctionDef(), ActOnStartRequiresExpr(), ActOnStartTopLevelStmtDecl(), ActOnTagStartDefinition(), and ActOnTranslationUnitScope().
| void Sema::PushExpressionEvaluationContext | ( | ExpressionEvaluationContext | NewContext, |
| Decl * | LambdaContextDecl = nullptr, | ||
| ExpressionEvaluationContextRecord::ExpressionKind | Type = ExpressionEvaluationContextRecord::EK_Other ) |
Definition at line 17850 of file SemaExpr.cpp.
References Cleanup, ExprCleanupObjects, ExprEvalContexts, clang::Sema::ExpressionEvaluationContextRecord::isDiscardedStatementContext(), MaybeODRUseExprs, and parentEvaluationContext().
Referenced by ActOnBlockStart(), ActOnCapturedRegionStart(), ActOnCapturedRegionStart(), ActOnCXXEnterDeclInitializer(), ActOnStartOfFunctionDef(), ActOnStartStmtExpr(), BuildCXXMemberCallExpr(), LookupInlineAsmIdentifier(), PushExpressionEvaluationContext(), and PushExpressionEvaluationContextForFunction().
| void Sema::PushExpressionEvaluationContext | ( | ExpressionEvaluationContext | NewContext, |
| ReuseLambdaContextDecl_t | , | ||
| ExpressionEvaluationContextRecord::ExpressionKind | Type = ExpressionEvaluationContextRecord::EK_Other ) |
Definition at line 17879 of file SemaExpr.cpp.
References ExprEvalContexts, and PushExpressionEvaluationContext().
| void Sema::PushExpressionEvaluationContextForFunction | ( | ExpressionEvaluationContext | NewContext, |
| FunctionDecl * | FD ) |
Definition at line 17886 of file SemaExpr.cpp.
References currentEvaluationContext(), getLangOpts(), ImmediateFunctionContext, clang::Sema::ExpressionEvaluationContextRecord::InDiscardedStatement, clang::Sema::ExpressionEvaluationContextRecord::InImmediateEscalatingFunctionContext, clang::Sema::ExpressionEvaluationContextRecord::InImmediateFunctionContext, clang::Sema::ExpressionEvaluationContextRecord::isConstantEvaluated(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isImmediateEscalating(), clang::Sema::ExpressionEvaluationContextRecord::isImmediateFunctionContext(), clang::isLambdaMethod(), parentEvaluationContext(), and PushExpressionEvaluationContext().
Referenced by ActOnStartOfFunctionDef(), and ActOnStartOfLambdaDefinition().
| void Sema::PushFunctionScope | ( | ) |
Enter a new function scope.
Definition at line 2337 of file Sema.cpp.
References CachedFunctionScope, FunctionScopes, clang::SemaBase::getDiagnostics(), LangOpts, and OpenMP().
Referenced by ActOnStartCXXInClassMemberInitializer(), ActOnStartOfFunctionDef(), and ActOnStartTopLevelStmtDecl().
| LambdaScopeInfo * Sema::PushLambdaScope | ( | ) |
Definition at line 2355 of file Sema.cpp.
References CapturingFunctionScopes, FunctionScopes, and clang::SemaBase::getDiagnostics().
Referenced by RebuildLambdaScopeInfo().
| void Sema::PushNamespaceVisibilityAttr | ( | const VisibilityAttr * | Attr, |
| SourceLocation | Loc ) |
PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.
Definition at line 1540 of file SemaAttr.cpp.
References NoVisibility, and PushPragmaVisibility().
Referenced by ActOnStartNamespaceDef().
Add this decl to the scope shadowed decl chains.
Definition at line 1559 of file SemaDecl.cpp.
References clang::Scope::AddDecl(), clang::cast(), clang::CPlusPlus, CurContext, clang::NamedDecl::declarationReplaces(), clang::DeclContext::Encloses(), clang::NamedDecl::getDeclName(), clang::Scope::getEntity(), clang::Scope::getFnParent(), getLangOpts(), clang::Scope::getParent(), clang::DeclContext::getRedeclContext(), IdResolver, clang::isa(), clang::Scope::isDeclScope(), clang::DeclarationName::isEmpty(), clang::Decl::isOutOfLine(), clang::DeclContext::isTransparentContext(), clang::Scope::RemoveDecl(), and warnOnReservedIdentifier().
Referenced by ActOnAliasDeclaration(), ActOnBlockArguments(), ActOnDecompositionDeclarator(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnFinishConceptDefinition(), ActOnFriendFunctionDecl(), ActOnLambdaClosureParameters(), ActOnLambdaExpressionAfterIntroducer(), ActOnNamespaceAliasDef(), ActOnStartConceptDefinition(), ActOnStartCXXMemberDeclarations(), ActOnStartNamespaceDef(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnStartRequiresExpr(), ActOnStartTrailingRequiresClause(), ActOnTag(), ActOnUsingDeclaration(), ActOnUsingEnumDeclaration(), addImplicitTypedef(), buildImplicitMapper(), BuildUsingShadowDecl(), CheckClassTemplate(), DeclApplyPragmaWeak(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), HandleDeclarator(), HandleField(), HandleMSProperty(), ImplicitlyDefineFunction(), Initialize(), InjectAnonymousStructOrUnionMembers(), LazilyCreateBuiltin(), and LookupOrCreateLabel().
|
inline |
Definition at line 6572 of file Sema.h.
References clang::Sema::DelayedDiagnostics::pushUndelayed().
|
inline |
Definition at line 1411 of file Sema.h.
References clang::Sema::DelayedDiagnostics::push().
|
inline |
Definition at line 14838 of file Sema.h.
References clang::cast(), and clang::Decl::getCanonicalDecl().
| void Sema::PushUsingDirective | ( | Scope * | S, |
| UsingDirectiveDecl * | UDir ) |
Definition at line 12583 of file SemaDeclCXX.cpp.
References clang::DeclContext::addDecl(), clang::Scope::getEntity(), clang::DeclContext::isFunctionOrMethod(), and clang::Scope::PushUsingDirective().
Referenced by ActOnUsingDirective().
| ExprResult Sema::RebuildExprInCurrentInstantiation | ( | Expr * | E | ) |
Definition at line 11496 of file SemaTemplate.cpp.
References clang::Expr::getExprLoc().
Referenced by RebuildDeclaratorInCurrentInstantiation().
| LambdaScopeInfo * Sema::RebuildLambdaScopeInfo | ( | CXXMethodDecl * | CallOperator | ) |
Definition at line 16063 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(), CurContext, CurrentInstantiationScope, clang::sema::LambdaScopeInfo::ExplicitObjectParameter, clang::RecordDecl::field_begin(), clang::DeclarationNameInfo::getCXXOperatorNameRange(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::CXXRecordDecl::getLambdaCaptureDefault(), clang::FunctionDecl::getNameInfo(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::sema::LambdaScopeInfo::GLTemplateParameterList, clang::sema::CapturingScopeInfo::ImpCap_LambdaByref, clang::sema::CapturingScopeInfo::ImpCap_LambdaByval, clang::sema::CapturingScopeInfo::ImpCap_None, clang::sema::CapturingScopeInfo::ImpCaptureStyle, 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().
| bool Sema::RebuildNestedNameSpecifierInCurrentInstantiation | ( | CXXScopeSpec & | SS | ) |
Definition at line 11502 of file SemaTemplate.cpp.
References clang::CXXScopeSpec::Adopt(), Context, clang::SourceRange::getBegin(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getWithLocInContext(), and clang::CXXScopeSpec::isInvalid().
Referenced by ActOnCXXEnterDeclaratorScope(), and RebuildDeclaratorInCurrentInstantiation().
| bool Sema::RebuildTemplateParamsInCurrentInstantiation | ( | TemplateParameterList * | Params | ) |
Rebuild the template parameters now that we know we're in a current instantiation.
Definition at line 11518 of file SemaTemplate.cpp.
References clang::cast(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::isa(), clang::Type::isUndeducedType(), RebuildTemplateParamsInCurrentInstantiation(), RebuildTypeInCurrentInstantiation(), clang::ValueDecl::setType(), clang::DeclaratorDecl::setTypeSourceInfo(), clang::TemplateParameterList::size(), and SubstAutoTypeSourceInfoDependent().
Referenced by ActOnClassTemplateSpecialization(), ActOnFunctionDeclarator(), ActOnVariableDeclarator(), CheckClassTemplate(), and RebuildTemplateParamsInCurrentInstantiation().
| 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.,
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 11486 of file SemaTemplate.cpp.
References clang::T.
Referenced by RebuildDeclaratorInCurrentInstantiation(), and RebuildTemplateParamsInCurrentInstantiation().
| 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 2362 of file Sema.cpp.
References getCurLambda().
| 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 8623 of file SemaDeclAttr.cpp.
References clang::Sema::DelayedDiagnostics::getCurrentPool(), and clang::sema::DelayedDiagnosticPool::steal().
| void Sema::referenceDLLExportedClassMethods | ( | ) |
Definition at line 14623 of file SemaDeclCXX.cpp.
References clang::Class, DelayedDllExportClasses, and ReferenceDllExportedMembers().
Referenced by ActOnFinishCXXNonNestedClass(), and dllExportImportClassTemplateSpecialization().
| void Sema::RefersToMemberWithReducedAlignment | ( | Expr * | E, |
| llvm::function_ref< void(Expr *, RecordDecl *, FieldDecl *, CharUnits)> | Action ) |
This function calls Action when it determines that E designates a misaligned member due to the packed attribute.
This is used to emit local diagnostics like in reference binding.
Definition at line 16274 of file SemaChecking.cpp.
References Context, clang::MemberExpr::getBase(), clang::DeclRefExpr::getDecl(), clang::FieldDecl::getParent(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Qualifiers::hasUnaligned(), clang::Expr::IgnoreParenImpCasts(), clang::isa(), clang::MemberExpr::isArrow(), clang::Decl::isInvalidDecl(), clang::CharUnits::isOne(), and clang::Type::isReferenceType().
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 6819 of file SemaDecl.cpp.
References Context, clang::CPlusPlus, getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::getRedeclContext(), and clang::DeclContext::isTranslationUnit().
Referenced by ActOnFunctionDeclarator(), ActOnVariableDeclarator(), and LazilyCreateBuiltin().
| 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 16109 of file SemaChecking.cpp.
Referenced by FinalizeDeclaration().
Completely replace the auto in TypeWithAuto by Replacement.
This does not retain any auto type sugar.
Definition at line 5409 of file SemaTemplateDeduction.cpp.
| TypeSourceInfo * Sema::ReplaceAutoTypeSourceInfo | ( | TypeSourceInfo * | TypeWithAuto, |
| QualType | Replacement ) |
Definition at line 5416 of file SemaTemplateDeduction.cpp.
Referenced by InventTemplateParameter().
| 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 178 of file SemaCXXScopeSpec.cpp.
References Context, clang::SourceRange::getBegin(), clang::TagDecl::getDefinitionOrSelf(), clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::CXXScopeSpec::getRange(), clang::TagDecl::isBeingDefined(), clang::DeclContext::isDependentContext(), clang::SourceLocation::isInvalid(), RequireCompleteEnumDecl(), RequireCompleteType(), and clang::CXXScopeSpec::SetInvalid().
Referenced by ActOnCXXEnterDeclaratorScope(), ActOnFriendFunctionDecl(), ActOnTag(), BuildCXXNestedNameSpecifier(), BuildUsingDeclaration(), CheckClassTemplate(), CheckTypenameType(), CheckUsingDeclQualifier(), getConstructorName(), getDestructorName(), getTypeName(), HandleDeclarator(), LookupParsedName(), and LookupTemplateName().
| bool Sema::RequireCompleteEnumDecl | ( | EnumDecl * | EnumD, |
| SourceLocation | L, | ||
| CXXScopeSpec * | SS = nullptr ) |
Require that the EnumDecl is completed with its enumerators defined or instantiated.
SS, if provided, is the ScopeRef parsed.
Definition at line 220 of file SemaCXXScopeSpec.cpp.
References Context, Definition, clang::SemaBase::Diag(), diagnoseMissingImport(), clang::EnumDecl::getDefinition(), clang::EnumDecl::getInstantiatedFromMemberEnum(), clang::Decl::getLocation(), clang::EnumDecl::getMemberSpecializationInfo(), clang::CXXScopeSpec::getRange(), getTemplateInstantiationArgs(), clang::MemberSpecializationInfo::getTemplateSpecializationKind(), hasReachableDefinition(), InstantiateEnum(), clang::TagDecl::isCompleteDefinition(), isSFINAEContext(), clang::CXXScopeSpec::SetInvalid(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.
Referenced by BuildUsingEnumDeclaration(), and RequireCompleteDeclContext().
| 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).
| E | The expression whose type is required to be complete. |
| Kind | Selects which completeness rules should be applied. |
| Diagnoser | The object that will emit a diagnostic if the type is incomplete. |
true if the type of E is incomplete and diagnosed, false otherwise. Definition at line 9239 of file SemaType.cpp.
References getCompletedType(), clang::Expr::getExprLoc(), and RequireCompleteType().
Referenced by CheckConditionalOperand(), LookupInlineAsmIdentifier(), RequireCompleteExprType(), RequireCompleteExprType(), and RequireCompleteSizedExprType().
Definition at line 9245 of file SemaType.cpp.
References Default, and RequireCompleteExprType().
|
inline |
Definition at line 15375 of file Sema.h.
References Default, and RequireCompleteExprType().
|
inline |
Definition at line 8273 of file Sema.h.
References Normal, and RequireCompleteExprType().
Referenced by CheckUnaryExprOrTypeTraitOperand().
|
inline |
Definition at line 8266 of file Sema.h.
References Normal, RequireCompleteType(), and clang::T.
Referenced by ActOnFields(), ActOnUninitializedDecl(), BuildArrayType(), BuildCaptureField(), BuildCompoundLiteralExpr(), BuildMicrosoftCAnonymousStruct(), captureInLambda(), CheckAllocatedType(), checkArithmeticIncompletePointerType(), CheckFieldDecl(), CheckUnaryExprOrTypeTraitOperand(), CheckUnaryExprOrTypeTraitOperand(), CreateBuiltinArraySubscriptExpr(), and VerifyBitField().
| 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.
| Loc | The location in the source that the incomplete type diagnostic should refer to. |
| T | The type that this routine is examining for completeness. |
| Kind | Selects which completeness rules should be applied. |
true if T is incomplete and a diagnostic was emitted, false otherwise. Definition at line 9250 of file SemaType.cpp.
References Consumer, and clang::T.
Referenced by ActOnCXXDelete(), ActOnEndOfTranslationUnit(), ActOnFields(), ActOnGCCAsmStmt(), ActOnInitializerError(), actOnOMPReductionKindClause(), ActOnStartCXXMemberReference(), ActOnStartOfFunctionDef(), ActOnUninitializedDecl(), AddInitializerToDecl(), BuildAtomicExpr(), BuildAtomicType(), BuildBuiltinOffsetOf(), BuildCallToObjectOfClassType(), BuildCompoundLiteralExpr(), BuildCXXForRangeStmt(), BuildCXXTypeConstructExpr(), BuildCXXTypeId(), BuildCXXTypeId(), BuildExceptionDeclaration(), buildLambdaScopeReturnType(), BuildOverloadedArrowExpr(), BuildResolvedCallExpr(), BuildVAArgExpr(), BuiltinDumpStruct(), BuiltinIsBaseOf(), BuiltinLaunder(), BuiltinTriviallyRelocate(), CheckAddressOfOperand(), CheckBaseSpecifier(), CheckCallReturnType(), CheckCommaOperands(), CheckComparisonCategoryType(), CheckCompleteParameterTypesForMangler(), CheckCXXThrowOperand(), CheckDeleteOperator(), CheckExplicitlyDefaultedComparison(), CheckFieldDecl(), CheckForModifiableLvalue(), checkHLSLSpirvTypeOperand(), checkIncorrectVTablePointerAuthenticationAttribute(), checkMemberDecomposition(), CheckOverridingFunctionReturnType(), CheckParmsForFunctionDef(), CheckPointerToMemberOperands(), CheckSpecifiedExceptionType(), checkTypeMappable(), CheckUnaryTypeTraitTypeCompleteness(), checkUnknownAnyCast(), ComputeDefaultedSpecialMemberExceptionSpec(), ConvertParamDefaultArgument(), CopyObject(), DefaultVariadicArgumentPromotion(), clang::InitializationSequence::Diagnose(), DiagnoseMultipleUserDefinedConversion(), EvaluateBooleanTypeTrait(), FindAllocationFunctions(), FindInstantiatedDecl(), GatherArgumentsForCall(), GetDecompositionElementCount(), getStdTrait(), GetVTablePointer(), handlePreferredTypeAttr(), IgnoredValueConversions(), lookupCoroutineHandleType(), LookupInlineAsmField(), LookupMemberExpr(), LookupMemberExprInRecord(), lookupPromiseType(), PerformContextualImplicitConversion(), RequireCompleteDeclContext(), RequireCompleteExprType(), RequireCompleteSizedType(), RequireCompleteType(), RequireCompleteType(), RequireCompleteType(), RequireCompleteType(), RequireLiteralType(), RequireStructuralType(), and TemporaryMaterializationConversion().
| bool Sema::RequireCompleteType | ( | SourceLocation | Loc, |
| QualType | T, | ||
| CompleteTypeKind | Kind, | ||
| unsigned | DiagID ) |
Definition at line 9592 of file SemaType.cpp.
References RequireCompleteType(), and clang::T.
|
inline |
Definition at line 15479 of file Sema.h.
References Default, RequireCompleteType(), and clang::T.
|
inline |
Definition at line 15483 of file Sema.h.
References Default, RequireCompleteType(), and clang::T.
|
inline |
Definition at line 15488 of file Sema.h.
References RequireCompleteType(), and clang::T.
| 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.
| Loc | The location in the source that the non-literal type diagnostic should refer to. |
| T | The type that this routine is examining for literalness. |
| Diagnoser | Emits a diagnostic if T is not a literal type. |
true if T is not a literal type and a diagnostic was emitted, false otherwise. Definition at line 9615 of file SemaType.cpp.
References clang::Type::castAsCXXRecordDecl(), Context, clang::CPlusPlus17, clang::CPlusPlus20, clang::Destructor, clang::SemaBase::Diag(), clang::Sema::TypeDiagnoser::diagnose(), getLangOpts(), getLiteralDiagFromTagKind(), clang::Decl::getLocation(), clang::IgnoreTrivialABI, isCompleteType(), clang::Type::isRecordType(), clang::FunctionDecl::isUserProvided(), clang::Type::isVoidType(), RequireCompleteType(), SpecialMemberIsTrivial(), and clang::T.
Referenced by CheckLiteralType(), CheckVariableDeclarationType(), RequireLiteralType(), RequireLiteralType(), and RequireStructuralType().
| bool Sema::RequireLiteralType | ( | SourceLocation | Loc, |
| QualType | T, | ||
| unsigned | DiagID ) |
Definition at line 9704 of file SemaType.cpp.
References RequireLiteralType(), and clang::T.
|
inline |
Definition at line 15444 of file Sema.h.
References RequireLiteralType(), and clang::T.
| bool Sema::RequireNonAbstractType | ( | SourceLocation | Loc, |
| QualType | T, | ||
| TypeDiagnoser & | Diagnoser ) |
Definition at line 6012 of file SemaDeclCXX.cpp.
References Context, clang::Sema::TypeDiagnoser::diagnose(), DiagnoseAbstractType(), isAbstractType(), and clang::T.
Referenced by ActOnFields(), ActOnInitializerError(), ActOnStartOfFunctionDef(), ActOnUninitializedDecl(), AddInitializerToDecl(), BuildArrayType(), BuildCXXCastArgument(), BuildExceptionDeclaration(), BuildVAArgExpr(), captureInLambda(), CheckAllocatedType(), CheckCXXThrowOperand(), CheckFieldDecl(), CheckParmsForFunctionDef(), clang::InitializationSequence::Perform(), and RequireNonAbstractType().
|
inline |
Definition at line 6264 of file Sema.h.
References RequireNonAbstractType(), and clang::T.
| bool Sema::RequireStructuralType | ( | QualType | T, |
| SourceLocation | Loc ) |
Require the given type to be a structural type, and diagnose if it is not.
true if an error was produced. Definition at line 1351 of file SemaTemplate.cpp.
References clang::AS_public, Context, clang::CPlusPlus20, clang::SemaBase::Diag(), getLangOpts(), RequireCompleteType(), RequireLiteralType(), and clang::T.
Referenced by CheckNonTypeTemplateParameterType().
|
inline |
Definition at line 11369 of file Sema.h.
References CurFPFeatures, FpPragmaStack, clang::FPOptions::getChangesFrom(), and LangOpts.
| FunctionDecl * Sema::ResolveAddressOfOverloadedFunction | ( | Expr * | AddressOfExpr, |
| QualType | TargetType, | ||
| bool | Complain, | ||
| DeclAccessPair & | Found, | ||
| bool * | pHadMultipleCandidates = nullptr ) |
ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over.over]), where From is an expression with overloaded function type and ToType is the type we're trying to resolve to.
For example:
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 13953 of file SemaOverload.cpp.
References CheckAddressOfMemberAccess(), Context, clang::Expr::getExprLoc(), clang::Expr::getType(), and ResolveExceptionSpec().
Referenced by CheckSingleAssignmentConstraints(), CheckTemplateArgument(), clang::InitializationSequence::Diagnose(), clang::InitializationSequence::InitializeFrom(), IsStandardConversion(), PerformImplicitConversion(), ResolveOverloadedFunctionForReferenceBinding(), TryListConversion(), and TryReferenceInit().
| FunctionDecl * Sema::resolveAddressOfSingleOverloadCandidate | ( | Expr * | E, |
| DeclAccessPair & | FoundResult ) |
Given an expression that refers to an overloaded function, try to resolve that function to a single function that can have its address taken.
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 13993 of file SemaOverload.cpp.
References checkAddressOfFunctionIsAvailable(), clang::CUDA, CUDA(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), getCurFunctionDecl(), getLangOpts(), getMoreConstrainedFunction(), getMorePartialOrderingConstrained(), and clang::Result.
Referenced by resolveAndFixAddressOfSingleOverloadCandidate(), and ResolveOverloadForDeduction().
| 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 14085 of file SemaOverload.cpp.
References CheckAddressOfMemberAccess(), Context, DefaultFunctionArrayConversion(), DiagnoseUseOfDecl(), FixOverloadedFunctionReference(), clang::Found, clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isFunctionType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and resolveAddressOfSingleOverloadCandidate().
Referenced by CheckPlaceholderExpr().
| bool Sema::ResolveAndFixSingleFunctionTemplateSpecialization | ( | ExprResult & | SrcExpr, |
| bool | DoFunctionPointerConversion = false, | ||
| bool | Complain = false, | ||
| SourceRange | OpRangeForComplaining = SourceRange(), | ||
| QualType | DestTypeForComplaining = QualType(), | ||
| unsigned | DiagIDForComplaining = 0 ) |
Definition at line 14196 of file SemaOverload.cpp.
References clang::cast(), Context, DefaultFunctionArrayLvalueConversion(), Diag(), DiagnoseUseOfDecl(), clang::ExprError(), clang::OverloadExpr::FindResult::Expression, clang::OverloadExpr::find(), FixOverloadedFunctionReference(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::OverloadExpr::getName(), clang::OverloadExpr::getQualifierLoc(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::OverloadExpr::FindResult::HasFormOfMemberPointer, clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::ActionResult< PtrTy, Compress >::isUsable(), NoteAllOverloadCandidates(), and ResolveSingleFunctionTemplateSpecialization().
Referenced by CheckPlaceholderExpr().
| const FunctionProtoType * clang::Sema::ResolveExceptionSpec | ( | SourceLocation | Loc, |
| const FunctionProtoType * | FPT ) |
Definition at line 209 of file SemaExceptionSpec.cpp.
References clang::Type::castAs(), clang::SemaBase::Diag(), clang::EST_Unevaluated, clang::EST_Unparsed, EvaluateImplicitExceptionSpec(), clang::FunctionProtoType::getExceptionSpecDecl(), clang::FunctionProtoType::getExceptionSpecType(), clang::ValueDecl::getType(), InstantiateExceptionSpec(), and clang::isUnresolvedExceptionSpec().
Referenced by ActOnStartOfFunctionDef(), BuildDeclRefExpr(), BuildMemberExpr(), canCalleeThrow(), clang::CheckEquivalentExceptionSpecImpl(), checkEscapingByref(), CheckExceptionSpecSubset(), CheckFunctionTemplateSpecialization(), completeFunctionType(), CreateFunctionRefExpr(), DefineDefaultedComparison(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), MarkFunctionReferenced(), MarkVirtualMemberExceptionSpecsNeeded(), and ResolveAddressOfOverloadedFunction().
| FunctionDecl * Sema::ResolveSingleFunctionTemplateSpecialization | ( | OverloadExpr * | ovl, |
| bool | Complain = false, | ||
| DeclAccessPair * | Found = nullptr, | ||
| TemplateSpecCandidateSet * | FailedTSC = nullptr, | ||
| bool | ForTypeDeduction = false ) |
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 14112 of file SemaOverload.cpp.
References clang::TemplateSpecCandidateSet::addCandidate(), completeFunctionType(), Context, clang::OverloadExpr::copyTemplateArgumentsInto(), clang::OverloadExpr::decls_begin(), clang::OverloadExpr::decls_end(), DeduceTemplateArguments(), Diag(), FunctionTemplate, clang::Expr::getExprLoc(), clang::OverloadExpr::getName(), clang::OverloadExpr::getNameLoc(), clang::ValueDecl::getType(), clang::OverloadExpr::hasExplicitTemplateArgs(), isSameOrCompatibleFunctionType(), clang::MakeDeductionFailureInfo(), NoteAllOverloadCandidates(), clang::Result, clang::TemplateSpecCandidate::set(), clang::Specialization, and clang::Success.
Referenced by CheckAddressOfOperand(), handleCleanupAttr(), handleRestrictAttr(), ResolveAndFixSingleFunctionTemplateSpecialization(), and ResolveOverloadForDeduction().
| void Sema::RestoreNestedNameSpecifierAnnotation | ( | void * | Annotation, |
| SourceRange | AnnotationRange, | ||
| CXXScopeSpec & | SS ) |
Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.
| Annotation | The annotation pointer, produced by SaveNestedNameSpecifierAnnotation(). |
| AnnotationRange | The source range corresponding to the annotation. |
| SS | The nested-name-specifier that will be updated with the contents of the annotation pointer. |
Definition at line 958 of file SemaCXXScopeSpec.cpp.
References clang::CXXScopeSpec::Adopt(), and clang::CXXScopeSpec::SetInvalid().
|
inline |
Definition at line 1523 of file Sema.h.
Referenced by checkTypeSupport(), CheckVariableDeclarationType(), handleBuiltinAliasAttr(), handleInterruptAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), and LookupBuiltin().
| 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 625 of file Sema.cpp.
Referenced by BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), CheckCXXDefaultArgExpr(), CheckIfFunctionSpecializationIsImmediate(), completeExprArrayBound(), DeduceReturnType(), DeduceTemplateArguments(), DeduceTemplateArguments(), DeduceTemplateArguments(), DeduceTemplateArguments(), DeduceTemplateArgumentsFromType(), DoMarkVarDeclReferenced(), isAtLeastAsSpecializedAs(), isAtLeastAsSpecializedAs(), isTemplateTemplateParameterAtLeastAsSpecializedAs(), LookupConstructors(), LookupSpecialMember(), MarkFunctionReferenced(), PerformConstructorInitialization(), SubstDecl(), and SubstDefaultArgument().
|
inline |
Definition at line 14846 of file Sema.h.
References clang::cast(), and clang::Decl::getCanonicalDecl().
Referenced by DiagRecursiveConstraintEval().
| 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.
| SS | A nested-name-specifier. |
SS. Definition at line 944 of file SemaCXXScopeSpec.cpp.
References Context, clang::CXXScopeSpec::getScopeRep(), clang::CXXScopeSpec::isEmpty(), clang::CXXScopeSpec::isInvalid(), clang::CXXScopeSpec::location_data(), clang::CXXScopeSpec::location_size(), and memcpy().
ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ScalarTy to the Boolean type.
Definition at line 849 of file Sema.cpp.
References clang::Type::getScalarTypeKind(), clang::Type::STK_BlockPointer, clang::Type::STK_Bool, clang::Type::STK_CPointer, clang::Type::STK_FixedPoint, clang::Type::STK_Floating, clang::Type::STK_FloatingComplex, clang::Type::STK_Integral, clang::Type::STK_IntegralComplex, clang::Type::STK_MemberPointer, and clang::Type::STK_ObjCObjectPointer.
Referenced by CreateBuiltinUnaryOp(), and PerformImplicitConversion().
| ObjCMethodDecl * Sema::SelectBestMethod | ( | Selector | Sel, |
| MultiExprArg | Args, | ||
| bool | IsInstance, | ||
| SmallVectorImpl< ObjCMethodDecl * > & | Methods ) |
Definition at line 7392 of file SemaOverload.cpp.
References b, Context, DefaultVariadicArgumentPromotion(), getLangOpts(), clang::Selector::getNumArgs(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Expr::hasPlaceholderType(), clang::ICK_Incompatible_Pointer_Conversion, clang::ImplicitConversionSequence::isBad(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Type::isObjCIdType(), clang::ImplicitConversionSequence::isStandard(), clang::Match, clang::Method, clang::ObjC, clang::StandardConversionSequence::Second, clang::ImplicitConversionSequence::Standard, and TryCopyInitialization().
| bool Sema::SetCtorInitializers | ( | CXXConstructorDecl * | Constructor, |
| bool | AnyErrors, | ||
| ArrayRef< CXXCtorInitializer * > | Initializers = {} ) |
Definition at line 5437 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), BuildImplicitBaseInitializer(), clang::C, CollectFieldInitializer(), clang::Constructor, Context, clang::DeclContext::decls(), Diag(), DiagnoseAbstractType(), clang::FieldDecl::getCanonicalDecl(), clang::TagDecl::getCanonicalDecl(), clang::FieldDecl::getParent(), clang::RecordDecl::hasFlexibleArrayMember(), clang::Initializer, clang::CXXRecordDecl::isAbstract(), clang::TagDecl::isUnion(), MarkBaseDestructorsReferenced(), MarkFieldDestructorReferenced(), clang::Member, memcpy(), and clang::CXXRecordDecl::vbases().
Referenced by ActOnDefaultCtorInitializers(), ActOnMemInitializers(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitMoveConstructor(), and DefineInheritingConstructor().
| void Sema::SetDeclDefaulted | ( | Decl * | dcl, |
| SourceLocation | DefaultLoc ) |
Definition at line 18553 of file SemaDeclCXX.cpp.
References clang::Sema::DefaultedFunctionKind::asComparison(), clang::Sema::DefaultedFunctionKind::asSpecialMember(), clang::cast(), CheckExplicitlyDefaultedComparison(), CheckExplicitlyDefaultedSpecialMember(), clang::CPlusPlus20, DefineDefaultedComparison(), DefineDefaultedFunction(), Diag(), clang::FunctionDecl::getCanonicalDecl(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), getDefaultedFunctionKind(), getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::isa(), clang::Sema::DefaultedFunctionKind::isComparison(), clang::TagDecl::isCompleteDefinition(), clang::FunctionDecl::isDefaulted(), clang::Decl::isInvalidDecl(), clang::Decl::setInvalidDecl(), and ThreeWay.
Referenced by InstantiateFunctionDefinition(), and SetFunctionBodyKind().
| void Sema::SetDeclDeleted | ( | Decl * | dcl, |
| SourceLocation | DelLoc, | ||
| StringLiteral * | Message = nullptr ) |
Definition at line 18500 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), Diag(), clang::getDLLAttr(), and clang::TSK_ExplicitSpecialization.
Referenced by ActOnFields(), CheckExplicitlyDefaultedComparison(), CheckExplicitlyDefaultedSpecialMember(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), findInheritingConstructor(), and SetFunctionBodyKind().
| bool Sema::SetDelegatingInitializer | ( | CXXConstructorDecl * | Constructor, |
| CXXCtorInitializer * | Initializer ) |
Definition at line 5322 of file SemaDeclCXX.cpp.
References clang::Constructor, Context, DelegatingCtorDecls, DiagnoseUseOfDecl(), clang::Initializer, LookupDestructor(), MarkFunctionReferenced(), and memcpy().
Referenced by ActOnMemInitializers().
| void Sema::setExceptionMode | ( | SourceLocation | Loc, |
| LangOptions::FPExceptionModeKind | FPE ) |
Called to set exception behavior for floating point operations.
Definition at line 1503 of file SemaAttr.cpp.
References clang::FPOptionsOverride::applyOverrides(), CurFPFeatureOverrides(), CurFPFeatures, FpPragmaStack, getLangOpts(), and PSK_Set.
Referenced by ActOnPragmaFPExceptions().
| void Sema::SetFunctionBodyKind | ( | Decl * | D, |
| SourceLocation | Loc, | ||
| FnBodyKind | BodyKind, | ||
| StringLiteral * | DeletedMessage = nullptr ) |
Definition at line 18663 of file SemaDeclCXX.cpp.
References Default, Delete, Other, SetDeclDefaulted(), and SetDeclDeleted().
| void Sema::setFunctionHasBranchIntoScope | ( | ) |
Definition at line 2499 of file Sema.cpp.
References FunctionScopes.
Referenced by ActOnGCCAsmStmt(), ActOnGotoStmt(), and ActOnStartOfSwitchStmt().
| void Sema::setFunctionHasBranchProtectedScope | ( | ) |
Definition at line 2504 of file Sema.cpp.
References FunctionScopes.
Referenced by ActOnBlockStmtExpr(), ActOnEndOfDeferStmt(), ActOnGotoStmt(), ActOnIndirectGotoStmt(), ActOnLabelStmt(), ActOnMSAsmStmt(), ActOnStartStmtExpr(), ActOnUninitializedDecl(), AddInitializerToDecl(), BuildIfStmt(), CheckCompleteVariableDeclaration(), CheckTypedefForVariablyModifiedType(), CheckVariableDeclarationType(), and setBranchProtectedScope().
| void Sema::setFunctionHasIndirectGoto | ( | ) |
Definition at line 2509 of file Sema.cpp.
References FunctionScopes.
Referenced by ActOnIndirectGotoStmt().
| void Sema::setFunctionHasMustTail | ( | ) |
Definition at line 2514 of file Sema.cpp.
References FunctionScopes.
Referenced by BuildAttributedStmt().
|
inline |
Definition at line 1334 of file Sema.h.
References LateTemplateParser, and OpaqueParser.
| 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 35 of file SemaAccess.cpp.
References clang::AS_none, clang::SemaBase::Diag(), clang::Decl::getAccess(), clang::Decl::getLocation(), and clang::Decl::setAccess().
Referenced by ActOnTag(), and CheckClassTemplate().
| void Sema::SetParamDefaultArgument | ( | ParmVarDecl * | Param, |
| Expr * | DefaultArg, | ||
| SourceLocation | EqualLoc ) |
Definition at line 309 of file SemaDeclCXX.cpp.
References UnparsedDefaultArgInstantiations.
Referenced by ActOnParamDefaultArgument().
| void Sema::setTagNameForLinkagePurposes | ( | TagDecl * | TagFromDeclSpec, |
| TypedefNameDecl * | NewTD ) |
Definition at line 5126 of file SemaDecl.cpp.
References Context, clang::CPlusPlus, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::NamedDecl::getIdentifier(), clang::TagDecl::getInnerLocStart(), getLangOpts(), clang::Decl::getLocation(), getLocForEndOfToken(), clang::IdentifierInfo::getName(), getNonCLikeKindForAnonymousStruct(), clang::TypedefNameDecl::getUnderlyingType(), clang::NamedDecl::hasLinkageBeenComputed(), clang::TagDecl::hasNameForLinkage(), clang::isa(), clang::Decl::isInvalidDecl(), clang::TagDecl::isThisDeclarationADefinition(), ProcessAPINotes(), and clang::TagDecl::setTypedefNameForAnonDecl().
Referenced by ActOnAliasDeclaration(), and ParseTypedefDecl().
| bool Sema::ShouldDeleteSpecialMember | ( | CXXMethodDecl * | MD, |
| CXXSpecialMemberKind | 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 9874 of file SemaDeclCXX.cpp.
References Context, clang::CopyAssignment, clang::CopyConstructor, clang::CXXRecordDecl::ctors(), clang::CUDA, CUDA(), clang::DefaultConstructor, clang::Destructor, Diag(), Diagnose, FindDeallocationFunction(), getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), getSpecialMember(), clang::CXXRecordDecl::hasUserDeclaredMoveAssignment(), clang::CXXRecordDecl::hasUserDeclaredMoveConstructor(), 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(), clang::LangOptionsBase::MSVC2015, clang::No, and ShouldUseTypeAwareOperatorNewOrDelete().
Referenced by ActOnFields(), CheckExplicitlyDefaultedSpecialMember(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DiagnoseDeletedDefaultedFunction(), findInheritingConstructor(), and NoteDeletedInheritingConstructor().
| std::pair< AvailabilityResult, const NamedDecl * > Sema::ShouldDiagnoseAvailabilityOfDecl | ( | const NamedDecl * | D, |
| std::string * | Message, | ||
| ObjCInterfaceDecl * | ClassReceiver ) |
The diagnostic we should emit for D, and the declaration that originated it, or AR_Available.
| D | The declaration to check. |
| Message | If non-null, this will be populated with the message from the availability attribute that is selected. |
| ClassReceiver | If we're checking the method of a class message send, the class. Otherwise nullptr. |
Definition at line 94 of file SemaAvailability.cpp.
References clang::AR_Available, getASTContext(), clang::Decl::getAvailability(), clang::Init, clang::isa(), clang::ObjCInterfaceDecl::lookupInstanceMethod(), ObjC(), clang::Result, and clang::T.
Referenced by DiagnoseAvailabilityOfDecl(), and InstantiateClassTemplateSpecialization().
| bool Sema::ShouldEnterDeclaratorScope | ( | Scope * | S, |
| const CXXScopeSpec & | SS ) |
Definition at line 971 of file SemaCXXScopeSpec.cpp.
References CurContext, clang::NestedNameSpecifier::getKind(), clang::CXXScopeSpec::getScopeRep(), clang::NestedNameSpecifier::Global, clang::isa(), clang::CXXScopeSpec::isSet(), clang::NestedNameSpecifier::MicrosoftSuper, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::Null, and clang::NestedNameSpecifier::Type.
| bool Sema::shouldIgnoreInHostDeviceCheck | ( | FunctionDecl * | Callee | ) |
Definition at line 21117 of file SemaDecl.cpp.
References CUDA(), clang::Global, clang::SemaCUDA::IdentifyTarget(), and LangOpts.
Checks if the new declaration declared in dependent context must be put in the same redeclaration chain as the specified declaration.
| D | Declaration that is checked. |
| PrevDecl | Previous declaration found with proper lookup method for the same declaration name. |
Definition at line 11336 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().
| SkipBodyInfo Sema::shouldSkipAnonEnumBody | ( | Scope * | S, |
| IdentifierInfo * | II, | ||
| SourceLocation | IILoc ) |
Determine whether the body of an anonymous enumeration should be skipped.
| II | The name of the first enumerator. |
Definition at line 20439 of file SemaDecl.cpp.
References clang::cast(), clang::CPlusPlus, forRedeclarationInCurContext(), clang::NamedDecl::getDeclName(), getLangOpts(), hasVisibleDefinition(), LookupOrdinaryName, LookupSingleName(), and clang::sema::Skip.
| bool Sema::ShouldSplatAltivecScalarInCast | ( | const VectorType * | VecTy | ) |
Definition at line 2721 of file SemaCast.cpp.
References clang::AltiVecBool, clang::AltiVecPixel, clang::AltiVecVector, getLangOpts(), clang::VectorType::getVectorKind(), and clang::LangOptionsBase::XL.
Referenced by BuildVectorLiteral().
| TypeAwareAllocationMode Sema::ShouldUseTypeAwareOperatorNewOrDelete | ( | ) | const |
Definition at line 16449 of file SemaDeclCXX.cpp.
References Context, and clang::typeAwareAllocationModeFromBool().
Referenced by ActOnCXXDelete(), BuildCXXNew(), FindDeallocationFunctionForDestructor(), and ShouldDeleteSpecialMember().
| bool Sema::ShouldWarnIfUnusedFileScopedDecl | ( | const DeclaratorDecl * | D | ) | const |
Definition at line 1911 of file SemaDecl.cpp.
References Context, clang::Decl::getDeclContext(), clang::Decl::getLexicalDeclContext(), clang::Decl::hasAttr(), clang::DeclContext::isDependentContext(), IsDisallowedCopyOrAssign(), clang::Decl::isInvalidDecl(), isMainFileLoc(), clang::Decl::isUsed(), clang::TSK_ExplicitSpecialization, and clang::TSK_ImplicitInstantiation.
Referenced by MarkUnusedFileScopedDecl(), and ShouldRemoveFromUnused().
| bool Sema::SpecialMemberIsTrivial | ( | CXXMethodDecl * | MD, |
| CXXSpecialMemberKind | CSM, | ||
| TrivialABIHandling | TAH = TrivialABIHandling::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 10302 of file SemaDeclCXX.cpp.
References clang::CXXRecordDecl::bases(), checkTrivialClassMembers(), checkTrivialSubobjectCall(), clang::Qualifiers::Const, Context, clang::CopyAssignment, clang::CopyConstructor, clang::DefaultConstructor, clang::Destructor, Diag(), Diagnose, clang::Type::getAs(), clang::CXXBaseSpecifier::getBeginLoc(), clang::QualType::getCVRQualifiers(), clang::Decl::getLocation(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionDecl::getNonObjectParameter(), clang::FunctionDecl::getNumParams(), clang::CXXRecordDecl::getNumVBases(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ReferenceType::getPointeeType(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Invalid, clang::QualType::isConstQualified(), clang::CXXRecordDecl::isDynamicClass(), clang::FunctionDecl::isUserProvided(), clang::FunctionDecl::isVariadic(), clang::CXXBaseSpecifier::isVirtual(), clang::CXXMethodDecl::isVirtual(), clang::CXXRecordDecl::methods(), clang::MoveAssignment, clang::MoveConstructor, TSK_BaseClass, and clang::CXXRecordDecl::vbases_begin().
Referenced by CheckCompletedCXXClass(), checkTrivialSubobjectCall(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), and RequireLiteralType().
Substitute Replacement for auto in TypeWithAuto.
Definition at line 5380 of file SemaTemplateDeduction.cpp.
References Context.
Referenced by CheckExplicitlyDefaultedComparison(), DeduceTemplateArguments(), and MergeFunctionDecl().
Definition at line 5394 of file SemaTemplateDeduction.cpp.
References clang::isa().
Referenced by BuildCXXForRangeStmt(), buildTypeForLambdaCallOperator(), CheckFunctionDeclaration(), CheckTemplateArgument(), DeduceTemplateArguments(), and MergeFunctionDecl().
| TypeSourceInfo * Sema::SubstAutoTypeSourceInfo | ( | TypeSourceInfo * | TypeWithAuto, |
| QualType | Replacement ) |
Substitute Replacement for auto in TypeWithAuto.
Definition at line 5387 of file SemaTemplateDeduction.cpp.
References Context.
Referenced by DeduceTemplateSpecializationFromInitializer().
| TypeSourceInfo * Sema::SubstAutoTypeSourceInfoDependent | ( | TypeSourceInfo * | TypeWithAuto | ) |
Definition at line 5402 of file SemaTemplateDeduction.cpp.
References clang::TypeSourceInfo::getType(), and clang::isa().
Referenced by CheckNonTypeTemplateParameterType(), DeduceTemplateSpecializationFromInitializer(), and RebuildTemplateParamsInCurrentInstantiation().
| 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 3319 of file SemaTemplateInstantiate.cpp.
References AttachBaseSpecifiers(), clang::CXXRecordDecl::bases(), CheckBaseSpecifier(), Context, clang::UnexpandedInfo::Expand, clang::UnexpandedInfo::ExpandUnderForgetSubstitions, clang::Invalid, clang::UnexpandedInfo::NumExpansions, PreparePackForExpansion(), clang::Decl::setInvalidDecl(), and SubstType().
| ExprResult Sema::SubstConceptTemplateArguments | ( | const ConceptSpecializationExpr * | CSE, |
| const Expr * | ConstraintExpr, | ||
| const MultiLevelTemplateArgumentList & | MLTAL ) |
Substitute concept template arguments in the constraint expression of a concept-id.
This is used to implement [temp.constr.normal].
Definition at line 4382 of file SemaTemplateInstantiate.cpp.
References clang::ASTTemplateArgumentListInfo::arguments(), clang::TemplateArgumentListInfo::arguments(), clang::BinaryOperator::Create(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::TemplateArgumentLoc::getArgument(), clang::ASTTemplateArgumentListInfo::getLAngleLoc(), clang::Decl::getLexicalDeclContext(), clang::BinaryOperator::getLHS(), clang::ConceptSpecializationExpr::getNamedConcept(), clang::ASTTemplateArgumentListInfo::getNumTemplateArgs(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getOperatorLoc(), clang::ASTTemplateArgumentListInfo::getRAngleLoc(), clang::BinaryOperator::getRHS(), clang::Stmt::getStmtClass(), clang::ASTTemplateArgumentListInfo::getTemplateArgs(), clang::ConceptSpecializationExpr::getTemplateArgsAsWritten(), getTemplateInstantiationArgs(), clang::TemplateArgument::isConceptOrConceptTemplateParameter(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::OK_Ordinary, Sema(), clang::SemaBase::SemaRef, and clang::VK_PRValue.
Referenced by SubstituteConceptsInConstraintExpression().
| ExprResult Sema::SubstConstraintExpr | ( | Expr * | E, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 4364 of file SemaTemplateInstantiate.cpp.
References SubstExpr().
| ExprResult Sema::SubstConstraintExprWithoutSatisfaction | ( | Expr * | E, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 4371 of file SemaTemplateInstantiate.cpp.
Referenced by SubstituteConstraintExpressionWithoutSatisfaction().
| ExprResult Sema::SubstCXXIdExpr | ( | Expr * | E, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Substitute an expression as if it is a address-of-operand, which makes it act like a CXXIdExpression rather than an attempt to call.
Definition at line 4353 of file SemaTemplateInstantiate.cpp.
| Decl * Sema::SubstDecl | ( | Decl * | D, |
| DeclContext * | Owner, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 4732 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::getLocation(), clang::Decl::isInvalidDecl(), and runWithSufficientStackSpace().
Referenced by ConvertDeducedTemplateArgument(), FindInstantiatedDecl(), FinishTemplateArgumentDeduction(), InstantiateFunctionDeclaration(), and InstantiateVariableDefinition().
| DeclarationNameInfo Sema::SubstDeclarationNameInfo | ( | const DeclarationNameInfo & | NameInfo, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Do template substitution on declaration name info.
Definition at line 4529 of file SemaTemplateInstantiate.cpp.
References clang::DeclarationNameInfo::getLoc(), and clang::DeclarationNameInfo::getName().
Referenced by FindInstantiatedDecl().
| bool Sema::SubstDefaultArgument | ( | SourceLocation | Loc, |
| ParmVarDecl * | Param, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| bool | ForCallExpr = false ) |
Substitute the given template arguments into the default argument.
Definition at line 3168 of file SemaTemplateInstantiate.cpp.
References ActOnFinishFullExpr(), clang::cast(), Context, ConvertParamDefaultArgument(), clang::InitializationKind::CreateCopy(), clang::Sema::RecursiveInstGuard::DefaultArgument, clang::SemaBase::Diag(), clang::Stmt::getBeginLoc(), clang::MultiLevelTemplateArgumentList::getInnermost(), clang::Stmt::getSourceRange(), clang::FunctionDecl::getTemplateInstantiationPattern(), InitializationSequence, clang::InitializedEntity::InitializeParameter(), clang::Sema::InstantiatingTemplate::isInvalid(), PotentiallyEvaluated, clang::Result, runWithSufficientStackSpace(), and SubstInitializer().
Referenced by InstantiateDefaultArgument().
| TemplateArgumentLoc Sema::SubstDefaultTemplateArgumentIfAvailable | ( | TemplateDecl * | Template, |
| SourceLocation | TemplateKWLoc, | ||
| SourceLocation | TemplateNameLoc, | ||
| 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.
Definition at line 5438 of file SemaTemplate.cpp.
References clang::cast(), Context, clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateArgumentLoc::getTemplateNameLoc(), hasReachableDefaultArgument(), clang::TemplateName::isNull(), SubstDefaultTemplateArgument(), and clang::Template.
Referenced by CheckTemplateArgumentList(), and ConvertDeducedTemplateArguments().
| void Sema::SubstExceptionSpec | ( | FunctionDecl * | New, |
| const FunctionProtoType * | Proto, | ||
| const MultiLevelTemplateArgumentList & | Args ) |
Definition at line 2898 of file SemaTemplateInstantiate.cpp.
References clang::EST_None, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::getExtProtoInfo(), New, SubstExceptionSpec(), clang::FunctionProtoType::ExceptionSpecInfo::Type, and UpdateExceptionSpec().
Referenced by InstantiateExceptionSpec(), and SubstExceptionSpec().
| bool Sema::SubstExceptionSpec | ( | SourceLocation | Loc, |
| FunctionProtoType::ExceptionSpecInfo & | ESI, | ||
| SmallVectorImpl< QualType > & | ExceptionStorage, | ||
| const MultiLevelTemplateArgumentList & | Args ) |
Definition at line 2888 of file SemaTemplateInstantiate.cpp.
| ExprResult Sema::SubstExpr | ( | Expr * | E, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 4342 of file SemaTemplateInstantiate.cpp.
Referenced by BuildExprRequirement(), instantiateDependentAlignedAttr(), instantiateDependentAlignValueAttr(), instantiateDependentAMDGPUFlatWorkGroupSizeAttr(), instantiateDependentAMDGPUMaxNumWorkGroupsAttr(), instantiateDependentAMDGPUWavesPerEUAttr(), instantiateDependentAssumeAlignedAttr(), instantiateDependentCUDAClusterDimsAttr(), instantiateDependentCUDALaunchBoundsAttr(), instantiateDependentFunctionAttrCondition(), instantiateDependentReqdWorkGroupSizeAttr(), instantiateExplicitSpecifier(), instantiateOMPDeclareSimdDeclAttr(), instantiateOMPDeclareVariantAttr(), sharedInstantiateConstructorDestructorAttr(), and SubstConstraintExpr().
| 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.
| Exprs | The list of expressions to substitute into. |
| IsCall | Whether this is some form of call, in which case default arguments will be dropped. |
| TemplateArgs | The set of template arguments to substitute. |
| Outputs | Will receive all of the substituted arguments. |
Definition at line 4504 of file SemaTemplateInstantiate.cpp.
Referenced by instantiateDependentAnnotationAttr().
| TypeSourceInfo * Sema::SubstFunctionDeclType | ( | 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.
Its purpose is solely to force the instantiation of default-argument expressions and to avoid instantiating an exception-specification.
Definition at line 2842 of file SemaTemplateInstantiate.cpp.
References CodeSynthesisContexts, Context, clang::TypeLoc::getAs(), clang::TypeLoc::getFullDataSize(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::TypeLoc::IgnoreParens(), NeedsInstantiationAsFunctionType(), clang::TypeLocBuilder::reserve(), clang::Result, and clang::T.
| ExprResult Sema::SubstInitializer | ( | Expr * | E, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| bool | CXXDirectInit ) |
Definition at line 4496 of file SemaTemplateInstantiate.cpp.
References clang::Init.
Referenced by InstantiateInClassInitializer(), InstantiateMemInitializers(), InstantiateVariableInitializer(), and SubstDefaultArgument().
| 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].
| FunctionTemplate | the function template into which the explicit template arguments will be substituted. |
| ExplicitTemplateArgs | the explicitly-specified template arguments. |
| Deduced | the deduced template arguments, which will be populated with the converted and checked explicit template arguments. |
| ParamTypes | will be populated with the instantiated function parameters. |
| FunctionType | if non-NULL, the result type of the function template will also be instantiated and the pointed-to value will be updated with the instantiated function type. |
| Info | if substitution fails for any reason, this object will be populated with more information about the failure. |
Definition at line 3546 of file SemaTemplateDeduction.cpp.
References clang::TemplateArgumentList::asArray(), BuildFunctionType(), clang::Sema::CheckTemplateArgumentInfo::CanonicalConverted, CheckTemplateArgumentList(), Context, clang::CPlusPlus11, clang::TemplateArgumentList::CreateCopy(), CUDA(), CurrentInstantiationScope, clang::SemaBase::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::Sema::ExtParameterInfoBuilder::getPointerOrNull(), clang::FunctionType::getReturnType(), clang::FunctionProtoType::hasTrailingReturn(), clang::InstantiationDepth, clang::InvalidExplicitArguments, clang::Sema::InstantiatingTemplate::isInvalid(), clang::QualType::isNull(), isSFINAEContext(), isUnevaluatedContext(), clang::Type::isVoidType(), makeTemplateParameter(), clang::Method, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), clang::TemplateArgument::pack_size(), clang::sema::TemplateDeductionInfo::Param, clang::sema::TemplateDeductionInfo::setExplicitArgs(), clang::TemplateArgumentList::size(), clang::TemplateArgumentListInfo::size(), clang::TemplateParameterList::size(), clang::SubstitutionFailure, SubstParmTypes(), SubstType(), clang::Success, and clang::Sema::CheckTemplateArgumentInfo::SugaredConverted.
| NestedNameSpecifierLoc Sema::SubstNestedNameSpecifierLoc | ( | NestedNameSpecifierLoc | NNS, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 4518 of file SemaTemplateInstantiate.cpp.
References clang::NestedNameSpecifierLoc::getBeginLoc().
Referenced by SubstQualifier().
| 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 3151 of file SemaTemplateInstantiate.cpp.
References CodeSynthesisContexts.
Referenced by SubstituteExplicitTemplateArguments().
| ParmVarDecl * Sema::SubstParmVarDecl | ( | ParmVarDecl * | D, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| int | indexAdjustment, | ||
| UnsignedOrNone | NumExpansions, | ||
| bool | ExpectParameterPack, | ||
| bool | EvaluateConstraints = true ) |
Definition at line 3032 of file SemaTemplateInstantiate.cpp.
References CheckPackExpansion(), CheckParameter(), clang::Type::containsUnexpandedParameterPack(), Context, CurContext, CurrentInstantiationScope, clang::SemaBase::Diag(), FindInstantiatedDecl(), clang::TypeLoc::getAs(), clang::NamedDecl::getDeclName(), clang::ParmVarDecl::getDefaultArg(), clang::PackExpansionTypeLoc::getEllipsisLoc(), clang::ParmVarDecl::getExplicitObjectParamThisLoc(), clang::ParmVarDecl::getFunctionScopeDepth(), clang::ParmVarDecl::getFunctionScopeIndex(), clang::NamedDecl::getIdentifier(), clang::DeclaratorDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::PackExpansionTypeLoc::getPatternLoc(), clang::VarDecl::getStorageClass(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::ParmVarDecl::getUninstantiatedDefaultArg(), clang::ParmVarDecl::hasInheritedDefaultArg(), clang::ParmVarDecl::hasUninstantiatedDefaultArg(), clang::ParmVarDecl::hasUnparsedDefaultArg(), InstantiateAttrs(), clang::ValueDecl::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.
| FunctionDecl * Sema::SubstSpaceshipAsEqualEqual | ( | CXXRecordDecl * | RD, |
| FunctionDecl * | Spaceship ) |
Substitute the name and return type of a defaulted 'operator<=>' to form an implicit 'operator=='.
Definition at line 4777 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::MultiLevelTemplateArgumentList::addOuterRetainedLevels(), clang::AS_public, clang::cast(), Context, clang::FriendDecl::Create(), clang::Decl::getTemplateDepth(), clang::Rewrite, clang::TemplateDeclInstantiator::RewriteSpaceshipAsEqualEqual, clang::Decl::setAccess(), clang::MultiLevelTemplateArgumentList::setKind(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
Referenced by DeclareImplicitEqualityComparison().
| StmtResult Sema::SubstStmt | ( | Stmt * | S, |
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 4303 of file SemaTemplateInstantiate.cpp.
Referenced by InstantiateFunctionDefinition().
| bool Sema::SubstTemplateArgument | ( | const TemplateArgumentLoc & | Input, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| TemplateArgumentLoc & | Output, | ||
| SourceLocation | Loc = {}, | ||
| const DeclarationName & | Entity = {} ) |
Definition at line 4313 of file SemaTemplateInstantiate.cpp.
Referenced by SubstDefaultTemplateArgument(), and SubstDefaultTemplateArgument().
| bool Sema::SubstTemplateArguments | ( | ArrayRef< TemplateArgumentLoc > | Args, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| TemplateArgumentListInfo & | Outputs ) |
Definition at line 4322 of file SemaTemplateInstantiate.cpp.
Referenced by FinishTemplateArgumentDeduction(), and SubstTypeConstraint().
| bool Sema::SubstTemplateArgumentsInParameterMapping | ( | ArrayRef< TemplateArgumentLoc > | Args, |
| SourceLocation | BaseLoc, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| TemplateArgumentListInfo & | Out ) |
Definition at line 4331 of file SemaTemplateInstantiate.cpp.
| TemplateName Sema::SubstTemplateName | ( | SourceLocation | TemplateKWLoc, |
| NestedNameSpecifierLoc & | QualifierLoc, | ||
| TemplateName | Name, | ||
| SourceLocation | NameLoc, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs ) |
Definition at line 4537 of file SemaTemplateInstantiate.cpp.
Referenced by SubstDefaultTemplateArgument().
| TemplateParameterList * Sema::SubstTemplateParams | ( | TemplateParameterList * | Params, |
| DeclContext * | Owner, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| bool | EvaluateConstraints = true ) |
Definition at line 4849 of file SemaTemplateInstantiateDecl.cpp.
References clang::TemplateDeclInstantiator::setEvaluateConstraints(), and clang::TemplateDeclInstantiator::SubstTemplateParams().
Referenced by CheckTemplateArgument().
| QualType Sema::SubstType | ( | QualType | T, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity, | ||
| bool * | IsIncompleteSubstitution = nullptr ) |
Deprecated form of the above.
Definition at line 2798 of file SemaTemplateInstantiate.cpp.
References CodeSynthesisContexts, and clang::T.
| TypeSourceInfo * Sema::SubstType | ( | TypeLoc | TL, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity ) |
Definition at line 2767 of file SemaTemplateInstantiate.cpp.
References CodeSynthesisContexts, Context, clang::TypeLoc::getFullDataSize(), clang::TypeLoc::getType(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::Type::isInstantiationDependentType(), clang::QualType::isNull(), clang::Type::isVariablyModifiedType(), clang::TypeLocBuilder::pushFullCopy(), clang::TypeLocBuilder::reserve(), and clang::Result.
| TypeSourceInfo * Sema::SubstType | ( | TypeSourceInfo * | T, |
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| SourceLocation | Loc, | ||
| DeclarationName | Entity, | ||
| bool | AllowDeducedTST = false ) |
Perform substitution on the type T with a given set of template arguments.
This routine substitutes the given template arguments into the type T and produces the instantiated type.
| T | the type into which the template arguments will be substituted. If this type is not dependent, it will be returned immediately. |
| Args | the template arguments that will be substituted for the top-level template parameters within T. |
| Loc | the location in the source code where this substitution is being performed. It will typically be the location of the declarator (if we're instantiating the type of some declaration) or the location of the type in the source code (if, e.g., we're instantiating the type of a cast expression). |
| Entity | the name of the entity associated with a declaration being instantiated (if any). May be empty to indicate that there is no such entity (if, e.g., this is a type that occurs as part of a cast expression) or that the entity has no name (e.g., an unnamed function parameter). |
| AllowDeducedTST | Whether a DeducedTemplateSpecializationType is acceptable as the top level type of the result. |
| IsIncompleteSubstitution | If provided, the pointee will be set whenever substitution would perform a replacement with a null or non-existent template argument. |
Definition at line 2749 of file SemaTemplateInstantiate.cpp.
References CodeSynthesisContexts, and clang::T.
Referenced by CheckDeductionConsistency(), CheckTemplateArgument(), CheckTemplateIdType(), CompleteVarTemplateSpecializationDecl(), ConvertDeducedTemplateArgument(), FinishTemplateArgumentDeduction(), HandleDependentAccessCheck(), instantiateDependentAlignedAttr(), InstantiateMemInitializers(), PreparePackForExpansion(), SubstBaseSpecifiers(), SubstituteExplicitTemplateArguments(), and SubstParmVarDecl().
| bool Sema::SubstTypeConstraint | ( | TemplateTypeParmDecl * | Inst, |
| const TypeConstraint * | TC, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs, | ||
| bool | EvaluateConstraint ) |
Definition at line 2996 of file SemaTemplateInstantiate.cpp.
References clang::ASTTemplateArgumentListInfo::arguments(), AttachTypeConstraint(), clang::cast(), clang::TypeConstraint::getArgPackSubstIndex(), clang::TypeConstraint::getConceptNameInfo(), clang::TypeConstraint::getConceptReference(), clang::ConceptReference::getFoundDecl(), clang::TypeConstraint::getImmediatelyDeclaredConstraint(), clang::TypeConstraint::getNamedConcept(), clang::TypeConstraint::getNestedNameSpecifierLoc(), clang::TypeConstraint::getTemplateArgsAsWritten(), inParameterMappingSubstitution(), clang::TemplateTypeParmDecl::isParameterPack(), clang::ASTTemplateArgumentListInfo::LAngleLoc, clang::ASTTemplateArgumentListInfo::RAngleLoc, clang::SemaBase::SemaRef, clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::TemplateTypeParmDecl::setTypeConstraint(), and SubstTemplateArguments().
Referenced by SubstParmVarDecl().
|
inline |
|
inline |
Definition at line 1538 of file Sema.h.
Referenced by InstantiateAttrs(), mergeDeclAttribute(), and ProcessDeclAttribute().
|
inline |
Definition at line 1533 of file Sema.h.
Referenced by ActOnFinishFunctionBody(), ActOnLambdaExpr(), CheckFunctionDeclaration(), checkTypeSupport(), ProcessDeclAttribute(), clang::TreeTransform< AdjustConstraints >::RebuildSYCLUniqueStableNameExpr(), and targetDiag().
|
inline |
|
inline |
Definition at line 1131 of file Sema.h.
References clang::PartialDiagnostic::getDiagID(), and targetDiag().
| Sema::SemaDiagnosticBuilder Sema::targetDiag | ( | SourceLocation | Loc, |
| unsigned | DiagID, | ||
| const FunctionDecl * | FD = nullptr ) |
Definition at line 2110 of file Sema.cpp.
References clang::CUDA, CUDA(), getCurFunctionDecl(), clang::SemaBase::getLangOpts(), clang::SemaBase::SemaDiagnosticBuilder::K_Immediate, LangOpts, OpenMP(), and SYCL().
Referenced by ActOnCXXTryBlock(), ActOnGCCAsmStmt(), actOnOMPReductionKindClause(), ActOnVariableDeclarator(), BuildArrayType(), BuildCXXThrow(), BuildVAArgExpr(), checkTypeSupport(), DiagnoseExceptionUse(), DiagnoseUseOfDecl(), MarkVarDeclODRUsed(), and targetDiag().
| 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.
| New | The new template parameter list, typically written in the source code as part of a new template declaration. |
| Old | The old template parameter list, typically found via name lookup of the template declared with this template parameter list. |
| Complain | If true, this routine will produce a diagnostic if the template parameter lists are not equivalent. |
| Kind | describes how we are to match the template parameter lists. |
| TemplateArgLoc | If this source location is valid, then we are actually checking the template parameter list of a template argument (New) against the template parameter list of its corresponding template template parameter (Old). We produce slightly different diagnostics in this scenario. |
Definition at line 8350 of file SemaTemplate.cpp.
References AreConstraintExpressionsEqual(), clang::TemplateParameterList::begin(), clang::SemaBase::Diag(), Diagnose, DiagnoseTemplateParameterListArityMismatch(), clang::TemplateParameterList::end(), clang::Stmt::getBeginLoc(), clang::TemplateParameterList::getRequiresClause(), clang::TemplateParameterList::getTemplateLoc(), MatchTemplateParameterKind(), New, clang::TemplateParameterList::size(), and TPL_TemplateParamsEquivalent.
Referenced by ActOnAliasDeclaration(), CheckClassTemplate(), getMoreSpecialized(), getMoreSpecializedTemplate(), IsOverloadOrOverrideImpl(), MatchTemplateParameterKind(), MatchTemplateParametersToScopeSpecifier(), MergeVarDecl(), and TemplateParameterListsAreEqual().
|
inline |
Definition at line 12266 of file Sema.h.
References New, and TemplateParameterListsAreEqual().
| 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 7808 of file SemaInit.cpp.
References clang::CPlusPlus, clang::CPlusPlus11, CreateMaterializeTemporaryExpr(), clang::ExprError(), clang::Expr::getExprLoc(), getLangOpts(), clang::Expr::getType(), clang::Expr::isPRValue(), RequireCompleteType(), and clang::T.
Referenced by ActOnConditionalOp(), BuildMemberReferenceExpr(), CheckPointerToMemberOperands(), CreateBuiltinArraySubscriptExpr(), EvaluateAsStringImpl(), IgnoredValueConversions(), PerformImplicitConversion(), and clang::TreeTransform< AdjustConstraints >::RebuildMemberExpr().
|
inlinestatic |
To be used for checking whether the arguments being passed to function exceeds the number of parameters expected for it.
Definition at line 8178 of file Sema.h.
Referenced by checkDirectCallValidity().
| ExprResult Sema::TransformToPotentiallyEvaluated | ( | Expr * | E | ) |
Definition at line 17830 of file SemaExpr.cpp.
References ExprEvalContexts, and isUnevaluatedContext().
Referenced by BuildCXXTypeId(), CreateUnaryExprOrTypeTraitExpr(), CreateUnaryExprOrTypeTraitExpr(), and HandleExprEvaluationContextForTypeof().
| TypeSourceInfo * Sema::TransformToPotentiallyEvaluated | ( | TypeSourceInfo * | TInfo | ) |
Definition at line 17840 of file SemaExpr.cpp.
References clang::Sema::ExpressionEvaluationContextRecord::Context, ExprEvalContexts, isUnevaluatedContext(), and parentEvaluationContext().
| void Sema::translateTemplateArguments | ( | const ASTTemplateArgsPtr & | In, |
| TemplateArgumentListInfo & | Out ) |
Translates template arguments as provided by the parser into template arguments used by semantic analysis.
Definition at line 981 of file SemaTemplate.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::Last, and translateTemplateArgument().
Referenced by ActOnCXXNestedNameSpecifier(), ActOnExplicitInstantiation(), ActOnFunctionDeclarator(), ActOnTagTemplateIdType(), ActOnTemplateIdType(), ActOnTypenameType(), ConvertDeclSpecToType(), DecomposeUnqualifiedId(), InventTemplateParameter(), and makeTemplateArgumentListInfo().
| QualType Sema::tryBuildStdTypeIdentity | ( | QualType | Type, |
| SourceLocation | Loc ) |
Looks for the std::type_identity template and instantiates it with Type, or returns a null type if type_identity has not been declared.
Definition at line 12388 of file SemaDeclCXX.cpp.
References BuildStdClassTemplate(), LookupStdClassTemplate(), and StdTypeIdentity.
Referenced by BuildTypeAwareUsualDelete(), and FindAllocationFunctions().
| 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.
| Var | The variable to capture. |
| Loc | The location at which the capture occurs. |
| Kind | The kind of capture, which may be implicit (for either a block or a lambda), or explicit by-value or by-reference (for a lambda). |
| EllipsisLoc | The location of the ellipsis, if one is provided in an explicit lambda capture. |
| BuildAndDiagnose | Whether we are actually supposed to add the captures or diagnose errors. If false, this routine merely check whether the capture can occur without performing the capture itself or complaining if the variable cannot be captured. |
| CaptureType | Will be set to the type of the field used to capture this variable in the innermost block or lambda. Only valid when the variable can be captured. |
| DeclRefType | Will be set to the type of a reference to the capture from within the current scope. Only valid when the variable can be captured. |
| FunctionScopeIndexToStopAt | If non-null, it points to the index of the FunctionScopeInfo stack beyond which we do not attempt to capture. This is useful when enclosing lambdas must speculatively capture variables that may or may not be used in certain specializations of a nested generic lambda. |
Definition at line 19438 of file SemaExpr.cpp.
References clang::QualType::addConst(), clang::sema::LambdaScopeInfo::AfterParameterList, buildLambdaCaptureFixit(), clang::sema::LambdaScopeInfo::CallOperator, captureInBlock(), captureInCapturedRegion(), captureInLambda(), captureVariablyModifiedType(), CapturingFunctionScopes, clang::cast(), Context, clang::CR_OpenMP, CurContext, clang::SemaBase::Diag(), diagnoseUncapturableValueReferenceOrBinding(), clang::DeclContext::Equals(), clang::Explicit, FunctionScopes, clang::TypeDecl::getBeginLoc(), clang::Decl::getCanonicalDecl(), clang::sema::CapturingScopeInfo::getCapture(), clang::Decl::getDeclContext(), clang::getLambdaAwareParentOfDeclContext(), getLangOpts(), clang::Decl::getLocation(), 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::Implicit, clang::Invalid, clang::isa(), clang::QualType::isConstQualified(), clang::DeclContext::isFunctionOrMethod(), clang::isGenericLambdaCallOperatorSpecialization(), clang::SemaOpenMP::isOpenMPGlobalCapturedDecl(), clang::SemaOpenMP::isOpenMPPrivateDecl(), clang::SemaOpenMP::isOpenMPTargetCapturedDecl(), clang::DeclContext::isRequiresExprBody(), isVariableAlreadyCapturedInScopeInfo(), isVariableCapturable(), clang::Type::isVariablyModifiedType(), clang::sema::LambdaScopeInfo::Lambda, LangOpts, clang::sema::Capture::markUsed(), and OpenMP().
Referenced by ActOnLambdaExpressionAfterIntroducer(), buildLoopVarFunc(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), DoMarkBindingDeclReferenced(), getCapturedDeclRefType(), clang::getStackIndexOfNearestEnclosingCaptureCapableLambda(), MarkVarDeclODRUsed(), NeedToCaptureVariable(), and tryCaptureVariable().
| bool Sema::tryCaptureVariable | ( | ValueDecl * | Var, |
| SourceLocation | Loc, | ||
| TryCaptureKind | Kind = TryCaptureKind::Implicit, | ||
| SourceLocation | EllipsisLoc = SourceLocation() ) |
Try to capture the given variable.
Definition at line 19747 of file SemaExpr.cpp.
References tryCaptureVariable().
| 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 5086 of file SemaExpr.cpp.
References clang::InitializationKind::CreateCopy(), clang::Stmt::getBeginLoc(), InitializationSequence, clang::InitializedEntity::InitializeTemporary(), and clang::InitializationSequence::Perform().
Referenced by BuiltinTriviallyRelocate(), and CheckMatrixElementwiseOperands().
| bool Sema::tryExprAsCall | ( | Expr & | E, |
| QualType & | ZeroArgCallReturnTy, | ||
| UnresolvedSetImpl & | NonTemplateOverloads ) |
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.
| 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 2646 of file Sema.cpp.
References Ambiguous, BuildCallToMemberFunction(), 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::OverloadSet.
Referenced by DiagnoseAlwaysNonNullPointer(), and tryToRecoverWithCall().
Same as IsFunctionConversion, but if this would return true, it sets ResultTy to ToType.
Definition at line 1906 of file SemaOverload.cpp.
References IsFunctionConversion().
Referenced by checkPointerTypesForAssignment(), isSameOrCompatibleFunctionType(), and IsStandardConversion().
| ImplicitConversionSequence Sema::TryImplicitConversion | ( | Expr * | From, |
| QualType | ToType, | ||
| bool | SuppressUserConversions, | ||
| AllowedExplicit | AllowExplicit, | ||
| bool | InOverloadResolution, | ||
| bool | CStyle, | ||
| bool | AllowObjCWritebackConversion ) |
Definition at line 1871 of file SemaOverload.cpp.
Referenced by CheckC23ConstexprInitConversion(), CheckSingleAssignmentConstraints(), clang::InitializationSequence::InitializeFrom(), and TryReferenceInitializationCore().
| ValueDecl * Sema::tryLookupCtorInitMemberDecl | ( | CXXRecordDecl * | ClassDecl, |
| CXXScopeSpec & | SS, | ||
| ParsedType | TemplateTypeTy, | ||
| IdentifierInfo * | MemberOrBase ) |
Definition at line 4377 of file SemaDeclCXX.cpp.
References clang::CXXScopeSpec::getScopeRep(), and tryLookupUnambiguousFieldDecl().
Referenced by BuildMemInitializer().
| ValueDecl * Sema::tryLookupUnambiguousFieldDecl | ( | RecordDecl * | ClassDecl, |
| const IdentifierInfo * | MemberOrBase ) |
Definition at line 4358 of file SemaDeclCXX.cpp.
References clang::cast(), clang::Decl::getDeclContext(), getLangOpts(), clang::isa(), and clang::DeclContext::lookup().
Referenced by tryLookupCtorInitMemberDecl().
| bool Sema::tryResolveExplicitSpecifier | ( | ExplicitSpecifier & | ExplicitSpec | ) |
tryResolveExplicitSpecifier - Attempt to resolve the explict specifier.
Returns true if the explicit specifier is now resolved.
Definition at line 14024 of file SemaDeclCXX.cpp.
References CheckConvertedConstantExpression(), Context, clang::ExplicitBool, clang::ActionResult< PtrTy, Compress >::get(), clang::ExplicitSpecifier::getExpr(), clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Expr::isValueDependent(), clang::ResolvedFalse, clang::ResolvedTrue, clang::Result, clang::ExplicitSpecifier::setExpr(), clang::ExplicitSpecifier::setKind(), and clang::Unresolved.
Referenced by ActOnExplicitBoolSpecifier(), and instantiateExplicitSpecifier().
| 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 6793 of file SemaDecl.cpp.
References Context, clang::SemaBase::Diag(), clang::TypeSourceInfo::getType(), clang::T, toString(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().
Referenced by ActOnVariableDeclarator(), BuildCompoundLiteralExpr(), and CheckFieldDecl().
| bool Sema::tryToRecoverWithCall | ( | ExprResult & | E, |
| const PartialDiagnostic & | PD, | ||
| bool | ForceComplain = false, | ||
| bool(* | IsPlausibleResult )(QualType) = nullptr ) |
Try to recover by turning the given expression into a call.
Returns true if recovery was attempted or an error was emitted; this may also leave the ExprResult invalid.
Definition at line 2828 of file Sema.cpp.
References BuildCallExpr(), clang::FixItHint::CreateInsertion(), clang::SemaBase::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().
Definition at line 795 of file SemaAttr.cpp.
References Context, clang::Decl::Decl(), clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::SourceLocation::isValid(), and clang::ASTContext::PSF_Implicit.
Referenced by ActOnFunctionDeclarator(), ActOnPragmaClangSection(), ActOnPragmaMSSection(), CheckCompleteVariableDeclaration(), and handleSectionAttr().
| bool Sema::UnifySection | ( | StringRef | SectionName, |
| int | SectionFlags, | ||
| SourceLocation | PragmaSectionLocation ) |
Definition at line 822 of file SemaAttr.cpp.
References Context, clang::SemaBase::Diag(), and clang::ASTContext::PSF_Implicit.
| void Sema::UnmarkAsLateParsedTemplate | ( | FunctionDecl * | FD | ) |
Definition at line 11621 of file SemaTemplate.cpp.
References clang::FunctionDecl::setLateTemplateParsed().
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 1057 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::addAttr(), clang::Decl::attrs(), getASTContext(), and clang::Decl::hasAttr().
Referenced by InstantiateFunctionDefinition().
| void clang::Sema::UpdateExceptionSpec | ( | FunctionDecl * | FD, |
| const FunctionProtoType::ExceptionSpecInfo & | ESI ) |
Definition at line 242 of file SemaExceptionSpec.cpp.
References Context, getASTMutationListener(), clang::isUnresolvedExceptionSpec(), clang::FunctionDecl::redecls(), and clang::FunctionProtoType::ExceptionSpecInfo::Type.
Referenced by EvaluateImplicitExceptionSpec(), InstantiateExceptionSpec(), and SubstExceptionSpec().
| bool Sema::UseArgumentDependentLookup | ( | const CXXScopeSpec & | SS, |
| const LookupResult & | R, | ||
| bool | HasTrailingLParen ) |
Definition at line 3145 of file SemaExpr.cpp.
References clang::cast(), clang::CPlusPlus, getLangOpts(), clang::isa(), and clang::CXXScopeSpec::isNotEmpty().
Referenced by ActOnIdExpression(), ActOnNameClassifiedAsNonType(), and ClassifyName().
| bool Sema::usesPartialOrExplicitSpecialization | ( | SourceLocation | Loc, |
| ClassTemplateSpecializationDecl * | ClassTemplateSpec ) |
Definition at line 3818 of file SemaTemplateInstantiate.cpp.
References clang::TemplateArgumentList::asArray(), DeduceTemplateArguments(), clang::ClassTemplateDecl::getMostRecentDecl(), clang::ClassTemplateDecl::getPartialSpecializations(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::RedeclarableTemplateDecl::isMemberSpecialization(), clang::Success, and clang::TSK_ExplicitSpecialization.
Referenced by FindInstantiatedDecl().
| 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 1645 of file SemaExpr.cpp.
References checkEnumArithmeticConversions(), CheckUnicodeArithmeticConversions(), clang::CompAssign, Context, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), handleComplexConversion(), handleComplexIntConversion(), handleFixedPointConversion(), handleFloatConversion(), handleIntegerConversion(), ImpCastExprToType(), clang::Type::isArithmeticType(), clang::Type::isComplexIntegerType(), clang::Type::isComplexType(), clang::Type::isFixedPointType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), clang::Type::isRealFloatingType(), unsupportedTypeConversion(), and UsualUnaryConversions().
Referenced by CheckAdditionOperands(), checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), CheckBitwiseOperands(), CheckConditionalOperands(), CheckMultiplyDivideOperands(), CheckRemainderOperands(), CheckSubtractionOperands(), CheckVectorConditionalTypes(), and CXXCheckConditionalOperands().
| 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 834 of file SemaExpr.cpp.
References Context, DefaultFunctionArrayLvalueConversion(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::Expr::getType(), ImpCastExprToType(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::QualType::isNull(), and UsualUnaryFPConversions().
Referenced by ActOnConditionalOp(), BuildVAArgExpr(), BuiltinCallWithStaticChain(), BuiltinCountZeroBitsGeneric(), CheckConditionalOperands(), CheckIndirectionOperand(), CheckLogicalOperands(), CheckShiftOperands(), checkSizelessVectorShift(), CheckSwitchCondition(), checkVectorShift(), CreateBuiltinBinOp(), CreateBuiltinUnaryOp(), DefaultArgumentPromotion(), and UsualArithmeticConversions().
| ExprResult Sema::UsualUnaryFPConversions | ( | Expr * | E | ) |
UsualUnaryFPConversions - Promotes floating-point types according to the current language semantics.
Definition at line 784 of file SemaExpr.cpp.
References Context, CurFPFeatures, clang::LangOptionsBase::FEM_Double, clang::LangOptionsBase::FEM_Extended, clang::LangOptionsBase::FEM_Source, clang::LangOptionsBase::FEM_UnsetOnCommandLine, getLangOpts(), clang::Expr::getType(), ImpCastExprToType(), clang::Type::isComplexType(), clang::Type::isFloatingType(), clang::Type::isHalfType(), clang::QualType::isNull(), and PP.
Referenced by BuiltinVectorMathConversions(), and UsualUnaryConversions().
| bool Sema::ValidateFormatString | ( | FormatStringType | FST, |
| const StringLiteral * | Str ) |
Verify that one format string (as understood by attribute(format)) is self-consistent; for instance, that it doesn't have multiple positional arguments referring to the same argument in incompatible ways.
Diagnose if it isn't.
Definition at line 9653 of file SemaChecking.cpp.
References clang::FreeBSDKPrintf, clang::Kprintf, clang::NSString, clang::OSLog, clang::OSTrace, and clang::Printf.
Referenced by handleFormatMatchesAttr().
Returns true if the argument consists of one contiguous run of 1s with any number of 0s on either side.
The 1s are allowed to wrap from LSB to MSB, so 0x000FFF0, 0x0000FFFF, 0xFF0000FF, 0x0 are all runs. 0x0F0F0000 is not, since all 1s are not contiguous.
Definition at line 3749 of file SemaChecking.cpp.
References BuiltinConstantArg(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Result.
| ExprResult Sema::VerifyBitField | ( | SourceLocation | FieldLoc, |
| const 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.
Returns false on success.
Definition at line 18989 of file SemaDecl.cpp.
References clang::Allow, clang::Expr::containsErrors(), Context, clang::ConstantExpr::Create(), clang::SemaBase::Diag(), DiagnoseUnexpandedParameterPack(), clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), getASTContext(), getLangOpts(), clang::ConstantArrayType::getMaxSizeBits(), clang::Stmt::getSourceRange(), clang::isa(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::Type::isIntegralOrEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), RequireCompleteSizedType(), toString(), UPPC_BitFieldWidth, and VerifyIntegerConstantExpression().
Referenced by CheckFieldDecl().
|
inline |
Definition at line 7768 of file Sema.h.
References clang::No, and VerifyIntegerConstantExpression().
| ExprResult Sema::VerifyIntegerConstantExpression | ( | Expr * | E, |
| llvm::APSInt * | Result, | ||
| unsigned | DiagID, | ||
| AllowFoldKind | CanFold = AllowFoldKind::No ) |
Definition at line 17577 of file SemaExpr.cpp.
References clang::SemaBase::Diag(), clang::Result, Sema(), and VerifyIntegerConstantExpression().
| ExprResult Sema::VerifyIntegerConstantExpression | ( | Expr * | E, |
| llvm::APSInt * | Result, | ||
| VerifyICEDiagnoser & | Diagnoser, | ||
| AllowFoldKind | CanFold = AllowFoldKind::No ) |
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 17608 of file SemaExpr.cpp.
References clang::APValue, Context, clang::CPlusPlus, clang::CPlusPlus11, clang::ConstantExpr::Create(), DefaultLvalueConversion(), clang::Expr::EvalStatus::Diag, clang::SemaBase::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::Expr::EvalStatus::HasUndefinedBehavior, clang::isa(), clang::Type::isEnumeralType(), clang::APValue::isInt(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegralOrUnscopedEnumerationType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::No, clang::Note, PerformContextualImplicitConversion(), clang::Result, Sema(), clang::Sema::VerifyICEDiagnoser::Suppress, clang::T, and clang::Expr::EvalResult::Val.
Referenced by ActOnCaseExpr(), ActOnChooseExpr(), ActOnCXXNew(), AddAlignedAttr(), AddAlignValueAttr(), BuildBitIntType(), BuildCodeAlignAttr(), BuildStaticAssertDeclaration(), CheckArrayDesignatorExpr(), checkArraySize(), CheckCXXBooleanCondition(), CheckEnumConstant(), CheckLoopHintExpr(), CheckTemplateArgument(), isTupleLike(), VerifyBitField(), VerifyIntegerConstantExpression(), VerifyIntegerConstantExpression(), and VerifyIntegerConstantExpression().
| ExprResult Sema::VerifyIntegerConstantExpression | ( | Expr * | E, |
| llvm::APSInt * | Result = nullptr, | ||
| AllowFoldKind | CanFold = AllowFoldKind::No ) |
Definition at line 17559 of file SemaExpr.cpp.
References clang::SemaBase::Diag(), LangOpts, clang::Result, Sema(), clang::T, and VerifyIntegerConstantExpression().
| void Sema::warnOnCTypeHiddenInCPlusPlus | ( | const NamedDecl * | D | ) |
Definition at line 15528 of file SemaDecl.cpp.
References clang::CPlusPlus, clang::SemaBase::Diag(), clang::Type::getAsTagDecl(), getLangOpts(), clang::Decl::getLexicalDeclContext(), and clang::Decl::getLocation().
Referenced by ActOnParamDeclarator(), CheckFieldDecl(), and HandleDeclarator().
| void Sema::WarnOnPendingNoDerefs | ( | ExpressionEvaluationContextRecord & | Rec | ) |
Emit a warning for all pending noderef expressions that we recorded.
Definition at line 17954 of file SemaExpr.cpp.
References clang::SemaBase::Diag(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), and clang::Sema::ExpressionEvaluationContextRecord::PossibleDerefs.
Referenced by PopExpressionEvaluationContext().
| void Sema::warnOnReservedIdentifier | ( | const NamedDecl * | D | ) |
Definition at line 6246 of file SemaDecl.cpp.
References Context, clang::SemaBase::Diag(), getLangOpts(), clang::Decl::getLocation(), clang::Decl::getPreviousDecl(), isFromSystemHeader(), clang::Decl::isImplicit(), clang::NamedDecl::isReserved(), and clang::NotReserved.
Referenced by ActOnFriendFunctionDecl(), ActOnFunctionDeclarator(), ActOnTemplateParameterList(), and PushOnScopeChains().
|
inline |
Definition at line 1548 of file Sema.h.
Referenced by mergeDeclAttribute(), and ProcessDeclAttribute().
|
inline |
WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
Definition at line 4900 of file Sema.h.
References WeakTopLevelDecl.
Referenced by clang::ParseAST().
|
inline |
Definition at line 1553 of file Sema.h.
Referenced by handleInterruptAttr(), handleTargetClonesAttr(), and ProcessDeclAttribute().
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 1563 of file Sema.h.
References InitializationSequence.
Referenced by ActOnUninitializedDecl(), AddInitializerToDecl(), BuildBaseInitializer(), BuildCaptureInit(), BuildCompoundLiteralExpr(), buildCoroutinePromise(), BuildCXXNew(), BuildCXXTypeConstructExpr(), BuildDelegatingInitializer(), BuildExceptionDeclaration(), buildLambdaInitCaptureInitialization(), BuildMemberInitializer(), CanPerformCopyInitialization(), CheckTemplateArgument(), ConvertMemberDefaultInitExpression(), ConvertParamDefaultArgument(), CreateBuiltinBinOp(), FindCompositePointerType(), InitializationSequence, PerformCopyInitialization(), PerformMoveOrCopyInitialization(), SubstDefaultArgument(), and tryConvertExprToType().
|
friend |
| llvm::DenseMap<unsigned, CXXDeductionGuideDecl *> clang::Sema::AggregateDeductionCandidates |
Definition at line 9038 of file Sema.h.
Referenced by DeclareAggregateDeductionGuideFromInitList().
| SmallVector<AlignPackIncludeState, 8> clang::Sema::AlignPackIncludeStack |
Definition at line 2040 of file Sema.h.
Referenced by AddAlignmentAttributesForRecord(), and DiagnoseNonDefaultPragmaAlignPack().
| PragmaStack<AlignPackInfo> clang::Sema::AlignPackStack |
Definition at line 2033 of file Sema.h.
Referenced by ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnTagFinishDefinition(), AddAlignmentAttributesForRecord(), DiagnoseNonDefaultPragmaAlignPack(), DiagnoseUnterminatedPragmaAlignPack(), and Sema().
| FunctionEffectKindSet clang::Sema::AllEffectsToVerify |
The union of all effects present on DeclsWithEffectsToVerify.
Conditions are all null.
Definition at line 15658 of file Sema.h.
Referenced by addDeclWithEffects().
| sema::AnalysisBasedWarnings clang::Sema::AnalysisWarnings |
Worker object for performing CFG-based warnings.
Definition at line 1326 of file Sema.h.
Referenced by ActOnBlockStmtExpr(), ActOnEndOfTranslationUnit(), ActOnFinishFunctionBody(), BuildLambdaExpr(), DiagIfReachable(), FinalizeDeclaration(), InstantiateVariableDefinition(), PopFunctionScopeInfo(), PrintStats(), and Sema().
| api_notes::APINotesManager clang::Sema::APINotes |
Definition at line 1292 of file Sema.h.
Referenced by captureSwiftVersionIndependentAPINotes(), ProcessAPINotes(), and Sema().
| UnsignedOrNone clang::Sema::ArgPackSubstIndex |
The current index into pack expansion arguments that will be used for substitution of parameter packs.
The pack expansion index will be none 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 13652 of file Sema.h.
Referenced by clang::Sema::ArgPackSubstIndexRAII::ArgPackSubstIndexRAII(), CheckConstraintSatisfaction(), FindInstantiatedDecl(), getPackIndex(), getPackSubstitutedTemplateArgument(), and Sema().
| PragmaStack<StringLiteral *> clang::Sema::BSSSegStack |
Definition at line 2043 of file Sema.h.
Referenced by ActOnPragmaMSSeg(), CheckCompleteVariableDeclaration(), and Sema().
| llvm::BumpPtrAllocator clang::Sema::BumpAlloc |
Definition at line 1233 of file Sema.h.
Referenced by CreateParsedType(), LookupSpecialMember(), and PrintStats().
| std::unique_ptr<sema::FunctionScopeInfo> clang::Sema::CachedFunctionScope |
Definition at line 1220 of file Sema.h.
Referenced by PushFunctionScope().
| unsigned clang::Sema::CapturingFunctionScopes = 0 |
Track the number of currently active capturing scopes.
Definition at line 1231 of file Sema.h.
Referenced by PushBlockScope(), PushCapturedRegionScope(), PushLambdaScope(), and tryCaptureVariable().
| CleanupInfo clang::Sema::Cleanup |
Used to control the generation of ExprWithCleanups.
Definition at line 6983 of file Sema.h.
Referenced by ActOnBlockStmtExpr(), ActOnDecltypeExpression(), ActOnFinishFunctionBody(), BuildBlockForLambdaConversion(), buildCoawaitCalls(), BuildCompoundLiteralExpr(), BuildLambdaExpr(), BuildStmtExpr(), CheckCXXDefaultArgExpr(), CheckForImmediateInvocation(), checkIndirectCopyRestoreSource(), CreateMaterializeTemporaryExpr(), DefaultLvalueConversion(), DiscardCleanupsInEvaluationContext(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), maybeExtendBlockObject(), clang::InitializationSequence::Perform(), PopExpressionEvaluationContext(), and PushExpressionEvaluationContext().
| PragmaStack<StringLiteral *> clang::Sema::CodeSegStack |
Definition at line 2045 of file Sema.h.
Referenced by ActOnFunctionDeclarator(), ActOnPragmaMSSeg(), getImplicitCodeSegAttrFromClass(), getImplicitCodeSegOrSectionAttrForFunction(), and Sema().
| SmallVector<Module *, 16> clang::Sema::CodeSynthesisContextLookupModules |
Extra modules inspected when performing a lookup during a template instantiation.
Computed lazily.
Definition at line 13608 of file Sema.h.
Referenced by getLookupModules(), and popCodeSynthesisContext().
| SmallVector<CodeSynthesisContext, 16> clang::Sema::CodeSynthesisContexts |
List of active code synthesis contexts.
This vector is treated as a stack. As synthesis of one entity requires synthesis of another, additional contexts are pushed onto the stack.
Definition at line 13597 of file Sema.h.
Referenced by BuildDecltypeType(), CheckTemplateTypeArgument(), DiagnoseDependentMemberLookup(), diagnoseZeroToNullptrConversion(), FindInstantiatedDecl(), getCurBlock(), getCurLambda(), getEnclosingLambdaOrBlock(), GetFullTypeForDeclarator(), getLookupModules(), getTopMostPointOfInstantiation(), hasAcceptableDefinition(), inConstraintSubstitution(), inParameterMappingSubstitution(), inTemplateInstantiation(), MarkFunctionReferenced(), popCodeSynthesisContext(), PrintContextStack(), PrintInstantiationStack(), pushCodeSynthesisContext(), SubstFunctionDeclType(), SubstParmTypes(), SubstType(), SubstType(), and SubstType().
| bool clang::Sema::CollectStats |
Flag indicating whether or not to collect detailed statistics.
Definition at line 1218 of file Sema.h.
Referenced by LifetimeSafetyTUAnalysis(), clang::ParseAST(), and Sema().
| PragmaStack<StringLiteral *> clang::Sema::ConstSegStack |
Definition at line 2044 of file Sema.h.
Referenced by ActOnPragmaMSSeg(), CheckCompleteVariableDeclaration(), and Sema().
| ASTConsumer& clang::Sema::Consumer |
Definition at line 1289 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnExplicitInstantiation(), ActOnExplicitInstantiation(), ActOnFinishInlineFunctionDef(), ActOnPragmaDetectMismatch(), ActOnPragmaMSComment(), ActOnTagFinishDefinition(), assignInheritanceModel(), BuildModuleInclude(), canSkipFunctionBody(), CorrectTypo(), createImplicitModuleImportForErrorRecovery(), DefineUsedVTables(), getASTConsumer(), handleMSInheritanceAttr(), Initialize(), InstantiateClassMembers(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), LookupVisibleDecls(), LookupVisibleDecls(), MarkFunctionReferenced(), mergeDeclAttribute(), ReferenceDllExportedMembers(), RequireCompleteType(), Sema(), and ~Sema().
| ASTContext& clang::Sema::Context |
Definition at line 1288 of file Sema.h.
Referenced by ActOnAccessSpecifier(), ActOnAddrLabel(), ActOnAliasDeclaration(), ActOnArraySubscriptExpr(), ActOnArrayTypeTrait(), ActOnBlockArguments(), ActOnBlockStart(), ActOnBlockStmtExpr(), ActOnBreakStmt(), ActOnBuiltinOffsetOf(), ActOnCapScopeReturnStmt(), ActOnCapturedRegionStart(), ActOnCapturedRegionStart(), ActOnCaseStmt(), ActOnCharacterConstant(), ActOnChooseExpr(), ActOnClassTemplateSpecialization(), ActOnCleanupAttr(), ActOnComment(), ActOnCompoundLiteral(), ActOnCompoundRequirement(), ActOnCompoundStmt(), ActOnConditionalOp(), ActOnContinueStmt(), ActOnConversionDeclarator(), ActOnCXXBoolLiteral(), ActOnCXXCatchBlock(), ActOnCXXDelete(), ActOnCXXFoldExpr(), ActOnCXXForRangeStmt(), ActOnCXXGlobalScopeSpecifier(), ActOnCXXMemberDeclarator(), ActOnCXXNestedNameSpecifier(), ActOnCXXNestedNameSpecifierDecltype(), ActOnCXXNestedNameSpecifierIndexedPack(), ActOnCXXNew(), ActOnCXXNullPtrLiteral(), ActOnCXXParenListInitExpr(), ActOnCXXTryBlock(), ActOnCXXTypeConstructExpr(), ActOnCXXTypeid(), ActOnCXXUuidof(), ActOnDeclStmt(), ActOnDecltypeExpression(), ActOnDecompositionDeclarator(), ActOnDefaultStmt(), actOnDelayedExceptionSpecification(), ActOnDependentIdExpression(), ActOnDependentMemberExpr(), ActOnDependentTag(), ActOnDesignatedInitializer(), ActOnDocumentableDecls(), ActOnDoStmt(), ActOnEffectExpression(), ActOnEmbedExpr(), ActOnEmptyDeclaration(), ActOnEndOfDeferStmt(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnExceptionDeclarator(), ActOnExplicitInstantiation(), ActOnExplicitInstantiation(), ActOnExplicitInstantiation(), ActOnFields(), ActOnFileScopeAsmDecl(), ActOnFinishFullExpr(), ActOnFinishFunctionBody(), ActOnFinishFunctionDeclarationDeclarator(), ActOnFinishKNRParamDeclarations(), ActOnFinishSEHFinallyBlock(), ActOnFinishSwitchStmt(), ActOnForStmt(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnGCCAsmStmt(), ActOnGlobalModuleFragmentDecl(), ActOnGNUNullExpr(), ActOnGotoStmt(), ActOnIdExpression(), ActOnIfStmt(), ActOnIndirectGotoStmt(), ActOnInitializerError(), ActOnIntegerConstant(), ActOnLabelStmt(), ActOnLambdaClosureQualifiers(), ActOnLastBitfield(), ActOnMemInitializer(), ActOnMemInitializers(), ActOnModuleDecl(), ActOnModuleImport(), ActOnMSAsmStmt(), ActOnMSDependentExistsStmt(), ActOnMSVCUnknownTypeName(), ActOnNamespaceAliasDef(), ActOnNoexceptSpec(), ActOnNonTypeTemplateParameter(), ActOnNullStmt(), ActOnNumericConstant(), actOnOMPReductionKindClause(), ActOnParamDeclarator(), ActOnParenExpr(), ActOnParenListExpr(), ActOnPragmaDetectMismatch(), ActOnPragmaMSComment(), ActOnPragmaMSSeg(), ActOnPragmaOptionsAlign(), ActOnPragmaPack(), ActOnPragmaRedefineExtname(), ActOnPragmaUnused(), ActOnPragmaWeakID(), ActOnPrivateModuleFragmentDecl(), ActOnPseudoDestructorExpr(), ActOnPseudoDestructorExpr(), ActOnRequiresExpr(), ActOnSEHExceptBlock(), ActOnSEHLeaveStmt(), ActOnSEHTryBlock(), ActOnSizeofParameterPackExpr(), ActOnSourceLocExpr(), ActOnStartConceptDefinition(), ActOnStartCXXMemberDeclarations(), ActOnStartCXXMemberReference(), ActOnStartExportDecl(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnStartOfSwitchStmt(), ActOnStartRequiresExpr(), ActOnStartTopLevelStmtDecl(), ActOnStringLiteral(), ActOnSuperScopeSpecifier(), ActOnTag(), ActOnTagFinishDefinition(), ActOnTagFinishSkippedDefinition(), ActOnTagTemplateIdType(), ActOnTemplatedFriendTag(), ActOnTemplateIdType(), ActOnTemplateName(), ActOnTemplateParameterList(), ActOnTemplateTemplateParameter(), ActOnTranslationUnitScope(), ActOnTypedefNameDecl(), ActOnTypenameType(), ActOnTypenameType(), ActOnTypeParameter(), ActOnTypeRequirement(), ActOnTypeTrait(), ActOnUnevaluatedStringLiteral(), ActOnUninitializedDecl(), ActOnUsingDirective(), ActOnUsingEnumDeclaration(), ActOnVariableDeclarator(), ActOnVarTemplateSpecialization(), ActOnWhileStmt(), AddAlignedAttr(), AddAlignedAttr(), AddAlignmentAttributesForRecord(), AddAlignValueAttr(), AddAllocAlignAttr(), AddAssumeAlignedAttr(), addBlockPointerConversion(), AddBuiltinAssignmentOperatorCandidates(), AddBuiltinCandidate(), AddBuiltinOperatorCandidates(), AddConversionCandidate(), AddFunctionCandidates(), addFunctionPointerConversion(), AddImplicitlyDeclaredMembersToClass(), AddImplicitMSFunctionNoBuiltinAttr(), addImplicitTypedef(), AddInitializerToDecl(), AddKnownFunctionAttributes(), AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(), addLifetimeBoundToImplicitThis(), AddMemberOperatorCandidates(), AddMethodTemplateCandidateImmediately(), AddModeAttr(), AddMsStructLayoutForRecord(), addNoClusterAttr(), AddOptnoneAttributeIfNoConflicts(), AddOverloadCandidate(), AddOverriddenMethods(), AddPropertyAttrs(), AddPushedVisibilityAttribute(), AddSectionMSAllocText(), AddSuperSendCompletion(), AddSurrogateCandidate(), AddTemplateConversionCandidateImmediately(), AddTemplateParametersToLambdaCallOperator(), addThisCompletion(), AdjustAddressSpaceForBuiltinOperandType(), adjustBlockReturnsToEnum(), adjustCCAndNoReturn(), AdjustDestructorExceptionSpec(), AdjustFunctionParmAndArgTypesForDeduction(), adjustMemberFunctionCC(), AnalyzeBitFieldAssignment(), AnalyzeComparison(), AnalyzeImplicitConversions(), ApplyAPINotesType(), applyAPINotesType(), ApplyNullability(), applyNullability(), clang::applyObjCTypeArgs(), applyOMPAllocateAttribute(), AreConstraintExpressionsEqual(), areMultiversionVariantFunctionsCompatible(), areVectorTypesSameSize(), AttachBaseSpecifiers(), AttachTypeConstraint(), clang::OverloadCandidateSet::BestViableFunction(), BuildAddressSpaceAttr(), BuildAddressSpaceIndex(), BuildAnonymousStructOrUnion(), BuildArrayType(), BuildArrayTypeTrait(), BuildAsTypeExpr(), BuildAtomicExpr(), BuildAtomicType(), BuildAttributedStmt(), BuildBaseInitializer(), BuildBinOp(), BuildBitIntType(), BuildBlockForLambdaConversion(), BuildBlockPointerType(), BuildBuiltinBitCastExpr(), BuildBuiltinCallExpr(), BuildBuiltinOffsetOf(), BuildCallExpr(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildCaptureField(), buildCoawaitCalls(), BuildCodeAlignAttr(), BuildCompoundLiteralExpr(), BuildConvertedConstantExpression(), BuildCookedLiteralOperatorCall(), BuildCoreturnStmt(), BuildCoroutineBodyStmt(), buildCoroutinePromise(), BuildCountAttributedArrayOrPointerType(), buildCounterInit(), buildCounterUpdate(), BuildCoyieldExpr(), BuildCStyleCastExpr(), BuildCXXAssumeExpr(), BuildCXXCastArgument(), BuildCXXConstructExpr(), BuildCXXConstructExpr(), BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), BuildCXXFoldExpr(), BuildCXXForRangeStmt(), BuildCXXFunctionalCastExpr(), BuildCXXMemberCallExpr(), BuildCXXNamedCast(), BuildCXXNestedNameSpecifier(), BuildCXXNew(), BuildCXXNoexceptExpr(), BuildCXXThisExpr(), BuildCXXThrow(), BuildCXXTypeConstructExpr(), BuildCXXTypeId(), BuildCXXTypeId(), BuildCXXUuidof(), BuildCXXUuidof(), BuildDeclarationNameExpr(), BuildDeclarationNameExpr(), BuildDeclaratorGroup(), buildDeclareReductionRef(), BuildDeclRefExpr(), BuildDeclRefExpr(), buildDeclRefExpr(), BuildDecltypeType(), BuildDelegatingInitializer(), BuildDependentDeclRefExpr(), BuildEmptyCXXFoldExpr(), BuildExceptionDeclaration(), BuildExpressionFromDeclTemplateArgument(), BuildExpressionFromIntegralTemplateArgumentValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), BuildExpressionTrait(), BuildExprRequirement(), BuildExprRequirement(), BuildExtVectorType(), BuildFieldReferenceExpr(), BuildFloatingLiteral(), BuildFunctionType(), BuildIfStmt(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), BuildInitList(), BuildLambdaExpr(), buildLambdaInitCaptureInitialization(), BuildLiteralOperatorCall(), BuildMatrixType(), BuildMemberExpr(), BuildMemberInitializer(), BuildMemberPointerType(), BuildMemberReferenceExpr(), buildMemcpyForAssignmentOp(), BuildMemInitializer(), BuildMicrosoftCAnonymousStruct(), BuildModuleInclude(), BuildMSDependentExistsStmt(), BuildMSPropertyRefExpr(), BuildNestedRequirement(), BuildNestedRequirement(), BuildOperatorCoawaitLookupExpr(), BuildOverloadedArrowExpr(), BuildOverloadedCallExpr(), buildOverloadedCallSet(), BuildPackIndexingExpr(), BuildPackIndexingType(), BuildParenType(), BuildParmVarDeclForTypedef(), BuildPointerType(), BuildPossibleImplicitMemberExpr(), buildPostUpdate(), BuildPredefinedExpr(), BuildPseudoDestructorExpr(), BuildQualifiedDeclarationNameExpr(), BuildQualifiedType(), BuildReadPipeType(), BuildReferenceType(), BuildResolvedCallExpr(), BuildResolvedCoawaitExpr(), BuildReturnStmt(), buildSingleCopyAssign(), buildSingleCopyAssignRecursively(), BuildSourceLocExpr(), BuildStaticAssertDeclaration(), BuildStdClassTemplate(), BuildStmtExpr(), BuildSynthesizedThreeWayComparison(), BuildTemplateIdExpr(), BuildTypeAwareUsualDelete(), BuildTypeConstraint(), buildTypeForLambdaCallOperator(), BuildTypeofExprType(), BuildTypeRequirement(), BuildTypeRequirement(), BuildTypeTrait(), BuildUnaryTransformType(), BuildUnresolvedCoawaitExpr(), buildUserDefinedMapperRef(), BuildUsingDeclaration(), BuildUsingEnumDeclaration(), BuildUsingPackDecl(), BuildUsingShadowDecl(), BuildVAArgExpr(), buildVarDecl(), buildVarDecl(), BuildVariableInstantiation(), BuildVectorLiteral(), BuildVectorType(), BuildWritePipeType(), BuiltinAlignment(), builtinAllocaAddrSpace(), BuiltinCallWithStaticChain(), BuiltinChangeCVRQualifiers(), BuiltinChangeSignedness(), builtinCommonTypeImpl(), BuiltinConstantArg(), BuiltinDecay(), BuiltinDumpStruct(), BuiltinInvoke(), BuiltinIsBaseOf(), BuiltinIsWithinLifetime(), BuiltinLaunder(), BuiltinMaskedGather(), BuiltinMaskedLoad(), BuiltinMaskedScatter(), BuiltinMaskedStore(), BuiltinRemoveExtent(), BuiltinRemoveReference(), BuiltinShuffleVector(), CallExprUnaryConversions(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), canPassInRegisters(), canThrow(), CaptureHasSideEffects(), captureInBlock(), captureInCapturedRegion(), captureInLambda(), CastForMoving(), castForMoving(), ChangeIntegralSignedness(), CheckAdditionOperands(), checkAddressOfFunctionIsAvailable(), CheckAddressOfMemberAccess(), CheckAddressOfOperand(), CheckAlignasUnderalignment(), CheckAllocatedType(), CheckAllocationAccess(), checkAPINotesReplacementType(), checkARCPropertyImpl(), checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), clang::checkArmStreamingBuiltin(), checkArrayElementAlignment(), checkArraySize(), CheckAsmLValue(), CheckAssignmentConstraints(), CheckAssignmentOperands(), CheckAttrTarget(), CheckBaseSpecifier(), CheckBindingsCount(), checkBlockPointerTypesForAssignment(), CheckBoolLikeConversion(), CheckBoolSelect(), checkBuiltinArgument(), checkBuiltinInferAllocToken(), checkBuiltinTemplateIdType(), checkBuiltinVectorMathArgTypes(), checkBuiltinVectorMathMixedEnums(), checkBuiltinVerboseTrap(), CheckC23ConstexprInitConversion(), CheckC23ConstexprInitStringLiteral(), CheckC23ConstexprVarType(), checkCall(), 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(), CheckCXXThrowOperand(), CheckDeducedArgumentConstraints(), CheckDeducedPlaceholderConstraints(), CheckDeductionConsistency(), CheckDeductionGuideDeclarator(), CheckDependentFunctionTemplateSpecialization(), CheckDerivedToBaseConversion(), CheckDestructor(), CheckDestructorAccess(), CheckDestructorDeclarator(), checkDLLAttributeRedeclaration(), CheckEnableIf(), checkEnumArithmeticConversions(), CheckEnumConstant(), CheckEnumRedeclaration(), checkEnumTypesInSwitchStmt(), CheckEquivalentExceptionSpec(), clang::CheckEquivalentExceptionSpecImpl(), checkEscapingByref(), checkExceptionSpecification(), CheckExplicitlyDefaultedComparison(), CheckExplicitlyDefaultedSpecialMember(), CheckExtVectorCast(), CheckExtVectorComponent(), CheckFieldDecl(), CheckFloatComparison(), CheckForConstantInitializer(), CheckForIncompatibleAttributes(), CheckFormatString(), checkFormatStringExpr(), CheckForModifiableLvalue(), checkForMultipleExportedDefaultConstructors(), CheckForNullPointerDereference(), CheckForNullPointerDereference(), CheckForReference(), CheckFriendAccess(), CheckFunctionCall(), CheckFunctionDeclaration(), checkFunctionOrMethodParameterIndex(), CheckFunctionReturnType(), CheckFunctionTemplateSpecialization(), checkGlobalOrExternCConflict(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckImplicitConversion(), checkIncorrectVTablePointerAuthenticationAttribute(), checkIndirectCopyRestoreSource(), checkInheritableAttr(), clang::CheckInvalidVLENandLMUL(), CheckKeyForObjCARCConversion(), CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), CheckLiteralType(), CheckLogicalOperands(), CheckLookupAccess(), CheckMain(), CheckMaskedBuiltinArgs(), CheckMatrixElementwiseOperands(), CheckMatrixMultiplyOperands(), CheckMemberAccess(), checkMemberDecomposition(), CheckMemberOperatorAccess(), CheckMemberPointerConversion(), CheckMemberSpecialization(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckModifiableLValue(), CheckMoveOnConstruction(), CheckMSVCRTEntryPoint(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionValue(), CheckNonNullExpr(), CheckNontrivialField(), CheckNonTypeTemplateParameterType(), checkNullabilityConsistency(), CheckNullabilityTypeSpecifier(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), CheckObjCCollectionLiteralElement(), checkObjCKindOfType(), checkObjCPointerTypesForAssignment(), clang::checkOpenCLEnqueueLocalSizeArgs(), checkOpenMPLoop(), CheckOperatorDeleteDeclaration(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteTypes(), CheckOriginalCallArgDeduction(), CheckOverridingFunctionAttributes(), CheckOverridingFunctionReturnType(), CheckPackExpansion(), CheckPackExpansion(), CheckPackExpansion(), CheckParameter(), clang::checkPipePacketType(), CheckPlaceholderExpr(), checkPointerAuthDiscriminatorArg(), checkPointerAuthKey(), checkPointerAuthValue(), CheckPointerConversion(), CheckPointerToMemberOperands(), checkPointerTypesForAssignment(), checkPreviousOMPAllocateAttribute(), CheckProtocolMethodDefs(), CheckPtrComparisonWithNullChar(), CheckRealImagOperand(), CheckRegparmAttr(), CheckScalarOrVector(), CheckScalarOrVectorOrMatrix(), checkSimdlenSafelenSpecified(), CheckSingleAssignmentConstraints(), CheckSizelessVectorOperands(), checkSizelessVectorShift(), CheckSpanLikeType(), CheckSpecializationInstantiationRedecl(), CheckSpecifiedExceptionType(), CheckStaticArrayArgument(), CheckStringInit(), CheckStructuredBindingMemberAccess(), CheckSubtractionOperands(), CheckSufficientAllocSize(), clang::checkSwiftAsyncErrorBlock(), checkTargetAttr(), CheckTautologicalComparison(), CheckTemplateArgument(), CheckTemplateArgument(), CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentList(), CheckTemplateArgumentPointerToMember(), CheckTemplateIdType(), CheckTemplateParameterList(), CheckTemplateTypeArgument(), CheckThreadLocalForLargeAlignment(), checkThreeWayNarrowingConversion(), CheckTransparentUnionArgumentConstraints(), checkTrivialClassMembers(), checkTupleLikeDecomposition(), CheckTypedefForVariablyModifiedType(), checkTypeMappable(), CheckTypenameType(), CheckTypenameType(), checkTypeParamListConsistency(), checkTypeSupport(), checkUInt32Argument(), CheckUnaryExprOrTypeTraitOperand(), CheckUnaryExprOrTypeTraitOperand(), checkUnknownAnyArg(), CheckUnresolvedLookupAccess(), CheckUnresolvedMemberAccess(), CheckUsingShadowDecl(), CheckVariableDeclarationType(), CheckVarTemplateId(), checkVAStartABI(), CheckVectorCast(), CheckVectorCompareOperands(), CheckVectorConditionalTypes(), checkVectorDecomposition(), CheckVectorElementsTraitOperandType(), CheckVectorOperands(), checkVectorResult(), CheckVectorSelect(), checkVectorShift(), CheckWaveActive(), ClassifyName(), CloneDesignatedInitExpr(), CollectFieldInitializer(), compareConversionFunctions(), CompareDerivedToBaseConversions(), CompareImplicitConversionSequences(), CompareQualificationConversions(), CompareReferenceRelationship(), CompareStandardConversionSequences(), clang::ConversionFixItGenerator::compareTypesSimple(), completeExprArrayBound(), computeDeclContext(), ComputeDefaultedSpecialMemberExceptionSpec(), ConstantFoldAttrArgs(), convertArgsForAvailabilityChecks(), ConvertArgumentsForCall(), convertArgumentToType(), convertCallArgsToString(), ConvertDeclSpecToType(), ConvertDeclToDeclGroup(), ConvertDeducedTemplateArgument(), ConvertDeducedTemplateArguments(), ConvertMaskedBuiltinArgs(), ConvertParamDefaultArgument(), convertVector(), ConvertVectorExpr(), copyAttrFromTypedefToDecl(), copyAttrIfPresent(), CopyObject(), CreateAnnotationAttr(), CreateBuiltin(), CreateBuiltinArraySubscriptExpr(), CreateBuiltinBinOp(), CreateBuiltinMatrixSingleSubscriptExpr(), CreateBuiltinMatrixSubscriptExpr(), CreateBuiltinUnaryOp(), CreateCapturedStmtRecordDecl(), createClusterDimsAttr(), clang::CodeCompletionResult::CreateCodeCompletionString(), createFieldForHostLayoutStruct(), CreateFunctionRefExpr(), CreateGenericSelectionExpr(), CreateLambdaCallOperator(), createLambdaClosureType(), createLambdaInitCaptureVarDecl(), CreateLaunchBoundsAttr(), CreateMaterializeTemporaryExpr(), CreateNewFunctionDecl(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), CreateOverloadedUnaryOp(), CreateRecoveryExpr(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), createSubstDiag(), createSubstDiagAt(), CreateUnaryExprOrTypeTraitExpr(), CreateUnaryExprOrTypeTraitExpr(), CreateUnresolvedLookupExpr(), CXXCheckConditionalOperands(), CXXRecordMembersNamed(), DeclApplyPragmaWeak(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), DeclareImplicitCopyAssignment(), DeclareImplicitCopyConstructor(), DeclareImplicitDefaultConstructor(), DeclareImplicitDestructor(), DeclareImplicitMoveAssignment(), DeclareImplicitMoveConstructor(), DecomposeUnqualifiedId(), DeduceAutoType(), deduceClosureReturnType(), DeduceFromInitializerList(), DeduceFunctionTypeFromReturnExpr(), DeduceNonTypeTemplateArgument(), DeduceNonTypeTemplateArgument(), DeduceNullPtrTemplateArgument(), deduceOpenCLAddressSpace(), DeduceReturnType(), DeduceTemplateArguments(), DeduceTemplateArguments(), DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateArgumentsFromType(), DeduceTemplateSpecArguments(), DeduceTemplateSpecializationFromInitializer(), deduceVarTypeFromInitializer(), DefaultArgumentPromotion(), defaultedSpecialMemberIsConstexpr(), DefaultFunctionArrayConversion(), DefaultLvalueConversion(), DefineDefaultedComparison(), DefineImplicitCopyAssignment(), DefineImplicitCopyConstructor(), DefineImplicitDefaultConstructor(), DefineImplicitDestructor(), DefineImplicitLambdaToBlockPointerConversion(), DefineImplicitLambdaToFunctionPointerConversion(), DefineImplicitMoveAssignment(), DefineImplicitMoveConstructor(), DefineInheritingConstructor(), DefineUsedVTables(), DelayDependentAccess(), clang::InitializationSequence::Diagnose(), DiagnoseAmbiguousLookup(), diagnoseArgDependentDiagnoseIfAttrs(), diagnoseArgIndependentDiagnoseIfAttrs(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArrayStarInParamType(), DiagnoseAssignmentEnum(), DiagnoseAssignmentResult(), DiagnoseAvailabilityOfDecl(), DiagnoseBadAccess(), DiagnoseBadConversion(), DiagnoseBadDeduction(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), DiagnoseBaseOrMemInitializerOrder(), DiagnoseCommaOperator(), DiagnoseConditionalForNull(), DiagnoseDirectIsaAccess(), DiagnoseDivisionSizeofPointerOrArray(), DiagnoseEmptyLookup(), DiagnoseEqualityWithExtraParens(), DiagnoseExceptionUse(), DiagnoseFloatingImpCast(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), DiagnoseIntInBoolContext(), DiagnoseInvalidExplicitObjectParameterInLambda(), DiagnoseInvalidRedeclaration(), DiagnoseIsEmptyReason(), DiagnoseIsFinalReason(), diagnoseListInit(), diagnoseMissingImport(), diagnoseMissingTemplateArguments(), DiagnoseNarrowingInInitList(), DiagnoseNonAbstractReason(), DiagnoseNonAssignableReason(), DiagnoseNonConstructibleReason(), DiagnoseNontrivial(), diagnoseObjCARCConversion(), DiagnoseObjCImplementedDeprecations(), diagnoseOpenCLTypes(), diagnoseQualifiedDeclaration(), DiagnoseSentinelCalls(), DiagnoseSizeOfParametersAndReturnValue(), DiagnoseStaticAssertDetails(), diagnoseTautologicalComparison(), DiagnoseTwoPhaseOperatorLookup(), DiagnoseUninitializedUse(), DiagnoseUninstantiableTemplate(), DiagnoseUniqueObjectDuplication(), DiagnoseUnknownAttribute(), DiagnoseUnknownTemplateName(), DiagnoseUnknownTypeName(), DiagnoseUnusedDecl(), DiagnoseUseOfDecl(), diagnoseVarDeclTypeMismatch(), diagnoseWellFormedUnsatisfiedConstraintExpr(), diagOpenCLBuiltinTypeError(), DiagRecursiveConstraintEval(), DiscardingCFIUncheckedCallee(), DiscardMisalignedMemberAddress(), DoEmitAvailabilityWarning(), doesUsualArrayDeleteWantSize(), DoMarkPotentialCapture(), DoMarkVarDeclReferenced(), EmitDiagnostic(), emitReplacement(), EvaluateAsStringImpl(), EvaluateBooleanTypeTrait(), EvaluateConvertedConstantExpression(), ExpandAnonymousFieldDesignator(), ExpandFunctionLocalPredefinedMacros(), ExtendNestedNameSpecifier(), ExtractUnqualifiedFunctionType(), FillInlineAsmIdentifierInfo(), FilterLookupForScope(), filterNonConflictingPreviousTypedefDecls(), FinalizeDeclaration(), FinalizeDeclaratorGroup(), FinalizeVarWithDestructor(), FindAllocationFunctions(), FindAssociatedClassesAndNamespaces(), FindBaseInitializer(), clang::findCapturingExpr(), FindCompositePointerType(), findConstantBaseAndOffset(), FindDeallocationFunction(), FindDeallocationFunctionForDestructor(), findDecomposableBaseClass(), findDeleteForPromise(), findFailedBooleanCondition(), findInheritingConstructor(), FindInstantiatedDecl(), FindLabeledBreakContinueScope(), findLocallyScopedExternCDecl(), clang::DeclSpec::Finish(), FinishTemplateArgumentDeduction(), FinishTemplateArgumentDeduction(), FinishTemplateArgumentDeduction(), fitsInto(), FixOverloadedFunctionReference(), FormatStringHasSArg(), funcHasParameterSizeMangling(), FunctionParamTypesAreEqual(), GatherArgumentsForCall(), getAmbiguousPathsDisplayString(), getAndVerifyMatrixDimension(), getASTContext(), getBaseMessageSendResultType(), getCCForDeclaratorChunk(), getCompletionPrintingPolicy(), getConstructorName(), getCopyElisionCandidate(), getCurrentMangleNumberContext(), getCurrentThisType(), GetDeclSpecTypeForDeclarator(), getDecltypeForExpr(), GetDecompositionElementCount(), getDestructorName(), getDestructorTypeForDecltype(), getDummyLambdaType(), getFixedEnumPromtion(), GetFullTypeForDeclarator(), getGenericLambdaTemplateParameterList(), getIdentityTemplateArgumentLoc(), getImplicitMethodEPI(), getInheritingConstructorName(), getLambdaConversionFunctionCallConv(), getLambdaConversionFunctionResultType(), getLocationOfStringLiteralByte(), getMoreSpecialized(), getMoreSpecializedPartialSpecialization(), getMoreSpecializedPartialSpecialization(), getMoreSpecializedTemplate(), getNamedReturnInfo(), getNamedReturnInfo(), GetNameFromUnqualifiedId(), getNonOdrUseReasonInCurrentContext(), getNSNumberFactoryMethod(), getOpenCLEnumType(), getOpenCLKernelParameterType(), getOpenCLTypedefType(), GetOrCreateMSAsmLabel(), getOrCreateStdNamespace(), getParamType(), getPatternForClassTemplateSpecialization(), getPresumedAlignmentOfPointer(), getPrintingPolicy(), getPrintingPolicy(), GetSignedSizelessVectorType(), GetSignedVectorType(), getStdAlignValT(), getStdBadAlloc(), getStdNamespace(), getStdTrait(), getSuperIdentifier(), getTemplateArgumentPackExpansionPattern(), getTemplateInstantiationArgs(), getTrivialIntegralTemplateArgument(), getTrivialTemplateArgumentLoc(), getTupleLikeElementType(), GetTypeForDeclaratorCast(), getTypeName(), GetTypeOfFunction(), GetTypeSourceInfoForDeclarator(), getTypeSourceInfoForStdAlignValT(), getVariadicCallType(), GetVTablePointer(), GloballyUniqueObjectMightBeAccidentallyDuplicated(), handleAbiTagAttr(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), handleAcquireHandleAttr(), HandleAddressSpaceTypeAttribute(), handleAliasAttr(), handleAlignedAttr(), handleAllocSizeAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), HandleAnnotateTypeAttr(), handleAPINotedRetainCountAttribute(), handleArgumentWithTypeTagAttr(), HandleArmSveVectorBitsTypeAttr(), handleAssertCapabilityAttr(), handleAtomicAttr(), handleAttrWithMessage(), handleAvailabilityAttr(), handleBTFDeclTagAttr(), HandleBTFTypeTagAttribute(), handleBuiltinAliasAttr(), handleCallableWhenAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCalledOnceAttr(), handleCapabilityAttr(), handleCFGuardAttr(), handleCFIUncheckedCalleeAttr(), handleCleanupAttr(), handleClusterDimsAttr(), handleCodeModelAttr(), handleCommonAttr(), handleComplexConversion(), handleComplexFloatConversion(), handleComplexIntConversion(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleCPUSpecificAttr(), handleCXXAssumeAttr(), handleDeclspecThreadAttr(), handleDelayedForbiddenType(), handleDependencyAttr(), HandleDependentAccessCheck(), handleDeprecatedAttr(), handleDestructorAttr(), handleDeviceAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnforceTCBAttr(), handleEnumExtensibilityAttr(), clang::SemaSwift::handleError(), handleExcludeFromExplicitInstantiationAttr(), handleExternalSourceSymbolAttr(), handleFallThroughAttr(), HandleField(), handleFixedPointConversion(), handleFloatConversion(), handleFormatArgAttr(), handleFormatAttrCommon(), handleFunctionReturnThunksAttr(), handleFunctionTypeAttr(), HandleFunctionTypeMismatch(), handleGCCStructAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGridConstantAttr(), handleGuardedByAttr(), handleHandleAttr(), handleHLSLControlFlowHint(), handleHLSLLoopHintAttr(), handleIFuncAttr(), HandleImmediateInvocations(), handleInitPriorityAttr(), handleIntegerConversion(), handleIntegerVectorBinOpConversion(), handleInterruptAttr(), handleIntToFloatConversion(), handleLambdaNumbering(), handleLayoutVersion(), handleLifetimeCategoryAttr(), handleLikely(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleLoopHintAttr(), handleMallocSpanAttr(), handleManagedAttr(), handleMinVectorWidthAttr(), handleModularFormat(), handleMSConstexprAttr(), handleMSConstexprAttr(), handleMSPointerTypeQualifierAttr(), HandleMSProperty(), handleMSStructAttr(), handleMustTailAttr(), handleNakedAttr(), HandleNeonVectorTypeAttr(), handleNoBuiltinAttr(), handleNoClusterAttr(), handleNoConvergentAttr(), handleNoDebugAttr(), handleNoEscapeAttr(), handleNoInlineAttr(), handleNoMergeAttr(), handleNoMergeAttr(), handleNonBlockingNonAllocatingTypeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNonStringAttr(), handleNoRandomizeLayoutAttr(), handleNoReturnAttr(), handleNoSanitizeAddressAttr(), handleNoSanitizeAttr(), handleNoSanitizeMemoryAttr(), handleNoSanitizeThreadAttr(), handleNoSpecializations(), handleNoUniqueAddressAttr(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), HandleOpenCLAccessAttr(), handleOpenCLUnrollHint(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handlePreferredName(), handlePreferredTypeAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), HandlePtrAuthQualifier(), handleRandomizeLayoutAttr(), handlerCanCatch(), handleReentrantCapabilityAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleRestrictAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedAttr(), handleStandardNoReturnAttr(), handleSuppressAttr(), handleSuppressAttr(), HandleSwiftAttr(), handleTagNumbering(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUninitializedAttr(), handleUnlikely(), handleUnsafeBufferUsage(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleVTablePointerAuthentication(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), HandleWebAssemblyFuncrefAttr(), handleWorkGroupSize(), handleXRayLogArgsAttr(), handleZeroCallUsedRegsAttr(), hasAcceptableDefinition(), hasDeducibleTemplateParameters(), hasMergedDefinitionInCurrentModule(), HasNonDeletedDefaultedEqualityComparison(), hasUserDefinedMapper(), hasVisibleMergedDefinition(), IgnoredValueConversions(), ImpCastExprToType(), ImplicitlyDefineFunction(), inferARCLifetimeForPointee(), inferARCWriteback(), inferGslOwnerPointerAttribute(), inferGslPointerAttribute(), inferLifetimeBoundAttribute(), inferLifetimeCaptureByAttribute(), clang::inferNoReturnAttr(), inferNullableClassAttribute(), Initialize(), InitializeExplicitObjectArgument(), clang::InitializationSequence::InitializeFrom(), InjectAnonymousStructOrUnionMembers(), InsertOCLBuiltinDeclarationsFromTable(), InstantiateAttrs(), InstantiateAttrsForDecl(), InstantiateClassMembers(), InstantiateDefaultCtorDefaultArgs(), InstantiateEnum(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), instantiateOMPDeclareVariantAttr(), InstantiateVariableDefinition(), InventAbbreviatedTemplateParameterTypeName(), InventTemplateParameter(), isAbstractType(), isAcceptableNestedNameSpecifier(), isAllowableExplicitConversion(), isArithmeticArgumentPromotion(), clang::isBetterOverloadCandidate(), IsBlockPointerConversion(), IsCXXTriviallyRelocatableType(), isDeductionGuideName(), isDefaultStdCall(), IsDerivedFrom(), IsEligibleForTrivialRelocation(), isEquivalentInternalLinkageDeclaration(), IsFloatingPointConversion(), isForbiddenTypeAllowed(), IsFunctionConversion(), isFunctionDefinitionDiscarded(), IsImplicitBoolFloatConversion(), isImplicitMapperNeeded(), isIncompatibleTypedef(), IsIntegralPromotion(), IsInvalidSMECallConversion(), isLaxVectorConversion(), isLibstdcxxEagerExceptionSpecHack(), IsMatrixConversion(), isMemberAccessibleForDeletion(), IsMemberPointerConversion(), isMicrosoftMissingTypename(), isMoreSpecializedThanPrimary(), isMoreSpecializedThanPrimary(), isNonNegativeIntegerValue(), isNonPlacementDeallocationFunction(), isNullPointerValueTemplateArgument(), isObjCPointerConversion(), IsOverloadOrOverrideImpl(), isPermittedNeonBaseType(), IsPointerConversion(), IsQualificationConversion(), isRelevantAttr(), isSameOrCompatibleFunctionType(), IsSimplyAccessible(), IsStandardConversion(), isStdClassTemplate(), IsStringInit(), IsStringLiteralToNonConstPointerConversion(), isTemplateName(), isTemplateTemplateParameterAtLeastAsSpecializedAs(), isTupleLike(), IsUserDefinedConversion(), isValidInteropVariable(), isValidSectionSpecifier(), isValidVarArgType(), IsVectorConversion(), IsVectorOrMatrixElementConversion(), LazilyCreateBuiltin(), LookupBuiltin(), LookupConstructors(), lookupCoroutineHandleType(), LookupDirect(), LookupGlobalDeallocationFunctions(), LookupInlineAsmField(), LookupInlineAsmVarDeclField(), LookupInSuper(), LookupLiteralOperator(), LookupMemberExpr(), LookupMethodInReceiverType(), clang::LookupNamed(), clang::LookupNamespace(), LookupObjCInterfaceDeclForLiteral(), LookupOrCreateLabel(), LookupOverloadedBinOp(), LookupOverloadedOperatorName(), LookupPredefedObjCSuperType(), lookupPromiseType(), LookupQualifiedName(), LookupSpecialMember(), LookupStdSourceLocationImpl(), makeAttributeArgExpr(), makeClusterDimsArgExpr(), makeLaunchBoundsArgExpr(), makeMergedDefinitionVisible(), makeQualifiedLValueReferenceType(), makeUnavailableInSystemHeader(), MarkBaseDestructorsReferenced(), MarkDeducedTemplateParameters(), MarkFieldDestructorReferenced(), MarkFunctionReferenced(), markUsedForAliasOrIfunc(), MarkUsedTemplateParameters(), MarkUsedTemplateParameters(), MarkUsedTemplateParameters(), MarkUsedTemplateParameters(), MarkVarDeclODRUsed(), MarkVirtualBaseDestructorsReferenced(), MarkVTableUsed(), MatchTemplateParameterKind(), MatchTemplateParametersToScopeSpecifier(), maybeAddDeclWithEffects(), MaybeAddOverrideCalls(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), MaybeEmitAmbiguousAtomicConstraintsDiagnostic(), maybeExtendBlockObject(), mergeAlignedAttrs(), mergeAlwaysInlineAttr(), mergeAvailabilityAttr(), mergeBTFDeclTagAttr(), mergeCodeSegAttr(), MergeCompatibleFunctionDecls(), mergeDeclAttribute(), mergeDeclAttributes(), mergeDLLExportAttr(), mergeDLLImportAttr(), mergeErrorAttr(), mergeFormatAttr(), mergeFormatMatchesAttr(), MergeFunctionDecl(), mergeInterfaceMethodToImpl(), mergeInternalLinkageAttr(), mergeInternalLinkageAttr(), mergeMinSizeAttr(), mergeModularFormatAttr(), mergeMSInheritanceAttr(), mergeObjCDirectMembers(), mergeOptimizeNoneAttr(), mergeParamDeclTypes(), mergeSectionAttr(), MergeTypedefNameDecl(), mergeTypeNullabilityForRedecl(), mergeUuidAttr(), MergeVarDeclExceptionSpecs(), MergeVarDeclTypes(), mergeVisibilityAttr(), mergeVisibilityType(), MightInstantiateTo(), NoteAllOverloadCandidates(), NoteSurrogateCandidate(), OpenCLArithmeticConversions(), OpenCLConvertScalarsToVectors(), ParsedFreeStandingDeclSpec(), ParseLifetimeCaptureByAttr(), parseModeAttrArg(), ParseTypedefDecl(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), PerformContextuallyConvertToBool(), PerformContextuallyConvertToObjCPointer(), PerformImplicitConversion(), PerformImplicitConversion(), PerformImplicitObjectArgumentInitialization(), PerformMoveOrCopyInitialization(), PerformObjectMemberConversion(), PerformPendingInstantiations(), PointerAuthBlendDiscriminator(), PointerAuthSignGenericData(), PreferredConditionType(), PrepareArgumentsForCallToObjectOfClassType(), PrepareScalarCast(), prepareVectorSplat(), PrintInstantiationStack(), ProcessAPINotes(), ProcessAPINotes(), ProcessAPINotes(), ProcessAPINotes(), ProcessAPINotes(), ProcessAPINotes(), ProcessAPINotes(), ProcessAPINotes(), ProcessAPINotes(), ProcessAPINotes(), ProcessAPINotes(), ProcessDeclAttribute(), ProcessDeclAttributeList(), processImplicitMapsWithDefaultMappers(), ProcessOpenMPDoacrossClauseCommon(), ProcessStmtAttribute(), propagateAttribute(), PushCapturedRegionScope(), clang::TreeTransform< AdjustConstraints >::RebuildCXXInheritedCtorInitExpr(), RebuildDeclaratorInCurrentInstantiation(), RebuildNestedNameSpecifierInCurrentInstantiation(), rebuildPotentialResultsAsNonOdrUsed(), clang::TreeTransform< AdjustConstraints >::RebuildTemplateName(), recordConversion(), recoverFromTypeInKnownDependentBase(), ReferenceDllExportedMembers(), RefersToMemberWithReducedAlignment(), RegisterLocallyScopedExternCDecl(), RemoveAddressSpaceFromPtr(), repeatForLambdaConversionFunctionCallingConvs(), RequireCompleteDeclContext(), RequireCompleteEnumDecl(), RequireLiteralType(), RequireNonAbstractType(), RequireStructuralType(), ResolveAddressOfOverloadedFunction(), resolveAllocationOverloadInterior(), resolveAndFixAddressOfSingleOverloadCandidate(), ResolveAndFixSingleFunctionTemplateSpecialization(), resolveAssumedTemplateNameAsType(), resolveBuiltinNewDeleteOverload(), ResolveConstructorOverload(), ResolveOverloadedFunctionForReferenceBinding(), ResolveOverloadForDeduction(), ResolveSingleFunctionTemplateSpecialization(), SaveNestedNameSpecifierAnnotation(), SelectBestMethod(), SelectPropertyForSynthesisFromProtocols(), Sema(), SetCtorInitializers(), SetDelegatingInitializer(), SetElementTypeAsReturnType(), SetEligibleMethods(), SetNestedNameSpecifier(), SetNestedNameSpecifier(), setTagNameForLinkagePurposes(), sharedGetConstructorDestructorAttrExpr(), clang::OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed(), shouldAddReversedEqEq(), ShouldDeleteSpecialMember(), ShouldDiagnoseAvailabilityInContext(), ShouldDiagnoseSwitchCaseNotInEnum(), shouldInferAvailabilityAttribute(), ShouldRemoveFromUnused(), ShouldTryAgainWithRedefinitionType(), ShouldUseTypeAwareOperatorNewOrDelete(), ShouldWarnIfUnusedFileScopedDecl(), SpecialMemberIsTrivial(), SubstAutoType(), SubstAutoTypeSourceInfo(), SubstBaseSpecifiers(), SubstDefaultArgument(), SubstDefaultTemplateArgumentIfAvailable(), SubstFunctionDeclType(), SubstituteExplicitTemplateArguments(), SubstParmVarDecl(), SubstSpaceshipAsEqualEqual(), SubstType(), threadSafetyCheckIsSmartPointer(), transferARCOwnershipToDeclaratorChunk(), transferARCOwnershipToDeclSpec(), clang::transformOMPMappableExprListClause(), translateTemplateArgument(), TryArrayCopy(), 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(), TryUserDefinedConversion(), TryValueInitialization(), tryVectorConvertAndSplat(), UnifySection(), UnifySection(), unsupportedTypeConversion(), UpdateExceptionSpec(), UsualArithmeticConversions(), UsualUnaryConversions(), UsualUnaryFPConversions(), VerifyBitField(), VerifyIntegerConstantExpression(), verifyValidIntegerConstantExpr(), warnOnReservedIdentifier(), widenIterationCount(), and ~Sema().
| DeclContext* clang::Sema::CurContext |
CurContext - This is the current declaration context of parsing.
Definition at line 1421 of file Sema.h.
Referenced by ActOnAccessSpecifier(), ActOnAliasDeclaration(), ActOnAnnotModuleBegin(), ActOnAnnotModuleEnd(), ActOnAnnotModuleInclude(), ActOnBlockStart(), ActOnCapScopeReturnStmt(), ActOnCapturedRegionStart(), ActOnCapturedRegionStart(), ActOnClassTemplateSpecialization(), ActOnCompoundRequirement(), ActOnCoroutineBodyStart(), ActOnCXXMemberDeclarator(), ActOnDecompositionDeclarator(), ActOnEmptyDeclaration(), ActOnEnumConstant(), ActOnExceptionDeclarator(), ActOnExitFunctionContext(), ActOnExplicitInstantiation(), ActOnFileScopeAsmDecl(), ActOnFinishConceptDefinition(), ActOnFinishCXXMemberDecls(), ActOnFinishFullExpr(), ActOnFinishRequiresExpr(), ActOnFriendFunctionDecl(), ActOnFriendTypeDecl(), ActOnFunctionDeclarator(), ActOnIfStmt(), ActOnLambdaExpressionAfterIntroducer(), ActOnLastBitfield(), ActOnModuleDecl(), ActOnModuleImport(), ActOnMSVCUnknownTypeName(), ActOnNamespaceAliasDef(), actOnOMPReductionKindClause(), ActOnPragmaExport(), ActOnPragmaFloatControl(), ActOnPragmaMSAllocText(), ActOnPragmaMSFunction(), ActOnPragmaMSOptimize(), ActOnReenterFunctionContext(), ActOnSEHTryBlock(), ActOnSourceLocExpr(), ActOnStartConceptDefinition(), ActOnStartCXXMemberDeclarations(), ActOnStartCXXMemberReference(), ActOnStartExportDecl(), ActOnStartLinkageSpecification(), ActOnStartNamespaceDef(), ActOnStartRequiresExpr(), ActOnStartTopLevelStmtDecl(), ActOnTag(), ActOnTagFinishSkippedDefinition(), ActOnTagStartSkippedDefinition(), ActOnTemplatedFriendTag(), ActOnTypedefDeclarator(), ActOnUsingDirective(), ActOnVariableDeclarator(), ActOnVarTemplateSpecialization(), AddClassMessageCompletions(), AddKeywordsToConsumer(), AddOrdinaryNameResults(), AddOverrideResults(), BuildBaseInitializer(), BuildBlockForLambdaConversion(), BuildCallToMemberFunction(), buildCapture(), buildCapture(), BuildCompoundLiteralExpr(), buildCoroutineParameterMoves(), buildCoroutinePromise(), BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), BuildCXXNestedNameSpecifier(), buildDeclareReductionRef(), BuildDelegatingInitializer(), buildDistanceFunc(), BuildExceptionDeclaration(), BuildFieldReferenceExpr(), BuildLambdaExpr(), buildLoopVarFunc(), BuildMicrosoftCAnonymousStruct(), BuildOverloadedCallExpr(), buildOverloadedCallSet(), BuildPredefinedExpr(), BuildReturnStmt(), buildSingleCopyAssignRecursively(), BuildStaticAssertDeclaration(), buildUserDefinedMapperRef(), BuildUsingDeclaration(), BuildUsingEnumDeclaration(), BuildUsingPackDecl(), BuildUsingShadowDecl(), BuildVAArgExpr(), buildVarDecl(), buildVarDecl(), CanUseDecl(), CheckAccess(), checkAllocateClauses(), checkAndRewriteMustTailAttr(), checkCall(), CheckClassTemplate(), CheckCompareOperands(), CheckConstructorAccess(), checkCoroutineContext(), CheckCXXThisType(), CheckDeductionGuideDeclarator(), CheckExplicitInstantiationScope(), CheckFriendAccess(), CheckFunctionDeclaration(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckInheritingConstructorUsingDecl(), CheckMissingFormatAttribute(), CheckMultiVersionAdditionalDecl(), CheckNakedParmReference(), checkNoThrow(), checkOpenMPIterationSpace(), checkOpenMPLoop(), CheckOverload(), CheckTemplateArgument(), CheckTemplateIdType(), CheckTemplateSpecializationScope(), checkTypeMappable(), CheckUsingDeclQualifier(), CheckUsingDeclRedeclaration(), CheckUsingShadowDecl(), CheckVariableDeclarationType(), checkVAStartIsInVariadicFunction(), CheckVectorElementsTraitOperandType(), computeDeclContext(), clang::Sema::ContextRAII::ContextRAII(), ConvertDeducedTemplateArgument(), CreateCapturedStmtRecordDecl(), createLambdaClosureType(), CreateNewFunctionDecl(), DeclApplyPragmaWeak(), DeduceTemplateArguments(), clang::InitializationSequence::Diagnose(), DiagnoseDependentMemberLookup(), DiagnoseEmptyLookup(), DiagnoseExceptionUse(), diagnoseQualifiedDeclaration(), DiagnoseTwoPhaseLookup(), diagnoseUncapturableValueReferenceOrBinding(), DiagnoseUseOfDecl(), DoMarkPotentialCapture(), EnterDeclaratorContext(), clang::PreferredTypeBuilder::enterReturn(), clang::IncrementalAction::ExecuteAction(), ExitDeclaratorContext(), ExpandFunctionLocalPredefinedMacros(), FilterUsingLookup(), FindInstantiatedDecl(), FinishForRangeVarDecl(), finishLinearClauses(), FixDependencyOfIdExpressionsInLambdaWithDependentObjectParameter(), forRedeclarationInCurContext(), getCurBlock(), getCurLambda(), getCurLexicalContext(), getCurrentClass(), getCurrentInstantiationOf(), getCurrentMangleNumberContext(), getCurrentThisType(), GetDeclSpecTypeForDeclarator(), getEnclosingLambdaOrBlock(), getFunctionLevelDeclContext(), getFunctionStorageClass(), GetNameFromUnqualifiedId(), getNullabilityCompletenessCheckFileID(), HandleDeclarator(), hasUncompilableErrorOccurred(), hasUserDefinedMapper(), InstantiateInClassInitializer(), InstantiateMemInitializers(), isCapturingReferenceToHostVarInCUDADeviceLambda(), isCurrentClassNameTypo(), IsInsideALocalClassWithinATemplateFunction(), isLibstdcxxEagerExceptionSpecHack(), isMicrosoftMissingTypename(), isNonNegativeIntegerValue(), isOdrUseContext(), isReferenceToNonConstCapture(), IsSimplyAccessible(), isValidCoroutineContext(), LazilyCreateBuiltin(), LookupExistingLabel(), LookupMethodInReceiverType(), LookupOrCreateLabel(), makeUnavailableInSystemHeader(), mapCodeCompletionContext(), MarkFunctionReferenced(), MarkThisReferenced(), MarkVarDeclODRUsed(), MarkVTableUsed(), MaybeAddOverrideCalls(), MergeTypedefNameDecl(), ParsedFreeStandingDeclSpec(), ParseTypedefDecl(), PopDeclContext(), ProcessOpenMPDoacrossClauseCommon(), PushDeclContext(), PushOnScopeChains(), clang::TreeTransform< AdjustConstraints >::RebuildExceptionDecl(), RebuildLambdaScopeInfo(), recoverFromMSUnqualifiedLookup(), recoverFromTypeInKnownDependentBase(), Sema(), ShouldEnterDeclaratorScope(), SubstParmVarDecl(), tryCaptureVariable(), tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs(), TryTypoCorrectionForCall(), and warnAboutAmbiguousFunction().
| FPOptions clang::Sema::CurFPFeatures |
Definition at line 1284 of file Sema.h.
Referenced by ActOnParenExpr(), ActOnPragmaCXLimitedRange(), ActOnPragmaFEnvAccess(), ActOnPragmaFEnvRound(), ActOnPragmaFloatControl(), ActOnPragmaFPContract(), ActOnPragmaFPEvalMethod(), ActOnPragmaFPValueChangingOption(), applyFunctionAttributesBeforeParsingBody(), BuildFloatingLiteral(), clang::Sema::FPFeaturesStateRAII::FPFeaturesStateRAII(), getCurFPFeatures(), InstantiateFunctionDefinition(), isPreciseFPEnabled(), resetFPOptions(), Sema(), setExceptionMode(), and UsualUnaryFPConversions().
| StringLiteral* clang::Sema::CurInitSeg |
Last section used with #pragma init_seg.
Definition at line 2086 of file Sema.h.
Referenced by ActOnPragmaMSInitSeg(), CheckCompleteVariableDeclaration(), and Sema().
| SourceLocation clang::Sema::CurInitSegLoc |
Definition at line 2087 of file Sema.h.
Referenced by ActOnPragmaMSInitSeg(), and CheckCompleteVariableDeclaration().
| SmallVector<std::pair<Scope *, SourceLocation>, 2> clang::Sema::CurrentDefer |
Stack of '_Defer' statements that are currently being parsed, as well as the locations of their '_Defer' keywords.
Can be empty.
Definition at line 10981 of file Sema.h.
Referenced by ActOnDeferStmtError(), ActOnEndOfDeferStmt(), ActOnStartOfDeferStmt(), BuildResolvedCallExpr(), and CheckJumpOutOfSEHFinallyOrDefer().
| LocalInstantiationScope* clang::Sema::CurrentInstantiationScope |
The current instantiation scope used to store local variables.
Definition at line 13073 of file Sema.h.
Referenced by ActOnCompoundStmt(), BuildVariableInstantiation(), CheckCXXDefaultArguments(), CheckParameterPacksForExpansion(), CheckTemplateArgumentList(), DiagnoseEmptyLoopBody(), DiagnoseEmptyStmtBody(), FindInstantiatedDecl(), FinishTemplateArgumentDeduction(), getNumArgumentsInExpansionFromUnexpanded(), InstantiateAttrs(), RebuildLambdaScopeInfo(), Sema(), SubstituteExplicitTemplateArguments(), and SubstParmVarDecl().
| 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 9035 of file Sema.h.
Referenced by PerformCopyInitialization().
| SmallVector<Scope *, 2> clang::Sema::CurrentSEHFinally |
Stack of active SEH __finally scopes. Can be empty.
Definition at line 10977 of file Sema.h.
Referenced by ActOnAbortSEHFinallyBlock(), ActOnFinishSEHFinallyBlock(), ActOnStartSEHFinallyBlock(), and CheckJumpOutOfSEHFinallyOrDefer().
| SFINAETrap* clang::Sema::CurrentSFINAEContext = nullptr |
Definition at line 13619 of file Sema.h.
Referenced by getSFINAEContext(), isSFINAEContext(), and clang::Sema::SFINAEContextBase::SFINAEContextBase().
| 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 8466 of file Sema.h.
Referenced by ClassifyImplicitMemberAccess(), clang::Sema::ContextRAII::ContextRAII(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), getCurrentThisType(), and isThisOutsideMemberFunctionBody().
| RecordDecl* clang::Sema::CXXTypeInfoDecl |
The C++ "type_info" declaration, which is defined in <typeinfo>.
Definition at line 8391 of file Sema.h.
Referenced by ActOnCXXTypeid(), and Sema().
| PragmaStack<StringLiteral *> clang::Sema::DataSegStack |
Definition at line 2042 of file Sema.h.
Referenced by ActOnPragmaMSSeg(), CheckCompleteVariableDeclaration(), and Sema().
| llvm::SmallSetVector<Decl *, 4> clang::Sema::DeclsToCheckForDeferredDiags |
Function or variable declarations to be checked for whether the deferred diagnostics should be emitted.
Definition at line 4775 of file Sema.h.
Referenced by ActOnFinishFunctionBody(), AddInitializerToDecl(), and emitDeferredDiags().
| SmallVector<const Decl *> clang::Sema::DeclsWithEffectsToVerify |
All functions/lambdas/blocks which have bodies and which have a non-empty FunctionEffectsRef to be verified.
Definition at line 15654 of file Sema.h.
Referenced by addDeclWithEffects().
Whether deferrable diagnostics should be deferred.
Definition at line 10061 of file Sema.h.
Referenced by clang::Sema::DeferDiagsRAII::DeferDiagsRAII().
| class clang::Sema::DelayedDiagnostics clang::Sema::DelayedDiagnostics |
Referenced by CheckAccess(), EmitAvailabilityWarning(), handleObjCOwnershipTypeAttr(), and inferARCLifetimeForPointee().
| SmallVector<CXXRecordDecl *, 4> clang::Sema::DelayedDllExportClasses |
Definition at line 6301 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), checkClassLevelDLLAttribute(), dllExportImportClassTemplateSpecialization(), and referenceDLLExportedClassMethods().
| SmallVector<CXXMethodDecl *, 4> clang::Sema::DelayedDllExportMemberFunctions |
Definition at line 6302 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXNonNestedClass(), and CheckCompletedCXXClass().
| 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 6629 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXMemberDecls(), CheckDelayedMemberExceptionSpecs(), and CheckEquivalentExceptionSpec().
| 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 6621 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnFinishCXXMemberDecls(), CheckDelayedMemberExceptionSpecs(), and CheckOverridingFunctionExceptionSpec().
| 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 6538 of file Sema.h.
Referenced by CheckDelegatingCtorCycles(), and SetDelegatingInitializer().
| 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 8402 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), and getMismatchingDeleteExpressions().
| SemaDiagnosticBuilder::DeferredDiagnosticsType 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 1418 of file Sema.h.
Referenced by emitDeferredDiags(), and hasUncompilableErrorOccurred().
| DiagnosticsEngine& clang::Sema::Diags |
Definition at line 1290 of file Sema.h.
Referenced by ActOnCompoundStmt(), ActOnCXXMemberDeclarator(), ActOnDocumentableDecls(), ActOnDoStmt(), ActOnEndOfTranslationUnit(), ActOnFields(), ActOnForStmt(), ActOnFriendFunctionDecl(), ActOnIfStmt(), ActOnUninitializedDecl(), ActOnWhileStmt(), AddInitializerToDecl(), applyCocoaAPICheck(), BuildDeclRefExpr(), BuildResolvedCallExpr(), CheckAssignmentOperands(), CheckCompatibleReinterpretCast(), CheckConditionalOperator(), CheckCXX98CompatAccessibleCopy(), CheckForDuplicateEnumValues(), checkPointerTypesForAssignment(), CheckProtocolMethodDefs(), CheckShadow(), checkUnsafeExprAssigns(), DiagnoseAbsenceOfOverrideControl(), DiagnoseAbstractType(), clang::ImplicitConversionSequence::DiagnoseAmbiguousConversion(), DiagnoseAssignmentEnum(), DiagnoseBaseOrMemInitializerOrder(), diagnoseDiagnoseIfAttrsWith(), DiagnoseEmptyLoopBody(), DiagnoseForRangeVariableCopies(), DiagnoseHiddenVirtualMethods(), DiagnoseMismatchedSelectors(), DiagnoseNullConversion(), DiagnoseSelfMove(), diagnoseSubtractionOnNullPointer(), DiagnoseUseOfDecl(), diagnoseZeroToNullptrConversion(), emitCallStackNotes(), EmitDiagnostic(), EvaluateAsStringImpl(), getDefaultDiagFunc(), getDiagnostics(), getNullabilityCompletenessCheckFileID(), getShadowedDeclaration(), getShadowedDeclaration(), getShadowedDeclaration(), hasUncompilableErrorOccurred(), ImplicitlyDefineFunction(), clang::InitializationSequence::InitializeFrom(), LookupMemberExpr(), maybeAddDeclWithEffects(), clang::OverloadCandidateSet::NoteCandidates(), clang::TemplateSpecCandidateSet::NoteCandidates(), noteOverloads(), performFunctionEffectAnalysis(), PrintInstantiationStack(), and Sema().
| bool clang::Sema::DisableTypoCorrection |
Tracks whether we are in a context where typo correction is disabled.
Definition at line 9293 of file Sema.h.
Referenced by Sema(), and clang::Sema::TentativeAnalysisScope::TentativeAnalysisScope().
Definition at line 8352 of file Sema.h.
Referenced by DetectPrecisionLossInComplexDivision(), and DiagnosePrecisionLossInComplexDivision().
| 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 6987 of file Sema.h.
Referenced by ActOnBlockStmtExpr(), ActOnFinishFunctionBody(), BuildBlockForLambdaConversion(), BuildCompoundLiteralExpr(), DiscardCleanupsInEvaluationContext(), MaybeCreateExprWithCleanups(), PopExpressionEvaluationContext(), and PushExpressionEvaluationContext().
| SmallVector<ExpressionEvaluationContextRecord, 8> clang::Sema::ExprEvalContexts |
A stack of expression evaluation contexts.
Definition at line 8339 of file Sema.h.
Referenced by ActOnCapScopeReturnStmt(), ActOnCapturedRegionStart(), ActOnDecltypeExpression(), ActOnFinishFunctionBody(), ActOnIfStmt(), ActOnReturnStmt(), ActOnStartOfFunctionDef(), ActOnStartStmtExpr(), AddInitializerToDecl(), BuildCXXDefaultArgExpr(), BuildCXXDefaultInitExpr(), BuildLambdaExpr(), BuildReturnStmt(), CheckAssignmentOperands(), CheckCallReturnType(), CheckCXXDefaultArgExpr(), CheckForImmediateInvocation(), CheckUnusedVolatileAssignment(), ClassifyImplicitMemberAccess(), CreateBuiltinUnaryOp(), currentEvaluationContext(), currentEvaluationContext(), DiagIfReachable(), DiagRuntimeBehavior(), DiscardCleanupsInEvaluationContext(), getCurrentMangleNumberContext(), InnermostDeclarationWithDelayedImmediateInvocations(), InstantiateFunctionDefinition(), InstantiateInClassInitializer(), isAttrContext(), isPotentiallyConstantEvaluatedContext(), MarkDeclRefReferenced(), MarkExpressionAsImmediateEscalating(), MaybeBindToTemporary(), MaybeCreateExprWithCleanups(), OutermostDeclarationWithDelayedImmediateInvocations(), parentEvaluationContext(), PopExpressionEvaluationContext(), PushExpressionEvaluationContext(), PushExpressionEvaluationContext(), Sema(), TransformToPotentiallyEvaluated(), and TransformToPotentiallyEvaluated().
| SmallVector<DeclaratorDecl *, 4> clang::Sema::ExternalDeclarations |
All the external declarations encoutered and used in the TU.
Definition at line 3588 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnFunctionDeclarator(), and ActOnUninitializedDecl().
| IntrusiveRefCntPtr<ExternalSemaSource> clang::Sema::ExternalSource |
Source of additional semantic information.
Definition at line 1559 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnEndOfTranslationUnitFragment(), addExternalSource(), CheckDelegatingCtorCycles(), CorrectTypo(), emitAndClearUnusedLocalTypedefWarnings(), emitDeferredDiags(), getExternalSource(), InstantiateFunctionDefinition(), LoadExternalVTableUses(), LoadExternalWeakUndeclaredIdentifiers(), LookupName(), and Sema().
| 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 3566 of file Sema.h.
Referenced by ActOnFunctionDeclarator(), ActOnPragmaRedefineExtname(), and ActOnVariableDeclarator().
| 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 4909 of file Sema.h.
Referenced by CheckExtVectorComponent(), and handleExtVectorTypeAttr().
| llvm::SmallPtrSet<ConstantExpr *, 4> clang::Sema::FailedImmediateInvocations |
Definition at line 8342 of file Sema.h.
Referenced by EvaluateAndDiagnoseImmediateInvocation(), HandleImmediateInvocations(), and RemoveNestedImmediateInvocation().
| std::unique_ptr<CXXFieldCollector> clang::Sema::FieldCollector |
FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
Definition at line 6519 of file Sema.h.
Referenced by ActOnCXXMemberDeclarator(), ActOnFinishCXXMemberSpecification(), ActOnStartCXXMemberDeclarations(), ActOnTagFinishDefinition(), BuildAnonymousStructOrUnion(), and Sema().
|
mutable |
A cache of the flags available in enumerations with the flag_bits attribute.
Definition at line 3545 of file Sema.h.
Referenced by IsValueInFlagEnum().
| PragmaStack<FPOptionsOverride> clang::Sema::FpPragmaStack |
Definition at line 2051 of file Sema.h.
Referenced by ActOnPragmaCXLimitedRange(), ActOnPragmaFEnvAccess(), ActOnPragmaFEnvRound(), ActOnPragmaFloatControl(), ActOnPragmaFPContract(), ActOnPragmaFPEvalMethod(), ActOnPragmaFPValueChangingOption(), applyFunctionAttributesBeforeParsingBody(), CurFPFeatureOverrides(), clang::Sema::FPFeaturesStateRAII::FPFeaturesStateRAII(), clang::Sema::FpPragmaStackSaveRAII::FpPragmaStackSaveRAII(), InstantiateFunctionDefinition(), resetFPOptions(), Sema(), and setExceptionMode().
| SmallVector<sema::FunctionScopeInfo *, 4> clang::Sema::FunctionScopes |
Stack containing information about each of the nested function, block, and method scopes that are currently active.
Definition at line 1224 of file Sema.h.
Referenced by ActOnBlockStmtExpr(), ActOnCapScopeReturnStmt(), ActOnLambdaError(), ActOnLambdaExpr(), BuildLambdaExpr(), BuildReturnStmt(), CheckCXXThisCapture(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), CheckUnaryExprOrTypeTraitOperand(), CreateBuiltinArraySubscriptExpr(), DiagIfReachable(), DiagnoseUnexpandedParameterPacks(), FixDependencyOfIdExpressionsInLambdaWithDependentObjectParameter(), getCurBlock(), getCurCapturedRegion(), getCurFunction(), getCurFunctionAvailabilityContext(), getCurLambda(), getCurrentLambdaScopeUnsafe(), getCurrentThisType(), getEnclosingFunction(), getEnclosingLambdaOrBlock(), getFunctionScopes(), isUnexpandedParameterPackPermitted(), MarkThisReferenced(), PopFunctionScopeInfo(), PushBlockScope(), PushCapturedRegionScope(), PushFunctionScope(), PushLambdaScope(), setFunctionHasBranchIntoScope(), setFunctionHasBranchProtectedScope(), setFunctionHasIndirectGoto(), setFunctionHasMustTail(), tryCaptureVariable(), and ~Sema().
| unsigned clang::Sema::FunctionScopesStart = 0 |
The index of the first FunctionScope that corresponds to the current context.
Definition at line 1228 of file Sema.h.
Referenced by clang::Sema::ContextRAII::ContextRAII(), and getFunctionScopes().
| llvm::StringMap<std::tuple<StringRef, SourceLocation> > clang::Sema::FunctionToSectionMap |
Sections used with #pragma alloc_text.
Definition at line 2090 of file Sema.h.
Referenced by ActOnPragmaMSAllocText(), and AddSectionMSAllocText().
| bool clang::Sema::GlobalNewDeleteDeclared |
A flag to remember whether the implicit forms of operator new and delete have been declared.
Definition at line 8395 of file Sema.h.
Referenced by DeclareGlobalNewDelete(), and Sema().
| IdentifierResolver clang::Sema::IdResolver |
Definition at line 3487 of file Sema.h.
Referenced by ActOnDelayedCXXMethodParameter(), ActOnNonTypeTemplateParameter(), ActOnParamDeclarator(), ActOnPopScope(), ActOnReenterCXXMethodParameter(), ActOnReenterFunctionContext(), ActOnReenterTemplateScope(), ActOnTemplateTemplateParameter(), ActOnTypeParameter(), addImplicitTypedef(), CleanupMergedEnum(), DeclareGlobalAllocationFunction(), HideUsingShadowDecl(), Initialize(), isDeclInScope(), LookupName(), PushOnScopeChains(), and Sema().
| 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 8347 of file Sema.h.
Referenced by diagnoseImplicitlyRetainedSelf().
| SourceLocation clang::Sema::ImplicitMSInheritanceAttrLoc |
Source location for newly created implicit MSInheritanceAttrs.
Definition at line 1810 of file Sema.h.
Referenced by ActOnPragmaMSPointersToMembers(), and assignInheritanceModel().
| llvm::DenseSet<QualType> clang::Sema::InstantiatedNonDependentTypes |
| llvm::DenseSet<InstantiatingSpecializationsKey> clang::Sema::InstantiatingSpecializations |
| 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 6516 of file Sema.h.
Referenced by ActOnFinishFunctionDeclarationDeclarator(), ActOnStartFunctionDeclarationDeclarator(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), and getInventedParameterInfos().
| unsigned clang::Sema::InventedParameterInfosStart = 0 |
The index of the first InventedParameterInfo that refers to the current context.
Definition at line 3491 of file Sema.h.
Referenced by clang::Sema::ContextRAII::ContextRAII(), and getInventedParameterInfos().
| bool clang::Sema::IsBuildingRecoveryCallExpr |
Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextRecord object.
Definition at line 2612 of file Sema.h.
Referenced by isAlwaysConstantEvaluatedContext(), and isConstantEvaluatedContext().
| const LangOptions& clang::Sema::LangOpts |
Definition at line 1286 of file Sema.h.
Referenced by ActOnBlockStart(), ActOnBlockStmtExpr(), ActOnCallExpr(), ActOnCaseStmt(), ActOnClassTemplateSpecialization(), ActOnComment(), ActOnCXXDelete(), ActOnCXXTypeid(), ActOnDeclarator(), ActOnDefaultStmt(), ActOnEndOfTranslationUnit(), ActOnEnumBody(), ActOnExplicitInstantiation(), ActOnFields(), ActOnFinishFunctionBody(), ActOnGCCAsmStmt(), ActOnLastBitfield(), actOnOMPReductionKindClause(), ActOnPragmaAttributeAttribute(), ActOnStartOfFunctionDef(), ActOnStartOfLambdaDefinition(), ActOnTag(), ActOnVariableDeclarator(), AddInitializerToDecl(), AnalyzeBitFieldAssignment(), applyCocoaAPICheck(), applyFunctionAttributesBeforeParsingBody(), BuildBuiltinOffsetOf(), BuildCompoundLiteralExpr(), BuildDelegatingInitializer(), BuildLambdaExpr(), BuildOverloadedCallExpr(), BuildPredefinedExpr(), BuiltinAddReference(), BuiltinRemoveReference(), CheckAddressOfOperand(), checkArithmeticOnObjCPointer(), CheckCallingConvAttr(), CheckClassTemplate(), CheckCompareOperands(), CheckConstexprDeclStmt(), checkDeclInTargetContext(), CheckExtensionTraitOperandType(), CheckFieldDecl(), CheckFunctionDeclaration(), CheckFunctionTemplateSpecialization(), clang::checkGenericCastToPtr(), checkMapConflicts(), checkNestingOfRegions(), CheckObjCTraitOperandConstraints(), checkOpenMPIterationSpace(), checkOpenMPLoop(), CheckOverloadedOperatorDeclaration(), CheckParmsForFunctionDef(), CheckShiftOperands(), CheckTemplateArgument(), checkTypeSupport(), CheckVariableDeclarationType(), CheckVectorConditionalTypes(), checkVectorResult(), checkVectorShift(), ComputeSelectedDestructor(), CreateBuiltinArraySubscriptExpr(), CreateGenericSelectionExpr(), DeclareGlobalAllocationFunction(), DefineImplicitCopyAssignment(), DefineImplicitMoveAssignment(), DiagnoseCommaOperator(), clang::Sema::VerifyICEDiagnoser::diagnoseFold(), diagnoseQualifiedDeclaration(), DiagnoseSizeOfParametersAndReturnValue(), DiagnoseUnimplementedAccessor(), DiagnoseUnterminatedPragmaAlignPack(), DiagnoseUseOfDecl(), emitDeferredDiags(), FinalizeDeclaration(), FinalizeDeclaratorGroup(), getEmissionStatus(), getFixItZeroInitializerForType(), getLangOpts(), getLocationOfStringLiteralByte(), getLocForEndOfToken(), getRangeForNextToken(), getScalarZeroExpressionForType(), handleCommonAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleMSInheritanceAttr(), handleUuidAttr(), ImplicitlyDefineFunction(), isNonNegativeIntegerValue(), isOpenMPDeviceDelayedContext(), IsOverloadOrOverrideImpl(), isVariableCapturable(), LazilyCreateBuiltin(), MarkFunctionReferenced(), MarkVarDeclODRUsed(), MarkVTableUsed(), PerformPendingInstantiations(), PopFunctionScopeInfo(), ProcessAPINotes(), clang::PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(), PushFunctionScope(), rebuildPotentialResultsAsNonOdrUsed(), resetFPOptions(), rewriteBuiltinFunctionDecl(), Sema(), ShouldDeleteSpecialMember(), shouldIgnoreInHostDeviceCheck(), targetDiag(), tryCaptureVariable(), VerifyIntegerConstantExpression(), and warnAboutAmbiguousFunction().
| 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 13636 of file Sema.h.
Referenced by popCodeSynthesisContext(), and PrintContextStack().
| SmallVector<PendingImplicitInstantiation, 1> clang::Sema::LateParsedInstantiations |
Queue of implicit template instantiations that cannot be performed eagerly.
Definition at line 14015 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnEndOfTranslationUnitFragment(), and InstantiateFunctionDefinition().
| LateParsedTemplateMapT clang::Sema::LateParsedTemplateMap |
Definition at line 11388 of file Sema.h.
Referenced by InstantiateFunctionDefinition(), and MarkAsLateParsedTemplate().
| LateTemplateParserCB* clang::Sema::LateTemplateParser |
Definition at line 1331 of file Sema.h.
Referenced by InstantiateFunctionDefinition(), Sema(), and SetLateTemplateParser().
| SourceLocation clang::Sema::LocationOfExcessPrecisionNotSatisfied |
Definition at line 8353 of file Sema.h.
Referenced by DetectPrecisionLossInComplexDivision(), and DiagnosePrecisionLossInComplexDivision().
| 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 13613 of file Sema.h.
Referenced by getLookupModules(), and popCodeSynthesisContext().
|
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.
|
static |
Definition at line 1215 of file Sema.h.
Referenced by AddAlignedAttr(), AddAssumeAlignedAttr(), and checkCall().
| MaybeODRUseExprSet clang::Sema::MaybeODRUseExprs |
Definition at line 6780 of file Sema.h.
Referenced by ActOnFinishFunctionBody(), CleanupVarDeclMarking(), DiscardCleanupsInEvaluationContext(), DoMarkVarDeclReferenced(), PopExpressionEvaluationContext(), PushExpressionEvaluationContext(), and rebuildPotentialResultsAsNonOdrUsed().
| llvm::SmallSetVector<StringRef, 4> clang::Sema::MSFunctionNoBuiltins |
Set of no-builtin functions listed by #pragma function.
Definition at line 2137 of file Sema.h.
Referenced by ActOnPragmaMSFunction(), and AddImplicitMSFunctionNoBuiltinAttr().
| LangOptions::PragmaMSPointersToMembersKind clang::Sema::MSPointerToMemberRepresentationMethod |
Controls member pointer representation format under the MS ABI.
Definition at line 1805 of file Sema.h.
Referenced by ActOnPragmaMSPointersToMembers(), assignInheritanceModel(), and Sema().
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 2134 of file Sema.h.
Referenced by ActOnPragmaMSOptimize(), and ModifyFnAttributesMSPragmaOptimize().
| bool clang::Sema::MSStructPragmaOn |
Definition at line 1807 of file Sema.h.
Referenced by ActOnPragmaMSStruct(), AddMsStructLayoutForRecord(), and Sema().
| 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 13628 of file Sema.h.
Referenced by inTemplateInstantiation(), popCodeSynthesisContext(), pushCodeSynthesisContext(), and Sema().
| FileNullabilityMap clang::Sema::NullabilityMap |
A mapping that describes the nullability we've seen in each header file.
Definition at line 15067 of file Sema.h.
Referenced by checkNullabilityConsistency(), and recordNullabilitySeen().
| void* clang::Sema::OpaqueParser |
Definition at line 1332 of file Sema.h.
Referenced by InstantiateFunctionDefinition(), Sema(), and SetLateTemplateParser().
| OpenCLOptions clang::Sema::OpenCLFeatures |
Definition at line 1283 of file Sema.h.
Referenced by getOpenCLOptions().
| 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 2121 of file Sema.h.
Referenced by ActOnPragmaOptimize(), AddRangeBasedOptnone(), and getOptimizeOffPragmaLocation().
| DeclContext* clang::Sema::OriginalLexicalContext |
Generally null except when we temporarily switch decl contexts, like in.
Definition at line 3592 of file Sema.h.
Referenced by ActOnDeclarator(), ActOnFunctionDeclarator(), getCurLexicalContext(), and Sema().
| std::function<TypeResult(StringRef, StringRef, SourceLocation)> clang::Sema::ParseTypeFromStringCallback |
Callback to the parser to parse a type expressed as a string.
Definition at line 1341 of file Sema.h.
Referenced by ApplyAPINotesType(), and ProcessAPINotes().
| 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 4661 of file Sema.h.
Referenced by ActOnDecompositionDeclarator(), ActOnEndOfTranslationUnit(), ActOnVariableDeclarator(), CanUseDecl(), checkAttributesAfterMerging(), CheckVarTemplateId(), DiagnoseUseOfDecl(), and FinalizeDeclaration().
| llvm::DenseMap<IdentifierInfo *, PendingPragmaInfo> clang::Sema::PendingExportedNames |
Definition at line 2333 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnPragmaExport(), and ProcessPragmaExport().
| std::deque<PendingImplicitInstantiation> clang::Sema::PendingInstantiations |
The queue of implicit template instantiations that are required but have not yet been performed.
Definition at line 14011 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnEndOfTranslationUnitFragment(), DoMarkVarDeclReferenced(), InstantiateFunctionDefinition(), InstantiateVariableDefinition(), MarkFunctionReferenced(), and PerformPendingInstantiations().
| 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 14028 of file Sema.h.
Referenced by InstantiateClassMembers(), MarkFunctionReferenced(), and PerformPendingInstantiations().
| Preprocessor& clang::Sema::PP |
Definition at line 1287 of file Sema.h.
Referenced by ActOnBlockStmtExpr(), ActOnCharacterConstant(), ActOnCXXTypeid(), ActOnEndOfTranslationUnit(), ActOnFinishFunctionBody(), ActOnModuleDecl(), ActOnModuleImport(), ActOnNumericConstant(), ActOnPopScope(), ActOnPragmaFPEvalMethod(), ActOnPragmaFPValueChangingOption(), ActOnPrivateModuleFragmentDecl(), ActOnStringLiteral(), ActOnUnevaluatedStringLiteral(), AddOrdinaryNameResults(), buildCoroutineHandle(), buildCoroutinePromise(), buildMemberCall(), BuildModuleInclude(), BuildNonArrayForRange(), buildStdNoThrowDeclRef(), BuildUsingDeclaration(), buildVarDecl(), CheckCompleteVariableDeclaration(), checkLiteralOperatorId(), CheckPtrComparisonWithNullChar(), checkTupleLikeDecomposition(), CheckVarTemplateId(), clang::CodeCompletionResult::CreateCodeCompletionString(), DeclareGlobalNewDelete(), DefaultVariadicArgumentPromotion(), DiagnoseCommaOperator(), diagnoseMissingConstinit(), diagnoseMissingImport(), DiagnoseSentinelCalls(), DiagnoseUseOfDecl(), EvaluateAsStringImpl(), ExpandFunctionLocalPredefinedMacros(), findFailedBooleanCondition(), findOMPAllocatorHandleT(), findOMPAlloctraitT(), findOMPDependT(), findOMPEventHandleT(), clang::Sema::FPFeaturesStateRAII::FPFeaturesStateRAII(), getCompletionPrintingPolicy(), getDarwinSDKInfoForAvailabilityChecking(), GetFullTypeForDeclarator(), getModuleLoader(), getNullabilityKeyword(), GetOrCreateMSAsmLabel(), getOrCreateStdNamespace(), getPreprocessor(), getPrintingPolicy(), getPrintingPolicy(), getStdTrait(), getTupleLikeElementType(), handleOwnershipAttr(), Initialize(), isMacroDefined(), isStdClassTemplate(), isTupleLike(), LookupBuiltin(), lookupCoroutineHandleType(), lookupCoroutineTraits(), lookupMember(), LookupMemberExpr(), lookupPromiseType(), LookupStdClassTemplate(), LookupStdSourceLocationImpl(), notePreviousDefinition(), Sema(), and UsualUnaryFPConversions().
| const Decl* clang::Sema::PragmaAttributeCurrentTargetDecl |
The declaration that is currently receiving an attribute from the #pragma attribute stack.
Definition at line 2116 of file Sema.h.
Referenced by AddPragmaAttributes(), PrintContextStack(), PrintPragmaAttributeInstantiationPoint(), and Sema().
| SmallVector<PragmaAttributeGroup, 2> clang::Sema::PragmaAttributeStack |
Definition at line 2112 of file Sema.h.
Referenced by ActOnPragmaAttributeAttribute(), ActOnPragmaAttributeEmptyPush(), ActOnPragmaAttributePop(), AddPragmaAttributes(), and DiagnoseUnterminatedPragmaAttribute().
| PragmaClangSection clang::Sema::PragmaClangBSSSection |
Definition at line 1818 of file Sema.h.
Referenced by ActOnPragmaClangSection(), and FinalizeDeclaration().
| PragmaClangSection clang::Sema::PragmaClangDataSection |
Definition at line 1819 of file Sema.h.
Referenced by ActOnPragmaClangSection(), and FinalizeDeclaration().
| PragmaClangSection clang::Sema::PragmaClangRelroSection |
Definition at line 1821 of file Sema.h.
Referenced by ActOnPragmaClangSection(), and FinalizeDeclaration().
| PragmaClangSection clang::Sema::PragmaClangRodataSection |
Definition at line 1820 of file Sema.h.
Referenced by ActOnPragmaClangSection(), and FinalizeDeclaration().
| PragmaClangSection clang::Sema::PragmaClangTextSection |
Definition at line 1822 of file Sema.h.
Referenced by ActOnFunctionDeclarator(), and ActOnPragmaClangSection().
| 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 6530 of file Sema.h.
Referenced by DiagnoseAbstractType().
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 8189 of file Sema.h.
Referenced by CheckForImmediateInvocation(), HandleImmediateInvocations(), and MarkDeclRefReferenced().
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 6980 of file Sema.h.
Referenced by ActOnPopScope(), DiagnoseUnusedButSetDecl(), DoMarkVarDeclReferenced(), IgnoredValueConversions(), MarkDeclRefReferenced(), MarkExprReferenced(), MarkFunctionParmPackReferenced(), MarkMemberReferenced(), MarkVariableReferenced(), and MaybeDecrementCount().
| SmallVector<std::deque<PendingImplicitInstantiation>, 8> clang::Sema::SavedPendingInstantiations |
Definition at line 14019 of file Sema.h.
Referenced by DoMarkVarDeclReferenced().
| SmallVector<SmallVector<VTableUse, 16>, 8> clang::Sema::SavedVTableUses |
| SourceManager& clang::Sema::SourceMgr |
Definition at line 1291 of file Sema.h.
Referenced by ActOnComment(), ActOnEndOfTranslationUnit(), ActOnUsingDirective(), AnalyzeBitFieldAssignment(), AnalyzeCompoundAssignment(), applyCocoaAPICheck(), CheckImplicitConversion(), CheckSimplerImplicitMovesMSVCWorkaround(), DiagnoseBadConversion(), DiagnoseEmptyLoopBody(), DiagnoseEmptyStmtBody(), diagnoseMissingImport(), DiagnoseNullConversion(), diagnoseSubtractionOnNullPointer(), DiagnoseUnterminatedPragmaAlignPack(), DiagnoseUnusedComparison(), diagnoseZeroToNullptrConversion(), fixItNullability(), GetFullTypeForDeclarator(), getLocForEndOfToken(), getNullabilityCompletenessCheckFileID(), getRangeForNextToken(), getSourceManager(), InstantiateFunctionDefinition(), isMainFileLoc(), maybeAddDeclWithEffects(), clang::PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(), Sema(), shouldIgnoreDueToReservedName(), and warnAboutAmbiguousFunction().
| llvm::FoldingSet<SpecialMemberOverloadResultEntry> clang::Sema::SpecialMemberCache |
A cache of special member function overload resolution results for C++ records.
Definition at line 9339 of file Sema.h.
Referenced by LookupSpecialMember().
| llvm::SmallPtrSet<SpecialMemberDecl, 4> clang::Sema::SpecialMembersBeingDeclared |
| LazyDeclPtr clang::Sema::StdAlignValT |
The C++ "std::align_val_t" enum class, which is defined by the C++ standard library.
Definition at line 8388 of file Sema.h.
Referenced by ActOnTag(), BuildCXXNew(), DeclareGlobalNewDelete(), and getStdAlignValT().
| LazyDeclPtr clang::Sema::StdBadAlloc |
The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
Definition at line 8384 of file Sema.h.
Referenced by ActOnTag(), DeclareGlobalAllocationFunction(), DeclareGlobalNewDelete(), and getStdBadAlloc().
| ClassTemplateDecl* clang::Sema::StdCoroutineTraitsCache |
The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>
Definition at line 3167 of file Sema.h.
Referenced by lookupCoroutineTraits(), and Sema().
| ClassTemplateDecl* clang::Sema::StdInitializerList |
The C++ "std::initializer_list" template, which is defined in <initializer_list>.
Definition at line 6545 of file Sema.h.
Referenced by BuildStdInitializerList(), isStdInitializerList(), and Sema().
| LazyDeclPtr clang::Sema::StdNamespace |
The C++ "std" namespace, where the standard library resides.
Definition at line 6541 of file Sema.h.
Referenced by ActOnStartNamespaceDef(), ActOnTag(), getOrCreateStdNamespace(), getStdNamespace(), isStdClassTemplate(), and LookupStdClassTemplate().
| RecordDecl* clang::Sema::StdSourceLocationImplDecl |
The C++ "std::source_location::__impl" struct, defined in <source_location>.
Definition at line 8336 of file Sema.h.
Referenced by ActOnSourceLocExpr(), and Sema().
| ClassTemplateDecl* clang::Sema::StdTypeIdentity |
The C++ "std::type_identity" template, which is defined in <type_traits>.
Definition at line 6549 of file Sema.h.
Referenced by isStdTypeIdentity(), Sema(), and tryBuildStdTypeIdentity().
| PragmaStack<bool> clang::Sema::StrictGuardStackCheckStack |
Definition at line 2048 of file Sema.h.
Referenced by ActOnFunctionDeclarator(), ActOnPragmaMSStrictGuardStackCheck(), and Sema().
| SuppressedDiagnosticsMap clang::Sema::SuppressedDiagnostics |
Definition at line 12547 of file Sema.h.
Referenced by DiagnoseUseOfDecl(), and FinishTemplateArgumentDeduction().
| 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 13644 of file Sema.h.
Referenced by clang::TemplightDumpAction::ExecuteAction(), and clang::ParseAST().
| TentativeDefinitionsType clang::Sema::TentativeDefinitions |
All the tentative definitions encountered in the TU.
Definition at line 3585 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), and ActOnUninitializedDecl().
| threadSafety::BeforeSet* clang::Sema::ThreadSafetyDeclCache |
| 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 1242 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), BuildModuleInclude(), isMainFileLoc(), MarkVTableUsed(), PerformPendingInstantiations(), and Sema().
| Scope* clang::Sema::TUScope |
Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in the "ordinary" C decl namespace.
For example, user-defined classes, built-in "id" type, etc.
Definition at line 1247 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnPragmaMSAllocText(), ActOnPragmaRedefineExtname(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), ActOnTranslationUnitScope(), addImplicitTypedef(), BuildBuiltinCallExpr(), buildMemcpyForAssignmentOp(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), CreateBuiltinBinOp(), DefaultLvalueConversion(), DefaultVariadicArgumentPromotion(), DiagnoseDirectIsaAccess(), findOMPAllocatorHandleT(), getOpenCLEnumType(), getOpenCLTypedefType(), HandleMSProperty(), HasNonDeletedDefaultedEqualityComparison(), Initialize(), isMethodDeclaredInRootProtocol(), LazilyCreateBuiltin(), LookupBuiltin(), clang::LookupNamed(), clang::LookupNamespace(), LookupObjCInterfaceDeclForLiteral(), markUsedForAliasOrIfunc(), and Sema().
| 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 3541 of file Sema.h.
Referenced by CheckForFunctionRedefinition(), and MarkTypoCorrectedFunctionDefinition().
| IdentifierSourceLocations clang::Sema::TypoCorrectionFailures |
| unsigned clang::Sema::TyposCorrected |
| llvm::MapVector<NamedDecl *, SourceLocation> clang::Sema::UndefinedButUsed |
UndefinedInternals - all the used, undefined objects which require a definition in this translation unit.
Definition at line 6557 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), CheckImmediateEscalatingFunctionDefinition(), checkUndefinedButUsed(), getUndefinedButUsed(), MarkFunctionReferenced(), MarkVarDeclODRUsed(), MergeFunctionDecl(), and MergeVarDecl().
| 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 13085 of file Sema.h.
Referenced by SetParamDefaultArgument(), and SubstParmVarDecl().
| llvm::DenseMap<ParmVarDecl *, SourceLocation> clang::Sema::UnparsedDefaultArgLocs |
Definition at line 6553 of file Sema.h.
Referenced by ActOnParamDefaultArgument(), ActOnParamDefaultArgumentError(), ActOnParamUnparsedDefaultArgument(), CheckCXXDefaultArgExpr(), and CheckExtraCXXDefaultArguments().
| llvm::DenseMap<llvm::FoldingSetNodeID, UnsubstitutedConstraintSatisfactionCacheResult> clang::Sema::UnsubstitutedConstraintSatisfactionCache |
| 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 3578 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), and MarkUnusedFileScopedDecl().
| llvm::SmallSetVector<const TypedefNameDecl *, 4> clang::Sema::UnusedLocalTypedefNameCandidates |
Set containing all typedefs that are likely unused.
Definition at line 3570 of file Sema.h.
Referenced by DiagnoseUnusedDecl(), and emitAndClearUnusedLocalTypedefWarnings().
| NamedDeclSetType clang::Sema::UnusedPrivateFields |
Set containing all declared private fields that are not used.
Definition at line 6523 of file Sema.h.
Referenced by ActOnCXXMemberDeclarator(), ActOnEndOfTranslationUnit(), BuildDeclRefExpr(), BuildFieldReferenceExpr(), and CheckExplicitlyDefaultedFunction().
| 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 1345 of file Sema.h.
Referenced by Initialize().
| void* clang::Sema::VisContext |
VisContext - Manages the stack for #pragma GCC visibility.
Definition at line 2093 of file Sema.h.
Referenced by AddPushedVisibilityAttribute(), FreeVisContext(), PopPragmaVisibility(), PushPragmaVisibility(), Sema(), and ~Sema().
Map from the most recent declaration of a namespace to the most recent visible declaration of that namespace.
Definition at line 13617 of file Sema.h.
Referenced by ActOnAnnotModuleEnd().
| 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 5882 of file Sema.h.
Referenced by DefineUsedVTables(), LoadExternalVTableUses(), and MarkVTableUsed().
| SmallVector<VTableUse, 16> clang::Sema::VTableUses |
The list of vtables that are required but have not yet been materialized.
Definition at line 5876 of file Sema.h.
Referenced by DefineUsedVTables(), LoadExternalVTableUses(), and MarkVTableUsed().
| 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 2032 of file Sema.h.
Referenced by ActOnPragmaMSVtorDisp(), AddMsStructLayoutForRecord(), and Sema().
| 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 4897 of file Sema.h.
Referenced by DeclApplyPragmaWeak(), and WeakTopLevelDecls().
| 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 3560 of file Sema.h.
Referenced by ActOnEndOfTranslationUnit(), ActOnPragmaWeakAlias(), ActOnPragmaWeakID(), LoadExternalWeakUndeclaredIdentifiers(), and ProcessPragmaWeak().