clang 20.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 | ArgumentPackSubstitutionIndexRAII |
RAII object used to change the argument pack substitution index within a Sema object. More... | |
class | BoundTypeDiagnoser |
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 | 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 | OffsetOfComponent |
struct | OriginalCallArg |
brief A function argument from which we performed template argument More... | |
class | PoppedFunctionScopeDeleter |
Custom deleter to allow FunctionScopeInfos to be kept alive for a short time after they've been popped. More... | |
struct | PragmaAttributeEntry |
This an attribute introduced by #pragma clang attribute. More... | |
struct | PragmaAttributeGroup |
A push'd group of PragmaAttributeEntries. More... | |
struct | PragmaClangSection |
struct | PragmaPackInfo |
struct | PragmaStack |
class | PragmaStackSentinelRAII |
struct | ProcessDeclAttributeOptions |
struct | ReferenceConversionsScope |
class | RequiredTemplateKind |
Whether and why a template name is required in this lookup. More... | |
class | SatisfactionStackResetRAII |
class | 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 |
struct | TypoExprState |
class | VerifyICEDiagnoser |
Abstract base class used for diagnosing integer constant expression violations. More... | |
Semantic Analysis | |
Implementations are in Sema.cpp | |
enum | TUFragmentKind { Global , Normal , Private } |
typedef std::pair< SourceLocation, bool > | DeleteExprLoc |
typedef llvm::SmallVector< DeleteExprLoc, 4 > | DeleteLocs |
using | PoppedFunctionScopePtr = std::unique_ptr< sema::FunctionScopeInfo, PoppedFunctionScopeDeleter > |
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 void | LateTemplateParserCleanupCB(void *P) |
typedef DelayedDiagnosticsState | ParsingDeclState |
typedef DelayedDiagnosticsState | ProcessingContextState |
static const unsigned | MaxAlignmentExponent = 32 |
The maximum alignment, same as in llvm::Value. | |
static const uint64_t | MaximumAlignment = 1ull << MaxAlignmentExponent |
bool | CollectStats |
Flag indicating whether or not to collect detailed statistics. | |
std::unique_ptr< sema::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. | |
bool | WarnedStackExhausted = false |
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 |
LateTemplateParserCleanupCB * | LateTemplateParserCleanup |
void * | OpaqueParser |
std::function< TypeResult(StringRef, StringRef, SourceLocation)> | ParseTypeFromStringCallback |
Callback to the parser to parse a type expressed as a string. | |
DeclarationName | VAListTagName |
VAListTagName - The declaration name corresponding to __va_list_tag. | |
bool | IsLastErrorImmediate = true |
Is the last error level diagnostic immediate. | |
class clang::Sema::DelayedDiagnostics | DelayedDiagnostics |
SemaDiagnosticBuilder::DeferredDiagnosticsType | DeviceDeferredDiags |
Diagnostics that are emitted only if we discover that the given function must be codegen'ed. | |
DeclContext * | CurContext |
CurContext - This is the current declaration context of parsing. | |
IntrusiveRefCntPtr< ExternalSemaSource > | ExternalSource |
Source of additional semantic information. | |
class | Parser |
class | InitializationSequence |
class | ASTReader |
class | ASTDeclReader |
class | ASTWriter |
Sema (Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, TranslationUnitKind TUKind=TU_Complete, CodeCompleteConsumer *CompletionConsumer=nullptr) | |
~Sema () | |
void | Initialize () |
Perform initialization that occurs after the parser has been initialized but before it parses anything. | |
virtual void | anchor () |
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 (ExternalSemaSource *E) |
Registers an external source. | |
void | PrintStats () const |
Print out statistics about the semantic analysis. | |
void | warnStackExhausted (SourceLocation Loc) |
Warn that the stack is nearly exhausted. | |
void | runWithSufficientStackSpace (SourceLocation Loc, llvm::function_ref< void()> Fn) |
Run some code with "sufficient" stack space. | |
LangAS | getDefaultCXXMethodAddrSpace () const |
Returns default addr space for method qualifiers. | |
void | LoadExternalWeakUndeclaredIdentifiers () |
Load weak undeclared identifiers from the external source. | |
bool | isExternalWithNoLinkageType (const ValueDecl *VD) const |
Determine if VD, which must be a variable or function, is an external symbol that nonetheless can't be referenced from outside this translation unit because its type has no linkage and it's not extern "C". | |
void | getUndefinedButUsed (SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined) |
Obtain a sorted list of functions that are undefined but ODR-used. | |
const llvm::MapVector< FieldDecl *, DeleteLocs > & | getMismatchingDeleteExpressions () const |
Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit. | |
void | EmitCurrentDiagnostic (unsigned DiagID) |
Cause the active diagnostic on the DiagosticsEngine to be emitted. | |
void | addImplicitTypedef (StringRef Name, QualType T) |
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() | |
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, const 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::LambdaScopeInfo * | getEnclosingLambda () const |
Get the innermost lambda 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 | diagnoseConflictingFunctionEffect (const FunctionEffectsRef &FX, const FunctionEffectWithCondition &EC, SourceLocation NewAttrLoc) |
Warn and return true if adding an effect to a set would create a conflict. | |
void | diagnoseFunctionEffectMergeConflicts (const FunctionEffectSet::Conflicts &Errs, SourceLocation NewLoc, SourceLocation OldLoc) |
std::optional< FunctionEffectMode > | ActOnEffectExpression (Expr *CondExpr, StringRef AttributeName) |
Try to parse the conditional expression attached to an effect attribute (e.g. | |
bool | makeUnavailableInSystemHeader (SourceLocation loc, UnavailableAttr::ImplicitReason reason) |
makeUnavailableInSystemHeader - There is an error in the current context. | |
PrintingPolicy | getPrintingPolicy () const |
Retrieve a suitable printing policy for diagnostics. | |
void | ActOnTranslationUnitScope (Scope *S) |
Scope actions. | |
bool | isDeclaratorFunctionLike (Declarator &D) |
Determine whether. | |
void | incrementMSManglingNumber () const |
bool | tryToRecoverWithCall (ExprResult &E, const PartialDiagnostic &PD, bool ForceComplain=false, bool(*IsPlausibleResult)(QualType)=nullptr) |
Try to recover by turning the given expression into a call. | |
bool | tryExprAsCall (Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads) |
Figure out if an expression could be turned into a call. | |
sema::FunctionScopeInfo * | getCurFunction () const |
void | SetLateTemplateParser (LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P) |
ParsingDeclState | PushParsingDeclaration (sema::DelayedDiagnosticPool &pool) |
SemaAMDGPU & | AMDGPU () |
SemaARM & | ARM () |
SemaAVR & | AVR () |
SemaBPF & | BPF () |
SemaCodeCompletion & | CodeCompletion () |
SemaCUDA & | CUDA () |
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 () |
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. | |
Attributes | |
Implementations are in SemaAttr.cpp | |
enum | PragmaClangSectionKind { PCSK_Invalid = 0 , PCSK_BSS = 1 , PCSK_Data = 2 , PCSK_Rodata = 3 , PCSK_Text = 4 , PCSK_Relro = 5 } |
pragma clang section kind More... | |
enum | PragmaClangSectionAction { PCSA_Set = 0 , PCSA_Clear = 1 } |
enum | PragmaMsStackAction { PSK_Reset = 0x0 , PSK_Set = 0x1 , PSK_Push = 0x2 , PSK_Pop = 0x4 , PSK_Show = 0x8 , PSK_Push_Set = PSK_Push | PSK_Set , PSK_Pop_Set = PSK_Pop | PSK_Set } |
enum | PragmaSectionKind { PSK_DataSeg , PSK_BSSSeg , PSK_ConstSeg , PSK_CodeSeg } |
enum | PragmaOptionsAlignKind { POAK_Native , POAK_Natural , POAK_Packed , POAK_Power , POAK_Mac68k , POAK_Reset } |
enum class | PragmaAlignPackDiagnoseKind { NonDefaultStateAtInclude , ChangedStateAtExit } |
LangOptions::PragmaMSPointersToMembersKind | MSPointerToMemberRepresentationMethod |
Controls member pointer representation format under the MS ABI. | |
bool | MSStructPragmaOn |
SourceLocation | ImplicitMSInheritanceAttrLoc |
Source location for newly created implicit MSInheritanceAttrs. | |
PragmaClangSection | PragmaClangBSSSection |
PragmaClangSection | PragmaClangDataSection |
PragmaClangSection | PragmaClangRodataSection |
PragmaClangSection | PragmaClangRelroSection |
PragmaClangSection | PragmaClangTextSection |
PragmaStack< 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. | |
FPOptionsOverride | CurFPFeatureOverrides () |
SourceLocation | getOptimizeOffPragmaLocation () const |
Get the location for the currently active "\#pragma clang optimize
off". If this location is invalid, then the state of the pragma is "on". | |
void | AddAlignmentAttributesForRecord (RecordDecl *RD) |
AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl, to handle '#pragma pack' and '#pragma options align'. | |
void | AddMsStructLayoutForRecord (RecordDecl *RD) |
AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record. | |
void | inferGslPointerAttribute (NamedDecl *ND, CXXRecordDecl *UnderlyingRecord) |
Add gsl::Pointer attribute to std::container::iterator. | |
void | inferGslOwnerPointerAttribute (CXXRecordDecl *Record) |
Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types. | |
void | inferGslPointerAttribute (TypedefNameDecl *TD) |
Add [[gsl::Pointer]] attributes for std:: types. | |
void | 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. | |
void | PrintPragmaAttributeInstantiationPoint () |
void | DiagnoseUnterminatedPragmaAttribute () |
void | ActOnPragmaOptimize (bool On, SourceLocation PragmaLoc) |
Called on well formed #pragma clang optimize. | |
void | ActOnPragmaMSOptimize (SourceLocation Loc, bool IsOn) |
#pragma optimize("[optimization-list]", on | off). | |
void | ActOnPragmaMSFunction (SourceLocation Loc, const llvm::SmallVectorImpl< StringRef > &NoBuiltins) |
Call on well formed #pragma function. | |
void | AddRangeBasedOptnone (FunctionDecl *FD) |
Only called on function definitions; if there is a pragma in scope with the effect of a range-based optnone, consider marking the function with attribute optnone. | |
void | AddSectionMSAllocText (FunctionDecl *FD) |
Only called on function definitions; if there is a #pragma alloc_text that decides which code section the function should be in, add attribute section to the function. | |
void | AddOptnoneAttributeIfNoConflicts (FunctionDecl *FD, SourceLocation Loc) |
Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents the location causing the 'optnone' attribute to be added (usually because of a pragma). | |
void | ModifyFnAttributesMSPragmaOptimize (FunctionDecl *FD) |
Only called on function definitions; if there is a MSVC #pragma optimize in scope, consider changing the function's attributes based on the optimization list passed to the pragma. | |
void | AddImplicitMSFunctionNoBuiltinAttr (FunctionDecl *FD) |
Only called on function definitions; if there is a pragma in scope with the effect of a range-based no_builtin, consider marking the function with attribute no_builtin. | |
void | AddPushedVisibilityAttribute (Decl *RD) |
AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility attribute. | |
void | FreeVisContext () |
FreeVisContext - Deallocate and null out VisContext. | |
void | ActOnPragmaVisibility (const IdentifierInfo *VisType, SourceLocation PragmaLoc) |
ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... . | |
void | ActOnPragmaFPContract (SourceLocation Loc, LangOptions::FPModeKind FPC) |
ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT and #pragma clang fp contract. | |
void | ActOnPragmaFPValueChangingOption (SourceLocation Loc, PragmaFPKind Kind, bool IsEnabled) |
Called on well formed #pragma clang fp reassociate or #pragma clang fp reciprocal. | |
void | ActOnPragmaFEnvAccess (SourceLocation Loc, bool IsEnabled) |
ActOnPragmaFenvAccess - Called on well formed #pragma STDC FENV_ACCESS. | |
void | ActOnPragmaCXLimitedRange (SourceLocation Loc, LangOptions::ComplexRangeKind Range) |
ActOnPragmaCXLimitedRange - Called on well formed #pragma STDC CX_LIMITED_RANGE. | |
void | ActOnPragmaFPExceptions (SourceLocation Loc, LangOptions::FPExceptionModeKind) |
Called on well formed '#pragma clang fp' that has option 'exceptions'. | |
void | ActOnPragmaFEnvRound (SourceLocation Loc, llvm::RoundingMode) |
Called to set constant rounding mode for floating point operations. | |
void | setExceptionMode (SourceLocation Loc, LangOptions::FPExceptionModeKind) |
Called to set exception behavior for floating point operations. | |
void | PushNamespaceVisibilityAttr (const VisibilityAttr *Attr, SourceLocation Loc) |
PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute. | |
void | PopPragmaVisibility (bool IsNamespaceEnd, SourceLocation EndLoc) |
PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' and visibility attributes on namespaces. | |
bool | checkCommonAttributeFeatures (const Decl *D, const ParsedAttr &A, bool SkipArgCountCheck=false) |
Handles semantic checking for features that are common to all attributes, such as checking whether a parameter was properly specified, or the correct number of arguments were passed, etc. | |
bool | checkCommonAttributeFeatures (const Stmt *S, const ParsedAttr &A, bool SkipArgCountCheck=false) |
Extra Semantic Checking | |
Implementations are in SemaChecking.cpp | |
enum | FormatArgumentPassingKind { FAPK_Fixed , FAPK_Variadic , FAPK_VAList } |
enum | FormatStringType { FST_Scanf , FST_Printf , FST_NSString , FST_Strftime , FST_Strfmon , FST_Kprintf , FST_FreeBSDKPrintf , FST_OSTrace , FST_OSLog , FST_Syslog , FST_Unknown } |
enum class | AtomicArgumentOrder { API , AST } |
enum | VariadicCallType { VariadicFunction , VariadicBlock , VariadicMethod , VariadicConstructor , VariadicDoesNotApply } |
typedef std::pair< const IdentifierInfo *, uint64_t > | TypeTagMagicValue |
A pair of ArgumentKind identifier and magic value. | |
bool | isConstantEvaluatedOverride = false |
Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextRecord object. | |
bool | isConstantEvaluatedContext () const |
SourceLocation | getLocationOfStringLiteralByte (const StringLiteral *SL, unsigned ByteNo) const |
ExprResult | 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, Expr *LHS, Expr *RHS, BinaryOperatorKind Opcode) |
Check for comparisons of floating-point values using == and !=. | |
void | RegisterTypeTagForDatatype (const IdentifierInfo *ArgumentKind, uint64_t MagicValue, QualType Type, bool LayoutCompatible, bool MustBeNull) |
Register a magic integral constant to be used as a type tag. | |
void | DiagnoseMisalignedMembers () |
Diagnoses the current set of gathered accesses. | |
void | DiscardMisalignedMemberAddress (const Type *T, Expr *E) |
This function checks if the expression is in the sef of potentially misaligned members and it is converted to some pointer type T with lower or equal alignment requirements. | |
void | RefersToMemberWithReducedAlignment (Expr *E, llvm::function_ref< void(Expr *, RecordDecl *, FieldDecl *, CharUnits)> Action) |
This function calls Action when it determines that E designates a misaligned member due to the packed attribute. | |
ExprResult | BuildAtomicExpr (SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder=AtomicArgumentOrder::API) |
bool | hasCStrMethod (const Expr *E) |
Check to see if a given expression could have '.c_str()' called on it. | |
void | DiagnoseAlwaysNonNullPointer (Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range) |
Diagnose pointers that are always non-null. | |
bool | CheckParmsForFunctionDef (ArrayRef< ParmVarDecl * > Parameters, bool CheckParameterNames) |
CheckParmsForFunctionDef - Check that the parameters of the given function are appropriate for the definition of a function. | |
void | CheckCastAlign (Expr *Op, QualType T, SourceRange TRange) |
CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment requirements. | |
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. | |
bool | BuiltinVectorMath (CallExpr *TheCall, QualType &Res) |
bool | BuiltinVectorToScalarMath (CallExpr *TheCall) |
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. | |
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, int ArgNum, llvm::APSInt &Result) |
BuiltinConstantArg - Handle a check if argument ArgNum of CallExpr TheCall is a constant expression. | |
bool | BuiltinConstantArgRange (CallExpr *TheCall, int 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, int 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, int ArgNum) |
BuiltinConstantArgPower2 - Check if argument ArgNum of TheCall is a constant expression representing a power of 2. | |
bool | BuiltinConstantArgShiftedByte (CallExpr *TheCall, int 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, int 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. | |
bool | checkArgCountAtLeast (CallExpr *Call, unsigned MinArgCount) |
Checks that a call expression's argument count is at least the desired number. | |
bool | checkArgCountAtMost (CallExpr *Call, unsigned MaxArgCount) |
Checks that a call expression's argument count is at most the desired number. | |
bool | checkArgCountRange (CallExpr *Call, unsigned MinArgCount, unsigned MaxArgCount) |
Checks that a call expression's argument count is in the desired range. | |
bool | checkArgCount (CallExpr *Call, unsigned DesiredArgCount) |
Checks that a call expression's argument count is the desired number. | |
bool | ValueIsRunOfOnes (CallExpr *TheCall, unsigned ArgNum) |
Returns true if the argument consists of one contiguous run of 1s with any number of 0s on either side. | |
void | CheckImplicitConversion (Expr *E, QualType T, SourceLocation CC, bool *ICContext=nullptr, bool IsListInit=false) |
bool | BuiltinElementwiseTernaryMath (CallExpr *TheCall, bool CheckForFloatArgs=true) |
bool | PrepareBuiltinElementwiseMathOneArgCall (CallExpr *TheCall) |
static bool | getFormatStringInfo (const FormatAttr *Format, bool IsCXXMember, bool IsVariadic, FormatStringInfo *FSI) |
Given a FunctionDecl's FormatAttr, attempts to populate the FomatStringInfo parameter with the FormatAttr's correct format_idx and firstDataArg. | |
static FormatStringType | GetFormatStringType (const FormatAttr *Format) |
Declarations | |
Implementations are in SemaDecl.cpp | |
enum | NameClassificationKind { NC_Unknown , NC_Error , NC_Keyword , NC_Type , NC_NonType , NC_UndeclaredNonType , NC_DependentNonType , NC_OverloadSet , NC_TypeTemplate , NC_VarTemplate , NC_FunctionTemplate , NC_UndeclaredTemplate , NC_Concept } |
Describes the result of the name lookup and resolution performed by ClassifyName() . More... | |
enum class | TemplateNameKindForDiagnostics { ClassTemplate , FunctionTemplate , VarTemplate , AliasTemplate , TemplateTemplateParam , Concept , DependentTemplate } |
Describes the detailed kind of a template name. Used in diagnostics. More... | |
enum | NonTrivialCUnionContext { NTCUC_FunctionParam , NTCUC_FunctionReturn , NTCUC_DefaultInitializedObject , NTCUC_AutoVar , NTCUC_CopyInit , NTCUC_Assignment , NTCUC_CompoundLiteral , NTCUC_BlockCapture , NTCUC_LValueToRValueVolatile } |
enum | NonTrivialCUnionKind { NTCUK_Init = 0x1 , NTCUK_Destruct = 0x2 , NTCUK_Copy = 0x4 } |
enum class | FnBodyKind { Other , Default , Delete } |
enum | NonTagKind { NTK_NonStruct , NTK_NonClass , NTK_NonUnion , NTK_NonEnum , NTK_Typedef , NTK_TypeAlias , NTK_Template , NTK_TypeAliasTemplate , NTK_TemplateTemplateArgument } |
Common ways to introduce type names without a tag for use in diagnostics. More... | |
enum | OffsetOfKind { OOK_Outside , OOK_Builtin , OOK_Macro } |
enum | AvailabilityMergeKind { AMK_None , AMK_Redeclaration , AMK_Override , AMK_ProtocolImplementation , AMK_OptionalProtocolImplementation } |
Describes the kind of merge to perform for availability attributes (including "deprecated", "unavailable", and "availability"). More... | |
enum class | FunctionEmissionStatus { Emitted , CUDADiscarded , OMPDiscarded , TemplateDiscarded , Unknown } |
Status of the function emission on the CUDA/HIP/OpenMP host/device attrs. More... | |
typedef LazyVector< const DeclaratorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 > | UnusedFileScopedDeclsType |
typedef LazyVector< VarDecl *, ExternalSemaSource, &ExternalSemaSource::ReadTentativeDefinitions, 2, 2 > | TentativeDefinitionsType |
typedef void * | SkippedDefinitionContext |
typedef llvm::function_ref< void(SourceLocation Loc, PartialDiagnostic PD)> | DiagReceiverTy |
IdentifierResolver | IdResolver |
unsigned | InventedParameterInfosStart = 0 |
The index of the first InventedParameterInfo that refers to the current context. | |
llvm::SmallPtrSet< const NamedDecl *, 4 > | TypoCorrectedFunctionDefinitions |
The function definitions which were renamed as part of typo-correction to match their respective declarations. | |
llvm::DenseMap< const EnumDecl *, llvm::APInt > | FlagBitsCache |
A cache of the flags available in enumerations with the flag_bits attribute. | |
llvm::MapVector< IdentifierInfo *, llvm::SetVector< WeakInfo, llvm::SmallVector< WeakInfo, 1u >, llvm::SmallDenseSet< WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly > > > | WeakUndeclaredIdentifiers |
WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared. | |
llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > | ExtnameUndeclaredIdentifiers |
ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared. | |
llvm::SmallSetVector< const TypedefNameDecl *, 4 > | UnusedLocalTypedefNameCandidates |
Set containing all typedefs that are likely unused. | |
UnusedFileScopedDeclsType | UnusedFileScopedDecls |
The set of file scoped decls seen so far that have not been used and must warn if not used. | |
TentativeDefinitionsType | TentativeDefinitions |
All the tentative definitions encountered in the TU. | |
SmallVector< 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. | |
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) |
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) |
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) |
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=std::nullopt) |
bool | CheckVariableDeclaration (VarDecl *NewVD, LookupResult &Previous) |
Perform semantic checking on a newly-created variable declaration. | |
void | CheckVariableDeclarationType (VarDecl *NewVD) |
void | CheckCompleteVariableDeclaration (VarDecl *VD) |
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. | |
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) |
Decl * | ActOnFinishFunctionBody (Decl *Decl, Stmt *Body, bool IsInstantiation) |
Decl * | ActOnSkippedFunctionBody (Decl *Decl) |
void | ActOnFinishInlineFunctionDef (FunctionDecl *D) |
void | ActOnFinishDelayedAttribute (Scope *S, Decl *D, ParsedAttributes &Attrs) |
ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is delayed. | |
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) |
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 (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). | |
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) |
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=AMK_Redeclaration) |
mergeDeclAttributes - Copy attributes from the Old decl to the New one. | |
void | MergeTypedefNameDecl (Scope *S, TypedefNameDecl *New, LookupResult &OldDecls) |
MergeTypedefNameDecl - We just parsed a typedef 'New' which has the same name and scope as a previous declaration 'Old'. | |
bool | MergeFunctionDecl (FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) |
MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and scope as a previous declaration 'Old'. | |
bool | MergeCompatibleFunctionDecls (FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld) |
Completes the merge of two function declarations that are known to be compatible. | |
void | mergeObjCMethodDecls (ObjCMethodDecl *New, ObjCMethodDecl *Old) |
void | MergeVarDecl (VarDecl *New, LookupResult &Previous) |
MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'. | |
void | MergeVarDeclTypes (VarDecl *New, VarDecl *Old, bool MergeTypeWithOld) |
MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declaration 'Old'. | |
bool | checkVarDeclRedefinition (VarDecl *OldDefn, VarDecl *NewDefn) |
We've just determined that Old and New both appear to be definitions of the same variable. | |
void | notePreviousDefinition (const NamedDecl *Old, SourceLocation New) |
void | FilterLookupForScope (LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace) |
Filters out lookup results that don't fall within the given scope as determined by isDeclInScope. | |
bool | CheckRedeclarationModuleOwnership (NamedDecl *New, NamedDecl *Old) |
We've determined that New is a redeclaration of Old . | |
bool | CheckRedeclarationExported (NamedDecl *New, NamedDecl *Old) |
[module.interface]p6: A redeclaration of an entity X is implicitly exported if X was introduced by an exported declaration; otherwise it shall not be exported. | |
bool | CheckRedeclarationInModule (NamedDecl *New, NamedDecl *Old) |
A wrapper function for checking the semantic restrictions of a redeclaration within a module. | |
bool | IsRedefinitionInModule (const NamedDecl *New, const NamedDecl *Old) const |
Check the redefinition in C++20 Modules. | |
bool | ShouldWarnIfUnusedFileScopedDecl (const DeclaratorDecl *D) const |
void | MarkUnusedFileScopedDecl (const DeclaratorDecl *D) |
If it's a file scoped decl that must warn if not used, keep track of it. | |
void | DiagnoseUnusedNestedTypedefs (const RecordDecl *D) |
void | DiagnoseUnusedNestedTypedefs (const RecordDecl *D, DiagReceiverTy DiagReceiver) |
void | DiagnoseUnusedDecl (const NamedDecl *ND) |
void | DiagnoseUnusedDecl (const NamedDecl *ND, DiagReceiverTy DiagReceiver) |
DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(unused). | |
void | DiagnoseUnusedButSetDecl (const VarDecl *VD, DiagReceiverTy DiagReceiver) |
If VD is set but not otherwise used, diagnose, for a parameter or a variable. | |
Scope * | getNonFieldDeclScope (Scope *S) |
getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be declared. | |
FunctionDecl * | CreateBuiltin (IdentifierInfo *II, QualType Type, unsigned ID, SourceLocation Loc) |
NamedDecl * | LazilyCreateBuiltin (IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc) |
LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope. | |
const AttributedType * | getCallingConvAttributedType (QualType T) const |
Get the outermost AttributedType node that sets a calling convention. | |
DeclarationNameInfo | GetNameForDeclarator (Declarator &D) |
GetNameForDeclarator - Determine the full declaration name for the given Declarator. | |
DeclarationNameInfo | GetNameFromUnqualifiedId (const UnqualifiedId &Name) |
Retrieves the declaration name from a parsed unqualified-id. | |
NamedDecl * | findLocallyScopedExternCDecl (DeclarationName Name) |
Look for a locally scoped extern "C" declaration by the given name. | |
void | deduceOpenCLAddressSpace (ValueDecl *decl) |
void | 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 ParsedAttr &AL) |
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, IdentifierInfo *Platform, bool Implicit, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool IsStrict, StringRef Replacement, AvailabilityMergeKind AMK, int Priority, IdentifierInfo *IIEnvironment) |
TypeVisibilityAttr * | mergeTypeVisibilityAttr (Decl *D, const AttributeCommonInfo &CI, TypeVisibilityAttr::VisibilityType Vis) |
VisibilityAttr * | mergeVisibilityAttr (Decl *D, const AttributeCommonInfo &CI, VisibilityAttr::VisibilityType Vis) |
SectionAttr * | mergeSectionAttr (Decl *D, const AttributeCommonInfo &CI, StringRef Name) |
llvm::Error | isValidSectionSpecifier (StringRef Str) |
Used to implement to perform semantic checking on attribute((section("foo"))) specifiers. | |
bool | checkSectionName (SourceLocation LiteralLoc, StringRef Str) |
CodeSegAttr * | mergeCodeSegAttr (Decl *D, const AttributeCommonInfo &CI, StringRef Name) |
bool | checkTargetAttr (SourceLocation LiteralLoc, StringRef Str) |
bool | checkTargetVersionAttr (SourceLocation Loc, Decl *D, StringRef Str) |
Check Target Version attrs. | |
bool | checkTargetClonesAttrString (SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, Decl *D, bool &HasDefault, bool &HasCommas, bool &HasNotDefault, SmallVectorImpl< SmallString< 64 > > &StringsBuffer) |
ErrorAttr * | mergeErrorAttr (Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic) |
FormatAttr * | mergeFormatAttr (Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Format, int FormatIdx, int FirstArg) |
void | AddAlignedAttr (Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion) |
AddAlignedAttr - Adds an aligned attribute to a particular declaration. | |
void | AddAlignedAttr (Decl *D, const AttributeCommonInfo &CI, TypeSourceInfo *T, bool IsPackExpansion) |
void | AddAlignValueAttr (Decl *D, const AttributeCommonInfo &CI, Expr *E) |
AddAlignValueAttr - Adds an align_value attribute to a particular declaration. | |
void | AddAnnotationAttr (Decl *D, const AttributeCommonInfo &CI, StringRef Annot, MutableArrayRef< Expr * > Args) |
AddAnnotationAttr - Adds an annotation Annot with Args arguments to D. | |
bool | checkMSInheritanceAttrOnDefinition (CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel SemanticSpelling) |
void | CheckAlignasUnderalignment (Decl *D) |
void | AddModeAttr (Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name, bool InInstantiation=false) |
AddModeAttr - Adds a mode attribute to a particular declaration. | |
AlwaysInlineAttr * | mergeAlwaysInlineAttr (Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Ident) |
MinSizeAttr * | mergeMinSizeAttr (Decl *D, const AttributeCommonInfo &CI) |
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. | |
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. | |
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. | |
template<typename AttrInfo > | |
bool | checkFunctionOrMethodParameterIndex (const Decl *D, const AttrInfo &AI, unsigned AttrArgNum, const Expr *IdxExpr, ParamIdx &Idx, bool CanIndexImplicitThis=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 | DefaultedComparisonKind : unsigned char { None , Equal , ThreeWay , NotEqual , Relational } |
Kinds of defaulted comparison operator functions. More... | |
enum | AbstractDiagSelID { AbstractNone = -1 , AbstractReturnType , AbstractParamType , AbstractVariableType , AbstractFieldType , AbstractIvarType , AbstractSynthesizedIvarType , AbstractArrayType } |
enum | TrivialABIHandling { TAH_IgnoreTrivialABI , TAH_ConsiderTrivialABI } |
enum class | CheckConstexprKind { Diagnose , CheckValid } |
typedef std::pair< CXXRecordDecl *, 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>. | |
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 |
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. | |
QualType | BuildStdInitializerList (QualType Element, SourceLocation Loc) |
Looks for the std::initializer_list template and instantiates it with Element, or emits an error if it's not found. | |
bool | isInitListConstructor (const FunctionDecl *Ctor) |
Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init.list]p2. | |
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, CXXScopeSpec *SS=nullptr) |
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, const RecordType *DeclInitType) |
FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable. | |
void | EvaluateImplicitExceptionSpec (SourceLocation Loc, FunctionDecl *FD) |
Evaluate the implicit exception specification for a defaulted special member function. | |
void | checkExceptionSpecification (bool IsTopLevel, ExceptionSpecificationType EST, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr, SmallVectorImpl< QualType > &Exceptions, FunctionProtoType::ExceptionSpecInfo &ESI) |
Check the given exception-specification and update the exception specification information with the results. | |
void | actOnDelayedExceptionSpecification (Decl *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, Expr *Init) |
This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template. | |
MemInitResult | ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc) |
Handle a C++ member initializer using parentheses syntax. | |
MemInitResult | ActOnMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *InitList, SourceLocation EllipsisLoc) |
Handle a C++ member initializer using braced-init-list syntax. | |
MemInitResult | BuildMemInitializer (Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc) |
Handle a C++ member initializer. | |
MemInitResult | BuildMemberInitializer (ValueDecl *Member, Expr *Init, SourceLocation IdLoc) |
MemInitResult | BuildBaseInitializer (QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc) |
MemInitResult | BuildDelegatingInitializer (TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl) |
bool | SetDelegatingInitializer (CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer) |
bool | SetCtorInitializers (CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer * > Initializers=std::nullopt) |
void | MarkBaseAndMemberDestructorsReferenced (SourceLocation Loc, CXXRecordDecl *Record) |
MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of its members and bases as referenced. | |
void | MarkVirtualBaseDestructorsReferenced (SourceLocation Location, CXXRecordDecl *ClassDecl, llvm::SmallPtrSetImpl< const RecordType * > *DirectVirtualBases=nullptr) |
Mark destructors of virtual bases of this class referenced. | |
void | CheckCompleteDestructorVariant (SourceLocation CurrentLocation, CXXDestructorDecl *Dtor) |
Do semantic checks to allow the complete destructor variant to be emitted when the destructor is defined in another translation unit. | |
void | LoadExternalVTableUses () |
Load any externally-stored vtable uses. | |
void | MarkVTableUsed (SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false) |
Note that the vtable for the given class was used at the given location. | |
void | MarkVirtualMemberExceptionSpecsNeeded (SourceLocation Loc, const CXXRecordDecl *RD) |
Mark the exception specifications of all virtual member functions in the given class as needed. | |
void | MarkVirtualMembersReferenced (SourceLocation Loc, const CXXRecordDecl *RD, bool ConstexprOnly=false) |
MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced. | |
bool | DefineUsedVTables () |
Define all of the vtables that have been used in this translation unit and reference any virtual members used by those vtables. | |
void | AddImplicitlyDeclaredMembersToClass (CXXRecordDecl *ClassDecl) |
AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions, such as the default constructor, copy constructor, or destructor, to the given C++ class (C++ [special]p1). | |
void | ActOnMemInitializers (Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer * > MemInits, bool AnyErrors) |
ActOnMemInitializers - Handle the member initializers for a constructor. | |
void | checkClassLevelDLLAttribute (CXXRecordDecl *Class) |
Check class-level dllimport/dllexport attribute. | |
void | checkClassLevelCodeSegAttribute (CXXRecordDecl *Class) |
void | referenceDLLExportedClassMethods () |
void | propagateDLLAttrToBaseClassTemplate (CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc) |
Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibility. | |
void | CheckCompletedCXXClass (Scope *S, CXXRecordDecl *Record) |
Perform semantic checks on a class definition that has been completing, introducing implicitly-declared members, checking for abstract types, etc. | |
void | checkIllFormedTrivialABIStruct (CXXRecordDecl &RD) |
Check that the C++ class annoated with "trivial_abi" satisfies all the conditions that are needed for the attribute to have an effect. | |
void | 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 | EvaluateStaticAssertMessageAsString (Expr *Message, std::string &Result, ASTContext &Ctx, 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. | |
Decl * | ActOnFriendTypeDecl (Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams) |
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, QualType Derived, QualType Base) |
Determine whether the type Derived is a C++ class that is derived from the type Base . | |
bool | IsDerivedFrom (SourceLocation Loc, QualType Derived, QualType Base, CXXBasePaths &Paths) |
Determine whether the type Derived is a C++ class that is derived from the type Base . | |
void | BuildBasePathArray (const CXXBasePaths &Paths, CXXCastPath &BasePath) |
bool | CheckDerivedToBaseConversion (QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath=nullptr, bool IgnoreAccess=false) |
bool | CheckDerivedToBaseConversion (QualType Derived, QualType Base, unsigned InaccessibleBaseID, unsigned AmbiguousBaseConvID, SourceLocation Loc, SourceRange Range, DeclarationName Name, CXXCastPath *BasePath, bool IgnoreAccess=false) |
CheckDerivedToBaseConversion - Check whether the Derived-to-Base conversion (where Derived and Base are class types) is well-formed, meaning that the conversion is unambiguous (and that all of the base classes are accessible). | |
std::string | getAmbiguousPathsDisplayString (CXXBasePaths &Paths) |
Builds a string representing ambiguous paths from a specific derived class to different subobjects of the same base class. | |
bool | CheckOverridingFunctionAttributes (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, 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=TAH_IgnoreTrivialABI, bool Diagnose=false) |
Determine whether a defaulted or deleted special member function is trivial, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25, and C++11 [class.dtor]p5. | |
DefaultedFunctionKind | getDefaultedFunctionKind (const FunctionDecl *FD) |
Determine the kind of defaulting that would be done for a given function. | |
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) |
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 | AssignmentAction { AA_Assigning , AA_Passing , AA_Returning , AA_Converting , AA_Initializing , AA_Sending , AA_Casting , AA_Passing_CFAudited } |
enum | ReuseLambdaContextDecl_t { ReuseLambdaContextDecl } |
enum | TryCaptureKind { TryCapture_Implicit , TryCapture_ExplicitByVal , TryCapture_ExplicitByRef } |
enum | AllowFoldKind { NoFold , AllowFold } |
enum class | ConditionKind { Boolean , ConstexprIf , Switch } |
enum | ArithConvKind { ACK_Arithmetic , ACK_BitwiseOp , ACK_Comparison , ACK_Conditional , ACK_CompAssign } |
Context in which we're performing a usual arithmetic conversion. More... | |
enum | VarArgKind { VAK_Valid , VAK_ValidInCXX11 , VAK_Undefined , VAK_MSVCUndefined , VAK_Invalid } |
enum | AssignConvertType { Compatible , PointerToInt , IntToPointer , FunctionVoidPointer , IncompatiblePointer , IncompatibleFunctionPointer , IncompatibleFunctionPointerStrict , IncompatiblePointerSign , CompatiblePointerDiscardsQualifiers , IncompatiblePointerDiscardsQualifiers , IncompatibleNestedPointerAddressSpaceMismatch , IncompatibleNestedPointerQualifiers , IncompatibleVectors , IntToBlockPointer , IncompatibleBlockPointer , IncompatibleObjCQualifiedId , IncompatibleObjCWeakRef , Incompatible } |
AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the assignment was allowed. More... | |
using | MaybeODRUseExprSet = llvm::SmallSetVector< Expr *, 4 > |
Store a set of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) that may or may not be odr-used in this Expr, and we won't know until all lvalue-to-rvalue and discarded value conversions have been applied to all subexpressions of the enclosing full expression. | |
using | ImmediateInvocationCandidate = llvm::PointerIntPair< ConstantExpr *, 1 > |
using | ADLCallKind = CallExpr::ADLCallKind |
MaybeODRUseExprSet | MaybeODRUseExprs |
llvm::DenseMap< const VarDecl *, 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. | |
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 *ClassReciever=nullptr, bool SkipTrailingRequiresClause=false) |
Determine whether the use of this declaration is valid, and emit any corresponding diagnostics. | |
void | NoteDeletedFunction (FunctionDecl *FD) |
Emit a note explaining that this function is deleted. | |
void | DiagnoseSentinelCalls (const NamedDecl *D, SourceLocation Loc, ArrayRef< Expr * > Args) |
DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with the sentinel attribute, and if so, it checks that the requirements of the sentinel are satisfied. | |
void | PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other) |
void | PushExpressionEvaluationContext (ExpressionEvaluationContext NewContext, ReuseLambdaContextDecl_t, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other) |
void | PopExpressionEvaluationContext () |
void | DiscardCleanupsInEvaluationContext () |
ExprResult | TransformToPotentiallyEvaluated (Expr *E) |
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=TryCapture_Implicit, SourceLocation EllipsisLoc=SourceLocation()) |
Try to capture the given variable. | |
bool | NeedToCaptureVariable (ValueDecl *Var, SourceLocation Loc) |
Checks if the variable must be captured. | |
QualType | getCapturedDeclRefType (ValueDecl *Var, SourceLocation Loc) |
Given a variable, determine the type that a reference to that variable will have in the given scope. | |
void | MarkDeclarationsReferencedInType (SourceLocation Loc, QualType T) |
Mark all of the declarations referenced within a particular AST node as referenced. | |
void | MarkDeclarationsReferencedInExpr (Expr *E, bool SkipLocalVariables=false, ArrayRef< const Expr * > StopAt=std::nullopt) |
Mark any declarations that appear within this expression or any potentially-evaluated subexpressions as "referenced". | |
ExprResult | tryConvertExprToType (Expr *E, QualType Ty) |
Try to convert an expression E to type Ty . | |
bool | DiagIfReachable (SourceLocation Loc, ArrayRef< const Stmt * > Stmts, const PartialDiagnostic &PD) |
Conditionally issue a diagnostic based on the statements's reachability analysis. | |
bool | DiagRuntimeBehavior (SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD) |
Conditionally issue a diagnostic based on the current evaluation context. | |
bool | DiagRuntimeBehavior (SourceLocation Loc, ArrayRef< const Stmt * > Stmts, const PartialDiagnostic &PD) |
Similar, but diagnostic is only produced if all the specified statements are reachable. | |
SourceRange | getExprRange (Expr *E) const |
ExprResult | ActOnIdExpression (Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, CorrectionCandidateCallback *CCC=nullptr, bool IsInlineAsmIdentifier=false, Token *KeywordReplacement=nullptr) |
void | DecomposeUnqualifiedId (const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs) |
Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template arguments. | |
bool | DiagnoseDependentMemberLookup (const LookupResult &R) |
Diagnose a lookup that found results in an enclosing class during error recovery. | |
bool | DiagnoseEmptyLookup (Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=std::nullopt, DeclContext *LookupCtx=nullptr, TypoExpr **Out=nullptr) |
Diagnose an empty lookup. | |
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, uint64_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 | 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 | 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) |
ExprResult | CreateBuiltinBinOp (SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) |
CreateBuiltinBinOp - Creates a new built-in binary operation with operator Opc at location TokLoc . | |
void | LookupBinOp (Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, UnresolvedSetImpl &Functions) |
void | DiagnoseCommaOperator (const Expr *LHS, SourceLocation Loc) |
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 ?: operation. | |
ExprResult | ActOnAddrLabel (SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl) |
ActOnAddrLabel - Parse the GNU address of label extension: "&&foo". | |
void | ActOnStartStmtExpr () |
ExprResult | ActOnStmtExpr (Scope *S, SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc) |
ExprResult | BuildStmtExpr (SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc, unsigned TemplateDepth) |
ExprResult | ActOnStmtExprResult (ExprResult E) |
void | ActOnStmtExprError () |
ExprResult | BuildBuiltinOffsetOf (SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc) |
__builtin_offsetof(type, a.b[123][456].c) | |
ExprResult | ActOnBuiltinOffsetOf (Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc) |
ExprResult | ActOnChooseExpr (SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc) |
ExprResult | ActOnVAArg (SourceLocation BuiltinLoc, Expr *E, ParsedType Ty, SourceLocation RPLoc) |
ExprResult | BuildVAArgExpr (SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc) |
ExprResult | ActOnSourceLocExpr (SourceLocIdentKind Kind, SourceLocation BuiltinLoc, SourceLocation RPLoc) |
ExprResult | ActOnEmbedExpr (SourceLocation EmbedKeywordLoc, StringLiteral *BinaryData) |
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=NoFold) |
VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate diagnostics. | |
ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result, unsigned DiagID, AllowFoldKind CanFold=NoFold) |
ExprResult | VerifyIntegerConstantExpression (Expr *E, llvm::APSInt *Result=nullptr, AllowFoldKind CanFold=NoFold) |
ExprResult | VerifyIntegerConstantExpression (Expr *E, AllowFoldKind CanFold=NoFold) |
void | DiagnoseAssignmentAsCondition (Expr *E) |
DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition, warn if it's an assignment. | |
void | DiagnoseEqualityWithExtraParens (ParenExpr *ParenE) |
Redundant parentheses over an equality comparison can indicate that the user intended an assignment used as condition. | |
FullExprArg | MakeFullExpr (Expr *Arg) |
FullExprArg | MakeFullExpr (Expr *Arg, SourceLocation CC) |
FullExprArg | MakeFullDiscardedValueExpr (Expr *Arg) |
ExprResult | CheckBooleanCondition (SourceLocation Loc, Expr *E, bool IsConstexpr=false) |
CheckBooleanCondition - Diagnose problems involving the use of the given expression as a boolean condition (e.g. | |
ConditionResult | ActOnCondition (Scope *S, SourceLocation Loc, Expr *SubExpr, ConditionKind CK, bool MissingOK=false) |
QualType | CheckConditionalOperands (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc) |
Note that LHS is not null here, even if this is the gnu "x ?: y" extension. | |
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) |
QualType | CheckSizelessVectorOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind) |
QualType | CheckMatrixElementwiseOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) |
Type checking for matrix binary operators. | |
QualType | CheckMatrixMultiplyOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign) |
bool | isValidSveBitcast (QualType srcType, QualType destType) |
Are the two types SVE-bitcast-compatible types? I.e. | |
bool | areMatrixTypesOfTheSameDimension (QualType srcTy, QualType destTy) |
Are the two types matrix types and do they have the same dimensions i.e. | |
bool | areVectorTypesSameSize (QualType srcType, QualType destType) |
bool | areLaxCompatibleVectorTypes (QualType srcType, QualType destType) |
Are the two types lax-compatible vector types? That is, given that one of them is a vector, do they have equal storage sizes, where the storage size is the number of elements times the element size? | |
bool | isLaxVectorConversion (QualType srcType, QualType destType) |
Is this a legal conversion between two types, one of which is known to be a vector type? | |
bool | anyAltivecTypes (QualType srcType, QualType destType) |
ExprResult | checkUnknownAnyCast (SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path) |
Check a cast of an unknown-any type. | |
ExprResult | forceUnknownAnyToType (Expr *E, QualType ToType) |
Force an expression with unknown-type to an expression of the given type. | |
ExprResult | checkUnknownAnyArg (SourceLocation callLoc, Expr *result, QualType ¶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 | CheckExtVectorCast (SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind) |
QualType | PreferredConditionType (ConditionKind K) const |
ExprResult | UsualUnaryConversions (Expr *E) |
UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6.3). | |
ExprResult | CallExprUnaryConversions (Expr *E) |
CallExprUnaryConversions - a special case of an unary conversion performed on a function designator of a call expression. | |
ExprResult | DefaultFunctionArrayConversion (Expr *E, bool Diagnose=true) |
DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4). | |
ExprResult | DefaultFunctionArrayLvalueConversion (Expr *E, bool Diagnose=true) |
ExprResult | DefaultLvalueConversion (Expr *E) |
ExprResult | DefaultArgumentPromotion (Expr *E) |
DefaultArgumentPromotion (C99 6.5.2.2p6). | |
VariadicCallType | getVariadicCallType (FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn) |
VarArgKind | isValidVarArgType (const QualType &Ty) |
Determine the degree of POD-ness for an expression. | |
void | checkVariadicArgument (const Expr *E, VariadicCallType CT) |
Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic if not. | |
bool | GatherArgumentsForCall (SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr * > Args, SmallVectorImpl< Expr * > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false) |
GatherArgumentsForCall - Collector argument expressions for various form of call prototypes. | |
ExprResult | DefaultVariadicArgumentPromotion (Expr *E, VariadicCallType CT, FunctionDecl *FDecl) |
QualType | UsualArithmeticConversions (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, ArithConvKind ACK) |
UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6.3.1.8). | |
bool | DiagnoseAssignmentResult (AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr) |
DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specified by ConvTy. | |
AssignConvertType | CheckAssignmentConstraints (SourceLocation Loc, QualType LHSType, QualType RHSType) |
CheckAssignmentConstraints - Perform type checking for assignment, argument passing, variable initialization, and function return values. | |
AssignConvertType | CheckAssignmentConstraints (QualType LHSType, ExprResult &RHS, CastKind &Kind, bool ConvertRHS=true) |
Check assignment constraints and optionally prepare for a conversion of the RHS to the LHS type. | |
AssignConvertType | CheckSingleAssignmentConstraints (QualType LHSType, ExprResult &RHS, bool Diagnose=true, bool DiagnoseCFAudited=false, bool ConvertRHS=true) |
Check assignment constraints for an assignment of RHS to LHSType. | |
AssignConvertType | CheckTransparentUnionArgumentConstraints (QualType ArgType, ExprResult &RHS) |
QualType | InvalidOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) |
the following "Check" methods will return a valid/converted QualType or a null QualType (indicating an error diagnostic was issued). | |
QualType | InvalidLogicalVectorOperands (SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) |
Diagnose cases where a scalar was implicitly converted to a vector and diagnose the underlying types. | |
QualType | CheckMultiplyDivideOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool IsDivide) |
QualType | CheckRemainderOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false) |
QualType | CheckAdditionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType *CompLHSTy=nullptr) |
QualType | CheckSubtractionOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=nullptr) |
QualType | CheckShiftOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, bool IsCompAssign=false) |
void | CheckPtrComparisonWithNullChar (ExprResult &E, ExprResult &NullE) |
QualType | CheckCompareOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) |
QualType | CheckBitwiseOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) |
QualType | CheckLogicalOperands (ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) |
QualType | CheckAssignmentOperands (Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType, BinaryOperatorKind Opc) |
bool | isAlwaysConstantEvaluatedContext () const |
bool | isUnevaluatedContext () const |
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5. | |
bool | isImmediateFunctionContext () const |
bool | isInLifetimeExtendingContext () const |
bool | isCheckingDefaultArgumentOrInitializer () const |
std::optional< ExpressionEvaluationContextRecord::InitializationContext > | InnermostDeclarationWithDelayedImmediateInvocations () const |
std::optional< ExpressionEvaluationContextRecord::InitializationContext > | OutermostDeclarationWithDelayedImmediateInvocations () const |
void | keepInLifetimeExtendingContext () |
keepInLifetimeExtendingContext - Pull down InLifetimeExtendingContext flag from previous context. | |
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. | |
static ConditionResult | ConditionError () |
static bool | TooManyArguments (size_t NumParams, size_t NumArgs, bool PartialOverloading=false) |
To be used for checking whether the arguments being passed to function exceeds the number of parameters expected for it. | |
C++ Expressions | |
Implementations are in SemaExprCXX.cpp | |
enum | AllocationFunctionScope { AFS_Global , AFS_Class , AFS_Both } |
The scope in which to find allocation functions. More... | |
enum | IfExistsResult { IER_Exists , IER_DoesNotExist , IER_Dependent , IER_Error } |
Describes the result of an "if-exists" condition check. More... | |
LazyDeclPtr | StdBadAlloc |
The C++ "std::bad_alloc" class, which is defined by the C++ standard library. | |
LazyDeclPtr | StdAlignValT |
The C++ "std::align_val_t" enum class, which is defined by the C++ standard library. | |
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, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose=true) |
Finds the overloads of operator new and delete that are appropriate for the allocation. | |
void | DeclareGlobalNewDelete () |
DeclareGlobalNewDelete - Declare the global forms of operator new and delete. | |
void | DeclareGlobalAllocationFunction (DeclarationName Name, QualType Return, ArrayRef< QualType > Params) |
DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't already exist. | |
bool | FindDeallocationFunction (SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true, bool WantSize=false, bool WantAligned=false) |
FunctionDecl * | FindUsualDeallocationFunction (SourceLocation StartLoc, bool CanProvideSize, bool Overaligned, DeclarationName Name) |
FunctionDecl * | FindDeallocationFunctionForDestructor (SourceLocation StartLoc, CXXRecordDecl *RD) |
ExprResult | ActOnCXXDelete (SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand) |
ActOnCXXDelete - Parsed a C++ 'delete' expression (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) |
QualType | CheckSizelessVectorConditionalTypes (ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc) |
QualType | CXXCheckConditionalOperands (ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc) |
Check the operands of ?: under C++ semantics. | |
QualType | FindCompositePointerType (SourceLocation Loc, Expr *&E1, Expr *&E2, bool ConvertArgs=true) |
Find a merged pointer type and convert the two expressions to it. | |
QualType | FindCompositePointerType (SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool ConvertArgs=true) |
ExprResult | MaybeBindToTemporary (Expr *E) |
MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor, this will return CXXBindTemporaryExpr. | |
ExprResult | IgnoredValueConversions (Expr *E) |
IgnoredValueConversions - Given that an expression's result is syntactically ignored, perform any conversions that are required. | |
ExprResult | CheckUnevaluatedOperand (Expr *E) |
ExprResult | CorrectDelayedTyposInExpr (Expr *E, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;}) |
Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and returning a new Expr if there were typos that were all successfully corrected and ExprError if one or more typos could not be corrected. | |
ExprResult | CorrectDelayedTyposInExpr (ExprResult ER, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;}) |
IfExistsResult | CheckMicrosoftIfExistsSymbol (Scope *S, CXXScopeSpec &SS, const DeclarationNameInfo &TargetNameInfo) |
IfExistsResult | CheckMicrosoftIfExistsSymbol (Scope *S, SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name) |
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) |
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 | CorrectTypoKind { CTK_NonError , CTK_ErrorRecovery } |
enum class | MissingImportKind { Declaration , Definition , DefaultArgument , ExplicitSpecialization , PartialSpecialization } |
Kinds of missing import. More... | |
typedef llvm::SmallSet< SourceLocation, 2 > | SrcLocSet |
typedef llvm::DenseMap< IdentifierInfo *, SrcLocSet > | IdentifierSourceLocations |
typedef llvm::SmallSetVector< DeclContext *, 16 > | AssociatedNamespaceSet |
typedef llvm::SmallSetVector< CXXRecordDecl *, 16 > | AssociatedClassSet |
typedef std::function< void(const TypoCorrection &)> | TypoDiagnosticGenerator |
typedef std::function< ExprResult(Sema &, TypoExpr *, TypoCorrection)> | TypoRecoveryCallback |
bool | DisableTypoCorrection |
Tracks whether we are in a context where typo correction is disabled. | |
unsigned | TyposCorrected |
The number of typos corrected by CorrectTypo. | |
IdentifierSourceLocations | TypoCorrectionFailures |
A cache containing identifiers for which typo correction failed and their locations, so that repeated attempts to correct an identifier in a given location are ignored if typo correction already failed for it. | |
llvm::FoldingSet< SpecialMemberOverloadResultEntry > | SpecialMemberCache |
A cache of special member function overload resolution results for C++ records. | |
llvm::SmallVector< TypoExpr *, 2 > | TypoExprs |
Holds TypoExprs that are created from createDelayedTypo . | |
SpecialMemberOverloadResult | LookupSpecialMember (CXXRecordDecl *D, 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. | |
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) |