|
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 |
| class | ScopedCodeSynthesisContext |
| RAII object to ensure that a code synthesis context is popped on scope exit. More... | |
| 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 | CheckOverflowBehaviorTypeConversion (Expr *E, QualType T, SourceLocation CC) |
| Check for overflow behavior type related implicit conversion diagnostics. | |
| 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::DenseMap< const EnumDecl *, llvm::SmallVector< llvm::APSInt > > | AssignEnumCache |
| A cache of enumerator values for enums checked by -Wassign-enum. | |
| 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 (VarDecl *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 | IsOverflowBehaviorTypePromotion (QualType FromType, QualType ToType) |
| IsOverflowBehaviorTypePromotion - Determines whether the conversion from FromType to ToType involves an OverflowBehaviorType FromType being promoted to an OverflowBehaviorType ToType which has a larger bitwidth. | |
| bool | IsOverflowBehaviorTypeConversion (QualType FromType, QualType ToType) |
| IsOverflowBehaviorTypeConversion - Determines whether the conversion from FromType to ToType necessarily involves both an OverflowBehaviorType and a non-OverflowBehaviorType. | |
| 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. | |
Types | |
Implementations are in SemaType.cpp | |
| enum class | CompleteTypeKind { Normal , AcceptSizeless , Default = AcceptSizeless } |
| using | UTTKind = UnaryTransformType::UTTKind |
| FileNullabilityMap | NullabilityMap |
| A mapping that describes the nullability we've seen in each header file. | |
| QualType | BuildQualifiedType (QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS=nullptr) |
| QualType | BuildQualifiedType (QualType T, SourceLocation Loc, unsigned CVRA, const DeclSpec *DS=nullptr) |
| QualType | BuildPointerType (QualType T, SourceLocation Loc, DeclarationName Entity) |
| Build a pointer type. | |
| QualType | BuildReferenceType (QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity) |
| Build a reference type. | |
| QualType | BuildArrayType (QualType T, ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity) |
| Build an array type. | |
| QualType | BuildVectorType (QualType T, Expr *VecSize, SourceLocation AttrLoc) |
| QualType | BuildExtVectorType (QualType T, Expr *ArraySize, SourceLocation AttrLoc) |
| Build an ext-vector type. | |
| QualType | BuildMatrixType (QualType T, Expr *NumRows, Expr *NumColumns, SourceLocation AttrLoc) |
| QualType | BuildCountAttributedArrayOrPointerType (QualType WrappedTy, Expr *CountExpr, bool CountInBytes, bool OrNull) |
| QualType | BuildAddressSpaceAttr (QualType &T, LangAS ASIdx, Expr *AddrSpace, SourceLocation AttrLoc) |
| BuildAddressSpaceAttr - Builds a DependentAddressSpaceType if an expression is uninstantiated. | |
| QualType | BuildAddressSpaceAttr (QualType &T, Expr *AddrSpace, SourceLocation AttrLoc) |
| Same as above, but constructs the AddressSpace index if not provided. | |
| bool | CheckQualifiedFunctionForTypeId (QualType T, SourceLocation Loc) |
| bool | CheckFunctionReturnType (QualType T, SourceLocation Loc) |
| QualType | BuildFunctionType (QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI) |
| Build a function type. | |
| QualType | BuildMemberPointerType (QualType T, const CXXScopeSpec &SS, CXXRecordDecl *Cls, SourceLocation Loc, DeclarationName Entity) |
Build a member pointer type T Class::*. | |
| QualType | BuildBlockPointerType (QualType T, SourceLocation Loc, DeclarationName Entity) |
| Build a block pointer type. | |
| QualType | BuildParenType (QualType T) |
Build a paren type including T. | |
| QualType | BuildAtomicType (QualType T, SourceLocation Loc) |
| QualType | BuildReadPipeType (QualType T, SourceLocation Loc) |
| Build a Read-only Pipe type. | |
| QualType | BuildWritePipeType (QualType T, SourceLocation Loc) |
| Build a Write-only Pipe type. | |
| QualType | BuildBitIntType (bool IsUnsigned, Expr *BitWidth, SourceLocation Loc) |
| Build a bit-precise integer type. | |
| TypeSourceInfo * | GetTypeForDeclarator (Declarator &D) |
| GetTypeForDeclarator - Convert the type for the specified declarator to Type instances. | |
| TypeSourceInfo * | GetTypeForDeclaratorCast (Declarator &D, QualType FromTy) |
| ParsedType | CreateParsedType (QualType T, TypeSourceInfo *TInfo) |
| Package the given type and TSI into a ParsedType. | |
| TypeResult | ActOnTypeName (Declarator &D) |
| bool | checkArrayElementAlignment (QualType EltTy, SourceLocation Loc) |
| void | diagnoseIgnoredQualifiers (unsigned DiagID, unsigned Quals, SourceLocation FallbackLoc, SourceLocation ConstQualLoc=SourceLocation(), SourceLocation VolatileQualLoc=SourceLocation(), SourceLocation RestrictQualLoc=SourceLocation(), SourceLocation AtomicQualLoc=SourceLocation(), SourceLocation UnalignedQualLoc=SourceLocation()) |
| IdentifierInfo * | getNullabilityKeyword (NullabilityKind nullability) |
| Retrieve the keyword associated. | |
| void | adjustMemberFunctionCC (QualType &T, bool HasThisPointer, bool IsCtorOrDtor, SourceLocation Loc) |
| Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly. | |
| bool | hasExplicitCallingConv (QualType T) |
| bool | CheckImplicitNullabilityTypeSpecifier (QualType &Type, NullabilityKind Nullability, SourceLocation DiagLoc, bool AllowArrayTypes, bool OverrideExisting) |
| Check whether a nullability type specifier can be added to the given type through some means not written in source (e.g. | |
| bool | CheckVarDeclSizeAddressSpace (const VarDecl *VD, LangAS AS) |
| Check whether the given variable declaration has a size that fits within the address space it is declared in. | |
| QualType | getCompletedType (Expr *E) |
| Get the type of expression E, triggering instantiation to complete the type if necessary – that is, if the expression refers to a templated static data member of incomplete array type. | |
| void | completeExprArrayBound (Expr *E) |
| bool | RequireCompleteExprType (Expr *E, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser) |
| Ensure that the type of the given expression is complete. | |
| bool | RequireCompleteExprType (Expr *E, unsigned DiagID) |
| template<typename... Ts> | |
| bool | RequireCompleteExprType (Expr *E, unsigned DiagID, const Ts &...Args) |
| QualType | getDecltypeForExpr (Expr *E) |
| getDecltypeForExpr - Given an expr, will return the decltype for that expression, according to the rules in C++11 [dcl.type.simple]p4 and C++11 [expr.lambda.prim]p18. | |
| QualType | BuildTypeofExprType (Expr *E, TypeOfKind Kind) |
| QualType | BuildDecltypeType (Expr *E, bool AsUnevaluated=true) |
| If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building a type for decltype(auto). | |
| QualType | ActOnPackIndexingType (QualType Pattern, Expr *IndexExpr, SourceLocation Loc, SourceLocation EllipsisLoc) |
| QualType | BuildPackIndexingType (QualType Pattern, Expr *IndexExpr, SourceLocation Loc, SourceLocation EllipsisLoc, bool FullySubstituted=false, ArrayRef< QualType > Expansions={}) |
| QualType | BuildUnaryTransformType (QualType BaseType, UTTKind UKind, SourceLocation Loc) |
| QualType | BuiltinEnumUnderlyingType (QualType BaseType, SourceLocation Loc) |
| QualType | BuiltinAddPointer (QualType BaseType, SourceLocation Loc) |
| QualType | BuiltinRemovePointer (QualType BaseType, SourceLocation Loc) |
| QualType | BuiltinDecay (QualType BaseType, SourceLocation Loc) |
| QualType | BuiltinAddReference (QualType BaseType, UTTKind UKind, SourceLocation Loc) |
| QualType | BuiltinRemoveExtent (QualType BaseType, UTTKind UKind, SourceLocation Loc) |
| QualType | BuiltinRemoveReference (QualType BaseType, UTTKind UKind, SourceLocation Loc) |
| QualType | BuiltinRemoveCVRef (QualType BaseType, SourceLocation Loc) |
| QualType | BuiltinChangeCVRQualifiers (QualType BaseType, UTTKind UKind, SourceLocation Loc) |
| QualType | BuiltinChangeSignedness (QualType BaseType, UTTKind UKind, SourceLocation Loc) |
| bool | BuiltinIsBaseOf (SourceLocation RhsTLoc, QualType LhsT, QualType RhsT) |
| bool | RequireLiteralType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) |
| Ensure that the type T is a literal type. | |
| bool | RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID) |
| template<typename... Ts> | |
| bool | RequireLiteralType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args) |
| bool | isCompleteType (SourceLocation Loc, QualType T, CompleteTypeKind Kind=CompleteTypeKind::Default) |
| bool | RequireCompleteType (SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser) |
| Ensure that the type T is a complete type. | |
| bool | RequireCompleteType (SourceLocation Loc, QualType T, CompleteTypeKind Kind, unsigned DiagID) |
| bool | RequireCompleteType (SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) |
| bool | RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID) |
| template<typename... Ts> | |
| bool | RequireCompleteType (SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args) |
| bool | isVisible (const NamedDecl *D) |
| Determine whether a declaration is visible to name lookup. | |
| bool | isReachable (const NamedDecl *D) |
| Determine whether a declaration is reachable. | |
| bool | isAcceptable (const NamedDecl *D, AcceptableKind Kind) |
| Determine whether a declaration is acceptable (visible/reachable). | |
| bool | hasStructuralCompatLayout (Decl *D, Decl *Suggested) |
Determine if D and Suggested have a structurally compatible layout as described in C11 6.2.7/1. | |
| bool | hasVisibleDefinition (NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false) |
Determine if D has a visible definition. | |
| bool | hasVisibleDefinition (const NamedDecl *D) |
| bool | isRedefinitionAllowedFor (NamedDecl *D, NamedDecl **Suggested, bool &Visible) |
Determine if D has a definition which allows we redefine it in current TU. | |
| bool | isRedefinitionAllowedFor (const NamedDecl *D, bool &Visible) |
| bool | hasReachableDefinition (NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false) |
Determine if D has a reachable definition. | |
| bool | hasReachableDefinition (NamedDecl *D) |
| bool | hasAcceptableDefinition (NamedDecl *D, NamedDecl **Suggested, AcceptableKind Kind, bool OnlyNeedComplete=false) |
| bool | hasAcceptableDefinition (NamedDecl *D, AcceptableKind Kind) |
| std::optional< FunctionEffectMode > | ActOnEffectExpression (Expr *CondExpr, StringRef AttributeName) |
| Try to parse the conditional expression attached to an effect attribute (e.g. | |
| void | ActOnCleanupAttr (Decl *D, const Attr *A) |
| void | ActOnInitPriorityAttr (Decl *D, const Attr *A) |
| static int | getPrintable (int I) |
| static unsigned | getPrintable (unsigned I) |
| static bool | getPrintable (bool B) |
| static const char * | getPrintable (const char *S) |
| static StringRef | getPrintable (StringRef S) |
| static const std::string & | getPrintable (const std::string &S) |
| static const IdentifierInfo * | getPrintable (const IdentifierInfo *II) |
| static DeclarationName | getPrintable (DeclarationName N) |
| static QualType | getPrintable (QualType T) |
| static SourceRange | getPrintable (SourceRange R) |
| static SourceRange | getPrintable (SourceLocation L) |
| static SourceRange | getPrintable (const Expr *E) |
| static SourceRange | getPrintable (TypeLoc TL) |
| static QualType | GetTypeFromParser (ParsedType Ty, TypeSourceInfo **TInfo=nullptr) |
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. | |
| bool | InOverflowBehaviorAssignmentContext = false |
| Track if we're currently analyzing overflow behavior types in assignment context. | |
| 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. | |
| ExprResult | ActOnCXXReflectExpr (SourceLocation OpLoc, TypeSourceInfo *TSI) |
| ExprResult | BuildCXXReflectExpr (SourceLocation OperatorLoc, TypeSourceInfo *TSI) |
| 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:4189 |
| TPL_TemplateParamsEquivalent | We are determining whether the template-parameters are equivalent according to C++ [temp.over.link]/6. This comparison does not consider constraints. template<C1 T> void f(T);
template<C2 T> void f(T);
|
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::ScopedCodeSynthesisContext::ScopedCodeSynthesisContext(), 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 4595 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 16452 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 13779 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 4894 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 5012 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 1821 of file SemaTypeTraits.cpp.
References BuildArrayTypeTrait(), Context, and GetTypeFromParser().
| ExprResult Sema::ActOnAsTypeExpr | ( | Expr * | E, |
| ParsedType | ParsedDestTy, | ||
| SourceLocation | BuiltinLoc, | ||
| SourceLocation | RParenLoc ) |
Parse a __builtin_astype expression.
__builtin_astype( value, dst type )
Definition at line 6992 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 15883 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 16804 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::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 16913 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 16775 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 16923 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 3389 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 16718 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 6703 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 3606 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 4838 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 4823 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 4759 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 4725 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 8094 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 3672 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 16737 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 8744 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 8695 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 800 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 2612 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 7325 of file SemaExpr.cpp.
References BuildCompoundLiteralExpr(), Context, and GetTypeFromParser().
| concepts::Requirement * Sema::ActOnCompoundRequirement | ( | Expr * | E, |
| SourceLocation | NoexceptLoc ) |
Definition at line 7894 of file SemaExprCXX.cpp.
References BuildExprRequirement().
| concepts::Requirement * Sema::ActOnCompoundRequirement | ( | Expr * | E, |
| SourceLocation | NoexceptLoc, | ||
| CXXScopeSpec & | SS, | ||
| TemplateIdAnnotation * | TypeConstraint, | ||
| unsigned | Depth ) |
Definition at line 7900 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 21174 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 9155 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 4408 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 20393 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 3351 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 11570 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 7013 of file SemaExpr.cpp.
References ConvertVectorExpr(), and GetTypeFromParser().
| StmtResult Sema::ActOnCoreturnStmt | ( | Scope * | S, |
| SourceLocation | KwLoc, | ||
| Expr * | E ) |
Definition at line 1019 of file SemaCoroutine.cpp.
References ActOnCoroutineBodyStart(), BuildCoreturnStmt(), and clang::StmtError().
| bool Sema::ActOnCoroutineBodyStart | ( | Scope * | S, |
| SourceLocation | KwLoc, | ||
| StringRef | Keyword ) |
Definition at line 687 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 962 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 4296 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 19017 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 3983 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::getAddrSpaceAsString(), 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(), and clang::sizedDeallocationModeFromBool().
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 1020 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 18993 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 1042 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 19008 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 14717 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 14771 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 2455 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 899 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(), 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 825 of file SemaCXXScopeSpec.cpp.
References BuildCXXNestedNameSpecifier(), and clang::CXXScopeSpec::isInvalid().
| bool Sema::ActOnCXXNestedNameSpecifierDecltype | ( | CXXScopeSpec & | SS, |
| const DeclSpec & | DS, | ||
| SourceLocation | ColonColonLoc ) |
Definition at line 837 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::DeclSpec::TST_decltype, and clang::DeclSpec::TST_error.
| bool Sema::ActOnCXXNestedNameSpecifierIndexedPack | ( | CXXScopeSpec & | SS, |
| const DeclSpec & | DS, | ||
| SourceLocation | ColonColonLoc, | ||
| QualType | Type ) |
Definition at line 865 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 8275 of file SemaExpr.cpp.
References Context, and clang::CXXParenListInitExpr::Create().
Referenced by clang::TreeTransform< AdjustConstraints >::RebuildCXXParenListInitExpr().
| ExprResult Sema::ActOnCXXReflectExpr | ( | SourceLocation | OpLoc, |
| TypeSourceInfo * | TSI ) |
Definition at line 18127 of file SemaExpr.cpp.
References BuildCXXReflectExpr().
| 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 4416 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(), 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, and clang::Result.
| 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(), and GetTypeFromParser().
| Decl * Sema::ActOnDeclarator | ( | Scope * | S, |
| Declarator & | D ) |
Definition at line 6270 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 6775 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 3981 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 5521 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 11018 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 19535 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 560 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 11067 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 3655 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 15481 of file SemaDecl.cpp.
References ActOnDocumentableDecls().
Referenced by ActOnAliasDeclaration(), ActOnEnumConstant(), ActOnFinishConceptDefinition(), ActOnStartNamespaceDef(), ActOnStartOfFunctionDef(), ActOnTagStartDefinition(), ActOnTemplateDeclarator(), ActOnVariableDeclarator(), CheckClassTemplate(), and ParsedFreeStandingDeclSpec().
Definition at line 15485 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 18930 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 9639 of file Sema.h.
References makeMergedDefinitionVisible(), and Previous.
| 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 7817 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 17413 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 17328 of file SemaDeclCXX.cpp.
References Context, clang::EmptyDecl::Create(), CurContext, and ProcessDeclAttributeList().
| StmtResult Sema::ActOnEndOfDeferStmt | ( | Stmt * | Body, |
| Scope * | CurScope ) |
Definition at line 3986 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 1245 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(), TentativeDefinitions, clang::TU_ClangModule, clang::TU_Prefix, TUKind, TUScope, UndefinedButUsed, UnusedFileScopedDecls, UnusedPrivateFields, and WeakUndeclaredIdentifiers.
| void Sema::ActOnEndOfTranslationUnitFragment | ( | TUFragmentKind | Kind | ) |
Definition at line 1185 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 20855 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 20545 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 17474 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 1528 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 14101 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 10611 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::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 10184 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 10497 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 1907 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 19156 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 19796 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(), and ShouldDeleteSpecialMember().
Referenced by ActOnCapturedRegionError(), ActOnFinishCXXMemberSpecification(), ActOnLambdaError(), and BuildLambdaExpr().
| Decl * Sema::ActOnFileScopeAsmDecl | ( | Expr * | expr, |
| SourceLocation | AsmLoc, | ||
| SourceLocation | RParenLoc ) |
Definition at line 21017 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 9218 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 14654 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 10762 of file SemaDeclCXX.cpp.
References ActOnFields(), AdjustDeclIfTemplate(), clang::cast(), CheckCompletedCXXClass(), Diag(), and FieldCollector.
| void Sema::ActOnFinishCXXNonNestedClass | ( | ) |
Definition at line 14666 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 17073 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 11029 of file SemaDeclCXX.cpp.
References AdjustDeclIfTemplate(), clang::cast(), CheckConstructor(), CheckCXXDefaultArguments(), clang::Constructor, and clang::Method.
Definition at line 10996 of file SemaDeclCXX.cpp.
References PopDeclContext().
| void Sema::ActOnFinishDelayedMemberInitializers | ( | Decl * | Record | ) |
Definition at line 14346 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 1012 of file SemaModule.cpp.
References clang::cast(), checkExportedDecl(), getASTContext(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isValid(), and PopDeclContext().
|
inline |
Definition at line 8710 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 7708 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 7801 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 16557 of file SemaDecl.cpp.
References clang::Decl::addAttr(), AnalysisWarnings, clang::SemaSYCL::BuildSYCLKernelCallStmt(), clang::SemaSYCL::BuildUnresolvedSYCLKernelCallStmt(), 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::Decl::isInvalidDecl(), clang::isLambdaCallOperator(), clang::FunctionDecl::isMain(), clang::FunctionDecl::isMultiVersion(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isPureVirtual(), clang::Type::isRecordType(), clang::Decl::isTemplated(), clang::FunctionDecl::isTemplateInstantiation(), clang::Decl::isUnavailable(), clang::Type::isUndeducedType(), clang::ActionResult< PtrTy, Compress >::isUsable(), 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 19699 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 15961 of file SemaDecl.cpp.
References Consumer.
Referenced by ActOnFinishCXXNonNestedClass().
| void Sema::ActOnFinishKNRParamDeclarations | ( | Scope * | S, |
| Declarator & | D, | ||
| SourceLocation | LocAfterDecls ) |
Definition at line 15883 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 17308 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 12090 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 8097 of file SemaExprCXX.cpp.
References CurContext.
| StmtResult Sema::ActOnFinishSEHFinallyBlock | ( | SourceLocation | Loc, |
| Stmt * | Block ) |
Definition at line 4599 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 21035 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 2342 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 2277 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 18249 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 18132 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::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 10072 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 1791 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 17287 of file SemaExpr.cpp.
References Context, and clang::Default.
| StmtResult Sema::ActOnGotoStmt | ( | SourceLocation | GotoLoc, |
| SourceLocation | LabelLoc, | ||
| LabelDecl * | TheDecl ) |
Definition at line 3246 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 2817 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 3261 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 14351 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 7489 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().
Definition at line 8720 of file SemaDeclAttr.cpp.
References clang::cast(), Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), and clang::AttributeCommonInfo::getLoc().
| ExprResult Sema::ActOnIntegerConstant | ( | SourceLocation | Loc, |
| int64_t | Val ) |
Definition at line 3732 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 1413 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 1387 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 1605 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 588 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 1996 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 1105 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 9163 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 19518 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 1703 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 4630 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 638 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(), and synthesizeCurrentNestedNameSpecifier().
| 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 1310 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 1320 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 1337 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 1301 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 13935 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 8016 of file SemaExprCXX.cpp.
References BuildNestedRequirement().
| ExprResult Sema::ActOnNoexceptExpr | ( | SourceLocation | KeyLoc, |
| SourceLocation | LParen, | ||
| Expr * | Operand, | ||
| SourceLocation | RParen ) |
Definition at line 7445 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 85 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::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 3806 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 10067 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 15601 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 4251 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 8269 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 2271 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 4939 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 1022 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 1155 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 1162 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 393 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 1531 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 632 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 5844 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 5834 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 1351 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 1515 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 1500 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 667 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 1445 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 640 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 1539 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 1464 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 903 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 624 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 1271 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 894 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 1262 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 721 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 889 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 851 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 878 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 620 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 728 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 1255 of file SemaAttr.cpp.
References OptimizeOffPragmaLocation.
| void Sema::ActOnPragmaOptionsAlign | ( | PragmaOptionsAlignKind | Kind, |
| SourceLocation | PragmaLoc ) |
ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
Definition at line 338 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 442 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 21043 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 939 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 1430 of file SemaAttr.cpp.
References clang::SemaBase::Diag(), clang::IdentifierInfo::getName(), PopPragmaVisibility(), and PushPragmaVisibility().
| 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 21082 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 21070 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 3668 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 7234 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::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 7373 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::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 18977 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 11001 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 1504 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 10923 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 8103 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 3937 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 4579 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 4606 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 4541 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 7857 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 16477 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 17372 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 9138 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 18941 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 6908 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 11010 of file SemaDeclCXX.cpp.
Definition at line 10989 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 19666 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 17265 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 11916 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 3977 of file SemaStmt.cpp.
References CurrentDefer.
| Decl * Sema::ActOnStartOfFunctionDef | ( | Scope * | S, |
| Decl * | D, | ||
| SkipBodyInfo * | SkipBody = nullptr, | ||
| FnBodyKind | BodyKind = FnBodyKind::Other ) |
Definition at line 16160 of file SemaDecl.cpp.
References AbstractReturnType, ActOnDocumentableDecl(), applyFunctionAttributesBeforeParsingBody(), clang::SemaSYCL::BuildSYCLKernelLaunchIdExpr(), clang::cast(), CheckForFunctionRedefinition(), CheckParmsForFunctionDef(), CheckShadow(), Context, currentModuleIsHeaderUnit(), clang::DeclContext::decls(), Default, Delete, clang::SemaBase::Diag(), clang::Decl::dropAttr(), ExprEvalContexts, clang::External, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), getCurFunction(), 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, SYCL(), clang::sema::FunctionScopeInfo::SYCLKernelLaunchIdExpr, 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 15931 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 1441 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 1179 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 8043 of file SemaExprCXX.cpp.
References CheckShadow(), Context, clang::RequiresExprBodyDecl::Create(), CurContext, clang::SemaBase::Diag(), PushDeclContext(), and PushOnScopeChains().
| void Sema::ActOnStartSEHFinallyBlock | ( | ) |
Definition at line 4591 of file SemaStmt.cpp.
References CurrentSEHFinally.
| void Sema::ActOnStartStmtExpr | ( | ) |
Definition at line 16465 of file SemaExpr.cpp.
References ExprEvalContexts, PushExpressionEvaluationContext(), and setFunctionHasBranchProtectedScope().
| TopLevelStmtDecl * Sema::ActOnStartTopLevelStmtDecl | ( | Scope * | S | ) |
Definition at line 21026 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 17525 of file SemaDeclCXX.cpp.
References BuildStaticAssertDeclaration(), DiagnoseUnexpandedParameterPack(), and UPPC_StaticAssertExpression.
| ExprResult Sema::ActOnStmtExpr | ( | Scope * | S, |
| SourceLocation | LPLoc, | ||
| Stmt * | SubStmt, | ||
| SourceLocation | RPLoc ) |
Definition at line 16479 of file SemaExpr.cpp.
References BuildStmtExpr(), and getTemplateDepth().
| void Sema::ActOnStmtExprError | ( | ) |
Definition at line 16471 of file SemaExpr.cpp.
References DiscardCleanupsInEvaluationContext(), and PopExpressionEvaluationContext().
| ExprResult Sema::ActOnStmtExprResult | ( | ExprResult | E | ) |
Definition at line 16521 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 2234 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 17849 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::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 19050 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 18982 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 1409 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 18916 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 1395 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 4083 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 9130 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 18012 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(), and clang::TemplateParameterList::size().
| 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 4009 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 5030 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(), and clang::ParsedTemplateArgument::isInvalid().
| 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, 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 6863 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 6950 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 6467 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(), and clang::ObjCParameter.
| 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 11100 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, 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 11125 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(), 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 7863 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::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 1504 of file SemaTypeTraits.cpp.
References BuildTypeTrait(), Context, and GetTypeFromParser().
| 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 4869 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 16446 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 3990 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 2155 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 14393 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 12658 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 12562 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 12742 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 17118 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 7749 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 4335 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 4583 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 4673 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 4452 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(), 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 1451 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 10622 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 1407 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 8971 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 10424 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 5954 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 8475 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 7795 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 10825 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 1325 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(), 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 918 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 13841 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(), InOverflowBehaviorAssignmentContext, 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 17287 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, and clang::ValueDecl::setType().
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 17218 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 5872 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and CreateLaunchBoundsAttr().
Referenced by handleLaunchBoundsAttr(), and instantiateDependentCUDALaunchBoundsAttr().
| void Sema::addLifetimeBoundToImplicitThis | ( | CXXMethodDecl * | MD | ) |
Definition at line 14800 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 8923 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 7889 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 7863 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 8155 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 4878 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 5960 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 8877 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 1311 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 7241 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, Diag(), 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::hlsl_groupshared, 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 14483 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 14429 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 9234 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 1197 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 1397 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 1281 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 1288 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 8752 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 8723 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 8284 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 1040 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 4728 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 7494 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 14696 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 8423 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(), and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by ActOnFunctionDeclarator(), BuildMemberPointerType(), and DeduceTemplateArgumentsByTypeMatch().
|
inline |
Definition at line 1440 of file Sema.h.
Referenced by instantiateDependentAMDGPUFlatWorkGroupSizeAttr(), instantiateDependentAMDGPUMaxNumWorkGroupsAttr(), instantiateDependentAMDGPUWavesPerEUAttr(), and ProcessDeclAttribute().
Definition at line 7866 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 16407 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 425 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 1604 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 7889 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 7836 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 11503 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 7847 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 3871 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 1445 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 1450 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(), and clang::Stmt::printPretty().
Referenced by DefaultLvalueConversion().
|
inline |
Definition at line 1455 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 6574 of file SemaType.cpp.
References BuildAddressSpaceAttr(), and BuildAddressSpaceIndex().
| 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 6551 of file SemaType.cpp.
References Context, clang::SemaBase::Diag(), DiagnoseMultipleAddrSpaceAttributes(), and clang::Expr::isValueDependent().
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 5685 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 736 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 2084 of file SemaType.cpp.
References clang::C99, checkArrayElementAlignment(), checkArraySize(), CheckPlaceholderExpr(), Context, clang::CPlusPlus, clang::CPlusPlus11, CUDA(), DefaultLvalueConversion(), clang::SemaBase::Diag(), clang::Type::getAs(), 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, targetDiag(), and toString().
Referenced by GetFullTypeForDeclarator().
| ExprResult Sema::BuildArrayTypeTrait | ( | ArrayTypeTrait | ATT, |
| SourceLocation | KWLoc, | ||
| TypeSourceInfo * | TSInfo, | ||
| Expr * | DimExpr, | ||
| SourceLocation | RParen ) |
Definition at line 1887 of file SemaTypeTraits.cpp.
References Context, EvaluateArrayTypeTrait(), and clang::TypeSourceInfo::getType().
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 6999 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 4570 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 10367 of file SemaType.cpp.
References clang::C23, Context, clang::CPlusPlus, clang::SemaBase::Diag(), getLangOpts(), isDependentOrGNUAutoType(), and RequireCompleteType().
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 15953 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 1976 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 2370 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 2811 of file SemaType.cpp.
References checkQualifiedFunction(), Context, deduceOpenCLPointeeAddrSpace(), clang::SemaBase::Diag(), getLangOpts(), and OpenCL().
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 6971 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 16552 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 6755 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::FixItHint::CreateRemoval(), CurFPFeatureOverrides(), clang::Default, DefaultLvalueConversion(), 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::ASTContext::getTargetAddressSpace(), clang::ValueDecl::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 16204 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 16529 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 2081 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 1932 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 7339 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 6630 of file SemaOverload.cpp.
Referenced by CheckTemplateArgument(), and EvaluateAsStringImpl().
| StmtResult Sema::BuildCoreturnStmt | ( | SourceLocation | KwLoc, |
| Expr * | E, | ||
| bool | IsImplicit = false ) |
Definition at line 1026 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 2008 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 1956 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 464 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::Type::isDependentType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::isLambdaCallOperator(), lookupPromiseType(), MaybeCreateExprWithCleanups(), clang::InitializationSequence::Perform(), PP, clang::Result, clang::SC_None, 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 9963 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 983 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 16389 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 16366 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 16324 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 5727 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 5821 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 2713 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 15063 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 456 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::CXXScopeSpec::isEmpty(), 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(), and clang::LookupResult::suppressDiagnostics().
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::Type::isIntegralOrUnscopedEnumerationType(), 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, 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 7418 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().
| ExprResult Sema::BuildCXXReflectExpr | ( | SourceLocation | OperatorLoc, |
| TypeSourceInfo * | TSI ) |
Definition at line 18132 of file SemaExpr.cpp.
References Context, and clang::CXXReflectExpr::Create().
Referenced by ActOnCXXReflectExpr().
| 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(), 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, 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(), 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 3360 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 3327 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 15441 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 2396 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 2465 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 2388 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 10053 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 17340 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::Type::getPointeeType(), 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(), 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 7920 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 8166 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 1928 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 7996 of file SemaExprCXX.cpp.
References Context.
| concepts::ExprRequirement * Sema::BuildExprRequirement | ( | Expr * | E, |
| bool | IsSatisfied, | ||
| SourceLocation | NoexceptLoc, | ||
| concepts::ExprRequirement::ReturnTypeRequirement | ReturnTypeRequirement ) |
Definition at line 7940 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 2439 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(), and clang::Expr::isValueDependent().
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 1778 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 17005 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 2697 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(), and ObjC().
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 1868 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 7557 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 2162 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 826 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 566 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 16929 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 2498 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 829 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 2750 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(), and OpenCL().
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 871 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 686 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 >::RebuildExtVectorOrMatrixElementExpr(), 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 5961 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 4618 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 8021 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 8035 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 247 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 821 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 16799 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 14975 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 14746 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 10085 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 1710 of file SemaType.cpp.
References Context.
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 15732 of file SemaDecl.cpp.
References Context, clang::ParmVarDecl::Create(), and clang::SC_None.
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 1840 of file SemaType.cpp.
References checkQualifiedFunction(), Context, deduceOpenCLPointeeAddrSpace(), clang::SemaBase::Diag(), getASTContext(), getLangOpts(), getOpenCLOptions(), getPrintableNameForEntity(), HLSL(), inferARCLifetimeForPointee(), clang::SourceLocation::isValid(), and OpenCL().
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 305 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 3620 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 7115 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 3015 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 4998 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 1613 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(), and clang::Qualifiers::removeVolatile().
Referenced by BuildQualifiedType(), checkMemberDecomposition(), ConvertDeclSpecToType(), and GetFullTypeForDeclarator().
| QualType Sema::BuildQualifiedType | ( | QualType | T, |
| SourceLocation | Loc, | ||
| unsigned | CVRA, | ||
| const DeclSpec * | DS = nullptr ) |
Definition at line 1666 of file SemaType.cpp.
References BuildAtomicType(), BuildQualifiedType(), clang::Qualifiers::fromCVRMask(), clang::DeclSpec::getAtomicSpecLoc(), clang::Qualifiers::setUnaligned(), 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 1968 of file SemaType.cpp.
References Context.
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 1893 of file SemaType.cpp.
References checkQualifiedFunction(), Context, deduceOpenCLPointeeAddrSpace(), clang::SemaBase::Diag(), getASTContext(), getLangOpts(), getOpenCLOptions(), HLSL(), inferARCLifetimeForPointee(), clang::SourceLocation::isValid(), and OpenCL().
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 7021 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 921 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 4009 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 17405 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 17897 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 12436 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 16484 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 15880 of file SemaOverload.cpp.
References ActOnConditionalOp(), BuildDeclarationNameExpr(), Cmp, 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 4927 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 16517 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 9940 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(), and clang::Unqualified.
Referenced by ConvertDeclSpecToType().
| concepts::TypeRequirement * Sema::BuildTypeRequirement | ( | concepts::Requirement::SubstitutionDiagnostic * | SubstDiag | ) |
Definition at line 8011 of file SemaExprCXX.cpp.
References Context.
| concepts::TypeRequirement * Sema::BuildTypeRequirement | ( | TypeSourceInfo * | Type | ) |
Definition at line 8006 of file SemaExprCXX.cpp.
References Context.
Referenced by ActOnTypeRequirement().
| ExprResult Sema::BuildTypeTrait | ( | TypeTrait | Kind, |
| SourceLocation | KWLoc, | ||
| ArrayRef< TypeSourceInfo * > | Args, | ||
| SourceLocation | RParenLoc ) |
Definition at line 1467 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 16402 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 10311 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 874 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 13166 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 13428 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 13484 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 12986 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 17125 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, 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 6083 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 6006 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 8163 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::Expr::getType(), clang::TypeSourceInfo::getType(), clang::VectorType::getVectorKind(), ImpCastExprToType(), clang::Initializing, clang::isa(), clang::Type::isArithmeticType(), 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 2368 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 1972 of file SemaType.cpp.
References Context.
| QualType Sema::BuiltinAddPointer | ( | QualType | BaseType, |
| SourceLocation | Loc ) |
Definition at line 10148 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 10180 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 10218 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 10285 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 6432 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 6482 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 6502 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 6451 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().
Referenced by clang::CheckAArch64AtomicStoreWithStshhCall().
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 6543 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 6567 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 10164 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 16756 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 10129 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 1522 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 15490 of file Sema.h.
References BuiltinRemoveReference().
Referenced by BuiltinInvoke().
| QualType Sema::BuiltinRemoveExtent | ( | QualType | BaseType, |
| UTTKind | UKind, | ||
| SourceLocation | Loc ) |
Definition at line 10192 of file SemaType.cpp.
References Context.
Referenced by BuildUnaryTransformType().
| QualType Sema::BuiltinRemovePointer | ( | QualType | BaseType, |
| SourceLocation | Loc ) |
Definition at line 10157 of file SemaType.cpp.
References clang::Type::getPointeeType().
Referenced by BuildUnaryTransformType().
| QualType Sema::BuiltinRemoveReference | ( | QualType | BaseType, |
| UTTKind | UKind, | ||
| SourceLocation | Loc ) |
Definition at line 10203 of file SemaType.cpp.
References Context, clang::QualType::getNonReferenceType(), LangOpts, clang::Qualifiers::removeConst(), and clang::Qualifiers::removeVolatile().
Referenced by BuildUnaryTransformType(), and BuiltinRemoveCVRef().
| ExprResult Sema::BuiltinShuffleVector | ( | CallExpr * | TheCall | ) |
BuiltinShuffleVector - Handle __builtin_shufflevector.
Definition at line 6101 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 16724 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 16649 of file SemaChecking.cpp.
References BuiltinVectorMath(), clang::Type::getAs(), clang::VectorType::getElementType(), 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 768 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 16537 of file SemaDecl.cpp.
References methodHasName().
Referenced by CheckCoroutineWrapper(), and clang::sema::visitFunctionCallArguments().
|
static |
Definition at line 16541 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 998 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(), and Sema().
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 16435 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 11327 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 3621 of file SemaInit.cpp.
References clang::InitializedEntity::getType().
Referenced by TryListConversion().
| bool Sema::CanPerformCopyInitialization | ( | const InitializedEntity & | Entity, |
| ExprResult | Init ) |
Definition at line 10018 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 16459 of file SemaDecl.cpp.
References Consumer, and clang::Decl::getAsFunction().
| CanThrowResult clang::Sema::canThrow | ( | const Stmt * | E | ) |
Definition at line 1113 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(), getLangOpts(), 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 2024 of file SemaLambda.cpp.
References clang::cast(), Context, clang::Type::getAsCXXRecordDecl(), clang::Type::getBaseElementTypeUnsafe(), clang::sema::Capture::getCaptureType(), getCurrentThisType(), clang::Type::getPointeeType(), clang::sema::Capture::getVariable(), clang::Init, clang::sema::Capture::isCopyCapture(), clang::sema::Capture::isInitCapture(), and clang::sema::Capture::isThisCapture().
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 1661 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 11540 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 11832 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 14839 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(), and clang::SC_Register.
Referenced by BuiltinAddressof(), and CreateBuiltinUnaryOp().
| bool Sema::CheckAlignasTypeArgument | ( | StringRef | KWName, |
| TypeSourceInfo * | TInfo, | ||
| SourceLocation | OpLoc, | ||
| SourceRange | R ) |
Definition at line 4886 of file SemaExpr.cpp.
References CheckUnaryExprOrTypeTraitOperand(), and clang::TypeSourceInfo::getType().
Referenced by ActOnAlignasTypeArgument(), and instantiateDependentAlignedAttr().
| void Sema::CheckAlignasUnderalignment | ( | Decl * | D | ) |
Definition at line 4721 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 2658 of file SemaExprCXX.cpp.
References Context, clang::Default, clang::SemaBase::Diag(), clang::QualType::getAddressSpace(), clang::Qualifiers::getAddrSpaceAsString(), getLangOpts(), clang::QualType::getObjCLifetime(), 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(), BuiltinBitreverseg(), BuiltinBswapg(), BuiltinCallWithStaticChain(), BuiltinElementwiseTernaryMath(), BuiltinFunctionStart(), BuiltinInvoke(), BuiltinIsWithinLifetime(), BuiltinLaunder(), BuiltinMaskedScatter(), BuiltinMaskedStore(), BuiltinOverflow(), BuiltinPopcountg(), BuiltinPreserveAI(), BuiltinRotateGeneric(), BuiltinTriviallyRelocate(), BuiltinVectorMath(), clang::CheckAArch64AtomicStoreWithStshhCall(), clang::checkGenericCastToPtr(), GetVTablePointer(), PointerAuthAuthAndResign(), PointerAuthAuthLoadRelativeAndSign(), 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(), BuiltinMaskedLoad(), CheckGatherBuiltin(), and CheckSamplingBuiltin().
| bool Sema::CheckArgsForPlaceholders | ( | MultiExprArg | args | ) |
Check an argument list for placeholders that we won't try to handle later.
Definition at line 6451 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 2067 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 9591 of file SemaExpr.cpp.
References clang::AltiVecBool, clang::AltiVecPixel, clang::AltiVecVector, anyAltivecTypes(), ARM(), clang::C23, CheckAssignmentConstraints(), checkBlockPointerTypesForAssignment(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), clang::Compatible, clang::ASTContext::Compatible, clang::CompatibleOBTDiscards, Context, clang::CPlusPlus, clang::SemaBase::Diag(), clang::ASTContext::Discards, 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::ASTContext::IncompatibleKinds, clang::IncompatibleObjCWeakRef, clang::IncompatibleOBTKinds, clang::IncompatiblePointer, clang::IncompatibleVectors, clang::IntToBlockPointer, clang::IntToPointer, clang::isa(), clang::Type::isArithmeticType(), IsAssignConvertCompatible(), clang::Type::isBlockCompatibleObjCPointerType(), clang::Type::isBlockPointerType(), clang::Type::isBooleanType(), 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::isOverflowBehaviorType(), clang::Type::isPointerType(), clang::Type::isRVVSizelessBuiltinType(), clang::Type::isSamplerT(), clang::Type::isScalarType(), clang::Type::isSVESizelessBuiltinType(), clang::Type::isVectorType(), clang::Type::isVoidPointerType(), maybeExtendBlockObject(), clang::ASTContext::NotApplicable, 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 9552 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 14378 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 3376 of file SemaDecl.cpp.
References clang::Decl::attrs().
Referenced by ActOnUninitializedDecl(), and AddInitializerToDecl().
| bool Sema::CheckAttrNoArgs | ( | const ParsedAttr & | CurrAttr | ) |
Definition at line 2131 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 2140 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 13735 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 21143 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(), and clang::Expr::isTypeDependent().
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 4163 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 5536 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 21015 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(), and Sema().
Referenced by ActOnDecltypeExpression(), BuildCallToMemberFunction(), BuildCallToObjectOfClassType(), BuildLiteralOperatorCall(), BuildOverloadedArrowExpr(), BuildResolvedCallExpr(), CreateOverloadedArraySubscriptExpr(), CreateOverloadedBinOp(), and CreateOverloadedUnaryOp().
Definition at line 21942 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 15391 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(), and clang::CharUnits::isOne().
| 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(), findInheritingConstructor(), 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::isTemplateInstantiation(), 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 1634 of file SemaAttr.cpp.
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
| bool Sema::checkCommonAttributeFeatures | ( | const Stmt * | S, |
| const ParsedAttr & | A, | ||
| bool | SkipArgCountCheck = false ) |
Definition at line 1638 of file SemaAttr.cpp.
| QualType Sema::CheckCompareOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc ) |
Definition at line 12808 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 12149 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 1169 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 7024 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(), 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 14635 of file SemaDeclCXX.cpp.
References Context, clang::Destructor, clang::CXXRecordDecl::getNumVBases(), and MarkVirtualBaseDestructorsReferenced().
Referenced by MarkFunctionReferenced().
| void Sema::CheckCompleteVariableDeclaration | ( | VarDecl * | VD | ) |
Definition at line 14816 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 9247 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 4860 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 9289 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 8786 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 4420 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, and clang::VK_LValue.
Referenced by ActOnConditionVariable().
Definition at line 1567 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 4374 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 1242 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 11147 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 11086 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 11398 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 6638 of file SemaOverload.cpp.
| ExprResult Sema::CheckConvertedConstantExpression | ( | Expr * | From, |
| QualType | T, | ||
| llvm::APSInt & | Value, | ||
| CCEKind | CCE ) |
Definition at line 6645 of file SemaOverload.cpp.
References CheckConvertedConstantExpression(), and V.
Referenced by ActOnCaseExpr(), ActOnCXXNew(), ActOnNoexceptSpec(), BuildPackIndexingExpr(), BuildPackIndexingType(), checkArraySize(), CheckEnumConstant(), and CheckTemplateArgument().
| void Sema::CheckCoroutineWrapper | ( | FunctionDecl * | FD | ) |
Definition at line 16546 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 4457 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 5572 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 7750 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 11767 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 4312 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 9398 of file SemaDeclCXX.cpp.
References CheckEquivalentExceptionSpec(), CheckOverridingFunctionExceptionSpec(), DelayedEquivalentExceptionSpecChecks, DelayedOverridingExceptionSpecChecks, and clang::Equivalent.
Referenced by ActOnEndOfTranslationUnit(), and ActOnFinishDelayedMemberInitializers().
| void Sema::CheckDelegatingCtorCycles | ( | ) |
Definition at line 19336 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 9494 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 11179 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 11281 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 189 of file SemaExceptionSpec.cpp.
References clang::CPlusPlus17, clang::Type::getAs(), getLangOpts(), and clang::FunctionProtoType::hasExceptionSpec().
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 7665 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 1566 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 20332 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(), 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 17581 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 17540 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), clang::Type::getAs(), clang::TypeLoc::getBeginLoc(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::Qualifiers::hasConst(), and clang::Qualifiers::hasVolatile().
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 488 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 664 of file SemaExceptionSpec.cpp.
References clang::CheckEquivalentExceptionSpecImpl(), getLangOpts(), and New.
| bool clang::Sema::CheckEquivalentExceptionSpec | ( | FunctionDecl * | Old, |
| FunctionDecl * | New ) |
Definition at line 293 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 910 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 19486 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 759 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 8968 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(), 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 7786 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 7813 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 11627 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 11631 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 11622 of file SemaDeclCXX.cpp.
References CheckExplicitObjectMemberFunction().
| bool Sema::CheckExplicitObjectOverride | ( | CXXMethodDecl * | New, |
| const CXXMethodDecl * | Old ) |
Definition at line 18841 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 8023 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 19259 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(), tryToFixVariablyModifiedVarType(), VerifyBitField(), and warnOnCTypeHiddenInCPlusPlus().
Referenced by HandleField().
Check that the expression co_await promise.final_suspend() shall not be potentially-throwing.
Definition at line 656 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 11191 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 12857 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 16037 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 18218 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 9752 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 4397 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 1447 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 12236 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::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 5190 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::ParamIdx::IdxBitWidth, clang::isFunctionOrMethodOrBlockForAttrSubject(), clang::isFunctionOrMethodVariadic(), and clang::Expr::isTypeDependent().
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 15516 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 2585 of file SemaType.cpp.
References checkNonTrivialCUnion(), Context, clang::CPlusPlus20, clang::FixItHint::CreateInsertion(), clang::Default, clang::SemaBase::Diag(), clang::FunctionReturn, getLangOpts(), HLSL(), NTCUK_Copy, and NTCUK_Destruct.
Referenced by BuildFunctionType().
| bool Sema::CheckFunctionTemplateConstraints | ( | SourceLocation | PointOfInstantiation, |
| FunctionDecl * | Decl, | ||
| ArrayRef< TemplateArgument > | TemplateArgs, | ||
| ConstraintSatisfaction & | Satisfaction ) |
Definition at line 1722 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 9536 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 5493 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 10644 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 12942 of file SemaChecking.cpp.
References clang::SemaObjC::adornBoolConversionDiagWithTernaryFixit(), ARM(), clang::cast(), clang::SemaObjC::checkArrayLiteral(), clang::SemaObjC::checkDictionaryLiteral(), CheckOverflowBehaviorTypeConversion(), 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::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 7570 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 14198 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 10729 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 13497 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 7701 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 4116 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 17095 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 13802 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 3772 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 20370 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 12622 of file SemaDecl.cpp.
References clang::cast(), clang::Type::castAs(), 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::Unspecified, and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by ActOnFunctionDeclarator().
| bool Sema::CheckMatrixCast | ( | SourceRange | R, |
| QualType | DestTy, | ||
| QualType | SrcTy, | ||
| CastKind & | Kind ) |
Definition at line 7931 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 13638 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 13619 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 13684 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 3740 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 9808 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 7808 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 7841 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 4763 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 12822 of file SemaDecl.cpp.
References clang::Type::castAs(), 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(), and clang::FunctionType::ExtInfo::withCallingConv().
Referenced by ActOnFunctionDeclarator().
| QualType Sema::CheckMultiplyDivideOperands | ( | ExprResult & | LHS, |
| ExprResult & | RHS, | ||
| SourceLocation | Loc, | ||
| BinaryOperatorKind | Opc ) |
Definition at line 11148 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 8316 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 13689 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 13429 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 19459 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(), and RequireStructuralType().
| 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().
| bool Sema::CheckOverflowBehaviorTypeConversion | ( | Expr * | E, |
| QualType | T, | ||
| SourceLocation | CC ) |
Check for overflow behavior type related implicit conversion diagnostics.
Returns true if OBT-related diagnostic was issued, false otherwise.
Definition at line 14040 of file SemaChecking.cpp.
References DiagnoseImpCast(), clang::Expr::getType(), InOverflowBehaviorAssignmentContext, and clang::Target.
Referenced by CheckImplicitConversion().
| 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 1218 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 16871 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 18740 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 951 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 18855 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 15787 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(), HLSL(), clang::hlsl_groupshared, 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(), 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 879 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 15060 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 21729 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 1593 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 1542 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 3623 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 5418 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 12781 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, and PP.
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 18961 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 1819 of file SemaType.cpp.
References clang::SemaBase::Diag(), clang::Qualifiers::empty(), clang::Type::getAs(), getFunctionQualifiersAsString(), clang::FunctionProtoType::getMethodQuals(), clang::FunctionProtoType::getRefQualifier(), and clang::RQ_None.
Referenced by BuildCXXTypeId().
| bool Sema::CheckQualifiedMemberReference | ( | Expr * | BaseExpr, |
| QualType | BaseType, | ||
| const CXXScopeSpec & | SS, | ||
| const LookupResult & | R ) |
Definition at line 620 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 1749 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 1795 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 1682 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 5756 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 11194 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 3358 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 8545 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 8707 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 8721 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 12116 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 10071 of file SemaExpr.cpp.
References clang::SemaObjC::ACR_okay, clang::Assigning, clang::C23, CheckAssignmentConstraints(), CheckPointerConversion(), checkPointerTypesForAssignment(), CheckSufficientAllocSize(), clang::Compatible, clang::CompatibleOBTDiscards, 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::isOverflowBehaviorType(), 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 13421 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 10896 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 1861 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(), and clang::TagDecl::isUnion().
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 9330 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 11818 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 11809 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 118 of file SemaExceptionSpec.cpp.
References Context, clang::SemaBase::Diag(), clang::Type::getAs(), clang::Type::getAsRecordDecl(), getLangOpts(), clang::Type::getPointeeType(), clang::Type::isSizelessType(), clang::Type::isVoidType(), clang::QualType::isWebAssemblyReferenceType(), and RequireCompleteType().
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 6326 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 15147 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 118 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 135 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 11666 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(), and UsualUnaryConversions().
Referenced by ActOnCondition(), and CheckConditionVariable().
| bool Sema::checkTargetAttr | ( | SourceLocation | LiteralLoc, |
| StringRef | Str ) |
Definition at line 3492 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 17106 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 7124 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::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 5518 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::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 6522 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 5831 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 5844 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 8439 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 3738 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 4302 of file SemaTemplate.cpp.
References checkTemplatePartialSpecialization().
Referenced by ActOnClassTemplateSpecialization(), and ActOnVarTemplateSpecialization().
| void Sema::CheckTemplatePartialSpecialization | ( | VarTemplatePartialSpecializationDecl * | Partial | ) |
Definition at line 4307 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 8719 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 7825 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 5157 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 19444 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 19402 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 19365 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 15184 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 10017 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 6913 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(), 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 11267 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 11222 of file SemaTemplate.cpp.
References CheckTypenameType(), Context, clang::TypeLocBuilder::getTypeSourceInfo(), clang::isa(), clang::Keyword, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), and clang::TypeSpecTypeLoc::setNameLoc().
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 2141 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 1441 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 4888 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 4378 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 4687 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 7570 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 21663 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 21639 of file SemaExpr.cpp.
References clang::ExprError(), clang::ActionResult< PtrTy, Compress >::get(), clang::SourceRange::getBegin(), clang::Expr::getValueKind(), clang::ActionResult< PtrTy, Compress >::isUsable(), and RequireCompleteType().
| 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 15741 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 15754 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 8370 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 18182 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 14811 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 13591 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 13520 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 12805 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 4983 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().
Check whether the given variable declaration has a size that fits within the address space it is declared in.
This issues a diagnostic if not.
| VD | The variable declaration to check the size of. |
| AS | The address space to check the size of VD against. |
Definition at line 7580 of file SemaType.cpp.
References Context, clang::SemaBase::Diag(), clang::Decl::getLocation(), and clang::ValueDecl::getType().
Referenced by CheckVariableDeclarationType(), handleConstantAttr(), handleDeviceAttr(), handleManagedAttr(), and handleSharedAttr().
| 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 9214 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 8893 of file SemaDecl.cpp.
References ARM(), clang::C23, clang::cast(), CheckAlignasUnderalignment(), CheckC23ConstexprVarType(), clang::SemaRISCV::checkRVVTypeSupport(), CheckVarDeclSizeAddressSpace(), 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(), 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 1017 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 4805 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 4783 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 4566 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 4556 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 7952 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 13360 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 5761 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 13584 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 10628 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 4363 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 909 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::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 2722 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 20404 of file SemaExpr.cpp.
References clang::cast(), MarkVarDeclODRUsed(), and MaybeODRUseExprs.
Referenced by ActOnGCCAsmStmt(), InstantiateDefaultCtorDefaultArgs(), MaybeCreateExprWithCleanups(), MaybeCreateStmtWithCleanups(), and PopExpressionEvaluationContext().
|
inline |
Definition at line 1460 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.
| 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 5238 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 16475 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 9362 of file SemaType.cpp.
References Context, clang::Expr::getExprLoc(), clang::Expr::IgnoreParens(), InstantiateVariableDefinition(), clang::isTemplateInstantiation(), clang::Normal, runWithSufficientStackSpace(), clang::Expr::setType(), 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 1051 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 10045 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 6055 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.
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 16421 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), and clang::ReturnStmt::setNRVOCandidate().
Referenced by ActOnBlockStmtExpr(), and ActOnFinishFunctionBody().
|
inlinestatic |
Definition at line 7875 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 507 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::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 6053 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 6190 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 5413 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 2954 of file Sema.cpp.
References ConstantFoldAttrArgs(), and Context.
Referenced by CreateAnnotationAttr(), handleAnnotateAttr(), instantiateDependentAnnotationAttr(), and ProcessStmtAttribute().
| Attr * Sema::CreateAnnotationAttr | ( | const ParsedAttr & | AL | ) |
Definition at line 2965 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 2378 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 5360 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 15413 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 5190 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 5246 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 16109 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(), 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 4642 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 5920 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 1846 of file SemaExpr.cpp.
References areTypesCompatibleForGeneric(), clang::Compatible, 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 1015 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 892 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 5840 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 7828 of file SemaInit.cpp.
References Cleanup, Context, currentEvaluationContext(), clang::Sema::ExpressionEvaluationContextRecord::ForRangeLifetimeExtendTemps, and isInLifetimeExtendingContext().
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 16011 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 15413 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(), equalityComparisonIsDefaulted(), 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 15148 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 6448 of file SemaType.cpp.
References BumpAlloc, clang::Type::getTypeClass(), and clang::OpaquePtr< QualType >::make().
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 21950 of file SemaExpr.cpp.
References Context, clang::RecoveryExpr::Create(), clang::ExprError(), and isSFINAEContext().
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 2595 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 4826 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 4794 of file SemaExpr.cpp.
References CheckUnaryExprOrTypeTraitOperand(), Context, currentEvaluationContext(), clang::ExprError(), clang::SourceRange::getEnd(), clang::getTraitSpelling(), clang::TypeSourceInfo::getType(), clang::Type::isVariablyModifiedType(), 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 15053 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 1465 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 2069 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 6985 of file Sema.h.
References ExprEvalContexts.
|
inline |
Definition at line 6979 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 3623 of file Sema.h.
References false.
Referenced by ActOnStartOfFunctionDef(), and AddInitializerToDecl().
|
inline |
Is the module scope we are an implementation unit?
Definition at line 9913 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 5882 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 8463 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(), 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 3482 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::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 3351 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 15148 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 15901 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 14238 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 14527 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 9299 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 15507 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 16051 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 8419 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 2522 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 5193 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 733 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 3821 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 | ( | VarDecl * | decl | ) |
Definition at line 7064 of file SemaDecl.cpp.
References Context, getLangOpts(), getOpenCLOptions(), clang::ValueDecl::getType(), clang::VarDecl::hasGlobalStorage(), clang::Type::isArrayType(), clang::Type::isDependentType(), clang::Type::isSamplerT(), clang::Type::isVoidType(), clang::opencl_global, clang::opencl_private, and clang::ValueDecl::setType().
Referenced by ActOnParamDeclarator(), ActOnVariableDeclarator(), CompleteVarTemplateSpecializationDecl(), and DeduceVariableDeclarationType().
| bool Sema::DeduceReturnType | ( | FunctionDecl * | FD, |
| SourceLocation | Loc, | ||
| bool | Diagnose = true ) |
Definition at line 5430 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 3451 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 4896 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 4477 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 5029 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 4764 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 2848 of file SemaTemplateDeduction.cpp.
References ParameterToArgument.
| TemplateDeductionResult Sema::DeduceTemplateArguments | ( | VarTemplatePartialSpecializationDecl * | Partial, |
| ArrayRef< TemplateArgument > | TemplateArgs, | ||
| sema::TemplateDeductionInfo & | Info ) |
Definition at line 3457 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 3464 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 10103 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 13392 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 13244 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 887 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 519 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 758 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(), clang::CheckAArch64AtomicStoreWithStshhCall(), 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 643 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(), TUScope, and clang::VK_PRValue.
Referenced by ActOnCaseExpr(), ActOnCXXDelete(), actOnOMPReductionKindClause(), BuildArrayType(), BuildBuiltinOffsetOf(), BuildCallExpr(), buildCapture(), BuildVectorLiteral(), BuiltinBitreverseg(), 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 1062 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 9313 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 15283 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 16003 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 14302 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 14593 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 16255 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 16186 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 15670 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 16141 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 14446 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 19127 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 20929 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 13841 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(), clang::Type::isArrayType(), 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::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 7766 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 7784 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 21058 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(), AssignEnumCache, clang::Type::castAsEnumDecl(), Context, clang::SemaBase::Diag(), Diags, clang::EnumDecl::getCanonicalDecl(), 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 17442 of file SemaExpr.cpp.
References clang::Assigning, clang::Type::castAs(), clang::Casting, clang::Compatible, clang::CompatibleOBTDiscards, 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::IncompatibleOBTKinds, clang::IncompatiblePointer, clang::IncompatiblePointerDiscardsOverflowBehavior, 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 5414 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 1163 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 1121 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 6296 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 14557 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 8284 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 10069 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 2544 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 2603 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::SourceRange::getBegin(), 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::CXXScopeSpec::MakeTrivial(), 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 15870 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 15849 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 21114 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 11341 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 4524 of file SemaStmt.cpp.
References Context, CUDA(), CurContext, getLangOpts(), getSourceManager(), 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 6846 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 10627 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 2949 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, 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 428 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 16469 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 = |